Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f8a2d10
kthread: Unify kernel_thread() and user_mode_thread()
chenhuacai May 8, 2023
8f1d17a
genirq/msi, platform-msi: Adjust return value of msi_domain_prepare_i…
chenhuacai May 26, 2023
448c3c6
irqchip/loongson-pch-msi: Add machanism to limit msi allocation
chenhuacai May 26, 2023
71124e4
irqchip/loongson-eiointc: Improve IRQ affinity setting
chenhuacai Nov 9, 2022
cf04ec6
LoongArch: Select ARCH_HAS_FAST_MULTIPLIER
xry111 Mar 27, 2024
2e6423b
LoongArch: Select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
xry111 Mar 27, 2024
fd06cf4
LoongArch: Select ARCH_WANT_DEFAULT_BPF_JIT
chenhuacai May 11, 2024
92a209b
LoongArch: Select THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
chenhuacai Apr 8, 2024
9e04533
LoongArch: Give a chance to build with !CONFIG_SMP
seehearfeel Apr 18, 2024
0fd243b
LoongArch: Fix callchain parse error with kernel tracepoint events again
chenhuacai May 6, 2024
925fcba
LoongArch: rust: Switch to use built-in rustc target
heiher Mar 4, 2024
86f92a0
LoongArch: dts: Remove "disabled" state of clock controller node
AaronDot May 9, 2024
37b21c5
LoongArch: dts: Add new supported device nodes to Loongson-2K0500
AaronDot May 9, 2024
cdad1a1
LoongArch: dts: Add new supported device nodes to Loongson-2K2000
AaronDot May 9, 2024
1a913b3
LoongArch: Update Loongson-3 default config file
chenhuacai Mar 23, 2024
238be6e
LoongArch: Define __ARCH_WANT_NEW_STAT in unistd.h
chenhuacai Feb 28, 2024
7b4cb12
LoongArch: Add irq_work support via self IPIs
chenhuacai May 12, 2024
a3f89d5
LoongArch: Add CPU HWMon platform driver
chenhuacai Oct 29, 2020
7735f2c
LoongArch: Add CPUFreq driver support
chenhuacai Sep 5, 2022
1f1273b
SH: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
chenhuacai Jul 12, 2022
76f48d3
LoongArch: Add HIGHMEM and FDT support for future
chenhuacai Apr 12, 2021
9f24665
LoongArch: Add debug machanism support
chenhuacai Dec 31, 2020
70852c5
LoongArch: Add LS7A IOMMU support
chenhuacai Sep 23, 2021
8a82121
USB: Fix OHCI/XHCI wakeup problems
chenhuacai Oct 23, 2021
9b62058
drivers/firmware: Move sysfb_init() from device_initcall to fs_initcall
chenhuacai Jan 28, 2024
2b3c41b
drm/Makefile: Move tiny drivers before native drivers
chenhuacai Nov 7, 2023
c8a91f0
drm/radeon: Workaround radeon driver bug for Loongson
chenhuacai Feb 22, 2021
0b4d8f8
drm/radeon: Call mmiowb() at the end of radeon_ring_commit()
chenhuacai Feb 20, 2024
0fccb96
stmmac: Expose module parameters
FreeFlyingSheep Aug 17, 2022
4de2963
stmmac: pci: Add LS7A support for dwmac-loongson
FreeFlyingSheep Aug 17, 2022
6ccf166
tty: Add univt framework support
chenhuacai Aug 6, 2019
10a2ce8
tty: Add Chinese fonts support in console
chenhuacai Aug 6, 2019
748d47a
LoongArch: Add Loongson Binary Translation syscall support
chenhuacai Dec 31, 2020
ce55afc
dependabot[bot] May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion arch/loongarch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ config LOONGARCH
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
select ARCH_HAS_CPU_FINALIZE_INIT
select ARCH_HAS_CURRENT_STACK_POINTER
select ARCH_HAS_FAST_MULTIPLIER
select ARCH_HAS_FORTIFY_SOURCE
select ARCH_HAS_KCOV
select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
Expand Down Expand Up @@ -56,17 +57,20 @@ config LOONGARCH
select ARCH_SUPPORTS_ACPI
select ARCH_SUPPORTS_ATOMIC_RMW
select ARCH_SUPPORTS_HUGETLBFS
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
select ARCH_SUPPORTS_LTO_CLANG
select ARCH_SUPPORTS_LTO_CLANG_THIN
select ARCH_SUPPORTS_NUMA_BALANCING
select ARCH_USE_BUILTIN_BSWAP
select ARCH_USE_CMPXCHG_LOCKREF
select ARCH_USE_QUEUED_RWLOCKS
select ARCH_USE_QUEUED_SPINLOCKS
select ARCH_WANT_DEFAULT_BPF_JIT
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
select ARCH_WANT_LD_ORPHAN_WARN
select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
select ARCH_WANTS_NO_INSTR
select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
select BUILDTIME_TABLE_SORT
select COMMON_CLK
select CPU_PM
Expand Down Expand Up @@ -174,8 +178,8 @@ config LOONGARCH
select PCI_QUIRKS
select PERF_USE_VMALLOC
select RTC_LIB
select SMP
select SPARSE_IRQ
select SYS_SUPPORTS_HIGHMEM
select SYSCTL_ARCH_UNALIGN_ALLOW
select SYSCTL_ARCH_UNALIGN_NO_WARN
select SYSCTL_EXCEPTION_TRACE
Expand Down Expand Up @@ -220,6 +224,19 @@ config STACKTRACE_SUPPORT
bool
default y

#
# - Highmem only makes sense for the 32-bit kernel.
# - We use SYS_SUPPORTS_HIGHMEM to offer highmem only for systems where we
# know they might have memory configurations that could make use of highmem
# support.
#
config HIGHMEM
bool "High Memory Support"
depends on 32BIT && CPU_SUPPORTS_HIGHMEM && SYS_SUPPORTS_HIGHMEM

config SYS_SUPPORTS_HIGHMEM
bool

# MACH_LOONGSON32 and MACH_LOONGSON64 are deliberately carried over from the
# MIPS Loongson code, to preserve Loongson-specific code paths in drivers that
# are shared between architectures, and specifically expecting the symbols.
Expand Down Expand Up @@ -420,6 +437,7 @@ config EFI_STUB

config SCHED_SMT
bool "SMT scheduler support"
depends on SMP
default y
help
Improves scheduler's performance when there are multiple
Expand Down Expand Up @@ -691,6 +709,7 @@ config ARCH_HIBERNATION_POSSIBLE

source "kernel/power/Kconfig"
source "drivers/acpi/Kconfig"
source "drivers/cpufreq/Kconfig"

endmenu

Expand Down
6 changes: 6 additions & 0 deletions arch/loongarch/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,9 @@ config UNWINDER_ORC
by roughly 2-4MB, depending on your kernel config.

endchoice

config SPINLOCK_TEST
tristate "Enable spinlock timing tests in debugfs"
default n
help
Add several files to the debugfs to test spinlock speed.
2 changes: 1 addition & 1 deletion arch/loongarch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ifdef CONFIG_OBJTOOL
KBUILD_CFLAGS += -fno-jump-tables
endif

KBUILD_RUSTFLAGS += --target=$(objtree)/scripts/target.json
KBUILD_RUSTFLAGS += --target=loongarch64-unknown-none-softfloat
KBUILD_RUSTFLAGS_MODULE += -Crelocation-model=pic

ifeq ($(CONFIG_RELOCATABLE),y)
Expand Down
86 changes: 83 additions & 3 deletions arch/loongarch/boot/dts/loongson-2k0500.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/dts-v1/;

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/loongson,ls2k-clk.h>

/ {
#address-cells = <2>;
Expand All @@ -19,14 +20,15 @@
compatible = "loongson,la264";
device_type = "cpu";
reg = <0x0>;
clocks = <&cpu_clk>;
clocks = <&clk LOONGSON2_NODE_CLK>;
};
};

cpu_clk: cpu-clk {
ref_100m: clock-ref-100m {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <500000000>;
clock-frequency = <100000000>;
clock-output-names = "ref_100m";
};

cpuintc: interrupt-controller {
Expand All @@ -35,6 +37,28 @@
interrupt-controller;
};

thermal-zones {
cpu-thermal {
polling-delay-passive = <1000>;
polling-delay = <5000>;
thermal-sensors = <&tsensor 0>;

trips {
cpu-alert {
temperature = <33000>;
hysteresis = <2000>;
type = "active";
};

cpu-crit {
temperature = <85000>;
hysteresis = <5000>;
type = "critical";
};
};
};
};

bus@10000000 {
compatible = "simple-bus";
ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
Expand All @@ -52,6 +76,54 @@
ranges = <1 0x0 0x0 0x16400000 0x4000>;
};

clk: clock-controller@1fe10400 {
compatible = "loongson,ls2k0500-clk";
reg = <0x0 0x1fe10400 0x0 0x2c>;
#clock-cells = <1>;
clocks = <&ref_100m>;
clock-names = "ref_100m";
};

dma-controller@1fe10c00 {
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
reg = <0 0x1fe10c00 0 0x8>;
interrupt-parent = <&eiointc>;
interrupts = <67>;
clocks = <&clk LOONGSON2_APB_CLK>;
#dma-cells = <1>;
status = "disabled";
};

dma-controller@1fe10c10 {
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
reg = <0 0x1fe10c10 0 0x8>;
interrupt-parent = <&eiointc>;
interrupts = <68>;
clocks = <&clk LOONGSON2_APB_CLK>;
#dma-cells = <1>;
status = "disabled";
};

dma-controller@1fe10c20 {
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
reg = <0 0x1fe10c20 0 0x8>;
interrupt-parent = <&eiointc>;
interrupts = <69>;
clocks = <&clk LOONGSON2_APB_CLK>;
#dma-cells = <1>;
status = "disabled";
};

dma-controller@1fe10c30 {
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
reg = <0 0x1fe10c30 0 0x8>;
interrupt-parent = <&eiointc>;
interrupts = <70>;
clocks = <&clk LOONGSON2_APB_CLK>;
#dma-cells = <1>;
status = "disabled";
};

liointc0: interrupt-controller@1fe11400 {
compatible = "loongson,liointc-2.0";
reg = <0x0 0x1fe11400 0x0 0x40>,
Expand Down Expand Up @@ -139,6 +211,14 @@
status = "disabled";
};

tsensor: thermal-sensor@1fe11500 {
compatible = "loongson,ls2k0500-thermal", "loongson,ls2k1000-thermal";
reg = <0x0 0x1fe11500 0x0 0x30>;
interrupt-parent = <&liointc0>;
interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
#thermal-sensor-cells = <1>;
};

uart0: serial@1ff40800 {
compatible = "ns16550a";
reg = <0x0 0x1ff40800 0x0 0x10>;
Expand Down
4 changes: 0 additions & 4 deletions arch/loongarch/boot/dts/loongson-2k1000-ref.dts
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@
status = "okay";
};

&clk {
status = "okay";
};

&rtc0 {
status = "okay";
};
Expand Down
1 change: 0 additions & 1 deletion arch/loongarch/boot/dts/loongson-2k1000.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@
#clock-cells = <1>;
clocks = <&ref_100m>;
clock-names = "ref_100m";
status = "disabled";
};

gpio0: gpio@1fe00500 {
Expand Down
49 changes: 45 additions & 4 deletions arch/loongarch/boot/dts/loongson-2k2000.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/dts-v1/;

#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/loongson,ls2k-clk.h>

/ {
#address-cells = <2>;
Expand All @@ -19,21 +20,22 @@
compatible = "loongson,la364";
device_type = "cpu";
reg = <0x0>;
clocks = <&cpu_clk>;
clocks = <&clk LOONGSON2_NODE_CLK>;
};

cpu1: cpu@2 {
compatible = "loongson,la364";
device_type = "cpu";
reg = <0x1>;
clocks = <&cpu_clk>;
clocks = <&clk LOONGSON2_NODE_CLK>;
};
};

cpu_clk: cpu-clk {
ref_100m: clock-ref-100m {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <1400000000>;
clock-frequency = <100000000>;
clock-output-names = "ref_100m";
};

cpuintc: interrupt-controller {
Expand All @@ -42,6 +44,28 @@
interrupt-controller;
};

thermal-zones {
cpu-thermal {
polling-delay-passive = <1000>;
polling-delay = <5000>;
thermal-sensors = <&tsensor 0>;

trips {
cpu-alert {
temperature = <40000>;
hysteresis = <2000>;
type = "active";
};

cpu-crit {
temperature = <85000>;
hysteresis = <5000>;
type = "critical";
};
};
};
};

bus@10000000 {
compatible = "simple-bus";
ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
Expand All @@ -58,6 +82,14 @@
ranges = <1 0x0 0x0 0x18400000 0x4000>;
};

clk: clock-controller@10010480 {
compatible = "loongson,ls2k2000-clk";
reg = <0x0 0x10010480 0x0 0x100>;
#clock-cells = <1>;
clocks = <&ref_100m>;
clock-names = "ref_100m";
};

pmc: power-management@100d0000 {
compatible = "loongson,ls2k2000-pmc", "loongson,ls2k0500-pmc", "syscon";
reg = <0x0 0x100d0000 0x0 0x58>;
Expand All @@ -80,6 +112,15 @@
};
};

tsensor: thermal-sensor@1fe01460 {
compatible = "loongson,ls2k2000-thermal";
reg = <0x0 0x1fe01460 0x0 0x30>,
<0x0 0x1fe0019c 0x0 0x4>;
interrupt-parent = <&liointc>;
interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
#thermal-sensor-cells = <1>;
};

liointc: interrupt-controller@1fe01400 {
compatible = "loongson,liointc-1.0";
reg = <0x0 0x1fe01400 0x0 0x64>;
Expand Down
4 changes: 4 additions & 0 deletions arch/loongarch/boot/dts/loongson/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
dtb-$(CONFIG_CPU_LOONGSON64) += loongson3_ls7a.dtb

obj-y += $(patsubst %.dtb, %.dtb.o, $(dtb-y))
Loading