Skip to contentSkip to conversation

ramdisk: make powerpc allmodconfig build

PATCH In review Randy Dunlap 3 participants 6 messages Oct 17, 2006 – Oct 18, 2006 PowerPC

lore
Share & tools
lore
#1 lore raw
In reply to Randy Dunlap

Hi Randy,

There is another section in that function which depends on 'CONFIG_BLK_DEV_INITRD' being defined. Although it does not throw an error, it does depend on some of the variables set in this section, but not 'rd_size'. I think for consistancy it might be better to do somthing like this(below)? Or else add the same ifdef down there...

Judith

linux/arch/powerpc/platforms/iseries/setup.c +2 -0
Index: 2/linux/arch/powerpc/platforms/iseries/setup.c
===================================================================
@@ -305,8 +305,10 @@
 		initrd_end = initrd_start + naca.xRamDiskSize * HW_PAGE_SIZE;
 		initrd_below_start_ok = 1;	// ramdisk in kernel space
 		ROOT_DEV = Root_RAM0;
+#if defined(CONFIG_BLK_DEV_RAM)
 		if (((rd_size * 1024) / HW_PAGE_SIZE) < naca.xRamDiskSize)
 			rd_size = (naca.xRamDiskSize * HW_PAGE_SIZE) / 1024;
+#endif /* CONFIG_BLK_DEV_RAM */
 	} else
 #endif /* CONFIG_BLK_DEV_INITRD */
 	{
#0 lore raw

PATCH 1/2 ramdisk: make powerpc allmodconfig build

From: Randy Dunlap <[email protected]>

Fix build error for allmodconfig on powerpc:
arch/powerpc/platforms/built-in.o:(.toc+0x10b0): undefined reference to `rd_size'

---
 arch/powerpc/platforms/iseries/setup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/iseries/setup.c +1 -1
@@ -295,7 +295,7 @@ static void __init iSeries_init_early(vo
 {
 	DBG(" -> iSeries_init_early()\n");
 
-#if defined(CONFIG_BLK_DEV_INITRD)
+#if defined(CONFIG_BLK_DEV_INITRD) && defined(CONFIG_BLK_DEV_RAM)
 	/*
 	 * If the init RAM disk has been configured and there is
 	 * a non-zero starting address for it, set it up

---
---
~Randy

#2 lore raw
In reply to Judith Lebzelter
Quoted 7 lines · Judith Lebzelter

Hi Randy,

There is another section in that function which depends on 'CONFIG_BLK_DEV_INITRD' being defined. Although it does not throw an error, it does depend on some of the variables set in this section,
but not 'rd_size'. I think for consistancy it might be better to do somthing like this(below)? Or else add the same ifdef down there...

Judith

I agree. Just this patch, not my previous patch.

Quoted 16 lines

Index: 2/linux/arch/powerpc/platforms/iseries/setup.c
===================================================================

linux/arch/powerpc/platforms/iseries/setup.c +2 -0
@@ -305,8 +305,10 @@
 		initrd_end = initrd_start + naca.xRamDiskSize * HW_PAGE_SIZE;
 		initrd_below_start_ok = 1;	// ramdisk in kernel space
 		ROOT_DEV = Root_RAM0;
+#if defined(CONFIG_BLK_DEV_RAM)
 		if (((rd_size * 1024) / HW_PAGE_SIZE) < naca.xRamDiskSize)
 			rd_size = (naca.xRamDiskSize * HW_PAGE_SIZE) / 1024;
+#endif /* CONFIG_BLK_DEV_RAM */
 	} else
 #endif /* CONFIG_BLK_DEV_INITRD */
 	{
Signature · 1 line
~Randy
#3 lore raw
In reply to Judith Lebzelter
Quoted 7 lines · Judith Lebzelter

Hi Randy,

There is another section in that function which depends on 'CONFIG_BLK_DEV_INITRD' being defined. Although it does not throw an error, it does depend on some of the variables set in this section,
but not 'rd_size'. I think for consistancy it might be better to do somthing like this(below)? Or else add the same ifdef down there...

Judith

Yes, I agree, this is better. Just drop my patch 1/2.

Quoted 16 lines

Index: 2/linux/arch/powerpc/platforms/iseries/setup.c
===================================================================

linux/arch/powerpc/platforms/iseries/setup.c +2 -0
@@ -305,8 +305,10 @@
 		initrd_end = initrd_start + naca.xRamDiskSize * HW_PAGE_SIZE;
 		initrd_below_start_ok = 1;	// ramdisk in kernel space
 		ROOT_DEV = Root_RAM0;
+#if defined(CONFIG_BLK_DEV_RAM)
 		if (((rd_size * 1024) / HW_PAGE_SIZE) < naca.xRamDiskSize)
 			rd_size = (naca.xRamDiskSize * HW_PAGE_SIZE) / 1024;
+#endif /* CONFIG_BLK_DEV_RAM */
 	} else
 #endif /* CONFIG_BLK_DEV_INITRD */
 	{
Signature · 1 line
~Randy
#4 lore raw
In reply to Judith Lebzelter
Quoted 16 lines · Judith Lebzelter

Hi Randy,

There is another section in that function which depends on 'CONFIG_BLK_DEV_INITRD' being defined. Although it does not throw an error, it does depend on some of the variables set in this section, but not 'rd_size'. I think for consistancy it might be better to do somthing like this(below)? Or else add the same ifdef down there...

Judith

Index: 2/linux/arch/powerpc/platforms/iseries/setup.c
===================================================================

linux/arch/powerpc/platforms/iseries/setup.c line 314

Quoted 10 lines
linux/arch/powerpc/platforms/iseries/setup.c +2 -0
@@ -305,8 +305,10 @@
 		initrd_end = initrd_start + naca.xRamDiskSize * HW_PAGE_SIZE;
 		initrd_below_start_ok = 1;	// ramdisk in kernel space
 		ROOT_DEV = Root_RAM0;
+#if defined(CONFIG_BLK_DEV_RAM)
 		if (((rd_size * 1024) / HW_PAGE_SIZE) < naca.xRamDiskSize)
 			rd_size = (naca.xRamDiskSize * HW_PAGE_SIZE) / 1024;
+#endif /* CONFIG_BLK_DEV_RAM */
 	} else
 #endif /* CONFIG_BLK_DEV_INITRD */
 	{

That code is bogus, we'll remove it entirely.

cheers

Signature · 8 lines
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
#5 lore raw
Quoted 19 lines · Michael Ellerman
Quoted 18 lines · Judith Lebzelter

Hi Randy,

There is another section in that function which depends on 'CONFIG_BLK_DEV_INITRD' being defined. Although it does not throw an error, it does depend on some of the variables set in this section,
but not 'rd_size'. I think for consistancy it might be better to do somthing like this(below)? Or else add the same ifdef down there...

Judith

Index: 2/linux/arch/powerpc/platforms/iseries/setup.c
===================================================================

linux/arch/powerpc/platforms/iseries/setup.c +1 -0
@@ -305,8 +305,10 @@
 		initrd_end = initrd_start + naca.xRamDiskSize * HW_PAGE_SIZE;
 		initrd_below_start_ok = 1;	// ramdisk in kernel space
 		ROOT_DEV = Root_RAM0;
+#if defined(CONFIG_BLK_DEV_RAM)
Quoted 8 lines

linux/arch/powerpc/platforms/iseries/setup.c line 314

Quoted 6 lines
linux/arch/powerpc/platforms/iseries/setup.c +1 -0
 		if (((rd_size * 1024) / HW_PAGE_SIZE) < naca.xRamDiskSize)
 			rd_size = (naca.xRamDiskSize * HW_PAGE_SIZE) / 1024;
+#endif /* CONFIG_BLK_DEV_RAM */
 	} else
 #endif /* CONFIG_BLK_DEV_INITRD */
 	{

That code is bogus, we'll remove it entirely.

Great, thanks. :)

Signature · 1 line
~Randy