Received: by 10.223.176.46 with SMTP id f43csp1086357wra; Wed, 24 Jan 2018 10:22:23 -0800 (PST) X-Google-Smtp-Source: AH8x227KfFBPtW5Gkpj/jfIbjkpYsr9HBzkuhaGV7UJNzJ67BN23EBcTH+DjEZmsKrWD03Llb39V X-Received: by 10.98.80.20 with SMTP id e20mr13629877pfb.148.1516818143529; Wed, 24 Jan 2018 10:22:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516818143; cv=none; d=google.com; s=arc-20160816; b=TFmJefc+cqbm5mWO3nm6aJY7KL9KU8ajoxXCWMF3aozQiaRbohtZBX6t+LEej/Qp7n 04wyj9g+WqE3le2H880KMeh/jSh3vS9hjGJes1leH8VG0Smp+vdmvOtlKhHucWqIST7f ftu3tW1DbqKH4ZlqZ6ZXTLCnmwcrtIsl6lVa0xlj7M5cRj3Gp1fTmn0TX//iflsETqt9 sRjRyAI8xe0suU9+22bKg1heHUuc3JhB74b+aqQfrhljCdPwrg/piubF6nkEiG0dkJS3 JxMl5170DiiezptRiSMf8iEN+dANEXc6I0SnsGJVRAevEHA+qZyn3xYoW6JvWmors873 zB9A== 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=DTsb5OFH/IY4rJbOLwtTQSRr222AoscNpGEsGIl47YI=; b=fvoh6NEnJWU8gST9UJylFTsHtrqWmfd4bSy9pg+zdYabdxIRZgguR5pBggHHxuCObr GgtUlsZ2rSMzTYOK27vVaWmA4xHGThEbD9Pe5IlNQf3fldUbyLaLWVi6llYwWt7ktsR+ PqafGPbhR8aDFrAbiW4aLIJRkLq/JrlOnE5Ch/fAu74t3MGcRPXTwuO0IpY6WI0ePGDT GM0x6kPZ5EZBUydEMTZr0ceIR6AOU90HzRHIpqcqmZUoG0M6NBHTnqyQexm7i6ICevNJ LfDMuNY5IEJchnxUQJlDmnNT1bJ2E0XH3fnDkM47gRgy+K3GTO9lds8KrggoVdP00h1J CF/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=D70OTmox; 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 q2si415269pgp.400.2018.01.24.10.22.09; Wed, 24 Jan 2018 10:22:23 -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=D70OTmox; 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 S965051AbeAXSUN (ORCPT + 99 others); Wed, 24 Jan 2018 13:20:13 -0500 Received: from mail-by2nam01on0086.outbound.protection.outlook.com ([104.47.34.86]:57760 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964930AbeAXSUK (ORCPT ); Wed, 24 Jan 2018 13:20:10 -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=DTsb5OFH/IY4rJbOLwtTQSRr222AoscNpGEsGIl47YI=; b=D70OTmox7J0Rgcf/VlAf0TfWa2fs7WdZDGs83JUZ3okr7u49N6JJAdluZhBA6fmexfmYQE0A8E9ycsl7h2mh1G2pGZA3R3lQ7yfeDY45ExUBsAXL6FVpQ9F+csSKKstW+UqbTqqjnrX/yuzYNW5OZTAqPw2WoUd2t9PPTgHOjhU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; Received: from localhost (42.106.18.88) by CY4PR07MB2902.namprd07.prod.outlook.com (10.169.252.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Wed, 24 Jan 2018 18:20:07 +0000 Date: Wed, 24 Jan 2018 21:19:54 +0300 From: Yury Norov To: Geert Uytterhoeven Cc: linux-arm-kernel@lists.infradead.org, Linux-Arch , Linux Kernel Mailing List , Linux Crypto Mailing List , 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 , Will Deacon Subject: Re: [PATCH 3/3] arm64: enable 128-bit memory read/write support Message-ID: <20180124181954.o6e6wfekbdnjn7rc@yury-thinkpad> References: <20180124090519.6680-1-ynorov@caviumnetworks.com> <20180124090519.6680-4-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) X-Originating-IP: [42.106.18.88] X-ClientProxiedBy: DB3PR0202CA0007.eurprd02.prod.outlook.com (52.134.64.148) To CY4PR07MB2902.namprd07.prod.outlook.com (10.169.252.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 586a045e-9aa2-4f06-0c76-08d56357195c X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:CY4PR07MB2902; X-Microsoft-Exchange-Diagnostics: 1;CY4PR07MB2902;3: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M8BMzoJTIjKntr7d8A4hywv+CcGdzePPRFm2QMfQk1hQTZNU7Yn7/tVfel7jipVxNMXkm/Jpn+eFp3TL9mVHr3P45h/TZAUblgSoL/qLpdf/GuV6I5hyFKga+DrBXJZ2EVNnLxMjvs44VX1sEbIvpKzE2FkWn2KDHPuspvWbzZhqE2qmrwFMhp8RJqOrHDQ+aIMCHzWLmh0KpWWnnQ9pKkGnjui8KYtNGOwDrS+YUXSVQqTmdA+D45biVh25io2m2hrycSSDn+bUPal2+gMQGUNwuwGr1u4tCfR1QCDrM6SeQF7wih4wedNOah8TQEloir4bwgbMM5INdgw4fWOilvnKYRC9E2rm8Ul1/xI/tO21fM3hPEI+fKYCQdRnu5oXasvoi5or2aDX/yBaBlnvlwYXWEetwjT2KkMAYXnWIRT8U+WA6GcYvBcHRrVUWZ0=;4:etDMZG6U1KOJr/CypScYCKZVA11qJJTIwEwPorFy+hnR9RvgPzYVd4BWBfrNnqbcsmrgUOeZDelsKSo3XvUJP1XUBdhWP5OZBVAYmW7ais9q6g7mbXFUsgmoA2aX1ED0o+Os8pl+v8Z74i0sjT1GYfoZjXaOtKaidfdNyRrPCXEFtSHB6tlqNEBs47TmdWB3FJ9bG/S81fSWS22NOx98ISjUveQS8+4LQdft5/IWcc+9QydTMDRYJvNN12OVXQo1+KZrr93hLPAQkP5lFWo2DQ== 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)(3231023)(2400081)(944501161)(3002001)(10201501046)(93006095)(6041288)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(6072148)(201708071742011);SRVR:CY4PR07MB2902;BCL:0;PCL:0;RULEID:;SRVR:CY4PR07MB2902; X-Forefront-PRVS: 056297E276 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(7916004)(366004)(396003)(39860400002)(39380400002)(346002)(376002)(189003)(199004)(105586002)(8676002)(316002)(2950100002)(33716001)(6916009)(6496006)(97736004)(9686003)(6666003)(4326008)(25786009)(16586007)(52116002)(305945005)(42882006)(386003)(2906002)(54906003)(53546011)(7416002)(186003)(66066001)(68736007)(6246003)(229853002)(106356001)(76506005)(53936002)(58126008)(5009440100003)(6486002)(59450400001)(47776003)(1076002)(5660300001)(26005)(33896004)(50466002)(6116002)(7736002)(81166006)(72206003)(39060400002)(16526018)(81156014)(3846002)(478600001)(83506002)(23726003)(76176011)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR07MB2902;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A: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;CY4PR07MB2902;23:Q0BRxHiwynLN4p+G8GNgM4q3qqHJjtJAG059qqTkA?= =?us-ascii?Q?E5TgLYRv+Lhhh0Ijqg9SPRrAcuCd3yER0H5EMrjvd+H5kZGqQuXgdjA6Fuod?= =?us-ascii?Q?XRsDzoPE/xqqCrE2XTmKnD/6dH0/zUQXNeTkZereHmTF1BIa+5VkZZo3AvEF?= =?us-ascii?Q?tItj8TYPa8whj3NZHyHxIKOydrkhafl4ZfJzkcjmPQs9jpZ8SqirbYJLYmQN?= =?us-ascii?Q?4dT4Xp8J/q0S+EL4KUPMymLx9sux2eWQ7dHivDpjQ6BFzY94BHmWgXQyNtZq?= =?us-ascii?Q?Z0dUbO1vD3UsC2WUKIfmiwHquDZdtFDW1hXvCSvUtgNWKfhMDOUVVT6foPgE?= =?us-ascii?Q?8fBtgAeW2GXzUG3RLKP7KX5bd+kon6KMn5EjVzWZOUUl3ev4RJj8nGEMyaAi?= =?us-ascii?Q?4mTNX5ku4PCDVnejEhVv22iNi9eHnEcKZdBYdCjULPdcPReFo1UNKwSDGqMw?= =?us-ascii?Q?01aIhTanLV6XBrpOLn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us-ascii?Q?TmG6hMRd26KVP1tMsRZv+aLd7Jmemtz8DzbIXMbcXsGCMB1?= X-Microsoft-Exchange-Diagnostics: 1;CY4PR07MB2902;6:cM25P1U/WabhO5jKtwjqE8DEoDlnK/XbKOc6UzzSfisfkuh3HI2RWn+OIbz+kEdGlGirO+z0D5JouWkfWg2fTTm/7uMjehlKVnF88RRq3Y0HTmpSml/YqD6+XRbEwyjtjh8bFJUisAiH0LwtvoylRxlBdlR6jAyB//EE6loX5Lfs9E6gDTvKZfdPUtaQrwxjNkPvbpaOibDjFoqElCtN776T9r5YeZqD7N1YZ/IWVpQvqVmDf8u5BHWQwqtigdgZAgd2/p8SKiIrxFOHa4aw3nQtPTGamQ7A0YrmrFVz1P9y54zXHPKJ423PZJBS1b17fRHyBX61dk40VODS4AD9FDZr07DO00d+8MAFiT4lU88=;5:Z7hTCxmsc1GJoAOICgnaL38xdZxNaY6Pjm80c6gRLIhcj9gNcO9Gg4SSBxT/2WeJgFn6OEhX7GtFaQKC8gzWmhlFjxmJq1LBVJQrQPLRok8+Jjs5xev7+ulpMzXd6idWemicggJXVVr6+rmk+1xmR6sqwVFLP+aCh1Ty84liFk8=;24:svwE1REGjSpDrWSVP11lYjTj7sq5DD0kxHFaltSV65+SqA57wOZHqraq1+uVKEqvbfKeBpTyhlXa/0iFrujxwdGgAFoXy9VePqqoJXPAPKA=;7:7kXe6/gfwZjdMmGj457kChlTSUakzbVhHPMSKUEoVqcbc6neSf/xWS5B7oRNkrRI41Wn3nNGBADkTnd/VNS3EajQWIskGjLEDVX1y+mbh6rBRMq5xUaZaY/eaNE5lJRnOfq8hgUSSHz4Dv8Pbe0GlkFjsffnzkw7D1WNbJ9Mu8oXCrtSDZp2MzQLJWD/7MCSOer0RTyRRTMa57Tp4YPv8FXJgXG6yx8oa2WWrmnGT7sSq2Nkg1+B3p36mkND4FkN SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2018 18:20:07.1011 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 586a045e-9aa2-4f06-0c76-08d56357195c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB2902 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 24, 2018 at 02:00:42PM +0100, Geert Uytterhoeven wrote: > Hi Yury, > > On Wed, Jan 24, 2018 at 10:05 AM, Yury Norov wrote: > > Introduce __raw_writeo(), __raw_reado() and other arch-specific > > RW functions for 128-bit memory access, and enable it for arm64. > > > > 128-bit I/O is required for example by Octeon TX2 device to access > > some registers. According to Hardware Reference Manual: > > > > A 128-bit write to the OP_FREE0/1 registers frees a pointer into a > > given [...] pool. All other accesses to these registers (e.g. reads > > and 64-bit writes) are RAZ/WI. > > > > Starting from ARMv8.4, stp and ldp instructions become atomic, and > > API for 128-bit access would be helpful for core code. > > > > Signed-off-by: Yury Norov > > Thanks for your patch! > > > --- a/arch/Kconfig > > +++ b/arch/Kconfig > > @@ -116,6 +116,13 @@ config UPROBES > > managed by the kernel and kept transparent to the probed > > application. ) > > > > +config HAVE_128BIT_ACCESS > > + def_bool ARM64 > > I think it's better to select this symbol from arch/arm64/Kconfig instead. > Else this file has to be modified each and every time an architecture > adds support for 128-bit, causing conflicts. Shure, thanks. Yury > > + help > > + Architectures having 128-bit access require corresponding APIs, > > + like reado() and writeo(), which stands for reading and writing > > + the octet of bytes at once. > > + > > config HAVE_64BIT_ALIGNED_ACCESS > > def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS > > help > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds