--- zzzz-none-000/linux-3.10.107/arch/mn10300/include/asm/highmem.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/mn10300/include/asm/highmem.h 2021-02-04 17:41:59.000000000 +0000 @@ -70,11 +70,12 @@ * be used in IRQ contexts, so in some (very limited) cases we need * it. */ -static inline unsigned long kmap_atomic(struct page *page) +static inline void *kmap_atomic(struct page *page) { unsigned long vaddr; int idx, type; + preempt_disable(); pagefault_disable(); if (page < highmem_start_page) return page_address(page); @@ -89,7 +90,7 @@ set_pte(kmap_pte - idx, mk_pte(page, kmap_prot)); local_flush_tlb_one(vaddr); - return vaddr; + return (void *)vaddr; } static inline void __kunmap_atomic(unsigned long vaddr) @@ -98,6 +99,7 @@ if (vaddr < FIXADDR_START) { /* FIXME */ pagefault_enable(); + preempt_enable(); return; } @@ -122,6 +124,7 @@ kmap_atomic_idx_pop(); pagefault_enable(); + preempt_enable(); } #endif /* __KERNEL__ */