diff options
Diffstat (limited to 'arch/sparc/kernel')
| -rw-r--r-- | arch/sparc/kernel/apc.c | 42 | ||||
| -rw-r--r-- | arch/sparc/kernel/asm-offsets.c | 12 | ||||
| -rw-r--r-- | arch/sparc/kernel/ebus.c | 9 | ||||
| -rw-r--r-- | arch/sparc/kernel/entry.S | 17 | ||||
| -rw-r--r-- | arch/sparc/kernel/etrap.S | 1 | ||||
| -rw-r--r-- | arch/sparc/kernel/head.S | 2 | ||||
| -rw-r--r-- | arch/sparc/kernel/idprom.c | 2 | ||||
| -rw-r--r-- | arch/sparc/kernel/ioport.c | 13 | ||||
| -rw-r--r-- | arch/sparc/kernel/irq.c | 2 | ||||
| -rw-r--r-- | arch/sparc/kernel/process.c | 14 | ||||
| -rw-r--r-- | arch/sparc/kernel/ptrace.c | 26 | ||||
| -rw-r--r-- | arch/sparc/kernel/rtrap.S | 7 | ||||
| -rw-r--r-- | arch/sparc/kernel/setup.c | 4 | ||||
| -rw-r--r-- | arch/sparc/kernel/signal.c | 16 | ||||
| -rw-r--r-- | arch/sparc/kernel/smp.c | 7 | ||||
| -rw-r--r-- | arch/sparc/kernel/sun4c_irq.c | 3 | ||||
| -rw-r--r-- | arch/sparc/kernel/sun4d_irq.c | 7 | ||||
| -rw-r--r-- | arch/sparc/kernel/sun4m_irq.c | 7 | ||||
| -rw-r--r-- | arch/sparc/kernel/sun4m_smp.c | 9 | ||||
| -rw-r--r-- | arch/sparc/kernel/sys_sparc.c | 2 | ||||
| -rw-r--r-- | arch/sparc/kernel/systbls.S | 3 | ||||
| -rw-r--r-- | arch/sparc/kernel/time.c | 4 | ||||
| -rw-r--r-- | arch/sparc/kernel/traps.c | 16 | ||||
| -rw-r--r-- | arch/sparc/kernel/wof.S | 1 | ||||
| -rw-r--r-- | arch/sparc/kernel/wuf.S | 1 |
25 files changed, 117 insertions, 110 deletions
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c index 6707422c9847..5267d48fb2c6 100644 --- a/arch/sparc/kernel/apc.c +++ b/arch/sparc/kernel/apc.c | |||
| @@ -56,7 +56,7 @@ __setup("apc=", apc_setup); | |||
| 56 | * CPU idle callback function | 56 | * CPU idle callback function |
| 57 | * See .../arch/sparc/kernel/process.c | 57 | * See .../arch/sparc/kernel/process.c |
| 58 | */ | 58 | */ |
| 59 | void apc_swift_idle(void) | 59 | static void apc_swift_idle(void) |
| 60 | { | 60 | { |
| 61 | #ifdef APC_DEBUG_LED | 61 | #ifdef APC_DEBUG_LED |
| 62 | set_auxio(0x00, AUXIO_LED); | 62 | set_auxio(0x00, AUXIO_LED); |
| @@ -85,54 +85,70 @@ static int apc_release(struct inode *inode, struct file *f) | |||
| 85 | return 0; | 85 | return 0; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | static int apc_ioctl(struct inode *inode, struct file *f, | 88 | static long apc_ioctl(struct file *f, unsigned int cmd, unsigned long __arg) |
| 89 | unsigned int cmd, unsigned long __arg) | ||
| 90 | { | 89 | { |
| 91 | __u8 inarg, __user *arg; | 90 | __u8 inarg, __user *arg; |
| 92 | 91 | ||
| 93 | arg = (__u8 __user *) __arg; | 92 | arg = (__u8 __user *) __arg; |
| 93 | |||
| 94 | lock_kernel(); | ||
| 95 | |||
| 94 | switch (cmd) { | 96 | switch (cmd) { |
| 95 | case APCIOCGFANCTL: | 97 | case APCIOCGFANCTL: |
| 96 | if (put_user(apc_readb(APC_FANCTL_REG) & APC_REGMASK, arg)) | 98 | if (put_user(apc_readb(APC_FANCTL_REG) & APC_REGMASK, arg)) { |
| 97 | return -EFAULT; | 99 | unlock_kernel(); |
| 100 | return -EFAULT; | ||
| 101 | } | ||
| 98 | break; | 102 | break; |
| 99 | 103 | ||
| 100 | case APCIOCGCPWR: | 104 | case APCIOCGCPWR: |
| 101 | if (put_user(apc_readb(APC_CPOWER_REG) & APC_REGMASK, arg)) | 105 | if (put_user(apc_readb(APC_CPOWER_REG) & APC_REGMASK, arg)) { |
| 106 | unlock_kernel(); | ||
| 102 | return -EFAULT; | 107 | return -EFAULT; |
| 108 | } | ||
| 103 | break; | 109 | break; |
| 104 | 110 | ||
| 105 | case APCIOCGBPORT: | 111 | case APCIOCGBPORT: |
| 106 | if (put_user(apc_readb(APC_BPORT_REG) & APC_BPMASK, arg)) | 112 | if (put_user(apc_readb(APC_BPORT_REG) & APC_BPMASK, arg)) { |
| 113 | unlock_kernel(); | ||
| 107 | return -EFAULT; | 114 | return -EFAULT; |
| 115 | } | ||
| 108 | break; | 116 | break; |
| 109 | 117 | ||
| 110 | case APCIOCSFANCTL: | 118 | case APCIOCSFANCTL: |
| 111 | if (get_user(inarg, arg)) | 119 | if (get_user(inarg, arg)) { |
| 120 | unlock_kernel(); | ||
| 112 | return -EFAULT; | 121 | return -EFAULT; |
| 122 | } | ||
| 113 | apc_writeb(inarg & APC_REGMASK, APC_FANCTL_REG); | 123 | apc_writeb(inarg & APC_REGMASK, APC_FANCTL_REG); |
| 114 | break; | 124 | break; |
| 115 | case APCIOCSCPWR: | 125 | case APCIOCSCPWR: |
| 116 | if (get_user(inarg, arg)) | 126 | if (get_user(inarg, arg)) { |
| 127 | unlock_kernel(); | ||
| 117 | return -EFAULT; | 128 | return -EFAULT; |
| 129 | } | ||
| 118 | apc_writeb(inarg & APC_REGMASK, APC_CPOWER_REG); | 130 | apc_writeb(inarg & APC_REGMASK, APC_CPOWER_REG); |
| 119 | break; | 131 | break; |
| 120 | case APCIOCSBPORT: | 132 | case APCIOCSBPORT: |
| 121 | if (get_user(inarg, arg)) | 133 | if (get_user(inarg, arg)) { |
| 134 | unlock_kernel(); | ||
| 122 | return -EFAULT; | 135 | return -EFAULT; |
| 136 | } | ||
| 123 | apc_writeb(inarg & APC_BPMASK, APC_BPORT_REG); | 137 | apc_writeb(inarg & APC_BPMASK, APC_BPORT_REG); |
| 124 | break; | 138 | break; |
| 125 | default: | 139 | default: |
| 140 | unlock_kernel(); | ||
| 126 | return -EINVAL; | 141 | return -EINVAL; |
| 127 | }; | 142 | }; |
| 128 | 143 | ||
| 144 | unlock_kernel(); | ||
| 129 | return 0; | 145 | return 0; |
| 130 | } | 146 | } |
| 131 | 147 | ||
| 132 | static const struct file_operations apc_fops = { | 148 | static const struct file_operations apc_fops = { |
| 133 | .ioctl = apc_ioctl, | 149 | .unlocked_ioctl = apc_ioctl, |
| 134 | .open = apc_open, | 150 | .open = apc_open, |
| 135 | .release = apc_release, | 151 | .release = apc_release, |
| 136 | }; | 152 | }; |
| 137 | 153 | ||
| 138 | static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; | 154 | static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; |
diff --git a/arch/sparc/kernel/asm-offsets.c b/arch/sparc/kernel/asm-offsets.c index cd3f7694e9b9..b5bb99ed892c 100644 --- a/arch/sparc/kernel/asm-offsets.c +++ b/arch/sparc/kernel/asm-offsets.c | |||
| @@ -18,18 +18,6 @@ int foo(void) | |||
| 18 | { | 18 | { |
| 19 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread)); | 19 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread)); |
| 20 | BLANK(); | 20 | BLANK(); |
| 21 | /* XXX This is the stuff for sclow.S, kill it. */ | ||
| 22 | DEFINE(AOFF_task_pid, offsetof(struct task_struct, pid)); | ||
| 23 | DEFINE(AOFF_task_uid, offsetof(struct task_struct, uid)); | ||
| 24 | DEFINE(AOFF_task_gid, offsetof(struct task_struct, gid)); | ||
| 25 | DEFINE(AOFF_task_euid, offsetof(struct task_struct, euid)); | ||
| 26 | DEFINE(AOFF_task_egid, offsetof(struct task_struct, egid)); | ||
| 27 | /* DEFINE(THREAD_INFO, offsetof(struct task_struct, stack)); */ | ||
| 28 | DEFINE(ASIZ_task_uid, sizeof(current->uid)); | ||
| 29 | DEFINE(ASIZ_task_gid, sizeof(current->gid)); | ||
| 30 | DEFINE(ASIZ_task_euid, sizeof(current->euid)); | ||
| 31 | DEFINE(ASIZ_task_egid, sizeof(current->egid)); | ||
| 32 | BLANK(); | ||
| 33 | DEFINE(AOFF_thread_fork_kpsr, | 21 | DEFINE(AOFF_thread_fork_kpsr, |
| 34 | offsetof(struct thread_struct, fork_kpsr)); | 22 | offsetof(struct thread_struct, fork_kpsr)); |
| 35 | BLANK(); | 23 | BLANK(); |
diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c index 92c6fc07e59c..97294232259c 100644 --- a/arch/sparc/kernel/ebus.c +++ b/arch/sparc/kernel/ebus.c | |||
| @@ -69,7 +69,7 @@ static inline unsigned long ebus_alloc(size_t size) | |||
| 69 | 69 | ||
| 70 | /* | 70 | /* |
| 71 | */ | 71 | */ |
| 72 | int __init ebus_blacklist_irq(const char *name) | 72 | static int __init ebus_blacklist_irq(const char *name) |
| 73 | { | 73 | { |
| 74 | struct ebus_device_irq *dp; | 74 | struct ebus_device_irq *dp; |
| 75 | 75 | ||
| @@ -83,8 +83,8 @@ int __init ebus_blacklist_irq(const char *name) | |||
| 83 | return 0; | 83 | return 0; |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | void __init fill_ebus_child(struct device_node *dp, | 86 | static void __init fill_ebus_child(struct device_node *dp, |
| 87 | struct linux_ebus_child *dev) | 87 | struct linux_ebus_child *dev) |
| 88 | { | 88 | { |
| 89 | const int *regs; | 89 | const int *regs; |
| 90 | const int *irqs; | 90 | const int *irqs; |
| @@ -144,7 +144,8 @@ void __init fill_ebus_child(struct device_node *dp, | |||
| 144 | } | 144 | } |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *dev) | 147 | static void __init fill_ebus_device(struct device_node *dp, |
| 148 | struct linux_ebus_device *dev) | ||
| 148 | { | 149 | { |
| 149 | const struct linux_prom_registers *regs; | 150 | const struct linux_prom_registers *regs; |
| 150 | struct linux_ebus_child *child; | 151 | struct linux_ebus_child *child; |
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 4bcfe54f878d..e8cdf715a546 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include <asm/vaddrs.h> | 19 | #include <asm/vaddrs.h> |
| 20 | #include <asm/memreg.h> | 20 | #include <asm/memreg.h> |
| 21 | #include <asm/page.h> | 21 | #include <asm/page.h> |
| 22 | #include <asm/pgtable.h> | ||
| 22 | #ifdef CONFIG_SUN4 | 23 | #ifdef CONFIG_SUN4 |
| 23 | #include <asm/pgtsun4.h> | 24 | #include <asm/pgtsun4.h> |
| 24 | #else | 25 | #else |
| @@ -1195,8 +1196,9 @@ sys_rt_sigreturn: | |||
| 1195 | be 1f | 1196 | be 1f |
| 1196 | nop | 1197 | nop |
| 1197 | 1198 | ||
| 1199 | add %sp, STACKFRAME_SZ, %o0 | ||
| 1198 | call syscall_trace | 1200 | call syscall_trace |
| 1199 | nop | 1201 | mov 1, %o1 |
| 1200 | 1202 | ||
| 1201 | 1: | 1203 | 1: |
| 1202 | /* We are returning to a signal handler. */ | 1204 | /* We are returning to a signal handler. */ |
| @@ -1286,8 +1288,12 @@ linux_fast_syscall: | |||
| 1286 | mov %i3, %o3 | 1288 | mov %i3, %o3 |
| 1287 | 1289 | ||
| 1288 | linux_syscall_trace: | 1290 | linux_syscall_trace: |
| 1291 | add %sp, STACKFRAME_SZ, %o0 | ||
| 1289 | call syscall_trace | 1292 | call syscall_trace |
| 1290 | nop | 1293 | mov 0, %o1 |
| 1294 | cmp %o0, 0 | ||
| 1295 | bne 3f | ||
| 1296 | mov -ENOSYS, %o0 | ||
| 1291 | mov %i0, %o0 | 1297 | mov %i0, %o0 |
| 1292 | mov %i1, %o1 | 1298 | mov %i1, %o1 |
| 1293 | mov %i2, %o2 | 1299 | mov %i2, %o2 |
| @@ -1317,7 +1323,6 @@ linux_sparc_syscall: | |||
| 1317 | bne linux_fast_syscall | 1323 | bne linux_fast_syscall |
| 1318 | /* Just do first insn from SAVE_ALL in the delay slot */ | 1324 | /* Just do first insn from SAVE_ALL in the delay slot */ |
| 1319 | 1325 | ||
| 1320 | .globl syscall_is_too_hard | ||
| 1321 | syscall_is_too_hard: | 1326 | syscall_is_too_hard: |
| 1322 | SAVE_ALL_HEAD | 1327 | SAVE_ALL_HEAD |
| 1323 | rd %wim, %l3 | 1328 | rd %wim, %l3 |
| @@ -1337,6 +1342,7 @@ syscall_is_too_hard: | |||
| 1337 | call %l7 | 1342 | call %l7 |
| 1338 | mov %i5, %o5 | 1343 | mov %i5, %o5 |
| 1339 | 1344 | ||
| 1345 | 3: | ||
| 1340 | st %o0, [%sp + STACKFRAME_SZ + PT_I0] | 1346 | st %o0, [%sp + STACKFRAME_SZ + PT_I0] |
| 1341 | 1347 | ||
| 1342 | ret_sys_call: | 1348 | ret_sys_call: |
| @@ -1374,6 +1380,8 @@ ret_sys_call: | |||
| 1374 | st %l2, [%sp + STACKFRAME_SZ + PT_NPC] | 1380 | st %l2, [%sp + STACKFRAME_SZ + PT_NPC] |
| 1375 | 1381 | ||
| 1376 | linux_syscall_trace2: | 1382 | linux_syscall_trace2: |
| 1383 | add %sp, STACKFRAME_SZ, %o0 | ||
| 1384 | mov 1, %o1 | ||
| 1377 | call syscall_trace | 1385 | call syscall_trace |
| 1378 | add %l1, 0x4, %l2 /* npc = npc+4 */ | 1386 | add %l1, 0x4, %l2 /* npc = npc+4 */ |
| 1379 | st %l1, [%sp + STACKFRAME_SZ + PT_PC] | 1387 | st %l1, [%sp + STACKFRAME_SZ + PT_PC] |
| @@ -1544,8 +1552,7 @@ kgdb_trap_low: | |||
| 1544 | #endif | 1552 | #endif |
| 1545 | 1553 | ||
| 1546 | .align 4 | 1554 | .align 4 |
| 1547 | .globl __handle_exception, flush_patch_exception | 1555 | .globl flush_patch_exception |
| 1548 | __handle_exception: | ||
| 1549 | flush_patch_exception: | 1556 | flush_patch_exception: |
| 1550 | FLUSH_ALL_KERNEL_WINDOWS; | 1557 | FLUSH_ALL_KERNEL_WINDOWS; |
| 1551 | ldd [%o0], %o6 | 1558 | ldd [%o0], %o6 |
diff --git a/arch/sparc/kernel/etrap.S b/arch/sparc/kernel/etrap.S index f37d961d67a6..e806fcdc46db 100644 --- a/arch/sparc/kernel/etrap.S +++ b/arch/sparc/kernel/etrap.S | |||
| @@ -228,7 +228,6 @@ tsetup_mmu_patchme: | |||
| 228 | */ | 228 | */ |
| 229 | #define glob_tmp g1 | 229 | #define glob_tmp g1 |
| 230 | 230 | ||
| 231 | .globl tsetup_sun4c_stackchk | ||
| 232 | tsetup_sun4c_stackchk: | 231 | tsetup_sun4c_stackchk: |
| 233 | /* Done by caller: andcc %sp, 0x7, %g0 */ | 232 | /* Done by caller: andcc %sp, 0x7, %g0 */ |
| 234 | bne trap_setup_user_stack_is_bolixed | 233 | bne trap_setup_user_stack_is_bolixed |
diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S index 3bfd6085a91d..50d9a16af795 100644 --- a/arch/sparc/kernel/head.S +++ b/arch/sparc/kernel/head.S | |||
| @@ -32,7 +32,6 @@ | |||
| 32 | */ | 32 | */ |
| 33 | 33 | ||
| 34 | .align 4 | 34 | .align 4 |
| 35 | .globl cputyp | ||
| 36 | cputyp: | 35 | cputyp: |
| 37 | .word 1 | 36 | .word 1 |
| 38 | 37 | ||
| @@ -1280,7 +1279,6 @@ halt_me: | |||
| 1280 | * gets initialized in c-code so all routines can use it. | 1279 | * gets initialized in c-code so all routines can use it. |
| 1281 | */ | 1280 | */ |
| 1282 | 1281 | ||
| 1283 | .globl prom_vector_p | ||
| 1284 | prom_vector_p: | 1282 | prom_vector_p: |
| 1285 | .word 0 | 1283 | .word 0 |
| 1286 | 1284 | ||
diff --git a/arch/sparc/kernel/idprom.c b/arch/sparc/kernel/idprom.c index 7220562cdb34..fc511f3c4c18 100644 --- a/arch/sparc/kernel/idprom.c +++ b/arch/sparc/kernel/idprom.c | |||
| @@ -24,7 +24,7 @@ static struct idprom idprom_buffer; | |||
| 24 | * of the Sparc CPU and have a meaningful IDPROM machtype value that we | 24 | * of the Sparc CPU and have a meaningful IDPROM machtype value that we |
| 25 | * know about. See asm-sparc/machines.h for empirical constants. | 25 | * know about. See asm-sparc/machines.h for empirical constants. |
| 26 | */ | 26 | */ |
| 27 | struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = { | 27 | static struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = { |
| 28 | /* First, Sun4's */ | 28 | /* First, Sun4's */ |
| 29 | { "Sun 4/100 Series", (SM_SUN4 | SM_4_110) }, | 29 | { "Sun 4/100 Series", (SM_SUN4 | SM_4_110) }, |
| 30 | { "Sun 4/200 Series", (SM_SUN4 | SM_4_260) }, | 30 | { "Sun 4/200 Series", (SM_SUN4 | SM_4_260) }, |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 7b17522f59bf..487960919f1f 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
| @@ -49,13 +49,16 @@ | |||
| 49 | 49 | ||
| 50 | #define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */ | 50 | #define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */ |
| 51 | 51 | ||
| 52 | struct resource *_sparc_find_resource(struct resource *r, unsigned long); | 52 | static struct resource *_sparc_find_resource(struct resource *r, |
| 53 | unsigned long); | ||
| 53 | 54 | ||
| 54 | static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz); | 55 | static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz); |
| 55 | static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys, | 56 | static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys, |
| 56 | unsigned long size, char *name); | 57 | unsigned long size, char *name); |
| 57 | static void _sparc_free_io(struct resource *res); | 58 | static void _sparc_free_io(struct resource *res); |
| 58 | 59 | ||
| 60 | static void register_proc_sparc_ioport(void); | ||
| 61 | |||
| 59 | /* This points to the next to use virtual memory for DVMA mappings */ | 62 | /* This points to the next to use virtual memory for DVMA mappings */ |
| 60 | static struct resource _sparc_dvma = { | 63 | static struct resource _sparc_dvma = { |
| 61 | .name = "sparc_dvma", .start = DVMA_VADDR, .end = DVMA_END - 1 | 64 | .name = "sparc_dvma", .start = DVMA_VADDR, .end = DVMA_END - 1 |
| @@ -539,8 +542,6 @@ void __init sbus_setup_arch_props(struct sbus_bus *sbus, struct device_node *dp) | |||
| 539 | 542 | ||
| 540 | int __init sbus_arch_preinit(void) | 543 | int __init sbus_arch_preinit(void) |
| 541 | { | 544 | { |
| 542 | extern void register_proc_sparc_ioport(void); | ||
| 543 | |||
| 544 | register_proc_sparc_ioport(); | 545 | register_proc_sparc_ioport(); |
| 545 | 546 | ||
| 546 | #ifdef CONFIG_SUN4 | 547 | #ifdef CONFIG_SUN4 |
| @@ -853,8 +854,8 @@ _sparc_io_get_info(char *buf, char **start, off_t fpos, int length, int *eof, | |||
| 853 | * XXX Too slow. Can have 8192 DVMA pages on sun4m in the worst case. | 854 | * XXX Too slow. Can have 8192 DVMA pages on sun4m in the worst case. |
| 854 | * This probably warrants some sort of hashing. | 855 | * This probably warrants some sort of hashing. |
| 855 | */ | 856 | */ |
| 856 | struct resource * | 857 | static struct resource *_sparc_find_resource(struct resource *root, |
| 857 | _sparc_find_resource(struct resource *root, unsigned long hit) | 858 | unsigned long hit) |
| 858 | { | 859 | { |
| 859 | struct resource *tmp; | 860 | struct resource *tmp; |
| 860 | 861 | ||
| @@ -865,7 +866,7 @@ _sparc_find_resource(struct resource *root, unsigned long hit) | |||
| 865 | return NULL; | 866 | return NULL; |
| 866 | } | 867 | } |
| 867 | 868 | ||
| 868 | void register_proc_sparc_ioport(void) | 869 | static void register_proc_sparc_ioport(void) |
| 869 | { | 870 | { |
| 870 | #ifdef CONFIG_PROC_FS | 871 | #ifdef CONFIG_PROC_FS |
| 871 | create_proc_read_entry("io_map",0,NULL,_sparc_io_get_info,&sparc_iomap); | 872 | create_proc_read_entry("io_map",0,NULL,_sparc_io_get_info,&sparc_iomap); |
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c index 087390b092b0..93e1d1c65290 100644 --- a/arch/sparc/kernel/irq.c +++ b/arch/sparc/kernel/irq.c | |||
| @@ -154,7 +154,7 @@ void (*sparc_init_timers)(irq_handler_t ) = | |||
| 154 | struct irqaction static_irqaction[MAX_STATIC_ALLOC]; | 154 | struct irqaction static_irqaction[MAX_STATIC_ALLOC]; |
| 155 | int static_irq_count; | 155 | int static_irq_count; |
| 156 | 156 | ||
| 157 | struct { | 157 | static struct { |
| 158 | struct irqaction *action; | 158 | struct irqaction *action; |
| 159 | int flags; | 159 | int flags; |
| 160 | } sparc_irq[NR_IRQS]; | 160 | } sparc_irq[NR_IRQS]; |
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index da48d248cc17..4bb430940a61 100644 --- a/arch/sparc/kernel/process.c +++ b/arch/sparc/kernel/process.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* linux/arch/sparc/kernel/process.c | 1 | /* linux/arch/sparc/kernel/process.c |
| 2 | * | 2 | * |
| 3 | * Copyright (C) 1995 David S. Miller (davem@davemloft.net) | 3 | * Copyright (C) 1995, 2008 David S. Miller (davem@davemloft.net) |
| 4 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| @@ -14,7 +14,6 @@ | |||
| 14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
| 16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
| 17 | #include <linux/kallsyms.h> | ||
| 18 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
| 19 | #include <linux/stddef.h> | 18 | #include <linux/stddef.h> |
| 20 | #include <linux/ptrace.h> | 19 | #include <linux/ptrace.h> |
| @@ -177,6 +176,8 @@ void machine_power_off(void) | |||
| 177 | machine_halt(); | 176 | machine_halt(); |
| 178 | } | 177 | } |
| 179 | 178 | ||
| 179 | #if 0 | ||
| 180 | |||
| 180 | static DEFINE_SPINLOCK(sparc_backtrace_lock); | 181 | static DEFINE_SPINLOCK(sparc_backtrace_lock); |
| 181 | 182 | ||
| 182 | void __show_backtrace(unsigned long fp) | 183 | void __show_backtrace(unsigned long fp) |
| @@ -196,7 +197,7 @@ void __show_backtrace(unsigned long fp) | |||
| 196 | rw->ins[4], rw->ins[5], | 197 | rw->ins[4], rw->ins[5], |
| 197 | rw->ins[6], | 198 | rw->ins[6], |
| 198 | rw->ins[7]); | 199 | rw->ins[7]); |
| 199 | print_symbol("%s\n", rw->ins[7]); | 200 | printk("%pS\n", (void *) rw->ins[7]); |
| 200 | rw = (struct reg_window *) rw->ins[6]; | 201 | rw = (struct reg_window *) rw->ins[6]; |
| 201 | } | 202 | } |
| 202 | spin_unlock_irqrestore(&sparc_backtrace_lock, flags); | 203 | spin_unlock_irqrestore(&sparc_backtrace_lock, flags); |
| @@ -228,7 +229,6 @@ void smp_show_backtrace_all_cpus(void) | |||
| 228 | } | 229 | } |
| 229 | #endif | 230 | #endif |
| 230 | 231 | ||
| 231 | #if 0 | ||
| 232 | void show_stackframe(struct sparc_stackf *sf) | 232 | void show_stackframe(struct sparc_stackf *sf) |
| 233 | { | 233 | { |
| 234 | unsigned long size; | 234 | unsigned long size; |
| @@ -264,14 +264,14 @@ void show_regs(struct pt_regs *r) | |||
| 264 | 264 | ||
| 265 | printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx %s\n", | 265 | printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx %s\n", |
| 266 | r->psr, r->pc, r->npc, r->y, print_tainted()); | 266 | r->psr, r->pc, r->npc, r->y, print_tainted()); |
| 267 | print_symbol("PC: <%s>\n", r->pc); | 267 | printk("PC: <%pS>\n", (void *) r->pc); |
| 268 | printk("%%G: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", | 268 | printk("%%G: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", |
| 269 | r->u_regs[0], r->u_regs[1], r->u_regs[2], r->u_regs[3], | 269 | r->u_regs[0], r->u_regs[1], r->u_regs[2], r->u_regs[3], |
| 270 | r->u_regs[4], r->u_regs[5], r->u_regs[6], r->u_regs[7]); | 270 | r->u_regs[4], r->u_regs[5], r->u_regs[6], r->u_regs[7]); |
| 271 | printk("%%O: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", | 271 | printk("%%O: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", |
| 272 | r->u_regs[8], r->u_regs[9], r->u_regs[10], r->u_regs[11], | 272 | r->u_regs[8], r->u_regs[9], r->u_regs[10], r->u_regs[11], |
| 273 | r->u_regs[12], r->u_regs[13], r->u_regs[14], r->u_regs[15]); | 273 | r->u_regs[12], r->u_regs[13], r->u_regs[14], r->u_regs[15]); |
| 274 | print_symbol("RPC: <%s>\n", r->u_regs[15]); | 274 | printk("RPC: <%pS>\n", (void *) r->u_regs[15]); |
| 275 | 275 | ||
| 276 | printk("%%L: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", | 276 | printk("%%L: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", |
| 277 | rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3], | 277 | rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3], |
| @@ -306,7 +306,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
| 306 | rw = (struct reg_window *) fp; | 306 | rw = (struct reg_window *) fp; |
| 307 | pc = rw->ins[7]; | 307 | pc = rw->ins[7]; |
| 308 | printk("[%08lx : ", pc); | 308 | printk("[%08lx : ", pc); |
| 309 | print_symbol("%s ] ", pc); | 309 | printk("%pS ] ", (void *) pc); |
| 310 | fp = rw->ins[6]; | 310 | fp = rw->ins[6]; |
| 311 | } while (++count < 16); | 311 | } while (++count < 16); |
| 312 | printk("\n"); | 312 | printk("\n"); |
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index 81f3b929743f..20699c701412 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/signal.h> | 21 | #include <linux/signal.h> |
| 22 | #include <linux/regset.h> | 22 | #include <linux/regset.h> |
| 23 | #include <linux/elf.h> | 23 | #include <linux/elf.h> |
| 24 | #include <linux/tracehook.h> | ||
| 24 | 25 | ||
| 25 | #include <asm/pgtable.h> | 26 | #include <asm/pgtable.h> |
| 26 | #include <asm/system.h> | 27 | #include <asm/system.h> |
| @@ -450,21 +451,16 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) | |||
| 450 | return ret; | 451 | return ret; |
| 451 | } | 452 | } |
| 452 | 453 | ||
| 453 | asmlinkage void syscall_trace(void) | 454 | asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p) |
| 454 | { | 455 | { |
| 455 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 456 | int ret = 0; |
| 456 | return; | 457 | |
| 457 | if (!(current->ptrace & PT_PTRACED)) | 458 | if (test_thread_flag(TIF_SYSCALL_TRACE)) { |
| 458 | return; | 459 | if (syscall_exit_p) |
| 459 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | 460 | tracehook_report_syscall_exit(regs, 0); |
| 460 | ? 0x80 : 0)); | 461 | else |
| 461 | /* | 462 | ret = tracehook_report_syscall_entry(regs); |
| 462 | * this isn't the same as continuing with a signal, but it will do | ||
| 463 | * for normal use. strace only continues with a signal if the | ||
| 464 | * stopping signal is not SIGTRAP. -brl | ||
| 465 | */ | ||
| 466 | if (current->exit_code) { | ||
| 467 | send_sig (current->exit_code, current, 1); | ||
| 468 | current->exit_code = 0; | ||
| 469 | } | 463 | } |
| 464 | |||
| 465 | return ret; | ||
| 470 | } | 466 | } |
diff --git a/arch/sparc/kernel/rtrap.S b/arch/sparc/kernel/rtrap.S index ce30082ab266..4da2e1f66290 100644 --- a/arch/sparc/kernel/rtrap.S +++ b/arch/sparc/kernel/rtrap.S | |||
| @@ -69,12 +69,13 @@ ret_trap_lockless_ipi: | |||
| 69 | 69 | ||
| 70 | ld [%curptr + TI_FLAGS], %g2 | 70 | ld [%curptr + TI_FLAGS], %g2 |
| 71 | signal_p: | 71 | signal_p: |
| 72 | andcc %g2, (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK), %g0 | 72 | andcc %g2, _TIF_DO_NOTIFY_RESUME_MASK, %g0 |
| 73 | bz,a ret_trap_continue | 73 | bz,a ret_trap_continue |
| 74 | ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr | 74 | ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr |
| 75 | 75 | ||
| 76 | mov %g2, %o2 | ||
| 76 | mov %l5, %o1 | 77 | mov %l5, %o1 |
| 77 | call do_signal | 78 | call do_notify_resume |
| 78 | add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr | 79 | add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr |
| 79 | 80 | ||
| 80 | /* Fall through. */ | 81 | /* Fall through. */ |
| @@ -224,8 +225,6 @@ ret_trap_user_stack_is_bolixed: | |||
| 224 | b signal_p | 225 | b signal_p |
| 225 | ld [%curptr + TI_FLAGS], %g2 | 226 | ld [%curptr + TI_FLAGS], %g2 |
| 226 | 227 | ||
| 227 | |||
| 228 | .globl sun4c_rett_stackchk | ||
| 229 | sun4c_rett_stackchk: | 228 | sun4c_rett_stackchk: |
| 230 | be 1f | 229 | be 1f |
| 231 | and %fp, 0xfff, %g1 ! delay slot | 230 | and %fp, 0xfff, %g1 ! delay slot |
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c index a0ea0bc6f471..9e451b21202e 100644 --- a/arch/sparc/kernel/setup.c +++ b/arch/sparc/kernel/setup.c | |||
| @@ -67,7 +67,7 @@ struct screen_info screen_info = { | |||
| 67 | extern unsigned long trapbase; | 67 | extern unsigned long trapbase; |
| 68 | 68 | ||
| 69 | /* Pretty sick eh? */ | 69 | /* Pretty sick eh? */ |
| 70 | void prom_sync_me(void) | 70 | static void prom_sync_me(void) |
| 71 | { | 71 | { |
| 72 | unsigned long prom_tbr, flags; | 72 | unsigned long prom_tbr, flags; |
| 73 | 73 | ||
| @@ -97,7 +97,7 @@ void prom_sync_me(void) | |||
| 97 | return; | 97 | return; |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | unsigned int boot_flags __initdata = 0; | 100 | static unsigned int boot_flags __initdata = 0; |
| 101 | #define BOOTME_DEBUG 0x1 | 101 | #define BOOTME_DEBUG 0x1 |
| 102 | 102 | ||
| 103 | /* Exported for mm/init.c:paging_init. */ | 103 | /* Exported for mm/init.c:paging_init. */ |
diff --git a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c index 3fd1df9f9ba7..c94f91c8b6e0 100644 --- a/arch/sparc/kernel/signal.c +++ b/arch/sparc/kernel/signal.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
| 19 | #include <linux/binfmts.h> /* do_coredum */ | 19 | #include <linux/binfmts.h> /* do_coredum */ |
| 20 | #include <linux/bitops.h> | 20 | #include <linux/bitops.h> |
| 21 | #include <linux/tracehook.h> | ||
| 21 | 22 | ||
| 22 | #include <asm/uaccess.h> | 23 | #include <asm/uaccess.h> |
| 23 | #include <asm/ptrace.h> | 24 | #include <asm/ptrace.h> |
| @@ -513,7 +514,7 @@ static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs, | |||
| 513 | * want to handle. Thus you cannot kill init even with a SIGKILL even by | 514 | * want to handle. Thus you cannot kill init even with a SIGKILL even by |
| 514 | * mistake. | 515 | * mistake. |
| 515 | */ | 516 | */ |
| 516 | asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0) | 517 | static void do_signal(struct pt_regs *regs, unsigned long orig_i0) |
| 517 | { | 518 | { |
| 518 | struct k_sigaction ka; | 519 | struct k_sigaction ka; |
| 519 | int restart_syscall; | 520 | int restart_syscall; |
| @@ -552,6 +553,8 @@ asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0) | |||
| 552 | */ | 553 | */ |
| 553 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) | 554 | if (test_thread_flag(TIF_RESTORE_SIGMASK)) |
| 554 | clear_thread_flag(TIF_RESTORE_SIGMASK); | 555 | clear_thread_flag(TIF_RESTORE_SIGMASK); |
| 556 | |||
| 557 | tracehook_signal_handler(signr, &info, &ka, regs, 0); | ||
| 555 | return; | 558 | return; |
| 556 | } | 559 | } |
| 557 | if (restart_syscall && | 560 | if (restart_syscall && |
| @@ -579,6 +582,17 @@ asmlinkage void do_signal(struct pt_regs * regs, unsigned long orig_i0) | |||
| 579 | } | 582 | } |
| 580 | } | 583 | } |
| 581 | 584 | ||
| 585 | void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, | ||
| 586 | unsigned long thread_info_flags) | ||
| 587 | { | ||
| 588 | if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) | ||
| 589 | do_signal(regs, orig_i0); | ||
| 590 | if (thread_info_flags & _TIF_NOTIFY_RESUME) { | ||
| 591 | clear_thread_flag(TIF_NOTIFY_RESUME); | ||
| 592 | tracehook_notify_resume(regs); | ||
| 593 | } | ||
| 594 | } | ||
| 595 | |||
| 582 | asmlinkage int | 596 | asmlinkage int |
| 583 | do_sys_sigstack(struct sigstack __user *ssptr, struct sigstack __user *ossptr, | 597 | do_sys_sigstack(struct sigstack __user *ssptr, struct sigstack __user *ossptr, |
| 584 | unsigned long sp) | 598 | unsigned long sp) |
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c index 6724ab90f82b..1619ec15c099 100644 --- a/arch/sparc/kernel/smp.c +++ b/arch/sparc/kernel/smp.c | |||
| @@ -35,13 +35,9 @@ | |||
| 35 | 35 | ||
| 36 | #include "irq.h" | 36 | #include "irq.h" |
| 37 | 37 | ||
| 38 | int smp_num_cpus = 1; | ||
| 39 | volatile unsigned long cpu_callin_map[NR_CPUS] __initdata = {0,}; | 38 | volatile unsigned long cpu_callin_map[NR_CPUS] __initdata = {0,}; |
| 40 | unsigned char boot_cpu_id = 0; | 39 | unsigned char boot_cpu_id = 0; |
| 41 | unsigned char boot_cpu_id4 = 0; /* boot_cpu_id << 2 */ | 40 | unsigned char boot_cpu_id4 = 0; /* boot_cpu_id << 2 */ |
| 42 | int smp_activated = 0; | ||
| 43 | volatile int __cpu_number_map[NR_CPUS]; | ||
| 44 | volatile int __cpu_logical_map[NR_CPUS]; | ||
| 45 | 41 | ||
| 46 | cpumask_t cpu_online_map = CPU_MASK_NONE; | 42 | cpumask_t cpu_online_map = CPU_MASK_NONE; |
| 47 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; | 43 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; |
| @@ -55,9 +51,6 @@ cpumask_t smp_commenced_mask = CPU_MASK_NONE; | |||
| 55 | * instruction which is much better... | 51 | * instruction which is much better... |
| 56 | */ | 52 | */ |
| 57 | 53 | ||
| 58 | /* Used to make bitops atomic */ | ||
| 59 | unsigned char bitops_spinlock = 0; | ||
| 60 | |||
| 61 | void __cpuinit smp_store_cpu_info(int id) | 54 | void __cpuinit smp_store_cpu_info(int id) |
| 62 | { | 55 | { |
| 63 | int cpu_node; | 56 | int cpu_node; |
diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c index c6ac9fc52563..340fc395fe2d 100644 --- a/arch/sparc/kernel/sun4c_irq.c +++ b/arch/sparc/kernel/sun4c_irq.c | |||
| @@ -68,7 +68,8 @@ unsigned char *interrupt_enable = NULL; | |||
| 68 | 68 | ||
| 69 | static int sun4c_pil_map[] = { 0, 1, 2, 3, 5, 7, 8, 9 }; | 69 | static int sun4c_pil_map[] = { 0, 1, 2, 3, 5, 7, 8, 9 }; |
| 70 | 70 | ||
| 71 | unsigned int sun4c_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) | 71 | static unsigned int sun4c_sbint_to_irq(struct sbus_dev *sdev, |
| 72 | unsigned int sbint) | ||
| 72 | { | 73 | { |
| 73 | if (sbint >= sizeof(sun4c_pil_map)) { | 74 | if (sbint >= sizeof(sun4c_pil_map)) { |
| 74 | printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); | 75 | printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); |
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index 8ac5661cafff..1290b5998f83 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c | |||
| @@ -52,13 +52,13 @@ extern struct irqaction static_irqaction[MAX_STATIC_ALLOC]; | |||
| 52 | extern int static_irq_count; | 52 | extern int static_irq_count; |
| 53 | unsigned char cpu_leds[32]; | 53 | unsigned char cpu_leds[32]; |
| 54 | #ifdef CONFIG_SMP | 54 | #ifdef CONFIG_SMP |
| 55 | unsigned char sbus_tid[32]; | 55 | static unsigned char sbus_tid[32]; |
| 56 | #endif | 56 | #endif |
| 57 | 57 | ||
| 58 | static struct irqaction *irq_action[NR_IRQS]; | 58 | static struct irqaction *irq_action[NR_IRQS]; |
| 59 | extern spinlock_t irq_action_lock; | 59 | extern spinlock_t irq_action_lock; |
| 60 | 60 | ||
| 61 | struct sbus_action { | 61 | static struct sbus_action { |
| 62 | struct irqaction *action; | 62 | struct irqaction *action; |
| 63 | /* For SMP this needs to be extended */ | 63 | /* For SMP this needs to be extended */ |
| 64 | } *sbus_actions; | 64 | } *sbus_actions; |
| @@ -267,7 +267,8 @@ unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq) | |||
| 267 | return irq; | 267 | return irq; |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | unsigned int sun4d_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) | 270 | static unsigned int sun4d_sbint_to_irq(struct sbus_dev *sdev, |
| 271 | unsigned int sbint) | ||
| 271 | { | 272 | { |
| 272 | if (sbint >= sizeof(sbus_to_pil)) { | 273 | if (sbint >= sizeof(sbus_to_pil)) { |
| 273 | printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); | 274 | printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); |
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c index b92d6d2d5b04..94e02de960ea 100644 --- a/arch/sparc/kernel/sun4m_irq.c +++ b/arch/sparc/kernel/sun4m_irq.c | |||
| @@ -154,7 +154,8 @@ static unsigned long irq_mask[] = { | |||
| 154 | 154 | ||
| 155 | static int sun4m_pil_map[] = { 0, 2, 3, 5, 7, 9, 11, 13 }; | 155 | static int sun4m_pil_map[] = { 0, 2, 3, 5, 7, 9, 11, 13 }; |
| 156 | 156 | ||
| 157 | unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) | 157 | static unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev, |
| 158 | unsigned int sbint) | ||
| 158 | { | 159 | { |
| 159 | if (sbint >= sizeof(sun4m_pil_map)) { | 160 | if (sbint >= sizeof(sun4m_pil_map)) { |
| 160 | printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); | 161 | printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); |
| @@ -163,7 +164,7 @@ unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) | |||
| 163 | return sun4m_pil_map[sbint] | 0x30; | 164 | return sun4m_pil_map[sbint] | 0x30; |
| 164 | } | 165 | } |
| 165 | 166 | ||
| 166 | inline unsigned long sun4m_get_irqmask(unsigned int irq) | 167 | static unsigned long sun4m_get_irqmask(unsigned int irq) |
| 167 | { | 168 | { |
| 168 | unsigned long mask; | 169 | unsigned long mask; |
| 169 | 170 | ||
| @@ -281,7 +282,7 @@ static void sun4m_set_udt(int cpu) | |||
| 281 | #define TIMER_IRQ (OBIO_INTR | 10) | 282 | #define TIMER_IRQ (OBIO_INTR | 10) |
| 282 | #define PROFILE_IRQ (OBIO_INTR | 14) | 283 | #define PROFILE_IRQ (OBIO_INTR | 14) |
| 283 | 284 | ||
| 284 | struct sun4m_timer_regs *sun4m_timers; | 285 | static struct sun4m_timer_regs *sun4m_timers; |
| 285 | unsigned int lvl14_resolution = (((1000000/HZ) + 1) << 10); | 286 | unsigned int lvl14_resolution = (((1000000/HZ) + 1) << 10); |
| 286 | 287 | ||
| 287 | static void sun4m_clear_clock_irq(void) | 288 | static void sun4m_clear_clock_irq(void) |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index ffb875aacb7e..406ac1abc83a 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
| @@ -244,8 +244,9 @@ static struct smp_funcall { | |||
| 244 | static DEFINE_SPINLOCK(cross_call_lock); | 244 | static DEFINE_SPINLOCK(cross_call_lock); |
| 245 | 245 | ||
| 246 | /* Cross calls must be serialized, at least currently. */ | 246 | /* Cross calls must be serialized, at least currently. */ |
| 247 | void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 247 | static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, |
| 248 | unsigned long arg3, unsigned long arg4, unsigned long arg5) | 248 | unsigned long arg2, unsigned long arg3, |
| 249 | unsigned long arg4, unsigned long arg5) | ||
| 249 | { | 250 | { |
| 250 | register int ncpus = SUN4M_NCPUS; | 251 | register int ncpus = SUN4M_NCPUS; |
| 251 | unsigned long flags; | 252 | unsigned long flags; |
| @@ -344,7 +345,7 @@ static void __init smp_setup_percpu_timer(void) | |||
| 344 | enable_pil_irq(14); | 345 | enable_pil_irq(14); |
| 345 | } | 346 | } |
| 346 | 347 | ||
| 347 | void __init smp4m_blackbox_id(unsigned *addr) | 348 | static void __init smp4m_blackbox_id(unsigned *addr) |
| 348 | { | 349 | { |
| 349 | int rd = *addr & 0x3e000000; | 350 | int rd = *addr & 0x3e000000; |
| 350 | int rs1 = rd >> 11; | 351 | int rs1 = rd >> 11; |
| @@ -354,7 +355,7 @@ void __init smp4m_blackbox_id(unsigned *addr) | |||
| 354 | addr[2] = 0x80082003 | rd | rs1; /* and reg, 3, reg */ | 355 | addr[2] = 0x80082003 | rd | rs1; /* and reg, 3, reg */ |
| 355 | } | 356 | } |
| 356 | 357 | ||
| 357 | void __init smp4m_blackbox_current(unsigned *addr) | 358 | static void __init smp4m_blackbox_current(unsigned *addr) |
| 358 | { | 359 | { |
| 359 | int rd = *addr & 0x3e000000; | 360 | int rd = *addr & 0x3e000000; |
| 360 | int rs1 = rd >> 11; | 361 | int rs1 = rd >> 11; |
diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c index 3c6b49a53ae8..4d73421559c3 100644 --- a/arch/sparc/kernel/sys_sparc.c +++ b/arch/sparc/kernel/sys_sparc.c | |||
| @@ -97,7 +97,7 @@ asmlinkage int sparc_pipe(struct pt_regs *regs) | |||
| 97 | int fd[2]; | 97 | int fd[2]; |
| 98 | int error; | 98 | int error; |
| 99 | 99 | ||
| 100 | error = do_pipe(fd); | 100 | error = do_pipe_flags(fd, 0); |
| 101 | if (error) | 101 | if (error) |
| 102 | goto out; | 102 | goto out; |
| 103 | regs->u_regs[UREG_I1] = fd[1]; | 103 | regs->u_regs[UREG_I1] = fd[1]; |
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index 5a7c4c8345c3..e1b9233b90ab 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S | |||
| @@ -80,4 +80,5 @@ sys_call_table: | |||
| 80 | /*300*/ .long sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy | 80 | /*300*/ .long sys_set_robust_list, sys_get_robust_list, sys_migrate_pages, sys_mbind, sys_get_mempolicy |
| 81 | /*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait | 81 | /*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait |
| 82 | /*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate | 82 | /*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate |
| 83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime | 83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
| 84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1 | ||
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c index 53caacbb3982..ab3dd0b257d3 100644 --- a/arch/sparc/kernel/time.c +++ b/arch/sparc/kernel/time.c | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | #include "irq.h" | 46 | #include "irq.h" |
| 47 | 47 | ||
| 48 | DEFINE_SPINLOCK(rtc_lock); | 48 | DEFINE_SPINLOCK(rtc_lock); |
| 49 | enum sparc_clock_type sp_clock_typ; | 49 | static enum sparc_clock_type sp_clock_typ; |
| 50 | DEFINE_SPINLOCK(mostek_lock); | 50 | DEFINE_SPINLOCK(mostek_lock); |
| 51 | void __iomem *mstk48t02_regs = NULL; | 51 | void __iomem *mstk48t02_regs = NULL; |
| 52 | static struct mostek48t08 __iomem *mstk48t08_regs = NULL; | 52 | static struct mostek48t08 __iomem *mstk48t08_regs = NULL; |
| @@ -366,7 +366,7 @@ static int __init clock_init(void) | |||
| 366 | fs_initcall(clock_init); | 366 | fs_initcall(clock_init); |
| 367 | #endif /* !CONFIG_SUN4 */ | 367 | #endif /* !CONFIG_SUN4 */ |
| 368 | 368 | ||
| 369 | void __init sbus_time_init(void) | 369 | static void __init sbus_time_init(void) |
| 370 | { | 370 | { |
| 371 | 371 | ||
| 372 | BTFIXUPSET_CALL(bus_do_settimeofday, sbus_do_settimeofday, BTFIXUPCALL_NORM); | 372 | BTFIXUPSET_CALL(bus_do_settimeofday, sbus_do_settimeofday, BTFIXUPCALL_NORM); |
diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c index 978e9d85949e..5d45d5fd8c99 100644 --- a/arch/sparc/kernel/traps.c +++ b/arch/sparc/kernel/traps.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * arch/sparc/kernel/traps.c | 2 | * arch/sparc/kernel/traps.c |
| 3 | * | 3 | * |
| 4 | * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright 1995, 2008 David S. Miller (davem@davemloft.net) |
| 5 | * Copyright 2000 Jakub Jelinek (jakub@redhat.com) | 5 | * Copyright 2000 Jakub Jelinek (jakub@redhat.com) |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| @@ -11,7 +11,6 @@ | |||
| 11 | 11 | ||
| 12 | #include <linux/sched.h> /* for jiffies */ | 12 | #include <linux/sched.h> /* for jiffies */ |
| 13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
| 14 | #include <linux/kallsyms.h> | ||
| 15 | #include <linux/signal.h> | 14 | #include <linux/signal.h> |
| 16 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
| 17 | #include <linux/smp_lock.h> | 16 | #include <linux/smp_lock.h> |
| @@ -33,9 +32,6 @@ struct trap_trace_entry { | |||
| 33 | unsigned long type; | 32 | unsigned long type; |
| 34 | }; | 33 | }; |
| 35 | 34 | ||
| 36 | int trap_curbuf = 0; | ||
| 37 | struct trap_trace_entry trapbuf[1024]; | ||
| 38 | |||
| 39 | void syscall_trace_entry(struct pt_regs *regs) | 35 | void syscall_trace_entry(struct pt_regs *regs) |
| 40 | { | 36 | { |
| 41 | printk("%s[%d]: ", current->comm, task_pid_nr(current)); | 37 | printk("%s[%d]: ", current->comm, task_pid_nr(current)); |
| @@ -72,7 +68,7 @@ void sun4d_nmi(struct pt_regs *regs) | |||
| 72 | prom_halt(); | 68 | prom_halt(); |
| 73 | } | 69 | } |
| 74 | 70 | ||
| 75 | void instruction_dump (unsigned long *pc) | 71 | static void instruction_dump(unsigned long *pc) |
| 76 | { | 72 | { |
| 77 | int i; | 73 | int i; |
| 78 | 74 | ||
| @@ -119,8 +115,8 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
| 119 | count++ < 30 && | 115 | count++ < 30 && |
| 120 | (((unsigned long) rw) >= PAGE_OFFSET) && | 116 | (((unsigned long) rw) >= PAGE_OFFSET) && |
| 121 | !(((unsigned long) rw) & 0x7)) { | 117 | !(((unsigned long) rw) & 0x7)) { |
| 122 | printk("Caller[%08lx]", rw->ins[7]); | 118 | printk("Caller[%08lx]: %pS\n", rw->ins[7], |
| 123 | print_symbol(": %s\n", rw->ins[7]); | 119 | (void *) rw->ins[7]); |
| 124 | rw = (struct reg_window *)rw->ins[6]; | 120 | rw = (struct reg_window *)rw->ins[6]; |
| 125 | } | 121 | } |
| 126 | } | 122 | } |
| @@ -479,10 +475,6 @@ void do_BUG(const char *file, int line) | |||
| 479 | 475 | ||
| 480 | extern void sparc_cpu_startup(void); | 476 | extern void sparc_cpu_startup(void); |
| 481 | 477 | ||
| 482 | int linux_smp_still_initting; | ||
| 483 | unsigned int thiscpus_tbr; | ||
| 484 | int thiscpus_mid; | ||
| 485 | |||
| 486 | void trap_init(void) | 478 | void trap_init(void) |
| 487 | { | 479 | { |
| 488 | extern void thread_info_offsets_are_bolixed_pete(void); | 480 | extern void thread_info_offsets_are_bolixed_pete(void); |
diff --git a/arch/sparc/kernel/wof.S b/arch/sparc/kernel/wof.S index 4bce38dfe3c5..3bbcd8dc9abf 100644 --- a/arch/sparc/kernel/wof.S +++ b/arch/sparc/kernel/wof.S | |||
| @@ -306,7 +306,6 @@ spwin_bad_ustack_from_kernel: | |||
| 306 | * As noted above %curptr cannot be touched by this routine at all. | 306 | * As noted above %curptr cannot be touched by this routine at all. |
| 307 | */ | 307 | */ |
| 308 | 308 | ||
| 309 | .globl spwin_sun4c_stackchk | ||
| 310 | spwin_sun4c_stackchk: | 309 | spwin_sun4c_stackchk: |
| 311 | /* LOCATION: Window to be saved on the stack */ | 310 | /* LOCATION: Window to be saved on the stack */ |
| 312 | 311 | ||
diff --git a/arch/sparc/kernel/wuf.S b/arch/sparc/kernel/wuf.S index 82e5145b0f77..779ff750603d 100644 --- a/arch/sparc/kernel/wuf.S +++ b/arch/sparc/kernel/wuf.S | |||
| @@ -243,7 +243,6 @@ fwin_user_finish_up: | |||
| 243 | */ | 243 | */ |
| 244 | 244 | ||
| 245 | .align 4 | 245 | .align 4 |
| 246 | .globl sun4c_fwin_stackchk | ||
| 247 | sun4c_fwin_stackchk: | 246 | sun4c_fwin_stackchk: |
| 248 | /* LOCATION: Window 'W' */ | 247 | /* LOCATION: Window 'W' */ |
| 249 | 248 | ||
