Skip to contentSkip to conversation

PREEMPT_RT + HIGHMEM = segfaults during boot on ppc32

DISCUSSION Steve Rottinger 2 participants 2 messages Jul 2, 2009 – Jul 6, 2009 PowerPC

lore
Share & tools
lore
#0 lore raw

Hi,

I'm using 2.6.29.5-rt22 on a custom ppc32 (8641D) board. About half the time, the board will boot up correctly. The other half of the time, I'll get segfaults in various parts of the init process. I've also noticed that if I remove CONFIG_HIGHMEM from my configuration, I am able to boot consistently without running into this problem. Is there anyone else experiencing this, or does anyone have any suggestions?

Thanks in advance,

-Steve

#1 lore raw

Steve,

Quoted 6 lines · Steve Rottinger

I'm using 2.6.29.5-rt22 on a custom ppc32 (8641D) board. About half the time, the board will boot up correctly. The other half of the time, I'll get segfaults in various parts of the init process. I've also noticed that if I remove CONFIG_HIGHMEM from my configuration, I am able to boot consistently without running into this problem. Is there anyone else experiencing this, or does anyone have any suggestions?

does the patch below help ?

Thanks,

tglx
---
Subject: powerpc-fixup-pagefault-disable-changes.patch
From: Thomas Gleixner <[email protected]>
Date: Mon, 06 Jul 2009 17:36:01 +0200

---
 arch/powerpc/include/asm/highmem.h |    3 +++
 1 file changed, 3 insertions(+)
arch/powerpc/include/asm/highmem.h +3 -0
Index: linux-2.6-tip/arch/powerpc/include/asm/highmem.h
===================================================================
@@ -90,6 +90,7 @@ static inline void *kmap_atomic_prot(str
 	unsigned long vaddr;
 
 	/* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
+	preempt_disable();
 	pagefault_disable();
 	if (!PageHighMem(page))
 		return page_address(page);
@@ -118,6 +119,7 @@ static inline void kunmap_atomic(void *k
 
 	if (vaddr < __fix_to_virt(FIX_KMAP_END)) {
 		pagefault_enable();
+		preempt_enable();
 		return;
 	}
 
@@ -131,6 +133,7 @@ static inline void kunmap_atomic(void *k
 	local_flush_tlb_page(NULL, vaddr);
 #endif
 	pagefault_enable();
+	preempt_enable();
 }
 
 static inline struct page *kmap_atomic_to_page(void *ptr)