History

Merge tag 'loongarch-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson

Pull LoongArch updates from Huacai Chen: - Select some options in Kconfig - Give a chance to build with !CONFIG_SMP - Switch to use built-in rustc target - Add new supported device nodes to dts - Some bug fixes and other small changes - Update the default config file * tag 'loongarch-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: LoongArch: Update Loongson-3 default config file LoongArch: dts: Add new supported device nodes to Loongson-2K2000 LoongArch: dts: Add new supported device nodes to Loongson-2K0500 LoongArch: dts: Remove "disabled" state of clock controller node LoongArch: rust: Switch to use built-in rustc target LoongArch: Fix callchain parse error with kernel tracepoint events again LoongArch: Give a chance to build with !CONFIG_SMP LoongArch: Select THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE LoongArch: Select ARCH_WANT_DEFAULT_BPF_JIT LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 LoongArch: Select ARCH_HAS_FAST_MULTIPLIER

Linus Torvalds committed 2 years ago

Commit 4f05e822 parents f33fda2 9cc1df419 files · +243 −29Browse files

Unified · Split

19 files
  1. arch/loongarch/Kconfig +5 −1
  2. arch/loongarch/Makefile +1 −1
  3. arch/loongarch/boot/dts/loongson-2k0500.dtsi +83 −3
  4. arch/loongarch/boot/dts/loongson-2k1000-ref.dts +0 −4
  5. arch/loongarch/boot/dts/loongson-2k1000.dtsi +0 −1
  6. arch/loongarch/boot/dts/loongson-2k2000.dtsi +45 −4
  7. arch/loongarch/configs/loongson3_defconfig +24 −0
  8. arch/loongarch/include/asm/acpi.h +1 −0
  9. arch/loongarch/include/asm/asm-prototypes.h +6 −0
  10. arch/loongarch/include/asm/perf_event.h +1 −2
  11. arch/loongarch/include/asm/smp.h +6 −0
  12. arch/loongarch/kernel/machine_kexec.c +1 −1
  13. arch/loongarch/lib/Makefile +2 −0
  14. arch/loongarch/lib/tishift.S +56 −0
  15. arch/loongarch/mm/tlbex.S +6 −3
  16. arch/loongarch/power/suspend.c +3 −1
  17. rust/Makefile +1 −1
  18. scripts/Makefile +1 −1
  19. scripts/generate_rust_target.rs +1 −6
arch/loongarch/Kconfig+5−1
@@ -16,6 +16,7 @@ config LOONGARCH · 15 unmodified lines
16 select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI16 select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
17 select ARCH_HAS_CPU_FINALIZE_INIT17 select ARCH_HAS_CPU_FINALIZE_INIT
18 select ARCH_HAS_CURRENT_STACK_POINTER18 select ARCH_HAS_CURRENT_STACK_POINTER
19 select ARCH_HAS_FAST_MULTIPLIER
19 select ARCH_HAS_FORTIFY_SOURCE20 select ARCH_HAS_FORTIFY_SOURCE
20 select ARCH_HAS_KCOV21 select ARCH_HAS_KCOV
21 select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS22 select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
@@ -56,6 +57,7 @@ config LOONGARCH · 34 unmodified lines
56 select ARCH_SUPPORTS_ACPI57 select ARCH_SUPPORTS_ACPI
57 select ARCH_SUPPORTS_ATOMIC_RMW58 select ARCH_SUPPORTS_ATOMIC_RMW
58 select ARCH_SUPPORTS_HUGETLBFS59 select ARCH_SUPPORTS_HUGETLBFS
60 select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
59 select ARCH_SUPPORTS_LTO_CLANG61 select ARCH_SUPPORTS_LTO_CLANG
60 select ARCH_SUPPORTS_LTO_CLANG_THIN62 select ARCH_SUPPORTS_LTO_CLANG_THIN
61 select ARCH_SUPPORTS_NUMA_BALANCING63 select ARCH_SUPPORTS_NUMA_BALANCING
@@ -63,10 +65,12 @@ config LOONGARCH · 1 unmodified line
63 select ARCH_USE_CMPXCHG_LOCKREF65 select ARCH_USE_CMPXCHG_LOCKREF
64 select ARCH_USE_QUEUED_RWLOCKS66 select ARCH_USE_QUEUED_RWLOCKS
65 select ARCH_USE_QUEUED_SPINLOCKS67 select ARCH_USE_QUEUED_SPINLOCKS
68 select ARCH_WANT_DEFAULT_BPF_JIT
66 select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT69 select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
67 select ARCH_WANT_LD_ORPHAN_WARN70 select ARCH_WANT_LD_ORPHAN_WARN
68 select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP71 select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
69 select ARCH_WANTS_NO_INSTR72 select ARCH_WANTS_NO_INSTR
73 select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
70 select BUILDTIME_TABLE_SORT74 select BUILDTIME_TABLE_SORT
71 select COMMON_CLK75 select COMMON_CLK
72 select CPU_PM76 select CPU_PM
@@ -174,7 +178,6 @@ config LOONGARCH · 101 unmodified lines
174 select PCI_QUIRKS178 select PCI_QUIRKS
175 select PERF_USE_VMALLOC179 select PERF_USE_VMALLOC
176 select RTC_LIB180 select RTC_LIB
177 select SMP
178 select SPARSE_IRQ181 select SPARSE_IRQ
179 select SYSCTL_ARCH_UNALIGN_ALLOW182 select SYSCTL_ARCH_UNALIGN_ALLOW
180 select SYSCTL_ARCH_UNALIGN_NO_WARN183 select SYSCTL_ARCH_UNALIGN_NO_WARN
@@ -420,6 +423,7 @@ config EFI_STUB · 239 unmodified lines
420 423
421config SCHED_SMT424config SCHED_SMT
422 bool "SMT scheduler support"425 bool "SMT scheduler support"
426 depends on SMP
423 default y427 default y
424 help428 help
425 Improves scheduler's performance when there are multiple429 Improves scheduler's performance when there are multiple
arch/loongarch/Makefile+1−1
@@ -101,7 +101,7 @@ ifdef CONFIG_OBJTOOL · 100 unmodified lines
101KBUILD_CFLAGS += -fno-jump-tables101KBUILD_CFLAGS += -fno-jump-tables
102endif102endif
103 103
104KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json104KBUILD_RUSTFLAGS += --target=loongarch64-unknown-none-softfloat
105KBUILD_RUSTFLAGS_MODULE += -Crelocation-model=pic105KBUILD_RUSTFLAGS_MODULE += -Crelocation-model=pic
106 106
107ifeq ($(CONFIG_RELOCATABLE),y)107ifeq ($(CONFIG_RELOCATABLE),y)
arch/loongarch/boot/dts/loongson-2k0500.dtsi+83−3
@@ -6,6 +6,7 @@ · 5 unmodified lines
6/dts-v1/;6/dts-v1/;
7 7
8#include <dt-bindings/interrupt-controller/irq.h>8#include <dt-bindings/interrupt-controller/irq.h>
9#include <dt-bindings/clock/loongson,ls2k-clk.h>
9 10
10/ {11/ {
11 #address-cells = <2>;12 #address-cells = <2>;
@@ -19,14 +20,15 @@ · 7 unmodified lines
19 compatible = "loongson,la264";20 compatible = "loongson,la264";
20 device_type = "cpu";21 device_type = "cpu";
21 reg = <0x0>;22 reg = <0x0>;
22 clocks = <&cpu_clk>;23 clocks = <&clk LOONGSON2_NODE_CLK>;
23 };24 };
24 };25 };
25 26
26 cpu_clk: cpu-clk {27 ref_100m: clock-ref-100m {
27 compatible = "fixed-clock";28 compatible = "fixed-clock";
28 #clock-cells = <0>;29 #clock-cells = <0>;
29 clock-frequency = <500000000>;30 clock-frequency = <100000000>;
31 clock-output-names = "ref_100m";
30 };32 };
31 33
32 cpuintc: interrupt-controller {34 cpuintc: interrupt-controller {
@@ -35,6 +37,28 @@ · 2 unmodified lines
35 interrupt-controller;37 interrupt-controller;
36 };38 };
37 39
40 thermal-zones {
41 cpu-thermal {
42 polling-delay-passive = <1000>;
43 polling-delay = <5000>;
44 thermal-sensors = <&tsensor 0>;
45
46 trips {
47 cpu-alert {
48 temperature = <33000>;
49 hysteresis = <2000>;
50 type = "active";
51 };
52
53 cpu-crit {
54 temperature = <85000>;
55 hysteresis = <5000>;
56 type = "critical";
57 };
58 };
59 };
60 };
61
38 bus@10000000 {62 bus@10000000 {
39 compatible = "simple-bus";63 compatible = "simple-bus";
40 ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,64 ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
@@ -52,6 +76,54 @@ · 11 unmodified lines
52 ranges = <1 0x0 0x0 0x16400000 0x4000>;76 ranges = <1 0x0 0x0 0x16400000 0x4000>;
53 };77 };
54 78
79 clk: clock-controller@1fe10400 {
80 compatible = "loongson,ls2k0500-clk";
81 reg = <0x0 0x1fe10400 0x0 0x2c>;
82 #clock-cells = <1>;
83 clocks = <&ref_100m>;
84 clock-names = "ref_100m";
85 };
86
87 dma-controller@1fe10c00 {
88 compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
89 reg = <0 0x1fe10c00 0 0x8>;
90 interrupt-parent = <&eiointc>;
91 interrupts = <67>;
92 clocks = <&clk LOONGSON2_APB_CLK>;
93 #dma-cells = <1>;
94 status = "disabled";
95 };
96
97 dma-controller@1fe10c10 {
98 compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
99 reg = <0 0x1fe10c10 0 0x8>;
100 interrupt-parent = <&eiointc>;
101 interrupts = <68>;
102 clocks = <&clk LOONGSON2_APB_CLK>;
103 #dma-cells = <1>;
104 status = "disabled";
105 };
106
107 dma-controller@1fe10c20 {
108 compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
109 reg = <0 0x1fe10c20 0 0x8>;
110 interrupt-parent = <&eiointc>;
111 interrupts = <69>;
112 clocks = <&clk LOONGSON2_APB_CLK>;
113 #dma-cells = <1>;
114 status = "disabled";
115 };
116
117 dma-controller@1fe10c30 {
118 compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
119 reg = <0 0x1fe10c30 0 0x8>;
120 interrupt-parent = <&eiointc>;
121 interrupts = <70>;
122 clocks = <&clk LOONGSON2_APB_CLK>;
123 #dma-cells = <1>;
124 status = "disabled";
125 };
126
55 liointc0: interrupt-controller@1fe11400 {127 liointc0: interrupt-controller@1fe11400 {
56 compatible = "loongson,liointc-2.0";128 compatible = "loongson,liointc-2.0";
57 reg = <0x0 0x1fe11400 0x0 0x40>,129 reg = <0x0 0x1fe11400 0x0 0x40>,
@@ -139,6 +211,14 @@ · 81 unmodified lines
139 status = "disabled";211 status = "disabled";
140 };212 };
141 213
214 tsensor: thermal-sensor@1fe11500 {
215 compatible = "loongson,ls2k0500-thermal", "loongson,ls2k1000-thermal";
216 reg = <0x0 0x1fe11500 0x0 0x30>;
217 interrupt-parent = <&liointc0>;
218 interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
219 #thermal-sensor-cells = <1>;
220 };
221
142 uart0: serial@1ff40800 {222 uart0: serial@1ff40800 {
143 compatible = "ns16550a";223 compatible = "ns16550a";
144 reg = <0x0 0x1ff40800 0x0 0x10>;224 reg = <0x0 0x1ff40800 0x0 0x10>;
arch/loongarch/boot/dts/loongson-2k1000-ref.dts+0−4
@@ -113,10 +113,6 @@ · 112 unmodified lines
113 status = "okay";113 status = "okay";
114};114};
115 115
116&clk {
117 status = "okay";
118};
119
120&rtc0 {116&rtc0 {
121 status = "okay";117 status = "okay";
122};118};
arch/loongarch/boot/dts/loongson-2k1000.dtsi+0−1
@@ -159,7 +159,6 @@ · 158 unmodified lines
159 #clock-cells = <1>;159 #clock-cells = <1>;
160 clocks = <&ref_100m>;160 clocks = <&ref_100m>;
161 clock-names = "ref_100m";161 clock-names = "ref_100m";
162 status = "disabled";
163 };162 };
164 163
165 gpio0: gpio@1fe00500 {164 gpio0: gpio@1fe00500 {
arch/loongarch/boot/dts/loongson-2k2000.dtsi+45−4
@@ -6,6 +6,7 @@ · 5 unmodified lines
6/dts-v1/;6/dts-v1/;
7 7
8#include <dt-bindings/interrupt-controller/irq.h>8#include <dt-bindings/interrupt-controller/irq.h>
9#include <dt-bindings/clock/loongson,ls2k-clk.h>
9 10
10/ {11/ {
11 #address-cells = <2>;12 #address-cells = <2>;
@@ -19,21 +20,22 @@ · 7 unmodified lines
19 compatible = "loongson,la364";20 compatible = "loongson,la364";
20 device_type = "cpu";21 device_type = "cpu";
21 reg = <0x0>;22 reg = <0x0>;
22 clocks = <&cpu_clk>;23 clocks = <&clk LOONGSON2_NODE_CLK>;
23 };24 };
24 25
25 cpu1: cpu@2 {26 cpu1: cpu@2 {
26 compatible = "loongson,la364";27 compatible = "loongson,la364";
27 device_type = "cpu";28 device_type = "cpu";
28 reg = <0x1>;29 reg = <0x1>;
29 clocks = <&cpu_clk>;30 clocks = <&clk LOONGSON2_NODE_CLK>;
30 };31 };
31 };32 };
32 33
33 cpu_clk: cpu-clk {34 ref_100m: clock-ref-100m {
34 compatible = "fixed-clock";35 compatible = "fixed-clock";
35 #clock-cells = <0>;36 #clock-cells = <0>;
36 clock-frequency = <1400000000>;37 clock-frequency = <100000000>;
38 clock-output-names = "ref_100m";
37 };39 };
38 40
39 cpuintc: interrupt-controller {41 cpuintc: interrupt-controller {
@@ -42,6 +44,28 @@ · 2 unmodified lines
42 interrupt-controller;44 interrupt-controller;
43 };45 };
44 46
47 thermal-zones {
48 cpu-thermal {
49 polling-delay-passive = <1000>;
50 polling-delay = <5000>;
51 thermal-sensors = <&tsensor 0>;
52
53 trips {
54 cpu-alert {
55 temperature = <40000>;
56 hysteresis = <2000>;
57 type = "active";
58 };
59
60 cpu-crit {
61 temperature = <85000>;
62 hysteresis = <5000>;
63 type = "critical";
64 };
65 };
66 };
67 };
68
45 bus@10000000 {69 bus@10000000 {
46 compatible = "simple-bus";70 compatible = "simple-bus";
47 ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,71 ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
@@ -58,6 +82,14 @@ · 10 unmodified lines
58 ranges = <1 0x0 0x0 0x18400000 0x4000>;82 ranges = <1 0x0 0x0 0x18400000 0x4000>;
59 };83 };
60 84
85 clk: clock-controller@10010480 {
86 compatible = "loongson,ls2k2000-clk";
87 reg = <0x0 0x10010480 0x0 0x100>;
88 #clock-cells = <1>;
89 clocks = <&ref_100m>;
90 clock-names = "ref_100m";
91 };
92
61 pmc: power-management@100d0000 {93 pmc: power-management@100d0000 {
62 compatible = "loongson,ls2k2000-pmc", "loongson,ls2k0500-pmc", "syscon";94 compatible = "loongson,ls2k2000-pmc", "loongson,ls2k0500-pmc", "syscon";
63 reg = <0x0 0x100d0000 0x0 0x58>;95 reg = <0x0 0x100d0000 0x0 0x58>;
@@ -80,6 +112,15 @@ · 16 unmodified lines
80 };112 };
81 };113 };
82 114
115 tsensor: thermal-sensor@1fe01460 {
116 compatible = "loongson,ls2k2000-thermal";
117 reg = <0x0 0x1fe01460 0x0 0x30>,
118 <0x0 0x1fe0019c 0x0 0x4>;
119 interrupt-parent = <&liointc>;
120 interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
121 #thermal-sensor-cells = <1>;
122 };
123
83 liointc: interrupt-controller@1fe01400 {124 liointc: interrupt-controller@1fe01400 {
84 compatible = "loongson,liointc-1.0";125 compatible = "loongson,liointc-1.0";
85 reg = <0x0 0x1fe01400 0x0 0x64>;126 reg = <0x0 0x1fe01400 0x0 0x64>;
arch/loongarch/configs/loongson3_defconfig+24−0
@@ -14,6 +14,10 @@ CONFIG_TASKSTATS=y · 13 unmodified lines
14CONFIG_TASK_DELAY_ACCT=y14CONFIG_TASK_DELAY_ACCT=y
15CONFIG_TASK_XACCT=y15CONFIG_TASK_XACCT=y
16CONFIG_TASK_IO_ACCOUNTING=y16CONFIG_TASK_IO_ACCOUNTING=y
17CONFIG_PSI=y
18CONFIG_IKCONFIG=y
19CONFIG_IKCONFIG_PROC=y
20CONFIG_IKHEADERS=y
17CONFIG_LOG_BUF_SHIFT=1821CONFIG_LOG_BUF_SHIFT=18
18CONFIG_NUMA_BALANCING=y22CONFIG_NUMA_BALANCING=y
19CONFIG_MEMCG=y23CONFIG_MEMCG=y
@@ -129,13 +133,22 @@ CONFIG_IP_MROUTE=y · 109 unmodified lines
129CONFIG_IP_MROUTE_MULTIPLE_TABLES=y133CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
130CONFIG_IP_PIMSM_V1=y134CONFIG_IP_PIMSM_V1=y
131CONFIG_IP_PIMSM_V2=y135CONFIG_IP_PIMSM_V2=y
136CONFIG_INET_AH=m
132CONFIG_INET_ESP=m137CONFIG_INET_ESP=m
138CONFIG_INET_ESP_OFFLOAD=m
139CONFIG_INET_ESPINTCP=y
140CONFIG_INET_IPCOMP=m
133CONFIG_INET_UDP_DIAG=y141CONFIG_INET_UDP_DIAG=y
134CONFIG_TCP_CONG_ADVANCED=y142CONFIG_TCP_CONG_ADVANCED=y
135CONFIG_TCP_CONG_BBR=m143CONFIG_TCP_CONG_BBR=m
136CONFIG_IPV6_ROUTER_PREF=y144CONFIG_IPV6_ROUTER_PREF=y
137CONFIG_IPV6_ROUTE_INFO=y145CONFIG_IPV6_ROUTE_INFO=y
146CONFIG_INET6_AH=m
138CONFIG_INET6_ESP=m147CONFIG_INET6_ESP=m
148CONFIG_INET6_ESP_OFFLOAD=m
149CONFIG_INET6_ESPINTCP=y
150CONFIG_INET6_IPCOMP=m
151CONFIG_IPV6_MULTIPLE_TABLES=y
139CONFIG_IPV6_MROUTE=y152CONFIG_IPV6_MROUTE=y
140CONFIG_MPTCP=y153CONFIG_MPTCP=y
141CONFIG_NETWORK_PHY_TIMESTAMPING=y154CONFIG_NETWORK_PHY_TIMESTAMPING=y
@@ -151,6 +164,8 @@ CONFIG_NF_CONNTRACK_PPTP=m · 9 unmodified lines
151CONFIG_NF_CONNTRACK_TFTP=m164CONFIG_NF_CONNTRACK_TFTP=m
152CONFIG_NF_CT_NETLINK=m165CONFIG_NF_CT_NETLINK=m
153CONFIG_NF_TABLES=m166CONFIG_NF_TABLES=m
167CONFIG_NF_TABLES_INET=y
168CONFIG_NFT_CT=m
154CONFIG_NFT_CONNLIMIT=m169CONFIG_NFT_CONNLIMIT=m
155CONFIG_NFT_LOG=m170CONFIG_NFT_LOG=m
156CONFIG_NFT_LIMIT=m171CONFIG_NFT_LIMIT=m
@@ -163,6 +178,7 @@ CONFIG_NFT_QUOTA=m · 6 unmodified lines
163CONFIG_NFT_REJECT=m178CONFIG_NFT_REJECT=m
164CONFIG_NFT_COMPAT=m179CONFIG_NFT_COMPAT=m
165CONFIG_NFT_HASH=m180CONFIG_NFT_HASH=m
181CONFIG_NFT_FIB_INET=m
166CONFIG_NFT_SOCKET=m182CONFIG_NFT_SOCKET=m
167CONFIG_NFT_OSF=m183CONFIG_NFT_OSF=m
168CONFIG_NFT_TPROXY=m184CONFIG_NFT_TPROXY=m
@@ -259,6 +275,7 @@ CONFIG_IP_NF_ARPTABLES=m · 90 unmodified lines
259CONFIG_IP_NF_ARPFILTER=m275CONFIG_IP_NF_ARPFILTER=m
260CONFIG_IP_NF_ARP_MANGLE=m276CONFIG_IP_NF_ARP_MANGLE=m
261CONFIG_NF_TABLES_IPV6=y277CONFIG_NF_TABLES_IPV6=y
278CONFIG_NFT_FIB_IPV6=m
262CONFIG_IP6_NF_IPTABLES=y279CONFIG_IP6_NF_IPTABLES=y
263CONFIG_IP6_NF_MATCH_AH=m280CONFIG_IP6_NF_MATCH_AH=m
264CONFIG_IP6_NF_MATCH_EUI64=m281CONFIG_IP6_NF_MATCH_EUI64=m
@@ -279,6 +296,7 @@ CONFIG_IP6_NF_NAT=m · 14 unmodified lines
279CONFIG_IP6_NF_TARGET_MASQUERADE=m296CONFIG_IP6_NF_TARGET_MASQUERADE=m
280CONFIG_IP6_NF_TARGET_NPT=m297CONFIG_IP6_NF_TARGET_NPT=m
281CONFIG_NF_TABLES_BRIDGE=m298CONFIG_NF_TABLES_BRIDGE=m
299CONFIG_NF_CONNTRACK_BRIDGE=m
282CONFIG_BRIDGE_NF_EBTABLES=m300CONFIG_BRIDGE_NF_EBTABLES=m
283CONFIG_BRIDGE_EBT_BROUTE=m301CONFIG_BRIDGE_EBT_BROUTE=m
284CONFIG_BRIDGE_EBT_T_FILTER=m302CONFIG_BRIDGE_EBT_T_FILTER=m
@@ -549,6 +567,7 @@ CONFIG_NGBE=y · 264 unmodified lines
549CONFIG_TXGBE=y567CONFIG_TXGBE=y
550# CONFIG_NET_VENDOR_WIZNET is not set568# CONFIG_NET_VENDOR_WIZNET is not set
551# CONFIG_NET_VENDOR_XILINX is not set569# CONFIG_NET_VENDOR_XILINX is not set
570CONFIG_MOTORCOMM_PHY=y
552CONFIG_PPP=m571CONFIG_PPP=m
553CONFIG_PPP_BSDCOMP=m572CONFIG_PPP_BSDCOMP=m
554CONFIG_PPP_DEFLATE=m573CONFIG_PPP_DEFLATE=m
@@ -810,6 +829,7 @@ CONFIG_NTB_SWITCHTEC=m · 255 unmodified lines
810CONFIG_NTB_PERF=m829CONFIG_NTB_PERF=m
811CONFIG_NTB_TRANSPORT=m830CONFIG_NTB_TRANSPORT=m
812CONFIG_PWM=y831CONFIG_PWM=y
832CONFIG_GENERIC_PHY=y
813CONFIG_USB4=y833CONFIG_USB4=y
814CONFIG_EXT2_FS=y834CONFIG_EXT2_FS=y
815CONFIG_EXT2_FS_XATTR=y835CONFIG_EXT2_FS_XATTR=y
@@ -875,10 +895,13 @@ CONFIG_UBIFS_FS=m · 59 unmodified lines
875CONFIG_UBIFS_FS_ADVANCED_COMPR=y895CONFIG_UBIFS_FS_ADVANCED_COMPR=y
876CONFIG_CRAMFS=m896CONFIG_CRAMFS=m
877CONFIG_SQUASHFS=y897CONFIG_SQUASHFS=y
898CONFIG_SQUASHFS_FILE_DIRECT=y
899CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT=y
878CONFIG_SQUASHFS_XATTR=y900CONFIG_SQUASHFS_XATTR=y
879CONFIG_SQUASHFS_LZ4=y901CONFIG_SQUASHFS_LZ4=y
880CONFIG_SQUASHFS_LZO=y902CONFIG_SQUASHFS_LZO=y
881CONFIG_SQUASHFS_XZ=y903CONFIG_SQUASHFS_XZ=y
904CONFIG_SQUASHFS_ZSTD=y
882CONFIG_MINIX_FS=m905CONFIG_MINIX_FS=m
883CONFIG_ROMFS_FS=m906CONFIG_ROMFS_FS=m
884CONFIG_PSTORE=m907CONFIG_PSTORE=m
@@ -960,3 +983,4 @@ CONFIG_DEBUG_FS=y · 75 unmodified lines
960CONFIG_SCHEDSTATS=y983CONFIG_SCHEDSTATS=y
961# CONFIG_DEBUG_PREEMPT is not set984# CONFIG_DEBUG_PREEMPT is not set
962# CONFIG_FTRACE is not set985# CONFIG_FTRACE is not set
986CONFIG_UNWINDER_ORC=y
arch/loongarch/include/asm/acpi.h+1−0
@@ -8,6 +8,7 @@ · 7 unmodified lines
8#ifndef _ASM_LOONGARCH_ACPI_H8#ifndef _ASM_LOONGARCH_ACPI_H
9#define _ASM_LOONGARCH_ACPI_H9#define _ASM_LOONGARCH_ACPI_H
10 10
11#include <asm/smp.h>
11#include <asm/suspend.h>12#include <asm/suspend.h>
12 13
13#ifdef CONFIG_ACPI14#ifdef CONFIG_ACPI
arch/loongarch/include/asm/asm-prototypes.h+6−0
@@ -6,3 +6,9 @@ · 5 unmodified lines
6#include <asm/page.h>6#include <asm/page.h>
7#include <asm/ftrace.h>7#include <asm/ftrace.h>
8#include <asm-generic/asm-prototypes.h>8#include <asm-generic/asm-prototypes.h>
9
10#ifdef CONFIG_ARCH_SUPPORTS_INT128
11__int128_t __ashlti3(__int128_t a, int b);
12__int128_t __ashrti3(__int128_t a, int b);
13__int128_t __lshrti3(__int128_t a, int b);
14#endif
arch/loongarch/include/asm/perf_event.h+1−2
@@ -13,8 +13,7 @@ · 12 unmodified lines
13 13
14#define perf_arch_fetch_caller_regs(regs, __ip) { \14#define perf_arch_fetch_caller_regs(regs, __ip) { \
15 (regs)->csr_era = (__ip); \15 (regs)->csr_era = (__ip); \
16 (regs)->regs[3] = current_stack_pointer; \16 (regs)->regs[3] = (unsigned long) __builtin_frame_address(0); \
17 (regs)->regs[22] = (unsigned long) __builtin_frame_address(0); \
18}17}
19 18
20#endif /* __LOONGARCH_PERF_EVENT_H__ */19#endif /* __LOONGARCH_PERF_EVENT_H__ */
arch/loongarch/include/asm/smp.h+6−0
@@ -6,6 +6,8 @@ · 5 unmodified lines
6#ifndef __ASM_SMP_H6#ifndef __ASM_SMP_H
7#define __ASM_SMP_H7#define __ASM_SMP_H
8 8
9#ifdef CONFIG_SMP
10
9#include <linux/atomic.h>11#include <linux/atomic.h>
10#include <linux/bitops.h>12#include <linux/bitops.h>
11#include <linux/linkage.h>13#include <linux/linkage.h>
@@ -109,4 +111,8 @@ static inline void __cpu_die(unsigned int cpu) · 97 unmodified lines
109}111}
110#endif112#endif
111 113
114#else /* !CONFIG_SMP */
115#define cpu_logical_map(cpu) 0
116#endif /* CONFIG_SMP */
117
112#endif /* __ASM_SMP_H */118#endif /* __ASM_SMP_H */
arch/loongarch/kernel/machine_kexec.c+1−1
@@ -225,6 +225,7 @@ void crash_smp_send_stop(void) · 224 unmodified lines
225 225
226void machine_shutdown(void)226void machine_shutdown(void)
227{227{
228#ifdef CONFIG_SMP
228 int cpu;229 int cpu;
229 230
230 /* All CPUs go to reboot_code_buffer */231 /* All CPUs go to reboot_code_buffer */
@@ -232,7 +233,6 @@ void machine_shutdown(void) · 1 unmodified line
232 if (!cpu_online(cpu))233 if (!cpu_online(cpu))
233 cpu_device_up(get_cpu_device(cpu));234 cpu_device_up(get_cpu_device(cpu));
234 235
235#ifdef CONFIG_SMP
236 smp_call_function(kexec_shutdown_secondary, NULL, 0);236 smp_call_function(kexec_shutdown_secondary, NULL, 0);
237#endif237#endif
238}238}
arch/loongarch/lib/Makefile+2−0
@@ -6,6 +6,8 @@ · 5 unmodified lines
6lib-y += delay.o memset.o memcpy.o memmove.o \6lib-y += delay.o memset.o memcpy.o memmove.o \
7 clear_user.o copy_user.o csum.o dump_tlb.o unaligned.o7 clear_user.o copy_user.o csum.o dump_tlb.o unaligned.o
8 8
9obj-$(CONFIG_ARCH_SUPPORTS_INT128) += tishift.o
10
9obj-$(CONFIG_CPU_HAS_LSX) += xor_simd.o xor_simd_glue.o11obj-$(CONFIG_CPU_HAS_LSX) += xor_simd.o xor_simd_glue.o
10 12
11obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o13obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
arch/loongarch/lib/tishift.S+56−0
@@ -0,0 +1,56 @@
1/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <asm/asmmacro.h>
4#include <linux/export.h>
5#include <linux/linkage.h>
6
7SYM_FUNC_START(__ashlti3)
8 srli.d t2, a0, 1
9 nor t3, zero, a2
10 sll.d t1, a1, a2
11 srl.d t2, t2, t3
12 andi t0, a2, 64
13 sll.d a0, a0, a2
14 or t1, t2, t1
15 maskeqz a1, a0, t0
16 masknez a0, a0, t0
17 masknez t0, t1, t0
18 or a1, t0, a1
19 jr ra
20SYM_FUNC_END(__ashlti3)
21EXPORT_SYMBOL(__ashlti3)
22
23SYM_FUNC_START(__ashrti3)
24 nor t3, zero, a2
25 slli.d t2, a1, 1
26 srl.d t1, a0, a2
27 sll.d t2, t2, t3
28 andi t0, a2, 64
29 or t1, t2, t1
30 sra.d a2, a1, a2
31 srai.d a1, a1, 63
32 maskeqz a0, a2, t0
33 maskeqz a1, a1, t0
34 masknez a2, a2, t0
35 masknez t0, t1, t0
36 or a1, a1, a2
37 or a0, t0, a0
38 jr ra
39SYM_FUNC_END(__ashrti3)
40EXPORT_SYMBOL(__ashrti3)
41
42SYM_FUNC_START(__lshrti3)
43 slli.d t2, a1, 1
44 nor t3, zero, a2
45 srl.d t1, a0, a2
46 sll.d t2, t2, t3
47 andi t0, a2, 64
48 srl.d a1, a1, a2
49 or t1, t2, t1
50 maskeqz a0, a1, t0
51 masknez a1, a1, t0
52 masknez t0, t1, t0
53 or a0, t0, a0
54 jr ra
55SYM_FUNC_END(__lshrti3)
56EXPORT_SYMBOL(__lshrti3)
arch/loongarch/mm/tlbex.S+6−3
@@ -125,6 +125,8 @@ vmalloc_load: · 124 unmodified lines
125tlb_huge_update_load:125tlb_huge_update_load:
126#ifdef CONFIG_SMP126#ifdef CONFIG_SMP
127 ll.d ra, t1, 0127 ll.d ra, t1, 0
128#else
129 rotri.d ra, ra, 64 - (_PAGE_HUGE_SHIFT + 1)
128#endif130#endif
129 andi t0, ra, _PAGE_PRESENT131 andi t0, ra, _PAGE_PRESENT
130 beqz t0, nopage_tlb_load132 beqz t0, nopage_tlb_load
@@ -135,7 +137,6 @@ tlb_huge_update_load: · 4 unmodified lines
135 beqz t0, tlb_huge_update_load137 beqz t0, tlb_huge_update_load
136 ori t0, ra, _PAGE_VALID138 ori t0, ra, _PAGE_VALID
137#else139#else
138 rotri.d ra, ra, 64 - (_PAGE_HUGE_SHIFT + 1)
139 ori t0, ra, _PAGE_VALID140 ori t0, ra, _PAGE_VALID
140 st.d t0, t1, 0141 st.d t0, t1, 0
141#endif142#endif
@@ -281,6 +282,8 @@ vmalloc_store: · 139 unmodified lines
281tlb_huge_update_store:282tlb_huge_update_store:
282#ifdef CONFIG_SMP283#ifdef CONFIG_SMP
283 ll.d ra, t1, 0284 ll.d ra, t1, 0
285#else
286 rotri.d ra, ra, 64 - (_PAGE_HUGE_SHIFT + 1)
284#endif287#endif
285 andi t0, ra, _PAGE_PRESENT | _PAGE_WRITE288 andi t0, ra, _PAGE_PRESENT | _PAGE_WRITE
286 xori t0, t0, _PAGE_PRESENT | _PAGE_WRITE289 xori t0, t0, _PAGE_PRESENT | _PAGE_WRITE
@@ -292,7 +295,6 @@ tlb_huge_update_store: · 5 unmodified lines
292 beqz t0, tlb_huge_update_store295 beqz t0, tlb_huge_update_store
293 ori t0, ra, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED)296 ori t0, ra, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED)
294#else297#else
295 rotri.d ra, ra, 64 - (_PAGE_HUGE_SHIFT + 1)
296 ori t0, ra, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED)298 ori t0, ra, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED)
297 st.d t0, t1, 0299 st.d t0, t1, 0
298#endif300#endif
@@ -438,6 +440,8 @@ vmalloc_modify: · 139 unmodified lines
438tlb_huge_update_modify:440tlb_huge_update_modify:
439#ifdef CONFIG_SMP441#ifdef CONFIG_SMP
440 ll.d ra, t1, 0442 ll.d ra, t1, 0
443#else
444 rotri.d ra, ra, 64 - (_PAGE_HUGE_SHIFT + 1)
441#endif445#endif
442 andi t0, ra, _PAGE_WRITE446 andi t0, ra, _PAGE_WRITE
443 beqz t0, nopage_tlb_modify447 beqz t0, nopage_tlb_modify
@@ -448,7 +452,6 @@ tlb_huge_update_modify: · 4 unmodified lines
448 beqz t0, tlb_huge_update_modify452 beqz t0, tlb_huge_update_modify
449 ori t0, ra, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED)453 ori t0, ra, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED)
450#else454#else
451 rotri.d ra, ra, 64 - (_PAGE_HUGE_SHIFT + 1)
452 ori t0, ra, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED)455 ori t0, ra, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED)
453 st.d t0, t1, 0456 st.d t0, t1, 0
454#endif457#endif
arch/loongarch/power/suspend.c+3−1
@@ -24,6 +24,7 @@ struct saved_registers { · 23 unmodified lines
24 u64 kpgd;24 u64 kpgd;
25 u32 pwctl0;25 u32 pwctl0;
26 u32 pwctl1;26 u32 pwctl1;
27 u64 pcpu_base;
27};28};
28static struct saved_registers saved_regs;29static struct saved_registers saved_regs;
29 30
@@ -36,6 +37,7 @@ void loongarch_common_suspend(void) · 6 unmodified lines
36 saved_regs.pwctl1 = csr_read32(LOONGARCH_CSR_PWCTL1);37 saved_regs.pwctl1 = csr_read32(LOONGARCH_CSR_PWCTL1);
37 saved_regs.ecfg = csr_read32(LOONGARCH_CSR_ECFG);38 saved_regs.ecfg = csr_read32(LOONGARCH_CSR_ECFG);
38 saved_regs.euen = csr_read32(LOONGARCH_CSR_EUEN);39 saved_regs.euen = csr_read32(LOONGARCH_CSR_EUEN);
40 saved_regs.pcpu_base = csr_read64(PERCPU_BASE_KS);
39 41
40 loongarch_suspend_addr = loongson_sysconf.suspend_addr;42 loongarch_suspend_addr = loongson_sysconf.suspend_addr;
41}43}
@@ -44,7 +46,6 @@ void loongarch_common_resume(void) · 2 unmodified lines
44{46{
45 sync_counter();47 sync_counter();
46 local_flush_tlb_all();48 local_flush_tlb_all();
47 csr_write64(per_cpu_offset(0), PERCPU_BASE_KS);
48 csr_write64(eentry, LOONGARCH_CSR_EENTRY);49 csr_write64(eentry, LOONGARCH_CSR_EENTRY);
49 csr_write64(eentry, LOONGARCH_CSR_MERRENTRY);50 csr_write64(eentry, LOONGARCH_CSR_MERRENTRY);
50 csr_write64(tlbrentry, LOONGARCH_CSR_TLBRENTRY);51 csr_write64(tlbrentry, LOONGARCH_CSR_TLBRENTRY);
@@ -55,6 +56,7 @@ void loongarch_common_resume(void) · 4 unmodified lines
55 csr_write32(saved_regs.pwctl1, LOONGARCH_CSR_PWCTL1);56 csr_write32(saved_regs.pwctl1, LOONGARCH_CSR_PWCTL1);
56 csr_write32(saved_regs.ecfg, LOONGARCH_CSR_ECFG);57 csr_write32(saved_regs.ecfg, LOONGARCH_CSR_ECFG);
57 csr_write32(saved_regs.euen, LOONGARCH_CSR_EUEN);58 csr_write32(saved_regs.euen, LOONGARCH_CSR_EUEN);
59 csr_write64(saved_regs.pcpu_base, PERCPU_BASE_KS);
58}60}
59 61
60int loongarch_acpi_suspend(void)62int loongarch_acpi_suspend(void)
rust/Makefile+1−1
@@ -426,7 +426,7 @@ $(obj)/core.o: private rustc_objcopy = $(foreach sym,$(redirect-intrinsics),--re · 425 unmodified lines
426$(obj)/core.o: private rustc_target_flags = $(core-cfgs)426$(obj)/core.o: private rustc_target_flags = $(core-cfgs)
427$(obj)/core.o: $(RUST_LIB_SRC)/core/src/lib.rs FORCE427$(obj)/core.o: $(RUST_LIB_SRC)/core/src/lib.rs FORCE
428 +$(call if_changed_dep,rustc_library)428 +$(call if_changed_dep,rustc_library)
429ifneq ($(or $(CONFIG_X86_64),$(CONFIG_LOONGARCH)),)429ifdef CONFIG_X86_64
430$(obj)/core.o: scripts/target.json430$(obj)/core.o: scripts/target.json
431endif431endif
432 432
scripts/Makefile+1−1
@@ -12,7 +12,7 @@ hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert · 11 unmodified lines
12hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_builder12hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_builder
13hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_gen13hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_gen
14 14
15ifneq ($(or $(CONFIG_X86_64),$(CONFIG_LOONGARCH)),)15ifdef CONFIG_X86_64
16always-$(CONFIG_RUST) += target.json16always-$(CONFIG_RUST) += target.json
17filechk_rust_target = $< < include/config/auto.conf17filechk_rust_target = $< < include/config/auto.conf
18 18
scripts/generate_rust_target.rs+1−6
@@ -164,12 +164,7 @@ fn main() { · 163 unmodified lines
164 ts.push("llvm-target", "x86_64-linux-gnu");164 ts.push("llvm-target", "x86_64-linux-gnu");
165 ts.push("target-pointer-width", "64");165 ts.push("target-pointer-width", "64");
166 } else if cfg.has("LOONGARCH") {166 } else if cfg.has("LOONGARCH") {
167 ts.push("arch", "loongarch64");167 panic!("loongarch uses the builtin rustc loongarch64-unknown-none-softfloat target");
168 ts.push("data-layout", "e-m:e-p:64:64-i64:64-i128:128-n64-S128");
169 ts.push("features", "-f,-d");
170 ts.push("llvm-target", "loongarch64-linux-gnusf");
171 ts.push("llvm-abiname", "lp64s");
172 ts.push("target-pointer-width", "64");
173 } else {168 } else {
174 panic!("Unsupported architecture");169 panic!("Unsupported architecture");
175 }170 }