From patchwork Tue Nov 17 21:16:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 7642191 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 17029BF90C for ; Tue, 17 Nov 2015 21:20:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2056120523 for ; Tue, 17 Nov 2015 21:20:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1663C2051F for ; Tue, 17 Nov 2015 21:20:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZyndY-000696-Ct; Tue, 17 Nov 2015 21:18:00 +0000 Received: from mail-by2on0079.outbound.protection.outlook.com ([207.46.100.79] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZyndU-00063z-GE for linux-arm-kernel@lists.infradead.org; Tue, 17 Nov 2015 21:17:57 +0000 Received: from DM2PR07MB622.namprd07.prod.outlook.com (10.141.177.146) by DM2PR07MB381.namprd07.prod.outlook.com (10.141.102.148) with Microsoft SMTP Server (TLS) id 15.1.325.17; Tue, 17 Nov 2015 21:17:35 +0000 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; Received: from localhost (95.143.213.120) by DM2PR07MB622.namprd07.prod.outlook.com (10.141.177.146) with Microsoft SMTP Server (TLS) id 15.1.325.17; Tue, 17 Nov 2015 21:17:33 +0000 From: Yury Norov To: , , , Subject: [PATCH v6 01/19] arm64:ilp32: add documentation on the ILP32 ABI for ARM64 Date: Wed, 18 Nov 2015 00:16:41 +0300 Message-ID: <1447795019-30176-2-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> References: <1447795019-30176-1-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [95.143.213.120] X-ClientProxiedBy: HE1PR03CA0019.eurprd03.prod.outlook.com (25.163.170.157) To DM2PR07MB622.namprd07.prod.outlook.com (10.141.177.146) X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB622; 2:WuH6u07rGc5WLEFvxihCLFwDp452HpdXkJAKFKCMvuZof4yHFRycwNJdHKCP9eFxPDc52kmk3LUwonXgJ/rO3vBjnOOHodzjAZx5T6vXYieNYZ4E4LOT/hWIB1el5OSp4J17yrWHum7yH3haYtTp6+BX4RIVzD1Yu1be6pn44k0=; 3:fLikpH4gZ7e4mIUa0DvrbldknRRvxrcjpSnUFbKIWMbcHtA1QvrgLFSi+vpBFrOQqloeNC53tLD6bo9KdZR9mVr/mBwvafJveb4xtHWXnebYSmY6SV4pSqQGr6xho3Ll0timn1iDuWb/VraswsBMZQ==; 25:UixkxergtQP3J2G8UhjYJfgr8dfdAuE7F8i2hFaEtaRBQ4TUh299Crb0FCbqz9qBoUXpT1ukF8nBWFJQ7+8R7Env36ChBTdKbEmFva6te2jC/k3r3Kii0GF7V7osMReO0kT7klsOdogwYCQ/GWF983HakeoNETEEZ/N7hZBErvS4alWM8CJ+JdEni2DfLArnLFWl50kW1J9zfpbv1nG0S+bFURnD0mR5Ihu7wPNSrIwxAPiFA5Wkr1C5MCEHViBw X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR07MB622; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB622; 20:LuffgxZCgq9HwAojEpm1MYck8t06ZTt848dIM6uZ8SIUAoiih+nT4pDR0Mks2eoMmDdWX6Kh6l2aQoirpbhGBokUmNFQFH3q+cL3c9IyeyxAAzJ4Gsa3RxcnfGWGasBK3yHmIHVpXKsUneUOP6eLcri654w5V2E28x9orCue4ZoAkWHPrlwjnACPCI9l9VxOAMs+3vk6WIg45Dj+nZSXK5b7g39OjsVlALqKxvqTrpgNZOsyfloiWgNT613AHh2w8VymEZ4vhaEUOCVDDIAOxEfUJBD//5iZCDgUgi+YlR0XtiXLPfGWwOilEXuY6IuJGlX36UTNZoRsLngdR1XMOIt8bD+H1j0GwGYgnPFHrKR1m8DHIkHGs8BHk87xD7pVl7C1q0/Za3mU7pNQpheEkz3N2CeYs3El58RXHEa409gFdoOelNmRhCTKJEysrgO1fBGYuE1PUU/7t21x/8Nc25cfAfGd6pcCMMekWbyoppzDCak6aLc7UwSW1HPSoTLZJguGSpxW1ekIYc6PxaS4mPrqN6PyghMKpJ+h19z/eOu8xR1Sp97ybnJgSxe7TP4G05LXQnCLTnpMaW3LY90Pp6KOHk4SGJJjvDxRr8mr0qU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(3002001)(10201501046); SRVR:DM2PR07MB622; BCL:0; PCL:0; RULEID:; SRVR:DM2PR07MB622; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB622; 4:pLUpBZwZ+ePspx+sUiyg697C/4EgLRCVMWpRLRyWMmiRn7ie8IwG1z5soMOI6zkB5sBRB/zU7iEDTtUznSDZGLNZi3B3AQwW7nrRhovNMKmop2lYTSgr/fxE3zlCsMLD4z5lZasKNiIjldOCPyAr+b7Mf0o4tyqakP/Kg6abFV1sG+V4GMyqAPEysbY8WuGeowRbDEJcx8h4AZohcjEp7ryZwXF9i/buPsGpvBwRoiJB7pIq9RYXJTjtbMNScZ+OWXtTkEM1tKe/PDtP6n7mZ541xnqSFj74/D+A40AriOhEilzKmRGYE6BHlITyjq3OMvQxcgal47vI5BuTrG0MQ9OI4/CUran62Bg1gKnAJUvRBqt2MSHyBkwrHs64zlA3 X-Forefront-PRVS: 07630F72AD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(199003)(189002)(92566002)(50986999)(2201001)(106356001)(105586002)(50226001)(229853001)(5008740100001)(5003940100001)(33646002)(101416001)(50466002)(76176999)(40100003)(2950100001)(97736004)(36756003)(47776003)(107886002)(81156007)(586003)(5001770100001)(48376002)(122386002)(19580395003)(5001920100001)(76506005)(5004730100002)(19580405001)(66066001)(87976001)(5001960100002)(4001430100002)(42186005)(5007970100001)(77096005)(189998001)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB622; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR07MB622; 23:ig2iUue2UivK8Z52wY/0mhZ+CpOcJ90a/Zqb2UNA/x?= =?us-ascii?Q?E2xDT5H6W1+4y8b41YnMoOra7hKbVDX07hgG+EkHYr1RoaU5Lz1EwwDAqI/w?= =?us-ascii?Q?pi0xD5Xx4u0JqATg8ggA9nB+hT0ITlrmoz/Gm06N/xKBYOEWyfEnQviBCewH?= =?us-ascii?Q?dcZMtRnVP5qoHyk0Q1jfsMJ3Ow7nyaEABgUK3IARoigeYOXaipDdfjqfVtFo?= =?us-ascii?Q?sJ0/VD4Jfr0hOCnbQTk6A+jR26zmL2sTC+JcLX7JmG++eupXxZUU6D6OCV3F?= =?us-ascii?Q?YV+1ruBVV/OuDR52HGJJZm7awB/YUz9vtZLKKVVtvjkCwLQzJ5xPwT5Tz+WB?= =?us-ascii?Q?awCAVDXC2hfLAHolUffOKtJ0XbwJlIvkPhRgqp7UBpGkwWCSWY10eT3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ydjosh1k7upGA1uVDO6KW0VK3+6tPbS6YA7zLv2jidL9gdI1RPA==; 24:cW+jiAGI3XfVs05Ld5MV3/+NPDt76O6+V1UEVly65UFPRpSe8nEJ1VrxKfJWRTOpibYF0K3KHFjqcjxhLLEe0LyzQe0UhfNwnqV4oBZgCGI=; 20:OLBZu5FJRY4WhvmkNYfiCktlIEC8T1WGnbCULfRwbwHzm/wFfx92k/2wp5HxG4FU20NQSVbXxFGhIY2t4BqZ+Q== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2015 21:17:33.9258 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB622 X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB381; 2:2lZ0lD6q0SQ0uUqbYEl8YSGwn0MCyGPgum/2mWYiSw/rkahX5hdZk2/iXSHRAIgZaRK41yMpgE0TIdA0ubi6spOMKvdsb29OR1gY4+qedCYfbBZqUVkpIiVpxnSujMXgSRXxZKnTFafz9j/gJlraPVJWAd+KMsUElAB90yLVe58=; 23:6cGSWNuka42IDwhtWVSSHJYZmFtKIV/yLoBNT2+rdtBfM9nxPze2CY6to3QOyoyO779vUv9u+/KDpRnWIYfE+LoFwP9vwgFBNr+y/2ujRGjxxdOGjDPE6zAqfTYDBPlagWqnADD7xG++eq0OjIpdu3MjG36eElOhL82Fw7NnMvUfAkAZjVtRnyadTVcvBrcc X-OriginatorOrg: caviumnetworks.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151117_131756_657638_C4725605 X-CRM114-Status: GOOD ( 11.16 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pinskia@gmail.com, Prasun.Kapoor@caviumnetworks.com, schwab@suse.de, Nathan_Lynch@mentor.com, agraf@suse.de, klimov.linux@gmail.com, broonie@kernel.org, jan.dakinevich@gmail.com, Yury Norov , ddaney.cavm@gmail.com, bamvor.zhangjian@huawei.com, philipp.tomsich@theobroma-systems.com, andrey.konovalov@linaro.org, joseph@codesourcery.com, christoph.muellner@theobroma-systems.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Philipp Tomsich Based on Andrew Pinski's original patch-series and adapted with changes to reduce the duplication of code-paths and resolve issue found during LTP testing. Reviewed-by: David Daney Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Signed-off-by: Andrew Pinski --- Documentation/arm64/ilp32.txt | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 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 0000000..93c09f2 --- /dev/null +++ b/Documentation/arm64/ilp32.txt @@ -0,0 +1,47 @@ +ILP32 AARCH64 SYSCALL ABI +========================= +Written by Andrew Pinski +Updated by Philipp Tomsich +Updated by Yury Norov + + +This document describes the ILP32 syscall ABI and where it differs +from the generic linux syscall interface. + +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, including: + * 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 Conversion is handled in the userland (glibc), as the + userland data structures are defined in glibc anyway. + +A number of structures differ between ILP32 and LP64, including: + * 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 + * fd_set This is done to avoid endian issues between ILP32 and + LP64. Syscalls consuming fd_set use timespec. + * struct msgbuf The specification of 'struct msgbuf' defines the 'mtype' + field as a 'long' (i.e. 32bit for ILP32, but 64bit for + LP64). Functions that operate on 'struct msgbuf' need + to be passed through the compat-syscalls to resolve + this. + * stack_t contains pointers (handled in the compatibility layer) + +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 LP64 syscalls reused by ILP32 clients, and syscalls having +ILP32-specific handlers is in arch/arm64/kernel/sys_ilp32.c +