* [PATCH 0/3] of: Increase compile coverage @ 2015-04-05 14:59 Geert Uytterhoeven [not found] ` <1428245965-19618-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> ` (2 more replies) 0 siblings, 3 replies; 14+ messages in thread From: Geert Uytterhoeven @ 2015-04-05 14:59 UTC (permalink / raw) To: Grant Likely, Rob Herring, Arnd Bergmann Cc: devicetree, linux-kernel, Geert Uytterhoeven Hi, Currently the OF configuration symbol is explicitly selected on architectures that support device trees and/or Open Firmware. However, there's no technical reason to limit the device tree infrastructure to these architectures. Hence this series allows to enable OF when compile testing, to increase compile coverage. It also fixes the fallout I encountered when IRQ domain support is not enabled. Geert Uytterhoeven (3): of: Allow OF to be enabled if COMPILE_TEST to increase coverage of: OF_IRQ should depend on IRQ_DOMAIN of: Add dummy of_irq_to_resource_table() for IRQ_OF=n drivers/of/Kconfig | 8 ++++++-- include/linux/of_irq.h | 9 +++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) -- 1.9.1 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <1428245965-19618-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>]
* [PATCH 1/3] of: Allow OF to be enabled if COMPILE_TEST to increase coverage [not found] ` <1428245965-19618-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> @ 2015-04-05 14:59 ` Geert Uytterhoeven [not found] ` <1428245965-19618-2-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> 0 siblings, 1 reply; 14+ messages in thread From: Geert Uytterhoeven @ 2015-04-05 14:59 UTC (permalink / raw) To: Grant Likely, Rob Herring, Arnd Bergmann Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven Currently the OF configuration symbol is explicitly selected on architectures that support device trees and/or Open Firmware. However, there's no technical reason to limit the device tree infrastructure to these architectures. Hence allow OF to be enabled when compile testing, to increase compile coverage. Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> --- drivers/of/Kconfig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index 7bcaeec876c0c3a5..4c98f14694458794 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -2,7 +2,11 @@ config DTC bool config OF - bool + bool "Device Tree and Open Firmware support" if COMPILE_TEST + help + This option enables the device tree infrastructure. + If is automatically selected by platforms that need it, but can + be enabled manually to increase compile-coverage. menu "Device Tree and Open Firmware support" depends on OF -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 14+ messages in thread
[parent not found: <1428245965-19618-2-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>]
* Re: [PATCH 1/3] of: Allow OF to be enabled if COMPILE_TEST to increase coverage [not found] ` <1428245965-19618-2-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> @ 2015-04-06 13:13 ` Rob Herring [not found] ` <CAL_JsqLQrNEpqWnqP4uDV0x87wERLC50FO-06fYBwLbyYsChpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 14+ messages in thread From: Rob Herring @ 2015-04-06 13:13 UTC (permalink / raw) To: Geert Uytterhoeven, Pantelis Antoniou Cc: Grant Likely, Rob Herring, Arnd Bergmann, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org +Pantelis On Sun, Apr 5, 2015 at 9:59 AM, Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> wrote: > Currently the OF configuration symbol is explicitly selected on > architectures that support device trees and/or Open Firmware. > However, there's no technical reason to limit the device tree > infrastructure to these architectures. Hence allow OF to be enabled when > compile testing, to increase compile coverage. > > Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> > --- > drivers/of/Kconfig | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig > index 7bcaeec876c0c3a5..4c98f14694458794 100644 > --- a/drivers/of/Kconfig > +++ b/drivers/of/Kconfig > @@ -2,7 +2,11 @@ config DTC > bool > > config OF > - bool > + bool "Device Tree and Open Firmware support" if COMPILE_TEST Actually, I think we want to just make this always visible. There are now use cases with overlays where we may want to enable DT even if the architecture is not booting with DT. However, there may be more work needed to do that. Rob > + help > + This option enables the device tree infrastructure. > + If is automatically selected by platforms that need it, but can > + be enabled manually to increase compile-coverage. > > menu "Device Tree and Open Firmware support" > depends on OF > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <CAL_JsqLQrNEpqWnqP4uDV0x87wERLC50FO-06fYBwLbyYsChpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH 1/3] of: Allow OF to be enabled if COMPILE_TEST to increase coverage [not found] ` <CAL_JsqLQrNEpqWnqP4uDV0x87wERLC50FO-06fYBwLbyYsChpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2015-04-23 12:03 ` Pantelis Antoniou [not found] ` <0C5158C3-2BD3-4EC6-B1AC-B669F30B4C34-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> 0 siblings, 1 reply; 14+ messages in thread From: Pantelis Antoniou @ 2015-04-23 12:03 UTC (permalink / raw) To: Rob Herring Cc: Geert Uytterhoeven, Grant Likely, Rob Herring, Arnd Bergmann, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Hi Rob, > On Apr 6, 2015, at 16:13 , Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > +Pantelis > > On Sun, Apr 5, 2015 at 9:59 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote: >> Currently the OF configuration symbol is explicitly selected on >> architectures that support device trees and/or Open Firmware. >> However, there's no technical reason to limit the device tree >> infrastructure to these architectures. Hence allow OF to be enabled when >> compile testing, to increase compile coverage. >> >> Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> >> --- >> drivers/of/Kconfig | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig >> index 7bcaeec876c0c3a5..4c98f14694458794 100644 >> --- a/drivers/of/Kconfig >> +++ b/drivers/of/Kconfig >> @@ -2,7 +2,11 @@ config DTC >> bool >> >> config OF >> - bool >> + bool "Device Tree and Open Firmware support" if COMPILE_TEST > > Actually, I think we want to just make this always visible. There are > now use cases with overlays where we may want to enable DT even if the > architecture is not booting with DT. However, there may be more work > needed to do that. > We have to decouple the notion of CONFIG_OF of the following two different things. 1. I’m booting using a device tree blob. 2. I’m using the in-kernel live device tree to represent my hardware device state. so CONFIG_OF_DTB_BLOB for the first case, and CONFIG_OF for the second. Up to now we bundle those two together. > Rob > Regards — Pantelis >> + help >> + This option enables the device tree infrastructure. >> + If is automatically selected by platforms that need it, but can >> + be enabled manually to increase compile-coverage. >> >> menu "Device Tree and Open Firmware support" >> depends on OF >> -- >> 1.9.1 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe devicetree" in >> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <0C5158C3-2BD3-4EC6-B1AC-B669F30B4C34-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>]
* Re: [PATCH 1/3] of: Allow OF to be enabled if COMPILE_TEST to increase coverage [not found] ` <0C5158C3-2BD3-4EC6-B1AC-B669F30B4C34-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> @ 2015-04-23 18:22 ` Rob Herring 2015-04-23 18:28 ` Pantelis Antoniou 0 siblings, 1 reply; 14+ messages in thread From: Rob Herring @ 2015-04-23 18:22 UTC (permalink / raw) To: Pantelis Antoniou Cc: Geert Uytterhoeven, Grant Likely, Rob Herring, Arnd Bergmann, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Thu, Apr 23, 2015 at 7:03 AM, Pantelis Antoniou <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> wrote: > Hi Rob, > >> On Apr 6, 2015, at 16:13 , Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> +Pantelis >> >> On Sun, Apr 5, 2015 at 9:59 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote: >>> Currently the OF configuration symbol is explicitly selected on >>> architectures that support device trees and/or Open Firmware. >>> However, there's no technical reason to limit the device tree >>> infrastructure to these architectures. Hence allow OF to be enabled when >>> compile testing, to increase compile coverage. >>> >>> Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> >>> --- >>> drivers/of/Kconfig | 6 +++++- >>> 1 file changed, 5 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig >>> index 7bcaeec876c0c3a5..4c98f14694458794 100644 >>> --- a/drivers/of/Kconfig >>> +++ b/drivers/of/Kconfig >>> @@ -2,7 +2,11 @@ config DTC >>> bool >>> >>> config OF >>> - bool >>> + bool "Device Tree and Open Firmware support" if COMPILE_TEST >> >> Actually, I think we want to just make this always visible. There are >> now use cases with overlays where we may want to enable DT even if the >> architecture is not booting with DT. However, there may be more work >> needed to do that. >> > > We have to decouple the notion of CONFIG_OF of the following two different things. > > 1. I’m booting using a device tree blob. > 2. I’m using the in-kernel live device tree to represent my hardware device state. > > so CONFIG_OF_DTB_BLOB for the first case, and CONFIG_OF for the second. > > Up to now we bundle those two together. They are separate already with CONFIG_OF_EARLY_FLATTREE Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/3] of: Allow OF to be enabled if COMPILE_TEST to increase coverage 2015-04-23 18:22 ` Rob Herring @ 2015-04-23 18:28 ` Pantelis Antoniou 0 siblings, 0 replies; 14+ messages in thread From: Pantelis Antoniou @ 2015-04-23 18:28 UTC (permalink / raw) To: Rob Herring Cc: Geert Uytterhoeven, Grant Likely, Rob Herring, Arnd Bergmann, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Hi Rob, > On Apr 23, 2015, at 21:22 , Rob Herring <robherring2@gmail.com> wrote: > > On Thu, Apr 23, 2015 at 7:03 AM, Pantelis Antoniou > <pantelis.antoniou@konsulko.com> wrote: >> Hi Rob, >> >>> On Apr 6, 2015, at 16:13 , Rob Herring <robherring2@gmail.com> wrote: >>> >>> +Pantelis >>> >>> On Sun, Apr 5, 2015 at 9:59 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote: >>>> Currently the OF configuration symbol is explicitly selected on >>>> architectures that support device trees and/or Open Firmware. >>>> However, there's no technical reason to limit the device tree >>>> infrastructure to these architectures. Hence allow OF to be enabled when >>>> compile testing, to increase compile coverage. >>>> >>>> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> >>>> --- >>>> drivers/of/Kconfig | 6 +++++- >>>> 1 file changed, 5 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig >>>> index 7bcaeec876c0c3a5..4c98f14694458794 100644 >>>> --- a/drivers/of/Kconfig >>>> +++ b/drivers/of/Kconfig >>>> @@ -2,7 +2,11 @@ config DTC >>>> bool >>>> >>>> config OF >>>> - bool >>>> + bool "Device Tree and Open Firmware support" if COMPILE_TEST >>> >>> Actually, I think we want to just make this always visible. There are >>> now use cases with overlays where we may want to enable DT even if the >>> architecture is not booting with DT. However, there may be more work >>> needed to do that. >>> >> >> We have to decouple the notion of CONFIG_OF of the following two different things. >> >> 1. I’m booting using a device tree blob. >> 2. I’m using the in-kernel live device tree to represent my hardware device state. >> >> so CONFIG_OF_DTB_BLOB for the first case, and CONFIG_OF for the second. >> >> Up to now we bundle those two together. > > They are separate already with CONFIG_OF_EARLY_FLATTREE > A bit cryptically named, no? > Rob Regards — Pantelis ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/3] of: OF_IRQ should depend on IRQ_DOMAIN 2015-04-05 14:59 [PATCH 0/3] of: Increase compile coverage Geert Uytterhoeven [not found] ` <1428245965-19618-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> @ 2015-04-05 14:59 ` Geert Uytterhoeven 2015-04-06 14:40 ` Arnd Bergmann [not found] ` <1428245965-19618-3-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> 2015-04-05 14:59 ` [PATCH 3/3] of: Add dummy of_irq_to_resource_table() for IRQ_OF=n Geert Uytterhoeven 2 siblings, 2 replies; 14+ messages in thread From: Geert Uytterhoeven @ 2015-04-05 14:59 UTC (permalink / raw) To: Grant Likely, Rob Herring, Arnd Bergmann Cc: devicetree, linux-kernel, Geert Uytterhoeven If CONFIG_IRQ_DOMAIN=n: drivers/of/irq.c: In function ‘of_irq_get’: drivers/of/irq.c:406: error: implicit declaration of function ‘irq_find_host’ drivers/of/irq.c:406: warning: assignment makes pointer from integer without a cast make[2]: *** [drivers/of/irq.o] Error 1 Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- drivers/of/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig index 4c98f14694458794..92adecd3ecb28fc7 100644 --- a/drivers/of/Kconfig +++ b/drivers/of/Kconfig @@ -50,7 +50,7 @@ config OF_ADDRESS_PCI config OF_IRQ def_bool y - depends on !SPARC + depends on !SPARC && IRQ_DOMAIN config OF_NET depends on NETDEVICES -- 1.9.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] of: OF_IRQ should depend on IRQ_DOMAIN 2015-04-05 14:59 ` [PATCH 2/3] of: OF_IRQ should depend on IRQ_DOMAIN Geert Uytterhoeven @ 2015-04-06 14:40 ` Arnd Bergmann 2015-04-06 15:26 ` Rob Herring 2015-04-06 15:26 ` Geert Uytterhoeven [not found] ` <1428245965-19618-3-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> 1 sibling, 2 replies; 14+ messages in thread From: Arnd Bergmann @ 2015-04-06 14:40 UTC (permalink / raw) To: Geert Uytterhoeven; +Cc: Grant Likely, Rob Herring, devicetree, linux-kernel On Sunday 05 April 2015 16:59:24 Geert Uytterhoeven wrote: > If CONFIG_IRQ_DOMAIN=n: > > drivers/of/irq.c: In function ‘of_irq_get’: > drivers/of/irq.c:406: error: implicit declaration of function ‘irq_find_host’ > drivers/of/irq.c:406: warning: assignment makes pointer from integer without a cast > make[2]: *** [drivers/of/irq.o] Error 1 > > Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> > --- > drivers/of/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig > index 4c98f14694458794..92adecd3ecb28fc7 100644 > --- a/drivers/of/Kconfig > +++ b/drivers/of/Kconfig > @@ -50,7 +50,7 @@ config OF_ADDRESS_PCI > > config OF_IRQ > def_bool y > - depends on !SPARC > + depends on !SPARC && IRQ_DOMAIN > > config OF_NET > depends on NETDEVICES > Sparc does not set IRQ_DOMAIN, so we can probably simplify this to config OF_IRQ def_bool IRQ_DOMAIN unless you want to keep the sparc antidependency explicit. Arnd ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] of: OF_IRQ should depend on IRQ_DOMAIN 2015-04-06 14:40 ` Arnd Bergmann @ 2015-04-06 15:26 ` Rob Herring 2015-04-06 15:26 ` Geert Uytterhoeven 1 sibling, 0 replies; 14+ messages in thread From: Rob Herring @ 2015-04-06 15:26 UTC (permalink / raw) To: Arnd Bergmann Cc: Geert Uytterhoeven, Grant Likely, Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Mon, Apr 6, 2015 at 9:40 AM, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> wrote: > On Sunday 05 April 2015 16:59:24 Geert Uytterhoeven wrote: >> If CONFIG_IRQ_DOMAIN=n: >> >> drivers/of/irq.c: In function ‘of_irq_get’: >> drivers/of/irq.c:406: error: implicit declaration of function ‘irq_find_host’ >> drivers/of/irq.c:406: warning: assignment makes pointer from integer without a cast >> make[2]: *** [drivers/of/irq.o] Error 1 >> >> Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> >> --- >> drivers/of/Kconfig | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig >> index 4c98f14694458794..92adecd3ecb28fc7 100644 >> --- a/drivers/of/Kconfig >> +++ b/drivers/of/Kconfig >> @@ -50,7 +50,7 @@ config OF_ADDRESS_PCI >> >> config OF_IRQ >> def_bool y >> - depends on !SPARC >> + depends on !SPARC && IRQ_DOMAIN >> >> config OF_NET >> depends on NETDEVICES >> > > Sparc does not set IRQ_DOMAIN, so we can probably simplify this to > > config OF_IRQ > def_bool IRQ_DOMAIN > > unless you want to keep the sparc antidependency explicit. IRQ_DOMAIN is selected in quite a few places. We'd need to make sure none of those can be selected by Sparc. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] of: OF_IRQ should depend on IRQ_DOMAIN 2015-04-06 14:40 ` Arnd Bergmann 2015-04-06 15:26 ` Rob Herring @ 2015-04-06 15:26 ` Geert Uytterhoeven 2015-04-06 21:39 ` Arnd Bergmann 1 sibling, 1 reply; 14+ messages in thread From: Geert Uytterhoeven @ 2015-04-06 15:26 UTC (permalink / raw) To: Arnd Bergmann Cc: Grant Likely, Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Hi Arnd, On Mon, Apr 6, 2015 at 4:40 PM, Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org> wrote: >> --- a/drivers/of/Kconfig >> +++ b/drivers/of/Kconfig >> @@ -50,7 +50,7 @@ config OF_ADDRESS_PCI >> >> config OF_IRQ >> def_bool y >> - depends on !SPARC >> + depends on !SPARC && IRQ_DOMAIN >> >> config OF_NET >> depends on NETDEVICES >> > > Sparc does not set IRQ_DOMAIN, so we can probably simplify this to > > config OF_IRQ > def_bool IRQ_DOMAIN > > unless you want to keep the sparc antidependency explicit. Given drivers/base/platform.c: int platform_get_irq(struct platform_device *dev, unsigned int num) { #ifdef CONFIG_SPARC ... #else struct resource *r; if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) { ... } ... #endif } yes I do want to keep it explicit. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/3] of: OF_IRQ should depend on IRQ_DOMAIN 2015-04-06 15:26 ` Geert Uytterhoeven @ 2015-04-06 21:39 ` Arnd Bergmann 0 siblings, 0 replies; 14+ messages in thread From: Arnd Bergmann @ 2015-04-06 21:39 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Grant Likely, Rob Herring, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org On Monday 06 April 2015 17:26:57 Geert Uytterhoeven wrote: > Given drivers/base/platform.c: > > int platform_get_irq(struct platform_device *dev, unsigned int num) > { > #ifdef CONFIG_SPARC > ... > #else > struct resource *r; > if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) { > ... > } > ... > #endif > } > > yes I do want to keep it explicit. > Ok, makes sense, thanks! Arnd ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <1428245965-19618-3-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>]
* Re: [PATCH 2/3] of: OF_IRQ should depend on IRQ_DOMAIN [not found] ` <1428245965-19618-3-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> @ 2015-04-15 12:54 ` Rob Herring 0 siblings, 0 replies; 14+ messages in thread From: Rob Herring @ 2015-04-15 12:54 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Grant Likely, Rob Herring, Arnd Bergmann, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Sun, Apr 5, 2015 at 9:59 AM, Geert Uytterhoeven <geert-Td1EMuHUCqygBwfqmJ+zsg@public.gmane.orgg> wrote: > If CONFIG_IRQ_DOMAIN=n: > > drivers/of/irq.c: In function ‘of_irq_get’: > drivers/of/irq.c:406: error: implicit declaration of function ‘irq_find_host’ > drivers/of/irq.c:406: warning: assignment makes pointer from integer without a cast > make[2]: *** [drivers/of/irq.o] Error 1 > > Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> Applied. Thanks. Rob > --- > drivers/of/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/of/Kconfig b/drivers/of/Kconfig > index 4c98f14694458794..92adecd3ecb28fc7 100644 > --- a/drivers/of/Kconfig > +++ b/drivers/of/Kconfig > @@ -50,7 +50,7 @@ config OF_ADDRESS_PCI > > config OF_IRQ > def_bool y > - depends on !SPARC > + depends on !SPARC && IRQ_DOMAIN > > config OF_NET > depends on NETDEVICES > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/3] of: Add dummy of_irq_to_resource_table() for IRQ_OF=n 2015-04-05 14:59 [PATCH 0/3] of: Increase compile coverage Geert Uytterhoeven [not found] ` <1428245965-19618-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> 2015-04-05 14:59 ` [PATCH 2/3] of: OF_IRQ should depend on IRQ_DOMAIN Geert Uytterhoeven @ 2015-04-05 14:59 ` Geert Uytterhoeven [not found] ` <1428245965-19618-4-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> 2 siblings, 1 reply; 14+ messages in thread From: Geert Uytterhoeven @ 2015-04-05 14:59 UTC (permalink / raw) To: Grant Likely, Rob Herring, Arnd Bergmann Cc: devicetree, linux-kernel, Geert Uytterhoeven If CONFIG_IRQ_OF=n: drivers/built-in.o: In function `of_device_alloc': (.text+0x72bce): undefined reference to `of_irq_to_resource_table' make: *** [vmlinux] Error 1 of_device_alloc() calls of_irq_to_resource_table() with nr_irqs = 0 due to of_irq_count() already being a dummy, so just add a dummy for of_irq_to_resource_table(), too. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> --- include/linux/of_irq.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index bfec136a6d1e60f8..d884929a77479782 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h @@ -37,8 +37,6 @@ extern int of_irq_parse_one(struct device_node *device, int index, extern unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data); extern int of_irq_to_resource(struct device_node *dev, int index, struct resource *r); -extern int of_irq_to_resource_table(struct device_node *dev, - struct resource *res, int nr_irqs); extern void of_irq_init(const struct of_device_id *matches); @@ -46,6 +44,8 @@ extern void of_irq_init(const struct of_device_id *matches); extern int of_irq_count(struct device_node *dev); extern int of_irq_get(struct device_node *dev, int index); extern int of_irq_get_byname(struct device_node *dev, const char *name); +extern int of_irq_to_resource_table(struct device_node *dev, + struct resource *res, int nr_irqs); #else static inline int of_irq_count(struct device_node *dev) { @@ -59,6 +59,11 @@ static inline int of_irq_get_byname(struct device_node *dev, const char *name) { return 0; } +static inline int of_irq_to_resource_table(struct device_node *dev, + struct resource *res, int nr_irqs) +{ + return 0; +} #endif #if defined(CONFIG_OF) -- 1.9.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
[parent not found: <1428245965-19618-4-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>]
* Re: [PATCH 3/3] of: Add dummy of_irq_to_resource_table() for IRQ_OF=n [not found] ` <1428245965-19618-4-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> @ 2015-04-15 12:54 ` Rob Herring 0 siblings, 0 replies; 14+ messages in thread From: Rob Herring @ 2015-04-15 12:54 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Grant Likely, Rob Herring, Arnd Bergmann, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Sun, Apr 5, 2015 at 9:59 AM, Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> wrote: > If CONFIG_IRQ_OF=n: > > drivers/built-in.o: In function `of_device_alloc': > (.text+0x72bce): undefined reference to `of_irq_to_resource_table' > make: *** [vmlinux] Error 1 > > of_device_alloc() calls of_irq_to_resource_table() with nr_irqs = 0 due > to of_irq_count() already being a dummy, so just add a dummy for > of_irq_to_resource_table(), too. > > Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> Applied. Thanks. Rob > --- > include/linux/of_irq.h | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h > index bfec136a6d1e60f8..d884929a77479782 100644 > --- a/include/linux/of_irq.h > +++ b/include/linux/of_irq.h > @@ -37,8 +37,6 @@ extern int of_irq_parse_one(struct device_node *device, int index, > extern unsigned int irq_create_of_mapping(struct of_phandle_args *irq_data); > extern int of_irq_to_resource(struct device_node *dev, int index, > struct resource *r); > -extern int of_irq_to_resource_table(struct device_node *dev, > - struct resource *res, int nr_irqs); > > extern void of_irq_init(const struct of_device_id *matches); > > @@ -46,6 +44,8 @@ extern void of_irq_init(const struct of_device_id *matches); > extern int of_irq_count(struct device_node *dev); > extern int of_irq_get(struct device_node *dev, int index); > extern int of_irq_get_byname(struct device_node *dev, const char *name); > +extern int of_irq_to_resource_table(struct device_node *dev, > + struct resource *res, int nr_irqs); > #else > static inline int of_irq_count(struct device_node *dev) > { > @@ -59,6 +59,11 @@ static inline int of_irq_get_byname(struct device_node *dev, const char *name) > { > return 0; > } > +static inline int of_irq_to_resource_table(struct device_node *dev, > + struct resource *res, int nr_irqs) > +{ > + return 0; > +} > #endif > > #if defined(CONFIG_OF) > -- > 1.9.1 > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-04-23 18:28 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-04-05 14:59 [PATCH 0/3] of: Increase compile coverage Geert Uytterhoeven [not found] ` <1428245965-19618-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> 2015-04-05 14:59 ` [PATCH 1/3] of: Allow OF to be enabled if COMPILE_TEST to increase coverage Geert Uytterhoeven [not found] ` <1428245965-19618-2-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> 2015-04-06 13:13 ` Rob Herring [not found] ` <CAL_JsqLQrNEpqWnqP4uDV0x87wERLC50FO-06fYBwLbyYsChpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2015-04-23 12:03 ` Pantelis Antoniou [not found] ` <0C5158C3-2BD3-4EC6-B1AC-B669F30B4C34-OWPKS81ov/FWk0Htik3J/w@public.gmane.org> 2015-04-23 18:22 ` Rob Herring 2015-04-23 18:28 ` Pantelis Antoniou 2015-04-05 14:59 ` [PATCH 2/3] of: OF_IRQ should depend on IRQ_DOMAIN Geert Uytterhoeven 2015-04-06 14:40 ` Arnd Bergmann 2015-04-06 15:26 ` Rob Herring 2015-04-06 15:26 ` Geert Uytterhoeven 2015-04-06 21:39 ` Arnd Bergmann [not found] ` <1428245965-19618-3-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> 2015-04-15 12:54 ` Rob Herring 2015-04-05 14:59 ` [PATCH 3/3] of: Add dummy of_irq_to_resource_table() for IRQ_OF=n Geert Uytterhoeven [not found] ` <1428245965-19618-4-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org> 2015-04-15 12:54 ` Rob Herring
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).