diff options
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/process.c | 16 | ||||
-rw-r--r-- | arch/sparc/kernel/ptrace.c | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/sparc_ksyms.c | 20 | ||||
-rw-r--r-- | arch/sparc/prom/memory.c | 28 | ||||
-rw-r--r-- | arch/sparc/prom/sun4prom.c | 2 |
5 files changed, 45 insertions, 24 deletions
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index 143fe2f3c1c4..2c216ffeea90 100644 --- a/arch/sparc/kernel/process.c +++ b/arch/sparc/kernel/process.c | |||
@@ -83,9 +83,6 @@ void default_idle(void) | |||
83 | */ | 83 | */ |
84 | void cpu_idle(void) | 84 | void cpu_idle(void) |
85 | { | 85 | { |
86 | if (current->pid != 0) | ||
87 | goto out; | ||
88 | |||
89 | /* endless idle loop with no priority at all */ | 86 | /* endless idle loop with no priority at all */ |
90 | for (;;) { | 87 | for (;;) { |
91 | if (ARCH_SUN4C_SUN4) { | 88 | if (ARCH_SUN4C_SUN4) { |
@@ -126,8 +123,6 @@ void cpu_idle(void) | |||
126 | schedule(); | 123 | schedule(); |
127 | check_pgt_cache(); | 124 | check_pgt_cache(); |
128 | } | 125 | } |
129 | out: | ||
130 | return; | ||
131 | } | 126 | } |
132 | 127 | ||
133 | #else | 128 | #else |
@@ -333,6 +328,17 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
333 | printk("\n"); | 328 | printk("\n"); |
334 | } | 329 | } |
335 | 330 | ||
331 | void dump_stack(void) | ||
332 | { | ||
333 | unsigned long *ksp; | ||
334 | |||
335 | __asm__ __volatile__("mov %%fp, %0" | ||
336 | : "=r" (ksp)); | ||
337 | show_stack(current, ksp); | ||
338 | } | ||
339 | |||
340 | EXPORT_SYMBOL(dump_stack); | ||
341 | |||
336 | /* | 342 | /* |
337 | * Note: sparc64 has a pretty intricated thread_saved_pc, check it out. | 343 | * Note: sparc64 has a pretty intricated thread_saved_pc, check it out. |
338 | */ | 344 | */ |
diff --git a/arch/sparc/kernel/ptrace.c b/arch/sparc/kernel/ptrace.c index c4f93bd2daf2..475c4c13462c 100644 --- a/arch/sparc/kernel/ptrace.c +++ b/arch/sparc/kernel/ptrace.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/smp.h> | 18 | #include <linux/smp.h> |
19 | #include <linux/smp_lock.h> | 19 | #include <linux/smp_lock.h> |
20 | #include <linux/security.h> | 20 | #include <linux/security.h> |
21 | #include <linux/signal.h> | ||
21 | 22 | ||
22 | #include <asm/pgtable.h> | 23 | #include <asm/pgtable.h> |
23 | #include <asm/system.h> | 24 | #include <asm/system.h> |
@@ -526,7 +527,7 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
526 | addr = 1; | 527 | addr = 1; |
527 | 528 | ||
528 | case PTRACE_CONT: { /* restart after signal. */ | 529 | case PTRACE_CONT: { /* restart after signal. */ |
529 | if (data > _NSIG) { | 530 | if (!valid_signal(data)) { |
530 | pt_error_return(regs, EIO); | 531 | pt_error_return(regs, EIO); |
531 | goto out_tsk; | 532 | goto out_tsk; |
532 | } | 533 | } |
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index f91b0e8d0dc8..1bd430d0ca06 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/in6.h> | 20 | #include <linux/in6.h> |
21 | #include <linux/spinlock.h> | 21 | #include <linux/spinlock.h> |
22 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
23 | #include <linux/syscalls.h> | ||
23 | #ifdef CONFIG_PCI | 24 | #ifdef CONFIG_PCI |
24 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
25 | #endif | 26 | #endif |
@@ -89,6 +90,9 @@ extern void ___atomic24_sub(void); | |||
89 | extern void ___set_bit(void); | 90 | extern void ___set_bit(void); |
90 | extern void ___clear_bit(void); | 91 | extern void ___clear_bit(void); |
91 | extern void ___change_bit(void); | 92 | extern void ___change_bit(void); |
93 | extern void ___rw_read_enter(void); | ||
94 | extern void ___rw_read_exit(void); | ||
95 | extern void ___rw_write_enter(void); | ||
92 | 96 | ||
93 | /* Alias functions whose names begin with "." and export the aliases. | 97 | /* Alias functions whose names begin with "." and export the aliases. |
94 | * The module references will be fixed up by module_frob_arch_sections. | 98 | * The module references will be fixed up by module_frob_arch_sections. |
@@ -121,9 +125,9 @@ EXPORT_SYMBOL(_do_write_unlock); | |||
121 | #endif | 125 | #endif |
122 | #else | 126 | #else |
123 | // XXX find what uses (or used) these. | 127 | // XXX find what uses (or used) these. |
124 | // EXPORT_SYMBOL_PRIVATE(_rw_read_enter); | 128 | EXPORT_SYMBOL(___rw_read_enter); |
125 | // EXPORT_SYMBOL_PRIVATE(_rw_read_exit); | 129 | EXPORT_SYMBOL(___rw_read_exit); |
126 | // EXPORT_SYMBOL_PRIVATE(_rw_write_enter); | 130 | EXPORT_SYMBOL(___rw_write_enter); |
127 | #endif | 131 | #endif |
128 | /* semaphores */ | 132 | /* semaphores */ |
129 | EXPORT_SYMBOL(__up); | 133 | EXPORT_SYMBOL(__up); |
@@ -144,6 +148,9 @@ EXPORT_SYMBOL(___set_bit); | |||
144 | EXPORT_SYMBOL(___clear_bit); | 148 | EXPORT_SYMBOL(___clear_bit); |
145 | EXPORT_SYMBOL(___change_bit); | 149 | EXPORT_SYMBOL(___change_bit); |
146 | 150 | ||
151 | /* Per-CPU information table */ | ||
152 | EXPORT_PER_CPU_SYMBOL(__cpu_data); | ||
153 | |||
147 | #ifdef CONFIG_SMP | 154 | #ifdef CONFIG_SMP |
148 | /* IRQ implementation. */ | 155 | /* IRQ implementation. */ |
149 | EXPORT_SYMBOL(synchronize_irq); | 156 | EXPORT_SYMBOL(synchronize_irq); |
@@ -151,6 +158,10 @@ EXPORT_SYMBOL(synchronize_irq); | |||
151 | /* Misc SMP information */ | 158 | /* Misc SMP information */ |
152 | EXPORT_SYMBOL(__cpu_number_map); | 159 | EXPORT_SYMBOL(__cpu_number_map); |
153 | EXPORT_SYMBOL(__cpu_logical_map); | 160 | EXPORT_SYMBOL(__cpu_logical_map); |
161 | |||
162 | /* CPU online map and active count. */ | ||
163 | EXPORT_SYMBOL(cpu_online_map); | ||
164 | EXPORT_SYMBOL(phys_cpu_present_map); | ||
154 | #endif | 165 | #endif |
155 | 166 | ||
156 | EXPORT_SYMBOL(__udelay); | 167 | EXPORT_SYMBOL(__udelay); |
@@ -332,3 +343,6 @@ EXPORT_SYMBOL(do_BUG); | |||
332 | 343 | ||
333 | /* Sun Power Management Idle Handler */ | 344 | /* Sun Power Management Idle Handler */ |
334 | EXPORT_SYMBOL(pm_idle); | 345 | EXPORT_SYMBOL(pm_idle); |
346 | |||
347 | /* Binfmt_misc needs this */ | ||
348 | EXPORT_SYMBOL(sys_close); | ||
diff --git a/arch/sparc/prom/memory.c b/arch/sparc/prom/memory.c index 46aa51afec14..c20e5309f8aa 100644 --- a/arch/sparc/prom/memory.c +++ b/arch/sparc/prom/memory.c | |||
@@ -47,9 +47,9 @@ prom_sortmemlist(struct linux_mlist_v0 *thislist) | |||
47 | char *tmpaddr; | 47 | char *tmpaddr; |
48 | char *lowest; | 48 | char *lowest; |
49 | 49 | ||
50 | for(i=0; thislist[i].theres_more != 0; i++) { | 50 | for(i=0; thislist[i].theres_more; i++) { |
51 | lowest = thislist[i].start_adr; | 51 | lowest = thislist[i].start_adr; |
52 | for(mitr = i+1; thislist[mitr-1].theres_more != 0; mitr++) | 52 | for(mitr = i+1; thislist[mitr-1].theres_more; mitr++) |
53 | if(thislist[mitr].start_adr < lowest) { | 53 | if(thislist[mitr].start_adr < lowest) { |
54 | lowest = thislist[mitr].start_adr; | 54 | lowest = thislist[mitr].start_adr; |
55 | swapi = mitr; | 55 | swapi = mitr; |
@@ -85,7 +85,7 @@ void __init prom_meminit(void) | |||
85 | prom_phys_total[iter].num_bytes = mptr->num_bytes; | 85 | prom_phys_total[iter].num_bytes = mptr->num_bytes; |
86 | prom_phys_total[iter].theres_more = &prom_phys_total[iter+1]; | 86 | prom_phys_total[iter].theres_more = &prom_phys_total[iter+1]; |
87 | } | 87 | } |
88 | prom_phys_total[iter-1].theres_more = 0x0; | 88 | prom_phys_total[iter-1].theres_more = NULL; |
89 | /* Second, the total prom taken descriptors. */ | 89 | /* Second, the total prom taken descriptors. */ |
90 | for(mptr = (*(romvec->pv_v0mem.v0_prommap)), iter=0; | 90 | for(mptr = (*(romvec->pv_v0mem.v0_prommap)), iter=0; |
91 | mptr; mptr=mptr->theres_more, iter++) { | 91 | mptr; mptr=mptr->theres_more, iter++) { |
@@ -93,7 +93,7 @@ void __init prom_meminit(void) | |||
93 | prom_prom_taken[iter].num_bytes = mptr->num_bytes; | 93 | prom_prom_taken[iter].num_bytes = mptr->num_bytes; |
94 | prom_prom_taken[iter].theres_more = &prom_prom_taken[iter+1]; | 94 | prom_prom_taken[iter].theres_more = &prom_prom_taken[iter+1]; |
95 | } | 95 | } |
96 | prom_prom_taken[iter-1].theres_more = 0x0; | 96 | prom_prom_taken[iter-1].theres_more = NULL; |
97 | /* Last, the available physical descriptors. */ | 97 | /* Last, the available physical descriptors. */ |
98 | for(mptr = (*(romvec->pv_v0mem.v0_available)), iter=0; | 98 | for(mptr = (*(romvec->pv_v0mem.v0_available)), iter=0; |
99 | mptr; mptr=mptr->theres_more, iter++) { | 99 | mptr; mptr=mptr->theres_more, iter++) { |
@@ -101,7 +101,7 @@ void __init prom_meminit(void) | |||
101 | prom_phys_avail[iter].num_bytes = mptr->num_bytes; | 101 | prom_phys_avail[iter].num_bytes = mptr->num_bytes; |
102 | prom_phys_avail[iter].theres_more = &prom_phys_avail[iter+1]; | 102 | prom_phys_avail[iter].theres_more = &prom_phys_avail[iter+1]; |
103 | } | 103 | } |
104 | prom_phys_avail[iter-1].theres_more = 0x0; | 104 | prom_phys_avail[iter-1].theres_more = NULL; |
105 | /* Sort all the lists. */ | 105 | /* Sort all the lists. */ |
106 | prom_sortmemlist(prom_phys_total); | 106 | prom_sortmemlist(prom_phys_total); |
107 | prom_sortmemlist(prom_prom_taken); | 107 | prom_sortmemlist(prom_prom_taken); |
@@ -124,7 +124,7 @@ void __init prom_meminit(void) | |||
124 | prom_phys_avail[iter].theres_more = | 124 | prom_phys_avail[iter].theres_more = |
125 | &prom_phys_avail[iter+1]; | 125 | &prom_phys_avail[iter+1]; |
126 | } | 126 | } |
127 | prom_phys_avail[iter-1].theres_more = 0x0; | 127 | prom_phys_avail[iter-1].theres_more = NULL; |
128 | 128 | ||
129 | num_regs = prom_getproperty(node, "reg", | 129 | num_regs = prom_getproperty(node, "reg", |
130 | (char *) prom_reg_memlist, | 130 | (char *) prom_reg_memlist, |
@@ -138,7 +138,7 @@ void __init prom_meminit(void) | |||
138 | prom_phys_total[iter].theres_more = | 138 | prom_phys_total[iter].theres_more = |
139 | &prom_phys_total[iter+1]; | 139 | &prom_phys_total[iter+1]; |
140 | } | 140 | } |
141 | prom_phys_total[iter-1].theres_more = 0x0; | 141 | prom_phys_total[iter-1].theres_more = NULL; |
142 | 142 | ||
143 | node = prom_getchild(prom_root_node); | 143 | node = prom_getchild(prom_root_node); |
144 | node = prom_searchsiblings(node, "virtual-memory"); | 144 | node = prom_searchsiblings(node, "virtual-memory"); |
@@ -158,7 +158,7 @@ void __init prom_meminit(void) | |||
158 | prom_prom_taken[iter].theres_more = | 158 | prom_prom_taken[iter].theres_more = |
159 | &prom_prom_taken[iter+1]; | 159 | &prom_prom_taken[iter+1]; |
160 | } | 160 | } |
161 | prom_prom_taken[iter-1].theres_more = 0x0; | 161 | prom_prom_taken[iter-1].theres_more = NULL; |
162 | 162 | ||
163 | prom_sortmemlist(prom_prom_taken); | 163 | prom_sortmemlist(prom_prom_taken); |
164 | 164 | ||
@@ -182,15 +182,15 @@ void __init prom_meminit(void) | |||
182 | case PROM_SUN4: | 182 | case PROM_SUN4: |
183 | #ifdef CONFIG_SUN4 | 183 | #ifdef CONFIG_SUN4 |
184 | /* how simple :) */ | 184 | /* how simple :) */ |
185 | prom_phys_total[0].start_adr = 0x0; | 185 | prom_phys_total[0].start_adr = NULL; |
186 | prom_phys_total[0].num_bytes = *(sun4_romvec->memorysize); | 186 | prom_phys_total[0].num_bytes = *(sun4_romvec->memorysize); |
187 | prom_phys_total[0].theres_more = 0x0; | 187 | prom_phys_total[0].theres_more = NULL; |
188 | prom_prom_taken[0].start_adr = 0x0; | 188 | prom_prom_taken[0].start_adr = NULL; |
189 | prom_prom_taken[0].num_bytes = 0x0; | 189 | prom_prom_taken[0].num_bytes = 0x0; |
190 | prom_prom_taken[0].theres_more = 0x0; | 190 | prom_prom_taken[0].theres_more = NULL; |
191 | prom_phys_avail[0].start_adr = 0x0; | 191 | prom_phys_avail[0].start_adr = NULL; |
192 | prom_phys_avail[0].num_bytes = *(sun4_romvec->memoryavail); | 192 | prom_phys_avail[0].num_bytes = *(sun4_romvec->memoryavail); |
193 | prom_phys_avail[0].theres_more = 0x0; | 193 | prom_phys_avail[0].theres_more = NULL; |
194 | #endif | 194 | #endif |
195 | break; | 195 | break; |
196 | 196 | ||
diff --git a/arch/sparc/prom/sun4prom.c b/arch/sparc/prom/sun4prom.c index 69ca735f0d4e..00390a2652aa 100644 --- a/arch/sparc/prom/sun4prom.c +++ b/arch/sparc/prom/sun4prom.c | |||
@@ -151,7 +151,7 @@ struct linux_romvec * __init sun4_prom_init(void) | |||
151 | * have more time, we can teach the penguin to say "By your | 151 | * have more time, we can teach the penguin to say "By your |
152 | * command" or "Activating turbo boost, Michael". :-) | 152 | * command" or "Activating turbo boost, Michael". :-) |
153 | */ | 153 | */ |
154 | sun4_romvec->setLEDs(0x0); | 154 | sun4_romvec->setLEDs(NULL); |
155 | 155 | ||
156 | printk("PROMLIB: Old Sun4 boot PROM monitor %s, romvec version %d\n", | 156 | printk("PROMLIB: Old Sun4 boot PROM monitor %s, romvec version %d\n", |
157 | sun4_romvec->monid, | 157 | sun4_romvec->monid, |