init.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. /*
  2. * linux/arch/arm/mm/init.c
  3. *
  4. * Copyright (C) 1995-2005 Russell King
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/errno.h>
  12. #include <linux/swap.h>
  13. #include <linux/init.h>
  14. #include <linux/bootmem.h>
  15. #include <linux/mman.h>
  16. #include <linux/export.h>
  17. #include <linux/nodemask.h>
  18. #include <linux/initrd.h>
  19. #include <linux/of_fdt.h>
  20. #include <linux/highmem.h>
  21. #include <linux/gfp.h>
  22. #include <linux/memblock.h>
  23. #include <linux/dma-contiguous.h>
  24. #include <linux/sizes.h>
  25. #include <asm/cp15.h>
  26. #include <asm/mach-types.h>
  27. #include <asm/memblock.h>
  28. #include <asm/prom.h>
  29. #include <asm/sections.h>
  30. #include <asm/setup.h>
  31. #include <asm/tlb.h>
  32. #include <asm/fixmap.h>
  33. #include <asm/mach/arch.h>
  34. #include <asm/mach/map.h>
  35. #include "mm.h"
  36. #ifdef CONFIG_CPU_CP15_MMU
  37. unsigned long __init __clear_cr(unsigned long mask)
  38. {
  39. cr_alignment = cr_alignment & ~mask;
  40. return cr_alignment;
  41. }
  42. #endif
  43. static phys_addr_t phys_initrd_start __initdata = 0;
  44. static unsigned long phys_initrd_size __initdata = 0;
  45. static int __init early_initrd(char *p)
  46. {
  47. phys_addr_t start;
  48. unsigned long size;
  49. char *endp;
  50. start = memparse(p, &endp);
  51. if (*endp == ',') {
  52. size = memparse(endp + 1, NULL);
  53. phys_initrd_start = start;
  54. phys_initrd_size = size;
  55. }
  56. return 0;
  57. }
  58. early_param("initrd", early_initrd);
  59. static int __init parse_tag_initrd(const struct tag *tag)
  60. {
  61. printk(KERN_WARNING "ATAG_INITRD is deprecated; "
  62. "please update your bootloader.\n");
  63. phys_initrd_start = __virt_to_phys(tag->u.initrd.start);
  64. phys_initrd_size = tag->u.initrd.size;
  65. return 0;
  66. }
  67. __tagtable(ATAG_INITRD, parse_tag_initrd);
  68. static int __init parse_tag_initrd2(const struct tag *tag)
  69. {
  70. phys_initrd_start = tag->u.initrd.start;
  71. phys_initrd_size = tag->u.initrd.size;
  72. return 0;
  73. }
  74. __tagtable(ATAG_INITRD2, parse_tag_initrd2);
  75. /*
  76. * This keeps memory configuration data used by a couple memory
  77. * initialization functions, as well as show_mem() for the skipping
  78. * of holes in the memory map. It is populated by arm_add_memory().
  79. */
  80. void show_mem(unsigned int filter)
  81. {
  82. int free = 0, total = 0, reserved = 0;
  83. int shared = 0, cached = 0, slab = 0;
  84. struct memblock_region *reg;
  85. printk("Mem-info:\n");
  86. show_free_areas(filter);
  87. for_each_memblock (memory, reg) {
  88. unsigned int pfn1, pfn2;
  89. struct page *page, *end;
  90. pfn1 = memblock_region_memory_base_pfn(reg);
  91. pfn2 = memblock_region_memory_end_pfn(reg);
  92. page = pfn_to_page(pfn1);
  93. end = pfn_to_page(pfn2 - 1) + 1;
  94. do {
  95. total++;
  96. if (PageReserved(page))
  97. reserved++;
  98. else if (PageSwapCache(page))
  99. cached++;
  100. else if (PageSlab(page))
  101. slab++;
  102. else if (!page_count(page))
  103. free++;
  104. else
  105. shared += page_count(page) - 1;
  106. pfn1++;
  107. page = pfn_to_page(pfn1);
  108. } while (pfn1 < pfn2);
  109. }
  110. printk("%d pages of RAM\n", total);
  111. printk("%d free pages\n", free);
  112. printk("%d reserved pages\n", reserved);
  113. printk("%d slab pages\n", slab);
  114. printk("%d pages shared\n", shared);
  115. printk("%d pages swap cached\n", cached);
  116. }
  117. static void __init find_limits(unsigned long *min, unsigned long *max_low,
  118. unsigned long *max_high)
  119. {
  120. *max_low = PFN_DOWN(memblock_get_current_limit());
  121. *min = PFN_UP(memblock_start_of_DRAM());
  122. *max_high = PFN_DOWN(memblock_end_of_DRAM());
  123. }
  124. #ifdef CONFIG_ZONE_DMA
  125. phys_addr_t arm_dma_zone_size __read_mostly;
  126. EXPORT_SYMBOL(arm_dma_zone_size);
  127. /*
  128. * The DMA mask corresponding to the maximum bus address allocatable
  129. * using GFP_DMA. The default here places no restriction on DMA
  130. * allocations. This must be the smallest DMA mask in the system,
  131. * so a successful GFP_DMA allocation will always satisfy this.
  132. */
  133. phys_addr_t arm_dma_limit;
  134. unsigned long arm_dma_pfn_limit;
  135. static void __init arm_adjust_dma_zone(unsigned long *size, unsigned long *hole,
  136. unsigned long dma_size)
  137. {
  138. if (size[0] <= dma_size)
  139. return;
  140. size[ZONE_NORMAL] = size[0] - dma_size;
  141. size[ZONE_DMA] = dma_size;
  142. hole[ZONE_NORMAL] = hole[0];
  143. hole[ZONE_DMA] = 0;
  144. }
  145. #endif
  146. void __init setup_dma_zone(const struct machine_desc *mdesc)
  147. {
  148. #ifdef CONFIG_ZONE_DMA
  149. if (mdesc->dma_zone_size) {
  150. arm_dma_zone_size = mdesc->dma_zone_size;
  151. arm_dma_limit = PHYS_OFFSET + arm_dma_zone_size - 1;
  152. } else
  153. arm_dma_limit = 0xffffffff;
  154. arm_dma_pfn_limit = arm_dma_limit >> PAGE_SHIFT;
  155. #endif
  156. }
  157. static void __init zone_sizes_init(unsigned long min, unsigned long max_low,
  158. unsigned long max_high)
  159. {
  160. unsigned long zone_size[MAX_NR_ZONES], zhole_size[MAX_NR_ZONES];
  161. struct memblock_region *reg;
  162. /*
  163. * initialise the zones.
  164. */
  165. memset(zone_size, 0, sizeof(zone_size));
  166. /*
  167. * The memory size has already been determined. If we need
  168. * to do anything fancy with the allocation of this memory
  169. * to the zones, now is the time to do it.
  170. */
  171. zone_size[0] = max_low - min;
  172. #ifdef CONFIG_HIGHMEM
  173. zone_size[ZONE_HIGHMEM] = max_high - max_low;
  174. #endif
  175. /*
  176. * Calculate the size of the holes.
  177. * holes = node_size - sum(bank_sizes)
  178. */
  179. memcpy(zhole_size, zone_size, sizeof(zhole_size));
  180. for_each_memblock(memory, reg) {
  181. unsigned long start = memblock_region_memory_base_pfn(reg);
  182. unsigned long end = memblock_region_memory_end_pfn(reg);
  183. if (start < max_low) {
  184. unsigned long low_end = min(end, max_low);
  185. zhole_size[0] -= low_end - start;
  186. }
  187. #ifdef CONFIG_HIGHMEM
  188. if (end > max_low) {
  189. unsigned long high_start = max(start, max_low);
  190. zhole_size[ZONE_HIGHMEM] -= end - high_start;
  191. }
  192. #endif
  193. }
  194. #ifdef CONFIG_ZONE_DMA
  195. /*
  196. * Adjust the sizes according to any special requirements for
  197. * this machine type.
  198. */
  199. if (arm_dma_zone_size)
  200. arm_adjust_dma_zone(zone_size, zhole_size,
  201. arm_dma_zone_size >> PAGE_SHIFT);
  202. #endif
  203. free_area_init_node(0, zone_size, min, zhole_size);
  204. }
  205. #ifdef CONFIG_HAVE_ARCH_PFN_VALID
  206. int pfn_valid(unsigned long pfn)
  207. {
  208. return memblock_is_memory(__pfn_to_phys(pfn));
  209. }
  210. EXPORT_SYMBOL(pfn_valid);
  211. #endif
  212. #ifndef CONFIG_SPARSEMEM
  213. static void __init arm_memory_present(void)
  214. {
  215. }
  216. #else
  217. static void __init arm_memory_present(void)
  218. {
  219. struct memblock_region *reg;
  220. for_each_memblock(memory, reg)
  221. memory_present(0, memblock_region_memory_base_pfn(reg),
  222. memblock_region_memory_end_pfn(reg));
  223. }
  224. #endif
  225. static bool arm_memblock_steal_permitted = true;
  226. phys_addr_t __init arm_memblock_steal(phys_addr_t size, phys_addr_t align)
  227. {
  228. phys_addr_t phys;
  229. BUG_ON(!arm_memblock_steal_permitted);
  230. phys = memblock_alloc_base(size, align, MEMBLOCK_ALLOC_ANYWHERE);
  231. memblock_free(phys, size);
  232. memblock_remove(phys, size);
  233. return phys;
  234. }
  235. void __init arm_memblock_init(const struct machine_desc *mdesc)
  236. {
  237. /* Register the kernel text, kernel data and initrd with memblock. */
  238. #ifdef CONFIG_XIP_KERNEL
  239. memblock_reserve(__pa(_sdata), _end - _sdata);
  240. #else
  241. memblock_reserve(__pa(_stext), _end - _stext);
  242. #endif
  243. #ifdef CONFIG_BLK_DEV_INITRD
  244. /* FDT scan will populate initrd_start */
  245. if (initrd_start && !phys_initrd_size) {
  246. phys_initrd_start = __virt_to_phys(initrd_start);
  247. phys_initrd_size = initrd_end - initrd_start;
  248. }
  249. initrd_start = initrd_end = 0;
  250. if (phys_initrd_size &&
  251. !memblock_is_region_memory(phys_initrd_start, phys_initrd_size)) {
  252. pr_err("INITRD: 0x%08llx+0x%08lx is not a memory region - disabling initrd\n",
  253. (u64)phys_initrd_start, phys_initrd_size);
  254. phys_initrd_start = phys_initrd_size = 0;
  255. }
  256. if (phys_initrd_size &&
  257. memblock_is_region_reserved(phys_initrd_start, phys_initrd_size)) {
  258. pr_err("INITRD: 0x%08llx+0x%08lx overlaps in-use memory region - disabling initrd\n",
  259. (u64)phys_initrd_start, phys_initrd_size);
  260. phys_initrd_start = phys_initrd_size = 0;
  261. }
  262. if (phys_initrd_size) {
  263. memblock_reserve(phys_initrd_start, phys_initrd_size);
  264. /* Now convert initrd to virtual addresses */
  265. initrd_start = __phys_to_virt(phys_initrd_start);
  266. initrd_end = initrd_start + phys_initrd_size;
  267. }
  268. #endif
  269. arm_mm_memblock_reserve();
  270. /* reserve any platform specific memblock areas */
  271. if (mdesc->reserve)
  272. mdesc->reserve();
  273. early_init_fdt_scan_reserved_mem();
  274. /*
  275. * reserve memory for DMA contigouos allocations,
  276. * must come from DMA area inside low memory
  277. */
  278. dma_contiguous_reserve(min(arm_dma_limit, arm_lowmem_limit));
  279. arm_memblock_steal_permitted = false;
  280. memblock_dump_all();
  281. }
  282. void __init bootmem_init(void)
  283. {
  284. unsigned long min, max_low, max_high;
  285. memblock_allow_resize();
  286. max_low = max_high = 0;
  287. find_limits(&min, &max_low, &max_high);
  288. /*
  289. * Sparsemem tries to allocate bootmem in memory_present(),
  290. * so must be done after the fixed reservations
  291. */
  292. arm_memory_present();
  293. /*
  294. * sparse_init() needs the bootmem allocator up and running.
  295. */
  296. sparse_init();
  297. /*
  298. * Now free the memory - free_area_init_node needs
  299. * the sparse mem_map arrays initialized by sparse_init()
  300. * for memmap_init_zone(), otherwise all PFNs are invalid.
  301. */
  302. zone_sizes_init(min, max_low, max_high);
  303. /*
  304. * This doesn't seem to be used by the Linux memory manager any
  305. * more, but is used by ll_rw_block. If we can get rid of it, we
  306. * also get rid of some of the stuff above as well.
  307. */
  308. min_low_pfn = min;
  309. max_low_pfn = max_low;
  310. max_pfn = max_high;
  311. }
  312. /*
  313. * Poison init memory with an undefined instruction (ARM) or a branch to an
  314. * undefined instruction (Thumb).
  315. */
  316. static inline void poison_init_mem(void *s, size_t count)
  317. {
  318. u32 *p = (u32 *)s;
  319. for (; count != 0; count -= 4)
  320. *p++ = 0xe7fddef0;
  321. }
  322. static inline void
  323. free_memmap(unsigned long start_pfn, unsigned long end_pfn)
  324. {
  325. struct page *start_pg, *end_pg;
  326. phys_addr_t pg, pgend;
  327. /*
  328. * Convert start_pfn/end_pfn to a struct page pointer.
  329. */
  330. start_pg = pfn_to_page(start_pfn - 1) + 1;
  331. end_pg = pfn_to_page(end_pfn - 1) + 1;
  332. /*
  333. * Convert to physical addresses, and
  334. * round start upwards and end downwards.
  335. */
  336. pg = PAGE_ALIGN(__pa(start_pg));
  337. pgend = __pa(end_pg) & PAGE_MASK;
  338. /*
  339. * If there are free pages between these,
  340. * free the section of the memmap array.
  341. */
  342. if (pg < pgend)
  343. memblock_free_early(pg, pgend - pg);
  344. }
  345. /*
  346. * The mem_map array can get very big. Free the unused area of the memory map.
  347. */
  348. static void __init free_unused_memmap(void)
  349. {
  350. unsigned long start, prev_end = 0;
  351. struct memblock_region *reg;
  352. /*
  353. * This relies on each bank being in address order.
  354. * The banks are sorted previously in bootmem_init().
  355. */
  356. for_each_memblock(memory, reg) {
  357. start = memblock_region_memory_base_pfn(reg);
  358. #ifdef CONFIG_SPARSEMEM
  359. /*
  360. * Take care not to free memmap entries that don't exist
  361. * due to SPARSEMEM sections which aren't present.
  362. */
  363. start = min(start,
  364. ALIGN(prev_end, PAGES_PER_SECTION));
  365. #else
  366. /*
  367. * Align down here since the VM subsystem insists that the
  368. * memmap entries are valid from the bank start aligned to
  369. * MAX_ORDER_NR_PAGES.
  370. */
  371. start = round_down(start, MAX_ORDER_NR_PAGES);
  372. #endif
  373. /*
  374. * If we had a previous bank, and there is a space
  375. * between the current bank and the previous, free it.
  376. */
  377. if (prev_end && prev_end < start)
  378. free_memmap(prev_end, start);
  379. /*
  380. * Align up here since the VM subsystem insists that the
  381. * memmap entries are valid from the bank end aligned to
  382. * MAX_ORDER_NR_PAGES.
  383. */
  384. prev_end = ALIGN(memblock_region_memory_end_pfn(reg),
  385. MAX_ORDER_NR_PAGES);
  386. }
  387. #ifdef CONFIG_SPARSEMEM
  388. if (!IS_ALIGNED(prev_end, PAGES_PER_SECTION))
  389. free_memmap(prev_end,
  390. ALIGN(prev_end, PAGES_PER_SECTION));
  391. #endif
  392. }
  393. #ifdef CONFIG_HIGHMEM
  394. static inline void free_area_high(unsigned long pfn, unsigned long end)
  395. {
  396. for (; pfn < end; pfn++)
  397. free_highmem_page(pfn_to_page(pfn));
  398. }
  399. #endif
  400. static void __init free_highpages(void)
  401. {
  402. #ifdef CONFIG_HIGHMEM
  403. unsigned long max_low = max_low_pfn;
  404. struct memblock_region *mem, *res;
  405. /* set highmem page free */
  406. for_each_memblock(memory, mem) {
  407. unsigned long start = memblock_region_memory_base_pfn(mem);
  408. unsigned long end = memblock_region_memory_end_pfn(mem);
  409. /* Ignore complete lowmem entries */
  410. if (end <= max_low)
  411. continue;
  412. /* Truncate partial highmem entries */
  413. if (start < max_low)
  414. start = max_low;
  415. /* Find and exclude any reserved regions */
  416. for_each_memblock(reserved, res) {
  417. unsigned long res_start, res_end;
  418. res_start = memblock_region_reserved_base_pfn(res);
  419. res_end = memblock_region_reserved_end_pfn(res);
  420. if (res_end < start)
  421. continue;
  422. if (res_start < start)
  423. res_start = start;
  424. if (res_start > end)
  425. res_start = end;
  426. if (res_end > end)
  427. res_end = end;
  428. if (res_start != start)
  429. free_area_high(start, res_start);
  430. start = res_end;
  431. if (start == end)
  432. break;
  433. }
  434. /* And now free anything which remains */
  435. if (start < end)
  436. free_area_high(start, end);
  437. }
  438. #endif
  439. }
  440. /*
  441. * mem_init() marks the free areas in the mem_map and tells us how much
  442. * memory is free. This is done after various parts of the system have
  443. * claimed their memory after the kernel image.
  444. */
  445. void __init mem_init(void)
  446. {
  447. #ifdef CONFIG_HAVE_TCM
  448. /* These pointers are filled in on TCM detection */
  449. extern u32 dtcm_end;
  450. extern u32 itcm_end;
  451. #endif
  452. set_max_mapnr(pfn_to_page(max_pfn) - mem_map);
  453. /* this will put all unused low memory onto the freelists */
  454. free_unused_memmap();
  455. free_all_bootmem();
  456. #ifdef CONFIG_SA1111
  457. /* now that our DMA memory is actually so designated, we can free it */
  458. free_reserved_area(__va(PHYS_OFFSET), swapper_pg_dir, -1, NULL);
  459. #endif
  460. free_highpages();
  461. mem_init_print_info(NULL);
  462. #define MLK(b, t) b, t, ((t) - (b)) >> 10
  463. #define MLM(b, t) b, t, ((t) - (b)) >> 20
  464. #define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), SZ_1K)
  465. printk(KERN_NOTICE "Virtual kernel memory layout:\n"
  466. " vector : 0x%08lx - 0x%08lx (%4ld kB)\n"
  467. #ifdef CONFIG_HAVE_TCM
  468. " DTCM : 0x%08lx - 0x%08lx (%4ld kB)\n"
  469. " ITCM : 0x%08lx - 0x%08lx (%4ld kB)\n"
  470. #endif
  471. " fixmap : 0x%08lx - 0x%08lx (%4ld kB)\n"
  472. " vmalloc : 0x%08lx - 0x%08lx (%4ld MB)\n"
  473. " lowmem : 0x%08lx - 0x%08lx (%4ld MB)\n"
  474. #ifdef CONFIG_HIGHMEM
  475. " pkmap : 0x%08lx - 0x%08lx (%4ld MB)\n"
  476. #endif
  477. #ifdef CONFIG_MODULES
  478. " modules : 0x%08lx - 0x%08lx (%4ld MB)\n"
  479. #endif
  480. " .text : 0x%p" " - 0x%p" " (%4d kB)\n"
  481. " .init : 0x%p" " - 0x%p" " (%4d kB)\n"
  482. " .data : 0x%p" " - 0x%p" " (%4d kB)\n"
  483. " .bss : 0x%p" " - 0x%p" " (%4d kB)\n",
  484. MLK(UL(CONFIG_VECTORS_BASE), UL(CONFIG_VECTORS_BASE) +
  485. (PAGE_SIZE)),
  486. #ifdef CONFIG_HAVE_TCM
  487. MLK(DTCM_OFFSET, (unsigned long) dtcm_end),
  488. MLK(ITCM_OFFSET, (unsigned long) itcm_end),
  489. #endif
  490. MLK(FIXADDR_START, FIXADDR_TOP),
  491. MLM(VMALLOC_START, VMALLOC_END),
  492. MLM(PAGE_OFFSET, (unsigned long)high_memory),
  493. #ifdef CONFIG_HIGHMEM
  494. MLM(PKMAP_BASE, (PKMAP_BASE) + (LAST_PKMAP) *
  495. (PAGE_SIZE)),
  496. #endif
  497. #ifdef CONFIG_MODULES
  498. MLM(MODULES_VADDR, MODULES_END),
  499. #endif
  500. MLK_ROUNDUP(_text, _etext),
  501. MLK_ROUNDUP(__init_begin, __init_end),
  502. MLK_ROUNDUP(_sdata, _edata),
  503. MLK_ROUNDUP(__bss_start, __bss_stop));
  504. #undef MLK
  505. #undef MLM
  506. #undef MLK_ROUNDUP
  507. /*
  508. * Check boundaries twice: Some fundamental inconsistencies can
  509. * be detected at build time already.
  510. */
  511. #ifdef CONFIG_MMU
  512. BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
  513. BUG_ON(TASK_SIZE > MODULES_VADDR);
  514. #endif
  515. #ifdef CONFIG_HIGHMEM
  516. BUILD_BUG_ON(PKMAP_BASE + LAST_PKMAP * PAGE_SIZE > PAGE_OFFSET);
  517. BUG_ON(PKMAP_BASE + LAST_PKMAP * PAGE_SIZE > PAGE_OFFSET);
  518. #endif
  519. if (PAGE_SIZE >= 16384 && get_num_physpages() <= 128) {
  520. extern int sysctl_overcommit_memory;
  521. /*
  522. * On a machine this small we won't get
  523. * anywhere without overcommit, so turn
  524. * it on by default.
  525. */
  526. sysctl_overcommit_memory = OVERCOMMIT_ALWAYS;
  527. }
  528. }
  529. void free_initmem(void)
  530. {
  531. #ifdef CONFIG_HAVE_TCM
  532. extern char __tcm_start, __tcm_end;
  533. poison_init_mem(&__tcm_start, &__tcm_end - &__tcm_start);
  534. free_reserved_area(&__tcm_start, &__tcm_end, -1, "TCM link");
  535. #endif
  536. poison_init_mem(__init_begin, __init_end - __init_begin);
  537. if (!machine_is_integrator() && !machine_is_cintegrator())
  538. free_initmem_default(-1);
  539. }
  540. #ifdef CONFIG_BLK_DEV_INITRD
  541. static int keep_initrd;
  542. void free_initrd_mem(unsigned long start, unsigned long end)
  543. {
  544. if (!keep_initrd) {
  545. poison_init_mem((void *)start, PAGE_ALIGN(end) - start);
  546. free_reserved_area((void *)start, (void *)end, -1, "initrd");
  547. }
  548. }
  549. static int __init keepinitrd_setup(char *__unused)
  550. {
  551. keep_initrd = 1;
  552. return 1;
  553. }
  554. __setup("keepinitrd", keepinitrd_setup);
  555. #endif