Received: by 10.223.176.5 with SMTP id f5csp2697174wra; Mon, 29 Jan 2018 02:28:32 -0800 (PST) X-Google-Smtp-Source: AH8x227mDLUVCGQOyUAzi79U0UjaAPj/r7VKebMSQ+GlrcMySqj+dFrzEAndLdZSKHDjP85nJFOu X-Received: by 10.99.42.9 with SMTP id q9mr10831811pgq.325.1517221712207; Mon, 29 Jan 2018 02:28:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517221712; cv=none; d=google.com; s=arc-20160816; b=y6VO72SqgCBzVMoW6RAUzL2+Xv3hA2fAYaIhAPzFmTbiGOT8XaMq8TLQCObhxEOpue funnIipviouR3D6h20aQlYiKQOekcu/xYhX0ykNm5DbKyBIYfSEAG7Cwyf57udRCjHCy ydZl50CG2dx20whKF0tF2k0Bax9uWwP6GnPfiRFlQVR1Ei8gYAg67XpvhDyG3eTqDfEP MXYakS0xsKbtOt1wiOKuzGJ3VDN9ekdR9pOq1VBSs2qq6xYITWStSYC8zE6FB6L4Ch7G 34Nceb74wCs2stvkas3y5Dz6HMrytlBlo5XetgxwrIW2guEWjvUGNuVGXdormy7UYQHN MXTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=DJwP32QJd2pn8Hn+ahT23d3e/H4LeOBFExWh6JenpWw=; b=jwS7NC1BVkQ93ydq3GP/ROg+V9FdxDVyvgwdk8NM8dZJAVO0ya3ub6ez1ZKrnniwxB SPEwRQfWvnMvPsQvjHhiZqv6ohRhi7DKiqWX12QDOq+3He9CKxNelNd6PccBllGRimUy HvjO6tal1fClHqzTyOpoz3R27a3/TjbNGTap9YMWxOXb44YB+xPPRRFf5WArQKdQG056 /9UBMHJVnNA989b9dOULa0SnSUKQGCL9LK6lG07yglisC9LwS81YqWHB5ZEag/B6FPt0 6+DWZVjS2htGtGegpXJ7sBq+whJ5uaP1XEnUlPLg0+JTXrvDw97AB6xOezC2QP4w6voN OIgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=LotfutfM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2-v6si3470874plb.439.2018.01.29.02.28.17; Mon, 29 Jan 2018 02:28:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=LotfutfM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751837AbeA2K0W (ORCPT + 99 others); Mon, 29 Jan 2018 05:26:22 -0500 Received: from mail-by2nam03on0040.outbound.protection.outlook.com ([104.47.42.40]:20970 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751494AbeA2K0T (ORCPT ); Mon, 29 Jan 2018 05:26:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=DJwP32QJd2pn8Hn+ahT23d3e/H4LeOBFExWh6JenpWw=; b=LotfutfMY5uJeycF3MfnaI2F4zAjY0akGSKpSAjnpQUZqOGoOKN6hmQPUePo+enWn4PMgf524HMtfTAaeCSx25HdCIEJ2Di9GvTGm6w2urJ3dujBEEtBkckLDouQdn3SKWBp0q2mPJ+FY7z6KFYOGbpiBbejeboPa/Or8o4DEKA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; Received: from localhost (50.233.148.156) by BN6PR07MB2897.namprd07.prod.outlook.com (10.173.28.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 10:26:14 +0000 Date: Mon, 29 Jan 2018 13:25:58 +0300 From: Yury Norov To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Al Viro , Andrew Morton , Andrew Pinski , Arnd Bergmann , Catalin Marinas , "David S . Miller" , Geethasowjanya Akula , Greg Kroah-Hartman , Ingo Molnar , Kees Cook , Laura Abbott , Nicholas Piggin , Sunil Goutham Subject: Re: [PATCH RFC 0/3] API for 128-bit IO access Message-ID: <20180129102558.jcnusie6y6wwooan@yury-thinkpad> References: <20180124090519.6680-1-ynorov@caviumnetworks.com> <20180124102212.GC20586@arm.com> <20180126090542.bsza7hqqinqwllcr@yury-thinkpad> <20180126181149.GA17922@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180126181149.GA17922@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: VI1PR0701CA0045.eurprd07.prod.outlook.com (10.173.77.31) To BN6PR07MB2897.namprd07.prod.outlook.com (10.173.28.143) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5c6643c1-c5b5-47a3-a2ce-08d56702bac9 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:BN6PR07MB2897; X-Microsoft-Exchange-Diagnostics: 1;BN6PR07MB2897;3:IddN3IF49P4tdyjwZ729NByMKYmIh2foVQpaEwnVrtJUAQo5OEjobfZsqMm+aHNR2mzpvWisZ9mVgP4E442URcyL8PD7KoBHeDI13nA694lPVwaqtqECsxSCqsa8mflhYSMEQlG6YEHrZupzu11emd0NELrWI92OGBIPR04WQc8OpkESV1uFUl5n+V5cGXQYUo5zq/k+FOrC1SMJcEnqQg2DgyY1rtYaPzjihddFXL9bkl8xqkvLAMJuz9IU1U+A;25:CCXfdHU0gM24IXwAEOuvkcZFVf4cyWfP9CNEOvZ4H8Qb/IfWmbDXdw/QAD56e6PkFU8Q11qW3DaxH0hLF0RRTMC1+PuDGdumwRTP0tCC2GDOdDQfPtzS+yJXFk2dV7ke0lfNxAKhSzbHvIRO7NaX41s688zgIdo8dYSnoIWI4whbrp6kp9DPL2XaV/Sxt81e0yI3uCWA9HouNAQ9DZ34Z09OAzfQKjY0NTjj+hUvHZH2R5mHcy5tgX+Y4SlBq/4SqOzspQhLkBAx2zMUU3E6aFegjGptUQHQN7XcVvGocKkt5G9OCKiveAE6SHMiJkLnSDNqhH/EcqKKnM7HAX8NqQ==;31:8MsP+UzqwpQz4K9oL4k6Win/6UJbaRI0mYMZnnjk0FMuo/IctGsebvnWgcws4MQGFTJ9K5jMIoAlSC4mkEcRygDlbBkgdw6nNfq+YtQFYtlJKa9Lw6IYGh1wWhl1/BBQb5aRRGMSeeYjSo4kYdMGb6P/B/0c7TiG61iK25AKInfzVgWUmYvZMX+m4XXraLH/pQpnMKLnrWHl3jZadR7paJK6ti6JQvl+G9V+rggnnwY= X-MS-TrafficTypeDiagnostic: BN6PR07MB2897: X-Microsoft-Exchange-Diagnostics: 1;BN6PR07MB2897;20:Z1/78nLWOVIf9E8CBBgfFY+64T6vj0d9q2qh4sPGxzDIYMbTpeUDZGHNgb25y854hTrB55eqSfYwlWmSmtXY+2rCYNRwTF22N+tSDE2FKFGx/XENUy0L8erS6FLZw9XL0++tLwdvPUXB3hNyorq5YB7Clzn4ANY2EU6psjiquLUWCUPfiinOqyNE4KjrMaxl+b1KbSG+59t0FoEDMcaelJENBmxCeGC4zKA5XwU88cM5JDA1/oYKOdoIAioW9ZRQNfZT1JK+ewnVzTO7fKZjTQ5pUSjTfZA3OPXkMtuc9LOYhZAluxhyxuAbJbC7ER6Dl6w6l0tVPbqGosE+lMwUAg5H915cb4RfuR7++GGYPv3WX4+CqoTakbYUVTp7/7m7OY8OLksNPLfLGVLWeQr5eVaBJl3G0ic6YL8dnE4l+xyumCxwAXEzzhHx5hBeuc+Q3xzClTxsGw5XgBUg3cZdzq1ftwLhfb13zJfm7G73YgsA8140WCtP/YBMthc8o4TtK1SSZgNxtt0UeLUZVnGnZ6gcWLFfXROBFoFfGUUaBS5y8DOV2TbBtZu3MVfxqaaCnKqdvxoh8UXhU5QJkjBhieov3Edv8dibluJt8SoNFd4=;4:6ptKCfLQkSe/1HM1i/t0qnSVnaqVtCHi0947GiK9cfs1c0uXauxKXABxa+ucIzAX+twVujvNrB2OB8btvysJPijW8b94RJ6IXHMm58DvG7O5Bqi/PCYucL7UvTuDkajUIswDshSRG/9sGx+kpxH80uIW3wfTYqxO125Ea1nvaGJDbH1ReL50RlRlOB3l3+3U6Y7S+lzMeBGcT9aQP/hMheD9g9MTpGUqARdPov9gZ4YTk7VKr34NRAVSKgExouihIh8CeQVJBhI7JQswIo1ehg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231101)(944501161)(93006095)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011);SRVR:BN6PR07MB2897;BCL:0;PCL:0;RULEID:;SRVR:BN6PR07MB2897; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(7916004)(346002)(366004)(39380400002)(39850400004)(376002)(396003)(199004)(51444003)(189003)(68736007)(8936002)(6666003)(76506005)(50466002)(106356001)(105586002)(42882006)(6916009)(76176011)(59450400001)(33896004)(8676002)(81166006)(386003)(81156014)(186003)(1076002)(2906002)(6496006)(52116002)(2950100002)(5660300001)(23726003)(83506002)(316002)(16586007)(93886005)(26005)(16526019)(54906003)(58126008)(478600001)(9686003)(25786009)(72206003)(6486002)(33716001)(107886003)(7736002)(305945005)(97736004)(229853002)(7416002)(4326008)(53936002)(6116002)(3846002)(39060400002)(6246003)(47776003)(66066001)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR07MB2897;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN6PR07MB2897;23:WWDLgQqdw/JGiCe3QH5n0wZxkawKscKwUFJGK72rC?= =?us-ascii?Q?xioGJ7IlObwLgDHFRcQsGbFDR5FSh6SIMFefMGA8d6TRzBIzfXEhYxjNO1Eb?= =?us-ascii?Q?lYPuMIC3zVtJKD3EUm91nWo2zQvILKhCuqNVC3ecb6UYlfdjePA/fHbnNrBV?= =?us-ascii?Q?+IZWcs8JKsn6J5LTEIb9JNNRgJiv+qYhRlr4XQ9Ctv/X3x+DWmodWJT5Pvra?= =?us-ascii?Q?xaER55ySQYR0vRjP/J6pS0JeQ1qlM6Mq58AbcGd4Ibi1QMOPIfrtdw7UyO0d?= =?us-ascii?Q?7MaeDHb7O3u86c/1MthZi8Cqvs5RGoxMjPMjB6vaz8EmPqKv0g698tZKwWJj?= =?us-ascii?Q?G+BRZJ/5sZB4BGKrbRpRzwfoC0k3tmZFBF+sgy1jfJ7c4ILyimfw+juEJKYD?= =?us-ascii?Q?ujOvyRKZguaLouKOaHrztN4aAp/+w0nSdy1tOFe3WrP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wPh57UUr7EDITK/Nfk4Ma5F40E206 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 10:26:14.6508 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c6643c1-c5b5-47a3-a2ce-08d56702bac9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB2897 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 26, 2018 at 06:11:49PM +0000, Will Deacon wrote: > On Fri, Jan 26, 2018 at 12:05:42PM +0300, Yury Norov wrote: > > On Wed, Jan 24, 2018 at 10:22:13AM +0000, Will Deacon wrote: > > > On Wed, Jan 24, 2018 at 12:05:16PM +0300, Yury Norov wrote: > > > > This series adds API for 128-bit memory IO access and enables it for ARM64. > > > > The original motivation for 128-bit API came from new Cavium network device > > > > driver. The hardware requires 128-bit access to make things work. See > > > > description in patch 3 for details. > > > > > > > > Also, starting from ARMv8.4, stp and ldp instructions become atomic, and > > > > API for 128-bit access would be helpful in core arm64 code. > > > > > > Only for normal, cacheable memory, so they're not suitable for IO accesses > > > as you're proposing here. > > > > Hi Will, > > > > Thanks for clarification. > > > > Could you elaborate, do you find 128-bit read/write API useless, or > > you just correct my comment? > > > > I think that ordered uniform 128-bit access API would be helpful, even > > if not atomic. > > Sorry, but I strongly disagree here. Having an IO accessor that isn't > guaranteed to be atomic is a recipe for disaster if it's not called out > explicitly. You're much better off implementing something along the lines > of using 2x64-bit accessors like we already > have for the 2x32-bit case. > > However, that doesn't solve your problem and is somewhat of a distraction. > I'd suggest that in your case, where you have a device that relies on > 128-bit atomic access that is assumedly tightly integrated into your SoC, > then the driver just codes it's own local implementation of the accessor, > given that there isn't a way to guarantee the atomicity architecturally > (and even within your SoC it might not be atomic to all endpoints). OK. Understand that. So we'll drop this RFC and implement those accessors in driver. Thank you and all for the review. Maybe later I'll submit 128-bit unification patch that was discussed here. Yury