linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h
@ 2019-05-30 23:05 Florian Fainelli
  2019-05-30 23:05 ` [PATCH 1/2] " Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Florian Fainelli @ 2019-05-30 23:05 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: marc.zyngier, Florian Fainelli, Catalin Marinas, Will Deacon,
	Shaokun Zhang, open list

Hi ARM64 maintainers,

This patch series aims at enabling irq-bcm7038-l1.c on
ARM64/ARCH_BRCMSTB, this driver makes use of cpu_logical_map[] and in
order to avoid adding a CONFIG_ARM64 conditional inclusion of
smp_plat.h, instead smp.h includes smp_plat.h, which is in turn included
by linux/smp.h.

If you like the approach, I would suggest to carry that through the
Broadcom ARM64 SoC pull request for 5.3.

Thank you!

Florian Fainelli (2):
  arm64: smp: Include smp_plat.h from smp.h
  arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB

 arch/arm64/Kconfig.platforms      | 1 +
 arch/arm64/include/asm/smp.h      | 1 +
 arch/arm64/include/asm/smp_plat.h | 1 +
 3 files changed, 3 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] arm64: smp: Include smp_plat.h from smp.h
  2019-05-30 23:05 [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h Florian Fainelli
@ 2019-05-30 23:05 ` Florian Fainelli
  2019-05-30 23:05 ` [PATCH 2/2] arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB Florian Fainelli
  2019-05-30 23:14 ` [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h Florian Fainelli
  2 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2019-05-30 23:05 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: marc.zyngier, Florian Fainelli, Catalin Marinas, Will Deacon,
	Shaokun Zhang, open list

Most architectures provide the cpu_logical_map[] definition as part of
asm/smp.h, which is included by linux/smp.h. For irqchip drivers that
work across a variety of platforms (MIPS, ARM, ARM64, etc.), and making
use of cpu_logical_map[] this avoids making any architecture specific
include in those drivers.

smp_plat.h uses -EINVAL, so make sure that header file include
linux/errmo.h.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm64/include/asm/smp.h      | 1 +
 arch/arm64/include/asm/smp_plat.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm64/include/asm/smp.h b/arch/arm64/include/asm/smp.h
index 18553f399e08..259135d07a75 100644
--- a/arch/arm64/include/asm/smp.h
+++ b/arch/arm64/include/asm/smp.h
@@ -37,6 +37,7 @@
 #ifndef __ASSEMBLY__
 
 #include <asm/percpu.h>
+#include <asm/smp_plat.h>
 
 #include <linux/threads.h>
 #include <linux/cpumask.h>
diff --git a/arch/arm64/include/asm/smp_plat.h b/arch/arm64/include/asm/smp_plat.h
index af58dcdefb21..eab572cff56c 100644
--- a/arch/arm64/include/asm/smp_plat.h
+++ b/arch/arm64/include/asm/smp_plat.h
@@ -20,6 +20,7 @@
 #define __ASM_SMP_PLAT_H
 
 #include <linux/cpumask.h>
+#include <linux/errno.h>
 
 #include <asm/types.h>
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB
  2019-05-30 23:05 [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h Florian Fainelli
  2019-05-30 23:05 ` [PATCH 1/2] " Florian Fainelli
@ 2019-05-30 23:05 ` Florian Fainelli
  2019-06-11 22:03   ` Florian Fainelli
  2019-05-30 23:14 ` [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h Florian Fainelli
  2 siblings, 1 reply; 9+ messages in thread
From: Florian Fainelli @ 2019-05-30 23:05 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: marc.zyngier, Florian Fainelli, Catalin Marinas, Will Deacon,
	Shaokun Zhang, open list

ARCH_BRCMSTB makes use of the irq-bcm7038-l1.c irqchip driver, enable
it.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 arch/arm64/Kconfig.platforms | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index c7ad684926c3..b9128f245d2a 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -66,6 +66,7 @@ config ARCH_BITMAIN
 
 config ARCH_BRCMSTB
 	bool "Broadcom Set-Top-Box SoCs"
+	select BCM7038_L1_IRQ
 	select BRCMSTB_L2_IRQ
 	select GENERIC_IRQ_CHIP
 	help
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h
  2019-05-30 23:05 [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h Florian Fainelli
  2019-05-30 23:05 ` [PATCH 1/2] " Florian Fainelli
  2019-05-30 23:05 ` [PATCH 2/2] arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB Florian Fainelli
@ 2019-05-30 23:14 ` Florian Fainelli
  2019-05-30 23:17   ` Russell King - ARM Linux admin
  2 siblings, 1 reply; 9+ messages in thread
From: Florian Fainelli @ 2019-05-30 23:14 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: marc.zyngier, Catalin Marinas, Will Deacon, Shaokun Zhang, open list

On 5/30/19 4:05 PM, Florian Fainelli wrote:
> Hi ARM64 maintainers,
> 
> This patch series aims at enabling irq-bcm7038-l1.c on
> ARM64/ARCH_BRCMSTB, this driver makes use of cpu_logical_map[] and in
> order to avoid adding a CONFIG_ARM64 conditional inclusion of
> smp_plat.h, instead smp.h includes smp_plat.h, which is in turn included
> by linux/smp.h.
> 
> If you like the approach, I would suggest to carry that through the
> Broadcom ARM64 SoC pull request for 5.3.

ARM (32-bit) needs the same thing kind of thing so a conditional include
may be appropriate after all...

> 
> Thank you!
> 
> Florian Fainelli (2):
>   arm64: smp: Include smp_plat.h from smp.h
>   arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB
> 
>  arch/arm64/Kconfig.platforms      | 1 +
>  arch/arm64/include/asm/smp.h      | 1 +
>  arch/arm64/include/asm/smp_plat.h | 1 +
>  3 files changed, 3 insertions(+)
> 


-- 
Florian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h
  2019-05-30 23:14 ` [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h Florian Fainelli
@ 2019-05-30 23:17   ` Russell King - ARM Linux admin
  2019-05-30 23:20     ` Florian Fainelli
  0 siblings, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux admin @ 2019-05-30 23:17 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-arm-kernel, marc.zyngier, Catalin Marinas, Will Deacon,
	open list, Shaokun Zhang

On Thu, May 30, 2019 at 04:14:28PM -0700, Florian Fainelli wrote:
> On 5/30/19 4:05 PM, Florian Fainelli wrote:
> > Hi ARM64 maintainers,
> > 
> > This patch series aims at enabling irq-bcm7038-l1.c on
> > ARM64/ARCH_BRCMSTB, this driver makes use of cpu_logical_map[] and in
> > order to avoid adding a CONFIG_ARM64 conditional inclusion of
> > smp_plat.h, instead smp.h includes smp_plat.h, which is in turn included
> > by linux/smp.h.
> > 
> > If you like the approach, I would suggest to carry that through the
> > Broadcom ARM64 SoC pull request for 5.3.
> 
> ARM (32-bit) needs the same thing kind of thing so a conditional include
> may be appropriate after all...

The whole idea of the smp_plat.h vs smp.h separation is to avoid
including lots of arch-private stuff in the rest of the kernel
build, thereby exposing arch-private stuff to the world.  I'm be
opposed to that.

> 
> > 
> > Thank you!
> > 
> > Florian Fainelli (2):
> >   arm64: smp: Include smp_plat.h from smp.h
> >   arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB
> > 
> >  arch/arm64/Kconfig.platforms      | 1 +
> >  arch/arm64/include/asm/smp.h      | 1 +
> >  arch/arm64/include/asm/smp_plat.h | 1 +
> >  3 files changed, 3 insertions(+)
> > 
> 
> 
> -- 
> Florian
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h
  2019-05-30 23:17   ` Russell King - ARM Linux admin
@ 2019-05-30 23:20     ` Florian Fainelli
  2019-05-30 23:34       ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 9+ messages in thread
From: Florian Fainelli @ 2019-05-30 23:20 UTC (permalink / raw)
  To: Russell King - ARM Linux admin
  Cc: linux-arm-kernel, marc.zyngier, Catalin Marinas, Will Deacon,
	open list, Shaokun Zhang

On 5/30/19 4:17 PM, Russell King - ARM Linux admin wrote:
> On Thu, May 30, 2019 at 04:14:28PM -0700, Florian Fainelli wrote:
>> On 5/30/19 4:05 PM, Florian Fainelli wrote:
>>> Hi ARM64 maintainers,
>>>
>>> This patch series aims at enabling irq-bcm7038-l1.c on
>>> ARM64/ARCH_BRCMSTB, this driver makes use of cpu_logical_map[] and in
>>> order to avoid adding a CONFIG_ARM64 conditional inclusion of
>>> smp_plat.h, instead smp.h includes smp_plat.h, which is in turn included
>>> by linux/smp.h.
>>>
>>> If you like the approach, I would suggest to carry that through the
>>> Broadcom ARM64 SoC pull request for 5.3.
>>
>> ARM (32-bit) needs the same thing kind of thing so a conditional include
>> may be appropriate after all...
> 
> The whole idea of the smp_plat.h vs smp.h separation is to avoid
> including lots of arch-private stuff in the rest of the kernel
> build, thereby exposing arch-private stuff to the world.  I'm be
> opposed to that.

I was on the fence, sent it just in case, but ended up doing this:

https://lore.kernel.org/patchwork/patch/1082410/

will take patch #2 through the Broadcom ARM64 SoC tree once this patch
above gets accepted.
-- 
Florian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h
  2019-05-30 23:20     ` Florian Fainelli
@ 2019-05-30 23:34       ` Russell King - ARM Linux admin
  2019-06-03 11:09         ` Marc Zyngier
  0 siblings, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux admin @ 2019-05-30 23:34 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: marc.zyngier, Catalin Marinas, Will Deacon, open list,
	Shaokun Zhang, linux-arm-kernel

On Thu, May 30, 2019 at 04:20:37PM -0700, Florian Fainelli wrote:
> On 5/30/19 4:17 PM, Russell King - ARM Linux admin wrote:
> > On Thu, May 30, 2019 at 04:14:28PM -0700, Florian Fainelli wrote:
> >> On 5/30/19 4:05 PM, Florian Fainelli wrote:
> >>> Hi ARM64 maintainers,
> >>>
> >>> This patch series aims at enabling irq-bcm7038-l1.c on
> >>> ARM64/ARCH_BRCMSTB, this driver makes use of cpu_logical_map[] and in
> >>> order to avoid adding a CONFIG_ARM64 conditional inclusion of
> >>> smp_plat.h, instead smp.h includes smp_plat.h, which is in turn included
> >>> by linux/smp.h.
> >>>
> >>> If you like the approach, I would suggest to carry that through the
> >>> Broadcom ARM64 SoC pull request for 5.3.
> >>
> >> ARM (32-bit) needs the same thing kind of thing so a conditional include
> >> may be appropriate after all...
> > 
> > The whole idea of the smp_plat.h vs smp.h separation is to avoid
> > including lots of arch-private stuff in the rest of the kernel
> > build, thereby exposing arch-private stuff to the world.  I'm be
> > opposed to that.
> 
> I was on the fence, sent it just in case, but ended up doing this:
> 
> https://lore.kernel.org/patchwork/patch/1082410/
> 
> will take patch #2 through the Broadcom ARM64 SoC tree once this patch
> above gets accepted.

Well, there's another alternative: we move just what is required from
smp_plat.h to smp.h.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h
  2019-05-30 23:34       ` Russell King - ARM Linux admin
@ 2019-06-03 11:09         ` Marc Zyngier
  0 siblings, 0 replies; 9+ messages in thread
From: Marc Zyngier @ 2019-06-03 11:09 UTC (permalink / raw)
  To: Russell King - ARM Linux admin, Florian Fainelli,
	Catalin Marinas, Will Deacon
  Cc: open list, Shaokun Zhang, linux-arm-kernel

On 31/05/2019 00:34, Russell King - ARM Linux admin wrote:
> On Thu, May 30, 2019 at 04:20:37PM -0700, Florian Fainelli wrote:
>> On 5/30/19 4:17 PM, Russell King - ARM Linux admin wrote:
>>> On Thu, May 30, 2019 at 04:14:28PM -0700, Florian Fainelli wrote:
>>>> On 5/30/19 4:05 PM, Florian Fainelli wrote:
>>>>> Hi ARM64 maintainers,
>>>>>
>>>>> This patch series aims at enabling irq-bcm7038-l1.c on
>>>>> ARM64/ARCH_BRCMSTB, this driver makes use of cpu_logical_map[] and in
>>>>> order to avoid adding a CONFIG_ARM64 conditional inclusion of
>>>>> smp_plat.h, instead smp.h includes smp_plat.h, which is in turn included
>>>>> by linux/smp.h.
>>>>>
>>>>> If you like the approach, I would suggest to carry that through the
>>>>> Broadcom ARM64 SoC pull request for 5.3.
>>>>
>>>> ARM (32-bit) needs the same thing kind of thing so a conditional include
>>>> may be appropriate after all...
>>>
>>> The whole idea of the smp_plat.h vs smp.h separation is to avoid
>>> including lots of arch-private stuff in the rest of the kernel
>>> build, thereby exposing arch-private stuff to the world.  I'm be
>>> opposed to that.
>>
>> I was on the fence, sent it just in case, but ended up doing this:
>>
>> https://lore.kernel.org/patchwork/patch/1082410/
>>
>> will take patch #2 through the Broadcom ARM64 SoC tree once this patch
>> above gets accepted.
> 
> Well, there's another alternative: we move just what is required from
> smp_plat.h to smp.h.

I think that's the best course of action, and would align arm/arm64 with
mips, sparc, sh, xtensa and parisc.

Florian, do you mind writing these two patches?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB
  2019-05-30 23:05 ` [PATCH 2/2] arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB Florian Fainelli
@ 2019-06-11 22:03   ` Florian Fainelli
  0 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2019-06-11 22:03 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: marc.zyngier, Catalin Marinas, Will Deacon, Shaokun Zhang, open list

On 5/30/19 4:05 PM, Florian Fainelli wrote:
> ARCH_BRCMSTB makes use of the irq-bcm7038-l1.c irqchip driver, enable
> it.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied to soc-arm64/next, thanks!
-- 
Florian

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-06-11 22:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-30 23:05 [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h Florian Fainelli
2019-05-30 23:05 ` [PATCH 1/2] " Florian Fainelli
2019-05-30 23:05 ` [PATCH 2/2] arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB Florian Fainelli
2019-06-11 22:03   ` Florian Fainelli
2019-05-30 23:14 ` [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h Florian Fainelli
2019-05-30 23:17   ` Russell King - ARM Linux admin
2019-05-30 23:20     ` Florian Fainelli
2019-05-30 23:34       ` Russell King - ARM Linux admin
2019-06-03 11:09         ` Marc Zyngier

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).