From patchwork Thu May 5 15:40:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 1627013 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=OMCe9Tpo; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=svenpeter.dev header.i=@svenpeter.dev header.a=rsa-sha256 header.s=fm1 header.b=K+XKjHnG; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=TjcNgBTc; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KvHwf5H89z9sBB for ; Fri, 6 May 2022 01:41:06 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=r7WBMUdu1ItDo0dH0eNSseGMPjJKDIkay0vnUmWh0WU=; b=OMCe9TpoC6bMJ2 GGKw5CkgSnvTj36b8priKi51X2oyo8Vku98fZdl0jGDs8RLj6zuXRUunDm1rGjp/nvVwILJc9wAYA dismWgtenGXeQPg4aFbCdCzyQy7/vxWLfgd2I3nE54yW2H38Cm8j+NKgsGtgOlrmN/gmK6Ox8AYVS DsUaNbeOur24ofG04R+6yi0YlYOnFq9Wpr2mlw2zcrwVja20y5eA815wPemVeavxHwGhcQmz5rP89 X7frCUW5CerFbrrTt6PPM2iM+cVyxkKdVszUZMN4YfhGUq79r7NZDdHN9kXxC8iRGuFM21++oFT2f FpLslciKDGMfIAK3dE4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmdaw-00GgyZ-OZ; Thu, 05 May 2022 15:40:46 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmdas-00GguZ-Pm; Thu, 05 May 2022 15:40:44 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 292215C0230; Thu, 5 May 2022 11:40:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 05 May 2022 11:40:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm1; t=1651765235; x=1651851635; bh=xpW3unNQu8 QRdU1aUouMudDjza+0AjvP9kw1txQmGyE=; b=K+XKjHnGqoyi4gHJkLolZqrINg RXQ3eKUiL7v16XSP/Xxy0bqhYpHj9MrT4YEofBAY2Q8bhzdjhoxY05FYZ6vMNjwE typxn9tP2wsX7buHn1ABCO4GcQkZmvmsrJ+dTnQkeK0425tON0QKXveRQUczpTZt x8p4KFd8wHXIQjo9fHcIJGWqM+qHVZxgOqj0X6FAJACLdgNMPq4AkVF5wqE9g2kF NogEIXNjMG64mJHB8sfbuG3AABGf7i3frI/TE6Ss1WmUsdu0NLY2UoylI9OpvKSb CNroMLbHbGxVx0RPNyReTLP0O0ivy0fU1sLIeH9ZiW3VjGG4j5uYMISYMMlA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1651765235; x=1651851635; bh=x pW3unNQu8QRdU1aUouMudDjza+0AjvP9kw1txQmGyE=; b=TjcNgBTc7BCUORWuw w1V6d2ADSkSxdWxd9PcwW9dHtUk/Xiq1UtIebZkA1gLOivoi01gSZVgOqmCp4zkG nzAMO/Ec6lpCAeuIf+QFEBsBCYYontmP6kdnSwa3C5aiUDMJe1t7Yw4zgaLLVGWu 2oxj7CcOqxetJSFxnNrQvClCGKH23FhZTUgeUXoOQITb6NgS2IlkdqClsbWb6K0V gxifAERdnnQK6G4i8lRdiDxc6c8fOwaK1NtDdPPAcAujUVMk36zXvYb/HU4jriZ8 z9Y5fMjSWhOq56Gue7hvd/+hU7I3H3u1QCR2SXxtUQl2TrJ0S/60+0FuKznDSKj0 LO2nQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedugdeklecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefuvhgvnhcurfgv thgvrhcuoehsvhgvnhesshhvvghnphgvthgvrhdruggvvheqnecuggftrfgrthhtvghrnh epjeelveffvdefgeeuteefueetgeeghfelveevheeugefftdelleeuudefvefhieelnecu ffhomhgrihhnpehkvghrnhgvlhdrohhrghdpghhithhhuhgsrdgtohhmnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhvvghnsehsvhgvnhhp vghtvghrrdguvghv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 5 May 2022 11:40:33 -0400 (EDT) From: Sven Peter To: soc@kernel.org Cc: linux-nvme@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Sven Peter , Hector Martin , Alyssa Rosenzweig , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg Subject: [GIT PULL] Apple SoC RTKit/SART/NVMe driver Date: Thu, 5 May 2022 17:40:20 +0200 Message-Id: <20220505154020.84638-1-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220505_084043_342173_7581B58A X-CRM114-Status: GOOD ( 12.97 ) X-Spam-Score: -0.9 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi SoC Team, Please merge the Apple SoC NVMe driver and its dependencies for 5.19. As discussed on the nvme mailing list [1] it's easiest if we take it entirely through the SoC tree since there's a chance that we [...] Content analysis details: (-0.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [66.111.4.25 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [66.111.4.25 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org Hi SoC Team, Please merge the Apple SoC NVMe driver and its dependencies for 5.19. As discussed on the nvme mailing list [1] it's easiest if we take it entirely through the SoC tree since there's a chance that we will have more drivers depending on rtkit for 5.19. Thanks Sven [1] https://lore.kernel.org/linux-nvme/CAK8P3a1CO8_Pa=Hk3hcdNfT_eD3PQK2aWDFB9bwk6TCNbGmtEg@mail.gmail.com/ ---------------------------------------------------------------- The following changes since commit 3123109284176b1532874591f7c81f3837bbdc17: Linux 5.18-rc1 (2022-04-03 14:08:21 -0700) are available in the Git repository at: https://github.com/AsahiLinux/linux.git tags/asahi-soc-rtkit-sart-nvme-for-5.19 for you to fetch changes up to 5bd2927aceba181b84286e00aa2f56e117e699c3: nvme-apple: Add initial Apple SoC NVMe driver (2022-05-02 17:24:45 +0200) ---------------------------------------------------------------- Apple SoC NVMe driver and dependencies: - RTKit IPC library required to boot and communicate with co-processors embedded inside Apple SoCs - SART DMA address filter required to allow some DMA transactions for the NVMe co-processor - NVMe platform driver The following minor changes since v3 on the mailing list have been folded in: - sart: %llx -> %pa for a phys_addr_t - rtkit:/sart: Drop IS_ENABLED inside headers - rtkit: Use EXPORT_SYMBOL_GPL instead of EXPORT_SYMBOL - nvme: Set NVME_REQ_CANCELLED in the timeout handler - nvme: Use DEFINE_SIMPLE_DEV_PM_OPS instead of #ifdef CONFIG_PM_SLEEP ---------------------------------------------------------------- Sven Peter (6): soc: apple: Always include Makefile soc: apple: Add RTKit IPC library dt-bindings: iommu: Add Apple SART DMA address filter soc: apple: Add SART driver dt-bindings: nvme: Add Apple ANS NVMe nvme-apple: Add initial Apple SoC NVMe driver .../devicetree/bindings/iommu/apple,sart.yaml | 52 + .../devicetree/bindings/nvme/apple,nvme-ans.yaml | 111 ++ MAINTAINERS | 4 + drivers/nvme/host/Kconfig | 13 + drivers/nvme/host/Makefile | 3 + drivers/nvme/host/apple.c | 1593 ++++++++++++++++++++ drivers/soc/Makefile | 2 +- drivers/soc/apple/Kconfig | 24 + drivers/soc/apple/Makefile | 6 + drivers/soc/apple/rtkit-crashlog.c | 154 ++ drivers/soc/apple/rtkit-internal.h | 62 + drivers/soc/apple/rtkit.c | 958 ++++++++++++ drivers/soc/apple/sart.c | 328 ++++ include/linux/soc/apple/rtkit.h | 155 ++ include/linux/soc/apple/sart.h | 53 + 15 files changed, 3517 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/iommu/apple,sart.yaml create mode 100644 Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml create mode 100644 drivers/nvme/host/apple.c create mode 100644 drivers/soc/apple/rtkit-crashlog.c create mode 100644 drivers/soc/apple/rtkit-internal.h create mode 100644 drivers/soc/apple/rtkit.c create mode 100644 drivers/soc/apple/sart.c create mode 100644 include/linux/soc/apple/rtkit.h create mode 100644 include/linux/soc/apple/sart.h