summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/include/asm/highmem.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/microblaze/include/asm/highmem.h')
-rw-r--r--arch/microblaze/include/asm/highmem.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/microblaze/include/asm/highmem.h b/arch/microblaze/include/asm/highmem.h
index 0c94046f2d58..c38d920a1171 100644
--- a/arch/microblaze/include/asm/highmem.h
+++ b/arch/microblaze/include/asm/highmem.h
@@ -51,7 +51,16 @@ extern pte_t *pkmap_page_table;
#define PKMAP_NR(virt) ((virt - PKMAP_BASE) >> PAGE_SHIFT)
#define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT))
-extern void *kmap_atomic_prot(struct page *page, pgprot_t prot);
+extern void *kmap_atomic_high_prot(struct page *page, pgprot_t prot);
+static inline void *kmap_atomic_prot(struct page *page, pgprot_t prot)
+{
+ preempt_disable();
+ pagefault_disable();
+ if (!PageHighMem(page))
+ return page_address(page);
+
+ return kmap_atomic_high_prot(page, prot);
+}
extern void __kunmap_atomic(void *kvaddr);
static inline void *kmap_atomic(struct page *page)