Remove pgdat list
Subsystems (3)
PATCH 2/2 Remove pgdat list
This patch is moving NODE_DATA()'s definition in include/linux/mmzone.h to use for_each_pgdat or for_each_zone.
Signed-off-by Yasunori Goto <[email protected]>
---
pgdat_link-goto/include/linux/mmzone.h | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-)
include/linux/mmzone.h renamed from include/linux/mmzone.h~move_node_data +14 -14
@@ -304,6 +304,20 @@ unsigned long __init node_memmap_size_by*/ #define zone_idx (zone) ((zone) - (zone)->zone_pgdat->node_zones) +#ifndef CONFIG_NEED_MULTIPLE_NODES + +extern struct pglist_data contig_page_data; +#define NODE_DATA (nid) (&contig_page_data) +#define NODE_MEM_MAP (nid) mem_map +#define MAX_NODES_SHIFT 1 +#define pfn_to_nid (pfn) (0) + +#else /* CONFIG_NEED_MULTIPLE_NODES */ + +#include <asm/mmzone.h> + +#endif /* !CONFIG_NEED_MULTIPLE_NODES */ +#define first_online_pgdat () NODE_DATA(first_online_node())#define next_online_pgdat (pgdat) \ ((next_online_node((pgdat)->node_id) != MAX_NUMNODES) ? \
@@ -403,20 +417,6 @@ int lowmem_reserve_ratio_sysctl_handler(/* Returns the number of the current Node. */ #define numa_node_id () (cpu_to_node(_smp_processor_id())) -#ifndef CONFIG_NEED_MULTIPLE_NODES - -extern struct pglist_data contig_page_data; -#define NODE_DATA (nid) (&contig_page_data) -#define NODE_MEM_MAP (nid) mem_map -#define MAX_NODES_SHIFT 1 -#define pfn_to_nid (pfn) (0) - -#else /* CONFIG_NEED_MULTIPLE_NODES */ - -#include <asm/mmzone.h> - -#endif /* !CONFIG_NEED_MULTIPLE_NODES */ -#ifdef CONFIG_SPARSEMEM #include <asm/sparsemem.h> #endif
_
Signature · 7 lines
Yasunori Goto -- 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>