mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
avr32: convert to asm-generic/memory_model.h
Switch avr32/include/asm/page.h to use the common defintions for pfn_to_page(), page_to_pfn(), and ARCH_PFN_OFFSET. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
d2c0f041e1
commit
083fc21409
1 changed files with 4 additions and 4 deletions
|
@ -83,11 +83,9 @@ static inline int get_order(unsigned long size)
|
||||||
|
|
||||||
#ifndef CONFIG_NEED_MULTIPLE_NODES
|
#ifndef CONFIG_NEED_MULTIPLE_NODES
|
||||||
|
|
||||||
#define PHYS_PFN_OFFSET (CONFIG_PHYS_OFFSET >> PAGE_SHIFT)
|
#define ARCH_PFN_OFFSET (CONFIG_PHYS_OFFSET >> PAGE_SHIFT)
|
||||||
|
|
||||||
#define pfn_to_page(pfn) (mem_map + ((pfn) - PHYS_PFN_OFFSET))
|
#define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < (ARCH_PFN_OFFSET + max_mapnr))
|
||||||
#define page_to_pfn(page) ((unsigned long)((page) - mem_map) + PHYS_PFN_OFFSET)
|
|
||||||
#define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
|
|
||||||
#endif /* CONFIG_NEED_MULTIPLE_NODES */
|
#endif /* CONFIG_NEED_MULTIPLE_NODES */
|
||||||
|
|
||||||
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
|
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
|
||||||
|
@ -101,4 +99,6 @@ static inline int get_order(unsigned long size)
|
||||||
*/
|
*/
|
||||||
#define HIGHMEM_START 0x20000000UL
|
#define HIGHMEM_START 0x20000000UL
|
||||||
|
|
||||||
|
#include <asm-generic/memory_model.h>
|
||||||
|
|
||||||
#endif /* __ASM_AVR32_PAGE_H */
|
#endif /* __ASM_AVR32_PAGE_H */
|
||||||
|
|
Loading…
Reference in a new issue