Skip to contentSkip to conversation

kernel BUG at include/asm/mmzone.h:74!

parisc-linux Helge Deller 2 participants 3 messages Jul 10, 2004 – Jul 11, 2004

lore
Share & tools
lore
#0 lore raw

I'm now running into this problem when trying to start X11, either with the VisEG stifb or sstfb driver.

Linux version 2.6.7-pa10 (root@p100) (gcc version 3.0.2 20010829 (prerelease)) #52 Sat Jul 10 12:13:50 CEST 2004

Machine: c3k, Kernel 2.6.7-pa10, 32bit kernel.

kernel BUG at include/asm/mmzone.h:74!
Kernel addresses on the stack:

 [<10128b94>] printk+0x108/0x184
 [<10107ee8>] dump_stack+0x18/0x24
 [<10154ab8>] remap_page_range+0x198/0x47c
 [<10166a24>] do_sync_write+0x74/0xa8
 [<102932f0>] fb_mmap+0x11c/0x130
 [<10158594>] do_mmap_pgoff+0x3b8/0x680
 [<10166ae4>] vfs_write+0x8c/0x138
 [<1010f2b4>] do_mmap2+0x74/0xdc
 [<1016615c>] sys_open+0x84/0xa8
 [<1010a35c>] tracesys_exit+0x0/0x34
 [<1010d088>] intr_check_sig+0x0/0xc

Is it maybe related to the latest CONFIG_DISCONTIGMEM or arch/parisc/mm/init.c changes ?

Helge
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

#1 lore raw

In reference to a message from Helge Deller, dated Jul 10:

Quoted 1 line

I'm now running into this problem when trying to start X11, either with the VisEG stifb or sstfb driver.

this is because mmio space is not handled properly by the discontigmem support...

this patch should "fix" it, but i'm not completely happy with this approach. will think about it some more. it won't work on 64-bit platforms because pfn_is_io() is wrong there....

you don't need CONFIG_DISCONTIGMEM on c3000, so you can also just disable that :)

Index: include/asm-parisc/mmzone.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-parisc/mmzone.h,v retrieving revision 1.2

asm-parisc/mmzone.h +6 -0
diff -u -p -r1.2 mmzone.h
@@ -64,10 +64,16 @@ extern struct node_map_data node_data[];
 #define PFNNID_MAP_MAX  512     /* support 512GB */
 extern unsigned char pfnnid_map[PFNNID_MAP_MAX];
 
+#define pfn_is_io(pfn) ((pfn & (0xf0000000 >> PAGE_SHIFT)) == (0xf0000000 >> PAGE_SHIFT))
+
 static inline int pfn_to_nid(unsigned long pfn)
 {
 	unsigned int i;
 	unsigned char r;
+
+	if (unlikely(pfn_is_io(pfn)))
+		return 0;
+
 	i = pfn >> PFNNID_SHIFT;
 	BUG_ON(i >= sizeof(pfnnid_map) / sizeof(pfnnid_map[0]));
 	r = pfnnid_map[i];

randolph

Signature · 3 lines
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
#2 lore raw

Hi tausq,

Quoted 9 lines · Randolph Chung

In reference to a message from Helge Deller, dated Jul 10:

Quoted 1 line

I'm now running into this problem when trying to start X11, either with the VisEG stifb or sstfb driver.

this is because mmio space is not handled properly by the discontigmem support...

this patch should "fix" it, but i'm not completely happy with this approach. will think about it some more. it won't work on 64-bit platforms because pfn_is_io() is wrong there....

The patch you committed for 2.6.7-pa12 worked on my c3k. Thanks for fixing !

Helge
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux