diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/iomap.h | 3 | ||||
-rw-r--r-- | arch/x86/mm/iomap_32.c | 18 |
2 files changed, 21 insertions, 0 deletions
diff --git a/arch/x86/include/asm/iomap.h b/arch/x86/include/asm/iomap.h index c1f06289b14b..86af26091d6c 100644 --- a/arch/x86/include/asm/iomap.h +++ b/arch/x86/include/asm/iomap.h | |||
@@ -23,6 +23,9 @@ | |||
23 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
24 | #include <asm/tlbflush.h> | 24 | #include <asm/tlbflush.h> |
25 | 25 | ||
26 | int | ||
27 | is_io_mapping_possible(resource_size_t base, unsigned long size); | ||
28 | |||
26 | void * | 29 | void * |
27 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot); | 30 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot); |
28 | 31 | ||
diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c index ca53224fc56c..6c2b1af16926 100644 --- a/arch/x86/mm/iomap_32.c +++ b/arch/x86/mm/iomap_32.c | |||
@@ -20,6 +20,24 @@ | |||
20 | #include <asm/pat.h> | 20 | #include <asm/pat.h> |
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | 22 | ||
23 | #ifdef CONFIG_X86_PAE | ||
24 | int | ||
25 | is_io_mapping_possible(resource_size_t base, unsigned long size) | ||
26 | { | ||
27 | return 1; | ||
28 | } | ||
29 | #else | ||
30 | int | ||
31 | is_io_mapping_possible(resource_size_t base, unsigned long size) | ||
32 | { | ||
33 | /* There is no way to map greater than 1 << 32 address without PAE */ | ||
34 | if (base + size > 0x100000000ULL) | ||
35 | return 0; | ||
36 | |||
37 | return 1; | ||
38 | } | ||
39 | #endif | ||
40 | |||
23 | /* Map 'pfn' using fixed map 'type' and protections 'prot' | 41 | /* Map 'pfn' using fixed map 'type' and protections 'prot' |
24 | */ | 42 | */ |
25 | void * | 43 | void * |