* [PATCH] irqchip: gic-v3: Explicitly include linux/io.h
@ 2015-08-07 5:31 Ben Zhang
2015-08-07 8:40 ` Marc Zyngier
0 siblings, 1 reply; 5+ messages in thread
From: Ben Zhang @ 2015-08-07 5:31 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: Jason Cooper, Marc Zyngier, linux-kernel, Ben Zhang
linux/io.h is needed because the driver uses:
readl_relaxed
writel_relaxed
writeq_relaxed
readq_relaxed
iounmap
The header was implicitly included by an unrelated
commit 332fd7c4fef5
("genirq: Generic chip: Change irq_reg_{readl,writel} arguments")
from the path below:
include/linux/io.h
include/linux/irq.h
include/linux/of_irq.h
drivers/irqchip/irq-gic-v3.c
Signed-off-by: Ben Zhang <benzh@chromium.org>
---
drivers/irqchip/irq-gic-v3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index e406bc5..3350b8d 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -19,6 +19,7 @@
#include <linux/cpu_pm.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
+#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
--
2.5.0.rc2.392.g76e840b
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] irqchip: gic-v3: Explicitly include linux/io.h
2015-08-07 5:31 [PATCH] irqchip: gic-v3: Explicitly include linux/io.h Ben Zhang
@ 2015-08-07 8:40 ` Marc Zyngier
2015-08-07 23:38 ` Ben Zhang
0 siblings, 1 reply; 5+ messages in thread
From: Marc Zyngier @ 2015-08-07 8:40 UTC (permalink / raw)
To: Ben Zhang, Thomas Gleixner; +Cc: Jason Cooper, linux-kernel
Hi Ben,
On 07/08/15 06:31, Ben Zhang wrote:
> linux/io.h is needed because the driver uses:
> readl_relaxed
> writel_relaxed
> writeq_relaxed
> readq_relaxed
> iounmap
>
> The header was implicitly included by an unrelated
> commit 332fd7c4fef5
> ("genirq: Generic chip: Change irq_reg_{readl,writel} arguments")
> from the path below:
> include/linux/io.h
> include/linux/irq.h
> include/linux/of_irq.h
> drivers/irqchip/irq-gic-v3.c
>
> Signed-off-by: Ben Zhang <benzh@chromium.org>
> ---
> drivers/irqchip/irq-gic-v3.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
> index e406bc5..3350b8d 100644
> --- a/drivers/irqchip/irq-gic-v3.c
> +++ b/drivers/irqchip/irq-gic-v3.c
> @@ -19,6 +19,7 @@
> #include <linux/cpu_pm.h>
> #include <linux/delay.h>
> #include <linux/interrupt.h>
> +#include <linux/io.h>
> #include <linux/of.h>
> #include <linux/of_address.h>
> #include <linux/of_irq.h>
>
This seems valid, but out of curiosity: Has this triggered any
observable build failure? Or is that something you found by inspection?
Thanks,
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] irqchip: gic-v3: Explicitly include linux/io.h
2015-08-07 8:40 ` Marc Zyngier
@ 2015-08-07 23:38 ` Ben Zhang
2015-08-19 21:13 ` Thomas Gleixner
0 siblings, 1 reply; 5+ messages in thread
From: Ben Zhang @ 2015-08-07 23:38 UTC (permalink / raw)
To: Marc Zyngier; +Cc: Thomas Gleixner, Jason Cooper, linux-kernel, Nicolas Boichat
On Fri, Aug 7, 2015 at 1:40 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
> Hi Ben,
>
> On 07/08/15 06:31, Ben Zhang wrote:
>> linux/io.h is needed because the driver uses:
>> readl_relaxed
>> writel_relaxed
>> writeq_relaxed
>> readq_relaxed
>> iounmap
>>
>> The header was implicitly included by an unrelated
>> commit 332fd7c4fef5
>> ("genirq: Generic chip: Change irq_reg_{readl,writel} arguments")
>> from the path below:
>> include/linux/io.h
>> include/linux/irq.h
>> include/linux/of_irq.h
>> drivers/irqchip/irq-gic-v3.c
>>
>> Signed-off-by: Ben Zhang <benzh@chromium.org>
>> ---
>> drivers/irqchip/irq-gic-v3.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
>> index e406bc5..3350b8d 100644
>> --- a/drivers/irqchip/irq-gic-v3.c
>> +++ b/drivers/irqchip/irq-gic-v3.c
>> @@ -19,6 +19,7 @@
>> #include <linux/cpu_pm.h>
>> #include <linux/delay.h>
>> #include <linux/interrupt.h>
>> +#include <linux/io.h>
>> #include <linux/of.h>
>> #include <linux/of_address.h>
>> #include <linux/of_irq.h>
>>
>
> This seems valid, but out of curiosity: Has this triggered any
> observable build failure? Or is that something you found by inspection?
>
> Thanks,
>
> M.
> --
> Jazz is not dead. It just smells funny...
Hi Marc,
We have seen a build failure on the v3.18-based kernel for ChromeOS.
After cherry-picking commit 74d23cc704d1 ("time: move the
timecounter/cyclecounter code into its own file.") into the kernel,
irq-gic-v3 build is broken:
/mnt/host/source/src/third_party/kernel/v3.18/drivers/irqchip/irq-gic-v3.c:
In function 'gic_do_wait_for_rwp':
/mnt/host/source/src/third_party/kernel/v3.18/drivers/irqchip/irq-gic-v3.c:84:2:
error: implicit declaration of function 'readl_relaxed'
[-Werror=implicit-function-declaration]
while (readl_relaxed(base + GICD_CTLR) & GICD_CTLR_RWP) {
^
...
The timecounter patch removes #include <linux/clocksource.h> in
include/clocksource/arm_arch_timer.h, and breaks all include paths to
the arm64 io.h header, e.g.
arch/arm64/include/asm/io.h
include/linux/clocksource.h
include/clocksource/arm_arch_timer.h
arch/arm64/include/asm/arch_timer.h
arch/arm64/include/asm/timex.h
include/linux/timex.h
include/linux/sched.h
arch/arm64/include/asm/compat.h
arch/arm64/include/asm/stat.h
include/linux/stat.h
include/linux/sysfs.h
include/linux/kobject.h
include/linux/device.h
include/linux/node.h
include/linux/cpu.h
drivers/irqchip/irq-gic-v3.c
Mainline build is fine because commit 332fd7c4fef5("genirq: Generic
chip: Change irq_reg_{readl,writel} arguments") landed before the
timecounter patch, and it creates a new include path to the io.h
header:
arch/arm64/include/asm/io.h
include/linux/io.h
include/linux/irq.h
include/linux/of_irq.h
drivers/irqchip/irq-gic-v3.c
Thanks,
Ben
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] irqchip: gic-v3: Explicitly include linux/io.h
2015-08-07 23:38 ` Ben Zhang
@ 2015-08-19 21:13 ` Thomas Gleixner
2015-08-19 22:44 ` Ben Zhang
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2015-08-19 21:13 UTC (permalink / raw)
To: Ben Zhang; +Cc: Marc Zyngier, Jason Cooper, linux-kernel, Nicolas Boichat
On Fri, 7 Aug 2015, Ben Zhang wrote:
> Mainline build is fine because commit 332fd7c4fef5("genirq: Generic
> chip: Change irq_reg_{readl,writel} arguments") landed before the
> timecounter patch, and it creates a new include path to the io.h
> header:
> arch/arm64/include/asm/io.h
> include/linux/io.h
> include/linux/irq.h
> include/linux/of_irq.h
> drivers/irqchip/irq-gic-v3.c
And why do we need to include it once more then?
Thanks,
tglx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] irqchip: gic-v3: Explicitly include linux/io.h
2015-08-19 21:13 ` Thomas Gleixner
@ 2015-08-19 22:44 ` Ben Zhang
0 siblings, 0 replies; 5+ messages in thread
From: Ben Zhang @ 2015-08-19 22:44 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: Marc Zyngier, Jason Cooper, linux-kernel, Nicolas Boichat
This patch is not really needed. The build failure on our v3.18-based
kernel is fixed by cherry-picking commit 332fd7c4fef5 ("genirq:
Generic chip: Change irq_reg_{readl,writel} arguments") which is
actually a functional no-op. This patch could help prevent future
build failure in case linux/io.h is later removed from linux/irq.h.
Since the irq-gic-v3 driver uses the read/write io functions, it might
be better to include linux/io.h explicitly.
Thanks,
Ben
On Wed, Aug 19, 2015 at 2:13 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Fri, 7 Aug 2015, Ben Zhang wrote:
>> Mainline build is fine because commit 332fd7c4fef5("genirq: Generic
>> chip: Change irq_reg_{readl,writel} arguments") landed before the
>> timecounter patch, and it creates a new include path to the io.h
>> header:
>> arch/arm64/include/asm/io.h
>> include/linux/io.h
>> include/linux/irq.h
>> include/linux/of_irq.h
>> drivers/irqchip/irq-gic-v3.c
>
> And why do we need to include it once more then?
>
> Thanks,
>
> tglx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-08-19 22:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07 5:31 [PATCH] irqchip: gic-v3: Explicitly include linux/io.h Ben Zhang
2015-08-07 8:40 ` Marc Zyngier
2015-08-07 23:38 ` Ben Zhang
2015-08-19 21:13 ` Thomas Gleixner
2015-08-19 22:44 ` Ben Zhang
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).