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: <8734d9lkww.ffs@tglx>
Date: Mon, 12 May 2025 20:54:23 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Anup Patel <apatel@...tanamicro.com>, Michael Turquette
 <mturquette@...libre.com>, Stephen Boyd <sboyd@...nel.org>, Rob Herring
 <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Jassi Brar <jassisinghbrar@...il.com>, "Rafael J .
 Wysocki" <rafael@...nel.org>, Mika Westerberg
 <mika.westerberg@...ux.intel.com>, Andy Shevchenko
 <andriy.shevchenko@...ux.intel.com>, Linus Walleij
 <linus.walleij@...aro.org>, Bartosz Golaszewski <brgl@...ev.pl>, Uwe
 Kleine-König <ukleinek@...nel.org>
Cc: Palmer Dabbelt <palmer@...belt.com>, Paul Walmsley
 <paul.walmsley@...ive.com>, Len Brown <lenb@...nel.org>, Sunil V L
 <sunilvl@...tanamicro.com>, Rahul Pathak <rpathak@...tanamicro.com>,
 Leyfoon Tan <leyfoon.tan@...rfivetech.com>, Atish Patra
 <atish.patra@...ux.dev>, Andrew Jones <ajones@...tanamicro.com>, Samuel
 Holland <samuel.holland@...ive.com>, Anup Patel <anup@...infault.org>,
 linux-clk@...r.kernel.org, devicetree@...r.kernel.org,
 linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org, Anup Patel
 <apatel@...tanamicro.com>
Subject: Re: [PATCH v3 07/23] mailbox: Add RISC-V SBI message proxy (MPXY)
 based mailbox driver

On Sun, May 11 2025 at 19:09, Anup Patel wrote:
> +
> +static irqreturn_t mpxy_mbox_irq_event(int irq, void *dev_id)
> +{
> +	/* We only have MSI for notification so just wakeup IRQ thread */
> +	return IRQ_WAKE_THREAD;

I was idly reading through this because I looked at the irq chip.

This function is competely pointless.

> +}
> +
> +static irqreturn_t mpxy_mbox_irq_thread(int irq, void *dev_id)
> +{
> +	mpxy_mbox_peek_data(dev_id);
> +	return IRQ_HANDLED;
> +}
> +
> +static int mpxy_mbox_setup_msi(struct mbox_chan *chan,
> +			       struct mpxy_mbox_channel *mchan)
> +{
> +	struct device *dev = mchan->mbox->dev;
> +	int rc;
> +
> +	/* Do nothing if MSI not supported */
> +	if (mchan->msi_irq == U32_MAX)
> +		return 0;
> +
> +	/* Fail if MSI already enabled */
> +	if (mchan->attrs.msi_control)
> +		return -EALREADY;
> +
> +	/* Request channel MSI handler */
> +	rc = request_threaded_irq(mchan->msi_irq,
> +				  mpxy_mbox_irq_event,
> +				  mpxy_mbox_irq_thread,
> +				  0, dev_name(dev), chan);

Just do:

	rc = request_threaded_irq(mchan->msi_irq, NULL, mpxy_mbox_irq_thread,
				  0, dev_name(dev), chan);

and be done with it. The core code will happily wake up your thread.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ