From patchwork Wed Jul 11 13:56:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 141752 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp321799ljj; Wed, 11 Jul 2018 06:57:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpehUXnE63GwSAwfDLGDAhGGpVCgnMmF8hkUpjld5Luf9e8wHpYpP7ZG7fHT8kzk7VXpY0y3 X-Received: by 2002:a63:b256:: with SMTP id t22-v6mr27580447pgo.101.1531317478021; Wed, 11 Jul 2018 06:57:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531317478; cv=none; d=google.com; s=arc-20160816; b=B7dfAQFiqYfpAiW0t6jvB7FgKWqrFaf6+GUO2QENY+ph8vuJCtLFP6H7ZsocZMPcnl wJ9dRAwRBaf1k/UUoxorpmbSsqZ0QBgJEEYQB3j0HgptAjuMEYSM9mWOO5jlTcCHOAi7 WfHsV3DdKQLmsmDOo/+kK6NY+FV5w3Hv3j+Pt5QN45wPZu8I3tW0JUhny+uF6SmrGKQC Po0PXVOT38Jag9Y8eRsEgl+irTq3IH4QSzYKXKcAb1y3grm3HOhvj2Iw+VZP0mnevwmx SX1e7YIVNhxtbO+NtT7ZX8lQmI5T44qnJxmG/fo2eKIGEKCtSBUaBlBDyqKCKUQneWh6 /4gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=oG3sIR5CHO3tp+UNaooC7a/PJ9vjBOkp45B82Qxr54g=; b=Y7XoSg3sCJJMhaRQa9ttcLTyWjAoY2L5SQw/2Lb8ypyTrBYM+35l1Ezj1bvnirEnQX Te57p9XngzqRahgSa+3MPXwPKPf4C3rtanGL1WsAN/3TUHlX6D/jwgVe5v1y8z1Zmjmw R++rcR9nVXzFL13874uRHyuzIRJKrJ36excX7Eak2sFFyDthAgw788/lyZpYd6ZTVOjl fvh6Hxt+GKeomgAKSJzR0pWTa3H8yK9e4KIwF+p6Kl+h+yaZmnLwEoMtOv2EOmNPf7UE YdhXISWttdfv6Py36KJSbADhzT3PLKs68+1kiZeaEFVyymbC9vUgjoKLdmo9dCvjHvBy /6Zg== 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 w19-v6si19544479pfn.160.2018.07.11.06.57.57; Wed, 11 Jul 2018 06:57:58 -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 S2388551AbeGKOCX (ORCPT + 23 others); Wed, 11 Jul 2018 10:02:23 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:36436 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388274AbeGKOCW (ORCPT ); Wed, 11 Jul 2018 10:02:22 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7D2DE22C8; Wed, 11 Jul 2018 06:57:54 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 6CCB33F5B1; Wed, 11 Jul 2018 06:57:52 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, will.deacon@arm.com Cc: catalin.marinas@arm.com, dave.martin@arm.com, hch@infradead.org, james.morse@arm.com, linux@dominikbrodowski.net, linux-fsdevel@vger.kernel.org, marc.zyngier@arm.com, mark.rutland@arm.com, viro@zeniv.linux.org.uk Subject: [PATCHv5 14/21] arm64: drop alignment from syscall tables Date: Wed, 11 Jul 2018 14:56:49 +0100 Message-Id: <20180711135656.20670-15-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180711135656.20670-1-mark.rutland@arm.com> References: <20180711135656.20670-1-mark.rutland@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Our syscall tables are aligned to 4096 bytes, which allowed their addresses to be generated with a single adrp in entry.S. This has the unfortunate property of wasting space in .rodata for the necessary padding. Now that the address is generated by C code, we can rely on the compiler to do the right thing, and drop the alignemnt. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/kernel/sys.c | 6 +----- arch/arm64/kernel/sys32.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) -- 2.11.0 diff --git a/arch/arm64/kernel/sys.c b/arch/arm64/kernel/sys.c index 7f0907261269..df8180175515 100644 --- a/arch/arm64/kernel/sys.c +++ b/arch/arm64/kernel/sys.c @@ -56,11 +56,7 @@ asmlinkage long sys_rt_sigreturn(void); #undef __SYSCALL #define __SYSCALL(nr, sym) [nr] = (syscall_fn_t)sym, -/* - * The sys_call_table array must be 4K aligned to be accessible from - * kernel/entry.S. - */ -const syscall_fn_t sys_call_table[__NR_syscalls] __aligned(4096) = { +const syscall_fn_t sys_call_table[__NR_syscalls] = { [0 ... __NR_syscalls - 1] = (syscall_fn_t)sys_ni_syscall, #include }; diff --git a/arch/arm64/kernel/sys32.c b/arch/arm64/kernel/sys32.c index d993214118aa..4ddeaae90128 100644 --- a/arch/arm64/kernel/sys32.c +++ b/arch/arm64/kernel/sys32.c @@ -44,11 +44,7 @@ asmlinkage long compat_sys_mmap2_wrapper(void); #undef __SYSCALL #define __SYSCALL(nr, sym) [nr] = (syscall_fn_t)sym, -/* - * The sys_call_table array must be 4K aligned to be accessible from - * kernel/entry.S. - */ -const syscall_fn_t compat_sys_call_table[__NR_compat_syscalls] __aligned(4096) = { +const syscall_fn_t compat_sys_call_table[__NR_compat_syscalls] = { [0 ... __NR_compat_syscalls - 1] = (syscall_fn_t)sys_ni_syscall, #include };