2019-05-30 23:07:01

by Florian Fainelli

[permalink] [raw]
Subject: [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h

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


2019-05-30 23:07:21

by Florian Fainelli

[permalink] [raw]
Subject: [PATCH 1/2] arm64: smp: Include smp_plat.h from smp.h

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 <[email protected]>
---
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

2019-05-30 23:08:48

by Florian Fainelli

[permalink] [raw]
Subject: [PATCH 2/2] arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB

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

Signed-off-by: Florian Fainelli <[email protected]>
---
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

2019-05-30 23:16:07

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h

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

2019-05-30 23:19:16

by Russell King (Oracle)

[permalink] [raw]
Subject: Re: [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h

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
> [email protected]
> 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

2019-05-30 23:22:16

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h

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

2019-05-30 23:36:06

by Russell King (Oracle)

[permalink] [raw]
Subject: Re: [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h

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

2019-06-03 12:14:13

by Marc Zyngier

[permalink] [raw]
Subject: Re: [PATCH 0/2] arm64: smp: Include smp_plat.h from smp.h

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

2019-06-12 04:47:55

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: Enable BCM7038_L1_IRQ for ARCH_BRCMSTB

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 <[email protected]>

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