aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2009-03-31 18:23:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-01 11:59:14 -0400
commit7ca43e7564679604d86e9ed834e7bbcffd8a4a3f (patch)
tree575e21270d7c8284f54b1e91eb5dd128ae03d713
parentf4112de6b679d84bd9b9681c7504be7bdfb7c7d5 (diff)
mm: use debug_kmap_atomic
Use debug_kmap_atomic in kmap_atomic, kmap_atomic_pfn, and iomap_atomic_prot_pfn. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/mips/mm/highmem.c2
-rw-r--r--arch/powerpc/include/asm/highmem.h2
-rw-r--r--arch/sparc/mm/highmem.c1
-rw-r--r--arch/x86/mm/highmem_32.c1
-rw-r--r--arch/x86/mm/iomap_32.c2
-rw-r--r--include/asm-frv/highmem.h2
-rw-r--r--include/asm-mn10300/highmem.h2
7 files changed, 12 insertions, 0 deletions
diff --git a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c
index 060d28dca8a8..4481656d1065 100644
--- a/arch/mips/mm/highmem.c
+++ b/arch/mips/mm/highmem.c
@@ -42,6 +42,7 @@ void *__kmap_atomic(struct page *page, enum km_type type)
42 if (!PageHighMem(page)) 42 if (!PageHighMem(page))
43 return page_address(page); 43 return page_address(page);
44 44
45 debug_kmap_atomic(type);
45 idx = type + KM_TYPE_NR*smp_processor_id(); 46 idx = type + KM_TYPE_NR*smp_processor_id();
46 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 47 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
47#ifdef CONFIG_DEBUG_HIGHMEM 48#ifdef CONFIG_DEBUG_HIGHMEM
@@ -88,6 +89,7 @@ void *kmap_atomic_pfn(unsigned long pfn, enum km_type type)
88 89
89 pagefault_disable(); 90 pagefault_disable();
90 91
92 debug_kmap_atomic(type);
91 idx = type + KM_TYPE_NR*smp_processor_id(); 93 idx = type + KM_TYPE_NR*smp_processor_id();
92 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 94 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
93 set_pte(kmap_pte-idx, pfn_pte(pfn, kmap_prot)); 95 set_pte(kmap_pte-idx, pfn_pte(pfn, kmap_prot));
diff --git a/arch/powerpc/include/asm/highmem.h b/arch/powerpc/include/asm/highmem.h
index 545028f86488..684a73f4324f 100644
--- a/arch/powerpc/include/asm/highmem.h
+++ b/arch/powerpc/include/asm/highmem.h
@@ -24,6 +24,7 @@
24 24
25#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <linux/highmem.h>
27#include <asm/kmap_types.h> 28#include <asm/kmap_types.h>
28#include <asm/tlbflush.h> 29#include <asm/tlbflush.h>
29#include <asm/page.h> 30#include <asm/page.h>
@@ -94,6 +95,7 @@ static inline void *kmap_atomic_prot(struct page *page, enum km_type type, pgpro
94 if (!PageHighMem(page)) 95 if (!PageHighMem(page))
95 return page_address(page); 96 return page_address(page);
96 97
98 debug_kmap_atomic(type);
97 idx = type + KM_TYPE_NR*smp_processor_id(); 99 idx = type + KM_TYPE_NR*smp_processor_id();
98 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 100 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
99#ifdef CONFIG_DEBUG_HIGHMEM 101#ifdef CONFIG_DEBUG_HIGHMEM
diff --git a/arch/sparc/mm/highmem.c b/arch/sparc/mm/highmem.c
index 752d0c9fb544..7916feba6e4a 100644
--- a/arch/sparc/mm/highmem.c
+++ b/arch/sparc/mm/highmem.c
@@ -39,6 +39,7 @@ void *kmap_atomic(struct page *page, enum km_type type)
39 if (!PageHighMem(page)) 39 if (!PageHighMem(page))
40 return page_address(page); 40 return page_address(page);
41 41
42 debug_kmap_atomic(type);
42 idx = type + KM_TYPE_NR*smp_processor_id(); 43 idx = type + KM_TYPE_NR*smp_processor_id();
43 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 44 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
44 45
diff --git a/arch/x86/mm/highmem_32.c b/arch/x86/mm/highmem_32.c
index 8126e8d1a2a4..5bc5d1688c1c 100644
--- a/arch/x86/mm/highmem_32.c
+++ b/arch/x86/mm/highmem_32.c
@@ -40,6 +40,7 @@ void *kmap_atomic_prot(struct page *page, enum km_type type, pgprot_t prot)
40 40
41 debug_kmap_atomic(type); 41 debug_kmap_atomic(type);
42 42
43 debug_kmap_atomic(type);
43 idx = type + KM_TYPE_NR*smp_processor_id(); 44 idx = type + KM_TYPE_NR*smp_processor_id();
44 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 45 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
45 BUG_ON(!pte_none(*(kmap_pte-idx))); 46 BUG_ON(!pte_none(*(kmap_pte-idx)));
diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c
index 699c9b2895ae..bff0c9032f8c 100644
--- a/arch/x86/mm/iomap_32.c
+++ b/arch/x86/mm/iomap_32.c
@@ -19,6 +19,7 @@
19#include <asm/iomap.h> 19#include <asm/iomap.h>
20#include <asm/pat.h> 20#include <asm/pat.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/highmem.h>
22 23
23int is_io_mapping_possible(resource_size_t base, unsigned long size) 24int is_io_mapping_possible(resource_size_t base, unsigned long size)
24{ 25{
@@ -71,6 +72,7 @@ iounmap_atomic(void *kvaddr, enum km_type type)
71 unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; 72 unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
72 enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id(); 73 enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();
73 74
75 debug_kmap_atomic(type);
74 /* 76 /*
75 * Force other mappings to Oops if they'll try to access this pte 77 * Force other mappings to Oops if they'll try to access this pte
76 * without first remap it. Keeping stale mappings around is a bad idea 78 * without first remap it. Keeping stale mappings around is a bad idea
diff --git a/include/asm-frv/highmem.h b/include/asm-frv/highmem.h
index 26cefcde5cee..68e4677fb9e7 100644
--- a/include/asm-frv/highmem.h
+++ b/include/asm-frv/highmem.h
@@ -18,6 +18,7 @@
18#ifdef __KERNEL__ 18#ifdef __KERNEL__
19 19
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/highmem.h>
21#include <asm/mem-layout.h> 22#include <asm/mem-layout.h>
22#include <asm/spr-regs.h> 23#include <asm/spr-regs.h>
23#include <asm/mb-regs.h> 24#include <asm/mb-regs.h>
@@ -116,6 +117,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type)
116 unsigned long paddr; 117 unsigned long paddr;
117 118
118 pagefault_disable(); 119 pagefault_disable();
120 debug_kmap_atomic(type);
119 paddr = page_to_phys(page); 121 paddr = page_to_phys(page);
120 122
121 switch (type) { 123 switch (type) {
diff --git a/include/asm-mn10300/highmem.h b/include/asm-mn10300/highmem.h
index 5256854c0453..90f2abb04bfd 100644
--- a/include/asm-mn10300/highmem.h
+++ b/include/asm-mn10300/highmem.h
@@ -16,6 +16,7 @@
16 16
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/highmem.h>
19#include <asm/kmap_types.h> 20#include <asm/kmap_types.h>
20#include <asm/pgtable.h> 21#include <asm/pgtable.h>
21 22
@@ -77,6 +78,7 @@ static inline unsigned long kmap_atomic(struct page *page, enum km_type type)
77 if (page < highmem_start_page) 78 if (page < highmem_start_page)
78 return page_address(page); 79 return page_address(page);
79 80
81 debug_kmap_atomic(type);
80 idx = type + KM_TYPE_NR * smp_processor_id(); 82 idx = type + KM_TYPE_NR * smp_processor_id();
81 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); 83 vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
82#if HIGHMEM_DEBUG 84#if HIGHMEM_DEBUG