|
@@ -18,6 +18,7 @@
|
|
|
|
|
|
#include <asm/iomap.h>
|
|
#include <asm/iomap.h>
|
|
#include <asm/pat.h>
|
|
#include <asm/pat.h>
|
|
|
|
+#include <asm/highmem.h>
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
|
|
|
|
int is_io_mapping_possible(resource_size_t base, unsigned long size)
|
|
int is_io_mapping_possible(resource_size_t base, unsigned long size)
|
|
@@ -36,11 +37,6 @@ EXPORT_SYMBOL_GPL(is_io_mapping_possible);
|
|
void *
|
|
void *
|
|
iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
|
|
iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
|
|
{
|
|
{
|
|
- enum fixed_addresses idx;
|
|
|
|
- unsigned long vaddr;
|
|
|
|
-
|
|
|
|
- pagefault_disable();
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* For non-PAT systems, promote PAGE_KERNEL_WC to PAGE_KERNEL_UC_MINUS.
|
|
* For non-PAT systems, promote PAGE_KERNEL_WC to PAGE_KERNEL_UC_MINUS.
|
|
* PAGE_KERNEL_WC maps to PWT, which translates to uncached if the
|
|
* PAGE_KERNEL_WC maps to PWT, which translates to uncached if the
|
|
@@ -50,12 +46,7 @@ iomap_atomic_prot_pfn(unsigned long pfn, enum km_type type, pgprot_t prot)
|
|
if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC))
|
|
if (!pat_enabled && pgprot_val(prot) == pgprot_val(PAGE_KERNEL_WC))
|
|
prot = PAGE_KERNEL_UC_MINUS;
|
|
prot = PAGE_KERNEL_UC_MINUS;
|
|
|
|
|
|
- idx = type + KM_TYPE_NR*smp_processor_id();
|
|
|
|
- vaddr = __fix_to_virt(FIX_KMAP_BEGIN + idx);
|
|
|
|
- set_pte(kmap_pte-idx, pfn_pte(pfn, prot));
|
|
|
|
- arch_flush_lazy_mmu_mode();
|
|
|
|
-
|
|
|
|
- return (void*) vaddr;
|
|
|
|
|
|
+ return kmap_atomic_prot_pfn(pfn, type, prot);
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn);
|
|
EXPORT_SYMBOL_GPL(iomap_atomic_prot_pfn);
|
|
|
|
|