Message ID | 20190827085302.5197-1-jiaxun.yang@flygoat.com (mailing list archive) |
---|---|
Headers | show |
Series | Modernize Loongson64 Machine | expand |
Hi, Jiaxun,
1, To describe CPU I prefer "loongson" to "ls" because "ls" is confusing, and in future we will use ls2h/ls7a to describe Loongson's bridge.
2, I think it is better to use loongson64c/loongson64g than loongson2ef/loongson64. As we disscussed, we will use PRID_IMP_LOONGSON_64C/PRID_IMP_LOONGSON_64G to describe 0x6300/0xc000.
Huacai
------------------ Original ------------------
From: "Jiaxun Yang"<jiaxun.yang@flygoat.com>;Date: Tue, Aug 27, 2019 04:52 PMTo: "linux-mips"<linux-mips@vger.kernel.org>; Cc: "chenhc"<chenhc@lemote.com>; "paul.burton"<paul.burton@mips.com>; "tglx"<tglx@linutronix.de>; "jason"<jason@lakedaemon.net>; "maz"<maz@kernel.org>; "linux-kernel"<linux-kernel@vger.kernel.org>; "robh+dt"<robh+dt@kernel.org>; "mark.rutland"<mark.rutland@arm.co>; "devicetree"<devicetree@vger.kernel.org>; "Jiaxun Yang"<jiaxun.yang@flygoat.com>; Subject: [PATCH 00/13] Modernize Loongson64 Machine Loongson have a long history of contributing their code to mainline kernel.
However, it seems like recent years, they are focusing on maintain a kernel by themselves
rather than contribute there code to the community.
Kernel is progress rapidly too. Their code slept in mainline for a long peroid without proper
maintainance and became outdated.
This patchset brings modern DeviceTree and irqchip support to the Loongson64 machine, and leaves
Loongson 2e/f alone since they are too legacy to touch.
Jiaxun Yang (13):
MIPS: Loongson64: Rename CPU TYPES
MIPS: Loongson64: Sepreate loongson2ef/loongson64 code
MAINTAINERS: Fix entries for new loongson64 path
irqchip: Add driver for Loongson-3 I/O interrupt controller
dt-bindings: interrupt-controller: Add Loongson-3 IOINTC
irqchip: Add driver for Loongson-3 HyperTransport interrupt controller
dt-bindings: interrupt-controller: Add Loongson-3 HTINTC
irqchip: i8259: Add plat-poll support
irqchip: mips-cpu: Convert to simple domain
MIPS: Loongson64: Drop legacy IRQ code
dt-bindings: mips: Add loongson cpus & boards
MIPS: Loongson64: Add generic dts
MIPS: Loongson64: Load built-in dtbs
.../loongson,ls3-htintc.yaml | 53 +++++
.../loongson,ls3-iointc.yaml | 61 +++++
.../bindings/mips/loongson/cpus.yaml | 38 +++
.../bindings/mips/loongson/devices.yaml | 64 ++++++
MAINTAINERS | 9 +-
arch/mips/Kbuild.platforms | 1 +
arch/mips/Kconfig | 83 +++++--
arch/mips/boot/dts/Makefile | 1 +
arch/mips/boot/dts/loongson/Makefile | 8 +
arch/mips/boot/dts/loongson/ls3-2nodes.dtsi | 8 +
arch/mips/boot/dts/loongson/ls3-4nodes.dtsi | 15 ++
arch/mips/boot/dts/loongson/ls3-cpus.dtsi | 150 ++++++++++++
arch/mips/boot/dts/loongson/ls3-gs464.dtsi | 18 ++
arch/mips/boot/dts/loongson/ls3-gs464e.dtsi | 18 ++
.../boot/dts/loongson/ls3-rs780e-pch.dtsi | 35 +++
arch/mips/boot/dts/loongson/ls3a-package.dtsi | 59 +++++
.../boot/dts/loongson/ls3a1000_780e_1way.dts | 12 +
.../boot/dts/loongson/ls3a1000_780e_2way.dts | 13 ++
.../boot/dts/loongson/ls3a1000_780e_4way.dts | 13 ++
.../boot/dts/loongson/ls3a2000_780e_1way.dts | 12 +
.../boot/dts/loongson/ls3a2000_780e_2way.dts | 13 ++
.../boot/dts/loongson/ls3a2000_780e_4way.dts | 13 ++
.../boot/dts/loongson/ls3a3000_780e_1way.dts | 12 +
.../boot/dts/loongson/ls3a3000_780e_2way.dts | 13 ++
.../boot/dts/loongson/ls3a3000_780e_4way.dts | 13 ++
arch/mips/boot/dts/loongson/ls3b-package.dtsi | 59 +++++
.../mips/boot/dts/loongson/ls3b_780e_1way.dts | 13 ++
.../mips/boot/dts/loongson/ls3b_780e_2way.dts | 13 ++
arch/mips/include/asm/bootinfo.h | 1 -
arch/mips/include/asm/cop2.h | 2 +-
arch/mips/include/asm/cpu-type.h | 6 +-
arch/mips/include/asm/cpu.h | 4 +-
arch/mips/include/asm/hazards.h | 2 +-
arch/mips/include/asm/io.h | 2 +-
arch/mips/include/asm/irqflags.h | 2 +-
.../mach-loongson2ef/cpu-feature-overrides.h | 45 ++++
.../cs5536/cs5536.h | 0
.../cs5536/cs5536_mfgpt.h | 0
.../cs5536/cs5536_pci.h | 0
.../cs5536/cs5536_vsm.h | 0
.../loongson2ef.h} | 31 +--
.../machine.h | 6 -
.../mc146818rtc.h | 5 +-
.../mem.h | 6 +-
arch/mips/include/asm/mach-loongson2ef/pci.h | 43 ++++
.../include/asm/mach-loongson2ef/spaces.h | 10 +
.../asm/mach-loongson64/builtin_dtbs.h | 26 +++
.../mach-loongson64/cpu-feature-overrides.h | 3 -
arch/mips/include/asm/mach-loongson64/irq.h | 6 +-
.../asm/mach-loongson64/kernel-entry-init.h | 74 ------
.../include/asm/mach-loongson64/loongson64.h | 50 ++++
.../mips/include/asm/mach-loongson64/mmzone.h | 16 --
arch/mips/include/asm/mach-loongson64/pci.h | 41 +---
.../include/asm/mach-loongson64/workarounds.h | 4 +-
arch/mips/include/asm/module.h | 8 +-
arch/mips/include/asm/pgtable-bits.h | 2 +-
arch/mips/include/asm/processor.h | 2 +-
arch/mips/include/asm/r4kcache.h | 4 +-
arch/mips/kernel/cpu-probe.c | 14 +-
arch/mips/kernel/idle.c | 2 +-
arch/mips/kernel/perf_event_mipsxx.c | 4 +-
arch/mips/kernel/setup.c | 2 +-
arch/mips/kernel/traps.c | 2 +-
arch/mips/lib/csum_partial.S | 4 +-
arch/mips/loongson2ef/Kconfig | 93 ++++++++
arch/mips/loongson2ef/Makefile | 18 ++
arch/mips/loongson2ef/Platform | 32 +++
.../common/Makefile | 0
.../common/bonito-irq.c | 2 +-
.../common/cmdline.c | 2 +-
.../common/cs5536/Makefile | 0
.../common/cs5536/cs5536_acc.c | 0
.../common/cs5536/cs5536_ehci.c | 0
.../common/cs5536/cs5536_ide.c | 0
.../common/cs5536/cs5536_isa.c | 0
.../common/cs5536/cs5536_mfgpt.c | 0
.../common/cs5536/cs5536_ohci.c | 0
.../common/cs5536/cs5536_pci.c | 0
.../common/early_printk.c | 2 +-
arch/mips/loongson2ef/common/env.c | 71 ++++++
.../{loongson64 => loongson2ef}/common/init.c | 7 +-
.../{loongson64 => loongson2ef}/common/irq.c | 2 +-
.../common/machtype.c | 3 +-
.../{loongson64 => loongson2ef}/common/mem.c | 40 +---
.../{loongson64 => loongson2ef}/common/pci.c | 11 +-
.../common/platform.c | 0
.../{loongson64 => loongson2ef}/common/pm.c | 2 +-
.../common/reset.c | 23 +-
.../{loongson64 => loongson2ef}/common/rtc.c | 0
.../common/serial.c | 37 +--
.../common/setup.c | 2 +-
.../{loongson64 => loongson2ef}/common/time.c | 2 +-
.../common/uart_base.c | 10 +-
.../fuloong-2e/Makefile | 0
.../fuloong-2e/dma.c | 0
.../fuloong-2e/irq.c | 2 +-
.../fuloong-2e/reset.c | 2 +-
.../lemote-2f/Makefile | 0
.../lemote-2f/clock.c | 2 +-
.../lemote-2f/dma.c | 0
.../lemote-2f/ec_kb3310b.c | 0
.../lemote-2f/ec_kb3310b.h | 0
.../lemote-2f/irq.c | 2 +-
.../lemote-2f/machtype.c | 2 +-
.../lemote-2f/pm.c | 2 +-
.../lemote-2f/reset.c | 2 +-
arch/mips/loongson64/Kconfig | 126 +---------
arch/mips/loongson64/Makefile | 23 +-
arch/mips/loongson64/Platform | 36 +--
.../loongson64/{loongson-3 => }/acpi_init.c | 3 +-
.../loongson64/{loongson-3 => }/cop2-ex.c | 5 +-
arch/mips/loongson64/{loongson-3 => }/dma.c | 6 +-
arch/mips/loongson64/{common => }/env.c | 139 ++++++-----
arch/mips/loongson64/{loongson-3 => }/hpet.c | 0
arch/mips/loongson64/irq.c | 27 +++
arch/mips/loongson64/loongson-3/Makefile | 11 -
arch/mips/loongson64/loongson-3/irq.c | 158 -------------
arch/mips/loongson64/{loongson-3 => }/numa.c | 4 +-
arch/mips/loongson64/pci.c | 45 ++++
.../loongson64/{loongson-3 => }/platform.c | 0
arch/mips/loongson64/reset.c | 58 +++++
arch/mips/loongson64/setup.c | 107 +++++++++
arch/mips/loongson64/{loongson-3 => }/smp.c | 28 +--
arch/mips/loongson64/{loongson-3 => }/smp.h | 0
arch/mips/mm/c-r4k.c | 32 +--
arch/mips/mm/page.c | 2 +-
arch/mips/mm/tlb-r4k.c | 4 +-
arch/mips/mm/tlbex.c | 6 +-
arch/mips/oprofile/Makefile | 4 +-
arch/mips/oprofile/common.c | 4 +-
arch/mips/oprofile/op_model_loongson2.c | 2 +-
arch/mips/oprofile/op_model_loongson3.c | 2 +-
arch/mips/pci/Makefile | 2 +-
arch/mips/pci/fixup-fuloong2e.c | 2 +-
arch/mips/pci/fixup-lemote2f.c | 2 +-
arch/mips/pci/ops-loongson2.c | 2 +-
arch/mips/pci/ops-loongson3.c | 2 +-
drivers/cpufreq/loongson2_cpufreq.c | 2 +-
drivers/gpio/Kconfig | 2 +-
drivers/gpio/gpio-loongson.c | 4 +-
drivers/irqchip/Kconfig | 17 ++
drivers/irqchip/Makefile | 2 +
drivers/irqchip/irq-i8259.c | 47 +++-
drivers/irqchip/irq-ls3-htintc.c | 145 ++++++++++++
drivers/irqchip/irq-ls3-iointc.c | 216 ++++++++++++++++++
drivers/irqchip/irq-mips-cpu.c | 2 +-
drivers/platform/mips/cpu_hwmon.c | 2 +-
include/drm/drm_cache.h | 2 +-
148 files changed, 2064 insertions(+), 841 deletions(-)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,ls3-htintc.yaml
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,ls3-iointc.yaml
create mode 100644 Documentation/devicetree/bindings/mips/loongson/cpus.yaml
create mode 100644 Documentation/devicetree/bindings/mips/loongson/devices.yaml
create mode 100644 arch/mips/boot/dts/loongson/Makefile
create mode 100644 arch/mips/boot/dts/loongson/ls3-2nodes.dtsi
create mode 100644 arch/mips/boot/dts/loongson/ls3-4nodes.dtsi
create mode 100644 arch/mips/boot/dts/loongson/ls3-cpus.dtsi
create mode 100644 arch/mips/boot/dts/loongson/ls3-gs464.dtsi
create mode 100644 arch/mips/boot/dts/loongson/ls3-gs464e.dtsi
create mode 100644 arch/mips/boot/dts/loongson/ls3-rs780e-pch.dtsi
create mode 100644 arch/mips/boot/dts/loongson/ls3a-package.dtsi
create mode 100644 arch/mips/boot/dts/loongson/ls3a1000_780e_1way.dts
create mode 100644 arch/mips/boot/dts/loongson/ls3a1000_780e_2way.dts
create mode 100644 arch/mips/boot/dts/loongson/ls3a1000_780e_4way.dts
create mode 100644 arch/mips/boot/dts/loongson/ls3a2000_780e_1way.dts
create mode 100644 arch/mips/boot/dts/loongson/ls3a2000_780e_2way.dts
create mode 100644 arch/mips/boot/dts/loongson/ls3a2000_780e_4way.dts
create mode 100644 arch/mips/boot/dts/loongson/ls3a3000_780e_1way.dts
create mode 100644 arch/mips/boot/dts/loongson/ls3a3000_780e_2way.dts
create mode 100644 arch/mips/boot/dts/loongson/ls3a3000_780e_4way.dts
create mode 100644 arch/mips/boot/dts/loongson/ls3b-package.dtsi
create mode 100644 arch/mips/boot/dts/loongson/ls3b_780e_1way.dts
create mode 100644 arch/mips/boot/dts/loongson/ls3b_780e_2way.dts
create mode 100644 arch/mips/include/asm/mach-loongson2ef/cpu-feature-overrides.h
rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/cs5536/cs5536.h (100%)
rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/cs5536/cs5536_mfgpt.h (100%)
rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/cs5536/cs5536_pci.h (100%)
rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/cs5536/cs5536_vsm.h (100%)
rename arch/mips/include/asm/{mach-loongson64/loongson.h => mach-loongson2ef/loongson2ef.h} (91%)
rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/machine.h (80%)
rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/mc146818rtc.h (80%)
rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/mem.h (86%)
create mode 100644 arch/mips/include/asm/mach-loongson2ef/pci.h
create mode 100644 arch/mips/include/asm/mach-loongson2ef/spaces.h
create mode 100644 arch/mips/include/asm/mach-loongson64/builtin_dtbs.h
delete mode 100644 arch/mips/include/asm/mach-loongson64/kernel-entry-init.h
create mode 100644 arch/mips/include/asm/mach-loongson64/loongson64.h
create mode 100644 arch/mips/loongson2ef/Kconfig
create mode 100644 arch/mips/loongson2ef/Makefile
create mode 100644 arch/mips/loongson2ef/Platform
rename arch/mips/{loongson64 => loongson2ef}/common/Makefile (100%)
rename arch/mips/{loongson64 => loongson2ef}/common/bonito-irq.c (97%)
rename arch/mips/{loongson64 => loongson2ef}/common/cmdline.c (97%)
rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/Makefile (100%)
rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_acc.c (100%)
rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_ehci.c (100%)
rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_ide.c (100%)
rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_isa.c (100%)
rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_mfgpt.c (100%)
rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_ohci.c (100%)
rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_pci.c (100%)
rename arch/mips/{loongson64 => loongson2ef}/common/early_printk.c (97%)
create mode 100644 arch/mips/loongson2ef/common/env.c
rename arch/mips/{loongson64 => loongson2ef}/common/init.c (90%)
rename arch/mips/{loongson64 => loongson2ef}/common/irq.c (98%)
rename arch/mips/{loongson64 => loongson2ef}/common/machtype.c (94%)
rename arch/mips/{loongson64 => loongson2ef}/common/mem.c (72%)
rename arch/mips/{loongson64 => loongson2ef}/common/pci.c (89%)
rename arch/mips/{loongson64 => loongson2ef}/common/platform.c (100%)
rename arch/mips/{loongson64 => loongson2ef}/common/pm.c (99%)
rename arch/mips/{loongson64 => loongson2ef}/common/reset.c (77%)
rename arch/mips/{loongson64 => loongson2ef}/common/rtc.c (100%)
rename arch/mips/{loongson64 => loongson2ef}/common/serial.c (63%)
rename arch/mips/{loongson64 => loongson2ef}/common/setup.c (97%)
rename arch/mips/{loongson64 => loongson2ef}/common/time.c (96%)
rename arch/mips/{loongson64 => loongson2ef}/common/uart_base.c (77%)
rename arch/mips/{loongson64 => loongson2ef}/fuloong-2e/Makefile (100%)
rename arch/mips/{loongson64 => loongson2ef}/fuloong-2e/dma.c (100%)
rename arch/mips/{loongson64 => loongson2ef}/fuloong-2e/irq.c (98%)
rename arch/mips/{loongson64 => loongson2ef}/fuloong-2e/reset.c (93%)
rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/Makefile (100%)
rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/clock.c (98%)
rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/dma.c (100%)
rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/ec_kb3310b.c (100%)
rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/ec_kb3310b.h (100%)
rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/irq.c (99%)
rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/machtype.c (98%)
rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/pm.c (99%)
rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/reset.c (99%)
rename arch/mips/loongson64/{loongson-3 => }/acpi_init.c (99%)
rename arch/mips/loongson64/{loongson-3 => }/cop2-ex.c (88%)
rename arch/mips/loongson64/{loongson-3 => }/dma.c (82%)
rename arch/mips/loongson64/{common => }/env.c (77%)
rename arch/mips/loongson64/{loongson-3 => }/hpet.c (100%)
create mode 100644 arch/mips/loongson64/irq.c
delete mode 100644 arch/mips/loongson64/loongson-3/Makefile
delete mode 100644 arch/mips/loongson64/loongson-3/irq.c
rename arch/mips/loongson64/{loongson-3 => }/numa.c (98%)
create mode 100644 arch/mips/loongson64/pci.c
rename arch/mips/loongson64/{loongson-3 => }/platform.c (100%)
create mode 100644 arch/mips/loongson64/reset.c
create mode 100644 arch/mips/loongson64/setup.c
rename arch/mips/loongson64/{loongson-3 => }/smp.c (98%)
rename arch/mips/loongson64/{loongson-3 => }/smp.h (100%)
create mode 100644 drivers/irqchip/irq-ls3-htintc.c
create mode 100644 drivers/irqchip/irq-ls3-iointc.c
On 2019/8/27 下午9:25, 陈华才 wrote: > Hi, Jiaxun, Hi Huacai Thanks for your response. > > 1, To describe CPU I prefer "loongson" to "ls" because "ls" is confusing, and in future we will use ls2h/ls7a to describe Loongson's bridge. "Loongson" seems too long in some cases, for DeviceTree Bindings, it will also delicate with vendor String. As you can see on Loongson's official website [http://loongson.cn/product/cpu/3/3A3000.html], "LS3A3000" had been written on the chip as the model name. In my opinion, "ls3" is a proper abbreviation of Loongson-3 processors. But it's fine for me to convert "ls" to "loongson" if all people agree with this. Btw: I don't think it's a good idea to bring Loongson-2H PCH support to mainline, as we can see the vendor code have a lot of dirty hacks that are totally unacceptable to us. > 2, I think it is better to use loongson64c/loongson64g than loongson2ef/loongson64. As we disscussed, we will use PRID_IMP_LOONGSON_64C/PRID_IMP_LOONGSON_64G to describe 0x6300/0xc000. Our discussion was limited on PRID. However, Early Loongson-3A/B processors is sharing the same PRID_IMP with Loongson-2E/F. It may lead to confusion if we're using the same way to express totally different contents. Notice me if any one have better idea on how to express loongson2ef family machines. -- Jiaxun Yang > Huacai > > > > ------------------ Original ------------------ > From: "Jiaxun Yang"<jiaxun.yang@flygoat.com>;Date: Tue, Aug 27, 2019 04:52 PMTo: "linux-mips"<linux-mips@vger.kernel.org>; Cc: "chenhc"<chenhc@lemote.com>; "paul.burton"<paul.burton@mips.com>; "tglx"<tglx@linutronix.de>; "jason"<jason@lakedaemon.net>; "maz"<maz@kernel.org>; "linux-kernel"<linux-kernel@vger.kernel.org>; "robh+dt"<robh+dt@kernel.org>; "mark.rutland"<mark.rutland@arm.co>; "devicetree"<devicetree@vger.kernel.org>; "Jiaxun Yang"<jiaxun.yang@flygoat.com>; Subject: [PATCH 00/13] Modernize Loongson64 Machine Loongson have a long history of contributing their code to mainline kernel. > However, it seems like recent years, they are focusing on maintain a kernel by themselves > rather than contribute there code to the community. > > Kernel is progress rapidly too. Their code slept in mainline for a long peroid without proper > maintainance and became outdated. > > This patchset brings modern DeviceTree and irqchip support to the Loongson64 machine, and leaves > Loongson 2e/f alone since they are too legacy to touch. > > > Jiaxun Yang (13): > MIPS: Loongson64: Rename CPU TYPES > MIPS: Loongson64: Sepreate loongson2ef/loongson64 code > MAINTAINERS: Fix entries for new loongson64 path > irqchip: Add driver for Loongson-3 I/O interrupt controller > dt-bindings: interrupt-controller: Add Loongson-3 IOINTC > irqchip: Add driver for Loongson-3 HyperTransport interrupt controller > dt-bindings: interrupt-controller: Add Loongson-3 HTINTC > irqchip: i8259: Add plat-poll support > irqchip: mips-cpu: Convert to simple domain > MIPS: Loongson64: Drop legacy IRQ code > dt-bindings: mips: Add loongson cpus & boards > MIPS: Loongson64: Add generic dts > MIPS: Loongson64: Load built-in dtbs > > .../loongson,ls3-htintc.yaml | 53 +++++ > .../loongson,ls3-iointc.yaml | 61 +++++ > .../bindings/mips/loongson/cpus.yaml | 38 +++ > .../bindings/mips/loongson/devices.yaml | 64 ++++++ > MAINTAINERS | 9 +- > arch/mips/Kbuild.platforms | 1 + > arch/mips/Kconfig | 83 +++++-- > arch/mips/boot/dts/Makefile | 1 + > arch/mips/boot/dts/loongson/Makefile | 8 + > arch/mips/boot/dts/loongson/ls3-2nodes.dtsi | 8 + > arch/mips/boot/dts/loongson/ls3-4nodes.dtsi | 15 ++ > arch/mips/boot/dts/loongson/ls3-cpus.dtsi | 150 ++++++++++++ > arch/mips/boot/dts/loongson/ls3-gs464.dtsi | 18 ++ > arch/mips/boot/dts/loongson/ls3-gs464e.dtsi | 18 ++ > .../boot/dts/loongson/ls3-rs780e-pch.dtsi | 35 +++ > arch/mips/boot/dts/loongson/ls3a-package.dtsi | 59 +++++ > .../boot/dts/loongson/ls3a1000_780e_1way.dts | 12 + > .../boot/dts/loongson/ls3a1000_780e_2way.dts | 13 ++ > .../boot/dts/loongson/ls3a1000_780e_4way.dts | 13 ++ > .../boot/dts/loongson/ls3a2000_780e_1way.dts | 12 + > .../boot/dts/loongson/ls3a2000_780e_2way.dts | 13 ++ > .../boot/dts/loongson/ls3a2000_780e_4way.dts | 13 ++ > .../boot/dts/loongson/ls3a3000_780e_1way.dts | 12 + > .../boot/dts/loongson/ls3a3000_780e_2way.dts | 13 ++ > .../boot/dts/loongson/ls3a3000_780e_4way.dts | 13 ++ > arch/mips/boot/dts/loongson/ls3b-package.dtsi | 59 +++++ > .../mips/boot/dts/loongson/ls3b_780e_1way.dts | 13 ++ > .../mips/boot/dts/loongson/ls3b_780e_2way.dts | 13 ++ > arch/mips/include/asm/bootinfo.h | 1 - > arch/mips/include/asm/cop2.h | 2 +- > arch/mips/include/asm/cpu-type.h | 6 +- > arch/mips/include/asm/cpu.h | 4 +- > arch/mips/include/asm/hazards.h | 2 +- > arch/mips/include/asm/io.h | 2 +- > arch/mips/include/asm/irqflags.h | 2 +- > .../mach-loongson2ef/cpu-feature-overrides.h | 45 ++++ > .../cs5536/cs5536.h | 0 > .../cs5536/cs5536_mfgpt.h | 0 > .../cs5536/cs5536_pci.h | 0 > .../cs5536/cs5536_vsm.h | 0 > .../loongson2ef.h} | 31 +-- > .../machine.h | 6 - > .../mc146818rtc.h | 5 +- > .../mem.h | 6 +- > arch/mips/include/asm/mach-loongson2ef/pci.h | 43 ++++ > .../include/asm/mach-loongson2ef/spaces.h | 10 + > .../asm/mach-loongson64/builtin_dtbs.h | 26 +++ > .../mach-loongson64/cpu-feature-overrides.h | 3 - > arch/mips/include/asm/mach-loongson64/irq.h | 6 +- > .../asm/mach-loongson64/kernel-entry-init.h | 74 ------ > .../include/asm/mach-loongson64/loongson64.h | 50 ++++ > .../mips/include/asm/mach-loongson64/mmzone.h | 16 -- > arch/mips/include/asm/mach-loongson64/pci.h | 41 +--- > .../include/asm/mach-loongson64/workarounds.h | 4 +- > arch/mips/include/asm/module.h | 8 +- > arch/mips/include/asm/pgtable-bits.h | 2 +- > arch/mips/include/asm/processor.h | 2 +- > arch/mips/include/asm/r4kcache.h | 4 +- > arch/mips/kernel/cpu-probe.c | 14 +- > arch/mips/kernel/idle.c | 2 +- > arch/mips/kernel/perf_event_mipsxx.c | 4 +- > arch/mips/kernel/setup.c | 2 +- > arch/mips/kernel/traps.c | 2 +- > arch/mips/lib/csum_partial.S | 4 +- > arch/mips/loongson2ef/Kconfig | 93 ++++++++ > arch/mips/loongson2ef/Makefile | 18 ++ > arch/mips/loongson2ef/Platform | 32 +++ > .../common/Makefile | 0 > .../common/bonito-irq.c | 2 +- > .../common/cmdline.c | 2 +- > .../common/cs5536/Makefile | 0 > .../common/cs5536/cs5536_acc.c | 0 > .../common/cs5536/cs5536_ehci.c | 0 > .../common/cs5536/cs5536_ide.c | 0 > .../common/cs5536/cs5536_isa.c | 0 > .../common/cs5536/cs5536_mfgpt.c | 0 > .../common/cs5536/cs5536_ohci.c | 0 > .../common/cs5536/cs5536_pci.c | 0 > .../common/early_printk.c | 2 +- > arch/mips/loongson2ef/common/env.c | 71 ++++++ > .../{loongson64 => loongson2ef}/common/init.c | 7 +- > .../{loongson64 => loongson2ef}/common/irq.c | 2 +- > .../common/machtype.c | 3 +- > .../{loongson64 => loongson2ef}/common/mem.c | 40 +--- > .../{loongson64 => loongson2ef}/common/pci.c | 11 +- > .../common/platform.c | 0 > .../{loongson64 => loongson2ef}/common/pm.c | 2 +- > .../common/reset.c | 23 +- > .../{loongson64 => loongson2ef}/common/rtc.c | 0 > .../common/serial.c | 37 +-- > .../common/setup.c | 2 +- > .../{loongson64 => loongson2ef}/common/time.c | 2 +- > .../common/uart_base.c | 10 +- > .../fuloong-2e/Makefile | 0 > .../fuloong-2e/dma.c | 0 > .../fuloong-2e/irq.c | 2 +- > .../fuloong-2e/reset.c | 2 +- > .../lemote-2f/Makefile | 0 > .../lemote-2f/clock.c | 2 +- > .../lemote-2f/dma.c | 0 > .../lemote-2f/ec_kb3310b.c | 0 > .../lemote-2f/ec_kb3310b.h | 0 > .../lemote-2f/irq.c | 2 +- > .../lemote-2f/machtype.c | 2 +- > .../lemote-2f/pm.c | 2 +- > .../lemote-2f/reset.c | 2 +- > arch/mips/loongson64/Kconfig | 126 +--------- > arch/mips/loongson64/Makefile | 23 +- > arch/mips/loongson64/Platform | 36 +-- > .../loongson64/{loongson-3 => }/acpi_init.c | 3 +- > .../loongson64/{loongson-3 => }/cop2-ex.c | 5 +- > arch/mips/loongson64/{loongson-3 => }/dma.c | 6 +- > arch/mips/loongson64/{common => }/env.c | 139 ++++++----- > arch/mips/loongson64/{loongson-3 => }/hpet.c | 0 > arch/mips/loongson64/irq.c | 27 +++ > arch/mips/loongson64/loongson-3/Makefile | 11 - > arch/mips/loongson64/loongson-3/irq.c | 158 ------------- > arch/mips/loongson64/{loongson-3 => }/numa.c | 4 +- > arch/mips/loongson64/pci.c | 45 ++++ > .../loongson64/{loongson-3 => }/platform.c | 0 > arch/mips/loongson64/reset.c | 58 +++++ > arch/mips/loongson64/setup.c | 107 +++++++++ > arch/mips/loongson64/{loongson-3 => }/smp.c | 28 +-- > arch/mips/loongson64/{loongson-3 => }/smp.h | 0 > arch/mips/mm/c-r4k.c | 32 +-- > arch/mips/mm/page.c | 2 +- > arch/mips/mm/tlb-r4k.c | 4 +- > arch/mips/mm/tlbex.c | 6 +- > arch/mips/oprofile/Makefile | 4 +- > arch/mips/oprofile/common.c | 4 +- > arch/mips/oprofile/op_model_loongson2.c | 2 +- > arch/mips/oprofile/op_model_loongson3.c | 2 +- > arch/mips/pci/Makefile | 2 +- > arch/mips/pci/fixup-fuloong2e.c | 2 +- > arch/mips/pci/fixup-lemote2f.c | 2 +- > arch/mips/pci/ops-loongson2.c | 2 +- > arch/mips/pci/ops-loongson3.c | 2 +- > drivers/cpufreq/loongson2_cpufreq.c | 2 +- > drivers/gpio/Kconfig | 2 +- > drivers/gpio/gpio-loongson.c | 4 +- > drivers/irqchip/Kconfig | 17 ++ > drivers/irqchip/Makefile | 2 + > drivers/irqchip/irq-i8259.c | 47 +++- > drivers/irqchip/irq-ls3-htintc.c | 145 ++++++++++++ > drivers/irqchip/irq-ls3-iointc.c | 216 ++++++++++++++++++ > drivers/irqchip/irq-mips-cpu.c | 2 +- > drivers/platform/mips/cpu_hwmon.c | 2 +- > include/drm/drm_cache.h | 2 +- > 148 files changed, 2064 insertions(+), 841 deletions(-) > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,ls3-htintc.yaml > create mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,ls3-iointc.yaml > create mode 100644 Documentation/devicetree/bindings/mips/loongson/cpus.yaml > create mode 100644 Documentation/devicetree/bindings/mips/loongson/devices.yaml > create mode 100644 arch/mips/boot/dts/loongson/Makefile > create mode 100644 arch/mips/boot/dts/loongson/ls3-2nodes.dtsi > create mode 100644 arch/mips/boot/dts/loongson/ls3-4nodes.dtsi > create mode 100644 arch/mips/boot/dts/loongson/ls3-cpus.dtsi > create mode 100644 arch/mips/boot/dts/loongson/ls3-gs464.dtsi > create mode 100644 arch/mips/boot/dts/loongson/ls3-gs464e.dtsi > create mode 100644 arch/mips/boot/dts/loongson/ls3-rs780e-pch.dtsi > create mode 100644 arch/mips/boot/dts/loongson/ls3a-package.dtsi > create mode 100644 arch/mips/boot/dts/loongson/ls3a1000_780e_1way.dts > create mode 100644 arch/mips/boot/dts/loongson/ls3a1000_780e_2way.dts > create mode 100644 arch/mips/boot/dts/loongson/ls3a1000_780e_4way.dts > create mode 100644 arch/mips/boot/dts/loongson/ls3a2000_780e_1way.dts > create mode 100644 arch/mips/boot/dts/loongson/ls3a2000_780e_2way.dts > create mode 100644 arch/mips/boot/dts/loongson/ls3a2000_780e_4way.dts > create mode 100644 arch/mips/boot/dts/loongson/ls3a3000_780e_1way.dts > create mode 100644 arch/mips/boot/dts/loongson/ls3a3000_780e_2way.dts > create mode 100644 arch/mips/boot/dts/loongson/ls3a3000_780e_4way.dts > create mode 100644 arch/mips/boot/dts/loongson/ls3b-package.dtsi > create mode 100644 arch/mips/boot/dts/loongson/ls3b_780e_1way.dts > create mode 100644 arch/mips/boot/dts/loongson/ls3b_780e_2way.dts > create mode 100644 arch/mips/include/asm/mach-loongson2ef/cpu-feature-overrides.h > rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/cs5536/cs5536.h (100%) > rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/cs5536/cs5536_mfgpt.h (100%) > rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/cs5536/cs5536_pci.h (100%) > rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/cs5536/cs5536_vsm.h (100%) > rename arch/mips/include/asm/{mach-loongson64/loongson.h => mach-loongson2ef/loongson2ef.h} (91%) > rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/machine.h (80%) > rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/mc146818rtc.h (80%) > rename arch/mips/include/asm/{mach-loongson64 => mach-loongson2ef}/mem.h (86%) > create mode 100644 arch/mips/include/asm/mach-loongson2ef/pci.h > create mode 100644 arch/mips/include/asm/mach-loongson2ef/spaces.h > create mode 100644 arch/mips/include/asm/mach-loongson64/builtin_dtbs.h > delete mode 100644 arch/mips/include/asm/mach-loongson64/kernel-entry-init.h > create mode 100644 arch/mips/include/asm/mach-loongson64/loongson64.h > create mode 100644 arch/mips/loongson2ef/Kconfig > create mode 100644 arch/mips/loongson2ef/Makefile > create mode 100644 arch/mips/loongson2ef/Platform > rename arch/mips/{loongson64 => loongson2ef}/common/Makefile (100%) > rename arch/mips/{loongson64 => loongson2ef}/common/bonito-irq.c (97%) > rename arch/mips/{loongson64 => loongson2ef}/common/cmdline.c (97%) > rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/Makefile (100%) > rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_acc.c (100%) > rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_ehci.c (100%) > rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_ide.c (100%) > rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_isa.c (100%) > rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_mfgpt.c (100%) > rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_ohci.c (100%) > rename arch/mips/{loongson64 => loongson2ef}/common/cs5536/cs5536_pci.c (100%) > rename arch/mips/{loongson64 => loongson2ef}/common/early_printk.c (97%) > create mode 100644 arch/mips/loongson2ef/common/env.c > rename arch/mips/{loongson64 => loongson2ef}/common/init.c (90%) > rename arch/mips/{loongson64 => loongson2ef}/common/irq.c (98%) > rename arch/mips/{loongson64 => loongson2ef}/common/machtype.c (94%) > rename arch/mips/{loongson64 => loongson2ef}/common/mem.c (72%) > rename arch/mips/{loongson64 => loongson2ef}/common/pci.c (89%) > rename arch/mips/{loongson64 => loongson2ef}/common/platform.c (100%) > rename arch/mips/{loongson64 => loongson2ef}/common/pm.c (99%) > rename arch/mips/{loongson64 => loongson2ef}/common/reset.c (77%) > rename arch/mips/{loongson64 => loongson2ef}/common/rtc.c (100%) > rename arch/mips/{loongson64 => loongson2ef}/common/serial.c (63%) > rename arch/mips/{loongson64 => loongson2ef}/common/setup.c (97%) > rename arch/mips/{loongson64 => loongson2ef}/common/time.c (96%) > rename arch/mips/{loongson64 => loongson2ef}/common/uart_base.c (77%) > rename arch/mips/{loongson64 => loongson2ef}/fuloong-2e/Makefile (100%) > rename arch/mips/{loongson64 => loongson2ef}/fuloong-2e/dma.c (100%) > rename arch/mips/{loongson64 => loongson2ef}/fuloong-2e/irq.c (98%) > rename arch/mips/{loongson64 => loongson2ef}/fuloong-2e/reset.c (93%) > rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/Makefile (100%) > rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/clock.c (98%) > rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/dma.c (100%) > rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/ec_kb3310b.c (100%) > rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/ec_kb3310b.h (100%) > rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/irq.c (99%) > rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/machtype.c (98%) > rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/pm.c (99%) > rename arch/mips/{loongson64 => loongson2ef}/lemote-2f/reset.c (99%) > rename arch/mips/loongson64/{loongson-3 => }/acpi_init.c (99%) > rename arch/mips/loongson64/{loongson-3 => }/cop2-ex.c (88%) > rename arch/mips/loongson64/{loongson-3 => }/dma.c (82%) > rename arch/mips/loongson64/{common => }/env.c (77%) > rename arch/mips/loongson64/{loongson-3 => }/hpet.c (100%) > create mode 100644 arch/mips/loongson64/irq.c > delete mode 100644 arch/mips/loongson64/loongson-3/Makefile > delete mode 100644 arch/mips/loongson64/loongson-3/irq.c > rename arch/mips/loongson64/{loongson-3 => }/numa.c (98%) > create mode 100644 arch/mips/loongson64/pci.c > rename arch/mips/loongson64/{loongson-3 => }/platform.c (100%) > create mode 100644 arch/mips/loongson64/reset.c > create mode 100644 arch/mips/loongson64/setup.c > rename arch/mips/loongson64/{loongson-3 => }/smp.c (98%) > rename arch/mips/loongson64/{loongson-3 => }/smp.h (100%) > create mode 100644 drivers/irqchip/irq-ls3-htintc.c > create mode 100644 drivers/irqchip/irq-ls3-iointc.c >
On Tue, Aug 27, 2019 at 1:53 AM Jiaxun Yang <jiaxun.yang@flygoat.com> wrote: > Loongson have a long history of contributing their code to mainline kernel. > However, it seems like recent years, they are focusing on maintain a kernel by themselves > rather than contribute there code to the community. Do you know more about this? I have a Loongson 3A3000 system that I have never been able to make stable. I tried pulling patches out of the glibc, binutils, gcc, and Linux repos I found at https://github.com/loongson-community but my system still hardlocks, preventing me from doing much of anything with it. Do we know why critical looking toolchain patches like "Added misses sync in mips_process_sync_loop for add sync before ll sc" [0] and "Fix loads for Loongson3 to promoting stability" [1] have not been submitted upstream? I'm interested in supporting Loongson 3 in Gentoo, and the hardware that has been given to me would be extremely useful for Gentoo's MIPS port in general, but it's just not usable at all currently. [0] https://github.com/loongson-community/gcc/commit/e7e3b0f956929f022caa01ed25a482495b11d575 [1] https://github.com/loongson-community/binutils-gdb/commit/2f0e91d2af6093097202fae3adab624ffa86a156
14:30, 2019年9月12日, Matt Turner <mattst88@gmail.com>: On Tue, Aug 27, 2019 at 1:53 AM Jiaxun Yang <jiaxun.yang@flygoat.com <mailto:jiaxun.yang@flygoat.com>> wrote: Loongson have a long history of contributing their code to mainline kernel. However, it seems like recent years, they are focusing on maintain a kernel by themselves rather than contribute there code to the community. Hi Matt: Do you know more about this? I have a Loongson 3A3000 system that I have never been able to make stable. I tried pulling patches out of the glibc, binutils, gcc, and Linux repos I found at https://github.com/loongson-community but my system still hardlocks, What's the behaviour of hardlock? Kernel RCU stall? Or simply no response? preventing me from doing much of anything with it. Do we know why critical looking toolchain patches like "Added misses sync in mips_process_sync_loop for add sync before ll sc" [0] and "Fix LLSC fixes have been mainlined in latest binutils. And GCC-9.1 have introduced march=gs464e for 3A3000. loads for Loongson3 to promoting stability" [1] have not been submitted upstream? Load issue only influence specified revisions of Loongson-3A2000, your hardware shouldn't have that problem. I'm interested in supporting Loongson 3 in Gentoo, and the hardware that has been given to me would be extremely useful for Gentoo's MIPS port in general, but it's just not usable at all currently. You can try Fedora 28 maintained by Lemote which have been verified in production environment for a period [http://mirror.lemote.com:8000/fedora/fedora28-live/] if the hardware is still unstable, then it might be a memory stability issue. You can try to clean your DIMM solt and DDR golden finger, or even swap the memory module. Btw: Xuerui Wang <wangxuerui@qiniu.com> had maintained his 3A3000 Gentoo port [https://github.com/xen0n/loongson-overlay] for a long time. I'll Cc him this email and probability he can give you further assistance. Thanks. [0] https://github.com/longson-community/gcc/commit/e7e3b0f956929f022caa01ed25a482495b11d575 <https://github.com/loongson-community/gcc/commit/e7e3b0f956929f022caa01ed25a482495b11d575> [1] https://github.com/loongson-community/binutils-gdb/commit/2f0e91d2af6093097202fae3adab624ffa86a156
Loongson have a long history of contributing their code to mainline kernel. However, it seems like recent years, they are focusing on maintain a kernel by themselves rather than contribute there code to the community. Kernel is progress rapidly too. Their code slept in mainline for a long peroid without proper maintainance and became outdated. This patchset brings modern DeviceTree and irqchip support to the Loongson64 machine, and leaves Loongson 2e/f alone since they are too legacy to touch. PCI and some legacy I/O device will be converted later, together with LS7A PCH support. v1: - dt-bindings fixup according to Rob's comments - irqchip fixup according to Marc's comments - ls3-iointc: Make Core&IP map per-IRQ - Regenerate kconfigs - Typo & style improvements v2: - dt-bindings: Fix IOINTC, collect Rob's review tag - dtbs: Drop CPU Node, merge different ways according to Huacai and Paul's comments v3: - Split code have been merged - Fix IOINTC binding to allow map any child IRQ to and parent - Convert "HTINTC" into "HTPIC", which mixed HT vectors processing and i8259 - Naming style fix according to Huacai's suggestions v4: - More naming related fixes v5: - irqchip fixes thanks to maz (see per file changelog) - Remove unnecessary details in dt-bindings - Credit Huacai with Co-developed-by v6: - HTPIC minor fix - device binding naming fix v7: - Add Huacai's sign-off - Fix all reasonable checkpatch warnings Jiaxun Yang (12): irqchip: Add driver for Loongson I/O Local Interrupt Controller irqchip: loongson-liointc: Workaround LPC IRQ Errata dt-bindings: interrupt-controller: Add Loongson LIOINTC irqchip: Add driver for Loongson-3 HyperTransport PIC controller dt-bindings: interrupt-controller: Add Loongson-3 HTPIC irqchip: mips-cpu: Convert to simple domain MIPS: Loongson64: Drop legacy IRQ code dt-bindings: mips: Add loongson boards MIPS: Loongson64: Add generic dts MIPS: Loongson64: Load built-in dtbs MIPS: Loongson64: Move MIPS_CPU_IRQ_BASE MAINTAINERS: Update Loongson64 entry .../interrupt-controller/loongson,htpic.yaml | 59 ++++ .../loongson,liointc.yaml | 93 ++++++ .../bindings/mips/loongson/devices.yaml | 27 ++ MAINTAINERS | 1 + arch/mips/Kconfig | 6 +- arch/mips/boot/dts/Makefile | 1 + arch/mips/boot/dts/loongson/Makefile | 4 + .../boot/dts/loongson/loongson3-package.dtsi | 64 +++++ .../dts/loongson/loongson3_4core_rs780e.dts | 25 ++ .../dts/loongson/loongson3_8core_rs780e.dts | 25 ++ arch/mips/boot/dts/loongson/rs780e-pch.dtsi | 26 ++ arch/mips/include/asm/i8259.h | 1 + .../include/asm/mach-loongson64/boot_param.h | 2 + .../asm/mach-loongson64/builtin_dtbs.h | 13 + arch/mips/include/asm/mach-loongson64/irq.h | 32 +-- .../include/asm/mach-loongson64/loongson.h | 1 + arch/mips/loongson64/Makefile | 2 +- arch/mips/loongson64/env.c | 23 ++ arch/mips/loongson64/init.c | 6 + arch/mips/loongson64/irq.c | 162 ----------- arch/mips/loongson64/setup.c | 16 ++ arch/mips/loongson64/smp.c | 28 +- drivers/irqchip/Kconfig | 19 ++ drivers/irqchip/Makefile | 2 + drivers/irqchip/irq-loongson-htpic.c | 149 ++++++++++ drivers/irqchip/irq-loongson-liointc.c | 270 ++++++++++++++++++ drivers/irqchip/irq-mips-cpu.c | 2 +- 27 files changed, 846 insertions(+), 213 deletions(-) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,htpic.yaml create mode 100644 Documentation/devicetree/bindings/interrupt-controller/loongson,liointc.yaml create mode 100644 Documentation/devicetree/bindings/mips/loongson/devices.yaml create mode 100644 arch/mips/boot/dts/loongson/Makefile create mode 100644 arch/mips/boot/dts/loongson/loongson3-package.dtsi create mode 100644 arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dts create mode 100644 arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dts create mode 100644 arch/mips/boot/dts/loongson/rs780e-pch.dtsi create mode 100644 arch/mips/include/asm/mach-loongson64/builtin_dtbs.h delete mode 100644 arch/mips/loongson64/irq.c create mode 100644 drivers/irqchip/irq-loongson-htpic.c create mode 100644 drivers/irqchip/irq-loongson-liointc.c