From: "Sven Peter" <sven@svenpeter.dev>
To: "Arnd Bergmann" <arnd@arndb.de>
Cc: "Hector Martin" <marcan@marcan.st>,
"Alyssa Rosenzweig" <alyssa@rosenzweig.io>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Keith Busch" <kbusch@kernel.org>, "axboe@fb.com" <axboe@fb.com>,
"hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>,
"Marc Zyngier" <maz@kernel.org>, "Janne Grunau" <j@jannau.net>,
DTML <devicetree@vger.kernel.org>,
"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH v3 5/6] soc: apple: Add RTKit IPC library
Date: Wed, 27 Apr 2022 17:31:06 +0200 [thread overview]
Message-ID: <c4a9d56e-571b-4ec4-8833-c1e438666264@www.fastmail.com> (raw)
In-Reply-To: <CAK8P3a2UEHfoDe-d=XEoTM=SS+7Lug7V1WQUa285LWdVLxjHYA@mail.gmail.com>
On Tue, Apr 26, 2022, at 23:01, Arnd Bergmann wrote:
> On Tue, Apr 26, 2022 at 10:15 PM Sven Peter <sven@svenpeter.dev> wrote:
>>
>> Apple SoCs such as the M1 come with multiple embedded co-processors
>> running proprietary firmware. Communication with those is established
>> over a simple mailbox using the RTKit IPC protocol.
>>
>> This cannot be implement inside the mailbox subsystem since on top
>> of communication over channels we also need support for starting,
>> hibernating and resetting these co-processors. We also need to
>> handle shared memory allocations differently depending on the
>> co-processor and don't want to split that across multiple drivers.
>>
>> Signed-off-by: Sven Peter <sven@svenpeter.dev>
>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
>
thanks!
>> +bool apple_rtkit_is_running(struct apple_rtkit *rtk)
>> +{
>> + if (rtk->crashed)
>> + return false;
>> + if ((rtk->iop_power_state & 0xff) != APPLE_RTKIT_PWR_STATE_ON)
>> + return false;
>> + if ((rtk->ap_power_state & 0xff) != APPLE_RTKIT_PWR_STATE_ON)
>> + return false;
>> + return true;
>> +}
>> +EXPORT_SYMBOL_GPL(apple_rtkit_is_running);
>> +
>> +bool apple_rtkit_is_crashed(struct apple_rtkit *rtk)
>> +{
>> + return rtk->crashed;
>> +}
>> +EXPORT_SYMBOL_GPL(apple_rtkit_is_crashed);
>
> I noticed that you use EXPORT_SYMBOL_GPL() here, but a more permissive
> EXPORT_SYMBOL() in the SART driver. Is that intentional?
No idea why I used both but it wasn't intentional. I'll change all exports
to EXPORT_SYMBOL_GPL.
>
>> +
>> +#if IS_ENABLED(CONFIG_APPLE_RTKIT)
>> +
>
> Same comment about the #if as for the SART driver: I'd prefer it without the
> conditional compilation.
Ok, will remove those #ifs as well.
Sven
next prev parent reply other threads:[~2022-04-27 15:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 20:15 [PATCH v3 0/6] Apple M1 (Pro/Max) NVMe driver Sven Peter
2022-04-26 20:15 ` [PATCH v3 1/6] dt-bindings: iommu: Add Apple SART DMA address filter Sven Peter
2022-04-26 20:15 ` [PATCH v3 2/6] dt-bindings: nvme: Add Apple ANS NVMe Sven Peter
2022-04-26 20:15 ` [PATCH v3 3/6] soc: apple: Always include Makefile Sven Peter
2022-04-26 20:15 ` [PATCH v3 4/6] soc: apple: Add SART driver Sven Peter
2022-04-26 20:55 ` Arnd Bergmann
2022-04-26 20:15 ` [PATCH v3 5/6] soc: apple: Add RTKit IPC library Sven Peter
2022-04-26 21:01 ` Arnd Bergmann
2022-04-27 15:31 ` Sven Peter [this message]
2022-04-26 20:15 ` [PATCH v3 6/6] nvme-apple: Add initial Apple SoC NVMe driver Sven Peter
2022-04-26 21:00 ` Keith Busch
2022-04-27 15:40 ` Sven Peter
2022-04-26 21:07 ` Arnd Bergmann
2022-04-26 21:15 ` [PATCH v3 0/6] Apple M1 (Pro/Max) " Arnd Bergmann
2022-04-27 15:33 ` Sven Peter
2022-04-27 17:39 ` Arnd Bergmann
2022-04-28 14:24 ` hch
2022-04-29 16:37 ` Sven Peter
2022-04-29 20:33 ` Arnd Bergmann
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=c4a9d56e-571b-4ec4-8833-c1e438666264@www.fastmail.com \
--to=sven@svenpeter.dev \
--cc=alyssa@rosenzweig.io \
--cc=arnd@arndb.de \
--cc=axboe@fb.com \
--cc=devicetree@vger.kernel.org \
--cc=hch@lst.de \
--cc=j@jannau.net \
--cc=kbusch@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=marcan@marcan.st \
--cc=maz@kernel.org \
--cc=robh+dt@kernel.org \
--cc=sagi@grimberg.me \
/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;
as well as URLs for NNTP newsgroup(s).