Re: [PATCH RFC 2/6] irqchip: add the SiRF AT550 interrupt controller

From: Thomas Gleixner

Date: Tue Dec 01 2026 - 10:35:04 EST


On Tue, Nov 17 2026 at 22:06, yy-Local-LLM via wrote:
> From: yy-Local-LLM <yogo.0917.sabu@xxxxxxxxx>

That's not a valid name, unless you are an LLM... See
Documentation/process/

> Register the root controller through IRQCHIP_DECLARE and a linear
> domain. Validate the chip ID before writes, mask both banks during setup
> and route sources to IRQ. Keep dispatch bounded and leave the DSP mask
> registers alone. The register operations derive from the 6.12.60
> YPL514si bring-up. The device owner has now booted the 7.4-rc3 candidate
> through JWM on this upstream initialization path.

This is bogus change log as it describes what the patch is doing and
nobody cares about the 6.12.60 bring-up and who booted a random kernel
with this patch applied.

> SIS 190 ETHERNET DRIVER
> M: Francois Romieu <romieu@xxxxxxxxxxxxx>
> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
> index 136bab41f..abf704110 100644
> --- a/drivers/irqchip/Kconfig
> +++ b/drivers/irqchip/Kconfig
> @@ -852,4 +852,9 @@ config IRQCHIP_XILINX_SMMU_CSR
> ZynqMP-class platforms where a vendor CSR block mediates SMMU
> interrupts.
>
> +config AT550_IRQ
> + bool
> + depends on ARM
> + select IRQ_DOMAIN

The entries in this file are alphabetically ordered.

> endmenu
> diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile
> index 16a5fd126..0aa36c7b8 100644
> --- a/drivers/irqchip/Makefile
> +++ b/drivers/irqchip/Makefile
> @@ -136,3 +136,5 @@ obj-$(CONFIG_MCHP_EIC) += irq-mchp-eic.o
> obj-$(CONFIG_SOPHGO_SG2042_MSI) += irq-sg2042-msi.o
> obj-$(CONFIG_SUNPLUS_SP7021_INTC) += irq-sp7021-intc.o
> obj-$(CONFIG_IRQCHIP_XILINX_SMMU_CSR) += irq-xilinx-smmu-csr.o
> +
> +obj-$(CONFIG_AT550_IRQ) += irq-at550.o

Ditto.

> +static void __iomem *at550_intc;
> +static struct irq_domain *at550_domain;
> +
> +static void at550_irq_mask(struct irq_data *data)
> +{
> + void __iomem *reg = at550_intc + AT550_MASK + (data->hwirq / 32) * 4;
> +
> + writel(readl(reg) & ~BIT(data->hwirq % 32), reg);
> +}
> +
> +static void at550_irq_unmask(struct irq_data *data)
> +{
> + void __iomem *reg = at550_intc + AT550_MASK + (data->hwirq / 32) * 4;
> +
> + writel(readl(reg) | BIT(data->hwirq % 32), reg);
> +}
> +
> +static struct irq_chip at550_chip = {
> + .name = "at550-intc",
> + .irq_mask = at550_irq_mask,
> + .irq_unmask = at550_irq_unmask,

Tabular layout as documented in:

https://docs.kernel.org/process/maintainer-tip.html

> +static void __exception_irq_entry at550_handle_irq(struct pt_regs *regs)
> +{
> + unsigned int count, hwirq;
> +
> + for (count = 0; count < AT550_IRQ_COUNT; count++) {

for (unsigned int count = 0; ...

> + hwirq = readl(at550_intc + AT550_IRQ_ID) & 0xff;

unsigned int hwirq =

So that variables are declared in the scope in which they are used.

> + if (hwirq == 0xff)
> + return;
> + if (hwirq >= AT550_IRQ_COUNT) {
> + pr_err_ratelimited("at550-intc: invalid source %u\n", hwirq);
> + return;
> + }
> + if (generic_handle_domain_irq(at550_domain, hwirq))
> + return;
> + }
> +}
> +
> +static int __init at550_irq_init(struct device_node *node,
> + struct device_node *parent)
> +{
> + int ret;
> +
> + if (parent || at550_intc)
> + return -EINVAL;
> + at550_intc = of_iomap(node, 0);
> + if (!at550_intc)
> + return -ENOMEM;
> + if ((readl(at550_intc + AT550_CHIP_ID) & 0xffff) != 0x1230) {

No magic numbers. Make that 0x1230 a proper define.

> + ret = -ENODEV;
> + goto unmap;
> + }
> + /* A set mask bit enables a source; clear level bits route it to IRQ. */

Clearly your newline key is broken. Please structure the code so it
becomes readable.

Thanks,

tglx