All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/devicetree: add missing early_init_dt_setup_initrd_arch stub
@ 2011-06-06  8:15 Florian Fainelli
  2011-06-06  8:21 ` Grant Likely
  2011-06-09 13:43 ` [tip:x86/urgent] x86: devicetree: Add " tip-bot for Florian Fainelli
  0 siblings, 2 replies; 5+ messages in thread
From: Florian Fainelli @ 2011-06-06  8:15 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior
  Cc: tglx, Grant Likely, linux-kernel, Ingo Molnar, Maxime Bizon

From: Florian Fainelli <ffainelli@freebox.fr>

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.

Tested on a custom Intel CE4100 board.

CC:stable@kernel.org
Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
---
Grant,

MIPS, PowerPC, Microblaze and now x86 all have the same way of implementing
this, would it rather make sense to get this merged to generic devicetree functions
and let this be overriden if needed?

Stable: this is a candidate for 2.6.39.2

diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 690bc84..9aeb78a 100644
--- 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_arch(u64 size, u64 align)
 	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);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/devicetree: add missing early_init_dt_setup_initrd_arch stub
  2011-06-06  8:15 [PATCH] x86/devicetree: add missing early_init_dt_setup_initrd_arch stub Florian Fainelli
@ 2011-06-06  8:21 ` Grant Likely
  2011-06-09  8:13   ` Florian Fainelli
  2011-06-09 13:43 ` [tip:x86/urgent] x86: devicetree: Add " tip-bot for Florian Fainelli
  1 sibling, 1 reply; 5+ messages in thread
From: Grant Likely @ 2011-06-06  8:21 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Sebastian Andrzej Siewior, tglx, linux-kernel, Ingo Molnar, Maxime Bizon

On Mon, Jun 06, 2011 at 10:15:49AM +0200, Florian Fainelli wrote:
> From: Florian Fainelli <ffainelli@freebox.fr>
> 
> 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.
> 
> Tested on a custom Intel CE4100 board.
> 
> CC:stable@kernel.org
> Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
> Grant,
> 
> MIPS, PowerPC, Microblaze and now x86 all have the same way of implementing
> this, would it rather make sense to get this merged to generic devicetree functions
> and let this be overriden if needed?

Probably, but I'm not going to tackle that problem just yet.  Although
if you want to investigate and propose a patch, then go for it.  :-)

g.


> 
> Stable: this is a candidate for 2.6.39.2
> 
> diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
> index 690bc84..9aeb78a 100644
> --- 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_arch(u64 size, u64 align)
>  	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);
> -- 
> 1.7.4.1
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/devicetree: add missing early_init_dt_setup_initrd_arch stub
  2011-06-06  8:21 ` Grant Likely
@ 2011-06-09  8:13   ` Florian Fainelli
  2011-06-09 13:23     ` Grant Likely
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2011-06-09  8:13 UTC (permalink / raw)
  To: Grant Likely
  Cc: Sebastian Andrzej Siewior, tglx, linux-kernel, Ingo Molnar, Maxime Bizon

On Monday 06 June 2011 10:21:31 Grant Likely wrote:
> On Mon, Jun 06, 2011 at 10:15:49AM +0200, Florian Fainelli wrote:
> > From: Florian Fainelli <ffainelli@freebox.fr>
> > 
> > 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.
> > 
> > Tested on a custom Intel CE4100 board.
> > 
> > CC:stable@kernel.org
> > Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
> 
> Acked-by: Grant Likely <grant.likely@secretlab.ca>

Grant, are you picking this patch to any of your tree?

> 
> > ---
> > Grant,
> > 
> > MIPS, PowerPC, Microblaze and now x86 all have the same way of
> > implementing this, would it rather make sense to get this merged to
> > generic devicetree functions and let this be overriden if needed?
> 
> Probably, but I'm not going to tackle that problem just yet.  Although
> if you want to investigate and propose a patch, then go for it.  :-)

Allright, I will take a look at this.

> 
> g.
> 
> > Stable: this is a candidate for 2.6.39.2
> > 
> > diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
> > index 690bc84..9aeb78a 100644
> > --- 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_arch(u64
> > size, u64 align)
> > 
> >  	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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/devicetree: add missing early_init_dt_setup_initrd_arch stub
  2011-06-09  8:13   ` Florian Fainelli
@ 2011-06-09 13:23     ` Grant Likely
  0 siblings, 0 replies; 5+ messages in thread
From: Grant Likely @ 2011-06-09 13:23 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: Grant Likely, Sebastian Andrzej Siewior, tglx, linux-kernel,
	Ingo Molnar, Maxime Bizon

On Thursday, June 9, 2011, Florian Fainelli <ffainelli@freebox.fr> wrote:
> On Monday 06 June 2011 10:21:31 Grant Likely wrote:
>> On Mon, Jun 06, 2011 at 10:15:49AM +0200, Florian Fainelli wrote:
>> > From: Florian Fainelli <ffainelli@freebox.fr>
>> >
>> > 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.
>> >
>> > Tested on a custom Intel CE4100 board.
>> >
>> > CC:stable@kernel.org
>> > Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
>>
>> Acked-by: Grant Likely <grant.likely@secretlab.ca>
>
> Grant, are you picking this patch to any of your tree?

No. This is x86 stuff and should go via the tip tree.

g.

>
>>
>> > ---
>> > Grant,
>> >
>> > MIPS, PowerPC, Microblaze and now x86 all have the same way of
>> > implementing this, would it rather make sense to get this merged to
>> > generic devicetree functions and let this be overriden if needed?
>>
>> Probably, but I'm not going to tackle that problem just yet.  Although
>> if you want to investigate and propose a patch, then go for it.  :-)
>
> Allright, I will take a look at this.
>
>>
>> g.
>>
>> > Stable: this is a candidate for 2.6.39.2
>> >
>> > diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
>> > index 690bc84..9aeb78a 100644
>> > --- 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_arch(u64
>> > size, u64 align)
>> >
>> >     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@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at  http://www.tux.org/lkml/
>

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [tip:x86/urgent] x86: devicetree: Add missing early_init_dt_setup_initrd_arch stub
  2011-06-06  8:15 [PATCH] x86/devicetree: add missing early_init_dt_setup_initrd_arch stub Florian Fainelli
  2011-06-06  8:21 ` Grant Likely
@ 2011-06-09 13:43 ` tip-bot for Florian Fainelli
  1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Florian Fainelli @ 2011-06-09 13:43 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, grant.likely, hpa, mingo, mbizon, tglx, sebastian,
	ffainelli

Commit-ID:  977cb76d52e7aa040e18a84b29fe6fd80d79319b
Gitweb:     http://git.kernel.org/tip/977cb76d52e7aa040e18a84b29fe6fd80d79319b
Author:     Florian Fainelli <ffainelli@freebox.fr>
AuthorDate: Mon, 6 Jun 2011 10:15:49 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 9 Jun 2011 15:39:43 +0200

x86: devicetree: Add missing early_init_dt_setup_initrd_arch stub

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@freebox.fr>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Maxime Bizon <mbizon@freebox.fr>
Acked-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Cc: stable@kernel.org # 2.6.39
Link: http://lkml.kernel.org/r/201106061015.50039.ffainelli@freebox.fr
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/kernel/devicetree.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 690bc84..9aeb78a 100644
--- 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_arch(u64 size, u64 align)
 	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);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-06-09 13:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-06  8:15 [PATCH] x86/devicetree: add missing early_init_dt_setup_initrd_arch stub Florian Fainelli
2011-06-06  8:21 ` Grant Likely
2011-06-09  8:13   ` Florian Fainelli
2011-06-09 13:23     ` Grant Likely
2011-06-09 13:43 ` [tip:x86/urgent] x86: devicetree: Add " tip-bot for Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.