soc: apple: rtkit: Add a private pointer to apple_rtkit_shmem
authorAsahi Lina <lina@asahilina.net>
Sat, 21 Jan 2023 07:42:53 +0000 (16:42 +0900)
committerHector Martin <marcan@marcan.st>
Tue, 31 Jan 2023 11:37:43 +0000 (20:37 +0900)
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>
include/linux/soc/apple/rtkit.h

index a2446b4..927b214 100644 (file)
@@ -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 {
@@ -30,6 +31,7 @@ struct apple_rtkit_shmem {
        size_t size;
        dma_addr_t iova;
        bool is_mapped;
+       void *private;
 };
 
 /*