diff options
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/ioport.c | 5 | ||||
-rw-r--r-- | arch/sparc/kernel/module.c | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/pcic.c | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/setup.c | 34 | ||||
-rw-r--r-- | arch/sparc/kernel/smp.c | 47 | ||||
-rw-r--r-- | arch/sparc/kernel/sparc_ksyms.c | 14 | ||||
-rw-r--r-- | arch/sparc/kernel/sun4c_irq.c | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/sun4d_irq.c | 12 | ||||
-rw-r--r-- | arch/sparc/kernel/sun4m_irq.c | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/sun4m_smp.c | 9 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls.S | 3 | ||||
-rw-r--r-- | arch/sparc/mm/iommu.c | 3 |
12 files changed, 81 insertions, 66 deletions
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 460f72e640e6..f9ff29734848 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -274,6 +274,11 @@ void *sbus_alloc_consistent(struct sbus_dev *sdev, long len, u32 *dma_addrp) | |||
274 | if (mmu_map_dma_area(dma_addrp, va, res->start, len_total) != 0) | 274 | if (mmu_map_dma_area(dma_addrp, va, res->start, len_total) != 0) |
275 | goto err_noiommu; | 275 | goto err_noiommu; |
276 | 276 | ||
277 | /* Set the resource name, if known. */ | ||
278 | if (sdev) { | ||
279 | res->name = sdev->prom_name; | ||
280 | } | ||
281 | |||
277 | return (void *)res->start; | 282 | return (void *)res->start; |
278 | 283 | ||
279 | err_noiommu: | 284 | err_noiommu: |
diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c index 787d5f1347ec..598682f31ebf 100644 --- a/arch/sparc/kernel/module.c +++ b/arch/sparc/kernel/module.c | |||
@@ -113,6 +113,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
113 | 113 | ||
114 | switch (ELF32_R_TYPE(rel[i].r_info)) { | 114 | switch (ELF32_R_TYPE(rel[i].r_info)) { |
115 | case R_SPARC_32: | 115 | case R_SPARC_32: |
116 | case R_SPARC_UA32: | ||
116 | location[0] = v >> 24; | 117 | location[0] = v >> 24; |
117 | location[1] = v >> 16; | 118 | location[1] = v >> 16; |
118 | location[2] = v >> 8; | 119 | location[2] = v >> 8; |
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c index 42002b742deb..bcdf5ad0f035 100644 --- a/arch/sparc/kernel/pcic.c +++ b/arch/sparc/kernel/pcic.c | |||
@@ -896,13 +896,6 @@ static inline unsigned long get_irqmask(int irq_nr) | |||
896 | return 1 << irq_nr; | 896 | return 1 << irq_nr; |
897 | } | 897 | } |
898 | 898 | ||
899 | static inline char *pcic_irq_itoa(unsigned int irq) | ||
900 | { | ||
901 | static char buff[16]; | ||
902 | sprintf(buff, "%d", irq); | ||
903 | return buff; | ||
904 | } | ||
905 | |||
906 | static void pcic_disable_irq(unsigned int irq_nr) | 899 | static void pcic_disable_irq(unsigned int irq_nr) |
907 | { | 900 | { |
908 | unsigned long mask, flags; | 901 | unsigned long mask, flags; |
@@ -955,7 +948,6 @@ void __init sun4m_pci_init_IRQ(void) | |||
955 | BTFIXUPSET_CALL(clear_clock_irq, pcic_clear_clock_irq, BTFIXUPCALL_NORM); | 948 | BTFIXUPSET_CALL(clear_clock_irq, pcic_clear_clock_irq, BTFIXUPCALL_NORM); |
956 | BTFIXUPSET_CALL(clear_profile_irq, pcic_clear_profile_irq, BTFIXUPCALL_NORM); | 949 | BTFIXUPSET_CALL(clear_profile_irq, pcic_clear_profile_irq, BTFIXUPCALL_NORM); |
957 | BTFIXUPSET_CALL(load_profile_irq, pcic_load_profile_irq, BTFIXUPCALL_NORM); | 950 | BTFIXUPSET_CALL(load_profile_irq, pcic_load_profile_irq, BTFIXUPCALL_NORM); |
958 | BTFIXUPSET_CALL(__irq_itoa, pcic_irq_itoa, BTFIXUPCALL_NORM); | ||
959 | } | 951 | } |
960 | 952 | ||
961 | int pcibios_assign_resource(struct pci_dev *pdev, int resource) | 953 | int pcibios_assign_resource(struct pci_dev *pdev, int resource) |
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c index 3509e4305532..2cbf282f0d00 100644 --- a/arch/sparc/kernel/setup.c +++ b/arch/sparc/kernel/setup.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/console.h> | 31 | #include <linux/console.h> |
32 | #include <linux/spinlock.h> | 32 | #include <linux/spinlock.h> |
33 | #include <linux/root_dev.h> | 33 | #include <linux/root_dev.h> |
34 | #include <linux/cpu.h> | ||
34 | 35 | ||
35 | #include <asm/system.h> | 36 | #include <asm/system.h> |
36 | #include <asm/io.h> | 37 | #include <asm/io.h> |
@@ -348,6 +349,8 @@ void __init setup_arch(char **cmdline_p) | |||
348 | init_mm.context = (unsigned long) NO_CONTEXT; | 349 | init_mm.context = (unsigned long) NO_CONTEXT; |
349 | init_task.thread.kregs = &fake_swapper_regs; | 350 | init_task.thread.kregs = &fake_swapper_regs; |
350 | 351 | ||
352 | smp_setup_cpu_possible_map(); | ||
353 | |||
351 | paging_init(); | 354 | paging_init(); |
352 | } | 355 | } |
353 | 356 | ||
@@ -389,6 +392,8 @@ console_initcall(set_preferred_console); | |||
389 | extern char *sparc_cpu_type; | 392 | extern char *sparc_cpu_type; |
390 | extern char *sparc_fpu_type; | 393 | extern char *sparc_fpu_type; |
391 | 394 | ||
395 | static int ncpus_probed; | ||
396 | |||
392 | static int show_cpuinfo(struct seq_file *m, void *__unused) | 397 | static int show_cpuinfo(struct seq_file *m, void *__unused) |
393 | { | 398 | { |
394 | seq_printf(m, | 399 | seq_printf(m, |
@@ -411,7 +416,7 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) | |||
411 | romvec->pv_printrev >> 16, | 416 | romvec->pv_printrev >> 16, |
412 | romvec->pv_printrev & 0xffff, | 417 | romvec->pv_printrev & 0xffff, |
413 | &cputypval, | 418 | &cputypval, |
414 | num_possible_cpus(), | 419 | ncpus_probed, |
415 | num_online_cpus() | 420 | num_online_cpus() |
416 | #ifndef CONFIG_SMP | 421 | #ifndef CONFIG_SMP |
417 | , cpu_data(0).udelay_val/(500000/HZ), | 422 | , cpu_data(0).udelay_val/(500000/HZ), |
@@ -471,3 +476,30 @@ void sun_do_break(void) | |||
471 | 476 | ||
472 | int serial_console = -1; | 477 | int serial_console = -1; |
473 | int stop_a_enabled = 1; | 478 | int stop_a_enabled = 1; |
479 | |||
480 | static int __init topology_init(void) | ||
481 | { | ||
482 | int i, ncpus, err; | ||
483 | |||
484 | /* Count the number of physically present processors in | ||
485 | * the machine, even on uniprocessor, so that /proc/cpuinfo | ||
486 | * output is consistent with 2.4.x | ||
487 | */ | ||
488 | ncpus = 0; | ||
489 | while (!cpu_find_by_instance(ncpus, NULL, NULL)) | ||
490 | ncpus++; | ||
491 | ncpus_probed = ncpus; | ||
492 | |||
493 | err = 0; | ||
494 | for_each_online_cpu(i) { | ||
495 | struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL); | ||
496 | if (!p) | ||
497 | err = -ENOMEM; | ||
498 | else | ||
499 | register_cpu(p, i, NULL); | ||
500 | } | ||
501 | |||
502 | return err; | ||
503 | } | ||
504 | |||
505 | subsys_initcall(topology_init); | ||
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c index a93f5da6855d..6135d4faeeeb 100644 --- a/arch/sparc/kernel/smp.c +++ b/arch/sparc/kernel/smp.c | |||
@@ -58,7 +58,7 @@ cpumask_t smp_commenced_mask = CPU_MASK_NONE; | |||
58 | /* Used to make bitops atomic */ | 58 | /* Used to make bitops atomic */ |
59 | unsigned char bitops_spinlock = 0; | 59 | unsigned char bitops_spinlock = 0; |
60 | 60 | ||
61 | void __init smp_store_cpu_info(int id) | 61 | void __cpuinit smp_store_cpu_info(int id) |
62 | { | 62 | { |
63 | int cpu_node; | 63 | int cpu_node; |
64 | 64 | ||
@@ -69,6 +69,17 @@ void __init smp_store_cpu_info(int id) | |||
69 | "clock-frequency", 0); | 69 | "clock-frequency", 0); |
70 | cpu_data(id).prom_node = cpu_node; | 70 | cpu_data(id).prom_node = cpu_node; |
71 | cpu_data(id).mid = cpu_get_hwmid(cpu_node); | 71 | cpu_data(id).mid = cpu_get_hwmid(cpu_node); |
72 | |||
73 | /* this is required to tune the scheduler correctly */ | ||
74 | /* is it possible to have CPUs with different cache sizes? */ | ||
75 | if (id == boot_cpu_id) { | ||
76 | int cache_line,cache_nlines; | ||
77 | cache_line = 0x20; | ||
78 | cache_line = prom_getintdefault(cpu_node, "ecache-line-size", cache_line); | ||
79 | cache_nlines = 0x8000; | ||
80 | cache_nlines = prom_getintdefault(cpu_node, "ecache-nlines", cache_nlines); | ||
81 | max_cache_size = cache_line * cache_nlines; | ||
82 | } | ||
72 | if (cpu_data(id).mid < 0) | 83 | if (cpu_data(id).mid < 0) |
73 | panic("No MID found for CPU%d at node 0x%08d", id, cpu_node); | 84 | panic("No MID found for CPU%d at node 0x%08d", id, cpu_node); |
74 | } | 85 | } |
@@ -256,22 +267,18 @@ int setup_profiling_timer(unsigned int multiplier) | |||
256 | void __init smp_prepare_cpus(unsigned int max_cpus) | 267 | void __init smp_prepare_cpus(unsigned int max_cpus) |
257 | { | 268 | { |
258 | extern void smp4m_boot_cpus(void); | 269 | extern void smp4m_boot_cpus(void); |
259 | int i, cpuid, ncpus, extra; | 270 | int i, cpuid, extra; |
260 | 271 | ||
261 | BUG_ON(sparc_cpu_model != sun4m); | 272 | BUG_ON(sparc_cpu_model != sun4m); |
262 | printk("Entering SMP Mode...\n"); | 273 | printk("Entering SMP Mode...\n"); |
263 | 274 | ||
264 | ncpus = 1; | ||
265 | extra = 0; | 275 | extra = 0; |
266 | for (i = 0; !cpu_find_by_instance(i, NULL, &cpuid); i++) { | 276 | for (i = 0; !cpu_find_by_instance(i, NULL, &cpuid); i++) { |
267 | if (cpuid == boot_cpu_id) | 277 | if (cpuid >= NR_CPUS) |
268 | continue; | ||
269 | if (cpuid < NR_CPUS && ncpus++ < max_cpus) | ||
270 | cpu_set(cpuid, phys_cpu_present_map); | ||
271 | else | ||
272 | extra++; | 278 | extra++; |
273 | } | 279 | } |
274 | if (max_cpus >= NR_CPUS && extra) | 280 | /* i = number of cpus */ |
281 | if (extra && max_cpus > i - extra) | ||
275 | printk("Warning: NR_CPUS is too low to start all cpus\n"); | 282 | printk("Warning: NR_CPUS is too low to start all cpus\n"); |
276 | 283 | ||
277 | smp_store_cpu_info(boot_cpu_id); | 284 | smp_store_cpu_info(boot_cpu_id); |
@@ -279,7 +286,25 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
279 | smp4m_boot_cpus(); | 286 | smp4m_boot_cpus(); |
280 | } | 287 | } |
281 | 288 | ||
282 | void __devinit smp_prepare_boot_cpu(void) | 289 | /* Set this up early so that things like the scheduler can init |
290 | * properly. We use the same cpu mask for both the present and | ||
291 | * possible cpu map. | ||
292 | */ | ||
293 | void __init smp_setup_cpu_possible_map(void) | ||
294 | { | ||
295 | int instance, mid; | ||
296 | |||
297 | instance = 0; | ||
298 | while (!cpu_find_by_instance(instance, NULL, &mid)) { | ||
299 | if (mid < NR_CPUS) { | ||
300 | cpu_set(mid, phys_cpu_present_map); | ||
301 | cpu_set(mid, cpu_present_map); | ||
302 | } | ||
303 | instance++; | ||
304 | } | ||
305 | } | ||
306 | |||
307 | void __init smp_prepare_boot_cpu(void) | ||
283 | { | 308 | { |
284 | int cpuid = hard_smp_processor_id(); | 309 | int cpuid = hard_smp_processor_id(); |
285 | 310 | ||
@@ -295,7 +320,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
295 | cpu_set(cpuid, phys_cpu_present_map); | 320 | cpu_set(cpuid, phys_cpu_present_map); |
296 | } | 321 | } |
297 | 322 | ||
298 | int __devinit __cpu_up(unsigned int cpu) | 323 | int __cpuinit __cpu_up(unsigned int cpu) |
299 | { | 324 | { |
300 | extern int smp4m_boot_one_cpu(int); | 325 | extern int smp4m_boot_one_cpu(int); |
301 | int ret; | 326 | int ret; |
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index ec1c9687d679..fd7deabf9982 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c | |||
@@ -163,7 +163,6 @@ EXPORT_SYMBOL(BTFIXUP_CALL(__hard_smp_processor_id)); | |||
163 | #endif | 163 | #endif |
164 | EXPORT_SYMBOL(BTFIXUP_CALL(enable_irq)); | 164 | EXPORT_SYMBOL(BTFIXUP_CALL(enable_irq)); |
165 | EXPORT_SYMBOL(BTFIXUP_CALL(disable_irq)); | 165 | EXPORT_SYMBOL(BTFIXUP_CALL(disable_irq)); |
166 | EXPORT_SYMBOL(BTFIXUP_CALL(__irq_itoa)); | ||
167 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea)); | 166 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_unlockarea)); |
168 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea)); | 167 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_lockarea)); |
169 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl)); | 168 | EXPORT_SYMBOL(BTFIXUP_CALL(mmu_get_scsi_sgl)); |
@@ -251,19 +250,9 @@ EXPORT_SYMBOL(__prom_getchild); | |||
251 | EXPORT_SYMBOL(__prom_getsibling); | 250 | EXPORT_SYMBOL(__prom_getsibling); |
252 | 251 | ||
253 | /* sparc library symbols */ | 252 | /* sparc library symbols */ |
254 | EXPORT_SYMBOL(memchr); | ||
255 | EXPORT_SYMBOL(memscan); | 253 | EXPORT_SYMBOL(memscan); |
256 | EXPORT_SYMBOL(strlen); | 254 | EXPORT_SYMBOL(strlen); |
257 | EXPORT_SYMBOL(strnlen); | ||
258 | EXPORT_SYMBOL(strcpy); | ||
259 | EXPORT_SYMBOL(strncpy); | ||
260 | EXPORT_SYMBOL(strcat); | ||
261 | EXPORT_SYMBOL(strncat); | ||
262 | EXPORT_SYMBOL(strcmp); | ||
263 | EXPORT_SYMBOL(strncmp); | 255 | EXPORT_SYMBOL(strncmp); |
264 | EXPORT_SYMBOL(strchr); | ||
265 | EXPORT_SYMBOL(strrchr); | ||
266 | EXPORT_SYMBOL(strstr); | ||
267 | EXPORT_SYMBOL(page_kernel); | 256 | EXPORT_SYMBOL(page_kernel); |
268 | 257 | ||
269 | /* Special internal versions of library functions. */ | 258 | /* Special internal versions of library functions. */ |
@@ -317,6 +306,3 @@ EXPORT_SYMBOL(do_BUG); | |||
317 | 306 | ||
318 | /* Sun Power Management Idle Handler */ | 307 | /* Sun Power Management Idle Handler */ |
319 | EXPORT_SYMBOL(pm_idle); | 308 | EXPORT_SYMBOL(pm_idle); |
320 | |||
321 | /* Binfmt_misc needs this */ | ||
322 | EXPORT_SYMBOL(sys_close); | ||
diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c index 3d6a99073c42..0f2d8d9cbdba 100644 --- a/arch/sparc/kernel/sun4c_irq.c +++ b/arch/sparc/kernel/sun4c_irq.c | |||
@@ -198,8 +198,6 @@ static void __init sun4c_init_timers(irqreturn_t (*counter_fn)(int, void *, stru | |||
198 | static void sun4c_nop(void) {} | 198 | static void sun4c_nop(void) {} |
199 | #endif | 199 | #endif |
200 | 200 | ||
201 | extern char *sun4m_irq_itoa(unsigned int irq); | ||
202 | |||
203 | void __init sun4c_init_IRQ(void) | 201 | void __init sun4c_init_IRQ(void) |
204 | { | 202 | { |
205 | struct linux_prom_registers int_regs[2]; | 203 | struct linux_prom_registers int_regs[2]; |
@@ -238,7 +236,6 @@ void __init sun4c_init_IRQ(void) | |||
238 | BTFIXUPSET_CALL(clear_clock_irq, sun4c_clear_clock_irq, BTFIXUPCALL_NORM); | 236 | BTFIXUPSET_CALL(clear_clock_irq, sun4c_clear_clock_irq, BTFIXUPCALL_NORM); |
239 | BTFIXUPSET_CALL(clear_profile_irq, sun4c_clear_profile_irq, BTFIXUPCALL_NOP); | 237 | BTFIXUPSET_CALL(clear_profile_irq, sun4c_clear_profile_irq, BTFIXUPCALL_NOP); |
240 | BTFIXUPSET_CALL(load_profile_irq, sun4c_load_profile_irq, BTFIXUPCALL_NOP); | 238 | BTFIXUPSET_CALL(load_profile_irq, sun4c_load_profile_irq, BTFIXUPCALL_NOP); |
241 | BTFIXUPSET_CALL(__irq_itoa, sun4m_irq_itoa, BTFIXUPCALL_NORM); | ||
242 | sparc_init_timers = sun4c_init_timers; | 239 | sparc_init_timers = sun4c_init_timers; |
243 | #ifdef CONFIG_SMP | 240 | #ifdef CONFIG_SMP |
244 | BTFIXUPSET_CALL(set_cpu_int, sun4c_nop, BTFIXUPCALL_NOP); | 241 | BTFIXUPSET_CALL(set_cpu_int, sun4c_nop, BTFIXUPCALL_NOP); |
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index ca656d9bd6fd..9c30e35c88f7 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c | |||
@@ -560,17 +560,6 @@ void __init sun4d_init_sbi_irq(void) | |||
560 | } | 560 | } |
561 | } | 561 | } |
562 | 562 | ||
563 | static char *sun4d_irq_itoa(unsigned int irq) | ||
564 | { | ||
565 | static char buff[16]; | ||
566 | |||
567 | if (irq < (1 << 5)) | ||
568 | sprintf(buff, "%d", irq); | ||
569 | else | ||
570 | sprintf(buff, "%d,%x", sbus_to_pil[(irq >> 2) & 7], irq); | ||
571 | return buff; | ||
572 | } | ||
573 | |||
574 | void __init sun4d_init_IRQ(void) | 563 | void __init sun4d_init_IRQ(void) |
575 | { | 564 | { |
576 | local_irq_disable(); | 565 | local_irq_disable(); |
@@ -581,7 +570,6 @@ void __init sun4d_init_IRQ(void) | |||
581 | BTFIXUPSET_CALL(clear_clock_irq, sun4d_clear_clock_irq, BTFIXUPCALL_NORM); | 570 | BTFIXUPSET_CALL(clear_clock_irq, sun4d_clear_clock_irq, BTFIXUPCALL_NORM); |
582 | BTFIXUPSET_CALL(clear_profile_irq, sun4d_clear_profile_irq, BTFIXUPCALL_NORM); | 571 | BTFIXUPSET_CALL(clear_profile_irq, sun4d_clear_profile_irq, BTFIXUPCALL_NORM); |
583 | BTFIXUPSET_CALL(load_profile_irq, sun4d_load_profile_irq, BTFIXUPCALL_NORM); | 572 | BTFIXUPSET_CALL(load_profile_irq, sun4d_load_profile_irq, BTFIXUPCALL_NORM); |
584 | BTFIXUPSET_CALL(__irq_itoa, sun4d_irq_itoa, BTFIXUPCALL_NORM); | ||
585 | sparc_init_timers = sun4d_init_timers; | 573 | sparc_init_timers = sun4d_init_timers; |
586 | #ifdef CONFIG_SMP | 574 | #ifdef CONFIG_SMP |
587 | BTFIXUPSET_CALL(set_cpu_int, sun4d_set_cpu_int, BTFIXUPCALL_NORM); | 575 | BTFIXUPSET_CALL(set_cpu_int, sun4d_set_cpu_int, BTFIXUPCALL_NORM); |
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c index 39d712c3c809..a296c13ac18f 100644 --- a/arch/sparc/kernel/sun4m_irq.c +++ b/arch/sparc/kernel/sun4m_irq.c | |||
@@ -229,13 +229,6 @@ static void sun4m_load_profile_irq(int cpu, unsigned int limit) | |||
229 | sun4m_timers->cpu_timers[cpu].l14_timer_limit = limit; | 229 | sun4m_timers->cpu_timers[cpu].l14_timer_limit = limit; |
230 | } | 230 | } |
231 | 231 | ||
232 | char *sun4m_irq_itoa(unsigned int irq) | ||
233 | { | ||
234 | static char buff[16]; | ||
235 | sprintf(buff, "%d", irq); | ||
236 | return buff; | ||
237 | } | ||
238 | |||
239 | static void __init sun4m_init_timers(irqreturn_t (*counter_fn)(int, void *, struct pt_regs *)) | 232 | static void __init sun4m_init_timers(irqreturn_t (*counter_fn)(int, void *, struct pt_regs *)) |
240 | { | 233 | { |
241 | int reg_count, irq, cpu; | 234 | int reg_count, irq, cpu; |
@@ -388,7 +381,6 @@ void __init sun4m_init_IRQ(void) | |||
388 | BTFIXUPSET_CALL(clear_clock_irq, sun4m_clear_clock_irq, BTFIXUPCALL_NORM); | 381 | BTFIXUPSET_CALL(clear_clock_irq, sun4m_clear_clock_irq, BTFIXUPCALL_NORM); |
389 | BTFIXUPSET_CALL(clear_profile_irq, sun4m_clear_profile_irq, BTFIXUPCALL_NORM); | 382 | BTFIXUPSET_CALL(clear_profile_irq, sun4m_clear_profile_irq, BTFIXUPCALL_NORM); |
390 | BTFIXUPSET_CALL(load_profile_irq, sun4m_load_profile_irq, BTFIXUPCALL_NORM); | 383 | BTFIXUPSET_CALL(load_profile_irq, sun4m_load_profile_irq, BTFIXUPCALL_NORM); |
391 | BTFIXUPSET_CALL(__irq_itoa, sun4m_irq_itoa, BTFIXUPCALL_NORM); | ||
392 | sparc_init_timers = sun4m_init_timers; | 384 | sparc_init_timers = sun4m_init_timers; |
393 | #ifdef CONFIG_SMP | 385 | #ifdef CONFIG_SMP |
394 | BTFIXUPSET_CALL(set_cpu_int, sun4m_send_ipi, BTFIXUPCALL_NORM); | 386 | BTFIXUPSET_CALL(set_cpu_int, sun4m_send_ipi, BTFIXUPCALL_NORM); |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 70b375a4c2c2..3b32096134aa 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
@@ -66,7 +66,7 @@ static inline unsigned long swap(volatile unsigned long *ptr, unsigned long val) | |||
66 | static void smp_setup_percpu_timer(void); | 66 | static void smp_setup_percpu_timer(void); |
67 | extern void cpu_probe(void); | 67 | extern void cpu_probe(void); |
68 | 68 | ||
69 | void __init smp4m_callin(void) | 69 | void __cpuinit smp4m_callin(void) |
70 | { | 70 | { |
71 | int cpuid = hard_smp_processor_id(); | 71 | int cpuid = hard_smp_processor_id(); |
72 | 72 | ||
@@ -112,13 +112,8 @@ void __init smp4m_callin(void) | |||
112 | local_irq_enable(); | 112 | local_irq_enable(); |
113 | 113 | ||
114 | cpu_set(cpuid, cpu_online_map); | 114 | cpu_set(cpuid, cpu_online_map); |
115 | /* last one in gets all the interrupts (for testing) */ | ||
116 | set_irq_udt(boot_cpu_id); | ||
117 | } | 115 | } |
118 | 116 | ||
119 | extern void init_IRQ(void); | ||
120 | extern void cpu_panic(void); | ||
121 | |||
122 | /* | 117 | /* |
123 | * Cycle through the processors asking the PROM to start each one. | 118 | * Cycle through the processors asking the PROM to start each one. |
124 | */ | 119 | */ |
@@ -134,7 +129,7 @@ void __init smp4m_boot_cpus(void) | |||
134 | local_flush_cache_all(); | 129 | local_flush_cache_all(); |
135 | } | 130 | } |
136 | 131 | ||
137 | int smp4m_boot_one_cpu(int i) | 132 | int __cpuinit smp4m_boot_one_cpu(int i) |
138 | { | 133 | { |
139 | extern unsigned long sun4m_cpu_startup; | 134 | extern unsigned long sun4m_cpu_startup; |
140 | unsigned long *entry = &sun4m_cpu_startup; | 135 | unsigned long *entry = &sun4m_cpu_startup; |
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index 6e1135cc03b0..2856551bddf1 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S | |||
@@ -79,6 +79,7 @@ sys_call_table: | |||
79 | /*285*/ .long sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 | 79 | /*285*/ .long sys_mkdirat, sys_mknodat, sys_fchownat, sys_futimesat, sys_fstatat64 |
80 | /*290*/ .long sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat | 80 | /*290*/ .long sys_unlinkat, sys_renameat, sys_linkat, sys_symlinkat, sys_readlinkat |
81 | /*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare | 81 | /*295*/ .long sys_fchmodat, sys_faccessat, sys_pselect6, sys_ppoll, sys_unshare |
82 | /*300*/ .long sys_set_robust_list, sys_get_robust_list | ||
82 | 83 | ||
83 | #ifdef CONFIG_SUNOS_EMUL | 84 | #ifdef CONFIG_SUNOS_EMUL |
84 | /* Now the SunOS syscall table. */ | 85 | /* Now the SunOS syscall table. */ |
@@ -190,6 +191,6 @@ sunos_sys_table: | |||
190 | /*290*/ .long sunos_nosys, sunos_nosys, sunos_nosys | 191 | /*290*/ .long sunos_nosys, sunos_nosys, sunos_nosys |
191 | .long sunos_nosys, sunos_nosys, sunos_nosys | 192 | .long sunos_nosys, sunos_nosys, sunos_nosys |
192 | .long sunos_nosys, sunos_nosys, sunos_nosys | 193 | .long sunos_nosys, sunos_nosys, sunos_nosys |
193 | .long sunos_nosys | 194 | .long sunos_nosys, sunos_nosys, sunos_nosys |
194 | 195 | ||
195 | #endif | 196 | #endif |
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c index 77840c804786..7215849db392 100644 --- a/arch/sparc/mm/iommu.c +++ b/arch/sparc/mm/iommu.c | |||
@@ -144,8 +144,9 @@ static void iommu_flush_iotlb(iopte_t *iopte, unsigned int niopte) | |||
144 | unsigned long start; | 144 | unsigned long start; |
145 | unsigned long end; | 145 | unsigned long end; |
146 | 146 | ||
147 | start = (unsigned long)iopte & PAGE_MASK; | 147 | start = (unsigned long)iopte; |
148 | end = PAGE_ALIGN(start + niopte*sizeof(iopte_t)); | 148 | end = PAGE_ALIGN(start + niopte*sizeof(iopte_t)); |
149 | start &= PAGE_MASK; | ||
149 | if (viking_mxcc_present) { | 150 | if (viking_mxcc_present) { |
150 | while(start < end) { | 151 | while(start < end) { |
151 | viking_mxcc_flush_page(start); | 152 | viking_mxcc_flush_page(start); |