Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Rosen Penev <rosenp@gmail.com>, linux-kernel@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>,
	Gregory Clement <gregory.clement@bootlin.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
	Bill Wendling <morbo@google.com>,
	Justin Stitt <justinstitt@google.com>,
	"moderated list:ARM/Marvell Kirkwood and Armada 370, 375,
	38x,..." <linux-arm-kernel@lists.infradead.org>,
	"open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b"
	<llvm@lists.linux.dev>
Subject: Re: [PATCH] irqchip/mvebu: Allow EBU irqchips to be compile-tested
Date: Mon, 11 May 2026 15:45:02 +0200	[thread overview]
Message-ID: <87qzni83hd.ffs@tglx> (raw)
In-Reply-To: <20260510195047.10143-1-rosenp@gmail.com>

On Sun, May 10 2026 at 12:50, Rosen Penev wrote:

> The Marvell EBU interrupt controller Kconfig symbols are hidden and
> selected only by platform code. This prevents build coverage for the
> drivers on other architectures even though the code only needs OF and
> MMIO support.
>
> Add COMPILE_TEST prompts and the required dependencies for the GICP,
> ICU, ODMI, PIC and SEI irqchips. While touching PIC for this coverage,
> use GENMASK() and BIT() for its masks so that 32-bit platforms can
> compile this safely without running into issues.

While touching PIC? That's related, but you want to prepare the PIC code
first in order to enable the compile test and not burry that change
within a gazillion lines of Kconfig muck.

>  config MVEBU_GICP
> +	bool "Marvell EBU GICP interrupt controller" if COMPILE_TEST
> +	depends on OF
> +	depends on HAS_IOMEM

  depends on OF && HAS_IOMEM

>  	select IRQ_MSI_LIB
> -	bool
> +	help
> +	  Support the Marvell EBU GICP interrupt controller.
>  
>  config MVEBU_ICU
> -	bool
> +	bool "Marvell EBU ICU interrupt controller" if COMPILE_TEST
> +	depends on OF
> +	depends on HAS_IOMEM
> +	select GENERIC_MSI_IRQ
> +	help
> +	  Support the Marvell EBU ICU interrupt controller.
>  
>  config MVEBU_ODMI
> -	bool
> +	bool "Marvell EBU ODMI interrupt controller" if COMPILE_TEST
> +	depends on OF
> +	depends on HAS_IOMEM
>  	select IRQ_MSI_LIB
>  	select GENERIC_MSI_IRQ

So while at it you can mop up this too. IRQ_MSI_LIB already selects
GENERIC_MSI_IRQ

> +	help
> +	  Support the Marvell EBU ODMI interrupt controller.
>  
>  config MVEBU_PIC
> -	bool
> +	bool "Marvell EBU PIC interrupt controller" if COMPILE_TEST
> +	depends on OF
> +	depends on HAS_IOMEM
> +	help
> +	  Support the Marvell EBU PIC interrupt controller.
>  
>  config MVEBU_SEI
> -        bool
> +	bool "Marvell EBU SEI interrupt controller" if COMPILE_TEST
> +	depends on OF
> +	depends on HAS_IOMEM
> +	help
> +	  Support the Marvell EBU SEI interrupt controller.

What ensures that IRQ_MSI_LIB is selected, when MVEBU_SEI is selected?

>  config LS_EXTIRQ
>  	bool "Freescale Layerscape external IRQ support" if COMPILE_TEST
> diff --git a/drivers/irqchip/irq-mvebu-pic.c b/drivers/irqchip/irq-mvebu-pic.c
> index 10b85128183a..95090d8efc06 100644
> --- a/drivers/irqchip/irq-mvebu-pic.c
> +++ b/drivers/irqchip/irq-mvebu-pic.c
> @@ -24,7 +24,7 @@
>  #define PIC_MASK	       0x4
>  
>  #define PIC_MAX_IRQS		32
> -#define PIC_MAX_IRQ_MASK	((1UL << PIC_MAX_IRQS) - 1)
> +#define PIC_MAX_IRQ_MASK	GENMASK(PIC_MAX_IRQS - 1, 0)

What guarantees that 'linux/bits.h' is included under all circumstances?

I'm really not impressed by this AI assisted slop at all.

Thanks,

        tglx


      reply	other threads:[~2026-05-11 13:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-10 19:50 [PATCH] irqchip/mvebu: Allow EBU irqchips to be compile-tested Rosen Penev
2026-05-11 13:45 ` Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87qzni83hd.ffs@tglx \
    --to=tglx@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=gregory.clement@bootlin.com \
    --cc=justinstitt@google.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=rosenp@gmail.com \
    --cc=sebastian.hesselbarth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox