From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: ARC-Seal: i=1; a=rsa-sha256; t=1516798843; cv=none; d=google.com; s=arc-20160816; b=FAOfjL6ydalFRw/ifZsNcUYGnmpPZA/3zmvOyQAr6WBHGSzTxx/MeyRLJk4zBuM3Pe 8PLhpmPOD+yyyq0iYWHf47ut97HkdjAC9h6Ex19rjvnMp54Dfa01HCGeRZfORlRyqiNO NqoEX5B0TPhPF6PcX3E5GPHETNmFRnTkTmEy+p1tw/CqOEy9BWCGc29p5VDpA44DfhKm m508lM7RXRQ5+/a0kMmgnElPoln0WxXaG5OS6RxJyMmUolG1OV3E8C4sFO3hxf1rKQbK MLrndSlLDW9Z66wE4dTv3RJ+NrAtmDMz3M/GNtEtt1bALHEB45F04enx5uEDkJp14ZpJ 1mog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:references:in-reply-to:sender :mime-version:dkim-signature:arc-authentication-results; bh=n2aqck1g+8oyd3meNtm4L12LZLYZ+R8UW639btjZGBo=; b=Fy2+ri8QRbp6u7vZMqQP8IpLDrEFlHh6a6thMdK3w2DSzExjD7UuYCe+cwCE45U7GB kFp52QzyHRWm6jggCZWZxoNOsEBYv8ih6/Gy8lJGERAVLQ8SUyxc+raKXFyIZOcDY6xA ladeJDfbvi3EqevbYDr7mYXV/p2WHoQqzOasaRm35YvZCL4TGNjuCh1kFrw6GWAFcbVd FLow5LRcqKNR5KElkFVe6Q05XCUmbewyfo63Lq7ndsdcQOYbfO3stkBmZhGYNm/bCR2R WGqp/lqFTK/+V1sIZyhkDDNEXl/mxBuSYism/Ur9gpDu63c0Lje7887550841teZadiF D3tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fpvcj/1y; spf=pass (google.com: domain of geert.uytterhoeven@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=geert.uytterhoeven@gmail.com Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fpvcj/1y; spf=pass (google.com: domain of geert.uytterhoeven@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=geert.uytterhoeven@gmail.com X-Google-Smtp-Source: AH8x2262GP0Pi2ENqB7yTkRKI7fwyjhTo5U7QjzSllw0hTxKsOwCFPGBqKzbcFduKdUJFQvoenfexOXYxpBfbjQSZ6A= MIME-Version: 1.0 Sender: geert.uytterhoeven@gmail.com 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" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1590464117093502608?= X-GMAIL-MSGID: =?utf-8?q?1590478863999340328?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 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