From: Thierry Reding <thierry.reding@kernel.org>
To: Mikko Perttunen <mperttunen@nvidia.com>
Cc: jonathanh@nvidia.com, Aniruddha Rao <anrao@nvidia.com>,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/5] firmware: tegra: bpmp: Add ACPI support
Date: Wed, 12 Aug 2026 11:30:28 +0200 [thread overview]
Message-ID: <anw8GfvJTgYOV7xn@orome> (raw)
In-Reply-To: <yp4_Hg6NTM6XvmUccLSv1w@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 1643 bytes --]
On Thu, Jul 23, 2026 at 02:10:23PM +0900, Mikko Perttunen wrote:
> On Wednesday, July 22, 2026 8:05 PM Aniruddha Rao wrote:
[...]
> > diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c
[...]
> > @@ -428,6 +521,18 @@ int tegra_bpmp_transfer(struct tegra_bpmp *bpmp,
> > return tegra_bpmp_channel_read(channel, msg->rx.data, msg->rx.size,
> > &msg->rx.ret);
> > }
> > +
> > +int tegra_bpmp_transfer(struct tegra_bpmp *bpmp,
> > + struct tegra_bpmp_message *msg)
> > +{
> > + if (WARN_ON(irqs_disabled()))
> > + return -EPERM;
> > +
> > + if (ACPI_HANDLE(bpmp->dev))
> > + return tegra_bpmp_transfer_acpi(bpmp, msg);
> > +
> > + return __tegra_bpmp_transfer(bpmp, msg);
> > +}
>
> Having separate __tegra_bpmp_transfer and tegra_bpmp_transfer seems
> unnecessary to me. I think we can just have tegra_bpmp_transfer call
> tegra_bpmp_transfer_acpi after the tegra_bpmp_message_valid check?
We've had some internal discussions about this and I think we can pull
in the message validity check into this function since it's common
between the ACPI and the non-ACPI implementation. Similarly, that __
prefix may be confusing. It's often used to refer to some internal
helper, mostly for unlocked operations, so it does make some sense here,
but using something like tegra_bpmp_transfer_channel() (I have a slight
preference for this, because technically you could use this on non-DT
systems as well, provided you get channel setup from some other firmware
interface) or tegra_bpmp_transfer_dt() would make it clearer that this
is the alternative to ACPI.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-08-12 9:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 11:05 [PATCH v2 0/5] firmware: tegra: bpmp: Add ACPI and MBWT support Aniruddha Rao
2026-07-22 11:05 ` [PATCH v2 1/5] firmware: tegra: bpmp: Move channel initialization to helper Aniruddha Rao
2026-07-22 11:05 ` [PATCH v2 2/5] firmware: tegra: bpmp: Add ACPI support Aniruddha Rao
2026-07-23 5:10 ` Mikko Perttunen
2026-08-12 9:30 ` Thierry Reding [this message]
2026-07-22 11:05 ` [PATCH v2 3/5] firmware: tegra: bpmp: Add the Memory Bandwidth Throttler ABI definitions Aniruddha Rao
2026-07-22 11:05 ` [PATCH v2 4/5] firmware: tegra: bpmp: Add MBWT BPMP helpers Aniruddha Rao
2026-07-23 5:15 ` Mikko Perttunen
2026-08-12 9:43 ` Thierry Reding
2026-07-22 11:05 ` [PATCH v2 5/5] firmware: tegra: bpmp: Add MBWT sysfs interface Aniruddha Rao
2026-07-23 5:21 ` Mikko Perttunen
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=anw8GfvJTgYOV7xn@orome \
--to=thierry.reding@kernel.org \
--cc=anrao@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mperttunen@nvidia.com \
/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
all inboxes | Powered by JetHome®