diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2009-03-11 10:34:50 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-11 10:47:46 -0400 |
commit | 12074fa1073013dd11f1cff41db018d5cff4ecd9 (patch) | |
tree | c1817acddbbe99b0093340598c1c35f96abb8502 | |
parent | bb6d59ca927d855ffac567b35c0a790c67016103 (diff) |
x86: debug check for kmap_atomic_pfn and iomap_atomic_prot_pfn()
It may be useful for kmap_atomic_pfn() and iomap_atomic_prot_pfn()
to check invalid kmap usage as well as kmap_atomic.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
LKML-Reference: <20090311143449.GB22244@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/mm/highmem_32.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c index ae4c8dae2669..f256e73542d7 100644 --- a/arch/x86/mm/highmem_32.c +++ b/arch/x86/mm/highmem_32.c | |||
@@ -128,6 +128,8 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) | |||
128 | 128 | ||
129 | pagefault_disable(); | 129 | pagefault_disable(); |
130 | 130 | ||
131 | debug_kmap_atomic_prot(type); | ||
132 | |||
131 | idx = type + KM_TYPE_NR * smp_processor_id(); | 133 | idx = type + KM_TYPE_NR * smp_processor_id(); |
132 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | 134 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); |
133 | set_pte(kmap_pte - idx, pfn_pte(pfn, prot)); | 135 | set_pte(kmap_pte - idx, pfn_pte(pfn, prot)); |