Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2075769imm; Thu, 24 May 2018 05:27:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoMxcqSqjQfDp2XdfRa5yQBwtaQJALlxslBW4Lh40kWb5nnb2yhhazDsC8OYAxvouJ7xIdh X-Received: by 2002:a63:9302:: with SMTP id b2-v6mr5819973pge.263.1527164840516; Thu, 24 May 2018 05:27:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527164840; cv=none; d=google.com; s=arc-20160816; b=BKZ2ZJJxc+iu2eilkLpAMtz2IXhD2gpb+z3+pg25uhuNoRsDLmyPKKlxaUaxaFW+kI WOEwxTobzgV5fbTqHoDf81BsUyf9x8PlmmkHi/nKZxmfTyo/5E1lwt9y6TiJYWg85cG+ JN9EbKzbQ03hggybNU/oCLixDQHYuLqciAucQWU9Ax6GZRTmbE+trd2OqDK0H6PZQvM0 7sMwDSaiDfGkS/W11Irjsf9NRI+0YEh3I1UIpDna57j0ObL5HHei0fgurT1xsCNwvYij 1x5+KJPSLGuWJP5yj4EWF4zNtwvxfZ8RaCHYnwIPH5YevsCLYTXyxFBp5s1UfCnutHOM nhWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:arc-authentication-results; bh=XT+fWGnh6VTEI3a8sbUKAdNq82SKYcdxnYQjX6Z3Dqo=; b=a9AZ39V2q65OwHIreOLfgJYDZr+xEDGbuI0+YxJ7EohGnlR4H7Lk44KBHRSWqIu/ln i8+jrrsQQFPiPO9/dYuxqAIIo6yCZUEBIJ/2wOE0196iaMg8M9y2AdPKKdWa0sb3jib5 E8/thbRO9lgMI0+I1CcyKXvSoCMZ/7XgQRVVHYfAg6NAth6mPlKBUJCPa1qeXoxRQU2S iQOZAJhfhQZ/WZmvNztgh73ufcceKMP0Johqqvy7jdWH8NYzX0T8+Z+AgQDjjUwC7gQO PORVO0eFKgid8NPVfuh+sNtWk0e2HV+x476BB/zEpUYF1fVJPHzEIh+t46NnHcQIWXDM Gv7w== ARC-Authentication-Results: i=1; mx.google.com; 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-v6si21435372pli.269.2018.05.24.05.27.06; Thu, 24 May 2018 05:27:20 -0700 (PDT) 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; 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 S1033243AbeEXMYi convert rfc822-to-8bit (ORCPT + 99 others); Thu, 24 May 2018 08:24:38 -0400 Received: from vegas.theobroma-systems.com ([144.76.126.164]:58507 "EHLO mail.theobroma-systems.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966142AbeEXMYe (ORCPT ); Thu, 24 May 2018 08:24:34 -0400 Received: from [86.59.122.178] (port=52587 helo=[10.4.9.36]) by mail.theobroma-systems.com with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fLpI5-0004ig-Fw; Thu, 24 May 2018 14:24:21 +0200 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [PATCH 07/24] arm64: ilp32: add documentation on the ILP32 ABI for ARM64 From: "Dr. Philipp Tomsich" In-Reply-To: <20180524121524.GA3873@yury-thinkpad> Date: Thu, 24 May 2018 14:24:19 +0200 Cc: Pavel Machek , Catalin Marinas , Arnd Bergmann , linux-arm-kernel , LKML , linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Adam Borowski , Alexander Graf , Alexey Klimov , Andreas Schwab , Andrew Pinski , Bamvor Zhangjian , Chris Metcalf , Christoph Muellner , Dave Martin , "David S . Miller" , Florian Weimer , Geert Uytterhoeven , Heiko Carstens , James Hogan , James Morse , Joseph Myers , Lin Yongting , Manuel Montezelo , Mark Brown , Martin Schwidefsky , Maxim Kuvyrkov , Nathan_Lynch , Prasun Kapoor , Ramana Radhakrishnan , Steve Ellcey , Szabolcs Nagy Content-Transfer-Encoding: 8BIT Message-Id: References: <20180516081910.10067-1-ynorov@caviumnetworks.com> <20180516081910.10067-8-ynorov@caviumnetworks.com> <20180523140620.GA27215@amd> <20180524121524.GA3873@yury-thinkpad> To: Yury Norov X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Yury & Pavel, > On 24 May 2018, at 14:15, Yury Norov wrote: > > Hi Pavel, > > On Wed, May 23, 2018 at 04:06:20PM +0200, Pavel Machek wrote: >> On Wed 2018-05-16 11:18:52, Yury Norov wrote: >>> Based on Andrew Pinski's patch-series. >>> >>> Signed-off-by: Yury Norov >> >> So Andrew's signoff should be here? > > Yes it should, but it lost since v4. I'll restore it. > >>> --- >>> Documentation/arm64/ilp32.txt | 45 +++++++++++++++++++++++++++++++++++ >>> 1 file changed, 45 insertions(+) >>> create mode 100644 Documentation/arm64/ilp32.txt >>> >>> diff --git a/Documentation/arm64/ilp32.txt b/Documentation/arm64/ilp32.txt >>> new file mode 100644 >>> index 000000000000..d0fd5109c4b2 >>> --- /dev/null >>> +++ b/Documentation/arm64/ilp32.txt >>> @@ -0,0 +1,45 @@ >>> +ILP32 AARCH64 SYSCALL ABI >>> +========================= >>> + >>> +This document describes the ILP32 syscall ABI and where it differs >>> +from the generic compat linux syscall interface. >> >> I was hoping to learn what ILP32 is / what is it good for, but no, >> this does not tell me... it would be good to do a short explanation >> here, and maybe reference it from cover letter of the series... >> Pavel > > ILP32 is ABI acronym that means "Integers, Longs and Pointers are 32-bit". > And LP64 means "Longs and Pointers are 64-bit”. Just a nitpick: ILP32 is in fact just the memory model, but calling from ILP32 code into the Linux kernel requires modifications to the syscall-ABI due to datastructure layout changing (every time a pointer or a ‘long’ is present in a structure). As such structures are passed between the userspace and the kernel (and also due to the fact that time_t is an ‘unsigned long’ in the C language standard), modifications to the syscall ABI in Linux are needed to support ILP32 processes calling into the kernel. Things get a bit more involved, as the final consensus was to pass 64bit quantities in the lower half of 2 64bit registers instead of as a single register: this makes the way (on AArch64) that an ILP32 process calls into the kernel more dissimilar from a LP64 process calling the same syscall. What this rambling boils down to is: “ILP32" is the memory model, whereas this series deals with the “Linux/AArch64 syscall ABI for ILP32 processes”. Thanks, Phil. > > There's AN490 - "ILP32 for AArch64 Whitepaper" from ARM which covers > the topic: > http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0490a/ar01s01.html > > And some talks: > http://connect.linaro.org/resource/bkk16/bkk16-305b/ > > Briefly, ILP32 is 32-bit ABI that works with AARCH64 instruction set. It looks > better in some performance tests, and is useful for compatibility with 32-bit > legacy code. > > If you're more familiar with x86 terminology, in ARM world LP64 corresponds > to x86_64, AARCH32_EL0 corresponds to x86_32, and ILP32 corresponds to x32 > ABI. > > I'll add link to AN490 in next submission. > > Yury > >> -- >> (english) http://www.livejournal.com/~pavelmachek >> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html