acpi_video_set_dmi_backlight_type() is troublesome because it may end
up getting called after other backlight drivers have already called
acpi_video_get_backlight_type() resulting in the other drivers already
being registered even though they should not.
Removing this should be ok now, since other drivers have done a similar
change to get rid of this function call (that has been removed
completely).
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Andy Whitcroft [Fri, 13 May 2022 12:14:05 +0000 (13:14 +0100)]
UBUNTU: [Packaging] sameport -- add support for sameport versioning
We currently support two types of kernels which are programatically
configured (marked "backports" in kernel-series and having
copy/local-mangle support):
backports: those who express in an older series (~20.04.N)
forwardports: those who express in a newer series (+22.04.N)
Add a new third type which represents "backports" into the same series:
sameports: those which express in the same series (.N)
These will simply number with an additional upload number to allow local
respins, for example linux/5.15.0-30.31 -> linux-lowlatency/5.15.0-30.31.1.
Add support for BACKPORT_SUFFIX to be present and empty using `--` to
represent this situation (in a similar fashion to variants).
Signed-off-by: Andy Whitcroft <apw@canonical.com>
(amend syntax to use bash variable expansion) Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
UBUNTU: [Config] Raise riscv64 CONFIG_NR_CPUS to 32
BugLink: https://bugs.launchpad.net/bugs/1967889
The QEMU 7.0 virt machine supports up to 512 virtual CPUs, so raise this
limit to the maximum of 32 so we can use more of them.
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Alexandre Ghiti [Mon, 10 Oct 2022 11:27:29 +0000 (13:27 +0200)]
UBUNTU: SAUCE: riscv: mm: Force disable sv57
BugLink: https://launchpad.net/bugs/1991790
The Kinetic userspace is not yet ready for 5-level page tables. Eg. Go
programs use too many of the higher bits for pointer tagging.
So force disable sv57 even on Qemu which advertices support for it.
Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com> Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
UBUNTU: [Config] Set CONFIG_PWM_SIFIVE=m for riscv64
BugLink: https://launchpad.net/bugs/1988984
Only the SoCs on the SiFive Unleashed and Unmatched boards use this
driver, but none of them needs it at boot time. So compile it as a
module to save memory on other systems.
This also works around a bug in the UART driver fixed by 643792048ee8 ("serial: sifive: enable clocks for UART when probed")
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1991951
Harmonize our RCU and RCU_EXP CPU_STALL_TIMEOUTS to be 60s on all
architectures, and the upstream default/maximum 21,000ms for the
EXPEDITED one.
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1991664
cbd/kteam-tools have been updated to install gcc-12 toolchain. dkms
dynamically checks and tries to use the same compiler version as the
kernel build. When backporting, the toolchain version should be set in
full to the versioned gcc-12, make it so. This is to support building
dkms modules with matching gcc in jammy.
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1990964
Export F_*64 definitions to userspace permanently. "ifndef" usage made it
vailable at all times to the userspace, and this change has actually broken
building strace with the latest kernel headers. There could be some debate
whether having these F_*64 definitions exposed to the user space 64-bit
applications, but it seems that were no harm (as they were exposed already
for quite some time), and they are useful at least for strace for compat
application tracing purposes.
Andrea Righi [Mon, 12 Sep 2022 11:59:05 +0000 (13:59 +0200)]
UBUNTU: [Packaging[ get rid of unnecessary 'set -x'
Drop a 'set -x' previously added for debugging purposes by commit 7339f2ad00dc ("UBUNTU: [Packaging]: always use fully qualified <triplet>-gcc-VER toolchain")
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
UBUNTU: [Config] Switch from DECOMP_SINGLE to DECOMP_MULTI_PERCPU
BugLink: https://bugs.launchpad.net/bugs/1980861
Overall MULTI_PERCPU has similar or better performance on the wide
range of instance types and squashfs filesystems.
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
UBUNTU: [Packaging] Remove circular dependency between image & modules
Currently we have circular dependencies between
linux-image-[unsigned]-ABI and linux-modules[-extra] packages.
Debian policy point of view this is bad and does lead to worse
dependency resolution cycles in apt upon kernel installs and upgrades,
but mostly harmless as apt has learned to deal with that a long time
ago.
It is harmful for kernels that have additional types of debs or snaps
that deliver vmlinux.
In addition to regular linux-image[-unsigned] we produce various FDE
linux-images like things with builtin initrds, i.e. linux-fde,
linux-uc22, FIT images etc. All of them vendor in vmlinuz, and do not
need to have linux-image[-unsigned] installed. They also often do not
want to pull in any of the bootloaders listed as recommends by the
linux-image-ABI package either, as they use alternative methods to
boot (i.e. gadget snap, nullboot, flashkernel, weird cloud firmware
provided stuff, etc).
Remove linux-modules[-extra] -> linux-image[-unsigned] dependency. Add
linux-modules-extra -> linux-modules dependency (because extra modules
use symbols from the regular modules package).
This will enable us to build clean meta-packages that pull in
appropriate image, fde, uc22, FIT kernel image with matching modules,
without installing redudant copies of vmlinux or bootloaders.
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
BugLink: https://bugs.launchpad.net/bugs/1981437
Enable power capping for the dynamic thermal power management for
riscv64. This option is not annotated, but let's enable it just like
all the other architectures.
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
UBUNTU: [Config] Enable CONFIG_DRM_RCAR_USE_LVDS for riscv64
BugLink: https://bugs.launchpad.net/bugs/1981437
This option is not annotated, but let's enable this feature for riscv64
like all the other architectures have.
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
UBUNTU: [Config] Align riscv64 CONFIG_LSM with other architectures
BugLink: https://bugs.launchpad.net/bugs/1981437
The CONFIG_LSM option for riscv64 is doesn't enable the landlock module
at boot. Add it and align riscv64 with all the other archituctures.
Signed-off-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Acked-by: Tim Gardner <tim.gardner@canonical.com> Acked-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
UBUNTU: [Packaging]: always use fully qualified <triplet>-gcc-VER toolchain
Always define $(gcc) variable and export it. Always use fully
qualified <triplet>-gcc-VER toolchains for native (GNU build) and
cross (GNU host) compilation. Generate matching build-dependencies for
native and cross builds.
This ensures that native and cross builds use the same fully qualified
toolchain binary, fixed in time, irrespective of gcc-defaults updates.
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Aaron Ma [Wed, 3 Aug 2022 07:55:00 +0000 (09:55 +0200)]
UBUNTU: SAUCE: igc: wait for the MAC copy when enabled MAC passthrough
BugLink: https://bugs.launchpad.net/bugs/1942999
Such as dock hot plug event when runtime, for hardware implementation,
the MAC copy takes less than one second when BIOS enabled MAC passthrough.
After test on Lenovo TBT4 dock, 600ms is enough to update the
MAC address.
Otherwise ethernet fails to work.
Link: https://lore.kernel.org/lkml/20210702045120.22855-2-aaron.ma@canonical.com/ Signed-off-by: Aaron Ma <aaron.ma@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com>
[note: this is a non-upstream work-around since upstream does not seem to be to hard
at work to do a proper fix] Acked-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Juerg Haefliger [Fri, 19 Aug 2022 13:35:49 +0000 (15:35 +0200)]
UBUNTU: [Packaging] Make stamp-install-<flavor> target reentrant
During development or for debugging purposes it's sometimes desirable to
run 'debian/rules build-<flavor>' multiple times in a row without starting
from scratch, i.e. without cleaning the build first. Currently this fails
because make tries to move a subdirectory to an already existing location
when installing files for the modules extra package:
mv: cannot move '/build/debian/linux-modules-5.15.0-1016-oracle/lib/modules/5.15.0-1016-oracle/kernel' to '/build/debian/linux-modules-extra-5.15.0-1016-oracle/lib/modules/5.15.0-1016-oracle/kernel/kernel': Directory not empty
make: *** [debian/rules.d/2-binary-arch.mk:155: /build/debian/stamps/stamp-install-oracle] Error 1
Fix that by properly running dh_prep at the beginning of the install
target.
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
UBUNTU: SAUCE: overlayfs: fix incorrect mnt_id of files opened from map_files
BugLink: https://bugs.launchpad.net/bugs/1983640
The hack was introduced in ("UBUNTU: SAUCE: overlayfs: allow with
shiftfs as underlay") and it broke checkpoint/restore of docker
contains:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1857257
The following script can be used to trigger the issue:
#!/bin/bash
cat > test.py << EOF
import sys
f = open("/proc/self/maps")
for l in f.readlines():
if "python" not in l:
continue
print(l)
s = l.split()
start, end = s[0].split("-")
fname = s[-1]
print(start, end, fname)
break
else:
sys.exit(1)
Thanks to Andrei Vagin for the reproducer and investigation of this problem.
[refactoring to drop dependency of AUFS] Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
J. R. Okajima [Wed, 3 Aug 2022 12:00:43 +0000 (15:00 +0300)]
UBUNTU: SAUCE: for aufs mmap: print the virtual file path
BugLink: https://bugs.launchpad.net/bugs/1983640
For details, read the document in later commit.
I don't like this approach, and UnionMount seems to try solving a
similar problem by customizing f_dentry and d_inode. Ideally it is
better to result the same fix, but it may not be so easy because
UnionMount doesn't have its virtual inode/dentry/file objects as it is
not a 'filesystem.'
Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
(cherry picked from commit f8a27912904bdc40a27f434a9b6d19f56e7fb3b6)
[ https://github.com/sfjro/aufs5-linux ]
This patch is required to fix: a80dceb9e85 ("UBUNTU: SAUCE: overlayfs: allow with shiftfs as underlay")
Please, refer to bug:
https://bugs.launchpad.net/bugs/1967924
for more details.
See also next commit
"UBUNTU: SAUCE: overlayfs: fix incorrect mnt_id of files opened from map_files"
that is the missing fix to properly support overlayfs with shiftfs.
(backported from https://github.com/sfjro/aufs5-linux) Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> Signed-off-by: Andrea Righi <andrea.righi@canonical.com>