diff options
Diffstat (limited to 'arch/sparc')
30 files changed, 107 insertions, 132 deletions
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 789724e61e83..375de7c6d082 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -298,20 +298,6 @@ config UNIX98_PTYS | |||
298 | Read the instructions in <file:Documentation/Changes> pertaining to | 298 | Read the instructions in <file:Documentation/Changes> pertaining to |
299 | pseudo terminals. It's safe to say N. | 299 | pseudo terminals. It's safe to say N. |
300 | 300 | ||
301 | config UNIX98_PTY_COUNT | ||
302 | int "Maximum number of Unix98 PTYs in use (0-2048)" | ||
303 | depends on UNIX98_PTYS | ||
304 | default "256" | ||
305 | help | ||
306 | The maximum number of Unix98 PTYs that can be used at any one time. | ||
307 | The default is 256, and should be enough for desktop systems. Server | ||
308 | machines which support incoming telnet/rlogin/ssh connections and/or | ||
309 | serve several X terminals may want to increase this: every incoming | ||
310 | connection and every xterm uses up one PTY. | ||
311 | |||
312 | When not in use, each additional set of 256 PTYs occupy | ||
313 | approximately 8 KB of kernel memory on 32-bit architectures. | ||
314 | |||
315 | endmenu | 301 | endmenu |
316 | 302 | ||
317 | source "fs/Kconfig" | 303 | source "fs/Kconfig" |
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index fef28e267a52..6668e6037af6 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile | |||
@@ -18,6 +18,7 @@ CHECKFLAGS += -D__sparc__ | |||
18 | #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 | 18 | #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 |
19 | KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 | 19 | KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 |
20 | KBUILD_AFLAGS += -m32 | 20 | KBUILD_AFLAGS += -m32 |
21 | CPPFLAGS_vmlinux.lds += -m32 | ||
21 | 22 | ||
22 | #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 | 23 | #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 |
23 | # Since 2.5.40, the first stage is left not btfix-ed. | 24 | # Since 2.5.40, the first stage is left not btfix-ed. |
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..2f96256dc515 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 |
@@ -1317,7 +1318,6 @@ linux_sparc_syscall: | |||
1317 | bne linux_fast_syscall | 1318 | bne linux_fast_syscall |
1318 | /* Just do first insn from SAVE_ALL in the delay slot */ | 1319 | /* Just do first insn from SAVE_ALL in the delay slot */ |
1319 | 1320 | ||
1320 | .globl syscall_is_too_hard | ||
1321 | syscall_is_too_hard: | 1321 | syscall_is_too_hard: |
1322 | SAVE_ALL_HEAD | 1322 | SAVE_ALL_HEAD |
1323 | rd %wim, %l3 | 1323 | rd %wim, %l3 |
@@ -1544,8 +1544,7 @@ kgdb_trap_low: | |||
1544 | #endif | 1544 | #endif |
1545 | 1545 | ||
1546 | .align 4 | 1546 | .align 4 |
1547 | .globl __handle_exception, flush_patch_exception | 1547 | .globl flush_patch_exception |
1548 | __handle_exception: | ||
1549 | flush_patch_exception: | 1548 | flush_patch_exception: |
1550 | FLUSH_ALL_KERNEL_WINDOWS; | 1549 | FLUSH_ALL_KERNEL_WINDOWS; |
1551 | ldd [%o0], %o6 | 1550 | 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/rtrap.S b/arch/sparc/kernel/rtrap.S index ce30082ab266..891f460b7b96 100644 --- a/arch/sparc/kernel/rtrap.S +++ b/arch/sparc/kernel/rtrap.S | |||
@@ -224,8 +224,6 @@ ret_trap_user_stack_is_bolixed: | |||
224 | b signal_p | 224 | b signal_p |
225 | ld [%curptr + TI_FLAGS], %g2 | 225 | ld [%curptr + TI_FLAGS], %g2 |
226 | 226 | ||
227 | |||
228 | .globl sun4c_rett_stackchk | ||
229 | sun4c_rett_stackchk: | 227 | sun4c_rett_stackchk: |
230 | be 1f | 228 | be 1f |
231 | and %fp, 0xfff, %g1 ! delay slot | 229 | 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/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 | ||
diff --git a/arch/sparc/mm/fault.c b/arch/sparc/mm/fault.c index 0a3cd8f6cfe4..3604c2e86709 100644 --- a/arch/sparc/mm/fault.c +++ b/arch/sparc/mm/fault.c | |||
@@ -451,7 +451,7 @@ asmlinkage void do_sun4c_fault(struct pt_regs *regs, int text_fault, int write, | |||
451 | } | 451 | } |
452 | 452 | ||
453 | /* This always deals with user addresses. */ | 453 | /* This always deals with user addresses. */ |
454 | inline void force_user_fault(unsigned long address, int write) | 454 | static void force_user_fault(unsigned long address, int write) |
455 | { | 455 | { |
456 | struct vm_area_struct *vma; | 456 | struct vm_area_struct *vma; |
457 | struct task_struct *tsk = current; | 457 | struct task_struct *tsk = current; |
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c index 7794ecb896e3..e103f1bb3777 100644 --- a/arch/sparc/mm/init.c +++ b/arch/sparc/mm/init.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/highmem.h> | 23 | #include <linux/highmem.h> |
24 | #include <linux/bootmem.h> | 24 | #include <linux/bootmem.h> |
25 | #include <linux/pagemap.h> | ||
25 | 26 | ||
26 | #include <asm/system.h> | 27 | #include <asm/system.h> |
27 | #include <asm/vac-ops.h> | 28 | #include <asm/vac-ops.h> |
@@ -128,7 +129,7 @@ unsigned long calc_highpages(void) | |||
128 | return nr; | 129 | return nr; |
129 | } | 130 | } |
130 | 131 | ||
131 | unsigned long calc_max_low_pfn(void) | 132 | static unsigned long calc_max_low_pfn(void) |
132 | { | 133 | { |
133 | int i; | 134 | int i; |
134 | unsigned long tmp = pfn_base + (SRMMU_MAXMEM >> PAGE_SHIFT); | 135 | unsigned long tmp = pfn_base + (SRMMU_MAXMEM >> PAGE_SHIFT); |
@@ -292,7 +293,7 @@ unsigned long __init bootmem_init(unsigned long *pages_avail) | |||
292 | * | 293 | * |
293 | * We simply copy the 2.4 implementation for now. | 294 | * We simply copy the 2.4 implementation for now. |
294 | */ | 295 | */ |
295 | int pgt_cache_water[2] = { 25, 50 }; | 296 | static int pgt_cache_water[2] = { 25, 50 }; |
296 | 297 | ||
297 | void check_pgt_cache(void) | 298 | void check_pgt_cache(void) |
298 | { | 299 | { |
@@ -356,8 +357,6 @@ void __init paging_init(void) | |||
356 | device_scan(); | 357 | device_scan(); |
357 | } | 358 | } |
358 | 359 | ||
359 | struct cache_palias *sparc_aliases; | ||
360 | |||
361 | static void __init taint_real_pages(void) | 360 | static void __init taint_real_pages(void) |
362 | { | 361 | { |
363 | int i; | 362 | int i; |
@@ -375,7 +374,7 @@ static void __init taint_real_pages(void) | |||
375 | } | 374 | } |
376 | } | 375 | } |
377 | 376 | ||
378 | void map_high_region(unsigned long start_pfn, unsigned long end_pfn) | 377 | static void map_high_region(unsigned long start_pfn, unsigned long end_pfn) |
379 | { | 378 | { |
380 | unsigned long tmp; | 379 | unsigned long tmp; |
381 | 380 | ||
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 23d3291a3e81..ee30462598fc 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -50,7 +50,7 @@ | |||
50 | #include <asm/btfixup.h> | 50 | #include <asm/btfixup.h> |
51 | 51 | ||
52 | enum mbus_module srmmu_modtype; | 52 | enum mbus_module srmmu_modtype; |
53 | unsigned int hwbug_bitmask; | 53 | static unsigned int hwbug_bitmask; |
54 | int vac_cache_size; | 54 | int vac_cache_size; |
55 | int vac_line_size; | 55 | int vac_line_size; |
56 | 56 | ||
@@ -60,7 +60,7 @@ extern unsigned long last_valid_pfn; | |||
60 | 60 | ||
61 | extern unsigned long page_kernel; | 61 | extern unsigned long page_kernel; |
62 | 62 | ||
63 | pgd_t *srmmu_swapper_pg_dir; | 63 | static pgd_t *srmmu_swapper_pg_dir; |
64 | 64 | ||
65 | #ifdef CONFIG_SMP | 65 | #ifdef CONFIG_SMP |
66 | #define FLUSH_BEGIN(mm) | 66 | #define FLUSH_BEGIN(mm) |
@@ -83,12 +83,12 @@ BTFIXUPDEF_CALL(void, local_flush_page_for_dma, unsigned long) | |||
83 | char *srmmu_name; | 83 | char *srmmu_name; |
84 | 84 | ||
85 | ctxd_t *srmmu_ctx_table_phys; | 85 | ctxd_t *srmmu_ctx_table_phys; |
86 | ctxd_t *srmmu_context_table; | 86 | static ctxd_t *srmmu_context_table; |
87 | 87 | ||
88 | int viking_mxcc_present; | 88 | int viking_mxcc_present; |
89 | static DEFINE_SPINLOCK(srmmu_context_spinlock); | 89 | static DEFINE_SPINLOCK(srmmu_context_spinlock); |
90 | 90 | ||
91 | int is_hypersparc; | 91 | static int is_hypersparc; |
92 | 92 | ||
93 | /* | 93 | /* |
94 | * In general all page table modifications should use the V8 atomic | 94 | * In general all page table modifications should use the V8 atomic |
@@ -112,11 +112,11 @@ static inline int srmmu_device_memory(unsigned long x) | |||
112 | return ((x & 0xF0000000) != 0); | 112 | return ((x & 0xF0000000) != 0); |
113 | } | 113 | } |
114 | 114 | ||
115 | int srmmu_cache_pagetables; | 115 | static int srmmu_cache_pagetables; |
116 | 116 | ||
117 | /* these will be initialized in srmmu_nocache_calcsize() */ | 117 | /* these will be initialized in srmmu_nocache_calcsize() */ |
118 | unsigned long srmmu_nocache_size; | 118 | static unsigned long srmmu_nocache_size; |
119 | unsigned long srmmu_nocache_end; | 119 | static unsigned long srmmu_nocache_end; |
120 | 120 | ||
121 | /* 1 bit <=> 256 bytes of nocache <=> 64 PTEs */ | 121 | /* 1 bit <=> 256 bytes of nocache <=> 64 PTEs */ |
122 | #define SRMMU_NOCACHE_BITMAP_SHIFT (PAGE_SHIFT - 4) | 122 | #define SRMMU_NOCACHE_BITMAP_SHIFT (PAGE_SHIFT - 4) |
@@ -324,7 +324,7 @@ static unsigned long __srmmu_get_nocache(int size, int align) | |||
324 | return (SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT)); | 324 | return (SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT)); |
325 | } | 325 | } |
326 | 326 | ||
327 | unsigned inline long srmmu_get_nocache(int size, int align) | 327 | static unsigned long srmmu_get_nocache(int size, int align) |
328 | { | 328 | { |
329 | unsigned long tmp; | 329 | unsigned long tmp; |
330 | 330 | ||
@@ -336,7 +336,7 @@ unsigned inline long srmmu_get_nocache(int size, int align) | |||
336 | return tmp; | 336 | return tmp; |
337 | } | 337 | } |
338 | 338 | ||
339 | void srmmu_free_nocache(unsigned long vaddr, int size) | 339 | static void srmmu_free_nocache(unsigned long vaddr, int size) |
340 | { | 340 | { |
341 | int offset; | 341 | int offset; |
342 | 342 | ||
@@ -369,7 +369,8 @@ void srmmu_free_nocache(unsigned long vaddr, int size) | |||
369 | bit_map_clear(&srmmu_nocache_map, offset, size); | 369 | bit_map_clear(&srmmu_nocache_map, offset, size); |
370 | } | 370 | } |
371 | 371 | ||
372 | void srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned long end); | 372 | static void srmmu_early_allocate_ptable_skeleton(unsigned long start, |
373 | unsigned long end); | ||
373 | 374 | ||
374 | extern unsigned long probe_memory(void); /* in fault.c */ | 375 | extern unsigned long probe_memory(void); /* in fault.c */ |
375 | 376 | ||
@@ -377,7 +378,7 @@ extern unsigned long probe_memory(void); /* in fault.c */ | |||
377 | * Reserve nocache dynamically proportionally to the amount of | 378 | * Reserve nocache dynamically proportionally to the amount of |
378 | * system RAM. -- Tomas Szepe <szepe@pinerecords.com>, June 2002 | 379 | * system RAM. -- Tomas Szepe <szepe@pinerecords.com>, June 2002 |
379 | */ | 380 | */ |
380 | void srmmu_nocache_calcsize(void) | 381 | static void srmmu_nocache_calcsize(void) |
381 | { | 382 | { |
382 | unsigned long sysmemavail = probe_memory() / 1024; | 383 | unsigned long sysmemavail = probe_memory() / 1024; |
383 | int srmmu_nocache_npages; | 384 | int srmmu_nocache_npages; |
@@ -398,7 +399,7 @@ void srmmu_nocache_calcsize(void) | |||
398 | srmmu_nocache_end = SRMMU_NOCACHE_VADDR + srmmu_nocache_size; | 399 | srmmu_nocache_end = SRMMU_NOCACHE_VADDR + srmmu_nocache_size; |
399 | } | 400 | } |
400 | 401 | ||
401 | void __init srmmu_nocache_init(void) | 402 | static void __init srmmu_nocache_init(void) |
402 | { | 403 | { |
403 | unsigned int bitmap_bits; | 404 | unsigned int bitmap_bits; |
404 | pgd_t *pgd; | 405 | pgd_t *pgd; |
@@ -645,7 +646,7 @@ static void srmmu_unmapiorange(unsigned long virt_addr, unsigned int len) | |||
645 | * mappings on the kernel stack without any special code as we did | 646 | * mappings on the kernel stack without any special code as we did |
646 | * need on the sun4c. | 647 | * need on the sun4c. |
647 | */ | 648 | */ |
648 | struct thread_info *srmmu_alloc_thread_info(void) | 649 | static struct thread_info *srmmu_alloc_thread_info(void) |
649 | { | 650 | { |
650 | struct thread_info *ret; | 651 | struct thread_info *ret; |
651 | 652 | ||
@@ -1045,13 +1046,14 @@ extern void hypersparc_setup_blockops(void); | |||
1045 | * around 8mb mapped for us. | 1046 | * around 8mb mapped for us. |
1046 | */ | 1047 | */ |
1047 | 1048 | ||
1048 | void __init early_pgtable_allocfail(char *type) | 1049 | static void __init early_pgtable_allocfail(char *type) |
1049 | { | 1050 | { |
1050 | prom_printf("inherit_prom_mappings: Cannot alloc kernel %s.\n", type); | 1051 | prom_printf("inherit_prom_mappings: Cannot alloc kernel %s.\n", type); |
1051 | prom_halt(); | 1052 | prom_halt(); |
1052 | } | 1053 | } |
1053 | 1054 | ||
1054 | void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned long end) | 1055 | static void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, |
1056 | unsigned long end) | ||
1055 | { | 1057 | { |
1056 | pgd_t *pgdp; | 1058 | pgd_t *pgdp; |
1057 | pmd_t *pmdp; | 1059 | pmd_t *pmdp; |
@@ -1081,7 +1083,8 @@ void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned l | |||
1081 | } | 1083 | } |
1082 | } | 1084 | } |
1083 | 1085 | ||
1084 | void __init srmmu_allocate_ptable_skeleton(unsigned long start, unsigned long end) | 1086 | static void __init srmmu_allocate_ptable_skeleton(unsigned long start, |
1087 | unsigned long end) | ||
1085 | { | 1088 | { |
1086 | pgd_t *pgdp; | 1089 | pgd_t *pgdp; |
1087 | pmd_t *pmdp; | 1090 | pmd_t *pmdp; |
@@ -1116,7 +1119,8 @@ void __init srmmu_allocate_ptable_skeleton(unsigned long start, unsigned long en | |||
1116 | * looking at the prom's page table directly which is what most | 1119 | * looking at the prom's page table directly which is what most |
1117 | * other OS's do. Yuck... this is much better. | 1120 | * other OS's do. Yuck... this is much better. |
1118 | */ | 1121 | */ |
1119 | void __init srmmu_inherit_prom_mappings(unsigned long start,unsigned long end) | 1122 | static void __init srmmu_inherit_prom_mappings(unsigned long start, |
1123 | unsigned long end) | ||
1120 | { | 1124 | { |
1121 | pgd_t *pgdp; | 1125 | pgd_t *pgdp; |
1122 | pmd_t *pmdp; | 1126 | pmd_t *pmdp; |
@@ -1348,8 +1352,7 @@ void __init srmmu_paging_init(void) | |||
1348 | zones_size[ZONE_HIGHMEM] = npages; | 1352 | zones_size[ZONE_HIGHMEM] = npages; |
1349 | zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); | 1353 | zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); |
1350 | 1354 | ||
1351 | free_area_init_node(0, &contig_page_data, zones_size, | 1355 | free_area_init_node(0, zones_size, pfn_base, zholes_size); |
1352 | pfn_base, zholes_size); | ||
1353 | } | 1356 | } |
1354 | } | 1357 | } |
1355 | 1358 | ||
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index 2375fe9dc312..d1782f6368be 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c | |||
@@ -2123,8 +2123,7 @@ void __init sun4c_paging_init(void) | |||
2123 | zones_size[ZONE_HIGHMEM] = npages; | 2123 | zones_size[ZONE_HIGHMEM] = npages; |
2124 | zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); | 2124 | zholes_size[ZONE_HIGHMEM] = npages - calc_highpages(); |
2125 | 2125 | ||
2126 | free_area_init_node(0, &contig_page_data, zones_size, | 2126 | free_area_init_node(0, zones_size, pfn_base, zholes_size); |
2127 | pfn_base, zholes_size); | ||
2128 | } | 2127 | } |
2129 | 2128 | ||
2130 | cnt = 0; | 2129 | cnt = 0; |
diff --git a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S index db0d6de33a87..4e55e8f76648 100644 --- a/arch/sparc/mm/tsunami.S +++ b/arch/sparc/mm/tsunami.S | |||
@@ -93,7 +93,6 @@ tsunami_flush_tlb_page_out: | |||
93 | ldd [src + offset + 0x00], t2; \ | 93 | ldd [src + offset + 0x00], t2; \ |
94 | std t2, [dst + offset + 0x00]; | 94 | std t2, [dst + offset + 0x00]; |
95 | 95 | ||
96 | .globl tsunami_copy_1page | ||
97 | tsunami_copy_1page: | 96 | tsunami_copy_1page: |
98 | /* NOTE: This routine has to be shorter than 70insns --jj */ | 97 | /* NOTE: This routine has to be shorter than 70insns --jj */ |
99 | or %g0, (PAGE_SIZE >> 8), %g1 | 98 | or %g0, (PAGE_SIZE >> 8), %g1 |