Commit Graph
424 Commits
Author SHA1 Message Date
tao89959 bf325c3f96 mmc: loongson: support setup clk stable delay time
Changelog: 龙芯mmc驱动支持设置时钟稳定的延时时间
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:15 +08:00
tao89959 ccce94639e net: phy: motor yt8531 add soft reset func
Changelog: yt8531添加 soft reset 函数
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:15 +08:00
tao89959 6d348e033d loongson: 2k1000: defconfig: enable numa
Changelog: 2k1000 配置使能numa
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:15 +08:00
tao89959 a5565c47ec loongson: 2k1000: dp: update spi0 node
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:15 +08:00
tao89959 dce6bf6c01 loongarch: numa: fix compile error
Changelog: 修复编译错误
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:14 +08:00
tao89959 b5202d7a7a loongson: 2k1000: defconfig: add watchdog support
Changelog: 2k1000添加看门狗编译支持
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:14 +08:00
tao89959 71b15acd63 loongson: 2k1000: dtsi: add wtd dts node
2k1000 dtsi添加看门狗节点

Changelog:
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:14 +08:00
tao89959 7c746d35e3 2k300: defconfig: add sd2078support
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:14 +08:00
tao89959 379c54c559 rtc: sd2078: add sd2078 rtc driver
Changelog: 添加sd2078 rtc驱动支持
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:14 +08:00
tao89959 76d8262350 loongson: 2k1000: dtsi: fix spi cells size
Changelog: 修复2k1000的spi的dts节点cells的属性
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:13 +08:00
tao89959 c08629e3b1 loongson: drivers: spi: fix spi bus freq error bug
Changelog: 修复loongson spi的总线频率错误的问题
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:13 +08:00
tao89959 0276e0d4ee loongson: 2k1000: defconfig: add gpio-fan enable
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:13 +08:00
tao89959 9ab0328ed4 loongson: 2k1000: dts: fix 2k1000 dp dts unused aliases
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:13 +08:00
tao89959 d4fe24e70a loongson: 2k1000: pinctrl: fix compile warning
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:12 +08:00
tao89959 a553b37120 loongson: 2k1000: 2k1000 pinctrl driver add new compatible
Changelog: 2k1000的引脚复用配置驱动添加新的compatible
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:12 +08:00
tao89959 3fea94d29b loongson: 2k1000: defconfig: add no dc defconfig
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:12 +08:00
tao89959 113e401007 loongson: 2k1000: defconfig: disable apb dma drivers
Changelog: 2k1000 defconfig 禁用 apb dma 驱动
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:12 +08:00
tao89959 671fe4879a loongson: 2k1000: defconfig: disable pca9555 irq enable
Changelog: 2k1000配置禁用pca95xx中断
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:11 +08:00
tao89959 1cd903920d loongson: 2k1000: sdio: add sdio desc
Changelog: 2k1000 dts添加sdio的描述
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:11 +08:00
tao89959 704dc7d41a loongson: 2k1000: dts: fix uart default as 4 line mode
Changelog: 2k1000 uart0默认为4线模式
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:11 +08:00
tao89959 eefb94b54d loongson: 2k1000: dts: fix otg compatible
Changelog: 修复2k1000dts otg无法使用的问题
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:11 +08:00
tao89959 51cc2f3e5a loongson: 2k1000: dts: fix gpio interrupt error
Changelog: NULL
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:11 +08:00
tao89959 129b30cc4d loongson: 2k1000: dts: dma use new driver
Changelog: 2k1000dts使用新的dma驱动
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:10 +08:00
tao89959 b425f5b590 loongson: 2k1000: i2c: add clock desc
Changelog: 2k1000dts添加时钟描述
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:10 +08:00
tao89959 c6c04e3c05 loongson: 2k1000: dts: add aliases
Changelog: 2k1000的dts添加默认的aliases
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:10 +08:00
tao89959 f2dac8034e loongson: i2c: support multi bus clock generate mode
Changelog: 支持多种总线时钟生成模式
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:10 +08:00
tao89959 ddc84e010f loongson: i2c: support clock and bus freq from dts or acpi
Changelog: 龙芯i2c驱动支持输入时钟和总线时钟从dts或acpi获取
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:10 +08:00
tao89959 5b79993616 loongson: ls2kmci: disable redundant code about cd-gpio setup
Changelog: ls2kmci禁用多余的检测gpio的配置代码
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:09 +08:00
tao89959 530690a32b loongson: ls2kmci: delete multi debug info
Changelog: ls2kmci驱动删除重复调试信息
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:09 +08:00
tao89959 634f00fcb9 loongson: ls2kmci: fix deponds dma error option
Changelog: 修复ls2kmci依赖错误
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:09 +08:00
tao89959 05fd58fbf7 loongson: 2k1000: update pinmux config driver to support multi option
Changelog: 更新2k1000的配置库支持更多配置项
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-08-24 14:17:09 +08:00
maoxiaochuan d9c34db496 dt-bindings: clock: loongson2: Add Loongson-2K0300
compatible

Document the clock controller shipped in Loongson-2K0300 SoC, which
generates various clock signals for SoC peripherals. Differing from
previous generations of SoCs, LS2K0300 requires a 120MHz external clock
input.

Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Yanteng Si <siyanteng@cqsoftware.com.cn>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2026-02-04 19:13:11 +08:00
maoxiaochuan 0e8a323936 loongson_2k300_defconfig:Enable bh1750 and aht20 2026-02-04 19:12:03 +08:00
Binbin Zhou 3b38982760 LoongArch: dts: loongson-2k1000: Fix i2c-gpio node names
The binding wants the node to be named "i2c-number", but those are named
"i2c-gpio-number" instead.

Thus rename those to i2c-0, i2c-1 to adhere to the binding and suppress
dtbs_check warnings.

Cc: stable@vger.kernel.org
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:31 +08:00
Binbin Zhou e2bc887adb LoongArch: dts: loongson-2k2000: Add default interrupt controller address cells
Add missing address-cells 0 to the Local I/O, Extend I/O and PCH-PIC
Interrupt Controller node to silence W=1 warning:

  loongson-2k2000.dtsi:364.5-49: Warning (interrupt_map): /bus@10000000/pcie@1a000000/pcie@9,0:interrupt-map:
    Missing property '#address-cells' in node /bus@10000000/interrupt-controller@10000000, using 0 as fallback

Value '0' is correct because:
1. The LIO/EIO/PCH interrupt controller does not have children,
2. interrupt-map property (in PCI node) consists of five components and
   the fourth component "parent unit address", which size is defined by
   '#address-cells' of the node pointed to by the interrupt-parent
   component, is not used (=0)

Cc: stable@vger.kernel.org
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:31 +08:00
Binbin Zhou 9146be0084 LoongArch: dts: loongson-2k1000: Add default interrupt controller address cells
Add missing address-cells 0 to the Local I/O interrupt controller node
to silence W=1 warning:

  loongson-2k1000.dtsi:498.5-55: Warning (interrupt_map): /bus@10000000/pcie@1a000000/pcie@9,0:interrupt-map:
    Missing property '#address-cells' in node /bus@10000000/interrupt-controller@1fe01440, using 0 as fallback

Value '0' is correct because:
1. The Local I/O interrupt controller does not have children,
2. interrupt-map property (in PCI node) consists of five components and
   the fourth component "parent unit address", which size is defined by
   '#address-cells' of the node pointed to by the interrupt-parent
   component, is not used (=0)

Cc: stable@vger.kernel.org
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:31 +08:00
Binbin Zhou 416c8b3c72 LoongArch: dts: loongson-2k0500: Add default interrupt controller address cells
Add missing address-cells 0 to the Local I/O and Extend I/O interrupt
controller node to silence W=1 warning:

  loongson-2k0500.dtsi:513.5-51: Warning (interrupt_map): /bus@10000000/pcie@1a000000/pcie@0,0:interrupt-map:
    Missing property '#address-cells' in node /bus@10000000/interrupt-controller@1fe11600, using 0 as fallback

Value '0' is correct because:
1. The Local I/O & Extend I/O interrupt controller do not have children,
2. interrupt-map property (in PCI node) consists of five components and
   the fourth component "parent unit address", which size is defined by
   '#address-cells' of the node pointed to by the interrupt-parent
   component, is not used (=0)

Cc: stable@vger.kernel.org
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:31 +08:00
maoxiaochuan a8302a597b LoongArch: dts: Describe PCI sideband IRQ through interrupt-extended
SoC integrated peripherals on LS2K1000 and LS2K2000 could be discovered
as PCI devices, but require sideband interrupts to function, which are
previously described by interrupts and interrupt-parent properties.

However, pci/pci-device.yaml allows interrupts property to only specify
PCI INTx interrupts, not sideband ones. Convert these devices to use
interrupt-extended property, which describes sideband interrupts used by
PCI devices since dt-schema commit e6ea659d2baa ("schemas: pci-device:
Allow interrupts-extended for sideband interrupts"), eliminating
dtbs_check warnings.

Cc: stable@vger.kernel.org
Fixes: 30a5532a3206 ("LoongArch: dts: DeviceTree for Loongson-2K1000")
Signed-off-by: Yao Zi <me@ziyao.cc>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:30 +08:00
Lisa Robinson d82746694c LoongArch: Fix PMU counter allocation for mixed-type event groups
When validating a perf event group, validate_group() unconditionally
attempts to allocate hardware PMU counters for the leader, sibling
events and the new event being added.

This is incorrect for mixed-type groups. If a PERF_TYPE_SOFTWARE event
is part of the group, the current code still tries to allocate a hardware
PMU counter for it, which can wrongly consume hardware PMU resources and
cause spurious allocation failures.

Fix this by only allocating PMU counters for hardware events during group
validation, and skipping software events.

A trimmed down reproducer is as simple as this:

  #include <stdio.h>
  #include <assert.h>
  #include <unistd.h>
  #include <string.h>
  #include <sys/syscall.h>
  #include <linux/perf_event.h>

  int main (int argc, char *argv[])
  {
  	struct perf_event_attr attr = { 0 };
  	int fds[5];

  	attr.disabled = 1;
  	attr.exclude_kernel = 1;
  	attr.exclude_hv = 1;
  	attr.read_format = PERF_FORMAT_TOTAL_TIME_ENABLED |
  		PERF_FORMAT_TOTAL_TIME_RUNNING | PERF_FORMAT_ID | PERF_FORMAT_GROUP;
  	attr.size = sizeof (attr);

  	attr.type = PERF_TYPE_SOFTWARE;
  	attr.config = PERF_COUNT_SW_DUMMY;
  	fds[0] = syscall (SYS_perf_event_open, &attr, 0, -1, -1, 0);
  	assert (fds[0] >= 0);

  	attr.type = PERF_TYPE_HARDWARE;
  	attr.config = PERF_COUNT_HW_CPU_CYCLES;
  	fds[1] = syscall (SYS_perf_event_open, &attr, 0, -1, fds[0], 0);
  	assert (fds[1] >= 0);

  	attr.type = PERF_TYPE_HARDWARE;
  	attr.config = PERF_COUNT_HW_INSTRUCTIONS;
  	fds[2] = syscall (SYS_perf_event_open, &attr, 0, -1, fds[0], 0);
  	assert (fds[2] >= 0);

  	attr.type = PERF_TYPE_HARDWARE;
  	attr.config = PERF_COUNT_HW_BRANCH_MISSES;
  	fds[3] = syscall (SYS_perf_event_open, &attr, 0, -1, fds[0], 0);
  	assert (fds[3] >= 0);

  	attr.type = PERF_TYPE_HARDWARE;
  	attr.config = PERF_COUNT_HW_CACHE_REFERENCES;
  	fds[4] = syscall (SYS_perf_event_open, &attr, 0, -1, fds[0], 0);
  	assert (fds[4] >= 0);

  	printf ("PASSED\n");

  	return 0;
  }

Cc: stable@vger.kernel.org
Fixes: b37042b2bb7c ("LoongArch: Add perf events support")
Signed-off-by: Lisa Robinson <lisa@bytefly.space>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:30 +08:00
Shuah Khan 7eaf0dccd9 wifi: mt76: Remove blank line after mt792x firmware version dmesg
An extra blank line gets printed after printing firmware version
because the build date is null terminated. Remove the "\n" from
dev_info() calls to print firmware version and build date to fix
the problem.

Reported-by: Mario Limonciello <superm1@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:30 +08:00
Chenghao Duan f7c0f697c3 samples/ftrace: Adjust LoongArch register restore order in direct calls
Ensure that in the ftrace direct call logic, the CPU register state
(with ra = parent return address) is restored to the correct state after
the execution of the custom trampoline function and before returning to
the traced function. Additionally, guarantee the correctness of the jump
logic for jr t0 (traced function address).

Cc: stable@vger.kernel.org
Fixes: 9cdc3b6a299c ("LoongArch: ftrace: Add direct call support")
Reported-by: Youling Tang <tangyouling@kylinos.cn>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:30 +08:00
Chenghao Duan df18654a87 LoongArch: BPF: Enable trampoline-based tracing for module functions
Remove the previous restrictions that blocked the tracing of kernel
module functions. Fix the issue that previously caused kernel lockups
when attempting to trace module functions.

Before entering the trampoline code, the return address register ra
shall store the address of the next assembly instruction after the
'bl trampoline' instruction, which is the traced function address, and
the register t0 shall store the parent function return address. Refine
the trampoline return logic to ensure that register data remains correct
when returning to both the traced function and the parent function.

Before this patch was applied, the module_attach test in selftests/bpf
encountered a deadlock issue. This was caused by an incorrect jump
address after the trampoline execution, which resulted in an infinite
loop within the module function.

Cc: stable@vger.kernel.org
Fixes: 677e6123e3d2 ("LoongArch: BPF: Disable trampoline for kernel module function trace")
Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:30 +08:00
Chenghao Duan 5ce55c677b LoongArch: BPF: Adjust the jump offset of tail calls
Call the next bpf prog and skip the first instruction of TCC
initialization.

A total of 7 instructions are skipped:
'move t0, ra'			1 inst
'move_imm + jirl'		5 inst
'addid REG_TCC, zero, 0'	1 inst

Relevant test cases: the tailcalls test item in selftests/bpf.

Cc: stable@vger.kernel.org
Fixes: 677e6123e3d2 ("LoongArch: BPF: Disable trampoline for kernel module function trace")
Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:29 +08:00
Chenghao Duan 98b74b6ba6 LoongArch: BPF: Save return address register ra to t0 before trampoline
Modify the build_prologue() function to ensure the return address
register ra is saved to t0 before entering trampoline operations.
This change ensures the accurate return address handling when a BPF
program calls another BPF program, preventing errors in the BPF-to-BPF
call chain.

Cc: stable@vger.kernel.org
Fixes: 677e6123e3d2 ("LoongArch: BPF: Disable trampoline for kernel module function trace")
Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:29 +08:00
Hengqi Chen 290577b9a2 LoongArch: BPF: Zero-extend bpf_tail_call() index
The bpf_tail_call() index should be treated as a u32 value. Let's
zero-extend it to avoid calling wrong BPF progs. See similar fixes
for x86 [1]) and arm64 ([2]) for more details.

  [1]: https://github.com/torvalds/linux/commit/90caccdd8cc0215705f18b92771b449b01e2474a
  [2]: https://github.com/torvalds/linux/commit/16338a9b3ac30740d49f5dfed81bac0ffa53b9c7

Cc: stable@vger.kernel.org
Fixes: 5dc615520c4d ("LoongArch: Add BPF JIT support")
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:29 +08:00
Hengqi Chen e49a3e7382 LoongArch: BPF: Sign extend kfunc call arguments
The kfunc calls are native calls so they should follow LoongArch calling
conventions. Sign extend its arguments properly to avoid kernel panic.
This is done by adding a new emit_abi_ext() helper. The emit_abi_ext()
helper performs extension in place meaning a value already store in the
target register (Note: this is different from the existing sign_extend()
helper and thus we can't reuse it).

Cc: stable@vger.kernel.org
Fixes: 5dc615520c4d ("LoongArch: Add BPF JIT support")
Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:29 +08:00
Chenghao Duan 472155401b LoongArch: Refactor register restoration in ftrace_common_return
Refactor the register restoration sequence in the ftrace_common_return
function to clearly distinguish between the logic of normal returns and
direct call returns in function tracing scenarios. The logic is as
follows:

1. In the case of a normal return, the execution flow returns to the
traced function, and ftrace must ensure that the register data is
consistent with the state when the function was entered.

ra = parent return address; t0 = traced function return address.

2. In the case of a direct call return, the execution flow jumps to the
custom trampoline function, and ftrace must ensure that the register
data is consistent with the state when ftrace was entered.

ra = traced function return address; t0 = parent return address.

Cc: stable@vger.kernel.org
Fixes: 9cdc3b6a299c ("LoongArch: ftrace: Add direct call support")
Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:29 +08:00
Chenghao Duan 0d47e10898 LoongArch: Enable exception fixup for specific ADE subcode
This patch allows the LoongArch BPF JIT to handle recoverable memory
access errors generated by BPF_PROBE_MEM* instructions.

When a BPF program performs memory access operations, the instructions
it executes may trigger ADEM exceptions. The kernel’s built-in BPF
exception table mechanism (EX_TYPE_BPF) will generate corresponding
exception fixup entries in the JIT compilation phase; however, the
architecture-specific trap handling function needs to proactively call
the common fixup routine to achieve exception recovery.

do_ade(): fix EX_TYPE_BPF memory access exceptions for BPF programs,
ensure safe execution.

Relevant test cases: illegal address access tests in module_attach and
subprogs_extable of selftests/bpf.

Signed-off-by: Chenghao Duan <duanchenghao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:28 +08:00
Huacai Chen b20d2bc927 LoongArch: Set correct protection_map[] for VM_NONE/VM_SHARED
For 32BIT platform _PAGE_PROTNONE is 0, so set a VMA to be VM_NONE or
VM_SHARED will make pages non-present, then cause Oops with kernel page
fault.

Fix it by set correct protection_map[] for VM_NONE/VM_SHARED, replacing
_PAGE_PROTNONE with _PAGE_PRESENT.

Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:28 +08:00
Binbin Zhou af30022328 LoongArch: dts: Add uart new compatible string
Add loongson,ls2k*-uart compatible string on uarts.

Co-developed-by: Haowei Zheng <zhenghaowei@loongson.cn>
Signed-off-by: Haowei Zheng <zhenghaowei@loongson.cn>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://patch.msgid.link/8e0c08459fa5bddefd898648fea28a9f2fde701a.1760166651.git.zhoubinbin@loongson.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: maoxiaochuan <maoxiaochuan@loongson.cn>
2026-02-04 16:41:28 +08:00