* [PATCH] of/address: sparc: Declare of_iomap as an extern function for sparc again
@ 2012-11-23 11:24 Andreas Larsson
2012-11-23 19:21 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Larsson @ 2012-11-23 11:24 UTC (permalink / raw)
To: davem
Cc: sam, rob.herring, grant.likely, sparclinux, devicetree-discuss,
linux-kernel, software
This bug-fix makes sure that of_iomap is defined extern for sparc so that the
sparc-specific implementation of_iomap is once again used when including
include/linux/of_address.h in a sparc context. OF_GPIO that is now available for
sparc relies on this.
The bug was inadvertently introduced in a850a75, "of/address: add empty static
inlines for !CONFIG_OF", that added a static dummy inline for of_iomap when
!CONFIG_OF_ADDRESS. However, CONFIG_OF_ADDRESS is never defined for sparc, but
there is a sparc-specific implementation /arch/sparc/kernel/of_device_common.c.
This fix takes the same approach as 0bce04b that solved the equivalent problem
for of_address_to_resource.
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
---
arch/sparc/include/asm/prom.h | 5 ++++-
include/linux/of_address.h | 2 ++
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index f930031..67c6257 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -63,10 +63,13 @@ extern char *of_console_options;
extern void irq_trans_init(struct device_node *dp);
extern char *build_path_component(struct device_node *dp);
-/* SPARC has a local implementation */
+/* SPARC has local implementations */
extern int of_address_to_resource(struct device_node *dev, int index,
struct resource *r);
#define of_address_to_resource of_address_to_resource
+void __iomem *of_iomap(struct device_node *node, int index);
+#define of_iomap of_iomap
+
#endif /* __KERNEL__ */
#endif /* _SPARC_PROM_H */
diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index e20e3af..0506eb5 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -42,10 +42,12 @@ static inline struct device_node *of_find_matching_node_by_address(
{
return NULL;
}
+#ifndef of_iomap
static inline void __iomem *of_iomap(struct device_node *device, int index)
{
return NULL;
}
+#endif
static inline const __be32 *of_get_address(struct device_node *dev, int index,
u64 *size, unsigned int *flags)
{
--
1.7.0.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] of/address: sparc: Declare of_iomap as an extern function for sparc again
2012-11-23 11:24 [PATCH] of/address: sparc: Declare of_iomap as an extern function for sparc again Andreas Larsson
@ 2012-11-23 19:21 ` David Miller
2012-11-23 21:59 ` Grant Likely
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2012-11-23 19:21 UTC (permalink / raw)
To: andreas
Cc: sam, rob.herring, grant.likely, sparclinux, devicetree-discuss,
linux-kernel, software
From: Andreas Larsson <andreas@gaisler.com>
Date: Fri, 23 Nov 2012 12:24:09 +0100
> This bug-fix makes sure that of_iomap is defined extern for sparc so that the
> sparc-specific implementation of_iomap is once again used when including
> include/linux/of_address.h in a sparc context. OF_GPIO that is now available for
> sparc relies on this.
>
> The bug was inadvertently introduced in a850a75, "of/address: add empty static
> inlines for !CONFIG_OF", that added a static dummy inline for of_iomap when
> !CONFIG_OF_ADDRESS. However, CONFIG_OF_ADDRESS is never defined for sparc, but
> there is a sparc-specific implementation /arch/sparc/kernel/of_device_common.c.
>
> This fix takes the same approach as 0bce04b that solved the equivalent problem
> for of_address_to_resource.
>
> Signed-off-by: Andreas Larsson <andreas@gaisler.com>
Grant, can you possibly merge this to Linus while I'm travelling?
That would help me a lot.
Thanks!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] of/address: sparc: Declare of_iomap as an extern function for sparc again
2012-11-23 19:21 ` David Miller
@ 2012-11-23 21:59 ` Grant Likely
2012-11-23 23:34 ` Grant Likely
0 siblings, 1 reply; 5+ messages in thread
From: Grant Likely @ 2012-11-23 21:59 UTC (permalink / raw)
To: David Miller, andreas
Cc: sam, rob.herring, sparclinux, devicetree-discuss, linux-kernel,
software
On Fri, 23 Nov 2012 14:21:10 -0500 (EST), David Miller <davem@davemloft.net> wrote:
> From: Andreas Larsson <andreas@gaisler.com>
> Date: Fri, 23 Nov 2012 12:24:09 +0100
>
> > This bug-fix makes sure that of_iomap is defined extern for sparc so that the
> > sparc-specific implementation of_iomap is once again used when including
> > include/linux/of_address.h in a sparc context. OF_GPIO that is now available for
> > sparc relies on this.
> >
> > The bug was inadvertently introduced in a850a75, "of/address: add empty static
> > inlines for !CONFIG_OF", that added a static dummy inline for of_iomap when
> > !CONFIG_OF_ADDRESS. However, CONFIG_OF_ADDRESS is never defined for sparc, but
> > there is a sparc-specific implementation /arch/sparc/kernel/of_device_common.c.
> >
> > This fix takes the same approach as 0bce04b that solved the equivalent problem
> > for of_address_to_resource.
> >
> > Signed-off-by: Andreas Larsson <andreas@gaisler.com>
>
> Grant, can you possibly merge this to Linus while I'm travelling?
> That would help me a lot.
Yup, I'm doing it right now.
g.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] of/address: sparc: Declare of_iomap as an extern function for sparc again
2012-11-23 21:59 ` Grant Likely
@ 2012-11-23 23:34 ` Grant Likely
2012-11-23 23:55 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Grant Likely @ 2012-11-23 23:34 UTC (permalink / raw)
To: David Miller, andreas
Cc: sam, rob.herring, sparclinux, devicetree-discuss, linux-kernel,
software, stable
Cc'ing stable since this should go into previous kernels too.
g.
Grant Likely <grant.likely@secretlab.ca> wrote:
>On Fri, 23 Nov 2012 14:21:10 -0500 (EST), David Miller
><davem@davemloft.net> wrote:
>> From: Andreas Larsson <andreas@gaisler.com>
>> Date: Fri, 23 Nov 2012 12:24:09 +0100
>>
>> > This bug-fix makes sure that of_iomap is defined extern for sparc
>so that the
>> > sparc-specific implementation of_iomap is once again used when
>including
>> > include/linux/of_address.h in a sparc context. OF_GPIO that is now
>available for
>> > sparc relies on this.
>> >
>> > The bug was inadvertently introduced in a850a75, "of/address: add
>empty static
>> > inlines for !CONFIG_OF", that added a static dummy inline for
>of_iomap when
>> > !CONFIG_OF_ADDRESS. However, CONFIG_OF_ADDRESS is never defined for
>sparc, but
>> > there is a sparc-specific implementation
>/arch/sparc/kernel/of_device_common.c.
>> >
>> > This fix takes the same approach as 0bce04b that solved the
>equivalent problem
>> > for of_address_to_resource.
>> >
>> > Signed-off-by: Andreas Larsson <andreas@gaisler.com>
>>
>> Grant, can you possibly merge this to Linus while I'm travelling?
>> That would help me a lot.
>
>Yup, I'm doing it right now.
>
>g.
--
Grant Likely, P.Eng.
Secret Lab Technologies Ltd.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] of/address: sparc: Declare of_iomap as an extern function for sparc again
2012-11-23 23:34 ` Grant Likely
@ 2012-11-23 23:55 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2012-11-23 23:55 UTC (permalink / raw)
To: Grant Likely
Cc: David Miller, andreas, sam, rob.herring, sparclinux,
devicetree-discuss, linux-kernel, software, stable
On Fri, Nov 23, 2012 at 11:34:20PM +0000, Grant Likely wrote:
> Cc'ing stable since this should go into previous kernels too.
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-11-23 23:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-23 11:24 [PATCH] of/address: sparc: Declare of_iomap as an extern function for sparc again Andreas Larsson
2012-11-23 19:21 ` David Miller
2012-11-23 21:59 ` Grant Likely
2012-11-23 23:34 ` Grant Likely
2012-11-23 23:55 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).