diff options
-rw-r--r-- | arch/x86/mm/ioremap.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 62773abdf088..96786ef2c9a9 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -504,13 +504,19 @@ static inline pte_t * __init early_ioremap_pte(unsigned long addr) | |||
504 | return &bm_pte[pte_index(addr)]; | 504 | return &bm_pte[pte_index(addr)]; |
505 | } | 505 | } |
506 | 506 | ||
507 | static unsigned long slot_virt[FIX_BTMAPS_SLOTS] __initdata; | ||
508 | |||
507 | void __init early_ioremap_init(void) | 509 | void __init early_ioremap_init(void) |
508 | { | 510 | { |
509 | pmd_t *pmd; | 511 | pmd_t *pmd; |
512 | int i; | ||
510 | 513 | ||
511 | if (early_ioremap_debug) | 514 | if (early_ioremap_debug) |
512 | printk(KERN_INFO "early_ioremap_init()\n"); | 515 | printk(KERN_INFO "early_ioremap_init()\n"); |
513 | 516 | ||
517 | for (i = 0; i < FIX_BTMAPS_SLOTS; i++) | ||
518 | slot_virt[i] = fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i); | ||
519 | |||
514 | pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); | 520 | pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); |
515 | memset(bm_pte, 0, sizeof(bm_pte)); | 521 | memset(bm_pte, 0, sizeof(bm_pte)); |
516 | pmd_populate_kernel(&init_mm, pmd, bm_pte); | 522 | pmd_populate_kernel(&init_mm, pmd, bm_pte); |
@@ -577,6 +583,7 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx) | |||
577 | 583 | ||
578 | static void __iomem *prev_map[FIX_BTMAPS_SLOTS] __initdata; | 584 | static void __iomem *prev_map[FIX_BTMAPS_SLOTS] __initdata; |
579 | static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initdata; | 585 | static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initdata; |
586 | |||
580 | static int __init check_early_ioremap_leak(void) | 587 | static int __init check_early_ioremap_leak(void) |
581 | { | 588 | { |
582 | int count = 0; | 589 | int count = 0; |
@@ -598,7 +605,8 @@ static int __init check_early_ioremap_leak(void) | |||
598 | } | 605 | } |
599 | late_initcall(check_early_ioremap_leak); | 606 | late_initcall(check_early_ioremap_leak); |
600 | 607 | ||
601 | static void __init __iomem *__early_ioremap(unsigned long phys_addr, unsigned long size, pgprot_t prot) | 608 | static void __init __iomem * |
609 | __early_ioremap(unsigned long phys_addr, unsigned long size, pgprot_t prot) | ||
602 | { | 610 | { |
603 | unsigned long offset, last_addr; | 611 | unsigned long offset, last_addr; |
604 | unsigned int nrpages; | 612 | unsigned int nrpages; |
@@ -664,9 +672,9 @@ static void __init __iomem *__early_ioremap(unsigned long phys_addr, unsigned lo | |||
664 | --nrpages; | 672 | --nrpages; |
665 | } | 673 | } |
666 | if (early_ioremap_debug) | 674 | if (early_ioremap_debug) |
667 | printk(KERN_CONT "%08lx + %08lx\n", offset, fix_to_virt(idx0)); | 675 | printk(KERN_CONT "%08lx + %08lx\n", offset, slot_virt[slot]); |
668 | 676 | ||
669 | prev_map[slot] = (void __iomem *)(offset + fix_to_virt(idx0)); | 677 | prev_map[slot] = (void __iomem *)(offset + slot_virt[slot]); |
670 | return prev_map[slot]; | 678 | return prev_map[slot]; |
671 | } | 679 | } |
672 | 680 | ||
@@ -734,8 +742,3 @@ void __init early_iounmap(void __iomem *addr, unsigned long size) | |||
734 | } | 742 | } |
735 | prev_map[slot] = NULL; | 743 | prev_map[slot] = NULL; |
736 | } | 744 | } |
737 | |||
738 | void __this_fixmap_does_not_exist(void) | ||
739 | { | ||
740 | WARN_ON(1); | ||
741 | } | ||