Skip to content

Commit

Permalink
x86: early_ioremap_init(), enhance warnings
Browse files Browse the repository at this point in the history
enhance the debug warning in early_ioremap_init().

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Ingo Molnar committed Jan 30, 2008
1 parent 927222b commit 0e3a954
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion arch/x86/mm/ioremap_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,22 @@ void __init early_ioremap_init(void)
pgd = early_ioremap_pgd(fix_to_virt(FIX_BTMAP_BEGIN));
*pgd = __pa(bm_pte) | _PAGE_TABLE;
memset(bm_pte, 0, sizeof(bm_pte));
BUG_ON(pgd != early_ioremap_pgd(fix_to_virt(FIX_BTMAP_END)));
/*
* The boot-ioremap range spans multiple pgds, for which
* we are not prepared:
*/
if (pgd != early_ioremap_pgd(fix_to_virt(FIX_BTMAP_END))) {
WARN_ON(1);
printk("pgd %p != %p\n",
pgd, early_ioremap_pgd(fix_to_virt(FIX_BTMAP_END)));
printk("fix_to_virt(FIX_BTMAP_BEGIN): %08lx\n",
fix_to_virt(FIX_BTMAP_BEGIN));
printk("fix_to_virt(FIX_BTMAP_END): %08lx\n",
fix_to_virt(FIX_BTMAP_END));

printk("FIX_BTMAP_END: %d\n", FIX_BTMAP_END);
printk("FIX_BTMAP_BEGIN: %d\n", FIX_BTMAP_BEGIN);
}
}

void __init early_ioremap_clear(void)
Expand Down

0 comments on commit 0e3a954

Please sign in to comment.