Received: by 10.223.176.46 with SMTP id f43csp719312wra; Wed, 24 Jan 2018 05:01:57 -0800 (PST) X-Google-Smtp-Source: AH8x227pRkm8deI2eLkgNC2Ol4/GEsEx0rrHwrDnQ789GiU7kjIpfDDB1F6n1hnN8V2/lJOhWpPy X-Received: by 10.98.24.22 with SMTP id 22mr13170600pfy.65.1516798917216; Wed, 24 Jan 2018 05:01:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516798917; cv=none; d=google.com; s=arc-20160816; b=SwNffXOzEa6H/aTAwKCmfYI+sjWYdkBfUEi9VGHoe1TSnrqKj0kDvYBO+6dV0VL2g+ YkF6m/a2yh1fmeLmNwa8k+XSgXHb7rr2hRZ+Wc76Dv5BUBW1QPEfqeUkw6il/kSwDDCC UYEEh+f1hX0OLU1ZSHtde0Tmw9rS6gci1BGEyrOG0OOaV640t2YNi9EfbWsLjJrFyxEK X39WWIzGC2BuvkvdIb2qaKYDBTCdj1P7MZTZHjEzhpNYeHe8cazHyG2y89gmQFbqMQ3J qjBFo5oIQYYbHZunySvh/NLk8HiMfz8NA67yRv320GIldLg+ZmuMggnTW+CSq5BAihYQ zBOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=n2aqck1g+8oyd3meNtm4L12LZLYZ+R8UW639btjZGBo=; b=shuIOA2qayTDP74Ukn5lflRdOtybm3E+Bk2Mt57x9nJMmTpJFC3vr7xXP2Z8RWwS7l 8BtTK8BO/+KjFBLq9xTjQRvLDTD0SRq9JfPBB5gQgvdq95p8lIqpS010RVHzTgew8lrl DRwuah4wVrciYUVs55B+qVtgt14eeA/7F7oSkYlNT+LdqqtwZ3ANn/pGPPX+yW7pZbLa vEoTam89k9uxbrKvV8VPq0/57jTAdwcVZODpTO4ziD7ID5uWk+u9blMP/wz/EgKYDhyB Ozpbjjt+ziL7DvbeENJSxPrn2eb4kHpscAF2gDWlAXaH2sV8cfccGJkr1iq7MkDOo2kh a7HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Fpvcj/1y; 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 d8si2892286pfh.93.2018.01.24.05.01.19; Wed, 24 Jan 2018 05:01:57 -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=fail header.i=@gmail.com header.s=20161025 header.b=Fpvcj/1y; 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 S933679AbeAXNAq (ORCPT + 99 others); Wed, 24 Jan 2018 08:00:46 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:38991 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933576AbeAXNAn (ORCPT ); Wed, 24 Jan 2018 08:00:43 -0500 Received: by mail-qt0-f194.google.com with SMTP id f4so9988354qtj.6; Wed, 24 Jan 2018 05:00:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=n2aqck1g+8oyd3meNtm4L12LZLYZ+R8UW639btjZGBo=; b=Fpvcj/1yQpCVHP5MPvRKMkFAiOq8fD8kPXwbeA4C5Lcly36P6EyY3lsnSjrs0IFXVj bG0aYLaR3AgMcaDw8nnSj58VzZjmWya5JIYkGXTJC350pTLbv0ufwOn0k1IBOjZDkeR8 XFKhX2I5PCFF6gHMDVL1TYWVSw3WEGAExFFFzjZfQWpfzDI94dca2wvJElSeCtpxK1q5 7SNJiksut0ObnIdxe/c39D8UXO7rxniTFPqNtbmVztD8gUEVR6JXx0GHP35zPoErGjxk iTLjx9WjRSxmKxUrL3VA7kJs6U0KqwkJeJnNL4DjNAr6GMw8PS2WDdMoJWkXA5FjAtoC D/+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=n2aqck1g+8oyd3meNtm4L12LZLYZ+R8UW639btjZGBo=; b=HQWK3jlOX96u4iBqP6Y5D5JT4CLow34pww5c6ONizfIlJuaMbF+OOFOyTzkX58KUIq e2C6ivcsHfMlxODmlyi8HInwuOnlSaGSRJZsX/ZKWMSeqhutLAUv1ax/ig3Ow24D0eTC H5nk5RPnducFD9Q7JMvo9zGpmJCmtZDIq06NBtp572cOPim5t5AYG8c7Ar+LYtoNpFK4 wRcZkXWRszZTGyL23wxqHWITpb+Pa8ALME5AoKvVVDBfh82y+6fx4mWpxrAcYzOXCNhQ vrNmHANNVwocE+B6s+ALM3ccNpPkT/DBdc26znMwlBIp4OqHVop1jFBOLe5ekaHSAMrc yfFA== X-Gm-Message-State: AKwxytcHfo7b0lV/EZ3HIZ/U/yz2EuK9GCE5KC/LdggXx6SvE28vZm9e OYpeZuT+GaBbLcyde6yPwgrANA3ZYGTsfjX7n0I= X-Received: by 10.55.197.20 with SMTP id p20mr9185052qki.337.1516798842760; Wed, 24 Jan 2018 05:00:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.45.161 with HTTP; Wed, 24 Jan 2018 05:00:42 -0800 (PST) In-Reply-To: <20180124090519.6680-4-ynorov@caviumnetworks.com> References: <20180124090519.6680-1-ynorov@caviumnetworks.com> <20180124090519.6680-4-ynorov@caviumnetworks.com> From: Geert Uytterhoeven Date: Wed, 24 Jan 2018 14:00:42 +0100 X-Google-Sender-Auth: jn1N35UJnIlD3hW-vNEC7r3FmL8 Message-ID: Subject: Re: [PATCH 3/3] arm64: enable 128-bit memory read/write support To: Yury Norov 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > + 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