Skip to content

Commit bb5e1aa

Browse files
hoshinolinajannau
authored andcommitted
soc: apple: rtkit: Pass the crashlog to the crashed() callback
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: Jens Axboe <axboe@kernel.dk> Reviewed-by: Sven Peter <sven@svenpeter.dev>
1 parent 38fec10 commit bb5e1aa

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/nvme/host/apple.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static unsigned int apple_nvme_queue_depth(struct apple_nvme_queue *q)
221221
return APPLE_ANS_MAX_QUEUE_DEPTH;
222222
}
223223

224-
static void apple_nvme_rtkit_crashed(void *cookie)
224+
static void apple_nvme_rtkit_crashed(void *cookie, const void *crashlog, size_t crashlog_size)
225225
{
226226
struct apple_nvme *anv = cookie;
227227

drivers/soc/apple/rtkit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ static void apple_rtkit_crashlog_rx(struct apple_rtkit *rtk, u64 msg)
368368

369369
rtk->crashed = true;
370370
if (rtk->ops->crashed)
371-
rtk->ops->crashed(rtk->cookie);
371+
rtk->ops->crashed(rtk->cookie, bfr, rtk->crashlog_buffer.size);
372372
}
373373

374374
static void apple_rtkit_ioreport_rx(struct apple_rtkit *rtk, u64 msg)

include/linux/soc/apple/rtkit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ struct apple_rtkit_shmem {
5656
* context.
5757
*/
5858
struct apple_rtkit_ops {
59-
void (*crashed)(void *cookie);
59+
void (*crashed)(void *cookie, const void *crashlog, size_t crashlog_size);
6060
void (*recv_message)(void *cookie, u8 endpoint, u64 message);
6161
bool (*recv_message_early)(void *cookie, u8 endpoint, u64 message);
6262
int (*shmem_setup)(void *cookie, struct apple_rtkit_shmem *bfr);

0 commit comments

Comments
 (0)