Message ID | 20230121074253.9774-1-lina@asahilina.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp617669wrn; Fri, 20 Jan 2023 23:48:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXuZy2i4FZIQPMupn9OnH/+pL/47cIW70zZNfgHK4LdHt8ctcrMG/JTghM8DmiiIoBQYraOf X-Received: by 2002:a17:902:d582:b0:194:8b08:a571 with SMTP id k2-20020a170902d58200b001948b08a571mr18539585plh.2.1674287319743; Fri, 20 Jan 2023 23:48:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674287319; cv=none; d=google.com; s=arc-20160816; b=pabSm00qyP+SpaWUhsRM9uRQ0A5pJ3CuL1sls/j+g4Ng4+CZGvEj30sb+hKgmmbE/U 9U+LbHwk2JJWy5MkgNB0ppbnkqTd1VFbnJI/QmsG0Y3ayt28eIs38Q+61VIA/efzrSvl mHb4Lkz8J2t8Xj8cNGnJC3qGaWLHod86+sqlrEXTVBhvXRCyvAnIlJgPRKqOLvPBKZs8 t5w2rfYhM4A1gVW5S3vcug6DoMiHj0DeYVjw78bR34eaHw+bZhtzDRmrwCsQtwmhgdPc WIR+LnVMDP4flOHHIGU/u3mCRTTyWzjbtu5SOIW7TxykHfG7TsEZA3d6cMElvcGOsA6E DegA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pKM3TupSQkJq0H/mQZKG8jIwrpQpYsNsNwLeOByMjp8=; b=GSzsmCGSLvd+RFz1+3CG7zvY/NZOLRjKswuCcVDp6qe+jxh5vVGOpBH9iKi0PvHqBh nwIvVTP2/2xDJDK8k04bpvqYJ8Wtg65D47ULSVBS/MnNQpWka3lQNSPysV+WlpO6rG2o hGRhVk8awj6ApLabC76YFaaQhx5wL/HO8cH/2ma+2lFQbMW1lLAvLjAxyeEhtmykG/GM xTg+VyZka47rvC/mrUw0Yj1r0ySeQLnIitTDAJHBSdaIjEuefAM6UTOnexX2pydW39wo AMcNjojFckzZuEOx3HYGxBX8UcFve50q1n7rCKC3fG6Pt6ATFT6QzSB6yvUoz+U3EVZ2 tzgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@asahilina.net header.s=default header.b=Jxe2YsZX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=asahilina.net Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a170902834b00b00193300007f9si36938778pln.253.2023.01.20.23.48.28; Fri, 20 Jan 2023 23:48:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@asahilina.net header.s=default header.b=Jxe2YsZX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=asahilina.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229766AbjAUHnW (ORCPT <rfc822;forouhar.linux@gmail.com> + 99 others); Sat, 21 Jan 2023 02:43:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjAUHnV (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 21 Jan 2023 02:43:21 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A77F63E20 for <linux-kernel@vger.kernel.org>; Fri, 20 Jan 2023 23:43:19 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: linasend@asahilina.net) by mail.marcansoft.com (Postfix) with ESMTPSA id C8F9541EF0; Sat, 21 Jan 2023 07:43:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=asahilina.net; s=default; t=1674286997; bh=3/HH/e70fh1sArvce9tWJI5BZ4sJUWCbJ03o78bSh0Y=; h=From:To:Cc:Subject:Date; b=Jxe2YsZXl+FVkMrc9H7YYXVt9xACJevd6FMEVBHgpXEHqdlDTasGUSi+2Eu7/3qVC yf1ZRIGV6A4+eUI4qP6RTYSzQmFPvS9i2GAqbuudx94/lPTe8Imzus1ixC9jLsKQ+T VNN6EbtVcFvqVDr+2iAJtt762oicS6z0sntpYUOIxheSycn7+3E7rokapJze/GK6cr FCAIY+IOItdhNhflWB2399Ja02zOSRQhuezRydPEi8hozyV/pLb/nyE8E+7Mad6irq ovX/6LXEPqsTo1Zunc+++j4a4TFIzbIclo+lOXKvFZyWjM01YjminNP9tz9K6yCaGV iKobfTnt7979Q== From: Asahi Lina <lina@asahilina.net> To: Hector Martin <marcan@marcan.st>, Sven Peter <sven@svenpeter.dev> Cc: Alyssa Rosenzweig <alyssa@rosenzweig.io>, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Asahi Lina <lina@asahilina.net> Subject: [PATCH] soc: apple: rtkit: Add a private pointer to apple_rtkit_shmem Date: Sat, 21 Jan 2023 16:42:53 +0900 Message-Id: <20230121074253.9774-1-lina@asahilina.net> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755617500622484644?= X-GMAIL-MSGID: =?utf-8?q?1755617500622484644?= |
Series |
soc: apple: rtkit: Add a private pointer to apple_rtkit_shmem
|
|
Commit Message
Asahi Lina
Jan. 21, 2023, 7:42 a.m. UTC
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>
---
include/linux/soc/apple/rtkit.h | 2 ++
1 file changed, 2 insertions(+)
Comments
On Sat, Jan 21, 2023, at 08:42, Asahi Lina wrote: > 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> thanks, Sven
On Sat, 21 Jan 2023 at 07:53, Asahi Lina <lina@asahilina.net> wrote: > > 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> > --- Signed-off-by: Eric Curtin <ecurtin@redhat.com> > include/linux/soc/apple/rtkit.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/linux/soc/apple/rtkit.h b/include/linux/soc/apple/rtkit.h > index 62bfa37b5adb..1a9888a1797a 100644 > --- a/include/linux/soc/apple/rtkit.h > +++ b/include/linux/soc/apple/rtkit.h > @@ -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; > }; > > /* > -- > 2.35.1 > >
Is mise le meas/Regards, Eric Curtin On Sat, 21 Jan 2023 at 07:53, Asahi Lina <lina@asahilina.net> wrote: > > 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> > --- Sorry Lina, these were obviously supposed to not be signed off tags, but: Reviewed-by: Eric Curtin <ecurtin@redhat.com> that's what you get, when you copy a tag from somewhere else! > include/linux/soc/apple/rtkit.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/linux/soc/apple/rtkit.h b/include/linux/soc/apple/rtkit.h > index 62bfa37b5adb..1a9888a1797a 100644 > --- a/include/linux/soc/apple/rtkit.h > +++ b/include/linux/soc/apple/rtkit.h > @@ -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; > }; > > /* > -- > 2.35.1 > >
On 21/01/2023 16.42, Asahi Lina wrote: > 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> > --- > include/linux/soc/apple/rtkit.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/include/linux/soc/apple/rtkit.h b/include/linux/soc/apple/rtkit.h > index 62bfa37b5adb..1a9888a1797a 100644 > --- a/include/linux/soc/apple/rtkit.h > +++ b/include/linux/soc/apple/rtkit.h > @@ -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; > }; > > /* Thanks, applied to asahi-soc/soc! - Hector
diff --git a/include/linux/soc/apple/rtkit.h b/include/linux/soc/apple/rtkit.h index 62bfa37b5adb..1a9888a1797a 100644 --- a/include/linux/soc/apple/rtkit.h +++ b/include/linux/soc/apple/rtkit.h @@ -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; }; /*