diff options
Diffstat (limited to 'recipes-kernel/linux/linux-xlnx/microblaze_Fix_initrd_support.patch')
-rw-r--r-- | recipes-kernel/linux/linux-xlnx/microblaze_Fix_initrd_support.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-xlnx/microblaze_Fix_initrd_support.patch b/recipes-kernel/linux/linux-xlnx/microblaze_Fix_initrd_support.patch new file mode 100644 index 00000000..7c4b6f76 --- /dev/null +++ b/recipes-kernel/linux/linux-xlnx/microblaze_Fix_initrd_support.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From: Michal Simek <michal.simek@xilinx.com> | ||
2 | Subject: [LINUX PATCH 3/3] microblaze: Fix initrd support | ||
3 | |||
4 | Initrd/ramdisk support has been never validated. | ||
5 | |||
6 | Signed-off-by: Michal Simek <michal.simek@xilinx.com> | ||
7 | --- | ||
8 | arch/microblaze/mm/init.c | 20 ++++++-------------- | ||
9 | 1 file changed, 6 insertions(+), 14 deletions(-) | ||
10 | |||
11 | diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c | ||
12 | index 09affec..f394ad8 100644 | ||
13 | --- a/arch/microblaze/mm/init.c | ||
14 | +++ b/arch/microblaze/mm/init.c | ||
15 | @@ -258,16 +258,7 @@ static void free_init_pages(char *what, unsigned long start, unsigned long end) | ||
16 | #ifdef CONFIG_BLK_DEV_INITRD | ||
17 | void free_initrd_mem(unsigned long start, unsigned long end) | ||
18 | { | ||
19 | - int pages = 0; | ||
20 | - for (; start < end; start += PAGE_SIZE) { | ||
21 | - ClearPageReserved(virt_to_page(start)); | ||
22 | - init_page_count(virt_to_page(start)); | ||
23 | - free_page(start); | ||
24 | - totalram_pages++; | ||
25 | - pages++; | ||
26 | - } | ||
27 | - printk(KERN_NOTICE "Freeing initrd memory: %dk freed\n", | ||
28 | - (int)(pages * (PAGE_SIZE / 1024))); | ||
29 | + free_init_pages("initrd memory", start, end); | ||
30 | } | ||
31 | #endif | ||
32 | |||
33 | @@ -438,10 +429,11 @@ asmlinkage void __init mmu_init(void) | ||
34 | |||
35 | #if defined(CONFIG_BLK_DEV_INITRD) | ||
36 | /* Remove the init RAM disk from the available memory. */ | ||
37 | -/* if (initrd_start) { | ||
38 | - mem_pieces_remove(&phys_avail, __pa(initrd_start), | ||
39 | - initrd_end - initrd_start, 1); | ||
40 | - }*/ | ||
41 | + if (initrd_start) { | ||
42 | + unsigned long size; | ||
43 | + size = initrd_end - initrd_start; | ||
44 | + memblock_reserve(virt_to_phys(initrd_start), size); | ||
45 | + } | ||
46 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
47 | |||
48 | /* Initialize the MMU hardware */ | ||
49 | -- | ||
50 | 1.8.2.1 | ||
51 | |||
52 | |||