ia64/linux-2.6.18-xen.hg

annotate mm/mmzone.c @ 563:3b3701ad4eec

pvSCSI frontend driver

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jun 02 09:58:56 2008 +0100 (2008-06-02)
parents 831230e53067
children
rev   line source
ian@0 1 /*
ian@0 2 * linux/mm/mmzone.c
ian@0 3 *
ian@0 4 * management codes for pgdats and zones.
ian@0 5 */
ian@0 6
ian@0 7
ian@0 8 #include <linux/stddef.h>
ian@0 9 #include <linux/mmzone.h>
ian@0 10 #include <linux/module.h>
ian@0 11
ian@0 12 struct pglist_data *first_online_pgdat(void)
ian@0 13 {
ian@0 14 return NODE_DATA(first_online_node);
ian@0 15 }
ian@0 16
ian@0 17 EXPORT_UNUSED_SYMBOL(first_online_pgdat); /* June 2006 */
ian@0 18
ian@0 19 struct pglist_data *next_online_pgdat(struct pglist_data *pgdat)
ian@0 20 {
ian@0 21 int nid = next_online_node(pgdat->node_id);
ian@0 22
ian@0 23 if (nid == MAX_NUMNODES)
ian@0 24 return NULL;
ian@0 25 return NODE_DATA(nid);
ian@0 26 }
ian@0 27 EXPORT_UNUSED_SYMBOL(next_online_pgdat); /* June 2006 */
ian@0 28
ian@0 29
ian@0 30 /*
ian@0 31 * next_zone - helper magic for for_each_zone()
ian@0 32 */
ian@0 33 struct zone *next_zone(struct zone *zone)
ian@0 34 {
ian@0 35 pg_data_t *pgdat = zone->zone_pgdat;
ian@0 36
ian@0 37 if (zone < pgdat->node_zones + MAX_NR_ZONES - 1)
ian@0 38 zone++;
ian@0 39 else {
ian@0 40 pgdat = next_online_pgdat(pgdat);
ian@0 41 if (pgdat)
ian@0 42 zone = pgdat->node_zones;
ian@0 43 else
ian@0 44 zone = NULL;
ian@0 45 }
ian@0 46 return zone;
ian@0 47 }
ian@0 48 EXPORT_UNUSED_SYMBOL(next_zone); /* June 2006 */
ian@0 49