[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180711135656.20670-15-mark.rutland@arm.com>
Date: Wed, 11 Jul 2018 14:56:49 +0100
From: Mark Rutland <mark.rutland@....com>
To: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
will.deacon@....com
Cc: catalin.marinas@....com, dave.martin@....com, hch@...radead.org,
james.morse@....com, linux@...inikbrodowski.net,
linux-fsdevel@...r.kernel.org, marc.zyngier@....com,
mark.rutland@....com, viro@...iv.linux.org.uk
Subject: [PATCHv5 14/21] arm64: drop alignment from syscall tables
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 <mark.rutland@....com>
Cc: Catalin Marinas <catalin.marinas@....com>
Cc: Will Deacon <will.deacon@....com>
---
arch/arm64/kernel/sys.c | 6 +-----
arch/arm64/kernel/sys32.c | 6 +-----
2 files changed, 2 insertions(+), 10 deletions(-)
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 <asm/unistd.h>
};
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 <asm/unistd32.h>
};
--
2.11.0
Powered by blists - more mailing lists