lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o73mfxy3.ffs@tglx>
Date: Mon, 14 Oct 2024 18:31:32 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Stanimir Varbanov <svarbanov@...e.de>, linux-kernel@...r.kernel.org,
 devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-rpi-kernel@...ts.infradead.org, linux-pci@...r.kernel.org, Broadcom
 internal kernel review list <bcm-kernel-feedback-list@...adcom.com>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, Florian Fainelli
 <florian.fainelli@...adcom.com>, Jim Quinlan <jim2101024@...il.com>,
 Nicolas Saenz Julienne <nsaenz@...nel.org>, Bjorn Helgaas
 <bhelgaas@...gle.com>, Lorenzo Pieralisi <lpieralisi@...nel.org>,
 kw@...ux.com, Philipp Zabel <p.zabel@...gutronix.de>, Andrea della Porta
 <andrea.porta@...e.com>, Phil Elwell <phil@...pberrypi.com>, Jonathan Bell
 <jonathan@...pberrypi.com>, Stanimir Varbanov <svarbanov@...e.de>
Subject: Re: [PATCH v3 03/11] irqchip: mip: Add Broadcom bcm2712 MSI-X
 interrupt controller


> Subject: irqchip: mip:

is not a valid prefix

Just make it: irqchip: Add Broadcom  .....

> +static int mip_middle_domain_alloc(struct irq_domain *domain, unsigned int virq,
> +				   unsigned int nr_irqs, void *arg)
> +{
> +	struct mip_priv *mip = domain->host_data;
> +	struct irq_fwspec fwspec = {0};
> +	struct irq_data *irqd;
> +	unsigned int hwirq, irq, i;

	unsigned int hwirq, irq, i;
	struct irq_data *irqd;

> +
> +#define MIP_MSI_FLAGS_REQUIRED	(MSI_FLAG_USE_DEF_DOM_OPS |	\
> +				 MSI_FLAG_USE_DEF_CHIP_OPS |	\
> +				 MSI_FLAG_PCI_MSI_MASK_PARENT |	\
> +				 MSI_FLAG_PCI_MSIX)

Why are you requiring MSI_FLAG_PCI_MSIX here? That's a supported flag,
not a required one.

> +#define MIP_MSI_FLAGS_SUPPORTED	(MSI_GENERIC_FLAGS_MASK |	\
> +				 MSI_FLAG_PCI_MSIX |		\

So this does not support multi MSI, but your allocation function looks
like it supports it (nr_irqs is not range checked).

> +				 IRQ_DOMAIN_FLAG_MSI_PARENT)

This is not a MSI flag and has no place here.

> +static const struct msi_parent_ops mip_msi_parent_ops = {
> +	.supported_flags	= MIP_MSI_FLAGS_SUPPORTED,
> +	.required_flags		= MIP_MSI_FLAGS_REQUIRED,
> +	.bus_select_token       = DOMAIN_BUS_PCI_MSI,
> +	.bus_select_mask	= MATCH_PCI_MSI,
> +	.prefix			= "MIP-MSI-",
> +	.init_dev_msi_info	= msi_lib_init_dev_msi_info,
> +};
> +
> +static int mip_init_domains(struct mip_priv *mip, struct device_node *np)
> +{
> +	struct irq_domain *middle;
> +
> +	middle = irq_domain_add_hierarchy(mip->parent, 0, mip->num_msis, np,
> +					  &mip_middle_domain_ops, mip);
> +	if (!middle)
> +		return -ENOMEM;
> +
> +	irq_domain_update_bus_token(middle, DOMAIN_BUS_PCI_MSI);

That's the wrong token. DOMAIN_BUS_PCI_MSI is what the v2 global PCI/MSI
domain uses. But that's not what this is about. This is the parent
domain for PCI/MSI. DOMAIN_BUS_GENERIC_MSI or DOMAIN_BUS_NEXUS is what
you want here.

> +	middle->dev = mip->dev;
> +	middle->flags |= IRQ_DOMAIN_FLAG_MSI_PARENT;
> +	middle->msi_parent_ops = &mip_msi_parent_ops;
> +

Other than this, this looks good now.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ