confusing uses of SPARSEM_EXTREME
Subsystems (3)
Is it me or the use of CONFIG_SPARSEMEM_EXTREME is really confusing in mm/sparce.c ? Shouldn't we use CONFIG_SPARSEMEM_STATIC instead like the following patch suggests ?
-- >8 --
Subject: [PATCH] Remove confusing uses of SPARSEMEM_EXTREME
CONFIG_SPARSEMEM_EXTREME is used in sparce.c whereas CONFIG_SPARSEMEM_STATIC seems to be more appropriate.
Signed-off-by Franck Bui-Huu <[email protected]>
---
include/linux/mmzone.h | 2 +- mm/sparse.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-)
include/linux/mmzone.h +1 -1
@@ -551,7 +551,7 @@ #define SECTION_NR_TO_ROOT(sec) ((sec) /#define NR_SECTION_ROOTS (NR_MEM_SECTIONS / SECTIONS_PER_ROOT)#define SECTION_ROOT_MASK (SECTIONS_PER_ROOT - 1) -#ifdef CONFIG_SPARSEMEM_EXTREME +#ifndef CONFIG_SPARSEMEM_STATIC extern struct mem_section *mem_section[NR_SECTION_ROOTS ];#else extern struct mem_section mem_section[NR_SECTION_ROOTS ][SECTIONS_PER_ROOT ];
mm/sparse.c +3 -3
@@ -16,7 +16,7 @@ #include <asm/dma.h>* * 1) mem_section - memory sections, mem_map's for valid memory */ -#ifdef CONFIG_SPARSEMEM_EXTREME +#ifndef CONFIG_SPARSEMEM_STATIC struct mem_section *mem_section[NR_SECTION_ROOTS ]____cacheline_internodealigned_in_smp ;#else
@@ -25,7 +25,7 @@ struct mem_section mem_section[NR_SECTIO#endif EXPORT_SYMBOL (mem_section); -#ifdef CONFIG_SPARSEMEM_EXTREME +#ifndef CONFIG_SPARSEMEM_STATIC static struct mem_section *sparse_index_alloc (int nid) {struct mem_section *section =NULL ;
@@ -67,7 +67,7 @@ out:spin_unlock (&index_init_lock); return ret; } -#else /* !SPARSEMEM_EXTREME */ +#else /* SPARSEMEM_STATIC */ static inline int sparse_index_init (unsigned long section_nr,int nid) {return 0 ;
Signature · 7 lines
1.3.3.g8701 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>