diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/mm/highmem.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/arch/i386/mm/highmem.c b/arch/i386/mm/highmem.c index 178bbfe6cbac..e0fa6cb655a8 100644 --- a/arch/i386/mm/highmem.c +++ b/arch/i386/mm/highmem.c | |||
@@ -50,22 +50,20 @@ void kunmap_atomic(void *kvaddr, enum km_type type) | |||
50 | unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; | 50 | unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; |
51 | enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id(); | 51 | enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id(); |
52 | 52 | ||
53 | #ifdef CONFIG_DEBUG_HIGHMEM | ||
54 | if (vaddr >= PAGE_OFFSET && vaddr < (unsigned long)high_memory) { | ||
55 | pagefault_enable(); | ||
56 | return; | ||
57 | } | ||
58 | |||
59 | if (vaddr != __fix_to_virt(FIX_KMAP_BEGIN+idx)) | ||
60 | BUG(); | ||
61 | #endif | ||
62 | /* | 53 | /* |
63 | * Force other mappings to Oops if they'll try to access this pte | 54 | * Force other mappings to Oops if they'll try to access this pte |
64 | * without first remap it. Keeping stale mappings around is a bad idea | 55 | * without first remap it. Keeping stale mappings around is a bad idea |
65 | * also, in case the page changes cacheability attributes or becomes | 56 | * also, in case the page changes cacheability attributes or becomes |
66 | * a protected page in a hypervisor. | 57 | * a protected page in a hypervisor. |
67 | */ | 58 | */ |
68 | kpte_clear_flush(kmap_pte-idx, vaddr); | 59 | if (vaddr == __fix_to_virt(FIX_KMAP_BEGIN+idx)) |
60 | kpte_clear_flush(kmap_pte-idx, vaddr); | ||
61 | else { | ||
62 | #ifdef CONFIG_DEBUG_HIGHMEM | ||
63 | BUG_ON(vaddr < PAGE_OFFSET); | ||
64 | BUG_ON(vaddr >= (unsigned long)high_memory); | ||
65 | #endif | ||
66 | } | ||
69 | 67 | ||
70 | pagefault_enable(); | 68 | pagefault_enable(); |
71 | } | 69 | } |