Skip to contentSkip to conversation

Fix a CPU definition for Cobalt

PATCH Martin Michlmayr 2 participants 8 messages Jan 19, 2006 – Feb 17, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

[mips] Fix a CPU definition for Cobalt

If cpu_icache_snoops_remote_store is not set, Cobalt will crash immediately when starting the kernel.

include/asm-mips/mach-cobalt/cpu-feature-overrides.h renamed from include/asm-mips/mach-cobalt/cpu-feature-overrides.h~ +1 -1
@@ -45,7 +45,7 @@
 #define cpu_has_smartmips	0
 #define cpu_has_vtag_icache	0
 #define cpu_has_ic_fills_f_dc	0
-#define cpu_icache_snoops_remote_store	0
+#define cpu_icache_snoops_remote_store	1
 #define cpu_has_dsp		0
 
 #define cpu_has_mips32r1	0
Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#1 lore raw
Quoted 2 lines · Martin Michlmayr

If cpu_icache_snoops_remote_store is not set, Cobalt will crash immediately when starting the kernel.

That's papering over the actual bug. The CPU has no scache, so the scache flushing functions aren't getting initialized and the NULL pointer is eventually called as a function. So I suggest this below. Can you test it?

Ralf

arch/mips/mm/c-r4k.c +6 -2
index 422b55f..24a59a9 100644
@@ -235,7 +235,9 @@ static inline void r4k_blast_scache_page
 {
 	unsigned long sc_lsize = cpu_scache_line_size();
 
-	if (sc_lsize == 16)
+	if (scache_size == 0)
+		r4k_blast_scache_page = no_sc_noop;
+	else if (sc_lsize == 16)
 		r4k_blast_scache_page = blast_scache16_page;
 	else if (sc_lsize == 32)
 		r4k_blast_scache_page = blast_scache32_page;
@@ -251,7 +253,9 @@ static inline void r4k_blast_scache_page
 {
 	unsigned long sc_lsize = cpu_scache_line_size();
 
-	if (sc_lsize == 16)
+	if (scache_size == 0)
+		r4k_blast_scache_page = no_sc_noop;
+	else if (sc_lsize == 16)
 		r4k_blast_scache_page_indexed = blast_scache16_page_indexed;
 	else if (sc_lsize == 32)
 		r4k_blast_scache_page_indexed = blast_scache32_page_indexed;
#2 lore raw
Quoted 3 lines · Ralf Baechle
Quoted 2 lines

If cpu_icache_snoops_remote_store is not set, Cobalt will crash immediately when starting the kernel.

That's papering over the actual bug. The CPU has no scache, so the

Sorry, I just used trial and error to find out which option caused the problem and changed it...

Quoted 3 lines

scache flushing functions aren't getting initialized and the NULL pointer is eventually called as a function. So I suggest this below. Can you test it?

Doesn't work.

Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#3 lore raw
Quoted 5 lines · Martin Michlmayr
Quoted 3 lines · Ralf Baechle
Quoted 2 lines

If cpu_icache_snoops_remote_store is not set, Cobalt will crash immediately when starting the kernel.

That's papering over the actual bug. The CPU has no scache, so the

Quoted 8 lines

Sorry, I just used trial and error to find out which option caused the problem and changed it...

Quoted 3 lines

scache flushing functions aren't getting initialized and the NULL pointer is eventually called as a function. So I suggest this below. Can you test it?

Doesn't work.

Indeed - for quite obvioius reasons even. I hope I now covered all cases in the new patch below.

Ralf

arch/mips/Kconfig +5 -0
index 4ca93ff..d5b175b 100644
@@ -251,6 +251,7 @@ config LASAT
 	select MIPS_GT64120
 	select MIPS_NILE4
 	select R5000_CPU_SCACHE
+	select SERIO_I8042
 	select SYS_HAS_CPU_R5000
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
@@ -438,6 +439,7 @@ config MIPS_XXS1500
 config PNX8550_V2PCI
 	bool "Support for Philips PNX8550 based Viper2-PCI board"
 	select PNX8550
+	select SERIO_I8042
 	select SYS_SUPPORTS_LITTLE_ENDIAN
 
 config PNX8550_JBS
@@ -550,6 +552,7 @@ config SGI_IP22
 	select HW_HAS_EISA
 	select IP22_CPU_SCACHE
 	select IRQ_CPU
+	select SERIO_I8042
 	select SWAP_IO_SPACE
 	select SYS_HAS_CPU_R4X00
 	select SYS_HAS_CPU_R5000
@@ -713,6 +716,7 @@ config SNI_RM200_PCI
 	select HW_HAS_PCI
 	select I8259
 	select ISA
+	select SERIO_I8042
 	select SYS_HAS_CPU_R4X00
 	select SYS_SUPPORTS_32BIT_KERNEL
 	select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
@@ -762,6 +766,7 @@ config TOSHIBA_RBTX4938
 	select HW_HAS_PCI
 	select I8259
 	select ISA
+	select SERIO_I8042
 	select SWAP_IO_SPACE
 	select SYS_HAS_CPU_TX49XX
 	select SYS_SUPPORTS_32BIT_KERNEL
arch/mips/configs/atlas_defconfig +1 -2
index 85e08aa..abfe9c0 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:26 2006
+# Fri Jan 20 14:16:02 2006
 #
 CONFIG_MIPS=y
 
@@ -903,7 +903,6 @@ CONFIG_MOUSE_SERIAL=m
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 CONFIG_SERIO_LIBPS2=y
arch/mips/configs/bigsur_defconfig +1 -2
index 75db2a9..86de8fc 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:27 2006
+# Fri Jan 20 14:16:03 2006
 #
 CONFIG_MIPS=y
 
@@ -535,7 +535,6 @@ CONFIG_NET_SB1250_MAC=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/cobalt_defconfig +1 -2
index adea137..0700da4 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:27 2006
+# Fri Jan 20 14:16:05 2006
 #
 CONFIG_MIPS=y
 
@@ -530,7 +530,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/db1000_defconfig +1 -2
index 75c3e35..dbc91ef 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:27 2006
+# Fri Jan 20 14:16:06 2006
 #
 CONFIG_MIPS=y
 
@@ -604,7 +604,6 @@ CONFIG_INPUT_EVDEV=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 CONFIG_SERIO_RAW=m
arch/mips/configs/db1100_defconfig +1 -2
index 89ac1aa..95326df 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:27 2006
+# Fri Jan 20 14:16:07 2006
 #
 CONFIG_MIPS=y
 
@@ -580,7 +580,6 @@ CONFIG_INPUT_EVDEV=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 CONFIG_SERIO_LIBPS2=m
 CONFIG_SERIO_RAW=m
arch/mips/configs/db1200_defconfig +1 -2
index e7cd15e..6ae4bdf 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:28 2006
+# Fri Jan 20 14:16:08 2006
 #
 CONFIG_MIPS=y
 
@@ -645,7 +645,6 @@ CONFIG_INPUT_EVDEV=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 CONFIG_SERIO_RAW=y
arch/mips/configs/db1500_defconfig +1 -2
index 03f1364..52551e9 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:28 2006
+# Fri Jan 20 14:16:10 2006
 #
 CONFIG_MIPS=y
 
@@ -671,7 +671,6 @@ CONFIG_INPUT_EVDEV=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/db1550_defconfig +1 -2
index de88f39..016530d 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:28 2006
+# Fri Jan 20 14:16:11 2006
 #
 CONFIG_MIPS=y
 
@@ -711,7 +711,6 @@ CONFIG_INPUT_EVDEV=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/ddb5476_defconfig +1 -2
index d885993..0c85a90 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:28 2006
+# Fri Jan 20 14:16:12 2006
 #
 CONFIG_MIPS=y
 
@@ -546,7 +546,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/ddb5477_defconfig +1 -2
index 108f8e2..bca51f7 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:29 2006
+# Fri Jan 20 14:16:13 2006
 #
 CONFIG_MIPS=y
 
@@ -531,7 +531,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/e55_defconfig +1 -2
index f3db69e..07372d6 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:29 2006
+# Fri Jan 20 14:16:15 2006
 #
 CONFIG_MIPS=y
 
@@ -511,7 +511,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 CONFIG_SERIO_RAW=m
arch/mips/configs/ev64120_defconfig +1 -2
index 20e1316..048e1ce 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:29 2006
+# Fri Jan 20 14:16:17 2006
 #
 CONFIG_MIPS=y
 
@@ -525,7 +525,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/ev96100_defconfig +1 -2
index 159d5fe..edb0876 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:29 2006
+# Fri Jan 20 14:16:18 2006
 #
 CONFIG_MIPS=y
 
@@ -478,7 +478,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 CONFIG_SERIO_RAW=m
arch/mips/configs/ip27_defconfig +1 -2
index 90ec84f..ebb602e 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:30 2006
+# Fri Jan 20 14:16:20 2006
 #
 CONFIG_MIPS=y
 
@@ -633,7 +633,6 @@ CONFIG_SGI_IOC3_ETH_HW_TX_CSUM=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 CONFIG_SERIO_LIBPS2=m
arch/mips/configs/ip32_defconfig +1 -2
index 23dcecc..391695d 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Thu Jan 19 14:38:42 2006
+# Fri Jan 20 14:16:21 2006
 #
 CONFIG_MIPS=y
 
@@ -591,7 +591,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_MACEPS2 is not set
arch/mips/configs/it8172_defconfig +1 -2
index 128a3b1..dec0e18 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:30 2006
+# Fri Jan 20 14:16:22 2006
 #
 CONFIG_MIPS=y
 
@@ -571,7 +571,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 CONFIG_SERIO_RAW=m
arch/mips/configs/ivr_defconfig +1 -2
index 09709b0..1faf00b 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:31 2006
+# Fri Jan 20 14:16:24 2006
 #
 CONFIG_MIPS=y
 
@@ -537,7 +537,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/jmr3927_defconfig +1 -2
index 9b6d676..4241657 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:31 2006
+# Fri Jan 20 14:16:28 2006
 #
 CONFIG_MIPS=y
 
@@ -508,7 +508,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/malta_defconfig +1 -2
index 86a7f50..2c6e0c3 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:31 2006
+# Fri Jan 20 14:16:31 2006
 #
 CONFIG_MIPS=y
 
@@ -938,7 +938,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/mipssim_defconfig +1 -2
index 7c1872b..3db9a72 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:32 2006
+# Fri Jan 20 14:16:32 2006
 #
 CONFIG_MIPS=y
 
@@ -509,7 +509,6 @@ CONFIG_INPUT=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 # CONFIG_SERIO_RAW is not set
arch/mips/configs/mpc30x_defconfig +1 -2
index 804aeda..13afef3 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:32 2006
+# Fri Jan 20 14:16:33 2006
 #
 CONFIG_MIPS=y
 
@@ -584,7 +584,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/ocelot_3_defconfig +1 -2
index d3cc3dc..dc43187 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:32 2006
+# Fri Jan 20 14:16:34 2006
 #
 CONFIG_MIPS=y
 
@@ -650,7 +650,6 @@ CONFIG_INPUT=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 # CONFIG_SERIO_SERPORT is not set
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/ocelot_c_defconfig +1 -2
index bbb5316..fbb63d9 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:32 2006
+# Fri Jan 20 14:16:35 2006
 #
 CONFIG_MIPS=y
 
@@ -518,7 +518,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/ocelot_defconfig +1 -2
index 2d1c73e..791a1fe 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:33 2006
+# Fri Jan 20 14:16:37 2006
 #
 CONFIG_MIPS=y
 
@@ -474,7 +474,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 CONFIG_SERIO_RAW=y
arch/mips/configs/ocelot_g_defconfig +1 -2
index 062e0e6..5e636cf 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:33 2006
+# Fri Jan 20 14:16:38 2006
 #
 CONFIG_MIPS=y
 
@@ -521,7 +521,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/pb1100_defconfig +1 -2
index f8e9bbf..075541d 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:33 2006
+# Fri Jan 20 14:16:39 2006
 #
 CONFIG_MIPS=y
 
@@ -598,7 +598,6 @@ CONFIG_INPUT_EVDEV=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 CONFIG_SERIO_RAW=m
arch/mips/configs/pb1500_defconfig +1 -2
index b05c510..4e0ea12 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:33 2006
+# Fri Jan 20 14:16:40 2006
 #
 CONFIG_MIPS=y
 
@@ -707,7 +707,6 @@ CONFIG_INPUT_EVDEV=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/pb1550_defconfig +1 -2
index dd4a635..8753202 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:34 2006
+# Fri Jan 20 14:16:41 2006
 #
 CONFIG_MIPS=y
 
@@ -699,7 +699,6 @@ CONFIG_INPUT_EVDEV=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/pnx8550-jbs_defconfig +1 -2
index dcd88a5..af8a7c2 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:34 2006
+# Fri Jan 20 14:16:43 2006
 #
 CONFIG_MIPS=y
 
@@ -643,7 +643,6 @@ CONFIG_INPUT=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 # CONFIG_SERIO_SERPORT is not set
 # CONFIG_SERIO_PCIPS2 is not set
 CONFIG_SERIO_LIBPS2=y
arch/mips/configs/sb1250-swarm_defconfig +1 -2
index bc79f49..7e0d3b8 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:35 2006
+# Fri Jan 20 14:16:48 2006
 #
 CONFIG_MIPS=y
 
@@ -549,7 +549,6 @@ CONFIG_NET_SB1250_MAC=y
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_PCIPS2 is not set
 # CONFIG_SERIO_LIBPS2 is not set
arch/mips/configs/workpad_defconfig +1 -2
index 74eb1de..a081c5f 100644
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 
-# Wed Jan 11 17:48:36 2006
+# Fri Jan 20 14:16:53 2006
 #
 CONFIG_MIPS=y
 
@@ -536,7 +536,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # Hardware I/O ports
 #
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 CONFIG_SERIO_SERPORT=y
 # CONFIG_SERIO_LIBPS2 is not set
 CONFIG_SERIO_RAW=m
drivers/input/serio/Kconfig +1 -1
index 98acf17..109913f 100644
@@ -21,7 +21,7 @@ if SERIO
 config SERIO_I8042
 	tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86
 	default y
-	depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K
+	depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K && !MIPS
 	---help---
 	  i8042 is the chip over which the standard AT keyboard and PS/2
 	  mouse are connected to the computer. If you use these devices,
#4 lore raw
Quoted 5 lines · Ralf Baechle
Quoted 3 lines
Quoted 2 lines

pointer is eventually called as a function. So I suggest this below. Can you test it?

Doesn't work.

Indeed - for quite obvioius reasons even. I hope I now covered all cases in the new patch below.

You attached the SERIO patch. ;-)

Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#5 lore raw
Quoted 8 lines · Martin Michlmayr
Quoted 5 lines · Ralf Baechle
Quoted 3 lines
Quoted 2 lines

pointer is eventually called as a function. So I suggest this below. Can you test it?

Doesn't work.

Indeed - for quite obvioius reasons even. I hope I now covered all cases in the new patch below.

You attached the SERIO patch. ;-)

Just checking your attention ;-)

Ralf

arch/mips/mm/c-r4k.c +8 -4
index 422b55f..614dceb 100644
@@ -235,7 +235,9 @@ static inline void r4k_blast_scache_page
 {
 	unsigned long sc_lsize = cpu_scache_line_size();
 
-	if (sc_lsize == 16)
+	if (scache_size == 0)
+		r4k_blast_scache_page = no_sc_noop;
+	else if (sc_lsize == 16)
 		r4k_blast_scache_page = blast_scache16_page;
 	else if (sc_lsize == 32)
 		r4k_blast_scache_page = blast_scache32_page;
@@ -251,7 +253,9 @@ static inline void r4k_blast_scache_page
 {
 	unsigned long sc_lsize = cpu_scache_line_size();
 
-	if (sc_lsize == 16)
+	if (scache_size == 0)
+		r4k_blast_scache_page = no_sc_noop;
+	else if (sc_lsize == 16)
 		r4k_blast_scache_page_indexed = blast_scache16_page_indexed;
 	else if (sc_lsize == 32)
 		r4k_blast_scache_page_indexed = blast_scache32_page_indexed;
@@ -495,7 +499,7 @@ static inline void local_r4k_flush_icach
 			}
 		}
 
-		if (!cpu_icache_snoops_remote_store) {
+		if (!cpu_icache_snoops_remote_store && scache_size) {
 			if (end - start > scache_size) {
 				r4k_blast_scache();
 			} else {
@@ -728,7 +732,7 @@ static void local_r4k_flush_cache_sigtra
 
 	R4600_HIT_CACHEOP_WAR_IMPL;
 	protected_writeback_dcache_line(addr & ~(dc_lsize - 1));
-	if (!cpu_icache_snoops_remote_store)
+	if (!cpu_icache_snoops_remote_store && scache_size)
 		protected_writeback_scache_line(addr & ~(sc_lsize - 1));
 	protected_flush_icache_line(addr & ~(ic_lsize - 1));
 	if (MIPS4K_ICACHE_REFILL_WAR) {
#6 lore raw
Quoted 2 lines · Ralf Baechle
Quoted 1 line

You attached the SERIO patch. ;-)

Just checking your attention ;-)

This one gives me a really interesting set of error messages:

Quoted 1 line

execute console=ttyS0,{console-speed} root=/dev/hda2

elf64: 00080000 - 0039b01f (ffffffff.80348000) (ffffffff.80000000)
elf64: ffffffff.80080000 (80080000) 3084422t + 171930t
net: interface down
Linux version 2.6.15 (tbm@deprecation) (gcc version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)) #8 Fri Jan 20 15:57:27 GMT 2006
CPU revision is: 000028a0
FPU revision is: 000028a0
Cobalt board ID: 5
Determined physical RAM map:
memory: 0000000008000000 @ 0000000000000000 (usable)
Built 1 zonelists
Kernel command line: console=ttyS0,115200 root=/dev/hda2
Primary instruction cache 32kB, physically tagged, 2-way, linesize 32 bytes.
Primary data cache 32kB, 2-way, linesize 32 bytes.
Synthesized TLB refill handler (32 instructions).
Synthesized TLB load handler fastpath (46 instructions).
Synthesized TLB store handler fastpath (46 instructions).
Synthesized TLB modify handler fastpath (45 instructions).
PID hash table entries: 1024 (order: 10, 32768 bytes)
Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
Memory: 125012k/131072k available (2265k kernel code, 5912k reserved, 578k data, 168k init, 0k highmem) Mount-cache hash table entries: 256
Checking for 'wait' instruction... available.
Checking for the multiply/shift bug... no.
Checking for the daddi bug... no.
Checking for the daddiu bug... no.
NET: Registered protocol family 16
usbcore: registered new driver usbfs
usbcore: registered new driver hub
Galileo: fixed bridge class
Galileo: revision 17
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
Activating ISA DMA hang workarounds.
rtc: Digital UNIX epoch (1952) detected
Real Time Clock Driver v1.12a
Cobalt LCD Driver v2.10
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
ÿserial8250: ttyS0 at I/O 0xc800000 (irq = 21) is a ST16650V2
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 0000:00:09.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt82c586a (rev 27) IDE UDMA33 controller on pci0000:00:09.1

     ide0: BM-DMA at 0x1460-0x1467, BIOS settings: hda:pio, hdb:pio
     ide1: BM-DMA at 0x1468-0x146f, BIOS settings: hdc:pio, hdd:pio

hda: QUANTUM FIREBALLlct08 04, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: max request size: 128KiB
hda: 8421840 sectors (4311 MB) w/418KiB Cache, CHS=8912/15/63
hda: cache flushes not supported
hda: hda1 hda2 hda3 < hda5 hda6 >
usbmon: debugfs is not available
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 2, 16384 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting. Commit interval 5 seconds
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 168k freed
modprobe: FATAL: Could not load /lib/modules/2.6.15/modules.dep: No such file or directory

modprobe: FATAL: Could not load /lib/modules/2.6.15/modules.dep: No such file or directory

INIT: version 2.86 booting
CPU 0 Unable to handle kernel paging request at virtual address 0000000000000000, epc == 0000000000000000, ra == ffffffff800a36dc
Oops[#1]:
Cpu 0

 $ 0   : 0000000000000000 ffffffffb00064e0 ffffffff80370000 0000000000000000
 $ 4   : ffffffff80005000 0000000000008000 ffffffff80006000 0000000000000001
 $ 8   : 0000000000004000 0000000000008000 ffffffff80370000 ffffffff80370000
 $12   : ffffffff80370000 ffffffff80370000 ffffffff80094e80 0000000000000000
 $16   : ffffffff80005000 0000000000000004 000000007f885ec8 98000000011a9668
 $20   : 980000000797a348 980000000797d428 0000000007918613 9800000000363620
 $24   : 0000000000000000 ffffffff80370000                                  
 $28   : 9800000007970000 9800000007973cc0 ffffffff80380000 ffffffff800a36dc
 Hi    : 0000000000016c77
 Lo    : 000000000000797d
 epc   : 0000000000000000 _stext+0x7ff7fc00/0x40     Not tainted
 ra    : ffffffff800a36dc r4k_flush_cache_page+0x13c/0x208
 Status: b00064e3    KX SX UX KERNEL EXL IE 
 Cause : 00808008
 BadVA : 0000000000000000
 PrId  : 000028a0
 Modules linked in:
 Process rcS (pid: 600, threadinfo=9800000007970000, task=980000000796f848)
 Stack : 980000000797a348 000000007f885ec8 980000000798b000 98000000011a7d40
         ffffffff800fc748 ffffffff80374400 980000000797cfe0 ffffffff900064e1
         6800000000000000 0000000007918613 980000000797d428 000000007f885ec8
         980000000797cfe0 980000000797a348 9800000000363620 6db6db6db6db6db7
         0000000000000001 ffffffff800fce88 0000000000000002 00000000100189c8
         000000000045c000 0000000000000001 0000000000000000 0000000000000000
         0000000000000428 ffffffff80380000 9800000007973eb0 980000000797a348
         000000007f885ec8 9800000000363678 980000000796f848 9800000000363620
         0000000000030000 0000000000000001 0000000000000000 ffffffff8009f640
         0003000207973eb0 0000000000000012 9800000007973df0 9800000007973df0
         ...
 Call Trace:
  [<ffffffff800fc748>] do_wp_page+0x310/0x740
  [<ffffffff800fce88>] __handle_mm_fault+0x310/0xe50
  [<ffffffff8009f640>] do_page_fault+0x2a0/0x470
  [<ffffffff800c8b14>] do_sigaction+0x1dc/0x258
  [<ffffffff8010ef8c>] filp_close+0x64/0xc0
  [<ffffffff8010ef80>] filp_close+0x58/0xc0
  [<ffffffff800a0228>] tlb_do_page_fault_1+0x110/0x118
  [<ffffffff800829b8>] handle_cpu_int+0x20/0x28
  [<ffffffff80094e80>] sys32_rt_sigprocmask+0x0/0x180
 Code: (Bad address in epc)

CPU 0 Unable to handle kernel paging request at virtual address 0000000000000000, epc == 0000000000000000, ra == ffffffff800a36dc Oops[#2]:
Cpu 0

 $ 0   : 0000000000000000 ffffffffb00064e0 ffffffff80370000 0000000000000000
 $ 4   : ffffffff80005000 0000000000008000 ffffffff80006000 0000000000000001
 $ 8   : 0000000000004000 0000000000008000 0000000007918613 ffffffff80370000
 $12   : ffffffff80370000 ffffffff80370000 ffffffff80094e80 0000000000000000
 $16   : ffffffff80005000 0000000000000004 000000007f885ca8 9800000007987428
 $20   : 980000000797a348 980000000797a348 0000000007918613 9800000000363060
 $24   : 0000000000000000 0000000000416a00                                  
 $28   : 9800000007970000 9800000007973cc0 0000000000000001 ffffffff800a36dc
 Hi    : 0000000000016c95
 Lo    : 0000000000007987
 epc   : 0000000000000000 _stext+0x7ff7fc00/0x40     Not tainted
 ra    : ffffffff800a36dc r4k_flush_cache_page+0x13c/0x208
 Status: b00064e3    KX SX UX KERNEL EXL IE 
 Cause : 00808008
 BadVA : 0000000000000000
 PrId  : 000028a0
 Modules linked in:
 Process rcS (pid: 602, threadinfo=9800000007970000, task=980000000796f848)
 Stack : 980000000797a348 000000007f885ca8 0000000000000001 98000000011a7d40
         ffffffff800fc908 ffffffff800fc8dc 980000000798ffe0 fffffffffffffdee
         6800000000000000 0000000007918613 9800000007987428 000000007f885ca8
         980000000798ffe0 980000000797a348 9800000000363060 6db6db6db6db6db7
         0000000000000001 ffffffff800fce88 0000000000000002 ffffffff00000001
         0000000000416000 0000000000000000 0000000000000000 0000000000000000
         0000000000000428 ffffffff80000010 9800000007973eb0 980000000797a348
         000000007f885ca8 98000000003630b8 980000000796f848 9800000000363060
         0000000000030000 0000000000000001 0000000000000000 ffffffff8009f640
         00030002800d6a80 9800000007973de8 9800000007973de8 ffffffff80100de4
         ...
 Call Trace:
  [<ffffffff800fc908>] do_wp_page+0x4d0/0x740
  [<ffffffff800fc8dc>] do_wp_page+0x4a4/0x740
  [<ffffffff800fce88>] __handle_mm_fault+0x310/0xe50
  [<ffffffff8009f640>] do_page_fault+0x2a0/0x470
  [<ffffffff80100de4>] do_brk+0x1dc/0x358
  [<ffffffff800a0228>] tlb_do_page_fault_1+0x110/0x118
  [<ffffffff800829b8>] handle_cpu_int+0x20/0x28
  [<ffffffff80094e80>] sys32_rt_sigprocmask+0x0/0x180
 Code: (Bad address in epc)

/etc/init.d/rcS: line 59: 602 Segmentation fault ( trap - INT QUIT TSTP; set start; . $i )
CPU 0 Unable to handle kernel paging request at virtual address 0000000000000000, epc == 0000000000000000, ra == ffffffff800a36dc
Oops[#3]:
Cpu 0

 $ 0   : 0000000000000000 ffffffffb00064e0 ffffffff80370000 0000000000000000
 $ 4   : ffffffff80005000 0000000000008000 ffffffff80006000 0000000000000001
 $ 8   : 0000000000004000 0000000000008000 0000000007918613 ffffffff80370000
 $12   : ffffffff80370000 ffffffff80370000 ffffffff80094e80 0000000000000000
 $16   : ffffffff80005000 0000000000000004 000000007f885ec8 9800000007990428
 $20   : 9800000007f28208 9800000007f28208 0000000007918613 9800000000363060
 $24   : 0000000000000000 0000000000416a00                                  
 $28   : 9800000007970000 9800000007973cc0 0000000000000001 ffffffff800a36dc
 Hi    : 0000000000016cb0
 Lo    : 0000000000007990
 epc   : 0000000000000000 _stext+0x7ff7fc00/0x40     Not tainted
 ra    : ffffffff800a36dc r4k_flush_cache_page+0x13c/0x208
 Status: b00064e3    KX SX UX KERNEL EXL IE 
 Cause : 00808008
 BadVA : 0000000000000000
 PrId  : 000028a0
 Modules linked in:
 Process rcS (pid: 603, threadinfo=9800000007970000, task=980000000796f848)
 Stack : 9800000007f28208 000000007f885ec8 0000000000000001 98000000011a7d40
         ffffffff800fc908 ffffffff800fc8dc 980000000797efe0 00000000000168ea
         6800000000000000 0000000007918613 9800000007990428 000000007f885ec8
         980000000797efe0 9800000007f28208 9800000000363060 6db6db6db6db6db7
         0000000000000001 ffffffff800fce88 9800000000000002 9800000000363060
         000000000045c000 0000000000000000 0000000000000000 0000000000000000
         0000000000000428 ffffffff80000010 9800000007973eb0 9800000007f28208
         000000007f885ec8 98000000003630b8 980000000796f848 9800000000363060
         0000000000030000 0000000000000001 0000000000000000 ffffffff8009f640
         00030002800d6a80 9800000007973de8 9800000007973de8 ffffffff80100de4
         ...
 Call Trace:
  [<ffffffff800fc908>] do_wp_page+0x4d0/0x740
  [<ffffffff800fc8dc>] do_wp_page+0x4a4/0x740
  [<ffffffff800fce88>] __handle_mm_fault+0x310/0xe50
  [<ffffffff8009f640>] do_page_fault+0x2a0/0x470
  [<ffffffff80100de4>] do_brk+0x1dc/0x358
  [<ffffffff800c8b14>] do_sigaction+0x1dc/0x258
  [<ffffffff8010ef8c>] filp_close+0x64/0xc0
  [<ffffffff8010ef80>] filp_close+0x58/0xc0
  [<ffffffff800a0228>] tlb_do_page_fault_1+0x110/0x118
  [<ffffffff800829b8>] handle_cpu_int+0x20/0x28
  [<ffffffff80094e80>] sys32_rt_sigprocmask+0x0/0x180
 Code: (Bad address in epc)

CPU 0 Unable to handle kernel paging request at virtual address 0000000000000000, epc == 0000000000000000, ra == ffffffff800a36dc Oops[#4]:
Cpu 0

 $ 0   : 0000000000000000 ffffffffb00064e0 ffffffff80370000 0000000000000000
 $ 4   : ffffffff80003000 0000000000008000 ffffffff80004000 0000000000000001
 $ 8   : 0000000000004000 0000000000008000 ffffffff80370000 ffffffff80370000
 $12   : ffffffff80370000 ffffffff80370000 ffffffff80094e80 0000000000000000
 $16   : ffffffff80003000 0000000000000004 000000007fe13ff8 98000000011aaaf8
 $20   : 98000000079d8818 98000000079da098 00000000079b9613 9800000000363620
 $24   : 0000000000000000 ffffffff80370000                                  
 $28   : 98000000079d0000 98000000079d3cc0 ffffffff80380000 ffffffff800a36dc
 Hi    : 0000000000016d8e
 Lo    : 00000000000079da
 epc   : 0000000000000000 _stext+0x7ff7fc00/0x40     Not tainted
 ra    : ffffffff800a36dc r4k_flush_cache_page+0x13c/0x208
 Status: b00064e3    KX SX UX KERNEL EXL IE 
 Cause : 00808008
 BadVA : 0000000000000000
 PrId  : 000028a0
 Modules linked in:
 Process S02mountvirtfs (pid: 606, threadinfo=98000000079d0000, task=980000000796f260)
 Stack : 98000000079d8818 000000007fe13ff8 98000000079e9000 98000000011aa078
         ffffffff800fc748 ffffffff800a1f48 98000000079d9ff8 ffffffff8037da90
         6800000000000000 00000000079b9613 98000000079da098 000000007fe13ff8
         98000000079d9ff8 98000000079d8818 9800000000363620 6db6db6db6db6db7
         0000000000000001 ffffffff800fce88 0000000000000002 ffffffff800c1110
         000000000041a000 98000000079d3d60 0000000000000000 0000000000000000
         0000000000000098 ffffffff80380000 98000000079d3eb0 98000000079d8818
         000000007fe13ff8 9800000000363678 980000000796f260 9800000000363620
         0000000000030000 0000000000000001 000000007fe14008 ffffffff8009f640
         00030002079d3eb0 0000000000000012 98000000079d3df0 98000000079d3df0
         ...
 Call Trace:
  [<ffffffff800fc748>] do_wp_page+0x310/0x740
  [<ffffffff800a1f48>] r4k_blast_dcache_page_dc32+0x88/0xa0
  [<ffffffff800fce88>] __handle_mm_fault+0x310/0xe50
  [<ffffffff800c1110>] do_softirq+0xa0/0xd0
  [<ffffffff8009f640>] do_page_fault+0x2a0/0x470
  [<ffffffff800a0228>] tlb_do_page_fault_1+0x110/0x118
  [<ffffffff800829b8>] handle_cpu_int+0x20/0x28
  [<ffffffff80094e80>] sys32_rt_sigprocmask+0x0/0x180
 Code: (Bad address in epc)

CPU 0 Unable to handle kernel paging request at virtual address 0000000000000000, epc == 0000000000000000, ra == ffffffff800a36dc Oops[#5]:
Cpu 0

 $ 0   : 0000000000000000 ffffffffb00064e0 ffffffff80370000 0000000000000000
 $ 4   : ffffffff80003000 0000000000008000 ffffffff80004000 0000000000000001
 $ 8   : 0000000000004000 0000000000008000 00000000079b9613 ffffffff80370000
 $12   : ffffffff80370000 ffffffff80370000 ffffffff80094e80 0000000000000000
 $16   : ffffffff80003000 0000000000000004 000000007fe13f88 98000000079de098
 $20   : 98000000079314c8 98000000079314c8 00000000079b9613 9800000000363620
 $24   : 0000000000000000 0000000000416a00                                  
 $28   : 98000000079d0000 98000000079d3cc0 0000000000000001 ffffffff800a36dc
 Hi    : 0000000000016d9a
 Lo    : 00000000000079de
 epc   : 0000000000000000 _stext+0x7ff7fc00/0x40     Not tainted
 ra    : ffffffff800a36dc r4k_flush_cache_page+0x13c/0x208
 Status: b00064e3    KX SX UX KERNEL EXL IE 
 Cause : 00808008
 BadVA : 0000000000000000
 PrId  : 000028a0
 Modules linked in:
 Process S02mountvirtfs (pid: 607, threadinfo=98000000079d0000, task=980000000796f260)
 Stack : 98000000079314c8 000000007fe13f88 0000000000000001 98000000011aa078
         ffffffff800fc908 ffffffff800fc8dc 98000000079e1ff8 ffffffff8037da90
         6800000000000000 00000000079b9613 98000000079de098 000000007fe13f88
         98000000079e1ff8 98000000079314c8 9800000000363620 6db6db6db6db6db7
         0000000000000001 ffffffff800fce88 0000000000000002 ffffffff800c1110
         000000000045c000 98000000079d3d60 0000000000000000 0000000000000000
         0000000000000098 ffffffff80380000 98000000079d3eb0 98000000079314c8
         000000007fe13f88 9800000000363678 980000000796f260 9800000000363620
         0000000000030000 0000000000000001 0000000000000000 ffffffff8009f640
         00030002079d3eb0 0000000000000012 98000000079d3df0 98000000079d3df0
         ...
 Call Trace:
  [<ffffffff800fc908>] do_wp_page+0x4d0/0x740
  [<ffffffff800fc8dc>] do_wp_page+0x4a4/0x740
  [<ffffffff800fce88>] __handle_mm_fault+0x310/0xe50
  [<ffffffff800c1110>] do_softirq+0xa0/0xd0
  [<ffffffff8009f640>] do_page_fault+0x2a0/0x470
  [<ffffffff800a0228>] tlb_do_page_fault_1+0x110/0x118
  [<ffffffff800829b8>] handle_cpu_int+0x20/0x28
  [<ffffffff80094e80>] sys32_rt_sigprocmask+0x0/0x180
 Code: (Bad address in epc)

Break instruction in kernel code[#6]:
Cpu 0

 $ 0   : 0000000000000000 ffffffffb00064e0 ffffffffffffffff ffffffffb00064e1
 $ 4   : 0000000000000020 6800000000000000 98000000079cb000 0000000000000000
 $ 8   : 0000000000000017 0000c00000000003 ffffffff80370000 2ae156c600000000
 $12   : ffffffff80380000 000000001000001e ffffffff80091258 20203e706d75643c
 $16   : 98000000079ca000 98000000011aa078 000000007fe13fb0 98000000011aa430
 $20   : 9800000007f28208 9800000007976098 00000000079b969b 9800000000363060
 $24   : 0000000000000000 ffffffff800a1ec0                                  
 $28   : 9800000007970000 9800000007973cf0 ffffffff80380000 ffffffff800fc70c
 Hi    : 0000000000016c62
 Lo    : 0000000000007976
 epc   : ffffffff801036c8 page_remove_rmap+0x78/0x88     Not tainted
 ra    : ffffffff800fc70c do_wp_page+0x2d4/0x740
 Status: b00064e3    KX SX UX KERNEL EXL IE 
 Cause : 00808024
 PrId  : 000028a0
 Modules linked in:
 Process S02mountvirtfs (pid: 605, threadinfo=9800000007970000, task=980000000796f848)
 Stack : 980000000799aff8 fffffffffffffdee 6800000000000000 00000000079b969b
         9800000007976098 000000007fe13fb0 980000000799aff8 9800000007f28208
         9800000000363060 6db6db6db6db6db7 0000000000000001 ffffffff800fce88
         0000000000000002 ffffffff00000001 9800000007973d60 9800000007973d60
         980000000796f848 0000000000000001 0000000000000098 ffffffff80380000
         9800000007973eb0 9800000007f28208 000000007fe13fb0 98000000003630b8
         980000000796f848 9800000000363060 0000000000030000 0000000000000001
         0000000000000002 ffffffff8009f640 0003000207973eb0 0000000000000012
         9800000007973df0 9800000007973df0 0000000000000000 ffffffff8037a578
         000000000000000a ffffffff80380000 0000000000000001 ffffffff8037da90
         ...
 Call Trace:
  [<ffffffff800fce88>] __handle_mm_fault+0x310/0xe50
  [<ffffffff8009f640>] do_page_fault+0x2a0/0x470
  [<ffffffff800c0f94>] __do_softirq+0xbc/0x198
  [<ffffffff800a0228>] tlb_do_page_fault_1+0x110/0x118
  [<ffffffff800829b8>] handle_cpu_int+0x20/0x28
  [<ffffffff80091258>] sys32_llseek+0x0/0x30
 Code: 24040020  0803a884  2405ffff <0200000d> 24040020  0803a884  2405ffff  67bdffb0  ffb20020 
 Break instruction in kernel code[#7]:
 Cpu 0
 $ 0   : 0000000000000000 ffffffffb00064e0 fffffffffffffffe ffffffffb00064e1
 $ 4   : 0000000000000020 0000000000000000 00000000079b969b 00000000001aa078
 $ 8   : 00000000000079b9 000000007fe13000 ffffffff80373ce0 ffffffff80370000
 $12   : ffffffff803a0000 ffffffff80390000 ffffffff80310000 ffffffff80380000
 $16   : 9800000007976098 ffffffffffffffbf 000000007fe13000 98000000011aa078
 $20   : 000000007fe15000 000000000028cc95 000000007fe15000 980000000799aff8
 $24   : ffffffff80310000 ffffffff802c0000                                  
 $28   : 9800000007970000 98000000079739a0 0000000000000000 ffffffff800fb440
 Hi    : 0000000000016c62
 Lo    : 0000000000007976
 epc   : ffffffff801036c8 page_remove_rmap+0x78/0x88     Not tainted
 ra    : ffffffff800fb440 unmap_vmas+0x350/0x788
 Status: b00064e3    KX SX UX KERNEL EXL IE 
 Cause : 00808024
 PrId  : 000028a0
 Modules linked in:
 Process S02mountvirtfs (pid: 605, threadinfo=9800000007970000, task=980000000796f848)
 Stack : 0000000000000000 000000007fe15000 000000007fe14fff 000000007fe14fff
         9800000000363060 ffffffff80373ce0 fffffffffffffffc 9800000007994008
         9800000007994008 0000000000000001 0000000000000000 0000000000000001
         9800000007973a80 9800000007f28208 0000000000000000 ffffffffffffffff
         9800000007973a88 0000000000000000 98000000079316d8 9800000000363060
         0000000000000001 000000000000000b 9800000007f28208 9800000007976098
         00000000079b969b 9800000000363060 ffffffff80380000 ffffffff800ff244
         ffffffff80373ce0 0000000000000059 9800000000363060 980000000796f848
         ffffffff800b67a0 ffffffff800b6798 9800000007973bc0 ffffffff800bcba0
         9800000007973ae8 ffffffff80310000 9800000007973bc0 98000000011aa078
         ...
 Call Trace:
  [<ffffffff800ff244>] exit_mmap+0x8c/0x178
  [<ffffffff800b67a0>] mmput+0x88/0x158
  [<ffffffff800b6798>] mmput+0x80/0x158
  [<ffffffff800bcba0>] do_exit+0x198/0xda8
  [<ffffffff800887d0>] nmi_exception_handler+0x0/0x50
  [<ffffffff800887c8>] die+0xb0/0xb8
  [<ffffffff80088d20>] do_tr+0x0/0x118
  [<ffffffff802b3254>] __wait_on_bit_lock+0x104/0x1c0
  [<ffffffff800e5010>] __lock_page+0x80/0x90
  [<ffffffff800d6bf8>] wake_bit_function+0x0/0x58
  [<ffffffff800827b8>] handle_bp_int+0x20/0x28
  [<ffffffff80091258>] sys32_llseek+0x0/0x30
  [<ffffffff800a1ec0>] r4k_blast_dcache_page_dc32+0x0/0xa0
  [<ffffffff800fc70c>] do_wp_page+0x2d4/0x740
  [<ffffffff801036c8>] page_remove_rmap+0x78/0x88
  [<ffffffff800fce88>] __handle_mm_fault+0x310/0xe50
  [<ffffffff8009f640>] do_page_fault+0x2a0/0x470
  [<ffffffff800c0f94>] __do_softirq+0xbc/0x198
  [<ffffffff800a0228>] tlb_do_page_fault_1+0x110/0x118
  [<ffffffff800829b8>] handle_cpu_int+0x20/0x28
  [<ffffffff80091258>] sys32_llseek+0x0/0x30
 
 
 Code: 24040020  0803a884  2405ffff <0200000d> 24040020  0803a884  2405ffff  67bdffb0  ffb20020 
 Fixing recursive fault but reboot is needed!
Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#7 lore raw
In reply to Martin Michlmayr
Quoted 4 lines · Martin Michlmayr
Quoted 3 lines

scache flushing functions aren't getting initialized and the NULL pointer is eventually called as a function. So I suggest this below. Can you test it?

Doesn't work.

OK, I found the bug in your patch, fixed this and also added proper type casting. Tested patch below; please commit to git and push to Linus since Cobalt support is completely broken without this patch.

From: Martin Michlmayr <[email protected]>

[PATCH] Initialize scache flushing functions when CPU has no scache

When a CPU has no scache, the scache flushing functions currently aren't getting initialized and the NULL pointer is eventually called as a function. Initialize the scache flushing functions as a noop when there's no scache.

---

 c-r4k.c |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
arch/mips/mm/c-r4k.c +11 -5
index 1b71d91..0668e9b 100644
@@ -235,7 +235,9 @@ static inline void r4k_blast_scache_page
 {
 	unsigned long sc_lsize = cpu_scache_line_size();
 
-	if (sc_lsize == 16)
+	if (scache_size == 0)
+		r4k_blast_scache_page = (void *)no_sc_noop;
+	else if (sc_lsize == 16)
 		r4k_blast_scache_page = blast_scache16_page;
 	else if (sc_lsize == 32)
 		r4k_blast_scache_page = blast_scache32_page;
@@ -251,7 +253,9 @@ static inline void r4k_blast_scache_page
 {
 	unsigned long sc_lsize = cpu_scache_line_size();
 
-	if (sc_lsize == 16)
+	if (scache_size == 0)
+		r4k_blast_scache_page_indexed = (void *)no_sc_noop;
+	else if (sc_lsize == 16)
 		r4k_blast_scache_page_indexed = blast_scache16_page_indexed;
 	else if (sc_lsize == 32)
 		r4k_blast_scache_page_indexed = blast_scache32_page_indexed;
@@ -267,7 +271,9 @@ static inline void r4k_blast_scache_setu
 {
 	unsigned long sc_lsize = cpu_scache_line_size();
 
-	if (sc_lsize == 16)
+	if (scache_size == 0)
+		r4k_blast_scache = (void *)no_sc_noop;
+	else if (sc_lsize == 16)
 		r4k_blast_scache = blast_scache16;
 	else if (sc_lsize == 32)
 		r4k_blast_scache = blast_scache32;
@@ -482,7 +488,7 @@ static inline void local_r4k_flush_icach
 			protected_blast_dcache_range(start, end);
 		}
 
-		if (!cpu_icache_snoops_remote_store) {
+		if (!cpu_icache_snoops_remote_store && scache_size) {
 			if (end - start > scache_size)
 				r4k_blast_scache();
 			else
@@ -651,7 +657,7 @@ static void local_r4k_flush_cache_sigtra
 
 	R4600_HIT_CACHEOP_WAR_IMPL;
 	protected_writeback_dcache_line(addr & ~(dc_lsize - 1));
-	if (!cpu_icache_snoops_remote_store)
+	if (!cpu_icache_snoops_remote_store && scache_size)
 		protected_writeback_scache_line(addr & ~(sc_lsize - 1));
 	protected_flush_icache_line(addr & ~(ic_lsize - 1));
 	if (MIPS4K_ICACHE_REFILL_WAR) {
Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/