Skip to content

Commit

Permalink
soc: apple: rtkit: Add a private pointer to apple_rtkit_shmem
Browse files Browse the repository at this point in the history
This allows downstream consumers to keep track of private data for shmem
mappings. In particular, the Rust abstraction will use this to safely
drop data associated with a mapping when it is unmapped.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Reviewed-by: Eric Curtin <ecurtin@redhat.com>
Signed-off-by: Hector Martin <marcan@marcan.st>
  • Loading branch information
Asahi Lina authored and Hector Martin committed Jan 31, 2023
1 parent c289d5b commit 4435d63
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/soc/apple/rtkit.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* @size: Size of the shared memory buffer.
* @iova: Device VA of shared memory buffer.
* @is_mapped: Shared memory buffer is managed by the co-processor.
* @private: Private data pointer for the parent driver.
*/

struct apple_rtkit_shmem {
Expand All @@ -30,6 +31,7 @@ struct apple_rtkit_shmem {
size_t size;
dma_addr_t iova;
bool is_mapped;
void *private;
};

/*
Expand Down

0 comments on commit 4435d63

Please sign in to comment.