Add MIPS64R2 core support.
PATCH 1/1 Add MIPS64R2 core support.
From: "Steven J. Hill" <[email protected]>
--- arch/mips/Kconfig | 29 +++++++++++++++++++++++------ arch/mips/include/asm/cpu.h | 2 +- arch/mips/kernel/cpu-probe.c | 4 ++++ arch/mips/kernel/traps.c | 1 + 4 files changed, 29 insertions(+), 7 deletions(-)
arch/mips/Kconfig +23 -6
@@ -282,6 +282,7 @@ config MIPS_MALTA select SYS_HAS_CPU_MIPS32_R1 select SYS_HAS_CPU_MIPS32_R2 select SYS_HAS_CPU_MIPS64_R1 + select SYS_HAS_CPU_MIPS64_R2 select SYS_HAS_CPU_NEVADA select SYS_HAS_CPU_RM7000 select SYS_HAS_EARLY_PRINTK
@@ -1761,6 +1762,22 @@ config 64BIT endchoice +config 64BIT_PHYS_ADDR + bool "Kernel supports 64 bit physical addresses" if EXPERIMENTAL + depends on 64BIT + help + Defines 64 bit physical addresses in kernel. + Increases page table sizes. + + It is an alternative for HIGHMEM usage of huge physical memory. + Requires 64bit capable CPU and 64 bit kernel code model. + + Note: without this option kernel can support up to 4GB physical + memory for 4KB pages and up to 64GB for 64KB pages. + +config ARCH_PHYS_ADDR_T_64BIT + def_bool 64BIT_PHYS_ADDR + choice prompt "Kernel page size" default PAGE_SIZE_4KB
@@ -2038,12 +2055,6 @@ config SB1_PASS_2_1_WORKAROUNDS depends on CPU_SB1 && CPU_SB1_PASS_2 default y -config 64BIT_PHYS_ADDR - bool - -config ARCH_PHYS_ADDR_T_64BIT - def_bool 64BIT_PHYS_ADDR - config CPU_HAS_SMARTMIPS depends on SYS_SUPPORTS_SMARTMIPS bool "Support for the SmartMIPS ASE"
@@ -2488,6 +2499,7 @@ config TRAD_SIGNALS config MIPS32_COMPAT bool "Kernel support for Linux/MIPS 32-bit binary compatibility" depends on 64BIT + default y if CPU_SUPPORTS_32BIT_KERNEL && SYS_SUPPORTS_32BIT_KERNEL help Select this option if you want Linux/MIPS 32-bit binary compatibility. Since all software available for Linux/MIPS is
@@ -2506,6 +2518,7 @@ config SYSVIPC_COMPAT config MIPS32_O32 bool "Kernel support for o32 binaries" depends on MIPS32_COMPAT + default y if CPU_SUPPORTS_32BIT_KERNEL && SYS_SUPPORTS_32BIT_KERNEL help Select this option if you want to run o32 binaries. These are pure 32-bit binaries as used by the 32-bit Linux/MIPS port. Most of
@@ -2524,6 +2537,10 @@ config MIPS32_N32 If unsure, say N. +comment "64bit kernel, but support of 32bit applications is disabled!" + depends on 64BIT && !MIPS32_O32 && !MIPS32_N32 + depends on CPU_SUPPORTS_32BIT_KERNEL && SYS_SUPPORTS_32BIT_KERNEL + config BINFMT_ELF32 bool default y if MIPS32_O32 || MIPS32_N32
arch/mips/include/asm/cpu.h +1 -1
@@ -268,7 +268,7 @@ enum cpu_type_enum {/* * MIPS64 class processors */ -CPU_5KC ,CPU_20KC ,CPU_25KF ,CPU_SB1 ,CPU_SB1A ,CPU_LOONGSON2 , +CPU_5KC ,CPU_5KE ,CPU_20KC ,CPU_25KF ,CPU_SB1 ,CPU_SB1A ,CPU_LOONGSON2 ,CPU_CAVIUM_OCTEON ,CPU_CAVIUM_OCTEON_PLUS ,CPU_CAVIUM_OCTEON2 , CPU_XLR, CPU_XLP,
arch/mips/kernel/cpu-probe.c +4 -0
@@ -821,6 +821,10 @@ static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu) c->cputype =CPU_5KC ; __cpu_name[cpu] ="MIPS 5Kc" ;break ; +case PRID_IMP_5KE : + c->cputype =CPU_5KE ; + __cpu_name[cpu] ="MIPS 5KE" ; +break ;case PRID_IMP_20KC : c->cputype =CPU_20KC ; __cpu_name[cpu] ="MIPS 20Kc" ;
arch/mips/kernel/traps.c +1 -0
@@ -1351,6 +1351,7 @@ static inline void parity_protection_init(void)break ;case CPU_5KC : +case CPU_5KE :write_c0_ecc (0x80000000 );back_to_back_c0_hazard ();/* Set the PE bit (bit 31) in the c0_errctl register. */
Signature · 1 line
1.7.9.6
Hello.
Quoted 24 lines · Steven J. Hill
From: "Steven J. Hill"<[email protected]>
Signed-off-by Leonid Yegoshin<[email protected]>Signed-off-by Steven J. Hill<[email protected]>--- arch/mips/Kconfig | 29 +++++++++++++++++++++++------ arch/mips/include/asm/cpu.h | 2 +- arch/mips/kernel/cpu-probe.c | 4 ++++ arch/mips/kernel/traps.c | 1 + 4 files changed, 29 insertions(+), 7 deletions(-)arch/mips/Kconfig +1
-0@@ -282,6 +282,7 @@ config MIPS_MALTA select SYS_HAS_CPU_MIPS32_R1 select SYS_HAS_CPU_MIPS32_R2 select SYS_HAS_CPU_MIPS64_R1 + select SYS_HAS_CPU_MIPS64_R2 select SYS_HAS_CPU_NEVADA select SYS_HAS_CPU_RM7000 select SYS_HAS_EARLY_PRINTK
arch/mips/Kconfig config 64BIT · line 1767
Quoted 6 lines
arch/mips/Kconfig +3
-0@@ -1761,6 +1762,22 @@ config 64BIT endchoice +config 64BIT_PHYS_ADDR + bool "Kernel supports 64 bit physical addresses" if EXPERIMENTAL + depends on 64BIT
This option is selected on 32-bit CPUs like Alchemy, which has 36-bit
physical address. It will cause a warning about unmet direct dependencies then.
arch/mips/Kconfig config 64BIT · line 1773
Quoted 6 lines
arch/mips/Kconfig +6
-0+ help + Defines 64 bit physical addresses in kernel. + Increases page table sizes. + + It is an alternative for HIGHMEM usage of huge physical memory. + Requires 64bit capable CPU and 64 bit kernel code model.
No, it really doesn't.
arch/mips/Kconfig config 64BIT · line 1783
Quoted 9 lines
arch/mips/Kconfig +6
-0+ Note: without this option kernel can support up to 4GB physical + memory for 4KB pages and up to 64GB for 64KB pages. + +config ARCH_PHYS_ADDR_T_64BIT + def_bool 64BIT_PHYS_ADDR + choice prompt "Kernel page size" default PAGE_SIZE_4KB
WBR, Sergei
Quoted 9 lines · Sergei Shtylyov
From: "Steven J. Hill"<[email protected]>
arch/mips/Kconfig config 64BIT · line 1767
Quoted 4 lines
arch/mips/Kconfig +3
-0+config 64BIT_PHYS_ADDR + bool "Kernel supports 64 bit physical addresses" if EXPERIMENTAL + depends on 64BITThis option is selected on 32-bit CPUs like Alchemy, which has
36-bit physical address. It will cause a warning about unmet
Just verified - selected Alchemy and DB1000 board and got
# CONFIG_64BIT is not setCONFIG_64BIT_PHYS_ADDR=yCONFIG_ARCH_PHYS_ADDR_T_64BIT=yCONFIG_PHYS_ADDR_T_64BIT=y
???
I also want to say that NetLogic Microsystems web site indicates that some of Alchemy CPU has only 14 bit DDR/SDRAM address, for exam - Au1550 (http://www.netlogicmicro.com/Products/Alchemy/Au1550.asp) but arch/mips/configs/db1550_defconfig (and pb1550) choses 64BIT_PHYS_ADDR too. Seems like something wrong here.
- Leonid.
Hello.
Quoted 7 lines · Leonid Yegoshin
Quoted 6 lines
arch/mips/Kconfig config 64BIT · line 1767
Quoted 3 lines
arch/mips/Kconfig +3
-0+config 64BIT_PHYS_ADDR + bool "Kernel supports 64 bit physical addresses" if EXPERIMENTAL + depends on 64BITThis option is selected on 32-bit CPUs like Alchemy, which has
36-bit physical address. It will cause a warning about unmet
Quoted 8 lines
Just verified - selected Alchemy and DB1000 board and got
#
CONFIG_64BITis not setCONFIG_64BIT_PHYS_ADDR=yCONFIG_ARCH_PHYS_ADDR_T_64BIT=yCONFIG_PHYS_ADDR_T_64BIT=y???
And you didn't get a warning on "select 64BIT_PHYS_ADDR"? Strange, modernKconfig should spit out one...
Quoted 1 line
I also want to say that NetLogic Microsystems web site indicates that some of Alchemy CPU has only 14 bit DDR/SDRAM address, for exam - Au1550 (http://www.netlogicmicro.com/Products/Alchemy/Au1550.asp) but
arch/mips/configs/db1550_defconfig(and pb1550) choses 64BIT_PHYS_ADDR too. Seems like something wrong here.
High address bits on Alchemies are used to address PCI/PCMCIA space, not RAM.
Quoted 1 line
- Leonid.
WBR, Sergei
Quoted 18 lines · Sergei Shtylyov
Hello.
Quoted 13 lines · Leonid Yegoshin
Quoted 6 lines
arch/mips/Kconfig config 64BIT · line 1767
Quoted 3 lines
arch/mips/Kconfig +3
-0+config 64BIT_PHYS_ADDR + bool "Kernel supports 64 bit physical addresses" if EXPERIMENTAL + depends on 64BITThis option is selected on 32-bit CPUs like Alchemy, which has
36-bit physical address. It will cause a warning about unmetJust verified - selected Alchemy and DB1000 board and got
#
CONFIG_64BITis not setCONFIG_64BIT_PHYS_ADDR=yCONFIG_ARCH_PHYS_ADDR_T_64BIT=yCONFIG_PHYS_ADDR_T_64BIT=y
Quoted 5 lines
Quoted 1 line
???
And you didn't get a warning on "select 64BIT_PHYS_ADDR"? Strange,
modernKconfigshould spit out one...
OK, you right, I missed it in bunch of another. It has sense to add a missed dependency.
- Leonid.
Hello.
Quoted 14 lines · Leonid Yegoshin
Quoted 13 lines
Quoted 13 lines
Quoted 6 lines
Quoted 3 lines
+config 64BIT_PHYS_ADDR
+ bool "Kernel supports 64 bit physical addresses" if EXPERIMENTAL
+ depends on 64BITThis option is selected on 32-bit CPUs like Alchemy, which has 36-bit physical address. It will cause a warning about unmet
Just verified - selected Alchemy and DB1000 board and got
#
CONFIG_64BITis not setCONFIG_64BIT_PHYS_ADDR=yCONFIG_ARCH_PHYS_ADDR_T_64BIT=yCONFIG_PHYS_ADDR_T_64BIT=y
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
???
And you didn't get a warning on "select 64BIT_PHYS_ADDR"? Strange, modern
Kconfigshould spit out one...OK, you right, I missed it in bunch of another. It has sense to add a missed dependency.
You mean to remove it? There's nothing you can add.
Quoted 1 line
- Leonid.
WBR, Sergei