Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965504AbbLOVnK (ORCPT ); Tue, 15 Dec 2015 16:43:10 -0500 Received: from mail-bn1on0091.outbound.protection.outlook.com ([157.56.110.91]:7086 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754139AbbLOVnH (ORCPT ); Tue, 15 Dec 2015 16:43:07 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@caviumnetworks.com; From: Yury Norov To: , , , CC: , , , , , , , , , , , , , Subject: [RFC3 PATCH v6 00/20] ILP32 for ARM64 Date: Wed, 16 Dec 2015 00:42:26 +0300 Message-ID: <1450215766-14765-1-git-send-email-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.5.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [95.143.213.121] X-ClientProxiedBy: HE1PR01CA0035.eurprd01.prod.exchangelabs.com (25.163.2.173) To BY2PR07MB616.namprd07.prod.outlook.com (10.141.222.156) X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB616;2:t0c+cdG6UECGtXqRnXEGSczjmA7NQQgQZcuvA2mBkp2UWy544UMHRrId05sGR85XBqtUbaoDv4J3jegXphsuogQI1933FOtPMegVg2QSAcaohTDM6RNM6Lv4+73gBeVMJ2gBKaQzNfK8m6bfRho80g==;3:p7jpY6L2wgDgnFVKVCak0ifZG1e7IjXvlPc3kDfCdgDseYSZdEZXZOX0kXsNr1OXNHiwPe7y3gZfljFxuEiMEfs+Fy7uYvITX2oNXxJg8xmJfb2Sa/Lxkz3D8wd1Bu49;25:cXoxuWmGqIdpJFK581G5hAleMgJRKQKEurW9iy5p96EgQ+LOvWqL6ytWgm9X3IhXdg8LWkjW6rwXxViJiP5SgudadD1mkswivKwhJZdlK36U/8luH+jABYKeaoaEYyFEgk87fiWBJFiTCKh70P4R5QcyhccPVRODmdP0WawgjoGLw5sRe3w/oEV8Vmm5FsyQBJoX9ZQ899uX/oWt34vvVIr5bcO7pMO9fSpUsHbS41IKS0wRWHBYDaOoB5Y8jQXDgod2fPbYMWtPd/XWcY0e4w== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB616; X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB616;20:HZzbz7OH4D8cq1o3bVxsqbuxiiebUBAcnrgY4xz33i+8PaXKR2NQltdjv1Pfdk1O4qC/TkNbwKLM/y4fxJbxEXmo2FCrvdQPZ1GlyhwKuBEelFV/LL55EZ5MV1iq8cRZJ4NfCP/vBMCw3B/wrPxc6dtZdqdVdBOxc1zcE5s72F50Or1y5oUE7ndRnEb2p8hnzQuDfQqE4DHWJEK7GLgjqdpHFFbzqVlRKlBbxAqw4aw5hVWNkXHhdLlkvrERVpbUyKS0NKA1Adcm8pgdg2I6R3LysV1DUkf17HtRtsiT2gCe+khdewv2lmSgHwF9vgt7IsvbFsHIITGWEl0X3gtYrHQIjSqMLZ4FznHL9nTFt1A8bPrN+dWuI6CW60xY7XpihQBB3SSLhoykPJFEbfZSthhI7w7qA7r+XQeN/kIm/2cd/jjf0jlvOjO0WvhztJigpS08021TRgLpTK8sW+hhhgzeKDrh+q1fzpEipvndu0iMjMWYT0zRIpwZ+SHgqTlQCKFNYh4YtQzNIl1EwvVPgvpe28ae9ktoU5FtHqYVL4wnShz3E8Li54LBiaCp4JVBX2IGbqD9xBs3g6ceHGSn6vY+HbZLjE10zybZdGLes6s= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(10201501046)(3002001);SRVR:BY2PR07MB616;BCL:0;PCL:0;RULEID:;SRVR:BY2PR07MB616; X-Microsoft-Exchange-Diagnostics: 1;BY2PR07MB616;4:/T4uvl95ABVaCw+FLQs76XlOeSKeMMMLLi8HkqubJwlQSgnh7EV8DVobA0hQGgaKJAJAub17K2MbXYtiGrMS7hphxJXiODvKbSfp51thCEi99QgKizUqcckYhiP8/tSfrgsTY8VB0I1SImZb2kXHIZoxcuiKJsLNGjeYniPMuSWxJGyoDzpBWTkek61Lr+tHllBcyVkSE7zzCUK2mse5E6khb1nsyIFVyGQIEgxz7S8sQD8KxiZV/dywHmU204j/FrIdT8E5XHH+IZ4NFkvQwU2rKPcLLIwvPC5Q5r40V4nYZWM4SWOj7ulqsU0Pq0nCK8fls4cKO5tSV0Lzvumx0SvQZCmF7tdGZVV3z63DTdtH+aRSTwESmso1L5i7M8iz X-Forefront-PRVS: 07915F544A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(6009001)(189002)(199003)(5004730100002)(105586002)(122386002)(76506005)(106356001)(36756003)(81156007)(5001770100001)(189998001)(5001960100002)(92566002)(19580395003)(97736004)(15975445007)(48376002)(6116002)(77096005)(3846002)(33646002)(2201001)(50226001)(1096002)(101416001)(5008740100001)(66066001)(87976001)(42186005)(50986999)(5003940100001)(229853001)(40100003)(47776003)(50466002)(586003)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR07MB616;H:localhost;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR07MB616;23:6MdoaZlYaDh0ngilfnGAGpBJ+PlcnwcWB67VS36zxy?= =?us-ascii?Q?idO4HyXElXuh/tgwurUcd3Vc/4YUBKqLMLTqTP0/LTG8/q/7D1Wd6aQXC6Cl?= =?us-ascii?Q?4JTejEDjFdMulXzMbZGNg9Zssma7J1fwPeKLGZScKqUpJnxkGF5pTXTAbtYL?= =?us-ascii?Q?iLydSotLfaVqAyAD8QEUSnzmnqylMXBURF0OOyX9uVGEC8FqHJ1gkGSR28z8?= =?us-ascii?Q?VWBFitVluK9XDY4rUWsK6zadCxrADbYncvR8SRREhiaZ29ZqXnpOdxLPdGJp?= =?us-ascii?Q?STa53oU1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yw62M30ePClwlsyH/FkYddjZejfXJt1yvZJpACoJKVg==;24:U7lBPmQ5tJKZvhU4yhuLvE6f51Vm+D6XX43ibDtcVmNS02DA6VVYWkj/VjRB2CuEmtzKa93J1JfNbLo3wAil5KdzVLEDQKXB2W82qKtm8p0= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2015 21:43:04.2585 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR07MB616 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 6973 Lines: 140 This is still RFC because we have no glibc yet, that correspnds new ABI introduced here. And so we cannot run tests. LP64 and AARCH32 tests show no regression though. v3: https://lkml.org/lkml/2014/9/3/704 v4: https://lkml.org/lkml/2015/4/13/691 v5: https://lkml.org/lkml/2015/9/29/911 v6: - time_t, __kenel_off_t and other types turned to be 32-bit for compatibility reasons (after v5 discussion); - related changes applied to ILP32 syscall table and handlers; - ILP32 VDSO code excluded. It's not mandatory, and caused questions during review process. We definitely make sure we will follow up with a VDSO later on because it is needed for performance reasons; - fixed build issues with different combinations of AARCH32 / ILP32 enabling in config; - ILP32 TLS bug fixed; - entry32-common.S introduced to hold wrappers needed for both ILP32 and AARCH32_EL0; - documentation updated according to latest changes; - rebased to the current head; - coding style re-checked; - ILP32 syscall table turned around. rfc3: - all structures and system calls are just like AARCH32 ones now. with 2 exceptions: syscalls that take 64-bit parameter in 2 32-bit regosters are replaced with LP64 version; struct rt_sigframe is constructed both from LP64 and AARCH32 fields to be consistent with AARCH64 register set; - documentation rewritten accordingly; - common code for all 3 ABIs is moved to separated files for easy use, new headers and objects are introduced, incl: is_compat.h, thread_bits.h, signal_common.h, signal32_common.h. - ILP32 VDSO code restored, Nathans comments are addressed; - patch "arm64: ilp32: force IPC_64 in msgctl, shmctl, semctl" removed, as Arnd suggested general solution for IPC_64 problem. Andrew Pinski (9): arm64: ensure the kernel is compiled for LP64 arm64: rename COMPAT to AARCH32_EL0 in Kconfig arm64: change some CONFIG_COMPAT over to use CONFIG_AARCH32_EL0 instead arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 arm64:ilp32: share HWCAP between LP64 and ILP32 arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads arm64:ilp32: support core dump generation for ILP32 arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it arm64:ilp32: add ARM64_ILP32 to Kconfig Jan Dakinevich (1): arm64: ilp32: share aarch32 syscall wrappers to ilp32 Philipp Tomsich (2): arm64:ilp32: add vdso-ilp32 and use for signal return arm64:ilp32: change COMPAT_ELF_PLATFORM to report a a subplatform for ILP32 Yury Norov (8): arm64: ilp32: add documentation on the ILP32 ABI for ARM64 thread: move thread bits accessors to separated file arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat) arm64: ilp32: add is_ilp32_compat_{task,thread} and TIF_32BIT_AARCH64 arm64: signal: wrap struct ucontext, fp and lr with struct sigframe arm64: signal: move ilp32 and lp64 common code to separated file arm64: signal32: move ilp32 and aarch32 common code to separated file arm64: ilp32: introduce ilp32-specific handlers for sigframe Documentation/arm64/ilp32.txt | 17 +++ arch/arm64/Kconfig | 12 ++ arch/arm64/Makefile | 5 + arch/arm64/include/asm/compat.h | 19 +-- arch/arm64/include/asm/elf.h | 118 +++++++++++++++-- arch/arm64/include/asm/fpsimd.h | 2 +- arch/arm64/include/asm/hwcap.h | 12 +- arch/arm64/include/asm/is_compat.h | 86 +++++++++++++ arch/arm64/include/asm/memory.h | 3 +- arch/arm64/include/asm/processor.h | 16 ++- arch/arm64/include/asm/ptrace.h | 2 +- arch/arm64/include/asm/signal32.h | 6 +- arch/arm64/include/asm/signal32_common.h | 30 +++++ arch/arm64/include/asm/signal_common.h | 39 ++++++ arch/arm64/include/asm/signal_ilp32.h | 38 ++++++ arch/arm64/include/asm/thread_info.h | 3 +- arch/arm64/include/asm/unistd.h | 13 +- arch/arm64/include/asm/vdso.h | 4 + arch/arm64/include/uapi/asm/bitsperlong.h | 9 +- arch/arm64/kernel/Makefile | 11 +- arch/arm64/kernel/asm-offsets.c | 2 +- arch/arm64/kernel/entry.S | 18 ++- arch/arm64/kernel/entry32-common.S | 37 ++++++ arch/arm64/kernel/entry32.S | 29 ----- arch/arm64/kernel/entry_ilp32.S | 32 +++++ arch/arm64/kernel/head.S | 2 +- arch/arm64/kernel/hw_breakpoint.c | 6 +- arch/arm64/kernel/perf_regs.c | 2 +- arch/arm64/kernel/process.c | 5 +- arch/arm64/kernel/ptrace.c | 48 ++++--- arch/arm64/kernel/signal.c | 176 +++----------------------- arch/arm64/kernel/signal32.c | 85 ------------- arch/arm64/kernel/signal32_common.c | 116 +++++++++++++++++ arch/arm64/kernel/signal_common.c | 174 +++++++++++++++++++++++++ arch/arm64/kernel/signal_ilp32.c | 126 ++++++++++++++++++ arch/arm64/kernel/sys_ilp32.c | 77 +++++++++++ arch/arm64/kernel/traps.c | 5 +- arch/arm64/kernel/vdso-ilp32/.gitignore | 2 + arch/arm64/kernel/vdso-ilp32/Makefile | 72 +++++++++++ arch/arm64/kernel/vdso-ilp32/vdso-ilp32.S | 33 +++++ arch/arm64/kernel/vdso-ilp32/vdso-ilp32.lds.S | 95 ++++++++++++++ arch/arm64/kernel/vdso.c | 65 ++++++++-- include/linux/thread_bits.h | 57 +++++++++ include/linux/thread_info.h | 44 +------ 44 files changed, 1343 insertions(+), 410 deletions(-) create mode 100644 Documentation/arm64/ilp32.txt create mode 100644 arch/arm64/include/asm/is_compat.h create mode 100644 arch/arm64/include/asm/signal32_common.h create mode 100644 arch/arm64/include/asm/signal_common.h create mode 100644 arch/arm64/include/asm/signal_ilp32.h create mode 100644 arch/arm64/kernel/entry32-common.S create mode 100644 arch/arm64/kernel/entry_ilp32.S create mode 100644 arch/arm64/kernel/signal32_common.c create mode 100644 arch/arm64/kernel/signal_common.c create mode 100644 arch/arm64/kernel/signal_ilp32.c create mode 100644 arch/arm64/kernel/sys_ilp32.c create mode 100644 arch/arm64/kernel/vdso-ilp32/.gitignore create mode 100644 arch/arm64/kernel/vdso-ilp32/Makefile create mode 100644 arch/arm64/kernel/vdso-ilp32/vdso-ilp32.S create mode 100644 arch/arm64/kernel/vdso-ilp32/vdso-ilp32.lds.S create mode 100644 include/linux/thread_bits.h -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/