public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Bjorn Helgaas <helgaas@kernel.org>, Joseph Jang <jjang@nvidia.com>
Cc: shuah@kernel.org, mochs@nvidia.com, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH] selftest: drivers: Add support to check duplicate hwirq
Date: Sun, 01 Dec 2024 12:38:53 +0100	[thread overview]
Message-ID: <87cyibws36.ffs@tglx> (raw)
In-Reply-To: <20241122175449.GA2433467@bhelgaas>

On Fri, Nov 22 2024 at 11:54, Bjorn Helgaas wrote:
> On Mon, Nov 11, 2024 at 03:21:36PM +0800, Joseph Jang wrote:
>> We could not detect the duplicated hwirq number (0xc8000000) in this
>> case.
>
> Again, this is really out of my area, but based on
> Documentation/core-api/irq/irq-domain.rst, I assumed the point of
> hwirq was that hwirq numbers were local to an interrupt controller,
> i.e., to an irq_domain.

Correct.

But due to the truncation problem in pci_msi_domain_calc_hwirq() we
ended up with the same hwirq number for two different interrupts in the
same domain.

That said, I'm not really convinced about the value of the proposed
script as it just checks at a random point in time, which does not give
any meaningful test coverage.

I'd rather want to see a check in the irq domain code itself. At the
point where an interrupt is inserted, the irqdomain can validate that
there is no existing mapping for the hardware interrupt number. This
check can be unconditionally enabled as interrupt setup is not really a
hotpath operation and the lookup in the revmap or the tree is cheap.

Thanks,

        tglx

      reply	other threads:[~2024-12-01 11:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04  1:44 [PATCH] selftest: drivers: Add support to check duplicate hwirq Joseph Jang
2024-10-18  4:29 ` Joseph Jang
2024-10-18 15:23   ` Shuah Khan
2024-10-18 19:34 ` Bjorn Helgaas
2024-11-11  7:21   ` Joseph Jang
2024-11-22 17:54     ` Bjorn Helgaas
2024-12-01 11:38       ` 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=87cyibws36.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=helgaas@kernel.org \
    --cc=jjang@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mochs@nvidia.com \
    --cc=shuah@kernel.org \
    /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