arch/mips/kernel/setup.c patch - wrong start_pfn with CONFIG_EMBEDDED_RAMDISK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I would like to submit the following change to arch/mips/kernel/setup.c. The start_pfn is not correct in case CONFIG_EMBEDDED_RAMDISK is slected. The ramdisk pages are added twice.

The diff -Naur output is attached to the mail.

Thanks

Ranjan

 <<diff.output.txt>> 
diff -Naur linux-dev/arch/mips/kernel/setup.c linux-dev-patch/arch/mips/kernel/setup.c
--- linux-dev/arch/mips/kernel/setup.c	Wed Dec 18 15:40:14 2002
+++ linux-dev-patch/arch/mips/kernel/setup.c	Mon Mar 24 16:13:07 2003
@@ -255,6 +255,16 @@
 	int i;
 
 #ifdef CONFIG_BLK_DEV_INITRD
+#ifdef CONFIG_EMBEDDED_RAMDISK
+	/*
+	 * Embedded ramdisk -> _end after the ramdisk so no need to add these
+	 * pages again
+	 *
+	 * Partially used pages are not usable - thus
+	 * we are rounding upwards.
+	 */
+	start_pfn = PFN_UP(__pa(&_end));
+#else
 	tmp = (((unsigned long)&_end + PAGE_SIZE-1) & PAGE_MASK) - 8;
 	if (tmp < (unsigned long)&_end)
 		tmp += PAGE_SIZE;
@@ -264,6 +274,7 @@
 		initrd_end = initrd_start + initrd_header[1];
 	}
 	start_pfn = PFN_UP(__pa((&_end)+(initrd_end - initrd_start) + PAGE_SIZE));
+#endif
 #else
 	/*
 	 * Partially used pages are not usable - thus

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux