Commit 680272da authored by Paul Mackerras's avatar Paul Mackerras

PPC32: define kmap_atomic_to_page

parent 6917068e
...@@ -128,6 +128,17 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type) ...@@ -128,6 +128,17 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type)
dec_preempt_count(); dec_preempt_count();
} }
static inline struct page *kmap_atomic_to_page(void *ptr)
{
unsigned long idx, vaddr = (unsigned long) ptr;
if (vaddr < KMAP_FIX_BEGIN)
return virt_to_page(ptr);
idx = (vaddr - KMAP_FIX_BEGIN) >> PAGE_SHIFT;
return pte_page(kmap_pte[idx]);
}
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif /* _ASM_HIGHMEM_H */ #endif /* _ASM_HIGHMEM_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment