discontig.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. */
  12. #include <linux/module.h>
  13. #include <linux/mmzone.h>
  14. #include <linux/bootmem.h>
  15. #if MAX_NUMNODES != 4 && MAX_NUMNODES != 16
  16. # error Fix Me Please
  17. #endif
  18. /*
  19. * Our node_data structure for discontiguous memory.
  20. */
  21. pg_data_t discontig_node_data[MAX_NUMNODES] = {
  22. { .bdata = &bootmem_node_data[0] },
  23. { .bdata = &bootmem_node_data[1] },
  24. { .bdata = &bootmem_node_data[2] },
  25. { .bdata = &bootmem_node_data[3] },
  26. #if MAX_NUMNODES == 16
  27. { .bdata = &bootmem_node_data[4] },
  28. { .bdata = &bootmem_node_data[5] },
  29. { .bdata = &bootmem_node_data[6] },
  30. { .bdata = &bootmem_node_data[7] },
  31. { .bdata = &bootmem_node_data[8] },
  32. { .bdata = &bootmem_node_data[9] },
  33. { .bdata = &bootmem_node_data[10] },
  34. { .bdata = &bootmem_node_data[11] },
  35. { .bdata = &bootmem_node_data[12] },
  36. { .bdata = &bootmem_node_data[13] },
  37. { .bdata = &bootmem_node_data[14] },
  38. { .bdata = &bootmem_node_data[15] },
  39. #endif
  40. };
  41. EXPORT_SYMBOL(discontig_node_data);