| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* | 
 | 2 |  * linux/arch/arm/mm/discontig.c | 
 | 3 |  * | 
 | 4 |  * Discontiguous memory support. | 
 | 5 |  * | 
 | 6 |  * Initial code: Copyright (C) 1999-2000 Nicolas Pitre | 
 | 7 |  * | 
 | 8 |  * This program is free software; you can redistribute it and/or modify | 
 | 9 |  * it under the terms of the GNU General Public License version 2 as | 
 | 10 |  * published by the Free Software Foundation. | 
 | 11 |  */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <linux/module.h> | 
| Russell King | 78ff18a | 2006-01-03 17:39:34 +0000 | [diff] [blame] | 13 | #include <linux/mmzone.h> | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | #include <linux/bootmem.h> | 
 | 15 |  | 
 | 16 | #if MAX_NUMNODES != 4 && MAX_NUMNODES != 16 | 
 | 17 | # error Fix Me Please | 
 | 18 | #endif | 
 | 19 |  | 
 | 20 | /* | 
 | 21 |  * Our node_data structure for discontiguous memory. | 
 | 22 |  */ | 
 | 23 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | pg_data_t discontig_node_data[MAX_NUMNODES] = { | 
| Johannes Weiner | b61bfa3 | 2008-07-23 21:26:55 -0700 | [diff] [blame] | 25 |   { .bdata = &bootmem_node_data[0] }, | 
 | 26 |   { .bdata = &bootmem_node_data[1] }, | 
 | 27 |   { .bdata = &bootmem_node_data[2] }, | 
 | 28 |   { .bdata = &bootmem_node_data[3] }, | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | #if MAX_NUMNODES == 16 | 
| Johannes Weiner | b61bfa3 | 2008-07-23 21:26:55 -0700 | [diff] [blame] | 30 |   { .bdata = &bootmem_node_data[4] }, | 
 | 31 |   { .bdata = &bootmem_node_data[5] }, | 
 | 32 |   { .bdata = &bootmem_node_data[6] }, | 
 | 33 |   { .bdata = &bootmem_node_data[7] }, | 
 | 34 |   { .bdata = &bootmem_node_data[8] }, | 
 | 35 |   { .bdata = &bootmem_node_data[9] }, | 
 | 36 |   { .bdata = &bootmem_node_data[10] }, | 
 | 37 |   { .bdata = &bootmem_node_data[11] }, | 
 | 38 |   { .bdata = &bootmem_node_data[12] }, | 
 | 39 |   { .bdata = &bootmem_node_data[13] }, | 
 | 40 |   { .bdata = &bootmem_node_data[14] }, | 
 | 41 |   { .bdata = &bootmem_node_data[15] }, | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | #endif | 
 | 43 | }; | 
 | 44 |  | 
 | 45 | EXPORT_SYMBOL(discontig_node_data); |