From: Sven Peter <sven@kernel.org>
To: Nick Chan <towinchenmi@gmail.com>
Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Lee Jones <lee@kernel.org>,
Janne Grunau <j@jannau.net>, Neal Gompa <neal@gompa.dev>
Subject: Re: [PATCH 1/3] soc: apple: rtkit: Support verison-specific app endpoint start
Date: Sun, 4 Jan 2026 16:17:40 +0100 [thread overview]
Message-ID: <04da9bc6-ebfb-4799-bace-c56a9537282e@kernel.org> (raw)
In-Reply-To: <20251223-rtkit-v10-v1-1-12b4783d6403@gmail.com>
Hi,
On 23.12.25 15:13, Nick Chan wrote:
> Support for protocol versions where app endpoints starts at a
> different endpoint number will be added. Consumer drivers will also
> need to be modified to have them to work with such protocol
> versions.
>
> Signed-off-by: Nick Chan <towinchenmi@gmail.com>
> ---
> drivers/soc/apple/rtkit-internal.h | 3 ++-
> drivers/soc/apple/rtkit.c | 42 +++++++++++++++++++++++++++-----------
> include/linux/soc/apple/rtkit.h | 10 +++++++++
> 3 files changed, 42 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/soc/apple/rtkit-internal.h b/drivers/soc/apple/rtkit-internal.h
> index b8d5244678f0100b72173fa9aca80bf9db1b4e5e..52ef7a202120eb8a56c149179389741ec0f5e358 100644
> --- a/drivers/soc/apple/rtkit-internal.h
> +++ b/drivers/soc/apple/rtkit-internal.h
[...]
>
> + /*
> + * The management endpoint is required to receive the HELLO message
> + * and infer the start of app endpoints so assume it is a system
> + * endpoint here and update this value when HELLO is received.
> + */
> + rtk->app_ep_start = APPLE_RTKIT_EP_CRASHLOG;
The comment doesn't explain why you set this to APPLE_RTKIT_EP_CRASHLOG.
> +
> init_completion(&rtk->epmap_completion);
> init_completion(&rtk->iop_pwr_ack_completion);
> init_completion(&rtk->ap_pwr_ack_completion);
> @@ -851,6 +860,15 @@ int apple_rtkit_shutdown(struct apple_rtkit *rtk)
> }
> EXPORT_SYMBOL_GPL(apple_rtkit_shutdown);
>
> +u8 apple_rtkit_app_ep_to_ep(struct apple_rtkit *rtk, u8 app_ep)
> +{
> + if (!apple_rtkit_is_running(rtk))
> + return 0;
Please don't just silently ignore errors.
> +
> + return rtk->app_ep_start + app_ep;
> +}
> +EXPORT_SYMBOL_GPL(apple_rtkit_app_ep_to_ep);
> +
> int apple_rtkit_idle(struct apple_rtkit *rtk)
> {
> int ret;
> diff --git a/include/linux/soc/apple/rtkit.h b/include/linux/soc/apple/rtkit.h
> index 736f530180179bd144cf85eb0f0bd93844d7188a..423cf1022372b124c9b2728445f85a9b3067c707 100644
> --- a/include/linux/soc/apple/rtkit.h
> +++ b/include/linux/soc/apple/rtkit.h
> @@ -172,4 +172,14 @@ int apple_rtkit_send_message(struct apple_rtkit *rtk, u8 ep, u64 message,
> */
> int apple_rtkit_poll(struct apple_rtkit *rtk);
>
> +/*
> + * Convert an endpoint number relative to start of app endpoint to an absolute
> + * endpoint number.
Is this conversion even true for other co-processors that are not SMC or
does it just work by accident here? Maybe it makes more sense to drop
this function and decide which endpoint to use in the SMC driver.
The documentation is also a bit confusing, please at least explain what
"start of app endpoint" means and where/how you would use this function.
Sven
next prev parent reply other threads:[~2026-01-04 15:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-23 14:13 [PATCH 0/3] RTKit protocol version 10 support Nick Chan
2025-12-23 14:13 ` [PATCH 1/3] soc: apple: rtkit: Support verison-specific app endpoint start Nick Chan
2026-01-04 15:17 ` Sven Peter [this message]
2025-12-23 14:13 ` [PATCH 2/3] soc: apple: rtkit: Add protocol version 10 support Nick Chan
2025-12-23 14:13 ` [PATCH 3/3] mfd: macsmc: Support variable app endpoint start Nick Chan
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=04da9bc6-ebfb-4799-bace-c56a9537282e@kernel.org \
--to=sven@kernel.org \
--cc=asahi@lists.linux.dev \
--cc=j@jannau.net \
--cc=lee@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neal@gompa.dev \
--cc=towinchenmi@gmail.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;
as well as URLs for NNTP newsgroup(s).