[80/89] x86: devicetree: Add missing early_init_dt_setup_initrd_arch

From: Greg KH
Date: Thu Jun 16 2011 - 03:04:13 EST


2.6.39-stable review patch. If anyone has any objections, please let us know.

------------------
stub

From: Florian Fainelli <ffainelli@xxxxxxxxxx>

commit 977cb76d52e7aa040e18a84b29fe6fd80d79319b upstream.

This patch fixes the following build failure:

drivers/built-in.o: In function `early_init_dt_check_for_initrd':
/home/florian/dev/kernel/x86/linux-2.6-x86/drivers/of/fdt.c:571:
undefined reference to `early_init_dt_setup_initrd_arch'
make: *** [.tmp_vmlinux1] Error 1

which happens as soon as we enable initrd support on a x86 devicetree
platform such as Intel CE4100.

Signed-off-by: Florian Fainelli <ffainelli@xxxxxxxxxx>
Acked-by: Grant Likely <grant.likely@xxxxxxxxxxxx>
Cc: Maxime Bizon <mbizon@xxxxxxxxxx>
Acked-by: Sebastian Andrzej Siewior <sebastian@xxxxxxxxxxxxx>
Link: http://lkml.kernel.org/r/201106061015.50039.ffainelli@xxxxxxxxxx
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
arch/x86/kernel/devicetree.c | 11 +++++++++++
1 file changed, 11 insertions(+)

--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -13,6 +13,7 @@
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/of_pci.h>
+#include <linux/initrd.h>

#include <asm/hpet.h>
#include <asm/irq_controller.h>
@@ -98,6 +99,16 @@ void * __init early_init_dt_alloc_memory
return __alloc_bootmem(size, align, __pa(MAX_DMA_ADDRESS));
}

+#ifdef CONFIG_BLK_DEV_INITRD
+void __init early_init_dt_setup_initrd_arch(unsigned long start,
+ unsigned long end)
+{
+ initrd_start = (unsigned long)__va(start);
+ initrd_end = (unsigned long)__va(end);
+ initrd_below_start_ok = 1;
+}
+#endif
+
void __init add_dtb(u64 data)
{
initial_dtb = data + offsetof(struct setup_data, data);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/