diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-10 05:16:17 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-10 05:17:48 -0400 |
commit | 8293dd6f86e759068ce918aa10ca9c5d6d711cd0 (patch) | |
tree | de366d69078bf2b98c6765fa4ec1cc652f3d3173 /arch/x86/mm/ioremap.c | |
parent | 631595fbf4aeac260e664a8a002897e4db6a50dd (diff) | |
parent | 467c88fee51e2ae862e9485245687da0730e29aa (diff) |
Merge branch 'x86/core' into tracing/ftrace
Semantic merge:
kernel/trace/trace_functions_graph.c
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/ioremap.c')
-rw-r--r-- | arch/x86/mm/ioremap.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 62773abdf088..aca924a30ee6 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -87,6 +87,8 @@ bool __virt_addr_valid(unsigned long x) | |||
87 | return false; | 87 | return false; |
88 | if (__vmalloc_start_set && is_vmalloc_addr((void *) x)) | 88 | if (__vmalloc_start_set && is_vmalloc_addr((void *) x)) |
89 | return false; | 89 | return false; |
90 | if (x >= FIXADDR_START) | ||
91 | return false; | ||
90 | return pfn_valid((x - PAGE_OFFSET) >> PAGE_SHIFT); | 92 | return pfn_valid((x - PAGE_OFFSET) >> PAGE_SHIFT); |
91 | } | 93 | } |
92 | EXPORT_SYMBOL(__virt_addr_valid); | 94 | EXPORT_SYMBOL(__virt_addr_valid); |
@@ -504,13 +506,19 @@ static inline pte_t * __init early_ioremap_pte(unsigned long addr) | |||
504 | return &bm_pte[pte_index(addr)]; | 506 | return &bm_pte[pte_index(addr)]; |
505 | } | 507 | } |
506 | 508 | ||
509 | static unsigned long slot_virt[FIX_BTMAPS_SLOTS] __initdata; | ||
510 | |||
507 | void __init early_ioremap_init(void) | 511 | void __init early_ioremap_init(void) |
508 | { | 512 | { |
509 | pmd_t *pmd; | 513 | pmd_t *pmd; |
514 | int i; | ||
510 | 515 | ||
511 | if (early_ioremap_debug) | 516 | if (early_ioremap_debug) |
512 | printk(KERN_INFO "early_ioremap_init()\n"); | 517 | printk(KERN_INFO "early_ioremap_init()\n"); |
513 | 518 | ||
519 | for (i = 0; i < FIX_BTMAPS_SLOTS; i++) | ||
520 | slot_virt[i] = fix_to_virt(FIX_BTMAP_BEGIN - NR_FIX_BTMAPS*i); | ||
521 | |||
514 | pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); | 522 | pmd = early_ioremap_pmd(fix_to_virt(FIX_BTMAP_BEGIN)); |
515 | memset(bm_pte, 0, sizeof(bm_pte)); | 523 | memset(bm_pte, 0, sizeof(bm_pte)); |
516 | pmd_populate_kernel(&init_mm, pmd, bm_pte); | 524 | pmd_populate_kernel(&init_mm, pmd, bm_pte); |
@@ -577,6 +585,7 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx) | |||
577 | 585 | ||
578 | static void __iomem *prev_map[FIX_BTMAPS_SLOTS] __initdata; | 586 | static void __iomem *prev_map[FIX_BTMAPS_SLOTS] __initdata; |
579 | static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initdata; | 587 | static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initdata; |
588 | |||
580 | static int __init check_early_ioremap_leak(void) | 589 | static int __init check_early_ioremap_leak(void) |
581 | { | 590 | { |
582 | int count = 0; | 591 | int count = 0; |
@@ -598,7 +607,8 @@ static int __init check_early_ioremap_leak(void) | |||
598 | } | 607 | } |
599 | late_initcall(check_early_ioremap_leak); | 608 | late_initcall(check_early_ioremap_leak); |
600 | 609 | ||
601 | static void __init __iomem *__early_ioremap(unsigned long phys_addr, unsigned long size, pgprot_t prot) | 610 | static void __init __iomem * |
611 | __early_ioremap(unsigned long phys_addr, unsigned long size, pgprot_t prot) | ||
602 | { | 612 | { |
603 | unsigned long offset, last_addr; | 613 | unsigned long offset, last_addr; |
604 | unsigned int nrpages; | 614 | unsigned int nrpages; |
@@ -664,9 +674,9 @@ static void __init __iomem *__early_ioremap(unsigned long phys_addr, unsigned lo | |||
664 | --nrpages; | 674 | --nrpages; |
665 | } | 675 | } |
666 | if (early_ioremap_debug) | 676 | if (early_ioremap_debug) |
667 | printk(KERN_CONT "%08lx + %08lx\n", offset, fix_to_virt(idx0)); | 677 | printk(KERN_CONT "%08lx + %08lx\n", offset, slot_virt[slot]); |
668 | 678 | ||
669 | prev_map[slot] = (void __iomem *)(offset + fix_to_virt(idx0)); | 679 | prev_map[slot] = (void __iomem *)(offset + slot_virt[slot]); |
670 | return prev_map[slot]; | 680 | return prev_map[slot]; |
671 | } | 681 | } |
672 | 682 | ||
@@ -734,8 +744,3 @@ void __init early_iounmap(void __iomem *addr, unsigned long size) | |||
734 | } | 744 | } |
735 | prev_map[slot] = NULL; | 745 | prev_map[slot] = NULL; |
736 | } | 746 | } |
737 | |||
738 | void __this_fixmap_does_not_exist(void) | ||
739 | { | ||
740 | WARN_ON(1); | ||
741 | } | ||