Browse Source

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@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Mark Rutland 7 years ago
parent
commit
80d63bc39f
2 changed files with 2 additions and 10 deletions
  1. 1 5
      arch/arm64/kernel/sys.c
  2. 1 5
      arch/arm64/kernel/sys32.c

+ 1 - 5
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>
 };

+ 1 - 5
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>
 };