aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-06-15 06:40:41 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-15 09:57:52 -0400
commit3ff0141aa3a03ca3388b40b36167d0a37919f3fd (patch)
tree9101842f3cf1ca5f69857586bc6feb247ff6d494 /arch
parent465a454f254ee2ff7acc4aececbe31f8af046bc0 (diff)
x86: Add NMI types for kmap_atomic
Two new kmap_atomic slots for NMI context. And teach pte_offset_map() about NMI context. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> CC: Nick Piggin <npiggin@suse.de> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/kmap_types.h4
-rw-r--r--arch/x86/include/asm/pgtable_32.h5
2 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/include/asm/kmap_types.h b/arch/x86/include/asm/kmap_types.h
index 5759c165a5cf..ff00a44b7d0d 100644
--- a/arch/x86/include/asm/kmap_types.h
+++ b/arch/x86/include/asm/kmap_types.h
@@ -21,7 +21,9 @@ D(9) KM_IRQ0,
21D(10) KM_IRQ1, 21D(10) KM_IRQ1,
22D(11) KM_SOFTIRQ0, 22D(11) KM_SOFTIRQ0,
23D(12) KM_SOFTIRQ1, 23D(12) KM_SOFTIRQ1,
24D(13) KM_TYPE_NR 24D(13) KM_NMI,
25D(14) KM_NMI_PTE,
26D(15) KM_TYPE_NR
25}; 27};
26 28
27#undef D 29#undef D
diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h
index 31bd120cf2a2..85464971bca0 100644
--- a/arch/x86/include/asm/pgtable_32.h
+++ b/arch/x86/include/asm/pgtable_32.h
@@ -49,13 +49,14 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
49#endif 49#endif
50 50
51#if defined(CONFIG_HIGHPTE) 51#if defined(CONFIG_HIGHPTE)
52#define __KM_PTE (in_nmi() ? KM_NMI_PTE : KM_PTE0)
52#define pte_offset_map(dir, address) \ 53#define pte_offset_map(dir, address) \
53 ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE0) + \ 54 ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), __KM_PTE) + \
54 pte_index((address))) 55 pte_index((address)))
55#define pte_offset_map_nested(dir, address) \ 56#define pte_offset_map_nested(dir, address) \
56 ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE1) + \ 57 ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE1) + \
57 pte_index((address))) 58 pte_index((address)))
58#define pte_unmap(pte) kunmap_atomic((pte), KM_PTE0) 59#define pte_unmap(pte) kunmap_atomic((pte), __KM_PTE)
59#define pte_unmap_nested(pte) kunmap_atomic((pte), KM_PTE1) 60#define pte_unmap_nested(pte) kunmap_atomic((pte), KM_PTE1)
60#else 61#else
61#define pte_offset_map(dir, address) \ 62#define pte_offset_map(dir, address) \