Re: [PATCH] irqchip: gic-v3: Explicitly include linux/io.h

2015-08-19 Thread Ben Zhang
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  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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] irqchip: gic-v3: Explicitly include linux/io.h

2015-08-19 Thread Thomas Gleixner
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] irqchip: gic-v3: Explicitly include linux/io.h

2015-08-19 Thread Ben Zhang
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 t...@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
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] irqchip: gic-v3: Explicitly include linux/io.h

2015-08-19 Thread Thomas Gleixner
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
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] irqchip: gic-v3: Explicitly include linux/io.h

2015-08-07 Thread Ben Zhang
On Fri, Aug 7, 2015 at 1:40 AM, Marc Zyngier  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 
>> ---
>>  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 
>>  #include 
>>  #include 
>> +#include 
>>  #include 
>>  #include 
>>  #include 
>>
>
> 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  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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] irqchip: gic-v3: Explicitly include linux/io.h

2015-08-07 Thread Marc Zyngier
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 
> ---
>  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 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> 

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...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] irqchip: gic-v3: Explicitly include linux/io.h

2015-08-07 Thread Ben Zhang
On Fri, Aug 7, 2015 at 1:40 AM, Marc Zyngier marc.zyng...@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 be...@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
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] irqchip: gic-v3: Explicitly include linux/io.h

2015-08-07 Thread Marc Zyngier
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 be...@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...
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] irqchip: gic-v3: Explicitly include linux/io.h

2015-08-06 Thread 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 
---
 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 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
-- 
2.5.0.rc2.392.g76e840b

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] irqchip: gic-v3: Explicitly include linux/io.h

2015-08-06 Thread 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 be...@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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/