Skip to contentSkip to conversation

PREEMPT_RT + HIGHMEM = segfaults during boot on ppc32

DISCUSSION Steve Rottinger 1 participant 1 message Jul 7, 2009 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi Thomas,

This patch solved my problem.

Thanks!

-Steve

Quoted 44 lines · Thomas Gleixner

does the patch below help ?

Thanks,

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

---
arch/powerpc/include/asm/highmem.h | 3 +++

1 file changed, 3 insertions(+)

Index: linux-2.6-tip/arch/powerpc/include/asm/highmem.h
===================================================================

arch/powerpc/include/asm/highmem.h +0 -0
@@ -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 */

arch/powerpc/include/asm/highmem.h +1 -0
+	preempt_disable();
	pagefault_disable();
	if (!PageHighMem(page))
		return page_address(page);
arch/powerpc/include/asm/highmem.h +2 -0
@@ -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)