aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/mm/ioremap.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 55e127f71ed9..83ed74affba9 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -487,12 +487,7 @@ static int __init early_ioremap_debug_setup(char *str)
487early_param("early_ioremap_debug", early_ioremap_debug_setup); 487early_param("early_ioremap_debug", early_ioremap_debug_setup);
488 488
489static __initdata int after_paging_init; 489static __initdata int after_paging_init;
490#define __FIXADDR_TOP (-PAGE_SIZE) 490static pte_t bm_pte[PAGE_SIZE/sizeof(pte_t)] __page_aligned_bss;
491static pte_t bm_pte[(__fix_to_virt(FIX_DBGP_BASE)
492 ^ __fix_to_virt(FIX_BTMAP_BEGIN)) >> PMD_SHIFT
493 ? PAGE_SIZE / sizeof(pte_t) : 0] __page_aligned_bss;
494#undef __FIXADDR_TOP
495static __initdata pte_t *bm_ptep;
496 491
497static inline pmd_t * __init early_ioremap_pmd(unsigned long addr) 492static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
498{ 493{
@@ -507,8 +502,6 @@ static inline pmd_t * __init early_ioremap_pmd(unsigned long addr)
507 502
508static inline pte_t * __init early_ioremap_pte(unsigned long addr) 503static inline pte_t * __init early_ioremap_pte(unsigned long addr)
509{ 504{
510 if (!sizeof(bm_pte))
511 return &bm_ptep[pte_index(addr)];
512 return &bm_pte[pte_index(addr)]; 505 return &bm_pte[pte_index(addr)];
513} 506}
514 507
@@ -526,14 +519,8 @@ void __init early_ioremap_init(void)
526 slot_virt[i] = fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i); 519 slot_virt[i] = fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i);
527 520
528 pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); 521 pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN));
529 if (sizeof(bm_pte)) { 522 memset(bm_pte, 0, sizeof(bm_pte));
530 memset(bm_pte, 0, sizeof(bm_pte)); 523 pmd_populate_kernel(&init_mm, pmd, bm_pte);
531 pmd_populate_kernel(&init_mm, pmd, bm_pte);
532 } else {
533 bm_ptep = pte_offset_kernel(pmd, 0);
534 if (early_ioremap_debug)
535 printk(KERN_INFO "bm_ptep=%p\n", bm_ptep);
536 }
537 524
538 /* 525 /*
539 * The boot-ioremap range spans multiple pmds, for which 526 * The boot-ioremap range spans multiple pmds, for which