[PATCH 5/8] arch/x86: Add support for device tree code.

Grant Likely grant.likely at secretlab.ca
Sat Jul 17 04:59:14 EST 2010


On Fri, Jul 16, 2010 at 12:42 PM, Stephen Neuendorffer
<stephen.neuendorffer at xilinx.com> wrote:
>
>
>> -----Original Message-----
>> From: glikely at secretlab.ca [mailto:glikely at secretlab.ca] On Behalf Of Grant Likely
>> Sent: Friday, July 16, 2010 11:40 AM
>> To: Stephen Neuendorffer
>> Cc: devicetree-discuss at lists.ozlabs.org
>> Subject: Re: [PATCH 5/8] arch/x86: Add support for device tree code.
>>
>> On Fri, Jul 16, 2010 at 12:13 PM, Stephen Neuendorffer
>> <stephen.neuendorffer at xilinx.com> wrote:
>> > A few support device-tree related support functions that x86 didn't
>> > have before.
>> >
>> > Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer at xilinx.com>
>> >
>> > ----
>> >
>> >  I have no idea if continuing to add these functions to every arch is
>> > a good thing or whether they should (for instance) be weak symbols
>> > with a generic definition.
>> > ---
>> >  arch/x86/include/asm/device.h |    6 ++++
>> >  arch/x86/include/asm/irq.h    |    4 ++
>> >  arch/x86/kernel/Makefile      |    1 +
>> >  arch/x86/kernel/device_tree.c |   63 +++++++++++++++++++++++++++++++++++++++++
>> >  drivers/of/platform.c         |    2 +
>> >  include/linux/of_irq.h        |    1 +
>> >  6 files changed, 77 insertions(+), 0 deletions(-)
>> >  create mode 100644 arch/x86/kernel/device_tree.c
>> >
>> > diff --git a/arch/x86/include/asm/device.h b/arch/x86/include/asm/device.h
>> > index 029f230..01414f2 100644
>> > --- a/arch/x86/include/asm/device.h
>> > +++ b/arch/x86/include/asm/device.h
>> > @@ -14,6 +14,12 @@ struct dma_map_ops *dma_ops;
>> >  };
>> >
>> >  struct pdev_archdata {
>> > +#ifdef CONFIG_OF
>> > +       u64 dma_mask;
>> > +#endif
>>
>> This hunk (probably) isn't necessary anymore
>
> Doesn't compile without it because the code in fdt.c initializes it.

Fixed in current next-devicetree.

>> > diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h
>> > index 5458380..6c61992 100644
>> > --- a/arch/x86/include/asm/irq.h
>> > +++ b/arch/x86/include/asm/irq.h
>> > @@ -10,6 +10,10 @@
>> >  #include <asm/apicdef.h>
>> >  #include <asm/irq_vectors.h>
>> >
>> > +#define NO_IRQ (-1)
>> > +
>>
>> no.  irq 0 means no irq, and all patches adding #define NO_IRQ to x86
>> have been nacked.  (Basically, all architectures using -1 to mean no
>> irq are considered broken.  ARM is one of the few (albeit large)
>> holdouts.  I've got a patch kicking around to change microblaze to use
>> 0 for no_irq too.
>
> OK, bogon there..  The question is: how to get rid of it, since the generic of/irq.c
> code references it?

Fix microblaze, then NO_IRQ references can be removed from of/irq.c

g.


More information about the devicetree-discuss mailing list