2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 18:53:52 +08:00

x86: put all kern_addr_valid() incarnations to pgtable.h

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Thomas Gleixner 2008-01-30 13:30:37 +01:00 committed by Ingo Molnar
parent 0b80fc721b
commit 4757d7d8d0
3 changed files with 7 additions and 7 deletions

View File

@ -87,9 +87,6 @@ static inline int pfn_to_nid(unsigned long pfn)
__pgdat->node_start_pfn + __pgdat->node_spanned_pages; \
})
/* XXX: FIXME -- wli */
#define kern_addr_valid(kaddr) (0)
#ifdef CONFIG_X86_NUMAQ /* we have contiguous memory on NUMA-Q */
#define pfn_valid(pfn) ((pfn) < num_physpages)
#else

View File

@ -497,9 +497,15 @@ static inline void paravirt_pagetable_setup_done(pgd_t *base)
#endif /* !__ASSEMBLY__ */
/*
* kern_addr_valid() is (1) for FLATMEM and (0) for
* SPARSEMEM and DISCONTIGMEM
*/
#ifdef CONFIG_FLATMEM
#define kern_addr_valid(addr) (1)
#endif /* CONFIG_FLATMEM */
#else
#define kern_addr_valid(kaddr) (0)
#endif
#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
remap_pfn_range(vma, vaddr, pfn, size, prot)

View File

@ -24,8 +24,5 @@
#define MAX_PHYSMEM_BITS 32
#endif
/* XXX: FIXME -- wli */
#define kern_addr_valid(kaddr) (0)
#endif /* CONFIG_SPARSEMEM */
#endif /* _I386_SPARSEMEM_H */