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
Unified · Split
| @@ -16,6 +16,7 @@ config LOONGARCH · 15 unmodified lines | ||
| 16 | 16 | select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI |
| 17 | 17 | select ARCH_HAS_CPU_FINALIZE_INIT |
| 18 | 18 | select ARCH_HAS_CURRENT_STACK_POINTER |
| 19 | + select ARCH_HAS_FAST_MULTIPLIER | |
| 19 | 20 | select ARCH_HAS_FORTIFY_SOURCE |
| 20 | 21 | select ARCH_HAS_KCOV |
| 21 | 22 | select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS |
| @@ -56,6 +57,7 @@ config LOONGARCH · 34 unmodified lines | ||
| 56 | 57 | select ARCH_SUPPORTS_ACPI |
| 57 | 58 | select ARCH_SUPPORTS_ATOMIC_RMW |
| 58 | 59 | select ARCH_SUPPORTS_HUGETLBFS |
| 60 | + select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 | |
| 59 | 61 | select ARCH_SUPPORTS_LTO_CLANG |
| 60 | 62 | select ARCH_SUPPORTS_LTO_CLANG_THIN |
| 61 | 63 | select ARCH_SUPPORTS_NUMA_BALANCING |
| @@ -63,10 +65,12 @@ config LOONGARCH · 1 unmodified line | ||
| 63 | 65 | select ARCH_USE_CMPXCHG_LOCKREF |
| 64 | 66 | select ARCH_USE_QUEUED_RWLOCKS |
| 65 | 67 | select ARCH_USE_QUEUED_SPINLOCKS |
| 68 | + select ARCH_WANT_DEFAULT_BPF_JIT | |
| 66 | 69 | select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT |
| 67 | 70 | select ARCH_WANT_LD_ORPHAN_WARN |
| 68 | 71 | select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP |
| 69 | 72 | select ARCH_WANTS_NO_INSTR |
| 73 | + select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE | |
| 70 | 74 | select BUILDTIME_TABLE_SORT |
| 71 | 75 | select COMMON_CLK |
| 72 | 76 | select CPU_PM |
| @@ -174,7 +178,6 @@ config LOONGARCH · 101 unmodified lines | ||
| 174 | 178 | select PCI_QUIRKS |
| 175 | 179 | select PERF_USE_VMALLOC |
| 176 | 180 | select RTC_LIB |
| 177 | − select SMP | |
| 178 | 181 | select SPARSE_IRQ |
| 179 | 182 | select SYSCTL_ARCH_UNALIGN_ALLOW |
| 180 | 183 | select SYSCTL_ARCH_UNALIGN_NO_WARN |
| @@ -420,6 +423,7 @@ config EFI_STUB · 239 unmodified lines | ||
| 420 | 423 | |
| 421 | 424 | config SCHED_SMT |
| 422 | 425 | bool "SMT scheduler support" |
| 426 | + depends on SMP | |
| 423 | 427 | default y |
| 424 | 428 | help |
| 425 | 429 | Improves scheduler's performance when there are multiple |
| @@ -101,7 +101,7 @@ ifdef CONFIG_OBJTOOL · 100 unmodified lines | ||
| 101 | 101 | KBUILD_CFLAGS += -fno-jump-tables |
| 102 | 102 | endif |
| 103 | 103 | |
| 104 | −KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json | |
| 104 | +KBUILD_RUSTFLAGS += --target=loongarch64-unknown-none-softfloat | |
| 105 | 105 | KBUILD_RUSTFLAGS_MODULE += -Crelocation-model=pic |
| 106 | 106 | |
| 107 | 107 | ifeq ($(CONFIG_RELOCATABLE),y) |
| @@ -6,6 +6,7 @@ · 5 unmodified lines | ||
| 6 | 6 | /dts-v1/; |
| 7 | 7 | |
| 8 | 8 | #include <dt-bindings/interrupt-controller/irq.h> |
| 9 | +#include <dt-bindings/clock/loongson,ls2k-clk.h> | |
| 9 | 10 | |
| 10 | 11 | / { |
| 11 | 12 | #address-cells = <2>; |
| @@ -19,14 +20,15 @@ · 7 unmodified lines | ||
| 19 | 20 | compatible = "loongson,la264"; |
| 20 | 21 | device_type = "cpu"; |
| 21 | 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 | 28 | compatible = "fixed-clock"; |
| 28 | 29 | #clock-cells = <0>; |
| 29 | − clock-frequency = <500000000>; | |
| 30 | + clock-frequency = <100000000>; | |
| 31 | + clock-output-names = "ref_100m"; | |
| 30 | 32 | }; |
| 31 | 33 | |
| 32 | 34 | cpuintc: interrupt-controller { |
| @@ -35,6 +37,28 @@ · 2 unmodified lines | ||
| 35 | 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 | 62 | bus@10000000 { |
| 39 | 63 | compatible = "simple-bus"; |
| 40 | 64 | ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>, |
| @@ -52,6 +76,54 @@ · 11 unmodified lines | ||
| 52 | 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 | 127 | liointc0: interrupt-controller@1fe11400 { |
| 56 | 128 | compatible = "loongson,liointc-2.0"; |
| 57 | 129 | reg = <0x0 0x1fe11400 0x0 0x40>, |
| @@ -139,6 +211,14 @@ · 81 unmodified lines | ||
| 139 | 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 | 222 | uart0: serial@1ff40800 { |
| 143 | 223 | compatible = "ns16550a"; |
| 144 | 224 | reg = <0x0 0x1ff40800 0x0 0x10>; |
| @@ -113,10 +113,6 @@ · 112 unmodified lines | ||
| 113 | 113 | status = "okay"; |
| 114 | 114 | }; |
| 115 | 115 | |
| 116 | −&clk { | |
| 117 | − status = "okay"; | |
| 118 | −}; | |
| 119 | − | |
| 120 | 116 | &rtc0 { |
| 121 | 117 | status = "okay"; |
| 122 | 118 | }; |
| @@ -159,7 +159,6 @@ · 158 unmodified lines | ||
| 159 | 159 | #clock-cells = <1>; |
| 160 | 160 | clocks = <&ref_100m>; |
| 161 | 161 | clock-names = "ref_100m"; |
| 162 | − status = "disabled"; | |
| 163 | 162 | }; |
| 164 | 163 | |
| 165 | 164 | gpio0: gpio@1fe00500 { |
| @@ -6,6 +6,7 @@ · 5 unmodified lines | ||
| 6 | 6 | /dts-v1/; |
| 7 | 7 | |
| 8 | 8 | #include <dt-bindings/interrupt-controller/irq.h> |
| 9 | +#include <dt-bindings/clock/loongson,ls2k-clk.h> | |
| 9 | 10 | |
| 10 | 11 | / { |
| 11 | 12 | #address-cells = <2>; |
| @@ -19,21 +20,22 @@ · 7 unmodified lines | ||
| 19 | 20 | compatible = "loongson,la364"; |
| 20 | 21 | device_type = "cpu"; |
| 21 | 22 | reg = <0x0>; |
| 22 | − clocks = <&cpu_clk>; | |
| 23 | + clocks = <&clk LOONGSON2_NODE_CLK>; | |
| 23 | 24 | }; |
| 24 | 25 | |
| 25 | 26 | cpu1: cpu@2 { |
| 26 | 27 | compatible = "loongson,la364"; |
| 27 | 28 | device_type = "cpu"; |
| 28 | 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 | 35 | compatible = "fixed-clock"; |
| 35 | 36 | #clock-cells = <0>; |
| 36 | − clock-frequency = <1400000000>; | |
| 37 | + clock-frequency = <100000000>; | |
| 38 | + clock-output-names = "ref_100m"; | |
| 37 | 39 | }; |
| 38 | 40 | |
| 39 | 41 | cpuintc: interrupt-controller { |
| @@ -42,6 +44,28 @@ · 2 unmodified lines | ||
| 42 | 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 | 69 | bus@10000000 { |
| 46 | 70 | compatible = "simple-bus"; |
| 47 | 71 | ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>, |
| @@ -58,6 +82,14 @@ · 10 unmodified lines | ||
| 58 | 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 | 93 | pmc: power-management@100d0000 { |
| 62 | 94 | compatible = "loongson,ls2k2000-pmc", "loongson,ls2k0500-pmc", "syscon"; |
| 63 | 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 | 124 | liointc: interrupt-controller@1fe01400 { |
| 84 | 125 | compatible = "loongson,liointc-1.0"; |
| 85 | 126 | reg = <0x0 0x1fe01400 0x0 0x64>; |
| @@ -14,6 +14,10 @@ CONFIG_TASKSTATS=y · 13 unmodified lines | ||
| 14 | 14 | CONFIG_TASK_DELAY_ACCT=y |
| 15 | 15 | CONFIG_TASK_XACCT=y |
| 16 | 16 | CONFIG_TASK_IO_ACCOUNTING=y |
| 17 | +CONFIG_PSI=y | |
| 18 | +CONFIG_IKCONFIG=y | |
| 19 | +CONFIG_IKCONFIG_PROC=y | |
| 20 | +CONFIG_IKHEADERS=y | |
| 17 | 21 | CONFIG_LOG_BUF_SHIFT=18 |
| 18 | 22 | CONFIG_NUMA_BALANCING=y |
| 19 | 23 | CONFIG_MEMCG=y |
| @@ -129,13 +133,22 @@ CONFIG_IP_MROUTE=y · 109 unmodified lines | ||
| 129 | 133 | CONFIG_IP_MROUTE_MULTIPLE_TABLES=y |
| 130 | 134 | CONFIG_IP_PIMSM_V1=y |
| 131 | 135 | CONFIG_IP_PIMSM_V2=y |
| 136 | +CONFIG_INET_AH=m | |
| 132 | 137 | CONFIG_INET_ESP=m |
| 138 | +CONFIG_INET_ESP_OFFLOAD=m | |
| 139 | +CONFIG_INET_ESPINTCP=y | |
| 140 | +CONFIG_INET_IPCOMP=m | |
| 133 | 141 | CONFIG_INET_UDP_DIAG=y |
| 134 | 142 | CONFIG_TCP_CONG_ADVANCED=y |
| 135 | 143 | CONFIG_TCP_CONG_BBR=m |
| 136 | 144 | CONFIG_IPV6_ROUTER_PREF=y |
| 137 | 145 | CONFIG_IPV6_ROUTE_INFO=y |
| 146 | +CONFIG_INET6_AH=m | |
| 138 | 147 | CONFIG_INET6_ESP=m |
| 148 | +CONFIG_INET6_ESP_OFFLOAD=m | |
| 149 | +CONFIG_INET6_ESPINTCP=y | |
| 150 | +CONFIG_INET6_IPCOMP=m | |
| 151 | +CONFIG_IPV6_MULTIPLE_TABLES=y | |
| 139 | 152 | CONFIG_IPV6_MROUTE=y |
| 140 | 153 | CONFIG_MPTCP=y |
| 141 | 154 | CONFIG_NETWORK_PHY_TIMESTAMPING=y |
| @@ -151,6 +164,8 @@ CONFIG_NF_CONNTRACK_PPTP=m · 9 unmodified lines | ||
| 151 | 164 | CONFIG_NF_CONNTRACK_TFTP=m |
| 152 | 165 | CONFIG_NF_CT_NETLINK=m |
| 153 | 166 | CONFIG_NF_TABLES=m |
| 167 | +CONFIG_NF_TABLES_INET=y | |
| 168 | +CONFIG_NFT_CT=m | |
| 154 | 169 | CONFIG_NFT_CONNLIMIT=m |
| 155 | 170 | CONFIG_NFT_LOG=m |
| 156 | 171 | CONFIG_NFT_LIMIT=m |
| @@ -163,6 +178,7 @@ CONFIG_NFT_QUOTA=m · 6 unmodified lines | ||
| 163 | 178 | CONFIG_NFT_REJECT=m |
| 164 | 179 | CONFIG_NFT_COMPAT=m |
| 165 | 180 | CONFIG_NFT_HASH=m |
| 181 | +CONFIG_NFT_FIB_INET=m | |
| 166 | 182 | CONFIG_NFT_SOCKET=m |
| 167 | 183 | CONFIG_NFT_OSF=m |
| 168 | 184 | CONFIG_NFT_TPROXY=m |
| @@ -259,6 +275,7 @@ CONFIG_IP_NF_ARPTABLES=m · 90 unmodified lines | ||
| 259 | 275 | CONFIG_IP_NF_ARPFILTER=m |
| 260 | 276 | CONFIG_IP_NF_ARP_MANGLE=m |
| 261 | 277 | CONFIG_NF_TABLES_IPV6=y |
| 278 | +CONFIG_NFT_FIB_IPV6=m | |
| 262 | 279 | CONFIG_IP6_NF_IPTABLES=y |
| 263 | 280 | CONFIG_IP6_NF_MATCH_AH=m |
| 264 | 281 | CONFIG_IP6_NF_MATCH_EUI64=m |
| @@ -279,6 +296,7 @@ CONFIG_IP6_NF_NAT=m · 14 unmodified lines | ||
| 279 | 296 | CONFIG_IP6_NF_TARGET_MASQUERADE=m |
| 280 | 297 | CONFIG_IP6_NF_TARGET_NPT=m |
| 281 | 298 | CONFIG_NF_TABLES_BRIDGE=m |
| 299 | +CONFIG_NF_CONNTRACK_BRIDGE=m | |
| 282 | 300 | CONFIG_BRIDGE_NF_EBTABLES=m |
| 283 | 301 | CONFIG_BRIDGE_EBT_BROUTE=m |
| 284 | 302 | CONFIG_BRIDGE_EBT_T_FILTER=m |
| @@ -549,6 +567,7 @@ CONFIG_NGBE=y · 264 unmodified lines | ||
| 549 | 567 | CONFIG_TXGBE=y |
| 550 | 568 | # CONFIG_NET_VENDOR_WIZNET is not set |
| 551 | 569 | # CONFIG_NET_VENDOR_XILINX is not set |
| 570 | +CONFIG_MOTORCOMM_PHY=y | |
| 552 | 571 | CONFIG_PPP=m |
| 553 | 572 | CONFIG_PPP_BSDCOMP=m |
| 554 | 573 | CONFIG_PPP_DEFLATE=m |
| @@ -810,6 +829,7 @@ CONFIG_NTB_SWITCHTEC=m · 255 unmodified lines | ||
| 810 | 829 | CONFIG_NTB_PERF=m |
| 811 | 830 | CONFIG_NTB_TRANSPORT=m |
| 812 | 831 | CONFIG_PWM=y |
| 832 | +CONFIG_GENERIC_PHY=y | |
| 813 | 833 | CONFIG_USB4=y |
| 814 | 834 | CONFIG_EXT2_FS=y |
| 815 | 835 | CONFIG_EXT2_FS_XATTR=y |
| @@ -875,10 +895,13 @@ CONFIG_UBIFS_FS=m · 59 unmodified lines | ||
| 875 | 895 | CONFIG_UBIFS_FS_ADVANCED_COMPR=y |
| 876 | 896 | CONFIG_CRAMFS=m |
| 877 | 897 | CONFIG_SQUASHFS=y |
| 898 | +CONFIG_SQUASHFS_FILE_DIRECT=y | |
| 899 | +CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT=y | |
| 878 | 900 | CONFIG_SQUASHFS_XATTR=y |
| 879 | 901 | CONFIG_SQUASHFS_LZ4=y |
| 880 | 902 | CONFIG_SQUASHFS_LZO=y |
| 881 | 903 | CONFIG_SQUASHFS_XZ=y |
| 904 | +CONFIG_SQUASHFS_ZSTD=y | |
| 882 | 905 | CONFIG_MINIX_FS=m |
| 883 | 906 | CONFIG_ROMFS_FS=m |
| 884 | 907 | CONFIG_PSTORE=m |
| @@ -960,3 +983,4 @@ CONFIG_DEBUG_FS=y · 75 unmodified lines | ||
| 960 | 983 | CONFIG_SCHEDSTATS=y |
| 961 | 984 | # CONFIG_DEBUG_PREEMPT is not set |
| 962 | 985 | # CONFIG_FTRACE is not set |
| 986 | +CONFIG_UNWINDER_ORC=y | |
| @@ -8,6 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | #ifndef _ASM_LOONGARCH_ACPI_H |
| 9 | 9 | #define _ASM_LOONGARCH_ACPI_H |
| 10 | 10 | |
| 11 | +#include <asm/smp.h> | |
| 11 | 12 | #include <asm/suspend.h> |
| 12 | 13 | |
| 13 | 14 | #ifdef CONFIG_ACPI |
| @@ -6,3 +6,9 @@ · 5 unmodified lines | ||
| 6 | 6 | #include <asm/page.h> |
| 7 | 7 | #include <asm/ftrace.h> |
| 8 | 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 | |
| @@ -13,8 +13,7 @@ · 12 unmodified lines | ||
| 13 | 13 | |
| 14 | 14 | #define perf_arch_fetch_caller_regs(regs, __ip) { \ |
| 15 | 15 | (regs)->csr_era = (__ip); \ |
| 16 | − (regs)->regs[3] = current_stack_pointer; \ | |
| 17 | − (regs)->regs[22] = (unsigned long) __builtin_frame_address(0); \ | |
| 16 | + (regs)->regs[3] = (unsigned long) __builtin_frame_address(0); \ | |
| 18 | 17 | } |
| 19 | 18 | |
| 20 | 19 | #endif /* __LOONGARCH_PERF_EVENT_H__ */ |
| @@ -6,6 +6,8 @@ · 5 unmodified lines | ||
| 6 | 6 | #ifndef __ASM_SMP_H |
| 7 | 7 | #define __ASM_SMP_H |
| 8 | 8 | |
| 9 | +#ifdef CONFIG_SMP | |
| 10 | + | |
| 9 | 11 | #include <linux/atomic.h> |
| 10 | 12 | #include <linux/bitops.h> |
| 11 | 13 | #include <linux/linkage.h> |
| @@ -109,4 +111,8 @@ static inline void __cpu_die(unsigned int cpu) · 97 unmodified lines | ||
| 109 | 111 | } |
| 110 | 112 | #endif |
| 111 | 113 | |
| 114 | +#else /* !CONFIG_SMP */ | |
| 115 | +#define cpu_logical_map(cpu) 0 | |
| 116 | +#endif /* CONFIG_SMP */ | |
| 117 | + | |
| 112 | 118 | #endif /* __ASM_SMP_H */ |
| @@ -225,6 +225,7 @@ void crash_smp_send_stop(void) · 224 unmodified lines | ||
| 225 | 225 | |
| 226 | 226 | void machine_shutdown(void) |
| 227 | 227 | { |
| 228 | +#ifdef CONFIG_SMP | |
| 228 | 229 | int cpu; |
| 229 | 230 | |
| 230 | 231 | /* All CPUs go to reboot_code_buffer */ |
| @@ -232,7 +233,6 @@ void machine_shutdown(void) · 1 unmodified line | ||
| 232 | 233 | if (!cpu_online(cpu)) |
| 233 | 234 | cpu_device_up(get_cpu_device(cpu)); |
| 234 | 235 | |
| 235 | −#ifdef CONFIG_SMP | |
| 236 | 236 | smp_call_function(kexec_shutdown_secondary, NULL, 0); |
| 237 | 237 | #endif |
| 238 | 238 | } |
| @@ -6,6 +6,8 @@ · 5 unmodified lines | ||
| 6 | 6 | lib-y += delay.o memset.o memcpy.o memmove.o \ |
| 7 | 7 | clear_user.o copy_user.o csum.o dump_tlb.o unaligned.o |
| 8 | 8 | |
| 9 | +obj-$(CONFIG_ARCH_SUPPORTS_INT128) += tishift.o | |
| 10 | + | |
| 9 | 11 | obj-$(CONFIG_CPU_HAS_LSX) += xor_simd.o xor_simd_glue.o |
| 10 | 12 | |
| 11 | 13 | obj-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o |
| @@ -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 | + | |
| 7 | +SYM_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 | |
| 20 | +SYM_FUNC_END(__ashlti3) | |
| 21 | +EXPORT_SYMBOL(__ashlti3) | |
| 22 | + | |
| 23 | +SYM_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 | |
| 39 | +SYM_FUNC_END(__ashrti3) | |
| 40 | +EXPORT_SYMBOL(__ashrti3) | |
| 41 | + | |
| 42 | +SYM_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 | |
| 55 | +SYM_FUNC_END(__lshrti3) | |
| 56 | +EXPORT_SYMBOL(__lshrti3) | |
| @@ -125,6 +125,8 @@ vmalloc_load: · 124 unmodified lines | ||
| 125 | 125 | tlb_huge_update_load: |
| 126 | 126 | #ifdef CONFIG_SMP |
| 127 | 127 | ll.d ra, t1, 0 |
| 128 | +#else | |
| 129 | + rotri.d ra, ra, 64 - (_PAGE_HUGE_SHIFT + 1) | |
| 128 | 130 | #endif |
| 129 | 131 | andi t0, ra, _PAGE_PRESENT |
| 130 | 132 | beqz t0, nopage_tlb_load |
| @@ -135,7 +137,6 @@ tlb_huge_update_load: · 4 unmodified lines | ||
| 135 | 137 | beqz t0, tlb_huge_update_load |
| 136 | 138 | ori t0, ra, _PAGE_VALID |
| 137 | 139 | #else |
| 138 | − rotri.d ra, ra, 64 - (_PAGE_HUGE_SHIFT + 1) | |
| 139 | 140 | ori t0, ra, _PAGE_VALID |
| 140 | 141 | st.d t0, t1, 0 |
| 141 | 142 | #endif |
| @@ -281,6 +282,8 @@ vmalloc_store: · 139 unmodified lines | ||
| 281 | 282 | tlb_huge_update_store: |
| 282 | 283 | #ifdef CONFIG_SMP |
| 283 | 284 | ll.d ra, t1, 0 |
| 285 | +#else | |
| 286 | + rotri.d ra, ra, 64 - (_PAGE_HUGE_SHIFT + 1) | |
| 284 | 287 | #endif |
| 285 | 288 | andi t0, ra, _PAGE_PRESENT | _PAGE_WRITE |
| 286 | 289 | xori t0, t0, _PAGE_PRESENT | _PAGE_WRITE |
| @@ -292,7 +295,6 @@ tlb_huge_update_store: · 5 unmodified lines | ||
| 292 | 295 | beqz t0, tlb_huge_update_store |
| 293 | 296 | ori t0, ra, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED) |
| 294 | 297 | #else |
| 295 | − rotri.d ra, ra, 64 - (_PAGE_HUGE_SHIFT + 1) | |
| 296 | 298 | ori t0, ra, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED) |
| 297 | 299 | st.d t0, t1, 0 |
| 298 | 300 | #endif |
| @@ -438,6 +440,8 @@ vmalloc_modify: · 139 unmodified lines | ||
| 438 | 440 | tlb_huge_update_modify: |
| 439 | 441 | #ifdef CONFIG_SMP |
| 440 | 442 | ll.d ra, t1, 0 |
| 443 | +#else | |
| 444 | + rotri.d ra, ra, 64 - (_PAGE_HUGE_SHIFT + 1) | |
| 441 | 445 | #endif |
| 442 | 446 | andi t0, ra, _PAGE_WRITE |
| 443 | 447 | beqz t0, nopage_tlb_modify |
| @@ -448,7 +452,6 @@ tlb_huge_update_modify: · 4 unmodified lines | ||
| 448 | 452 | beqz t0, tlb_huge_update_modify |
| 449 | 453 | ori t0, ra, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED) |
| 450 | 454 | #else |
| 451 | − rotri.d ra, ra, 64 - (_PAGE_HUGE_SHIFT + 1) | |
| 452 | 455 | ori t0, ra, (_PAGE_VALID | _PAGE_DIRTY | _PAGE_MODIFIED) |
| 453 | 456 | st.d t0, t1, 0 |
| 454 | 457 | #endif |
| @@ -24,6 +24,7 @@ struct saved_registers { · 23 unmodified lines | ||
| 24 | 24 | u64 kpgd; |
| 25 | 25 | u32 pwctl0; |
| 26 | 26 | u32 pwctl1; |
| 27 | + u64 pcpu_base; | |
| 27 | 28 | }; |
| 28 | 29 | static struct saved_registers saved_regs; |
| 29 | 30 | |
| @@ -36,6 +37,7 @@ void loongarch_common_suspend(void) · 6 unmodified lines | ||
| 36 | 37 | saved_regs.pwctl1 = csr_read32(LOONGARCH_CSR_PWCTL1); |
| 37 | 38 | saved_regs.ecfg = csr_read32(LOONGARCH_CSR_ECFG); |
| 38 | 39 | saved_regs.euen = csr_read32(LOONGARCH_CSR_EUEN); |
| 40 | + saved_regs.pcpu_base = csr_read64(PERCPU_BASE_KS); | |
| 39 | 41 | |
| 40 | 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 | 47 | sync_counter(); |
| 46 | 48 | local_flush_tlb_all(); |
| 47 | − csr_write64(per_cpu_offset(0), PERCPU_BASE_KS); | |
| 48 | 49 | csr_write64(eentry, LOONGARCH_CSR_EENTRY); |
| 49 | 50 | csr_write64(eentry, LOONGARCH_CSR_MERRENTRY); |
| 50 | 51 | csr_write64(tlbrentry, LOONGARCH_CSR_TLBRENTRY); |
| @@ -55,6 +56,7 @@ void loongarch_common_resume(void) · 4 unmodified lines | ||
| 55 | 56 | csr_write32(saved_regs.pwctl1, LOONGARCH_CSR_PWCTL1); |
| 56 | 57 | csr_write32(saved_regs.ecfg, LOONGARCH_CSR_ECFG); |
| 57 | 58 | csr_write32(saved_regs.euen, LOONGARCH_CSR_EUEN); |
| 59 | + csr_write64(saved_regs.pcpu_base, PERCPU_BASE_KS); | |
| 58 | 60 | } |
| 59 | 61 | |
| 60 | 62 | int loongarch_acpi_suspend(void) |
| @@ -426,7 +426,7 @@ $(obj)/core.o: private rustc_objcopy = $(foreach sym,$(redirect-intrinsics),--re · 425 unmodified lines | ||
| 426 | 426 | $(obj)/core.o: private rustc_target_flags = $(core-cfgs) |
| 427 | 427 | $(obj)/core.o: $(RUST_LIB_SRC)/core/src/lib.rs FORCE |
| 428 | 428 | +$(call if_changed_dep,rustc_library) |
| 429 | −ifneq ($(or $(CONFIG_X86_64),$(CONFIG_LOONGARCH)),) | |
| 429 | +ifdef CONFIG_X86_64 | |
| 430 | 430 | $(obj)/core.o: scripts/target.json |
| 431 | 431 | endif |
| 432 | 432 | |
| @@ -12,7 +12,7 @@ hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE) += insert-sys-cert · 11 unmodified lines | ||
| 12 | 12 | hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_builder |
| 13 | 13 | hostprogs-always-$(CONFIG_RUST_KERNEL_DOCTESTS) += rustdoc_test_gen |
| 14 | 14 | |
| 15 | −ifneq ($(or $(CONFIG_X86_64),$(CONFIG_LOONGARCH)),) | |
| 15 | +ifdef CONFIG_X86_64 | |
| 16 | 16 | always-$(CONFIG_RUST) += target.json |
| 17 | 17 | filechk_rust_target = $< < include/config/auto.conf |
| 18 | 18 | |
| @@ -164,12 +164,7 @@ fn main() { · 163 unmodified lines | ||
| 164 | 164 | ts.push("llvm-target", "x86_64-linux-gnu"); |
| 165 | 165 | ts.push("target-pointer-width", "64"); |
| 166 | 166 | } else if cfg.has("LOONGARCH") { |
| 167 | − ts.push("arch", "loongarch64"); | |
| 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"); | |
| 167 | + panic!("loongarch uses the builtin rustc loongarch64-unknown-none-softfloat target"); | |
| 173 | 168 | } else { |
| 174 | 169 | panic!("Unsupported architecture"); |
| 175 | 170 | } |