Skip to content

Commit 4afd7c3

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>
1 parent 27cea5a commit 4afd7c3

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
@@ -396,7 +396,7 @@ static void apple_rtkit_crashlog_rx(struct apple_rtkit *rtk, u64 msg)
396396

397397
rtk->crashed = true;
398398
if (rtk->ops->crashed)
399-
rtk->ops->crashed(rtk->cookie);
399+
rtk->ops->crashed(rtk->cookie, bfr, rtk->crashlog_buffer.size);
400400
}
401401

402402
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)