Skip to contentSkip to conversation

x86: early_ioremap_reset fix 2

PATCH Applied Huang, Ying 2 participants 3 messages Jan 31, 2008

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

PATCH 3/5 x86: early_ioremap_reset fix 2

This patch fixes a bug of early_ioremap_reset(), which had been fixed before by "convert the boot time page table to the kernels native format" patch. But that patch has been reverted now.

---
 arch/x86/mm/ioremap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/mm/ioremap.c +1 -1
@@ -350,7 +350,7 @@ void __init early_ioremap_reset(void)
 	for (idx = FIX_BTMAP_BEGIN; idx >= FIX_BTMAP_END; idx--) {
 		addr = fix_to_virt(idx);
 		pte = early_ioremap_pte(addr);
-		if (!*pte & _PAGE_PRESENT) {
+		if (*pte & _PAGE_PRESENT) {
 			phys = *pte & PAGE_MASK;
 			set_fixmap(idx, phys);
 		}
Applied
#1 lore raw
Quoted 3 lines · Huang, Ying

This patch fixes a bug of early_ioremap_reset(), which had been fixed before by "convert the boot time page table to the kernels native format" patch. But that patch has been reverted now.

thanks, applied. (The native-pagetables patch is in x86.git too again, but i'll add your patch first - just in case it needs to be reverted again due to some test failure.)

Ingo

#2 lore raw
In reply to Huang, Ying

arch/x86/mm/ioremap.c void __init early_ioremap_reset(void) · line 353

Quoted 2 lines · Huang, Ying
arch/x86/mm/ioremap.c +1 -1
-		if (!*pte & _PAGE_PRESENT) {
+		if (*pte & _PAGE_PRESENT) {

btw., the usual form for that is pte_present(*pte). (i've fixed this up in the patch)

Ingo