public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Sven Peter <sven@svenpeter.dev>
To: Lina Asahi <lina@asahilina.net>
Cc: Hector Martin <marcan@marcan.st>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	Janne Grunau <j@jannau.net>,
	asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	Lina Asahi <lina@asahilina.net>
Subject: Re: [PATCH] soc: apple: rtkit: Pass the crashlog to the crashed() callback
Date: Sun, 2 Feb 2025 16:06:46 +0100	[thread overview]
Message-ID: <784BCC93-4BA6-420D-983D-35CD51EE3684@svenpeter.dev> (raw)


> 
> On 2. Feb 2025, at 14:49, Asahi Lina <lina@asahilina.net> wrote:
> 
> Client drivers might want a copy of the crashlog to stash into a
> devcoredump blob. Since device memory management can be very variable,
> the actual devcoredump implementation is left to client drivers. Pass
> the raw crashlog buffer to the client callback so it can use it if
> desired.
> 
> Signed-off-by: Asahi Lina <lina@asahilina.net>
> ---
Reviewed-by: Sven Peter <sven@svenpeter.dev>


> drivers/nvme/host/apple.c       | 2 +-
> drivers/soc/apple/rtkit.c       | 2 +-
> include/linux/soc/apple/rtkit.h | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
> index 4319ab50c10d11ed81dcc002275f190e053c1be6..f46b3f179a00dad054c24ccaa0c578d64ca75ec9 100644
> --- a/drivers/nvme/host/apple.c
> +++ b/drivers/nvme/host/apple.c
> @@ -221,7 +221,7 @@ static unsigned int apple_nvme_queue_depth(struct apple_nvme_queue *q)
>   return APPLE_ANS_MAX_QUEUE_DEPTH;
> }
> 
> -static void apple_nvme_rtkit_crashed(void *cookie)
> +static void apple_nvme_rtkit_crashed(void *cookie, const void *crashlog, size_t crashlog_size)
> {
>   struct apple_nvme *anv = cookie;
> 
> diff --git a/drivers/soc/apple/rtkit.c b/drivers/soc/apple/rtkit.c
> index e6d940292c9fbdfc4cd42020e89aca2662c5cdce..4b0783091a92324a707a0e1cd16d36dd6d984678 100644
> --- a/drivers/soc/apple/rtkit.c
> +++ b/drivers/soc/apple/rtkit.c
> @@ -368,7 +368,7 @@ static void apple_rtkit_crashlog_rx(struct apple_rtkit *rtk, u64 msg)
> 
>   rtk->crashed = true;
>   if (rtk->ops->crashed)
> -        rtk->ops->crashed(rtk->cookie);
> +        rtk->ops->crashed(rtk->cookie, bfr, rtk->crashlog_buffer.size);
> }
> 
> static void apple_rtkit_ioreport_rx(struct apple_rtkit *rtk, u64 msg)
> diff --git a/include/linux/soc/apple/rtkit.h b/include/linux/soc/apple/rtkit.h
> index c06d17599ae7e3d37d99495e4296932b1de3a3c7..736f530180179bd144cf85eb0f0bd93844d7188a 100644
> --- a/include/linux/soc/apple/rtkit.h
> +++ b/include/linux/soc/apple/rtkit.h
> @@ -56,7 +56,7 @@ struct apple_rtkit_shmem {
> *                 context.
> */
> struct apple_rtkit_ops {
> -    void (*crashed)(void *cookie);
> +    void (*crashed)(void *cookie, const void *crashlog, size_t crashlog_size);
>   void (*recv_message)(void *cookie, u8 endpoint, u64 message);
>   bool (*recv_message_early)(void *cookie, u8 endpoint, u64 message);
>   int (*shmem_setup)(void *cookie, struct apple_rtkit_shmem *bfr);
> 
> ---
> base-commit: ffd294d346d185b70e28b1a28abe367bbfe53c04
> change-id: 20250202-rtkit-crashdump-e848547dad67
> 
> Cheers,
> ~~ Lina



             reply	other threads:[~2025-02-03  7:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-02 15:06 Sven Peter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-02 13:48 [PATCH] soc: apple: rtkit: Pass the crashlog to the crashed() callback Asahi Lina
2025-02-02 15:05 ` Jens Axboe
2025-02-18 17:05 ` Sven Peter

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=784BCC93-4BA6-420D-983D-35CD51EE3684@svenpeter.dev \
    --to=sven@svenpeter.dev \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=j@jannau.net \
    --cc=kbusch@kernel.org \
    --cc=lina@asahilina.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=marcan@marcan.st \
    --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