2022-11-16 19:07:37

by Nicolas Frayer

[permalink] [raw]
Subject: [PATCH 0/2] irqchip: Kconfig: Add module support for TI inta/intr

Added module support for TI interrupt aggregator and interrupt router

Nicolas Frayer (2):
irqchip: Kconfig: module build support for the TI interrupt router
driver
irqchip: Kconfig: Added module build support for the TI interrupt
aggregator

arch/arm64/Kconfig.platforms | 2 --
drivers/irqchip/Kconfig | 12 +++++++-----
2 files changed, 7 insertions(+), 7 deletions(-)

--
2.25.1



2022-11-16 19:32:03

by Nicolas Frayer

[permalink] [raw]
Subject: [PATCH 2/2] irqchip: Kconfig: Added module build support for the TI interrupt aggregator

Added module build support in Kconfig for the TI SCI interrupt aggregator
driver

Signed-off-by: Nicolas Frayer <[email protected]>
---
arch/arm64/Kconfig.platforms | 1 -
drivers/irqchip/Kconfig | 7 ++++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 2ee8de238b39..d9f0a93f3826 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -128,7 +128,6 @@ config ARCH_K3
select SOC_TI
select TI_MESSAGE_MANAGER
select TI_SCI_PROTOCOL
- select TI_SCI_INTA_IRQCHIP
select TI_K3_SOCINFO
help
This enables support for Texas Instruments' K3 multicore SoC
architecture.
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index ea79d2499372..7d5dd130d16f 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -517,10 +517,11 @@ config TI_SCI_INTR_IRQCHIP
TI System Controller, say Y here. Otherwise, say N.

config TI_SCI_INTA_IRQCHIP
- bool
- depends on TI_SCI_PROTOCOL
- select IRQ_DOMAIN_HIERARCHY
+ tristate "TI SCI INTA Interrupt Controller"
+ select TI_SCI_PROTOCOL
select TI_SCI_INTA_MSI_DOMAIN
+ select IRQ_DOMAIN_HIERARCHY
+ default ARCH_K3
help
This enables the irqchip driver support for K3 Interrupt aggregator
over TI System Control Interface available on some new TI's SoCs.
--
2.25.1


2022-11-16 20:04:54

by Nicolas Frayer

[permalink] [raw]
Subject: [PATCH 1/2] irqchip: Kconfig: module build support for the TI interrupt router driver

Added module build support in Kconfig for the TI SCI interrupt router
driver

Signed-off-by: Nicolas Frayer <[email protected]>
---
arch/arm64/Kconfig.platforms | 1 -
drivers/irqchip/Kconfig | 5 +++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index 912529ac58b3..2ee8de238b39 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -128,7 +128,6 @@ config ARCH_K3
select SOC_TI
select TI_MESSAGE_MANAGER
select TI_SCI_PROTOCOL
- select TI_SCI_INTR_IRQCHIP
select TI_SCI_INTA_IRQCHIP
select TI_K3_SOCINFO
help
This enables support for Texas Instruments' K3 multicore SoC
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 7ef9f5e696d3..ea79d2499372 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -506,9 +506,10 @@ config LS1X_IRQ
Support for the Loongson-1 platform Interrupt Controller.

config TI_SCI_INTR_IRQCHIP
- bool
- depends on TI_SCI_PROTOCOL
+ tristate "TI SCI INTR Interrupt Controller"
+ select TI_SCI_PROTOCOL
select IRQ_DOMAIN_HIERARCHY
+ default ARCH_K3
help
This enables the irqchip driver support for K3 Interrupt router
over TI System Control Interface available on some new TI's SoCs.
--
2.25.1


2022-11-16 22:04:37

by Marc Zyngier

[permalink] [raw]
Subject: Re: [PATCH 0/2] irqchip: Kconfig: Add module support for TI inta/intr

On Wed, 16 Nov 2022 18:54:58 +0000,
Nicolas Frayer <[email protected]> wrote:
>
> Added module support for TI interrupt aggregator and interrupt router
>
> Nicolas Frayer (2):
> irqchip: Kconfig: module build support for the TI interrupt router
> driver
> irqchip: Kconfig: Added module build support for the TI interrupt
> aggregator
>
> arch/arm64/Kconfig.platforms | 2 --
> drivers/irqchip/Kconfig | 12 +++++++-----
> 2 files changed, 7 insertions(+), 7 deletions(-)

How did you test that it doesn't introduce any regression due to
implicit ordering requirements that are now voided?

Please Cc the TI folks so that they can at least check this.

M.

--
Without deviation from the norm, progress is not possible.

2022-11-17 17:05:05

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 2/2] irqchip: Kconfig: Added module build support for the TI interrupt aggregator

Hi Nicolas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on tip/irq/core linus/master v6.1-rc5 next-20221117]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Nicolas-Frayer/irqchip-Kconfig-Add-module-support-for-TI-inta-intr/20221117-025707
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
patch link: https://lore.kernel.org/r/20221116185500.40431-3-nfrayer%40baylibre.com
patch subject: [PATCH 2/2] irqchip: Kconfig: Added module build support for the TI interrupt aggregator
config: powerpc-allmodconfig
compiler: powerpc-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/96dd80be24e2305d0fabee7a69c4770750a0d8f0
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Nicolas-Frayer/irqchip-Kconfig-Add-module-support-for-TI-inta-intr/20221117-025707
git checkout 96dd80be24e2305d0fabee7a69c4770750a0d8f0
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/irqchip/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

In file included from include/linux/io.h:13,
from drivers/irqchip/irq-ti-sci-inta.c:10:
drivers/irqchip/irq-ti-sci-inta.c: In function 'ti_sci_inta_irq_handler':
>> arch/powerpc/include/asm/io.h:692:33: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration]
692 | #define readq_relaxed(addr) readq(addr)
| ^~~~~
drivers/irqchip/irq-ti-sci-inta.c:159:15: note: in expansion of macro 'readq_relaxed'
159 | val = readq_relaxed(inta->base + vint_desc->vint_id * 0x1000 +
| ^~~~~~~~~~~~~
drivers/irqchip/irq-ti-sci-inta.c: In function 'ti_sci_inta_manage_event':
>> arch/powerpc/include/asm/io.h:696:33: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]
696 | #define writeq_relaxed(v, addr) writeq(v, addr)
| ^~~~~~
drivers/irqchip/irq-ti-sci-inta.c:466:9: note: in expansion of macro 'writeq_relaxed'
466 | writeq_relaxed(BIT(event_desc->vint_bit),
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for TI_SCI_PROTOCOL
Depends on [n]: TI_MESSAGE_MANAGER [=n]
Selected by [m]:
- TI_SCI_INTR_IRQCHIP [=m]
- TI_SCI_INTA_IRQCHIP [=m]


vim +692 arch/powerpc/include/asm/io.h

4cb3cee03d558fd include/asm-powerpc/io.h Benjamin Herrenschmidt 2006-11-11 685
4cb3cee03d558fd include/asm-powerpc/io.h Benjamin Herrenschmidt 2006-11-11 686 /*
4cb3cee03d558fd include/asm-powerpc/io.h Benjamin Herrenschmidt 2006-11-11 687 * We don't do relaxed operations yet, at least not with this semantic
4cb3cee03d558fd include/asm-powerpc/io.h Benjamin Herrenschmidt 2006-11-11 688 */
^1da177e4c3f415 include/asm-ppc64/io.h Linus Torvalds 2005-04-16 689 #define readb_relaxed(addr) readb(addr)
^1da177e4c3f415 include/asm-ppc64/io.h Linus Torvalds 2005-04-16 690 #define readw_relaxed(addr) readw(addr)
^1da177e4c3f415 include/asm-ppc64/io.h Linus Torvalds 2005-04-16 691 #define readl_relaxed(addr) readl(addr)
^1da177e4c3f415 include/asm-ppc64/io.h Linus Torvalds 2005-04-16 @692 #define readq_relaxed(addr) readq(addr)
5da590574cbc39e arch/powerpc/include/asm/io.h Will Deacon 2013-09-04 693 #define writeb_relaxed(v, addr) writeb(v, addr)
5da590574cbc39e arch/powerpc/include/asm/io.h Will Deacon 2013-09-04 694 #define writew_relaxed(v, addr) writew(v, addr)
5da590574cbc39e arch/powerpc/include/asm/io.h Will Deacon 2013-09-04 695 #define writel_relaxed(v, addr) writel(v, addr)
5da590574cbc39e arch/powerpc/include/asm/io.h Will Deacon 2013-09-04 @696 #define writeq_relaxed(v, addr) writeq(v, addr)
^1da177e4c3f415 include/asm-ppc64/io.h Linus Torvalds 2005-04-16 697

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (4.85 kB)
config (329.99 kB)
Download all attachments

2022-11-17 21:14:47

by Marc Zyngier

[permalink] [raw]
Subject: Re: [PATCH 0/2] irqchip: Kconfig: Add module support for TI inta/intr

On Thu, 17 Nov 2022 20:49:58 +0000,
Nicolas Frayer <[email protected]> wrote:
>
> Le mer. 16 nov. 2022 à 22:44, Marc Zyngier <[email protected]> a écrit :
> >
> > On Wed, 16 Nov 2022 18:54:58 +0000,
> > Nicolas Frayer <[email protected]> wrote:
> > >
> > > Added module support for TI interrupt aggregator and interrupt router
> > >
> > > Nicolas Frayer (2):
> > > irqchip: Kconfig: module build support for the TI interrupt router
> > > driver
> > > irqchip: Kconfig: Added module build support for the TI interrupt
> > > aggregator
> > >
> > > arch/arm64/Kconfig.platforms | 2 --
> > > drivers/irqchip/Kconfig | 12 +++++++-----
> > > 2 files changed, 7 insertions(+), 7 deletions(-)
> >
> > How did you test that it doesn't introduce any regression due to
> > implicit ordering requirements that are now voided?
> Hi Marc,
> I tested on a TI AM62x SK board.
> By default the drivers are set to ARCH_K3 (built-in).

That wasn't exactly my question: even if they are by sefault set as
built-in, you still run the risk of exposing some breakage for
endpoint drivers that expect the irqchip to be present before they get
initialised. Every time an interrupt controller gets modularised, we
end-up with a ton of failures.

A good way to test this is to run a distro kernel with all the drivers
build as modules.

> >
> > Please Cc the TI folks so that they can at least check this.
> I'll resend the series with more description and CC Ti engineers.

Please also see the kernel robot result: this stuff now gets compiled
on unsuspecting architectures, and fails.

M.

--
Without deviation from the norm, progress is not possible.

2022-11-17 21:32:53

by Nicolas Frayer

[permalink] [raw]
Subject: Re: [PATCH 0/2] irqchip: Kconfig: Add module support for TI inta/intr

Le mer. 16 nov. 2022 à 22:44, Marc Zyngier <[email protected]> a écrit :
>
> On Wed, 16 Nov 2022 18:54:58 +0000,
> Nicolas Frayer <[email protected]> wrote:
> >
> > Added module support for TI interrupt aggregator and interrupt router
> >
> > Nicolas Frayer (2):
> > irqchip: Kconfig: module build support for the TI interrupt router
> > driver
> > irqchip: Kconfig: Added module build support for the TI interrupt
> > aggregator
> >
> > arch/arm64/Kconfig.platforms | 2 --
> > drivers/irqchip/Kconfig | 12 +++++++-----
> > 2 files changed, 7 insertions(+), 7 deletions(-)
>
> How did you test that it doesn't introduce any regression due to
> implicit ordering requirements that are now voided?
Hi Marc,
I tested on a TI AM62x SK board.
By default the drivers are set to ARCH_K3 (built-in).
>
> Please Cc the TI folks so that they can at least check this.
I'll resend the series with more description and CC Ti engineers.
Thanks
>
> M.
>
> --
> Without deviation from the norm, progress is not possible.

2022-11-26 22:50:56

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 1/2] irqchip: Kconfig: module build support for the TI interrupt router driver

Hi Nicolas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on arm64/for-next/core]
[also build test ERROR on tip/irq/core linus/master v6.1-rc6 next-20221125]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Nicolas-Frayer/irqchip-Kconfig-Add-module-support-for-TI-inta-intr/20221117-025707
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
patch link: https://lore.kernel.org/r/20221116185500.40431-2-nfrayer%40baylibre.com
patch subject: [PATCH 1/2] irqchip: Kconfig: module build support for the TI interrupt router driver
config: loongarch-randconfig-r012-20221127
compiler: loongarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/3755b38d1b3c55bba2be7106a9e6ead082a7d92f
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Nicolas-Frayer/irqchip-Kconfig-Add-module-support-for-TI-inta-intr/20221117-025707
git checkout 3755b38d1b3c55bba2be7106a9e6ead082a7d92f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=loongarch SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

loongarch64-linux-ld: drivers/firmware/ti_sci.o: in function `.L8':
>> drivers/firmware/ti_sci.c:3510: undefined reference to `mbox_free_channel'
>> loongarch64-linux-ld: drivers/firmware/ti_sci.c:3511: undefined reference to `mbox_free_channel'

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for TI_SCI_PROTOCOL
Depends on [n]: TI_MESSAGE_MANAGER [=n] || TI_MESSAGE_MANAGER [=n]
Selected by [y]:
- TI_SCI_INTR_IRQCHIP [=y]


vim +3510 drivers/firmware/ti_sci.c

aa276781a64a5f Nishanth Menon 2016-10-18 3485
aa276781a64a5f Nishanth Menon 2016-10-18 3486 static int ti_sci_remove(struct platform_device *pdev)
aa276781a64a5f Nishanth Menon 2016-10-18 3487 {
aa276781a64a5f Nishanth Menon 2016-10-18 3488 struct ti_sci_info *info;
aa276781a64a5f Nishanth Menon 2016-10-18 3489 struct device *dev = &pdev->dev;
aa276781a64a5f Nishanth Menon 2016-10-18 3490 int ret = 0;
aa276781a64a5f Nishanth Menon 2016-10-18 3491
aa276781a64a5f Nishanth Menon 2016-10-18 3492 of_platform_depopulate(dev);
aa276781a64a5f Nishanth Menon 2016-10-18 3493
aa276781a64a5f Nishanth Menon 2016-10-18 3494 info = platform_get_drvdata(pdev);
aa276781a64a5f Nishanth Menon 2016-10-18 3495
912cffb4ed8612 Nishanth Menon 2016-10-18 3496 if (info->nb.notifier_call)
912cffb4ed8612 Nishanth Menon 2016-10-18 3497 unregister_restart_handler(&info->nb);
912cffb4ed8612 Nishanth Menon 2016-10-18 3498
aa276781a64a5f Nishanth Menon 2016-10-18 3499 mutex_lock(&ti_sci_list_mutex);
aa276781a64a5f Nishanth Menon 2016-10-18 3500 if (info->users)
aa276781a64a5f Nishanth Menon 2016-10-18 3501 ret = -EBUSY;
aa276781a64a5f Nishanth Menon 2016-10-18 3502 else
aa276781a64a5f Nishanth Menon 2016-10-18 3503 list_del(&info->node);
aa276781a64a5f Nishanth Menon 2016-10-18 3504 mutex_unlock(&ti_sci_list_mutex);
aa276781a64a5f Nishanth Menon 2016-10-18 3505
aa276781a64a5f Nishanth Menon 2016-10-18 3506 if (!ret) {
aa276781a64a5f Nishanth Menon 2016-10-18 3507 ti_sci_debugfs_destroy(pdev, info);
aa276781a64a5f Nishanth Menon 2016-10-18 3508
aa276781a64a5f Nishanth Menon 2016-10-18 3509 /* Safe to free channels since no more users */
aa276781a64a5f Nishanth Menon 2016-10-18 @3510 mbox_free_channel(info->chan_tx);
aa276781a64a5f Nishanth Menon 2016-10-18 @3511 mbox_free_channel(info->chan_rx);
aa276781a64a5f Nishanth Menon 2016-10-18 3512 }
aa276781a64a5f Nishanth Menon 2016-10-18 3513
aa276781a64a5f Nishanth Menon 2016-10-18 3514 return ret;
aa276781a64a5f Nishanth Menon 2016-10-18 3515 }
aa276781a64a5f Nishanth Menon 2016-10-18 3516

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (4.47 kB)
config (141.73 kB)
Download all attachments