aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/entry-common.S
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-01-19 07:57:01 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-19 07:57:01 -0500
commitfa1b4f91d6374663cfb3c6fbe3d78fd03954a862 (patch)
treec6077f4558d2e1bd6b874931c026e02eb743f656 /arch/arm/kernel/entry-common.S
parentea49772598563447b70042ab8e087b2c4d599778 (diff)
[ARM] safer handling of syscall table padding
ARM entry-common.S needs to know syscall table size; in itself that would not be a problem, but there's an additional constraint - some of the instructions using it want a constant that would be a multiple of 4. So we have to pad syscall table with sys_ni_syscall and that's where the trouble begins. .rept pseudo-op wants a constant expression for number of repetitions and subtraction of two labels (before and after syscall table) doesn't always get simplified to constant early enough for .rept. If labels end up in different frags, we lose. And while the frag size is large enough (slightly below 4Kb), the syscall table is about 1/3 of that. We used to get away with that, but the recent changes had been enough to trigger the breakage. Proper fix is simple: have a macro (CALL(x)) to populate the table instead of using explicit .long x and the first time we include calls.S have it defined to .equ NR_syscalls,NR_syscalls+1. Then we can find the proper amount of padding on the first inclusion simply by looking at NR_syscalls at that time. And that will be constant, no matter what. Moreover, the same trick kills the need of having an estimate of padded NR_syscalls - it will be calculated for free at the same time. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/entry-common.S')
-rw-r--r--arch/arm/kernel/entry-common.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 2b92ce85f97f..dbcb11a31f78 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -87,7 +87,11 @@ ENTRY(ret_from_fork)
87 b ret_slow_syscall 87 b ret_slow_syscall
88 88
89 89
90 .equ NR_syscalls,0
91#define CALL(x) .equ NR_syscalls,NR_syscalls+1
90#include "calls.S" 92#include "calls.S"
93#undef CALL
94#define CALL(x) .long x
91 95
92/*============================================================================= 96/*=============================================================================
93 * SWI handler 97 * SWI handler