diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2009-04-07 16:34:16 -0400 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2009-04-07 16:34:16 -0400 |
commit | 38f4b8c0da01ae7cd9b93386842ce272d6fde9ab (patch) | |
tree | 3c8c52201aac038094bfea7efdd0984a8f62045e /arch/x86/mm/iomap_32.c | |
parent | a811454027352c762e0d5bba1b1d8f7d26bf96ae (diff) | |
parent | 8e2c4f2844c0e8dcdfe312e5f2204854ca8532c6 (diff) |
Merge commit 'origin/master' into for-linus/xen/master
* commit 'origin/master': (4825 commits)
Fix build errors due to CONFIG_BRANCH_TRACER=y
parport: Use the PCI IRQ if offered
tty: jsm cleanups
Adjust path to gpio headers
KGDB_SERIAL_CONSOLE check for module
Change KCONFIG name
tty: Blackin CTS/RTS
Change hardware flow control from poll to interrupt driven
Add support for the MAX3100 SPI UART.
lanana: assign a device name and numbering for MAX3100
serqt: initial clean up pass for tty side
tty: Use the generic RS485 ioctl on CRIS
tty: Correct inline types for tty_driver_kref_get()
splice: fix deadlock in splicing to file
nilfs2: support nanosecond timestamp
nilfs2: introduce secondary super block
nilfs2: simplify handling of active state of segments
nilfs2: mark minor flag for checkpoint created by internal operation
nilfs2: clean up sketch file
nilfs2: super block operations fix endian bug
...
Conflicts:
arch/x86/include/asm/thread_info.h
arch/x86/lguest/boot.c
drivers/xen/manage.c
Diffstat (limited to 'arch/x86/mm/iomap_32.c')
-rw-r--r-- | arch/x86/mm/iomap_32.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/arch/x86/mm/iomap_32.c b/arch/x86/mm/iomap_32.c index b6a61f3d7ef8..fe6f84ca121e 100644 --- a/arch/x86/mm/iomap_32.c +++ b/arch/x86/mm/iomap_32.c | |||
@@ -19,10 +19,11 @@ | |||
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 | ||
23 | int is_io_mapping_possible(resource_size_t base, unsigned long size) | 24 | int is_io_mapping_possible(resource_size_t base, unsigned long size) |
24 | { | 25 | { |
25 | #ifndef CONFIG_X86_PAE | 26 | #if !defined(CONFIG_X86_PAE) && defined(CONFIG_PHYS_ADDR_T_64BIT) |
26 | /* There is no way to map greater than 1 << 32 address without PAE */ | 27 | /* There is no way to map greater than 1 << 32 address without PAE */ |
27 | if (base + size > 0x100000000ULL) | 28 | if (base + size > 0x100000000ULL) |
28 | return 0; | 29 | return 0; |
@@ -31,16 +32,28 @@ int is_io_mapping_possible(resource_size_t base, unsigned long size) | |||
31 | } | 32 | } |
32 | EXPORT_SYMBOL_GPL(is_io_mapping_possible); | 33 | EXPORT_SYMBOL_GPL(is_io_mapping_possible); |
33 | 34 | ||
34 | /* Map 'pfn' using fixed map 'type' and protections 'prot' | 35 | void *kmap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) |
35 | */ | ||
36 | void * | ||
37 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) | ||
38 | { | 36 | { |
39 | enum fixed_addresses idx; | 37 | enum fixed_addresses idx; |
40 | unsigned long vaddr; | 38 | unsigned long vaddr; |
41 | 39 | ||
42 | pagefault_disable(); | 40 | pagefault_disable(); |
43 | 41 | ||
42 | debug_kmap_atomic(type); | ||
43 | idx = type + KM_TYPE_NR * smp_processor_id(); | ||
44 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | ||
45 | set_pte(kmap_pte - idx, pfn_pte(pfn, prot)); | ||
46 | arch_flush_lazy_mmu_mode(); | ||
47 | |||
48 | return (void *)vaddr; | ||
49 | } | ||
50 | |||
51 | /* | ||
52 | * Map 'pfn' using fixed map 'type' and protections 'prot' | ||
53 | */ | ||
54 | void * | ||
55 | iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) | ||
56 | { | ||
44 | /* | 57 | /* |
45 | * For non-PAT systems, promote PAGE_KERNEL_WC to PAGE_KERNEL_UC_MINUS. | 58 | * For non-PAT systems, promote PAGE_KERNEL_WC to PAGE_KERNEL_UC_MINUS. |
46 | * PAGE_KERNEL_WC maps to PWT, which translates to uncached if the | 59 | * PAGE_KERNEL_WC maps to PWT, which translates to uncached if the |
@@ -50,12 +63,7 @@ iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot) | |||
50 | if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC)) | 63 | if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC)) |
51 | prot = PAGE_KERNEL_UC_MINUS; | 64 | prot = PAGE_KERNEL_UC_MINUS; |
52 | 65 | ||
53 | idx = type + KM_TYPE_NR*smp_processor_id(); | 66 | return kmap_atomic_prot_pfn(pfn, type, prot); |
54 | vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx); | ||
55 | set_pte(kmap_pte-idx, pfn_pte(pfn, prot)); | ||
56 | arch_flush_lazy_mmu_mode(); | ||
57 | |||
58 | return (void*) vaddr; | ||
59 | } | 67 | } |
60 | EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn); | 68 | EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn); |
61 | 69 | ||