discontig.c 1.3 KB

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