diff options
Diffstat (limited to 'arch/powerpc/kernel/setup_64.c')
-rw-r--r-- | arch/powerpc/kernel/setup_64.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 9cdf294e76f6..721adeea601d 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c | |||
@@ -702,6 +702,17 @@ static void __init emergency_stack_init(void) | |||
702 | limit)) + PAGE_SIZE; | 702 | limit)) + PAGE_SIZE; |
703 | } | 703 | } |
704 | 704 | ||
705 | extern unsigned long *sys_call_table; | ||
706 | extern unsigned long sys_ni_syscall; | ||
707 | #ifdef CONFIG_PPC_MERGE | ||
708 | #define SYS_CALL_ENTRY64(i) sys_call_table[(i) * 2] | ||
709 | #define SYS_CALL_ENTRY32(i) sys_call_table[(i) * 2 + 1] | ||
710 | #else | ||
711 | extern unsigned long *sys_call_table32; | ||
712 | #define SYS_CALL_ENTRY64(i) sys_call_table[(i)] | ||
713 | #define SYS_CALL_ENTRY32(i) sys_call_table32[(i)] | ||
714 | #endif | ||
715 | |||
705 | /* | 716 | /* |
706 | * Called from setup_arch to initialize the bitmap of available | 717 | * Called from setup_arch to initialize the bitmap of available |
707 | * syscalls in the systemcfg page | 718 | * syscalls in the systemcfg page |
@@ -709,17 +720,14 @@ static void __init emergency_stack_init(void) | |||
709 | void __init setup_syscall_map(void) | 720 | void __init setup_syscall_map(void) |
710 | { | 721 | { |
711 | unsigned int i, count64 = 0, count32 = 0; | 722 | unsigned int i, count64 = 0, count32 = 0; |
712 | extern unsigned long *sys_call_table; | ||
713 | extern unsigned long sys_ni_syscall; | ||
714 | |||
715 | 723 | ||
716 | for (i = 0; i < __NR_syscalls; i++) { | 724 | for (i = 0; i < __NR_syscalls; i++) { |
717 | if (sys_call_table[i*2] != sys_ni_syscall) { | 725 | if (SYS_CALL_ENTRY64(i) != sys_ni_syscall) { |
718 | count64++; | 726 | count64++; |
719 | systemcfg->syscall_map_64[i >> 5] |= | 727 | systemcfg->syscall_map_64[i >> 5] |= |
720 | 0x80000000UL >> (i & 0x1f); | 728 | 0x80000000UL >> (i & 0x1f); |
721 | } | 729 | } |
722 | if (sys_call_table[i*2+1] != sys_ni_syscall) { | 730 | if (SYS_CALL_ENTRY32(i) != sys_ni_syscall) { |
723 | count32++; | 731 | count32++; |
724 | systemcfg->syscall_map_32[i >> 5] |= | 732 | systemcfg->syscall_map_32[i >> 5] |= |
725 | 0x80000000UL >> (i & 0x1f); | 733 | 0x80000000UL >> (i & 0x1f); |