[PATCH] Make room fails without CONFIG_BLK_DEV_INITRD

Dave Boutcher sleddog at us.ibm.com
Sun Apr 25 10:14:09 EST 2004


Hi Ben,

Just FYI, with your make room patches the kernel won't build unless
CONFIG_BLK_DEV_INITRD is specificed.

I'm currently using the following patch, but I'm thinking there are
probably some slightly more clever approaches....

--- 1.94/arch/ppc64/kernel/prom.c       Sat Apr 24 00:42:58 2004
+++ edited/prom.c       Sat Apr 24 19:04:48 2004
@@ -1544,13 +1544,14 @@
                                 unsigned long needed, unsigned long align)
  {
         void *ret;
-       unsigned long offset = reloc_offset();

         *mem_start = ALIGN(*mem_start, align);
+#ifdef CONFIG_BLK_DEV_INITRD
         if (*mem_start + needed > *mem_end) {
                 /* FIXME: Apple OF doesn't map unclaimed mem.  If this
                  * ever happened on G5, we'd need to fix. */
                 unsigned long initrd_len;
+               unsigned long offset = reloc_offset();

                 if (*mem_end != RELOC(initrd_start))
                         prom_panic(RELOC("No memory for
copy_device_tree"));
@@ -1564,6 +1565,7 @@
                 RELOC(initrd_start) = *mem_end;
                 RELOC(initrd_end) = RELOC(initrd_start) + initrd_len;
         }
+#endif

         ret = (void *)*mem_start;
         *mem_start += needed;
@@ -1699,7 +1701,13 @@
         phandle root;
         struct device_node **allnextp;
         unsigned long offset = reloc_offset();
-       unsigned long mem_end = RELOC(initrd_start);
+       unsigned long mem_end =
+#ifdef CONFIG_BLK_DEV_INITRD
+           RELOC(initrd_start);
+#else
+       0;
+#endif
+

         /* We pass mem_end-mem_start to OF: keep it well under 32-bit */
         if (!mem_end)

** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list