From: Marc Zyngier <maz@kernel.org>
To: Radu Rendec <radu@rendec.net>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>,
tglx@kernel.org, jason@lakedaemon.net, lpieralisi@kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 6/6] irqchip/gic-v3-its: Remove redundant check in its_vpe_db_proxy_unmap_locked()
Date: Mon, 06 Jul 2026 09:31:40 +0100 [thread overview]
Message-ID: <86mrw4plhv.wl-maz@kernel.org> (raw)
In-Reply-To: <1d141ab4b472533ba728c65201ea7cb74047acba.camel@rendec.net>
On Sat, 04 Jul 2026 17:32:44 +0100,
Radu Rendec <radu@rendec.net> wrote:
>
> On Thu, 2026-07-02 at 11:30 +0800, Kemeng Shi wrote:
> > The high level functions already ensure that gic_rdists->has_rvpeid
> > is false before calling its_vpe_db_proxy_unmap_locked(), so we can
> > remove the redundant check in its_vpe_db_proxy_unmap_locked()
>
> That's true for what the code is *today*. By removing the check, you're
> setting up a trap in case a new call to its_vpe_db_proxy_unmap_locked()
> is added in the future with the assumption that it will do "the right
> thing". The way I see these functions, they are not really "high level"
> and "low level". For example, its_vpe_db_proxy_map_locked() is called
> both by its_vpe_db_proxy_move() (which is another db_proxy function)
> and by its_vpe_send_cmd() directly.
>
> FWIW, the code you're removing is just this:
> 0xffff8000806cf934 <+44>: adrp x0, 0xffff80008177e000 <static_ltree+784>
> 0xffff8000806cf938 <+48>: add x4, x0, #0x348
> 0xffff8000806cf93c <+52>: ldr x0, [x0, #840]
> 0xffff8000806cf940 <+56>: ldrb w0, [x0, #45]
> 0xffff8000806cf944 <+60>: tbnz w0, #0, 0xffff8000806cf9dc <its_vpe_db_proxy_unmap_locked+212>
>
> I would argue that the gain in terms of both code size and speed is
> negligible (and these functions are subject to inlining anyway).
The main issue is that there are implicit dependencies between
multiple GIC features (RVPEID implies direct LPI), and the code is a
maze of indirections to handle a case or another depending on the
underlying HW quality of implementation.
I'd rather not remove this, and instead have a big fat WARN_ONCE(),
because we don't expect RVPEID without direct LPI (such HW should
simply be ignored).
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2026-07-06 8:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 3:30 [PATCH v4 0/6] Some Minor fixes and cleanups to irqchip/gic-v3-its Kemeng Shi
2026-07-02 3:30 ` [PATCH v4 1/6] irqchip/gic-v3-its: Fix memleak in its_probe_one() Kemeng Shi
2026-07-04 14:51 ` Radu Rendec
2026-07-07 20:54 ` [tip: irq/drivers] " tip-bot2 for Kemeng Shi
2026-07-02 3:30 ` [PATCH v4 2/6] irqchip/gic-v3-its: Fix its node leak in gic_acpi_parse_madt_its() Kemeng Shi
2026-07-04 15:08 ` Radu Rendec
2026-07-07 20:54 ` [tip: irq/drivers] " tip-bot2 for Kemeng Shi
2026-07-02 3:30 ` [PATCH v4 3/6] irqchip/gic-v3-its: Fix leak in its_vpe_irq_domain_alloc() Kemeng Shi
2026-07-02 22:12 ` Marc Zyngier
2026-07-03 1:44 ` Kemeng Shi
2026-07-06 8:36 ` Marc Zyngier
2026-07-13 12:11 ` Kemeng Shi
2026-07-13 13:05 ` Kemeng Shi
2026-07-13 20:58 ` Marc Zyngier
2026-07-02 3:30 ` [PATCH v4 4/6] irqchip/gic-v3-its: Add ITS address info in more error logs Kemeng Shi
2026-07-02 22:10 ` Marc Zyngier
2026-07-03 1:45 ` Kemeng Shi
2026-07-02 3:30 ` [PATCH v4 5/6] irqchip/gic-v3-its: Fix grammar and replace a bit number with its symbol Kemeng Shi
2026-07-04 15:37 ` Radu Rendec
2026-07-13 12:07 ` Kemeng Shi
2026-07-02 3:30 ` [PATCH v4 6/6] irqchip/gic-v3-its: Remove redundant check in its_vpe_db_proxy_unmap_locked() Kemeng Shi
2026-07-04 16:32 ` Radu Rendec
2026-07-06 8:31 ` Marc Zyngier [this message]
2026-07-13 12:08 ` Kemeng Shi
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=86mrw4plhv.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=radu@rendec.net \
--cc=shikemeng@huaweicloud.com \
--cc=tglx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.