From patchwork Sat May 24 07:02:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 30885 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 9D1362066E for ; Sat, 24 May 2014 07:10:42 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf28491970oag.8 for ; Sat, 24 May 2014 00:10:42 -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:to:to:to:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=qroJr8A7/DFR888naupqwNKVTIql/4NhsX6yxqKX4Hk=; b=iUKmQj5BShge3kqPoj9hw994ydFfiE2vA3WV0BHOY4hNQOd8ayzRp0bw/LGGwDYbuV oB8RHmdU9AoIaqJYBn/zEY1AXUEJP/haf0qlq1ejoo8oXfkKcFEIMsbn+hTps7w339xP sMgN31uYvS9rGGt9pKI+KBwk1QVdB8/PCSylppZtreAJ9fiRP0QVKDlHELSCEoxy2qx8 Ngc/nXUQxXgIITNAYymiLJ9ekDNdb5LjOzgQQPWfhprfMQGbdN73OWzTrXIFmPhAt+Ay w5zmoWAEroc3OFI7iR9Is/R6wQusjPHzW+GfUtAf6f/Gt0lEo5uaArBLLD1GUTi8bv53 NOzg== X-Gm-Message-State: ALoCoQnk/f5xHY7osRFcCeoICp23p6+6pwPdWOx3u1Cnf3Lhx1UXuozF2DbDtkGovBAdgZa36vjv X-Received: by 10.50.225.4 with SMTP id rg4mr3794020igc.1.1400915442113; Sat, 24 May 2014 00:10:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.35 with SMTP id d32ls2121369qga.87.gmail; Sat, 24 May 2014 00:10:42 -0700 (PDT) X-Received: by 10.220.133.197 with SMTP id g5mr8610036vct.20.1400915442029; Sat, 24 May 2014 00:10:42 -0700 (PDT) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id jv10si3066569veb.79.2014.05.24.00.10.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 24 May 2014 00:10:42 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id im17so7194078vcb.24 for ; Sat, 24 May 2014 00:10:42 -0700 (PDT) X-Received: by 10.52.173.165 with SMTP id bl5mr7154514vdc.13.1400915441957; Sat, 24 May 2014 00:10:41 -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.220.221.72 with SMTP id ib8csp87764vcb; Sat, 24 May 2014 00:10:41 -0700 (PDT) X-Received: by 10.66.122.208 with SMTP id lu16mr10782374pab.129.1400915441198; Sat, 24 May 2014 00:10:41 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qs6si6875881pbc.21.2014.05.24.00.10.40 for ; Sat, 24 May 2014 00:10:40 -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 S1751830AbaEXHKb (ORCPT + 27 others); Sat, 24 May 2014 03:10:31 -0400 Received: from mail-ie0-f182.google.com ([209.85.223.182]:44479 "EHLO mail-ie0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751441AbaEXHJ2 (ORCPT ); Sat, 24 May 2014 03:09:28 -0400 Received: by mail-ie0-f182.google.com with SMTP id as1so5998366iec.27 for ; Sat, 24 May 2014 00:09:27 -0700 (PDT) X-Received: by 10.50.78.201 with SMTP id d9mr9992528igx.17.1400915367800; Sat, 24 May 2014 00:09:27 -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 qh3sm10016919igb.17.2014.05.24.00.09.27 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 24 May 2014 00:09:27 -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 s4O72Ns6009840 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Sat, 24 May 2014 00:02:23 -0700 Received: (from apinski@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id s4O72Nop009839; Sat, 24 May 2014 00:02:23 -0700 From: Andrew Pinski To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Andrew Pinski Subject: [PATCH 24/24] Add documentation about ARM64 ILP32 ABI. Date: Sat, 24 May 2014 00:02:19 -0700 Message-Id: <1400914939-9708-25-git-send-email-apinski@cavium.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1400914939-9708-1-git-send-email-apinski@cavium.com> References: <1400914939-9708-1-git-send-email-apinski@cavium.com> To: linux-arm-kernel@lists.infradead.org To: linux-kernel@vger.kernel.org To: linux-doc@vger.kernel.org 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.179 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. Thanks, Andrew Pinski 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..5be0613 --- /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