From: Thomas Gleixner Date: Wed, 30 Jan 2008 12:30:37 +0000 (+0100) Subject: x86: put all kern_addr_valid() incarnations to pgtable.h X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4757d7d8d00c5f8b2c176ca03b0a8eabbc206664;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git x86: put all kern_addr_valid() incarnations to pgtable.h Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar --- diff --git a/include/asm-x86/mmzone_32.h b/include/asm-x86/mmzone_32.h index 118e9812778f..5d6f4ce6e6d6 100644 --- a/include/asm-x86/mmzone_32.h +++ b/include/asm-x86/mmzone_32.h @@ -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 diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index ed3e70d8d04b..a8be1ee15a99 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h @@ -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) diff --git a/include/asm-x86/sparsemem_32.h b/include/asm-x86/sparsemem_32.h index cfeed990585f..d89c32100591 100644 --- a/include/asm-x86/sparsemem_32.h +++ b/include/asm-x86/sparsemem_32.h @@ -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 */