From patchwork Thu Apr 11 16:46:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Gunthorpe X-Patchwork-Id: 13626418 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC0A2C4345F for ; Thu, 11 Apr 2024 16:47:06 +0000 (UTC) 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:References:In-Reply-To: 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: List-Owner; bh=wUXGYijAs24nHgVJacM/drOHCOc/6HjG4Px23VYn2XM=; b=k2gOzFrKOlqUbf 2Ms9LwOoguhHqfHJouNOPJACYyo2Oi0GwdibNwOotV2tKvJuvowl866H53EeX4CaUy2e/M0WEs+/a lMAOtSnMKkjylgFDagbJkY5XwaQ1kQRHVZ695Cpyfp3JCzOrvdSs8dKuJdkLSSWKaUEH2jNgjKzpN grqtcfWJdBwzgKpFG4R6K+NTyKU0Un/Yc9Jrev7kvBQ7/L/i/TAQMSBMPYCfDF8MbS15Gx/ZE7Vu0 rbSL3ugBWAn3V+CAgPCtYXDiThJFP6jB0i00B8j/zudZSZEZH5GhJSdWLvqDlkSQUI1/BnN8PQbk3 GtEjPLxpRtu4XlNXvPeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruxZd-0000000D9rd-1acZ; Thu, 11 Apr 2024 16:46:53 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruxZT-0000000D9n0-2Cx4 for linux-arm-kernel@bombadil.infradead.org; Thu, 11 Apr 2024 16:46:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=PRPh4dhsyZVmxVVomsPWCtm81IAZr2FMm5Xc6ZHkaQc=; b=VVj01t3pijnqrtKOHIntpMjdlu GntHPhzUzcOKmLJuZwLWerXV5IrJkozsp0NECJcPt493V2t7BS5Qu9Bq3wcd5dzYomD5G1tFVVTT7 el+mVgPjoaDlasbPCmYnNSg+3P/Nfrxlhu2Q7RIkwCsxz4779SUfqmY6OJqXSOXrva8/6ED/RJ0a+ cu7H3m17x0T1AGnTmKhPyyr+8Mf7be73lXaRQx2lmFSkzgkDQwKvb5OaWLmi0KTUSL1NBdIP1OMNM vU0j9shSu3/S0B/voyLZigJzYSVjCjn1/SafhYM0HvN30p59I/kH/h8XQqjhJJGikXVUh6j4b7Ulb gNwDnTDw==; Received: from mail-bn8nam12on20601.outbound.protection.outlook.com ([2a01:111:f403:2418::601] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruxZP-00000008iaj-3RPR for linux-arm-kernel@lists.infradead.org; Thu, 11 Apr 2024 16:46:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QVmFYM0hSCAgGZWHj7nU1V2dIk+WtG0QT2F2Xo5uJPacGomujQ/MlIp40a4WuL08T56OgYt32V3V3MHkn/dyygnKwEfgSMq+tyHo6KaL73ldu7lx573XMQvK0RQ43gPgIgPVz/ZweytuevYj/iyY8LiJOIwatNaqpfy7QN4f5LC88wH8CZ3WlccX0Cq3ZTYK3EjdiZBnswsywf/X8Sk1QZvipSkVE8MC/6VF8yXe+mwSfcSUylt77KWY/d6chJApYg/jF7WqgmkeHCR/2kPinaH5LWPDBDUx3RlGBs8KUxNBV6sLBw5j14Ti40l6dfcFZj30FpK108zlFu/UVZhMTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PRPh4dhsyZVmxVVomsPWCtm81IAZr2FMm5Xc6ZHkaQc=; b=kUyTAXQSUoeDGPWYuvbJGsu0vHfg37vQrMtTFm+DXsaMQRUpQDY+iQblBwABmT3xjeKOC3xFaPwP92eE6YHrVN/DxJBKQ3bkE9/QYYRLSvDvuodRBXhxHf7fRJT940MTSz5tnv1lPw7aS7IBmpbXkinl5sxv3biH32N4S5v5pZS9Y9IwIbB05ggOJFCYGJ5ls31DtD8ceOVRRDd0zH7KdvXEYlXYxf1me6B/F6N1hpuFqc3AZqeRBNxLzMV69A6NLA66wGftna5pE8IwitQGUXNaU4LxXOV8xgflWp6C4OSX5xj3CkAJYEHqD+5CJmEaYIWwddMcewxJty8uaTxAxg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PRPh4dhsyZVmxVVomsPWCtm81IAZr2FMm5Xc6ZHkaQc=; b=S85+0jqmnugPP6n4ZY8lRDAtefp0lT07vp5JmNZq45jh56K0nlogCLHG8i4qAZLcyEUdIH2pc3wTHGJGecGFneoDfPPWHPi2N8fZXoaCsfDbW9IcUQ/pf5oAabiWQ0IXpp585hluKyAfJl+9mhlkmtvyqGAZlZLwtiGEAPf4DXTb/UlJXcuPC9Uig9WNuZOAYSiJFdKyjqmBu2bUr0KuSPobsYRuy1TzSs4iIZ6ypLZB4iOERQJixh6v617gUzEEP+w1j+5lfpuoq6WqKRgz4LN7MioRKW9gju2+M3gCqkTcJH0Ag5GQHH36Dn7k1C6qM4xfhblqlwqD9cSm5TpWCg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from DM6PR12MB3849.namprd12.prod.outlook.com (2603:10b6:5:1c7::26) by SJ2PR12MB8064.namprd12.prod.outlook.com (2603:10b6:a03:4cc::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Thu, 11 Apr 2024 16:46:22 +0000 Received: from DM6PR12MB3849.namprd12.prod.outlook.com ([fe80::6aec:dbca:a593:a222]) by DM6PR12MB3849.namprd12.prod.outlook.com ([fe80::6aec:dbca:a593:a222%5]) with mapi id 15.20.7409.053; Thu, 11 Apr 2024 16:46:22 +0000 From: Jason Gunthorpe To: Alexander Gordeev , Andrew Morton , Christian Borntraeger , Borislav Petkov , Dave Hansen , "David S. Miller" , Eric Dumazet , Gerald Schaefer , Vasily Gorbik , Heiko Carstens , "H. Peter Anvin" , Justin Stitt , Jakub Kicinski , Leon Romanovsky , linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, llvm@lists.linux.dev, Ingo Molnar , Bill Wendling , Nathan Chancellor , Nick Desaulniers , netdev@vger.kernel.org, Paolo Abeni , Salil Mehta , Sven Schnelle , Thomas Gleixner , x86@kernel.org, Yisen Zhuang Cc: Arnd Bergmann , Catalin Marinas , Leon Romanovsky , linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Rutland , Michael Guralnik , patches@lists.linux.dev, Niklas Schnelle , Jijie Shao , Will Deacon Subject: [PATCH v3 2/6] s390: Implement __iowrite32_copy() Date: Thu, 11 Apr 2024 13:46:15 -0300 Message-ID: <2-v3-1893cd8b9369+1925-mlx5_arm_wc_jgg@nvidia.com> In-Reply-To: <0-v3-1893cd8b9369+1925-mlx5_arm_wc_jgg@nvidia.com> References: X-ClientProxiedBy: BL1PR13CA0264.namprd13.prod.outlook.com (2603:10b6:208:2ba::29) To DM6PR12MB3849.namprd12.prod.outlook.com (2603:10b6:5:1c7::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB3849:EE_|SJ2PR12MB8064:EE_ X-MS-Office365-Filtering-Correlation-Id: 276b625d-16cd-4755-020a-08dc5a46eaa5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0z+KsGAxioAC5gG7TV1cZ+Z9lvKbtsTo28Hf7uyMUlY2HskjDQKH7qKBUFklCXfgiBV0GyUc5ueU8dhPWq7X+/H9jHTAqg+ZO+80B4groWEFyp7e6hQbc84fefhNkfIKK+KGC8jjs8z1KLPRnC+xx9+P35/2Fd5/3QA74eaDls8IJLSy3kK0ohRRFiLBmdNcPMVgYLyMbBkr7zFjEeuJzUXO6DdrCwpifoeioO/IxaWTHHZZ2dBtLmaFU8wRQs+eqWsquFL8R1ZPpcuzQ3sgekW48ODKyxjvBhANWK/puny7BAOobMnbfFsPYCoFjTtXFo9dDRfyxrDpKaxpydLmOvbZHXy+gGF/IeWqQiV9nDlqacizA0Q6opdtdhpCwlatq3hYFvfRhTHiqTQa3CRKlOWupd33w/akUOkh87RtFzryfeOhZWUK4sKdiuhZZ/h0WHJH+vCJLC+uv8sYaQsjgZDblUivQo0knn6aQYp6rTjCCRkcCk7SYgvQB8OrUo1AuikKAfqG9MozM7ZZw3tnWKuSo7DC0bfnDbD27SvIvjmHJycU5Oko6/N4V246l/9fgh2Ron/L5yB9jD7ORMp/zsCpuqcpmzaZzJ96z552AlNJ7OQJse2Xr9/ZNncxOKLeTDIw7ORGIxLp+8W7KltM4TOTO+fqhjCFRblQAXYxj7qfyurZFOwBSoakAu/YqiT1xU/1OQWU5pZPE3JmAINtuA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB3849.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(376005)(7416005)(366007)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: i7lXgCdif+kwxcoaKncQ+KlIN8n2nlbjbUAok+EWcO2iMQ2pnaCZQ2UfQ1RRjSwdhNfo/0pzuS0DsmEzPVUjGYMZBqB2EoiKxAv/c9GD5/BuqXjrUg8ZILas0S8cdPZ8N/Q7TCZg0i/eWn9RH7xMWvEDlXQTTE0Xu19Ly5EuXdDQglVaxgt2M+gbYmqMcIC1blUkC+qq4HsvGKLBHMNvzRSSO2zQQnXkZqhE/SXCVU4IWddCGYy7pvJoNvr6kfbcE2vkH1NE65Wc7ITGr/afjVLIv6DQa7x07uHs38F6PGXFiY/74aQN+6ngLE4is98hPOPzYmxePcWz2y3sFjRIVJhCxIZbv4RwU+YJvhnxs97HeYco07X1tId3qVGQ2jBHx5vFN0648MKo9EKFX6hmDeZHsRJWfRZiEL3IfzihHdTGhSAoTSqEYi3wND71PFk4WGLYo8gr1S/sWPMW/CTwR/GF1uVG+SFUJuuTHILx5tGM7HYCm9llJdE6023F1TwIZCDP1+3GiTzSO4R555vrqH81sxHmDcEbt2Vjh5NPX30SD/3/13+DYxbsTs7CwDFn9SkFoqEGQ+ZUiAwmjb9IFce6cBKQb7CqG8Cy223EDDb4eyY5NQyPLN2ve91VCx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3849.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2024 16:46:21.1873 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sDOJi1NGltfsyrIP6cojeXtmR+KV8RlY70GOwHhCZSJ+GUNVihQTNT/ZLw+OG12O X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8064 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240411_174640_040252_BBB39744 X-CRM114-Status: UNSURE ( 9.52 ) X-CRM114-Notice: Please train this message. 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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It is trivial to implement an inline to do this, so provide it in the s390 headers. Like the 64 bit version it should just invoke zpci_memcpy_toio() with the correct size. Acked-by: Niklas Schnelle Signed-off-by: Jason Gunthorpe --- arch/s390/include/asm/io.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h index 4453ad7c11aced..00704fc8a54b30 100644 --- a/arch/s390/include/asm/io.h +++ b/arch/s390/include/asm/io.h @@ -73,6 +73,14 @@ static inline void ioport_unmap(void __iomem *p) #define __raw_writel zpci_write_u32 #define __raw_writeq zpci_write_u64 +/* combine single writes by using store-block insn */ +static inline void __iowrite32_copy(void __iomem *to, const void *from, + size_t count) +{ + zpci_memcpy_toio(to, from, count * 4); +} +#define __iowrite32_copy __iowrite32_copy + #endif /* CONFIG_PCI */ #include