Skip to content

[Deepin-Kernel-SIG] [linux 6.18-y] rebase our patches and fix builds -part5#1443

Merged
lanlanxiyiji merged 90 commits intodeepin-community:linux-6.18.yfrom
opsiff:linux-6.18.y-2026-01-06-part5
Feb 3, 2026
Merged

[Deepin-Kernel-SIG] [linux 6.18-y] rebase our patches and fix builds -part5#1443
lanlanxiyiji merged 90 commits intodeepin-community:linux-6.18.yfrom
opsiff:linux-6.18.y-2026-01-06-part5

Conversation

@opsiff
Copy link
Member

@opsiff opsiff commented Jan 20, 2026

Due to github rebase merge limit, submit part5 from linux-6.6.y, linux-6.12.y and build fix.
Ben Hutchings (7):
efi: Lock down the kernel if booted in secure boot mode
mtd: phram,slram: Disable when the kernel is locked down
debian: firmware_loader: Log direct loading failures as info for d-i
x86: memtest: WARN if bad RAM found
ARM: dts: kirkwood: Fix SATA pinmux-ing for TS419
ARM: mm: Export __sync_icache_dcache() for xen-privcmd
perf tools: Fix unwind build on i386

David Howells (1):
efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode

Geoff Levand (1):
arm64/acpi: Add fixup for HPE m400 quirks

Krzysztof Kozlowski (1):
powerpc/boot: Fix missing crc32poly.h when building with KERNEL_XZ

Kunyang_Fan (5):
UBUNTU: ODM: hwmon: add driver for AAEON devices
UBUNTU: ODM: leds: add driver for AAEON devices
UBUNTU: ODM: gpio: add driver for AAEON devices
UBUNTU: ODM: mfd: Add support for IO functions of AAEON devices
UBUNTU: ODM: mfd: Check AAEON BFPI version before adding device

LeoLiu-oc (2):
perf/x86/zhaoxin/uncore: fix pci_driver conflict issue
x86/mce: Avoid triggering a schedule call in the NMI context

Liao Xuan (1):
pinctrl: Add device HID for Hygon GPIO controller

Linn Crosetto (1):
arm64: add kernel config option to lock down when in Secure Boot mode

Miao Wang (7):
loongarch: basic boot support for legacy firmware
loongarch: parse BPI data and add memory mapping
loongarch: add MADT ACPI table conversion
loongarch: correct missing offset of PCI root controller in DSDT table
loongarch: fix missing dependency info in DSDT
loongarch: fix DMA address offset
loongarch: fix HT_RX_INT_TRANS register

Mingcong Bai (10):
arch: configs: use -${arch}-desktop-rolling suffix
x86: configs: enable DRM_XE
x86: configs: enable Elan and Goodix I2C-over-OF HID devices
AOSCOS: platform: x86: ideapad-laptop: add fixes for ThinkBook 14+
(2024 G6+)
x86: configs: enable DesignWare I2C
x86: configs: enable AAEON drivers
x86: configs: enable PINCTRL_INTEL_PLATFORM
scripts: install .config in /usr/src/linux-headers-$kver
DEEPIN: platform: ideapad-laptop: fix if branch syntax
DEEPIN: arm64: configs: enable Renesas xHCI modules

WangYuli (7):
deepin: CI: package arm64/loong64 daily build kernel
deepin: OWNERS: Add winnscode to reviewers
deepin: configs: Enable CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT
LoongArch: BPI: Declare acpi_arch_init with a void prototype
deepin: arm64: config: Update arm64 desktop config
deepin: arm64: config: Enable Android binder drivers
deepin: x86: config: Update deepin_x86_desktop_defconfig to better
support Intel devices

Wentao Guan (28):
Revert "LoongArch: fix KASLR can not be disabled by nokaslr when boot
from old BPI"
Revert "LoongArch: use arch specific phys_to_dma"
Revert "LoongArch: Fixed EIOINTC structure members"
Revert "LoongArch: Fix virtual machine startup error"
Revert "LoongArch: Old BPI compatibility"
Revert "LoongArch: fix efi map page table error"
Revert "LoongArch: add kernel setvirtmap for runtime"
LoongArch: readd add_numamem_region
deepin: PCI: Add ACS override support for debug
config: enable support for firmware loader debug
deepin: firmware_loader: move log failed to load firmware to real
failed
deepin: x86: configs: enable dmesg restrict
sound: gf: adapt for v6.18
Loongarch: entry: fix syscall_get_arguments() VS no-bultin-memcpy
deepin: config: adjust PSI and RCU config
deepin: config: Enable NO_HZ_FULL
config: deepin_loongarch_desktop_defconfig: Disable CONFIG_DRM_LEGACY
deepin: config: enable NVME_HWMON config
deepin: config: disable BLK_DEV_THROTTLING_LOW
deepin: config: enable RTW89_8922AE config
deepin: arm64: config: disable ARCH_MA35 and NPCM
deepin: config: disable RANDOM_KMALLOC_CACHES
deepin: config: adjust SPMI config
deepin: config: adjust PC104 config
fs/locks: optimize locks_remove_posix
UBUNTU: SAUCE: gpio: Fix aaeon driver for 6.18.
UBUNTU: SAUCE: hwmon: Fix aaeon driver for 6.11.
CI: use crosscompile for loongarch

Yanteng Si (1):
LoongArch: enable CONFIG_DEBUG_INFO_BTF by default

YunQiang Su (1):
Use RELAXED ieee754 mode for Loongson-3 as 3A 4000 is 2008-only

jasontao (1):
add gf hdaudio 001 patch in deepin kernel 6.6

liutianyu1250 (2):
BACKPORT: PHYTIUM: Update phytium copyright info to 2024
PHYTIUM: net: stmmac: phytium driver add pm support

wenlunpeng (2):
build: add git commitid in changelog
printk: show build commitid in the front of dmesg

忘怀 (12):
CI: upload kabi when build
CI: upload kabi when build arm64
deepin_x86_desktop_defconfig: Set NETFILTER_XT_MATCH_CGROUP as module
config: deepin_x86_desktop_defconfig: Enable LIST_HARDENED
config: deepin_arm64_desktop_defconfig: Enable LIST_HARDENED
config: deepin_loongarch_desktop_defconfig: Enable LIST_HARDENED
config: deepin_loongarch_desktop_defconfig: disbale ZERO_CALL_USED_REG
config: deepin_arm64_desktop_defconfig: Disable CONFIG_N_GSM
config: deepin_loongarch_desktop_defconfig: Disable CONFIG_N_GSM
deepin: arm64: config: Enable ftrace syscall
deepin: arm64: config: Enable HISI crypto acct drivers
CI: Add patch check by using build kernel loong64

.github/workflows/build-kernel-arm64.yml | 6 +
.github/workflows/build-kernel-loong64.yml | 35 +
.github/workflows/build-kernel.yml | 5 +
.../workflows/package-kernel-arm64-daily.yml | 35 +
.../package-kernel-loong64-daily.yml | 35 +
.../admin-guide/kernel-parameters.txt | 9 +
MAINTAINERS | 12 +
arch/arm/boot/dts/marvell/kirkwood-ts419.dtsi | 8 +
arch/arm/mm/flush.c | 1 +
.../configs/deepin_arm64_desktop_defconfig | 52 +-
arch/arm64/kernel/acpi.c | 31 +
arch/loongarch/Kconfig | 1 -
.../deepin_loongarch_desktop_defconfig | 23 +-
arch/loongarch/configs/loongson3_defconfig | 6 +
arch/loongarch/include/asm/acpi.h | 7 +
arch/loongarch/include/asm/addrspace.h | 1 -
arch/loongarch/include/asm/dma-direct.h | 22 -
arch/loongarch/include/asm/efi.h | 1 -
arch/loongarch/include/asm/irq.h | 1 -
arch/loongarch/include/asm/loongarch.h | 1 -
arch/loongarch/include/asm/syscall.h | 6 +-
arch/loongarch/kernel/Makefile | 3 +-
arch/loongarch/kernel/acpi.c | 7 +-
arch/loongarch/kernel/dma.c | 13 -
arch/loongarch/kernel/efi.c | 217 +---
arch/loongarch/kernel/env.c | 9 +-
arch/loongarch/kernel/irq.c | 25 +-
arch/loongarch/kernel/legacy_boot.c | 1020 ++++++++++-------
arch/loongarch/kernel/legacy_boot.h | 97 +-
arch/loongarch/kernel/mem.c | 31 +-
arch/loongarch/kernel/numa.c | 72 +-
arch/loongarch/kernel/relocate.c | 6 +-
arch/loongarch/kernel/reset.c | 3 +-
arch/loongarch/kernel/setup.c | 20 +-
arch/loongarch/kernel/smp.c | 8 +-
arch/loongarch/pci/acpi.c | 148 +--
arch/mips/kernel/fpu-probe.c | 7 +-
arch/powerpc/boot/Makefile | 2 +-
arch/x86/configs/deepin_x86_desktop_defconfig | 264 ++++-
arch/x86/events/zhaoxin/uncore.c | 135 ---
arch/x86/kernel/cpu/mce/core.c | 8 +-
arch/x86/kernel/setup.c | 16 +-
deepin/OWNERS | 3 +-
drivers/acpi/pci_root.c | 1 +
drivers/acpi/tables.c | 2 +
drivers/base/firmware_loader/main.c | 4 +
drivers/firmware/efi/Makefile | 1 +
drivers/firmware/efi/efi-init.c | 5 +-
drivers/firmware/efi/fdtparams.c | 12 +-
drivers/firmware/efi/libstub/fdt.c | 6 +
drivers/firmware/efi/libstub/loongarch.c | 18 +
drivers/firmware/efi/secureboot.c | 44 +
drivers/gpio/Kconfig | 11 +
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-aaeon.c | 209 ++++
drivers/hwmon/Kconfig | 11 +
drivers/hwmon/Makefile | 1 +
drivers/hwmon/hwmon-aaeon.c | 566 +++++++++
drivers/irqchip/irq-loongarch-cpu.c | 10 +-
drivers/irqchip/irq-loongson-eiointc.c | 8 +-
drivers/irqchip/irq-loongson-pch-pic.c | 6 -
drivers/leds/Kconfig | 11 +
drivers/leds/Makefile | 1 +
drivers/leds/leds-aaeon.c | 142 +++
drivers/mfd/Kconfig | 11 +
drivers/mfd/Makefile | 1 +
drivers/mfd/mfd-aaeon.c | 99 ++
drivers/mtd/devices/phram.c | 6 +-
drivers/mtd/devices/slram.c | 9 +-
.../ethernet/stmicro/stmmac/dwmac-phytium.c | 3 +-
drivers/pci/quirks.c | 102 ++
drivers/pinctrl/pinctrl-amd.c | 1 +
drivers/platform/x86/lenovo/ideapad-laptop.c | 28 +-
fs/locks.c | 3 -
include/linux/acpi.h | 10 +
include/linux/efi.h | 20 +-
include/linux/pci-acpi.h | 4 +
include/linux/printk.h | 1 +
include/linux/security.h | 6 +
init/main.c | 2 +-
init/version-timestamp.c | 4 +
init/version.c | 1 +
mm/memtest.c | 4 +
scripts/mkcompile_h | 3 +
scripts/package/builddeb | 3 +
scripts/package/mkdebian | 1 +
security/lockdown/Kconfig | 15 +
security/lockdown/lockdown.c | 2 +-
sound/hda/codecs/hdmi/hdmi.c | 2 +
sound/hda/common/controller.c | 107 ++
sound/hda/common/hda_controller.h | 3 +
sound/hda/controllers/intel.c | 93 +-
sound/hda/controllers/intel.h | 11 +
tools/perf/arch/x86/util/unwind-libunwind.c | 4 +-
94 files changed, 2789 insertions(+), 1252 deletions(-)
create mode 100644 .github/workflows/build-kernel-loong64.yml
create mode 100644 .github/workflows/package-kernel-arm64-daily.yml
create mode 100644 .github/workflows/package-kernel-loong64-daily.yml
delete mode 100644 arch/loongarch/include/asm/dma-direct.h
create mode 100644 drivers/firmware/efi/secureboot.c
create mode 100644 drivers/gpio/gpio-aaeon.c
create mode 100644 drivers/hwmon/hwmon-aaeon.c
create mode 100644 drivers/leds/leds-aaeon.c
create mode 100644 drivers/mfd/mfd-aaeon.c

Summary by Sourcery

Rebase and extend Deepin’s 6.18 kernel with enhanced EFI secure-boot handling and lockdown, substantial LoongArch firmware/ACPI/NUMA rework to use BPI and UEFI paths, platform fixes and audio improvements, plus new AAEON ODM drivers, PCI ACS override support, and expanded CI workflows for arm64/loong64 and x86 ABI artifacts.

New Features:

  • Introduce generic EFI secure-boot flag and kernel lockdown integration, wiring secure-boot state from EFI/FDT into the core kernel.
  • Add LoongArch support for new-style BPI firmware tables, including memory map parsing, ACPI table patching, and NUMA-aware memblock setup.
  • Add PCIe ACS override support via boot parameter to force ACS on selected devices or topologies for debugging/IOMMU isolation.
  • Add AAEON ODM support via new mfd, GPIO, HWMON, and LED drivers and enable them in configs.
  • Extend HDA/HDMI support for Glenfly/Arise GPUs, including framebuffer-backed audio streams and new codec IDs.
  • Add kernel banner commit-id printing and propagate git commit IDs into changelog and dmesg.
  • Add AMD/Hygon GPIO ACPI HID support and export ARM __sync_icache_dcache() for Xen privcmd.
  • Add CI workflows to build and upload Module.symvers and daily binary packages for x86, arm64, and loong64 kernels.

Bug Fixes:

  • Fix LoongArch legacy and UEFI boot paths by removing deprecated BPI structs, correcting syscall argument handling, DMA offsets, HT interrupt translation, and EFI memmap phys/virt handling.
  • Fix LoongArch ACPI/IRQ initialisation by always using irqchip_init, rebuilding MADT/MCFG from firmware data when needed, and cleaning up legacy IRQ domains.
  • Fix EFI initrd table handling by converting initrd base to physical address and wiring secure-boot mode through common EFI init.
  • Relax MIPS IEEE754 default mode on Loongson-3 to match 2008-only FPU, and correct perf libunwind error returns on x86.
  • Harden slram/phram configuration by treating memory-region parameters as hardware I/O params and blocking them under lockdown.
  • Resolve x86 MCE NMI context ordering and WARN when memtest detects bad RAM to guide users to memtest86+ and memmap usage.
  • Fix Lenovo ideapad-laptop WMI handling and suspend/resume interactions, including new ThinkBook 2024 IDs and spurious event handling.
  • Fix Phytium dwmac driver PM by wiring stmmac platform PM ops and update copyright, and adjust Loongson PCI ACPI resource filters for legacy I/O bases.

Enhancements:

  • Streamline LoongArch EFI runtime initialisation by using direct runtime pointers and simplifying virtual mapping logic in the stub for “OldWorld” firmware.
  • Improve firmware loader diagnostics by logging failed firmware loads as info even when fallback succeeds.
  • Simplify fs/locks POSIX close-unlock path and NUMA/memblock initialisation on LoongArch by routing through common helpers.
  • Update powerpc boot Makefile include paths and various arch configs (x86/arm64/loongarch) to enable additional drivers, hardening options and platform support.
  • Enhance ACPI handling on arm64 with an m400 HPE ProLiant quirk to disable broken APEI and add arch hooks for ACPI table overrides and completion callbacks.
  • Refine LoongArch PCI ACPI root probing by delegating to generic helpers and adding an arch filter hook for I/O windows.
  • Make EFI shutdown unconditional in LoongArch reset paths and drop unused IOCSR helpers and constants.

Build:

  • Emit git commit IDs into generated changelogs and dmesg via mkcompile_h, build scripts, and a new linux_commitid_banner.
  • Adjust build system and headers packaging to install .config into linux-headers and include top-level headers for powerpc boot builds.

CI:

  • Add GitHub Actions workflows to build kernels and upload Module.symvers for x86 and arm64 and to cross-build loong64 kernels with artifacts.
  • Add scheduled daily package workflows to build and publish arm64 and loong64 kernel .deb packages.
  • Enable CI to upload KABI data during arm64/loong64 builds and use cross-compilers for LoongArch where required.

Documentation:

  • Extend admin-guide kernel-parameters documentation for new EFI secure-boot / PCI ACS override options as part of lockdown support.

Tests:

  • Enable CONFIG_DEBUG_INFO_BTF by default on LoongArch to improve observability and tooling support.

Chores:

  • Update Deepin OWNERS to add a new reviewer and refresh Deepin/Ubuntu vendor tags, configs, and ODM integration for better device coverage across x86, arm64, and LoongArch.

opsiff and others added 30 commits January 20, 2026 17:02
Link: deepin-community#306
(cherry picked from commit 1cbeed2)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Link: deepin-community#306
(cherry picked from commit 5989a08)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Banner in dmesg can be flushed if too many debug log.
We save it to deb package so even it's not installed
we can still tell which source code it is from.

To check commitid:
If installed, use apt changelog <package-name>. If not,
extract changelog.Debian.gz from package and zcat it.

Signed-off-by: wenlunpeng <wenlunpeng@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
Link: deepin-community#381
(cherry picked from commit c72a2fd)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
This can help us find source code version when troubleshooting.

Signed-off-by: wenlunpeng <wenlunpeng@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
(cherry picked from commit 0aed0ab)
Link: deepin-community#381
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>

Conflicts:
	init/main.c
… from old BPI"

This reverts commit a5c2285b4823d0d4f184d3df3679073a60b08d87.
Link: deepin-community#356
This reverts commit c580adb323191ff87cedafc7812de3537dfed1c8.
Link: deepin-community#356
This reverts commit b6b2b8aaf5202a93306bc73ee0c8f7a27c14221f.
Link: deepin-community#356
This reverts commit 4fbc1aa6fc4b8ec03e750976d3d263e1ae980f5d.
Link: deepin-community#356
This reverts commit 29da605493460800aec33f5e012ad47a17ee887e.
Link: deepin-community#356
This reverts commit 4a111ac3f26201847cb3a1510991deb5e35943af.
Link: deepin-community#356
This reverts commit 65946e9878f91c67a61c9bf24dca072117670585.
Link: deepin-community#356
Readd the helper which removed in the commit:
commit acf5de1
Author: Bibo Mao <maobibo@loongson.cn>
Date:   Thu Nov 20 14:42:05 2025 +0800

    LoongArch: Fix NUMA node parsing with numa_memblks

    On physical machine, NUMA node id comes from high bit 44:48 of physical
    address. However it is not true on virt machine. With general method, it
    comes from ACPI SRAT table.

    Here the common function numa_memblks_init() is used to parse NUMA node
    information with numa_memblks.

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
The addresses passed from legacy firmware in efi system tables, the
initrd table, the efi system memory mapping table are virtual addresses.
This patch converts all that addresses back to physical addresses, to
make sure all the following booting processes can run smoothly like on
modern firmwares. The conversion happens unconditionally, since physical
addresses passed in by modern firmwares remain unchanged after the
conversion.

In the EFI Stub, the mapping entries given by GetMemoryMap() on legacy
firmwares contain virtual addresses in the phys_addr fields and 0x1xxxx
addresses in the virt_addr fields, causing the later call to
SetVirtualAddressMap() fails. This patch fixes this by correcting the
addresses in the virt_addr fields. This patch detects the existence of
the legacy firmware by reading DMW1 CSR, as done in the legacy loongarch
GRUB port. Only if legacy firmwares detected, this correction happens.

With this patch, the linux kernel is basically able to boot.

Link: deepin-community#356
(cherry picked from commit ec43d52)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
On legacy firmwares, the memory mapping information passed in the EFI
system table is not enough to cover all the available memory regions,
but only contains the memory region which occupied by the firmware, with
the total size of ~1GiB. More information is stored in the BPI data
structure. The complete information is combined into from the both
sources.

This patch addes the mechanism to parse the BPI data structure and
extract the memory mapping information from it. This patch also adds the
memory regions defined in the BPI to the kernel, letting the kernel to
discover all the available memory regions.

With this patch, machines with legacy firmware, with the BPI version
BPI01001, i.e. the newer version, can boot normally.

Link: deepin-community#356
(cherry picked from commit 83073fd)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>

Conflicts:
	arch/loongarch/kernel/mem.c
	arch/loongarch/kernel/numa.c
On machines with legacy firmware with BPI version BPI01000, i.e. the
older version, the content of the MADT ACPI table is not following the
later finalized ACPI standard. A conversion of the content is added by
this patch. Also the patch generates and adds a MCFG table accordingly.

The above behavior is only enabled when BPI data and the BPI01000 version
is detected.

Link: deepin-community#356
(cherry picked from commit 93e5db1)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>

Conflicts:
	include/linux/acpi.h
On machines with legacy firmware with BPI version BPI01000, the PCI root
controller information in the DSDT table lacks AddressTranslation in its
WordIO resource defination, causing the failure of the registration for the
LIO address space. This patch corrects this issue when the given offset
is zero for the PCI root controller.

This patch also fixes the lack of the leading 16K, i.e. ISA_IOSIZE, in
the defination of WordIO resource. This is because that address range is
registered unconditionally on the legacy loongarch linux port.

This patch also fixes the start addresses or end addresses of WordIO
resource not aligned to the page size by rouding the addresses up to the
nearest page starting.

The above behavior is only enabled when BPI data and the BPI01000 version
is detected.

Link: deepin-community#356
(cherry picked from commit c79c97e)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
On machines with legacy firmware with BPI01000 version, the devices on
the LIO bus lackes the dependency on the PCI root controller, causing
the memory-mapped address of the legacy IO ports read before the setup
of the mapping, resulting in kernel panic. Such DSDT can work on the
legacy loongarch linux port because the leading 16K is unconditionally
registered, before the enumeration of the devices in the DSDT table.

This patch addes such dependency info, to order the initialization of
the devices on the LIO bus after the initialization of the PCI root
controller, fixing this problem. However, the addition should be done on
each possible LIO device, and currently the patch only includes the
legacy EC device on some laptops located at the path \_SB.PCI0.LPC.EC.
Thus, this patch will be improved to include more devices.

The above behavior is only enabled when BPI data and the BPI01000 version
is detected.

Link: deepin-community#356
[ Remove acpi_arch_init defined for it had upstream define ]
(cherry picked from commit 751032f)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>

Conflicts:
	drivers/acpi/bus.c
Loongarch CPUs are using HT bus interface, which is only 40-bit wide,
to communicate with the bridge chipset. However, the actual memory
bus of the CPUs is 48-bit wide, and the available address space of DMA
requests of PCI devices is also larger than the 40-bit address space.
The address space of loongarch systems is not continuous, the bits
[47:44] of which are used to denote the belonging node id, which is
far beyond the space provided by the 40-bit wide HT bus. As a result,
a translation on the both LS7A and CPU sides is needed.

The translation happens on the LS7A side is controlled by the higher
half of the register, HT_ROUTE. Bits [12:8] denotes dma_node_id_offset
and bits[15:13] denotes dma_node_id_offset_mapped. The behavior of the
translation is that the chip extracts the node id from bit
dma_node_id_offset + 36 of a DMA address, places it at bit
dma_node_id_offset_mapped + 32, and generates the address on the HT bus.
On the CPU side, an alike translation happens, to convert the address on
the HT bus back to a proper memory address.

On machines with legacy firmware with BPI01000 version,
dma_node_id_offset is configured with 0, resulting the address which
should be used by the DMA engine of a PCI device differs from the
actural physical memeory address, which requires a pair of arch-specific
phys_to_dma and dma_to_phys functions or setting up the whole mapping
in the _DMA method of the PCI root device in the DSDT table.

The former method requires we add back the prevoiusly removed functions,
and the latter method degrades the performance since when the
translation happens, the mapping table is scanned linearly.

This patch addresses this issue by directly setting dma_node_id_offset
to 8, like what is done by modern firmwares, making the address used by
the DMA engine just the same as the actual physical memory address, and
eliminating the need of DMA address translation on the kernel side.

Link: deepin-community#356
(cherry picked from commit bf900cf)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
On machines with legacy firmware with BPI01000 version, the
HT_RX_INT_TRANS register on the node 5, i.e. the node connected with the
second LS7A bridge chip, is not initialized correctly, causing the
failure of the delivery of interrupts from PCIe devices connected to the
second LS7A bridge chip.

This patch fixes this by correctly pointing the HT_RX_INT_TRANS register
to the EXT_IOI_SEND_OFF register on the corresponding node.

Link: deepin-community#356
(cherry picked from commit 7414156)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Add GitHub Actions to build arm64/loong64 kernel packages daily.

Signed-off-by: WangYuli <wangyuli@uniontech.com>
Link: deepin-community#427
(cherry picked from commit 3389dd6)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Bring in a real heavyweight expert to involve in our development.

Signed-off-by: WangYuli <wangyuli@uniontech.com>
Link: deepin-community#437
(cherry picked from commit d87f430)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Add a kernel configuration option to lock down the kernel, to restrict
userspace's ability to modify the running kernel when UEFI Secure Boot is
enabled. Based on the x86 patch by Matthew Garrett.

Determine the state of Secure Boot in the EFI stub and pass this to the
kernel using the FDT.

Signed-off-by: Linn Crosetto <linn@hpe.com>
[bwh: Forward-ported to 4.10: adjust context]
[Lukas Wunner: Forward-ported to 4.11: drop parts applied upstream]
[bwh: Forward-ported to 4.15 and lockdown patch set:
 - Pass result of efi_get_secureboot() in stub through to
   efi_set_secure_boot() in main kernel
 - Use lockdown API and naming]
[bwh: Forward-ported to 4.19.3: adjust context in update_fdt()]
[dannf: Moved init_lockdown() call after uefi_init(), fixing SB detection]
[bwh: Drop call to init_lockdown(), as efi_set_secure_boot() now calls this]
[bwh: Forward-ported to 5.6: efi_get_secureboot() no longer takes a
 sys_table parameter]
[bwh: Forward-ported to 5.7: EFI initialisation from FDT was rewritten, so:
 - Add Secure Boot mode to the parameter enumeration in fdtparams.c
 - Add a parameter to efi_get_fdt_params() to return the Secure Boot mode
 - Since Xen does not have a property name defined for Secure Boot mode,
   change efi_get_fdt_prop() to handle a missing property name by clearing
   the output variable]
[Salvatore Bonaccorso: Forward-ported to 5.10: f30f242 ("efi: Rename
arm-init to efi-init common for all arch") renamed arm-init.c to efi-init.c]
Link: deepin-community#1042

(cherry picked from commit 5704dd1)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
UEFI machines can be booted in Secure Boot mode.  Add an EFI_SECURE_BOOT
flag that can be passed to efi_enabled() to find out whether secure boot is
enabled.

Move the switch-statement in x86's setup_arch() that inteprets the
secure_boot boot parameter to generic code and set the bit there.

Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
cc: linux-efi@vger.kernel.org
[rperier: Forward-ported to 5.5:
 - Use pr_warn()
 - Adjust context]
[bwh: Forward-ported to 5.6: adjust context]
[bwh: Forward-ported to 5.7:
 - Use the next available bit in efi.flags
 - Adjust context]
Link: deepin-community#1042
(cherry picked from commit e92a069)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>

Conflicts:
	include/linux/efi.h
Based on an earlier patch by David Howells, who wrote the following
description:

> UEFI Secure Boot provides a mechanism for ensuring that the firmware will
> only load signed bootloaders and kernels.  Certain use cases may also
> require that all kernel modules also be signed.  Add a configuration option
> that to lock down the kernel - which includes requiring validly signed
> modules - if the kernel is secure-booted.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[Salvatore Bonaccorso: After fixing https://bugs.debian.org/956197 the
help text for LOCK_DOWN_IN_EFI_SECURE_BOOT was adjusted to mention that
lockdown is triggered in integrity mode (https://bugs.debian.org/1025417)]
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Link: deepin-community#1042
(cherry picked from commit 23a8878)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
These drivers allow mapping arbitrary memory ranges as MTD devices.
This should be disabled to preserve the kernel's integrity when it is
locked down.

* Add the HWPARAM flag to the module parameters
* When slram is built-in, it uses __setup() to read kernel parameters,
  so add an explicit check security_locked_down() check

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Matthew Garrett <mjg59@google.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Joern Engel <joern@lazybastard.org>
Cc: linux-mtd@lists.infradead.org
Link: deepin-community#1042
(cherry picked from commit 3eaec80)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Enhance kernel LOCKDOWN feature to better support secure boot

All patches are from Debian.

Link: https://salsa.debian.org/kernel-team/linux/-/tree/debian/latest?ref_type=heads
Signed-off-by: WangYuli <wangyuli@uniontech.com>
(cherry picked from commit 92f6b17)
Link: https://salsa.debian.org/kernel-team/linux/-/tree/debian/6.12/trixie/debian/patches/features/all/lockdown?ref_type=heads
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Conflicts:
	arch/loongarch/configs/deepin_loongarch_desktop_defconfig
Link: deepin-community#1042
(cherry picked from commit 25105ee)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
also used in other distro kernel like fedroa and zen

Link:https://lkml.org/lkml/2013/5/30/513

Source: https://gitlab.com/Queuecumber/linux-acs-override/-/raw/master/workspaces/5.10.4/acso.patch

PCIe ACS (Access Control Services) is the PCIe 2.0+ feature that
allows us to control whether transactions are allowed to be redirected
in various subnodes of a PCIe topology.  For instance, if two
endpoints are below a root port or downsteam switch port, the
downstream port may optionally redirect transactions between the
devices, bypassing upstream devices.  The same can happen internally
on multifunction devices.  The transaction may never be visible to the
upstream devices.

One upstream device that we particularly care about is the IOMMU.  If
a redirection occurs in the topology below the IOMMU, then the IOMMU
cannot provide isolation between devices.  This is why the PCIe spec
encourages topologies to include ACS support.  Without it, we have to
assume peer-to-peer DMA within a hierarchy can bypass IOMMU isolation.

Unfortunately, far too many topologies do not support ACS to make this
a steadfast requirement.  Even the latest chipsets from Intel are only
sporadically supporting ACS.  We have trouble getting interconnect
vendors to include the PCIe spec required PCIe capability, let alone
suggested features.

Therefore, we need to add some flexibility.  The pcie_acs_override=
boot option lets users opt-in specific devices or sets of devices to
assume ACS support.  The "downstream" option assumes full ACS support
on root ports and downstream switch ports.  The "multifunction"
option assumes the subset of ACS features available on multifunction
endpoints and upstream switch ports are supported.  The "id:nnnn:nnnn"
option enables ACS support on devices matching the provided vendor
and device IDs, allowing more strategic ACS overrides.  These options
may be combined in any order.  A maximum of 16 id specific overrides
are available.  It's suggested to use the most limited set of options
necessary to avoid completely disabling ACS across the topology.

Note to hardware vendors, we have facilities to permanently quirk
specific devices which enforce isolation but not provide an ACS
capability.  Please contact me to have your devices added and save
your customers the hassle of this boot option.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Link: deepin-community#396
(cherry picked from commit 1fb5861)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
only x86 defconfig need this fix

Log:
<debug> iptables.go:264: [mangle] chain Main dont exist rule -j App -p tcp -m cgroup --path App.slice
<debug> iptables.go:36: [mangle] begin to run begin to run command: /bin/sh -c iptables -t mangle -I Main 2 -
App -p tcp -m cgroup --path App.slice
<warning> iptables.go:39: [mangle] run command failed, out: iptables v1.8.2 (nf_tables): Couldn't load match
cgroup':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
err:exit status 2
<warning> iptables.go:236:[mangle] chain Main insert failed%!(EXTRA *exec.ExitError=exit status 2)
<warning> iptables.go:102: [mangle] chain Main attach child App failed, err: exit status

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Link: Link: deepin-community#462
(cherry picked from commit 85fea8d)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Link: deepin-community#477
(cherry picked from commit 71ac0b7)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
On an installed Debian system, firmware packages will normally be
installed automatically based on a mapping of device IDs to firmware.
Within the Debian installer this has not yet happened and we need a
way to detect missing firmware.

Although many/most drivers log firmware loading failures, they do so
using many different formats.  This adds a single log message to the
firmware loader, which the installer's hw-detect package will look
for.  The log level is set to "info" because some failures are
expected and we do not want to confuse users with bogus error messages
(like in bug #966218).

NOTE: The log message format must not be changed without coordinating
this with the check-missing-firmware.sh in hw-detect.

Link: https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.11/trixie/debian/patches/debian/firmware_loader-log-direct-loading-failures-as-info-for-d-i.path
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Link: deepin-community#477
(cherry picked from commit f081e61)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
@sourcery-ai
Copy link

sourcery-ai bot commented Jan 20, 2026

Reviewer's Guide

Rebases Deepin’s 6.18 kernel to incorporate upstream EFI secure‑boot plumbing, major LoongArch legacy boot/BPI/EFI/ACPI rework, new AAEON ODM drivers, GF HDMI audio integration, PCI ACS debug override, multiple arch/platform fixes, and extensive Deepin/CI config and packaging changes.

Sequence diagram for AAEON HWMON sensor read via WMI

sequenceDiagram
    actor UserSpace
    participant Sysfs as hwmon_sysfs
    participant Hwmon as hwmon_aaeon
    participant AsusWmi as asus_wmi
    participant Firmware as bios_firmware

    UserSpace->>Sysfs: read(/sys/class/hwmon/.../temp1_input)
    Sysfs->>Hwmon: aaeon_show_sensor()
    Hwmon->>Hwmon: validate sensor type/index
    Hwmon->>AsusWmi: asus_wmi_evaluate_method(HWM_METHOD_ID, dev_id)
    AsusWmi->>Firmware: WMI call(GET temperature)
    Firmware-->>AsusWmi: raw_value
    AsusWmi-->>Hwmon: retval
    Hwmon->>Hwmon: scale/convert value (BFPI version aware)
    Hwmon-->>Sysfs: formatted string
    Sysfs-->>UserSpace: temperature value
Loading

Sequence diagram for GF HDMI PCM stream setup and buffer mirroring

sequenceDiagram
    participant ALSAUser as userspace_ALSA
    participant PCM as snd_pcm_core
    participant Azx as azx_core
    participant GfHelper as gf_integration_helpers
    participant GPUFB as gpu_framebuffer

    ALSAUser->>PCM: open() / hw_params()
    PCM->>Azx: azx_pcm_prepare(substream)
    Azx->>Azx: snd_hdac_stream_setup()
    Azx->>GfHelper: gf_setup_bdle(substream)
    GfHelper->>GPUFB: program BDL in DIU VRAM

    ALSAUser->>PCM: trigger(START)
    PCM->>Azx: azx_pcm_trigger(substream, SNDRV_PCM_TRIGGER_START)
    Azx->>GfHelper: gf_pre_trigger(substream, cmd)
    GfHelper->>GPUFB: copy initial dma_area to DIU FB stream

    loop during playback
        PCM->>Azx: azx_pcm_pointer(substream)
        Azx->>GfHelper: gf_update_stream(substream)
        GfHelper->>GPUFB: copy updated regions from dma_area
        Azx-->>PCM: hw pointer frames
    end
Loading

Class diagram for AAEON WMI MFD core and child drivers

classDiagram
    class AaeonWmiPriv {
        +const struct mfd_cell* cells
        +size_t ncells
    }

    class AaeonMfdCells {
    }

    class AaeonWmiDriver {
        +aaeon_wmi_probe(wmi_device wdev, void* context)
        -aaeon_wmi_check_device() int
    }

    class AaeonGpioData {
        +int nr_bank
        +AaeonGpioBank* bank
    }

    class AaeonGpioBank {
        +gpio_chip chip
        +unsigned int regbase
        +AaeonGpioData* data
        +aaeon_gpio_get_direction(gpio_chip chip, unsigned int offset) int
        +aaeon_gpio_input_set_direction(gpio_chip chip, unsigned int offset) int
        +aaeon_gpio_output_set_direction(gpio_chip chip, unsigned int offset, int value) int
        +aaeon_gpio_get(gpio_chip chip, unsigned int offset) int
        +aaeon_gpio_set(gpio_chip chip, unsigned int offset, int value) int
        +aaeon_gpio_get_number() int
    }

    class AaeonHwmonData {
        +device* hwmon_dev
        +int bfpi_version
        +u32 temp_bitmap
        +u32 fan_bitmap
        +u32 voltage_bitmap
        +unsigned int sensors_number[3]
        +const char* const* temp_names
        +const char* const* fan_names
        +const char* const* voltage_names
        +aaeon_hwmon_probe(platform_device pdev) int
        +aaeon_hwmon_remove(platform_device pdev) void
        -aaeon_hwmon_init_drv_data(AaeonHwmonData* data) int
    }

    class AaeonLedData {
        +int id
        +led_classdev cdev
        +aaeon_led_brightness_get(led_classdev* cdev) enum led_brightness
        +aaeon_led_brightness_set(led_classdev* cdev, enum led_brightness brightness) void
    }

    class AsusWmiInterface {
        +asus_wmi_evaluate_method(u32 method_id, u32 arg0, u32 arg1, int* retval) int
    }

    AaeonWmiDriver --> AaeonWmiPriv : uses
    AaeonWmiPriv "1" --> "*" AaeonMfdCells : cells

    AaeonWmiDriver ..> AaeonGpioData : creates platform device
    AaeonWmiDriver ..> AaeonHwmonData : creates platform device
    AaeonWmiDriver ..> AaeonLedData : creates platform device

    AaeonGpioData "1" --> "*" AaeonGpioBank : bank
    AaeonGpioBank --> AsusWmiInterface : calls methods

    AaeonHwmonData --> AsusWmiInterface : calls methods
    AaeonLedData --> AsusWmiInterface : calls methods
Loading

Class diagram for GF HDMI audio integration with HDA controller

classDiagram
    class Azx {
        +struct pci_dev* pci
        +int driver_type
        +struct hda_bus* bus
        +azx_pcm_prepare(snd_pcm_substream* substream) int
        +azx_pcm_trigger(snd_pcm_substream* substream, int cmd) int
        +azx_pcm_pointer(snd_pcm_substream* substream) snd_pcm_uframes_t
        +azx_first_init(Azx* chip) int
        +azx_free(Azx* chip) void
    }

    class HdaIntel {
        +struct azx chip
        +int probe_retry
    }

    class GfPrivate {
        +HdaIntel hda
        +phys_addr_t diu_fb_stream_ofs[2]
        +void* diu_fb_stream_vaddr[2]
        +unsigned int diu_fb_stream_pos[2]
        +phys_addr_t diu_fb_bdl_ofs[2]
        +void* diu_fb_bdl_vaddr[2]
    }

    class AzxPcm {
        +Azx* chip
        +struct hda_codec* codec
    }

    class AzxDev {
        +struct hdac_stream core
    }

    class GfIntegrationHelpers {
        +gf_init_pci(Azx* chip) int
        +gf_free_pci(Azx* chip) void
        +gf_setup_bdle(snd_pcm_substream* substream) int
        +gf_pre_trigger(snd_pcm_substream* substream, int cmd) int
        +gf_update_stream(snd_pcm_substream* substream) int
    }

    Azx <|-- HdaIntel
    GfPrivate o-- HdaIntel
    AzxPcm --> Azx
    AzxPcm --> AzxDev

    GfIntegrationHelpers ..> GfPrivate : container_of
    GfIntegrationHelpers ..> Azx : uses

    Azx ..> GfIntegrationHelpers : calls
Loading

File-Level Changes

Change Details Files
Rework LoongArch legacy boot/BPI handling, EFI integration, memory/NUMA init, and ACPI/PCI/IRQ paths for both modern and legacy firmware
  • Replace legacy BPI boot_params parsing with new loongarch_bpi_info structures and helpers for parsing BPI headers, extlists, and memory maps, with checksum validation and logging
  • Introduce bpi_init/bpi_memblock_init/bpi_init_node_memblock to feed memblock and NUMA (add_numamem_region) from BPI instead of g_mmap, and call them from setup_arch, memblock_init, and init_numa_memory
  • Add ACPI arch hooks (acpi_arch_os_table_override, acpi_arch_table_init_complete, acpi_arch_pci_probe_root_dev_filter) to rebuild MADT/MCFG from BPI for old firmware, patch DSDT (_DEP for EC), and fix up PCI root IO resource ranges
  • Simplify LoongArch EFI runtime setup by dropping custom page table mapping/set_virtual_address_map, using firmware’s runtime map directly, fixing EFI initrd config table, and wiring EFI_FDT params and secure boot
  • Unify IRQ/PCI initialization by always using irqchip_init (dropping setup_legacy_IRQ and MADT legacy init) and moving MCFG vector group initialization out of early MCFG parsing
  • Adjust LoongArch env/relocate/mem/smp paths to work without legacy boot_params: command line setup via fw_arg1, BPI detection in setup_arch, memblock using EFI + BPI, and SMP secondary entry selection based on loongarch_have_legacy_bpi
arch/loongarch/kernel/legacy_boot.c
arch/loongarch/kernel/legacy_boot.h
arch/loongarch/kernel/efi.c
arch/loongarch/kernel/mem.c
arch/loongarch/kernel/numa.c
arch/loongarch/kernel/irq.c
arch/loongarch/kernel/env.c
arch/loongarch/kernel/relocate.c
arch/loongarch/kernel/smp.c
arch/loongarch/kernel/acpi.c
arch/loongarch/include/asm/acpi.h
arch/loongarch/include/asm/addrspace.h
arch/loongarch/include/asm/efi.h
arch/loongarch/include/asm/irq.h
arch/loongarch/include/asm/loongarch.h
arch/loongarch/include/asm/syscall.h
arch/loongarch/kernel/Makefile
arch/loongarch/kernel/reset.c
arch/loongarch/Kconfig
arch/loongarch/configs/deepin_loongarch_desktop_defconfig
arch/loongarch/configs/loongson3_defconfig
arch/loongarch/pci/acpi.c
drivers/irqchip/irq-loongarch-cpu.c
drivers/irqchip/irq-loongson-eiointc.c
drivers/irqchip/irq-loongson-pch-pic.c
Plumb EFI secure boot state into the kernel, add a generic secure boot handler, and integrate with lockdown, DT, and x86/LoongArch boot
  • Add EFI_SECURE_BOOT flag and efi_set_secure_boot() helper that sets the flag and optionally locks the kernel down when secure boot is enabled
  • Extend FDT EFI parameter retrieval to include a secure boot field and propagate it from firmware into the kernel via efi_get_fdt_params
  • Update generic EFI init to call efi_get_fdt_params with secure_boot and invoke efi_set_secure_boot early; adjust x86 setup_arch to use efi_set_secure_boot instead of local logging
  • Teach the LoongArch EFI init path to rely on the generic EFI init and secure boot, removing local secure boot flag parsing for BPI v2, and drop the old virtual map setup
  • Move lockdown lock_kernel_down into a public symbol and wire security_locked_down / lockdown Kconfig so CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT can be enabled in Deepin configs
  • Emit secure boot state into the stub-populated FDT as linux,uefi-secure-boot
include/linux/efi.h
drivers/firmware/efi/secureboot.c
drivers/firmware/efi/efi-init.c
drivers/firmware/efi/fdtparams.c
drivers/firmware/efi/libstub/fdt.c
arch/x86/kernel/setup.c
arch/loongarch/kernel/efi.c
security/lockdown/lockdown.c
security/lockdown/Kconfig
arch/arm64/configs/deepin_arm64_desktop_defconfig
arch/x86/configs/deepin_x86_desktop_defconfig
arch/loongarch/configs/deepin_loongarch_desktop_defconfig
Documentation/admin-guide/kernel-parameters.txt
Introduce and wire up AAEON ODM support (MFD, GPIO, HWMON, LED) and fix these drivers for 6.18
  • Add an AAEON WMI-based MFD driver that checks BFPI revision and spawns gpio-aaeon, hwmon-aaeon, leds-aaeon, and wdt-aaeon child devices via devm_mfd_add_devices
  • Implement AAEON GPIO driver exposing WMI-backed GPIOs as a gpio_chip, with methods to get/set level and direction via ASUS/AAEON WMI methods
  • Implement AAEON HWMON driver that queries BFPI version, supported sensors bitmaps via WMI, registers hwmon device with temp/fan/voltage sensors and names, and creates sysfs attributes; adapt behaviour for BFPI v3 scaling
  • Implement AAEON LED driver registering per-LED led_classdevs backed by WMI get/set methods, with brightness mapped to device IDs
  • Hook drivers into Kconfig/Makefile, enable them in Deepin x86 configs, and add SAUCE fixes that adapt hwmon and GPIO to the Deepin kernel (e.g. module_param_hw_array, hwparam flags)
drivers/mfd/mfd-aaeon.c
drivers/gpio/gpio-aaeon.c
drivers/hwmon/hwmon-aaeon.c
drivers/leds/leds-aaeon.c
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/hwmon/Kconfig
drivers/hwmon/Makefile
drivers/leds/Kconfig
drivers/leds/Makefile
drivers/mfd/Kconfig
drivers/mfd/Makefile
arch/x86/configs/deepin_x86_desktop_defconfig
Integrate Glenfly (GF) HDMI audio with Intel HDA controller and add new GF HDMI codec IDs
  • Extend generic HDA controller code to be aware of AZX_DRIVER_GFHDMI by allocating a gf_private wrapper around hda_intel for the GF PCI ID, and by enabling polling mode
  • Add GF-specific PCI framebuffer region discovery and mapping (gf_init_pci/gf_free_pci) to access DIU framebuffer and BDL areas, storing offsets and mapped pointers in gf_private
  • Hook into PCM lifecycle (prepare, trigger, pointer) with gf_setup_bdle, gf_pre_trigger, and gf_update_stream to program BDLs into the DIU area and keep a mirrored stream buffer for the GPU
  • Add new Glenfly HDMI codec IDs for Arise 80 and 81 to the generic HDMI codec table and define GF_HDA_PATCH_VERSION and GF_HDA_FB_STREAM_SIZE constants used by the GF driver
  • Ensure GF mappings are torn down in azx_free when GF driver type is used
sound/hda/common/controller.c
sound/hda/common/hda_controller.h
sound/hda/controllers/intel.c
sound/hda/controllers/intel.h
sound/hda/codecs/hdmi/hdmi.c
Add a PCIe ACS override mechanism for debugging/IOMMU experiments and hook it into the ACS enablement path
  • Introduce early kernel parameter pcie_acs_override= with options downstream,multifunction,id:vvvv:dddd to force ACS on for selected devices or classes
  • Implement pcie_acs_overrides() helper that, for PCIe devices without native ACS, conditionally reports ACS support based on override flags or configured IDs, with appropriate warnings
  • Register pcie_acs_overrides in the pci_dev_acs_enabled table so it is consulted after vendor-specific quirks when determining ACS availability
drivers/pci/quirks.c
Tighten security and lockdown behaviour for memory-backed MTD (phram/slram) and module parameters under lockdown
  • Convert slram’s map parameter to module_param_hw_array with iomem type and add a lockdown check (LOCKDOWN_MODULE_PARAMETERS) before parsing the parameter when built-in
  • Replace phram’s module_param_call with an explicit __module_param_call that marks the parameter as a hardware iomem parameter (KERNEL_PARAM_FL_HWPARAM
hwparam_iomem) using custom ops
  • Export lock_kernel_down() from lockdown.c and declare it in security.h for use by EFI secure boot integration and other callers
  • General Deepin/CI/build system updates: add cross-build and packaging workflows, embed git commit IDs in the build, and adjust packaging scripts
    • Add GitHub Actions workflows to build x86, arm64, and loong64 kernels (with cross-compilation for LoongArch), upload Module.symvers ABI artifacts, and create daily deb packages for arm64/loong64
    • Modify mkcompile_h and version-timestamp to generate a linux_commitid_banner including GIT_COMMITID and print it at boot instead of linux_banner, while keeping linux_banner/linux_proc_banner symbols
    • Extend builddeb/mkdebian to install .config into /usr/src/linux-headers-$kver for headers packages and to include git commit IDs in changelogs and printk output
    • Update CI workflows to upload KABI artifacts and add patch checking on loong64 builds; update OWNERS to include new reviewers
    • Enable firmware loader debug config and adjust firmware loader logging to always log firmware load failures at info level
    .github/workflows/build-kernel.yml
    .github/workflows/build-kernel-arm64.yml
    .github/workflows/build-kernel-loong64.yml
    .github/workflows/package-kernel-arm64-daily.yml
    .github/workflows/package-kernel-loong64-daily.yml
    scripts/mkcompile_h
    scripts/package/builddeb
    scripts/package/mkdebian
    init/version-timestamp.c
    init/version.c
    init/main.c
    drivers/base/firmware_loader/main.c
    deepin/OWNERS
    Configuration and CI hardening/tuning for Deepin x86/arm64/LoongArch kernels
    • Rename/use arch configs with -${arch}-desktop-rolling suffix and update deepin_x86_desktop_defconfig, deepin_arm64_desktop_defconfig, and deepin_loongarch_desktop_defconfig with new options for drivers (DRM_XE, Elan/Goodix HID, DesignWare I2C, AAEON ODM modules, Renesas xHCI, Android binder, SPMI/PC104, NVME_HWMON, RTW89_8922AE, etc.)
    • Enable security-related options like CONFIG_LOCK_DOWN_IN_EFI_SECURE_BOOT, LIST_HARDENED, dmesg restrict, NO_HZ_FULL, DEBUG_INFO_BTF by default on LoongArch, and disable RANDOM_KMALLOC_CACHES and legacy DRM/N_GSM where desired
    • Adjust LoongArch BPI and ACPI Kconfig to expose necessary EFI/BPI support, and tweak arch Kconfigs for RELAXED IEEE754 mode on Loongson-3 and other upstream defaults
    • Add CI jobs for packaging arm64/loong64 daily kernels and uploading KABI information for x86 and arm64 builds
    arch/x86/configs/deepin_x86_desktop_defconfig
    arch/arm64/configs/deepin_arm64_desktop_defconfig
    arch/loongarch/configs/deepin_loongarch_desktop_defconfig
    arch/loongarch/Kconfig
    .github/workflows/build-kernel-arm64.yml
    .github/workflows/build-kernel-loong64.yml
    .github/workflows/package-kernel-arm64-daily.yml
    .github/workflows/package-kernel-loong64-daily.yml
    Misc architecture and platform fixes (ARM/arm64/MIPS/PowerPC/x86/LoongArch) and core kernel tweaks
    • ARM: export __sync_icache_dcache() for xen-privcmd and fix kirkwood TS419 SATA pinmux; arm64: add m400 HPE ACPI/APEI quirk disabling HEST on broken firmware and call it from acpi_boot_table_init
    • LoongArch: add OldWorld firmware detection in EFI stub, skipping set_virtual_address_map when DMW1 indicates oldworld; fix syscall_get_arguments implementation to avoid no-builtin-memcpy issues and integer bugs; clean up DMA node_id_offset logic and always read LS7A DMA config directly; ensure EFI reset_system is always called when available
    • MIPS: default ieee754 mode to RELAXED for Loongson64; PowerPC boot: add missing include path for crc32poly.h when building with KERNEL_XZ
    • x86: adjust MCE user entry path to not call schedule from NMI context; add GF HDMI codec IDs; enable DRM_XE and various platform drivers in defconfig; memtest now WARNs and suggests memtest86+ when bad RAM is found; perf libunwind x86 backend now returns -1 on invalid reg IDs
    • PCI/ACPI: move root resource probing to generic acpi_pci_probe_root_resources with an arch filter hook; Zhaoxin uncore driver drops PCIe port IDs that conflicted with the generic PCI drivers
    • Platform: ideapad-laptop gains new WMI IDs for ThinkBook 2024, logs ACPI events, ignores notifications while suspended, and tweaks keyboard backlight event handling; Phytium stmmac driver now has PM ops and updated copyright
    • Filesystem/kernel: simplify locks_remove_posix by dropping unused fields and improve firmware_loader error reporting by logging load failures at info level
    arch/arm/mm/flush.c
    arch/arm/boot/dts/marvell/kirkwood-ts419.dtsi
    arch/arm64/kernel/acpi.c
    arch/mips/kernel/fpu-probe.c
    arch/powerpc/boot/Makefile
    arch/x86/kernel/cpu/mce/core.c
    arch/x86/events/zhaoxin/uncore.c
    mm/memtest.c
    tools/perf/arch/x86/util/unwind-libunwind.c
    drivers/acpi/pci_root.c
    drivers/acpi/tables.c
    drivers/acpi/pci_root.c
    drivers/net/ethernet/stmicro/stmmac/dwmac-phytium.c
    drivers/platform/x86/lenovo/ideapad-laptop.c
    fs/locks.c
    drivers/base/firmware_loader/main.c

    Tips and commands

    Interacting with Sourcery

    • Trigger a new review: Comment @sourcery-ai review on the pull request.
    • Continue discussions: Reply directly to Sourcery's review comments.
    • Generate a GitHub issue from a review comment: Ask Sourcery to create an
      issue from a review comment by replying to it. You can also reply to a
      review comment with @sourcery-ai issue to create an issue from it.
    • Generate a pull request title: Write @sourcery-ai anywhere in the pull
      request title to generate a title at any time. You can also comment
      @sourcery-ai title on the pull request to (re-)generate the title at any time.
    • Generate a pull request summary: Write @sourcery-ai summary anywhere in
      the pull request body to generate a PR summary at any time exactly where you
      want it. You can also comment @sourcery-ai summary on the pull request to
      (re-)generate the summary at any time.
    • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
      request to (re-)generate the reviewer's guide at any time.
    • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
      pull request to resolve all Sourcery comments. Useful if you've already
      addressed all the comments and don't want to see them anymore.
    • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
      request to dismiss all existing Sourcery reviews. Especially useful if you
      want to start fresh with a new review - don't forget to comment
      @sourcery-ai review to trigger a new review!

    Customizing Your Experience

    Access your dashboard to:

    • Enable or disable review features such as the Sourcery-generated pull request
      summary, the reviewer's guide, and others.
    • Change the review language.
    • Add, remove or edit custom review instructions.
    • Adjust other review settings.

    Getting Help

    Copy link

    @sourcery-ai sourcery-ai bot left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Hey - I've found 3 issues, and left some high level feedback:

    • In drivers/gpio/gpio-aaeon.c, aaeon_gpio_output_set_direction() ignores the requested output value and only changes direction, so consider either setting the level there (using SET_LEVEL_METHOD_ID) or invoking the existing set callback to ensure the initial output value is honoured.
    • In drivers/hwmon/hwmon-aaeon.c, you use devm_hwmon_device_register_with_info() but also call hwmon_device_unregister() and manually tear down sysfs in the remove path; with devm-managed registration you should drop the explicit unregister and sysfs removal to avoid double cleanup and rely on devm for resource release.
    Prompt for AI Agents
    Please address the comments from this code review:
    
    ## Overall Comments
    - In drivers/gpio/gpio-aaeon.c, aaeon_gpio_output_set_direction() ignores the requested output value and only changes direction, so consider either setting the level there (using SET_LEVEL_METHOD_ID) or invoking the existing set callback to ensure the initial output value is honoured.
    - In drivers/hwmon/hwmon-aaeon.c, you use devm_hwmon_device_register_with_info() but also call hwmon_device_unregister() and manually tear down sysfs in the remove path; with devm-managed registration you should drop the explicit unregister and sysfs removal to avoid double cleanup and rely on devm for resource release.
    
    ## Individual Comments
    
    ### Comment 1
    <location> `arch/loongarch/kernel/legacy_boot.c:382-391` </location>
    <code_context>
    +	int local_apic_count = 0;
    +	int io_apic_count = 0;
    +	u64 node_map = 0;
    +	while((void *)entry < madt_end) {
    +		unsigned int ent_len = entry->length;
    +		if (ent_len < sizeof(struct acpi_subtable_header)) {
    +			pr_warn("BPI: MADT entry %d length %u is too small\n", entry_count, ent_len);
    +			return;
    +		}
    +		if((void *)entry + ent_len > madt_end) {
    +			pr_warn("BPI: MADT entry %d length overflow\n", entry_count);
    +			return;
    +		}
    +		switch(entry->type) {
    +		case ACPI_MADT_TYPE_LOCAL_APIC:
    +			local_apic_count++;
    +			struct acpi_madt_local_apic *lapic = (struct acpi_madt_local_apic *)entry;
    +			node_map |= 1 << (lapic->id / CORES_PER_EIO_NODE);
    </code_context>
    
    <issue_to_address>
    **issue (bug_risk):** Declarations inside switch cases after statements will not build with kernel's C dialect
    
    In `init_acpi_arch_os_table_override()`, some `switch (entry->type)` cases declare variables after executable statements (e.g. `local_apic_count++; struct acpi_madt_local_apic *lapic = ...;`). With the kernel’s GNU89 C dialect, declarations cannot follow statements under a `case` label, so this will fail to compile. Please move these declarations to the start of an enclosing block (e.g. declare `struct acpi_madt_local_apic *lapic;` before the `switch` and only assign inside the case, or wrap the case body in braces with declarations first).
    </issue_to_address>
    
    ### Comment 2
    <location> `arch/loongarch/kernel/numa.c:236-240` </location>
    <code_context>
    + * pool.
    + *
    + */
    +static void __init add_numamem_region(u64 start, u64 end, u32 type)
    +{
    +       u32 node = pa_to_nid(start);
    +       u64 size = end - start;
    +       static unsigned long num_physpages;
    +
    +       if (start >= end) {
    </code_context>
    
    <issue_to_address>
    **issue (bug_risk):** Local static num_physpages shadows global and changes previous accounting behaviour
    
    `info_node_memblock()` used to update the file-scope `num_physpages`, which other NUMA setup code may depend on. The new `static unsigned long num_physpages` here shadows that global, leaving the global at its initial value and potentially changing behaviour for existing callers. Please either use the existing global instead of the local static, or remove the global entirely if it is no longer needed.
    </issue_to_address>
    
    ### Comment 3
    <location> `arch/loongarch/kernel/legacy_boot.c:346` </location>
    <code_context>
    -static int parse_screeninfo(struct _extention_list_hdr *head)
    -{
    -	struct loongsonlist_screeninfo *pscreeninfo;
    +static void __init init_acpi_arch_os_table_override (struct acpi_table_header *existing_table, struct acpi_table_header **new_table){
    +	static int __initdata madt_table_installed = 0;
    +	static u8 new_madt_buf[ 0
    </code_context>
    
    <issue_to_address>
    **issue (complexity):** Consider splitting `init_acpi_arch_os_table_override()` into focused helper functions (validation, size computation, table construction, and hardware programming) and wrapping `ext_listhdr_checksum()` with an ACPI-specific helper to clarify responsibilities and reduce cognitive load.
    
    `init_acpi_arch_os_table_override()` is carrying a lot of mixed responsibilities (validation, construction, checksum, and hardware programming) and is now long and hard to scan. You can reduce complexity materially by extracting a few small helpers without changing behavior.
    
    For example, you can peel out the MADT validation and counting logic:
    
    ```c
    static int __init validate_madt_for_bpi(const struct acpi_table_madt *madt,
    					int *local_apic_count,
    					int *io_apic_count,
    					u64 *node_map)
    {
    	void *madt_end = (void *)madt + madt->header.length;
    	struct acpi_subtable_header *entry;
    	int entry_count = 0;
    
    	if (madt->header.length < sizeof(*madt)) {
    		pr_warn("BPI: MADT table length %u is too small\n", madt->header.length);
    		return -EINVAL;
    	}
    
    	*local_apic_count = 0;
    	*io_apic_count = 0;
    	*node_map = 0;
    
    	entry = (struct acpi_subtable_header *)(madt + 1);
    	while ((void *)entry < madt_end) {
    		unsigned int ent_len = entry->length;
    
    		if (ent_len < sizeof(struct acpi_subtable_header) ||
    		    (void *)entry + ent_len > madt_end) {
    			pr_warn("BPI: MADT entry %d length invalid\n", entry_count);
    			return -EINVAL;
    		}
    
    		switch (entry->type) {
    		case ACPI_MADT_TYPE_LOCAL_APIC: {
    			struct acpi_madt_local_apic *lapic =
    				(struct acpi_madt_local_apic *)entry;
    			(*local_apic_count)++;
    			*node_map |= 1ULL << (lapic->id / CORES_PER_EIO_NODE);
    			break;
    		}
    		case ACPI_MADT_TYPE_IO_APIC:
    			(*io_apic_count)++;
    			break;
    		}
    
    		acpi_table_print_madt_entry(entry);
    		entry = (struct acpi_subtable_header *)((void *)entry + ent_len);
    		entry_count++;
    	}
    
    	if (!*local_apic_count || !*io_apic_count)
    		return -EINVAL;
    
    	if (*local_apic_count > MAX_CORE_PIC || *io_apic_count > MAX_IO_PICS)
    		return -EINVAL;
    
    	return 0;
    }
    ```
    
    Then `init_acpi_arch_os_table_override()` can be simplified to orchestration:
    
    ```c
    static void __init init_acpi_arch_os_table_override(struct acpi_table_header *existing_table,
    						    struct acpi_table_header **new_table)
    {
    	...
    	struct acpi_table_madt *madt = (struct acpi_table_madt *)existing_table;
    	int local_apic_count, io_apic_count;
    	u64 node_map;
    
    	if (bpi_version == BPI_VERSION_NONE || bpi_version > BPI_VERSION_V1)
    		return;
    	if (strncmp(existing_table->signature, ACPI_SIG_MADT, 4))
    		return;
    
    	if (validate_madt_for_bpi(madt, &local_apic_count, &io_apic_count, &node_map))
    		return;
    
    	if (compute_new_madt_mcfg_sizes(local_apic_count, io_apic_count,
    					&new_madt_size, &new_mcfg_size))
    		return;
    
    	prepare_new_madt_mcfg_headers(madt, new_madt, new_mcfg,
    				      new_madt_size, new_mcfg_size);
    
    	build_madt_subtables(madt, madt_end, local_apic_count, io_apic_count,
    			     node_map, core_pics, eio_pics, msi_pics, bio_pics,
    			     &mcfg_entry);
    
    	write_madt_mcfg(new_madt, new_madt_size, new_mcfg, new_mcfg_size,
    			core_pics, eio_pics, msi_pics, bio_pics,
    			local_apic_count, io_apic_count);
    
    	program_ls7a_dma_offset(bio_pics, io_apic_count);
    	program_ht_rx_int_trans(eio_pics, io_apic_count);
    
    	*new_table = (struct acpi_table_header *)new_madt;
    }
    ```
    
    The helpers like `compute_new_madt_mcfg_sizes()`, `build_madt_subtables()`, `write_madt_mcfg()`, `program_ls7a_dma_offset()` and `program_ht_rx_int_trans()` can each stay small and single-purpose, making the control flow and error handling easier to reason about while preserving the current behavior.
    
    Separately, `ext_listhdr_checksum()` is now used for both BPI extension headers and ACPI table checksums. To make intent clearer without changing logic, you can wrap it for ACPI usage:
    
    ```c
    static u8 __init ext_listhdr_checksum(void *buffer, size_t length)
    {
    	u8 sum = 0, *buf = buffer, *end = buf + length;
    
    	while (buf < end)
    		sum += *buf++;
    
    	return sum;
    }
    
    static u8 __init acpi_table_checksum(struct acpi_table_header *hdr)
    {
    	return ext_listhdr_checksum(hdr, hdr->length);
    }
    
    /* ... */
    new_madt->header.checksum = 0 - acpi_table_checksum(&new_madt->header);
    new_mcfg->header.checksum = 0 - acpi_table_checksum(&new_mcfg->header);
    ```
    
    This keeps the shared implementation but separates the conceptual concerns (BPI vs ACPI), making the file easier to follow.
    </issue_to_address>

    Sourcery is free for open source - if you like our reviews please consider sharing them ✨
    Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

    Copy link

    Copilot AI left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

    MingcongBai and others added 13 commits January 20, 2026 17:33
    This is required for touchpad to function on Asus Vivobook S 2024 LED.
    
    Lest the I2C touchpad (Elan) fails to probe:
    
      i2c i2c-ASCE1200:00: deferred probe pending: (reason unknown)
    
    Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
    (cherry picked from commit 1248dbf347b5d93a0fc5461add85c028636d5cdd)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    This is needed by dkms and update-initramfs.
    
    Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
    (cherry picked from commit a2b77b6de7881e9eb41212c8ffe4fa0381c6cfbd)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    With "AOSCOS: platform: x86: ideapad-laptop: add fixes for ThinkBook 14+
    (2024 G6+)", an if branch guarding a no-data condition was introduced:
    
      if(!data)
      	acpi_handle_info(handle, "no data");
      	return;
    
    However, it was missing braces as it's a multi-line branch.
    
    Add a pair of braces to fix this syntax error.
    
    Fixes: "AOSCOS: platform: x86: ideapad-laptop: add fixes for ThinkBook 14+ (2024 G6+)"
    Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
    (cherry picked from commit 9b3b8884c29b7670338c0e288e1f176253361986)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    Enable CONFIG_USB_XHCI_PCI_RENESAS and CONFIG_USB_RENESAS_USB3 as modules
    to fix boot issue on Phytium D3000.
    
    Signed-off-by: Mingcong Bai <jeffbai@aosc.io>
    (cherry picked from commit b8156e11b9b0d6d715df2fcecfc98886cc00df6e)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    Since this is not a particularly thorough test, if we find any bad
    bits of RAM then there is a fair chance that there are other bad bits
    we fail to detect.
    
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    (cherry picked from commit 77b6be4743d0445d3eae87a1c1aec5d25bd3b04d)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    Adds a new ACPI init routine acpi_fixup_m400_quirks that adds
    a work-around for HPE ProLiant m400 APEI firmware problems.
    
    The work-around disables APEI when CONFIG_ACPI_APEI is set and
    m400 firmware is detected.  Without this fixup m400 systems
    experience errors like these on startup:
    
      [Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 2
      [Hardware Error]: event severity: fatal
      [Hardware Error]:  Error 0, type: fatal
      [Hardware Error]:   section_type: memory error
      [Hardware Error]:   error_status: 0x0000000000001300
      [Hardware Error]:   error_type: 10, invalid address
      Kernel panic - not syncing: Fatal hardware error!
    
    Signed-off-by: Geoff Levand <geoff@infradead.org>
    [bwh: Adjust context and indentation to apply to Linux 6.10]
    Link: deepin-community#534
    (cherry picked from commit 149ec1388f5f01ea9f7d711c7e6e158238571d4b)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    The old board code for the TS419 assigns MPP pins 15 and 16 as SATA
    activity signals (and none as SATA presence signals).  Currently the
    device tree assigns the SoC's default pinmux groups for SATA, which
    conflict with the second Ethernet port.
    
    Reported-by: gmbh@gazeta.pl
    Tested-by: gmbh@gazeta.pl
    References: https://bugs.debian.org/855017
    Cc: stable@vger.kernel.org # 3.15+
    Fixes: 934b524 ("ARM: Kirkwood: Add DT description of QNAP 419")
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Link: deepin-community#534
    (cherry picked from commit 292c617eea5e5c02c3ffd149d9c6ffd56602e721)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    The xen-privcmd driver, which can be modular, calls set_pte_at()
    which in turn may call __sync_icache_dcache().
    
    The call to __sync_icache_dcache() may be optimised out because it is
    conditional on !pte_special(), and xen-privcmd calls pte_mkspecial().
    However, in a non-LPAE configuration there is no "special" bit and the
    call is really unconditional.
    
    Fixes: 3ad0876 ("xen/privcmd: add IOCTL_PRIVCMD_MMAP_RESOURCE")
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Link: deepin-community#534
    (cherry picked from commit 06417743ef3d7df5924e397038f3b875acedca1b)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    EINVAL may not be defined when building unwind-libunwind.c with
    REMOTE_UNWIND_LIBUNWIND, resulting in a compiler error in
    LIBUNWIND__ARCH_REG_ID().  Its only caller, access_reg(), only checks
    for a negative return value and doesn't care what it is.  So change
    -EINVAL to -1.
    
    Fixes: 52ffe0f ("Support x86(32-bit) cross platform callchain unwind.")
    Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
    Link: deepin-community#534
    (cherry picked from commit 73a2673d1d785af86e5f8d6f347525225b2472b7)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    After commit faa16bc ("lib: Use existing define with
    polynomial") the lib/xz/xz_crc32.c includes a header from include/linux
    directory thus any other user of this code should define proper include
    path.
    
    This fixes the build error on powerpc with CONFIG_KERNEL_XZ:
    
        In file included from ../arch/powerpc/boot/../../../lib/decompress_unxz.c:233:0,
                         from ../arch/powerpc/boot/decompress.c:42:
        ../arch/powerpc/boot/../../../lib/xz/xz_crc32.c:18:29: fatal error: linux/crc32poly.h: No such file or directory
    
    Reported-by: Michal Kubecek <mkubecek@suse.cz>
    Fixes: faa16bc ("lib: Use existing define with polynomial")
    Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
    Reported-by: kbuild test robot <lkp@intel.com>
    Reported-by: Meelis Roos <mroos@linux.ee>
    Tested-by: Michal Kubecek <mkubecek@suse.cz>
    Link: deepin-community#534
    (cherry picked from commit 9ba3135758564489a9db0f7c70124c876283e401)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    There are 2 mode of value of IEEE NaN hardcoded by CPU.
    Currently, our mipsel/mips64el port is in so-called lagacy mode.
    Loongson 3A 4000 is set as the so-called 2008 mode.
    
    To make Debian workable on Loongson 3A 4000, we need set the kerenl in
    RELAXED mode.
    
    https://web.archive.org/web/20180830093617/https://dmz-portal.mips.com/wiki/MIPS_ABI_-_NaN_Interlinking
    
    [bwh: Update for addition of EMULATED mode in 6.11]
    
    (cherry picked from commit 0876d3d03cd46238d0dac9f6000ca670a4ca31d7)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    Link: deepin-community#340
    (cherry picked from commit 334d3e0)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    native build is very slow, use cross to check it for ci.
    
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    Link: deepin-community#884
    (cherry picked from commit 22aafa8)
    Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
    @opsiff opsiff force-pushed the linux-6.18.y-2026-01-06-part5 branch from c1cade6 to 34bb3ea Compare January 20, 2026 09:34
    @Avenger-285714
    Copy link
    Member

    /approve

    @deepin-ci-robot
    Copy link

    [APPROVALNOTIFIER] This PR is APPROVED

    This pull-request has been approved by: Avenger-285714, lanlanxiyiji

    The full list of commands accepted by this bot can be found here.

    The pull request process is described here

    Details Needs approval from an approver in each of these files:

    Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment

    @lanlanxiyiji lanlanxiyiji merged commit f22624e into deepin-community:linux-6.18.y Feb 3, 2026
    6 of 8 checks passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    Comments