From patchwork Wed Sep 3 21:19:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 36658 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 14670202E4 for ; Wed, 3 Sep 2014 21:23:54 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf48200383oag.8 for ; Wed, 03 Sep 2014 14:23:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=oV9NdRJLC222/0MiBknHdVS+Fqqcntc0bZRspAY7CTM=; b=at/QHm7pqkuozHDaSz+odUXV4rfqD29v0aI1luWlpkpMUTEVsq72DAgpHW0zmO9diL IDa6/fMyWaWWuu56rBP0YuC7DkhDi6Jhr8qZDleS86mifmN08LtrvPGa7Mm2C/Uh7YTL Eb/ElS9/i0sGfnX0hF4KqVC3MQ74r8bRPIbVJOOLqQrWKtGEuyblibGtkPPnts9IS8AT LQ58WBc3h6VWwEW0HU18N+J6xJLleIsxzTwVT/XpLnA8d9HnQQtTsO2GqKwiMSkUl4ng 4oLJtt3Wlkq5VP8giFFGvdDqUnt4/V4S1EyzTnuM/189oF6kRl68XrPLK+jzx+GtmcVD uvMw== X-Gm-Message-State: ALoCoQkVNy9jQ3ka3SViUfskSfQAutYyKy8FmKfWPFFVMaEOfjJoBaiCAVNE8QIjOwL9cTiMyZ96 X-Received: by 10.50.153.98 with SMTP id vf2mr110839igb.5.1409779433684; Wed, 03 Sep 2014 14:23:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.98.212 with SMTP id o78ls19990qge.55.gmail; Wed, 03 Sep 2014 14:23:53 -0700 (PDT) X-Received: by 10.220.182.1 with SMTP id ca1mr9932vcb.21.1409779433552; Wed, 03 Sep 2014 14:23:53 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id qi14si1691639vdb.83.2014.09.03.14.23.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 14:23:53 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id ik5so9497847vcb.21 for ; Wed, 03 Sep 2014 14:23:53 -0700 (PDT) X-Received: by 10.52.3.40 with SMTP id 8mr84736vdz.24.1409779433458; Wed, 03 Sep 2014 14:23:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp740466vcb; Wed, 3 Sep 2014 14:23:52 -0700 (PDT) X-Received: by 10.70.126.9 with SMTP id mu9mr468894pdb.151.1409779432607; Wed, 03 Sep 2014 14:23:52 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kj7si13295294pab.163.2014.09.03.14.23.51 for ; Wed, 03 Sep 2014 14:23:52 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932850AbaICVXm (ORCPT + 26 others); Wed, 3 Sep 2014 17:23:42 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:50588 "EHLO mail-ie0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755946AbaICVXN (ORCPT ); Wed, 3 Sep 2014 17:23:13 -0400 Received: by mail-ie0-f169.google.com with SMTP id tr6so10574547ieb.0 for ; Wed, 03 Sep 2014 14:23:12 -0700 (PDT) X-Received: by 10.50.21.3 with SMTP id r3mr197898ige.13.1409779392440; Wed, 03 Sep 2014 14:23:12 -0700 (PDT) Received: from localhost.localdomain (64.2.3.195.ptr.us.xo.net. [64.2.3.195]) by mx.google.com with ESMTPSA id ig9sm6515653igb.13.2014.09.03.14.23.11 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 03 Sep 2014 14:23:12 -0700 (PDT) Received: from localhost.localdomain (apinskidesktop [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3/Debian-9.4) with ESMTP id s83LJQkW031107 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Wed, 3 Sep 2014 14:19:26 -0700 Received: (from apinski@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id s83LJQbi031106; Wed, 3 Sep 2014 14:19:26 -0700 From: Andrew Pinski To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, pinskia@gmail.com Cc: Andrew Pinski Subject: [PATCH 24/24] Add documentation about ARM64 ILP32 ABI Date: Wed, 3 Sep 2014 14:19:18 -0700 Message-Id: <1409779158-30963-25-git-send-email-apinski@cavium.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1409779158-30963-1-git-send-email-apinski@cavium.com> References: <1409779158-30963-1-git-send-email-apinski@cavium.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: apinski@cavium.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This adds the documentation about the ILP32 ABI and what is difference between it and the normal generic 32bit ABI. Signed-off-by: Andrew Pinski --- Documentation/arm64/ilp32.txt | 57 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 57 insertions(+), 0 deletions(-) create mode 100644 Documentation/arm64/ilp32.txt diff --git a/Documentation/arm64/ilp32.txt b/Documentation/arm64/ilp32.txt new file mode 100644 index 0000000..0863aa4 --- /dev/null +++ b/Documentation/arm64/ilp32.txt @@ -0,0 +1,57 @@ + ILP32 AARCH64 SYSCALL ABI + ===================== + +Author: Andrew Pinski +Date: May 23, 2014 + +This document describes the ILP32 syscall ABI and where it differs +from the generic linux syscall interface. +ILP32 sets __kernel_long_t and __kernel_ulong_t both to 64bit +(long long). This effects the following types: +* time_t: unsigned long long +* clock_t: unsigned long long +* fsword_t: long long +* suseconds_t: long long +* swblk_t: long long +* fd_mask_t: long long + +Some structures are changed to reduce the difference in the code path +for both ILP32 and LP64 ABIs for signal handling. + +The following structures have been changed so the layout of the structures are the same between ILP32 and LP64 ABIs. +* timespec: Uses time_t and suseconds_t +* timeval: Uses time_t and suseconds_t +* stat: Uses timespec/time_t. +* semid64_ds: Uses time_t. +* msqid64_ds: Uses time_t. +* shmid64_ds: Uses time_t. +* rt_sigframe: Uses siginfo and ucontext. +* siginfo_t: Uses clock_t and sigval_t +* ucontext: Uses stack_t and sigset_t +* stack_t: NOTE special handling inside the kernel is done to make sure + the pointers are zero extended +* sigval_t: Contains pointers +* sigevent: Uses sigval_t which causes it to be the same. Special + handing is needed for reading; in the mq_notify syscall +* sigaction: NOTE the userland structure inside glibc does + not match the kernel structure here (this causes issues with LTP). + Uses sigset_t. +* fd_set: This is done to avoid endian issues between ILP32 and LP64 + Also the syscall which uses fd_set uses timespec + + +Also the syscalls which normally would pass 64bit values as two +arguments; now pass the 64bit value as one argument. Also they have +been renamed (removing the 64 from the name) to avoid confusion. +The list of these syscalls: +* fcntl +* statfs +* fstatfs +* truncate +* ftruncate +* lseek +* sendfile +* newfstatat +* fstat +* mmap +* fadvise64