init.c 740 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * linux/arch/cris/mm/init.c
  3. *
  4. * Copyright (C) 1995 Linus Torvalds
  5. * Copyright (C) 2000,2001 Axis Communications AB
  6. *
  7. * Authors: Bjorn Wesen (bjornw@axis.com)
  8. *
  9. */
  10. #include <linux/gfp.h>
  11. #include <linux/init.h>
  12. #include <linux/bootmem.h>
  13. #include <asm/tlb.h>
  14. #include <asm/sections.h>
  15. unsigned long empty_zero_page;
  16. void __init
  17. mem_init(void)
  18. {
  19. BUG_ON(!mem_map);
  20. /* max/min_low_pfn was set by setup.c
  21. * now we just copy it to some other necessary places...
  22. *
  23. * high_memory was also set in setup.c
  24. */
  25. max_mapnr = max_low_pfn - min_low_pfn;
  26. free_all_bootmem();
  27. mem_init_print_info(NULL);
  28. }
  29. /* free the pages occupied by initialization code */
  30. void
  31. free_initmem(void)
  32. {
  33. free_initmem_default(-1);
  34. }