提交 45c7b28f 编写于 作者: J Jeremy Fitzhardinge 提交者: Ingo Molnar

Revert "x86: create a non-zero sized bm_pte only when needed"

This reverts commit 698609bd.

69860 breaks Xen booting, as it relies on head*.S to set up the fixmap
pagetables (as a side-effect of initializing the USB debug port).
Xen, however, does not boot via head*.S, and so the fixmap area is
not initialized.

The specific symptom of the crash is a fault in dmi_scan(), because
the pointer that early_ioremap returns is not actually present.
Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Jan Beulich <jbeulich@novell.com>
LKML-Reference: <49C43A8E.5090203@goop.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 0f350755
...@@ -487,12 +487,7 @@ static int __init early_ioremap_debug_setup(char *str) ...@@ -487,12 +487,7 @@ static int __init early_ioremap_debug_setup(char *str)
early_param("early_ioremap_debug", early_ioremap_debug_setup); early_param("early_ioremap_debug", early_ioremap_debug_setup);
static __initdata int after_paging_init; static __initdata int after_paging_init;
#define __FIXADDR_TOP (-PAGE_SIZE) static pte_t bm_pte[PAGE_SIZE/sizeof(pte_t)] __page_aligned_bss;
static pte_t bm_pte[(__fix_to_virt(FIX_DBGP_BASE)
^ __fix_to_virt(FIX_BTMAP_BEGIN)) >> PMD_SHIFT
? PAGE_SIZE / sizeof(pte_t) : 0] __page_aligned_bss;
#undef __FIXADDR_TOP
static __initdata pte_t *bm_ptep;
static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
{ {
...@@ -507,8 +502,6 @@ static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) ...@@ -507,8 +502,6 @@ static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
static inline pte_t * __init early_ioremap_pte(unsigned long addr) static inline pte_t * __init early_ioremap_pte(unsigned long addr)
{ {
if (!sizeof(bm_pte))
return &bm_ptep[pte_index(addr)];
return &bm_pte[pte_index(addr)]; return &bm_pte[pte_index(addr)];
} }
...@@ -526,14 +519,8 @@ void __init early_ioremap_init(void) ...@@ -526,14 +519,8 @@ void __init early_ioremap_init(void)
slot_virt[i] = fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i); slot_virt[i] = fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i);
pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN));
if (sizeof(bm_pte)) { memset(bm_pte, 0, sizeof(bm_pte));
memset(bm_pte, 0, sizeof(bm_pte)); pmd_populate_kernel(&init_mm, pmd, bm_pte);
pmd_populate_kernel(&init_mm, pmd, bm_pte);
} else {
bm_ptep = pte_offset_kernel(pmd, 0);
if (early_ioremap_debug)
printk(KERN_INFO "bm_ptep=%p\n", bm_ptep);
}
/* /*
* The boot-ioremap range spans multiple pmds, for which * The boot-ioremap range spans multiple pmds, for which
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册