aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmzone.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r--include/linux/mmzone.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 1aca6cebbb78..186ec6ab334d 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -764,12 +764,6 @@ extern int numa_zonelist_order_handler(struct ctl_table *, int,
764extern char numa_zonelist_order[]; 764extern char numa_zonelist_order[];
765#define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */ 765#define NUMA_ZONELIST_ORDER_LEN 16 /* string buffer size */
766 766
767#include <linux/topology.h>
768/* Returns the number of the current Node. */
769#ifndef numa_node_id
770#define numa_node_id() (cpu_to_node(raw_smp_processor_id()))
771#endif
772
773#ifndef CONFIG_NEED_MULTIPLE_NODES 767#ifndef CONFIG_NEED_MULTIPLE_NODES
774 768
775extern struct pglist_data contig_page_data; 769extern struct pglist_data contig_page_data;
@@ -806,6 +800,14 @@ extern struct zone *next_zone(struct zone *zone);
806 zone; \ 800 zone; \
807 zone = next_zone(zone)) 801 zone = next_zone(zone))
808 802
803#define for_each_populated_zone(zone) \
804 for (zone = (first_online_pgdat())->node_zones; \
805 zone; \
806 zone = next_zone(zone)) \
807 if (!populated_zone(zone)) \
808 ; /* do nothing */ \
809 else
810
809static inline struct zone *zonelist_zone(struct zoneref *zoneref) 811static inline struct zone *zonelist_zone(struct zoneref *zoneref)
810{ 812{
811 return zoneref->zone; 813 return zoneref->zone;