diff options
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/auxio_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/central.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/ds.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/entry.S | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/head_64.S | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/init_task.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/irq_64.c | 123 | ||||
-rw-r--r-- | arch/sparc/kernel/mdesc.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device_64.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device_common.c | 27 | ||||
-rw-r--r-- | arch/sparc/kernel/pci.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_fire.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_msi.c | 15 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_psycho.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_sabre.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_schizo.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/pci_sun4v.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/perf_event.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/power.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls_32.S | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls_64.S | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/time_32.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/time_64.c | 6 |
23 files changed, 98 insertions, 125 deletions
diff --git a/arch/sparc/kernel/auxio_64.c b/arch/sparc/kernel/auxio_64.c index 2abace076c7d..773091ac71a3 100644 --- a/arch/sparc/kernel/auxio_64.c +++ b/arch/sparc/kernel/auxio_64.c | |||
@@ -93,7 +93,7 @@ void auxio_set_lte(int on) | |||
93 | } | 93 | } |
94 | EXPORT_SYMBOL(auxio_set_lte); | 94 | EXPORT_SYMBOL(auxio_set_lte); |
95 | 95 | ||
96 | static struct of_device_id __initdata auxio_match[] = { | 96 | static const struct of_device_id auxio_match[] = { |
97 | { | 97 | { |
98 | .name = "auxio", | 98 | .name = "auxio", |
99 | }, | 99 | }, |
diff --git a/arch/sparc/kernel/central.c b/arch/sparc/kernel/central.c index 136d3718a74a..7eef3f741963 100644 --- a/arch/sparc/kernel/central.c +++ b/arch/sparc/kernel/central.c | |||
@@ -140,7 +140,7 @@ out_free: | |||
140 | goto out; | 140 | goto out; |
141 | } | 141 | } |
142 | 142 | ||
143 | static struct of_device_id __initdata clock_board_match[] = { | 143 | static const struct of_device_id clock_board_match[] = { |
144 | { | 144 | { |
145 | .name = "clock-board", | 145 | .name = "clock-board", |
146 | }, | 146 | }, |
@@ -245,7 +245,7 @@ out_free: | |||
245 | goto out; | 245 | goto out; |
246 | } | 246 | } |
247 | 247 | ||
248 | static struct of_device_id __initdata fhc_match[] = { | 248 | static const struct of_device_id fhc_match[] = { |
249 | { | 249 | { |
250 | .name = "fhc", | 250 | .name = "fhc", |
251 | }, | 251 | }, |
diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index 4a700f4b79ce..3add4de8a1a9 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c | |||
@@ -1218,7 +1218,7 @@ static int ds_remove(struct vio_dev *vdev) | |||
1218 | return 0; | 1218 | return 0; |
1219 | } | 1219 | } |
1220 | 1220 | ||
1221 | static struct vio_device_id __initdata ds_match[] = { | 1221 | static const struct vio_device_id ds_match[] = { |
1222 | { | 1222 | { |
1223 | .type = "domain-services-port", | 1223 | .type = "domain-services-port", |
1224 | }, | 1224 | }, |
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 1504df8ddf70..6da784a5612b 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S | |||
@@ -801,7 +801,7 @@ vac_linesize_patch_32: subcc %l7, 32, %l7 | |||
801 | .globl vac_hwflush_patch1_on, vac_hwflush_patch2_on | 801 | .globl vac_hwflush_patch1_on, vac_hwflush_patch2_on |
802 | 802 | ||
803 | /* | 803 | /* |
804 | * Ugly, but we cant use hardware flushing on the sun4 and we'd require | 804 | * Ugly, but we can't use hardware flushing on the sun4 and we'd require |
805 | * two instructions (Anton) | 805 | * two instructions (Anton) |
806 | */ | 806 | */ |
807 | vac_hwflush_patch1_on: addcc %l7, -PAGE_SIZE, %l7 | 807 | vac_hwflush_patch1_on: addcc %l7, -PAGE_SIZE, %l7 |
@@ -851,7 +851,7 @@ sun4c_fault: | |||
851 | sethi %hi(~((1 << SUN4C_REAL_PGDIR_SHIFT) - 1)), %l4 | 851 | sethi %hi(~((1 << SUN4C_REAL_PGDIR_SHIFT) - 1)), %l4 |
852 | 852 | ||
853 | /* If the kernel references a bum kernel pointer, or a pte which | 853 | /* If the kernel references a bum kernel pointer, or a pte which |
854 | * points to a non existant page in ram, we will run this code | 854 | * points to a non existent page in ram, we will run this code |
855 | * _forever_ and lock up the machine!!!!! So we must check for | 855 | * _forever_ and lock up the machine!!!!! So we must check for |
856 | * this condition, the AC_SYNC_ERR bits are what we must examine. | 856 | * this condition, the AC_SYNC_ERR bits are what we must examine. |
857 | * Also a parity error would make this happen as well. So we just | 857 | * Also a parity error would make this happen as well. So we just |
@@ -1283,7 +1283,7 @@ linux_syscall_trace: | |||
1283 | .globl ret_from_fork | 1283 | .globl ret_from_fork |
1284 | ret_from_fork: | 1284 | ret_from_fork: |
1285 | call schedule_tail | 1285 | call schedule_tail |
1286 | mov %g3, %o0 | 1286 | ld [%g3 + TI_TASK], %o0 |
1287 | b ret_sys_call | 1287 | b ret_sys_call |
1288 | ld [%sp + STACKFRAME_SZ + PT_I0], %o0 | 1288 | ld [%sp + STACKFRAME_SZ + PT_I0], %o0 |
1289 | 1289 | ||
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S index f8f21050448b..aa594c792d19 100644 --- a/arch/sparc/kernel/head_64.S +++ b/arch/sparc/kernel/head_64.S | |||
@@ -85,7 +85,7 @@ sparc_ramdisk_image64: | |||
85 | sparc64_boot: | 85 | sparc64_boot: |
86 | mov %o4, %l7 | 86 | mov %o4, %l7 |
87 | 87 | ||
88 | /* We need to remap the kernel. Use position independant | 88 | /* We need to remap the kernel. Use position independent |
89 | * code to remap us to KERNBASE. | 89 | * code to remap us to KERNBASE. |
90 | * | 90 | * |
91 | * SILO can invoke us with 32-bit address masking enabled, | 91 | * SILO can invoke us with 32-bit address masking enabled, |
diff --git a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c index 5fe3d65581f7..35f141a9f506 100644 --- a/arch/sparc/kernel/init_task.c +++ b/arch/sparc/kernel/init_task.c | |||
@@ -15,7 +15,7 @@ EXPORT_SYMBOL(init_task); | |||
15 | 15 | ||
16 | /* .text section in head.S is aligned at 8k boundary and this gets linked | 16 | /* .text section in head.S is aligned at 8k boundary and this gets linked |
17 | * right after that so that the init_thread_union is aligned properly as well. | 17 | * right after that so that the init_thread_union is aligned properly as well. |
18 | * If this is not aligned on a 8k boundry, then you should change code | 18 | * If this is not aligned on a 8k boundary, then you should change code |
19 | * in etrap.S which assumes it. | 19 | * in etrap.S which assumes it. |
20 | */ | 20 | */ |
21 | union thread_union init_thread_union __init_task_data = | 21 | union thread_union init_thread_union __init_task_data = |
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index eb16e3b8a2dd..b1d275ce3435 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c | |||
@@ -162,47 +162,14 @@ void irq_free(unsigned int irq) | |||
162 | /* | 162 | /* |
163 | * /proc/interrupts printing: | 163 | * /proc/interrupts printing: |
164 | */ | 164 | */ |
165 | 165 | int arch_show_interrupts(struct seq_file *p, int prec) | |
166 | int show_interrupts(struct seq_file *p, void *v) | ||
167 | { | 166 | { |
168 | int i = *(loff_t *) v, j; | 167 | int j; |
169 | struct irqaction * action; | ||
170 | unsigned long flags; | ||
171 | 168 | ||
172 | if (i == 0) { | 169 | seq_printf(p, "NMI: "); |
173 | seq_printf(p, " "); | 170 | for_each_online_cpu(j) |
174 | for_each_online_cpu(j) | 171 | seq_printf(p, "%10u ", cpu_data(j).__nmi_count); |
175 | seq_printf(p, "CPU%d ",j); | 172 | seq_printf(p, " Non-maskable interrupts\n"); |
176 | seq_putc(p, '\n'); | ||
177 | } | ||
178 | |||
179 | if (i < NR_IRQS) { | ||
180 | raw_spin_lock_irqsave(&irq_desc[i].lock, flags); | ||
181 | action = irq_desc[i].action; | ||
182 | if (!action) | ||
183 | goto skip; | ||
184 | seq_printf(p, "%3d: ",i); | ||
185 | #ifndef CONFIG_SMP | ||
186 | seq_printf(p, "%10u ", kstat_irqs(i)); | ||
187 | #else | ||
188 | for_each_online_cpu(j) | ||
189 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); | ||
190 | #endif | ||
191 | seq_printf(p, " %9s", irq_desc[i].irq_data.chip->name); | ||
192 | seq_printf(p, " %s", action->name); | ||
193 | |||
194 | for (action=action->next; action; action = action->next) | ||
195 | seq_printf(p, ", %s", action->name); | ||
196 | |||
197 | seq_putc(p, '\n'); | ||
198 | skip: | ||
199 | raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); | ||
200 | } else if (i == NR_IRQS) { | ||
201 | seq_printf(p, "NMI: "); | ||
202 | for_each_online_cpu(j) | ||
203 | seq_printf(p, "%10u ", cpu_data(j).__nmi_count); | ||
204 | seq_printf(p, " Non-maskable interrupts\n"); | ||
205 | } | ||
206 | return 0; | 173 | return 0; |
207 | } | 174 | } |
208 | 175 | ||
@@ -344,10 +311,6 @@ static void sun4u_irq_disable(struct irq_data *data) | |||
344 | static void sun4u_irq_eoi(struct irq_data *data) | 311 | static void sun4u_irq_eoi(struct irq_data *data) |
345 | { | 312 | { |
346 | struct irq_handler_data *handler_data = data->handler_data; | 313 | struct irq_handler_data *handler_data = data->handler_data; |
347 | struct irq_desc *desc = irq_desc + data->irq; | ||
348 | |||
349 | if (unlikely(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
350 | return; | ||
351 | 314 | ||
352 | if (likely(handler_data)) | 315 | if (likely(handler_data)) |
353 | upa_writeq(ICLR_IDLE, handler_data->iclr); | 316 | upa_writeq(ICLR_IDLE, handler_data->iclr); |
@@ -402,12 +365,8 @@ static void sun4v_irq_disable(struct irq_data *data) | |||
402 | static void sun4v_irq_eoi(struct irq_data *data) | 365 | static void sun4v_irq_eoi(struct irq_data *data) |
403 | { | 366 | { |
404 | unsigned int ino = irq_table[data->irq].dev_ino; | 367 | unsigned int ino = irq_table[data->irq].dev_ino; |
405 | struct irq_desc *desc = irq_desc + data->irq; | ||
406 | int err; | 368 | int err; |
407 | 369 | ||
408 | if (unlikely(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
409 | return; | ||
410 | |||
411 | err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE); | 370 | err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE); |
412 | if (err != HV_EOK) | 371 | if (err != HV_EOK) |
413 | printk(KERN_ERR "sun4v_intr_setstate(%x): " | 372 | printk(KERN_ERR "sun4v_intr_setstate(%x): " |
@@ -481,13 +440,9 @@ static void sun4v_virq_disable(struct irq_data *data) | |||
481 | 440 | ||
482 | static void sun4v_virq_eoi(struct irq_data *data) | 441 | static void sun4v_virq_eoi(struct irq_data *data) |
483 | { | 442 | { |
484 | struct irq_desc *desc = irq_desc + data->irq; | ||
485 | unsigned long dev_handle, dev_ino; | 443 | unsigned long dev_handle, dev_ino; |
486 | int err; | 444 | int err; |
487 | 445 | ||
488 | if (unlikely(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS))) | ||
489 | return; | ||
490 | |||
491 | dev_handle = irq_table[data->irq].dev_handle; | 446 | dev_handle = irq_table[data->irq].dev_handle; |
492 | dev_ino = irq_table[data->irq].dev_ino; | 447 | dev_ino = irq_table[data->irq].dev_ino; |
493 | 448 | ||
@@ -505,6 +460,7 @@ static struct irq_chip sun4u_irq = { | |||
505 | .irq_disable = sun4u_irq_disable, | 460 | .irq_disable = sun4u_irq_disable, |
506 | .irq_eoi = sun4u_irq_eoi, | 461 | .irq_eoi = sun4u_irq_eoi, |
507 | .irq_set_affinity = sun4u_set_affinity, | 462 | .irq_set_affinity = sun4u_set_affinity, |
463 | .flags = IRQCHIP_EOI_IF_HANDLED, | ||
508 | }; | 464 | }; |
509 | 465 | ||
510 | static struct irq_chip sun4v_irq = { | 466 | static struct irq_chip sun4v_irq = { |
@@ -513,6 +469,7 @@ static struct irq_chip sun4v_irq = { | |||
513 | .irq_disable = sun4v_irq_disable, | 469 | .irq_disable = sun4v_irq_disable, |
514 | .irq_eoi = sun4v_irq_eoi, | 470 | .irq_eoi = sun4v_irq_eoi, |
515 | .irq_set_affinity = sun4v_set_affinity, | 471 | .irq_set_affinity = sun4v_set_affinity, |
472 | .flags = IRQCHIP_EOI_IF_HANDLED, | ||
516 | }; | 473 | }; |
517 | 474 | ||
518 | static struct irq_chip sun4v_virq = { | 475 | static struct irq_chip sun4v_virq = { |
@@ -521,30 +478,28 @@ static struct irq_chip sun4v_virq = { | |||
521 | .irq_disable = sun4v_virq_disable, | 478 | .irq_disable = sun4v_virq_disable, |
522 | .irq_eoi = sun4v_virq_eoi, | 479 | .irq_eoi = sun4v_virq_eoi, |
523 | .irq_set_affinity = sun4v_virt_set_affinity, | 480 | .irq_set_affinity = sun4v_virt_set_affinity, |
481 | .flags = IRQCHIP_EOI_IF_HANDLED, | ||
524 | }; | 482 | }; |
525 | 483 | ||
526 | static void pre_flow_handler(unsigned int irq, struct irq_desc *desc) | 484 | static void pre_flow_handler(struct irq_data *d) |
527 | { | 485 | { |
528 | struct irq_handler_data *handler_data = get_irq_data(irq); | 486 | struct irq_handler_data *handler_data = irq_data_get_irq_handler_data(d); |
529 | unsigned int ino = irq_table[irq].dev_ino; | 487 | unsigned int ino = irq_table[d->irq].dev_ino; |
530 | 488 | ||
531 | handler_data->pre_handler(ino, handler_data->arg1, handler_data->arg2); | 489 | handler_data->pre_handler(ino, handler_data->arg1, handler_data->arg2); |
532 | |||
533 | handle_fasteoi_irq(irq, desc); | ||
534 | } | 490 | } |
535 | 491 | ||
536 | void irq_install_pre_handler(int irq, | 492 | void irq_install_pre_handler(int irq, |
537 | void (*func)(unsigned int, void *, void *), | 493 | void (*func)(unsigned int, void *, void *), |
538 | void *arg1, void *arg2) | 494 | void *arg1, void *arg2) |
539 | { | 495 | { |
540 | struct irq_handler_data *handler_data = get_irq_data(irq); | 496 | struct irq_handler_data *handler_data = irq_get_handler_data(irq); |
541 | struct irq_desc *desc = irq_desc + irq; | ||
542 | 497 | ||
543 | handler_data->pre_handler = func; | 498 | handler_data->pre_handler = func; |
544 | handler_data->arg1 = arg1; | 499 | handler_data->arg1 = arg1; |
545 | handler_data->arg2 = arg2; | 500 | handler_data->arg2 = arg2; |
546 | 501 | ||
547 | desc->handle_irq = pre_flow_handler; | 502 | __irq_set_preflow_handler(irq, pre_flow_handler); |
548 | } | 503 | } |
549 | 504 | ||
550 | unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap) | 505 | unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap) |
@@ -562,13 +517,11 @@ unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap) | |||
562 | if (!irq) { | 517 | if (!irq) { |
563 | irq = irq_alloc(0, ino); | 518 | irq = irq_alloc(0, ino); |
564 | bucket_set_irq(__pa(bucket), irq); | 519 | bucket_set_irq(__pa(bucket), irq); |
565 | set_irq_chip_and_handler_name(irq, | 520 | irq_set_chip_and_handler_name(irq, &sun4u_irq, |
566 | &sun4u_irq, | 521 | handle_fasteoi_irq, "IVEC"); |
567 | handle_fasteoi_irq, | ||
568 | "IVEC"); | ||
569 | } | 522 | } |
570 | 523 | ||
571 | handler_data = get_irq_data(irq); | 524 | handler_data = irq_get_handler_data(irq); |
572 | if (unlikely(handler_data)) | 525 | if (unlikely(handler_data)) |
573 | goto out; | 526 | goto out; |
574 | 527 | ||
@@ -577,7 +530,7 @@ unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap) | |||
577 | prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n"); | 530 | prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n"); |
578 | prom_halt(); | 531 | prom_halt(); |
579 | } | 532 | } |
580 | set_irq_data(irq, handler_data); | 533 | irq_set_handler_data(irq, handler_data); |
581 | 534 | ||
582 | handler_data->imap = imap; | 535 | handler_data->imap = imap; |
583 | handler_data->iclr = iclr; | 536 | handler_data->iclr = iclr; |
@@ -600,12 +553,11 @@ static unsigned int sun4v_build_common(unsigned long sysino, | |||
600 | if (!irq) { | 553 | if (!irq) { |
601 | irq = irq_alloc(0, sysino); | 554 | irq = irq_alloc(0, sysino); |
602 | bucket_set_irq(__pa(bucket), irq); | 555 | bucket_set_irq(__pa(bucket), irq); |
603 | set_irq_chip_and_handler_name(irq, chip, | 556 | irq_set_chip_and_handler_name(irq, chip, handle_fasteoi_irq, |
604 | handle_fasteoi_irq, | ||
605 | "IVEC"); | 557 | "IVEC"); |
606 | } | 558 | } |
607 | 559 | ||
608 | handler_data = get_irq_data(irq); | 560 | handler_data = irq_get_handler_data(irq); |
609 | if (unlikely(handler_data)) | 561 | if (unlikely(handler_data)) |
610 | goto out; | 562 | goto out; |
611 | 563 | ||
@@ -614,7 +566,7 @@ static unsigned int sun4v_build_common(unsigned long sysino, | |||
614 | prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n"); | 566 | prom_printf("IRQ: kzalloc(irq_handler_data) failed.\n"); |
615 | prom_halt(); | 567 | prom_halt(); |
616 | } | 568 | } |
617 | set_irq_data(irq, handler_data); | 569 | irq_set_handler_data(irq, handler_data); |
618 | 570 | ||
619 | /* Catch accidental accesses to these things. IMAP/ICLR handling | 571 | /* Catch accidental accesses to these things. IMAP/ICLR handling |
620 | * is done by hypervisor calls on sun4v platforms, not by direct | 572 | * is done by hypervisor calls on sun4v platforms, not by direct |
@@ -639,7 +591,6 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) | |||
639 | struct irq_handler_data *handler_data; | 591 | struct irq_handler_data *handler_data; |
640 | unsigned long hv_err, cookie; | 592 | unsigned long hv_err, cookie; |
641 | struct ino_bucket *bucket; | 593 | struct ino_bucket *bucket; |
642 | struct irq_desc *desc; | ||
643 | unsigned int irq; | 594 | unsigned int irq; |
644 | 595 | ||
645 | bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC); | 596 | bucket = kzalloc(sizeof(struct ino_bucket), GFP_ATOMIC); |
@@ -660,8 +611,7 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) | |||
660 | irq = irq_alloc(devhandle, devino); | 611 | irq = irq_alloc(devhandle, devino); |
661 | bucket_set_irq(__pa(bucket), irq); | 612 | bucket_set_irq(__pa(bucket), irq); |
662 | 613 | ||
663 | set_irq_chip_and_handler_name(irq, &sun4v_virq, | 614 | irq_set_chip_and_handler_name(irq, &sun4v_virq, handle_fasteoi_irq, |
664 | handle_fasteoi_irq, | ||
665 | "IVEC"); | 615 | "IVEC"); |
666 | 616 | ||
667 | handler_data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC); | 617 | handler_data = kzalloc(sizeof(struct irq_handler_data), GFP_ATOMIC); |
@@ -672,10 +622,8 @@ unsigned int sun4v_build_virq(u32 devhandle, unsigned int devino) | |||
672 | * especially wrt. locking, we do not let request_irq() enable | 622 | * especially wrt. locking, we do not let request_irq() enable |
673 | * the interrupt. | 623 | * the interrupt. |
674 | */ | 624 | */ |
675 | desc = irq_desc + irq; | 625 | irq_set_status_flags(irq, IRQ_NOAUTOEN); |
676 | desc->status |= IRQ_NOAUTOEN; | 626 | irq_set_handler_data(irq, handler_data); |
677 | |||
678 | set_irq_data(irq, handler_data); | ||
679 | 627 | ||
680 | /* Catch accidental accesses to these things. IMAP/ICLR handling | 628 | /* Catch accidental accesses to these things. IMAP/ICLR handling |
681 | * is done by hypervisor calls on sun4v platforms, not by direct | 629 | * is done by hypervisor calls on sun4v platforms, not by direct |
@@ -734,7 +682,6 @@ void __irq_entry handler_irq(int pil, struct pt_regs *regs) | |||
734 | orig_sp = set_hardirq_stack(); | 682 | orig_sp = set_hardirq_stack(); |
735 | 683 | ||
736 | while (bucket_pa) { | 684 | while (bucket_pa) { |
737 | struct irq_desc *desc; | ||
738 | unsigned long next_pa; | 685 | unsigned long next_pa; |
739 | unsigned int irq; | 686 | unsigned int irq; |
740 | 687 | ||
@@ -742,10 +689,7 @@ void __irq_entry handler_irq(int pil, struct pt_regs *regs) | |||
742 | irq = bucket_get_irq(bucket_pa); | 689 | irq = bucket_get_irq(bucket_pa); |
743 | bucket_clear_chain_pa(bucket_pa); | 690 | bucket_clear_chain_pa(bucket_pa); |
744 | 691 | ||
745 | desc = irq_desc + irq; | 692 | generic_handle_irq(irq); |
746 | |||
747 | if (!(desc->status & IRQ_DISABLED)) | ||
748 | desc->handle_irq(irq, desc); | ||
749 | 693 | ||
750 | bucket_pa = next_pa; | 694 | bucket_pa = next_pa; |
751 | } | 695 | } |
@@ -788,19 +732,18 @@ void fixup_irqs(void) | |||
788 | unsigned int irq; | 732 | unsigned int irq; |
789 | 733 | ||
790 | for (irq = 0; irq < NR_IRQS; irq++) { | 734 | for (irq = 0; irq < NR_IRQS; irq++) { |
735 | struct irq_desc *desc = irq_to_desc(irq); | ||
736 | struct irq_data *data = irq_desc_get_irq_data(desc); | ||
791 | unsigned long flags; | 737 | unsigned long flags; |
792 | 738 | ||
793 | raw_spin_lock_irqsave(&irq_desc[irq].lock, flags); | 739 | raw_spin_lock_irqsave(&desc->lock, flags); |
794 | if (irq_desc[irq].action && | 740 | if (desc->action && !irqd_is_per_cpu(data)) { |
795 | !(irq_desc[irq].status & IRQ_PER_CPU)) { | ||
796 | struct irq_data *data = irq_get_irq_data(irq); | ||
797 | |||
798 | if (data->chip->irq_set_affinity) | 741 | if (data->chip->irq_set_affinity) |
799 | data->chip->irq_set_affinity(data, | 742 | data->chip->irq_set_affinity(data, |
800 | data->affinity, | 743 | data->affinity, |
801 | false); | 744 | false); |
802 | } | 745 | } |
803 | raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags); | 746 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
804 | } | 747 | } |
805 | 748 | ||
806 | tick_ops->disable_irq(); | 749 | tick_ops->disable_irq(); |
@@ -1038,5 +981,5 @@ void __init init_IRQ(void) | |||
1038 | : "i" (PSTATE_IE) | 981 | : "i" (PSTATE_IE) |
1039 | : "g1"); | 982 | : "g1"); |
1040 | 983 | ||
1041 | irq_desc[0].action = &timer_irq_action; | 984 | irq_to_desc(0)->action = &timer_irq_action; |
1042 | } | 985 | } |
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c index 6addb914fcc8..56db06432ce9 100644 --- a/arch/sparc/kernel/mdesc.c +++ b/arch/sparc/kernel/mdesc.c | |||
@@ -107,7 +107,7 @@ static struct mdesc_handle * __init mdesc_memblock_alloc(unsigned int mdesc_size | |||
107 | return hp; | 107 | return hp; |
108 | } | 108 | } |
109 | 109 | ||
110 | static void mdesc_memblock_free(struct mdesc_handle *hp) | 110 | static void __init mdesc_memblock_free(struct mdesc_handle *hp) |
111 | { | 111 | { |
112 | unsigned int alloc_size; | 112 | unsigned int alloc_size; |
113 | unsigned long start; | 113 | unsigned long start; |
diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c index 63cd4e5d47c2..5c149689bb20 100644 --- a/arch/sparc/kernel/of_device_64.c +++ b/arch/sparc/kernel/of_device_64.c | |||
@@ -459,7 +459,7 @@ apply_interrupt_map(struct device_node *dp, struct device_node *pp, | |||
459 | * | 459 | * |
460 | * Handle this by deciding that, if we didn't get a | 460 | * Handle this by deciding that, if we didn't get a |
461 | * match in the parent's 'interrupt-map', and the | 461 | * match in the parent's 'interrupt-map', and the |
462 | * parent is an IRQ translater, then use the parent as | 462 | * parent is an IRQ translator, then use the parent as |
463 | * our IRQ controller. | 463 | * our IRQ controller. |
464 | */ | 464 | */ |
465 | if (pp->irq_trans) | 465 | if (pp->irq_trans) |
diff --git a/arch/sparc/kernel/of_device_common.c b/arch/sparc/kernel/of_device_common.c index 49ddff56cb04..cb15bbf8a201 100644 --- a/arch/sparc/kernel/of_device_common.c +++ b/arch/sparc/kernel/of_device_common.c | |||
@@ -22,6 +22,33 @@ unsigned int irq_of_parse_and_map(struct device_node *node, int index) | |||
22 | } | 22 | } |
23 | EXPORT_SYMBOL(irq_of_parse_and_map); | 23 | EXPORT_SYMBOL(irq_of_parse_and_map); |
24 | 24 | ||
25 | int of_address_to_resource(struct device_node *node, int index, | ||
26 | struct resource *r) | ||
27 | { | ||
28 | struct platform_device *op = of_find_device_by_node(node); | ||
29 | |||
30 | if (!op || index >= op->num_resources) | ||
31 | return -EINVAL; | ||
32 | |||
33 | memcpy(r, &op->archdata.resource[index], sizeof(*r)); | ||
34 | return 0; | ||
35 | } | ||
36 | EXPORT_SYMBOL_GPL(of_address_to_resource); | ||
37 | |||
38 | void __iomem *of_iomap(struct device_node *node, int index) | ||
39 | { | ||
40 | struct platform_device *op = of_find_device_by_node(node); | ||
41 | struct resource *r; | ||
42 | |||
43 | if (!op || index >= op->num_resources) | ||
44 | return NULL; | ||
45 | |||
46 | r = &op->archdata.resource[index]; | ||
47 | |||
48 | return of_ioremap(r, 0, resource_size(r), (char *) r->name); | ||
49 | } | ||
50 | EXPORT_SYMBOL(of_iomap); | ||
51 | |||
25 | /* Take the archdata values for IOMMU, STC, and HOSTDATA found in | 52 | /* Take the archdata values for IOMMU, STC, and HOSTDATA found in |
26 | * BUS and propagate to all child platform_device objects. | 53 | * BUS and propagate to all child platform_device objects. |
27 | */ | 54 | */ |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 44f41e312f73..713dc91020a6 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -1012,7 +1012,7 @@ int arch_setup_msi_irq(struct pci_dev *pdev, struct msi_desc *desc) | |||
1012 | 1012 | ||
1013 | void arch_teardown_msi_irq(unsigned int irq) | 1013 | void arch_teardown_msi_irq(unsigned int irq) |
1014 | { | 1014 | { |
1015 | struct msi_desc *entry = get_irq_msi(irq); | 1015 | struct msi_desc *entry = irq_get_msi_desc(irq); |
1016 | struct pci_dev *pdev = entry->dev; | 1016 | struct pci_dev *pdev = entry->dev; |
1017 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; | 1017 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; |
1018 | 1018 | ||
diff --git a/arch/sparc/kernel/pci_fire.c b/arch/sparc/kernel/pci_fire.c index 3d70f8326efd..d29a32fcc5e4 100644 --- a/arch/sparc/kernel/pci_fire.c +++ b/arch/sparc/kernel/pci_fire.c | |||
@@ -496,7 +496,7 @@ out_err: | |||
496 | return err; | 496 | return err; |
497 | } | 497 | } |
498 | 498 | ||
499 | static struct of_device_id __initdata fire_match[] = { | 499 | static const struct of_device_id fire_match[] = { |
500 | { | 500 | { |
501 | .name = "pci", | 501 | .name = "pci", |
502 | .compatible = "pciex108e,80f0", | 502 | .compatible = "pciex108e,80f0", |
diff --git a/arch/sparc/kernel/pci_msi.c b/arch/sparc/kernel/pci_msi.c index 550e937720e7..30982e9ab626 100644 --- a/arch/sparc/kernel/pci_msi.c +++ b/arch/sparc/kernel/pci_msi.c | |||
@@ -30,13 +30,10 @@ static irqreturn_t sparc64_msiq_interrupt(int irq, void *cookie) | |||
30 | 30 | ||
31 | err = ops->dequeue_msi(pbm, msiqid, &head, &msi); | 31 | err = ops->dequeue_msi(pbm, msiqid, &head, &msi); |
32 | if (likely(err > 0)) { | 32 | if (likely(err > 0)) { |
33 | struct irq_desc *desc; | ||
34 | unsigned int irq; | 33 | unsigned int irq; |
35 | 34 | ||
36 | irq = pbm->msi_irq_table[msi - pbm->msi_first]; | 35 | irq = pbm->msi_irq_table[msi - pbm->msi_first]; |
37 | desc = irq_desc + irq; | 36 | generic_handle_irq(irq); |
38 | |||
39 | desc->handle_irq(irq, desc); | ||
40 | } | 37 | } |
41 | 38 | ||
42 | if (unlikely(err < 0)) | 39 | if (unlikely(err < 0)) |
@@ -136,8 +133,8 @@ static int sparc64_setup_msi_irq(unsigned int *irq_p, | |||
136 | if (!*irq_p) | 133 | if (!*irq_p) |
137 | goto out_err; | 134 | goto out_err; |
138 | 135 | ||
139 | set_irq_chip_and_handler_name(*irq_p, &msi_irq, | 136 | irq_set_chip_and_handler_name(*irq_p, &msi_irq, handle_simple_irq, |
140 | handle_simple_irq, "MSI"); | 137 | "MSI"); |
141 | 138 | ||
142 | err = alloc_msi(pbm); | 139 | err = alloc_msi(pbm); |
143 | if (unlikely(err < 0)) | 140 | if (unlikely(err < 0)) |
@@ -163,7 +160,7 @@ static int sparc64_setup_msi_irq(unsigned int *irq_p, | |||
163 | } | 160 | } |
164 | msg.data = msi; | 161 | msg.data = msi; |
165 | 162 | ||
166 | set_irq_msi(*irq_p, entry); | 163 | irq_set_msi_desc(*irq_p, entry); |
167 | write_msi_msg(*irq_p, &msg); | 164 | write_msi_msg(*irq_p, &msg); |
168 | 165 | ||
169 | return 0; | 166 | return 0; |
@@ -172,7 +169,7 @@ out_msi_free: | |||
172 | free_msi(pbm, msi); | 169 | free_msi(pbm, msi); |
173 | 170 | ||
174 | out_irq_free: | 171 | out_irq_free: |
175 | set_irq_chip(*irq_p, NULL); | 172 | irq_set_chip(*irq_p, NULL); |
176 | irq_free(*irq_p); | 173 | irq_free(*irq_p); |
177 | *irq_p = 0; | 174 | *irq_p = 0; |
178 | 175 | ||
@@ -211,7 +208,7 @@ static void sparc64_teardown_msi_irq(unsigned int irq, | |||
211 | 208 | ||
212 | free_msi(pbm, msi_num); | 209 | free_msi(pbm, msi_num); |
213 | 210 | ||
214 | set_irq_chip(irq, NULL); | 211 | irq_set_chip(irq, NULL); |
215 | irq_free(irq); | 212 | irq_free(irq); |
216 | } | 213 | } |
217 | 214 | ||
diff --git a/arch/sparc/kernel/pci_psycho.c b/arch/sparc/kernel/pci_psycho.c index 56ee745064de..86ae08d9b6ee 100644 --- a/arch/sparc/kernel/pci_psycho.c +++ b/arch/sparc/kernel/pci_psycho.c | |||
@@ -592,7 +592,7 @@ out_err: | |||
592 | return err; | 592 | return err; |
593 | } | 593 | } |
594 | 594 | ||
595 | static struct of_device_id __initdata psycho_match[] = { | 595 | static const struct of_device_id psycho_match[] = { |
596 | { | 596 | { |
597 | .name = "pci", | 597 | .name = "pci", |
598 | .compatible = "pci108e,8000", | 598 | .compatible = "pci108e,8000", |
diff --git a/arch/sparc/kernel/pci_sabre.c b/arch/sparc/kernel/pci_sabre.c index 2857073342d2..948068a083fc 100644 --- a/arch/sparc/kernel/pci_sabre.c +++ b/arch/sparc/kernel/pci_sabre.c | |||
@@ -581,7 +581,7 @@ out_err: | |||
581 | return err; | 581 | return err; |
582 | } | 582 | } |
583 | 583 | ||
584 | static struct of_device_id __initdata sabre_match[] = { | 584 | static const struct of_device_id sabre_match[] = { |
585 | { | 585 | { |
586 | .name = "pci", | 586 | .name = "pci", |
587 | .compatible = "pci108e,a001", | 587 | .compatible = "pci108e,a001", |
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 1d41af73a92f..fecfcb2063c8 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c | |||
@@ -1470,7 +1470,7 @@ static int __devinit schizo_probe(struct platform_device *op) | |||
1470 | * and pci108e,8001. So list the chips in reverse chronological | 1470 | * and pci108e,8001. So list the chips in reverse chronological |
1471 | * order. | 1471 | * order. |
1472 | */ | 1472 | */ |
1473 | static struct of_device_id __initdata schizo_match[] = { | 1473 | static const struct of_device_id schizo_match[] = { |
1474 | { | 1474 | { |
1475 | .name = "pci", | 1475 | .name = "pci", |
1476 | .compatible = "pci108e,a801", | 1476 | .compatible = "pci108e,a801", |
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c index 6cf534681788..b01a06e9ae4e 100644 --- a/arch/sparc/kernel/pci_sun4v.c +++ b/arch/sparc/kernel/pci_sun4v.c | |||
@@ -998,7 +998,7 @@ out_err: | |||
998 | return err; | 998 | return err; |
999 | } | 999 | } |
1000 | 1000 | ||
1001 | static struct of_device_id __initdata pci_sun4v_match[] = { | 1001 | static const struct of_device_id pci_sun4v_match[] = { |
1002 | { | 1002 | { |
1003 | .name = "pci", | 1003 | .name = "pci", |
1004 | .compatible = "SUNW,sun4v-pci", | 1004 | .compatible = "SUNW,sun4v-pci", |
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 760578687e7c..ee8426ede7c7 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -1027,7 +1027,7 @@ static int sparc_pmu_add(struct perf_event *event, int ef_flags) | |||
1027 | 1027 | ||
1028 | /* | 1028 | /* |
1029 | * If group events scheduling transaction was started, | 1029 | * If group events scheduling transaction was started, |
1030 | * skip the schedulability test here, it will be peformed | 1030 | * skip the schedulability test here, it will be performed |
1031 | * at commit time(->commit_txn) as a whole | 1031 | * at commit time(->commit_txn) as a whole |
1032 | */ | 1032 | */ |
1033 | if (cpuc->group_flag & PERF_EVENT_TXN) | 1033 | if (cpuc->group_flag & PERF_EVENT_TXN) |
diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c index cd725fe238b2..cb4c0f57c024 100644 --- a/arch/sparc/kernel/power.c +++ b/arch/sparc/kernel/power.c | |||
@@ -52,7 +52,7 @@ static int __devinit power_probe(struct platform_device *op) | |||
52 | return 0; | 52 | return 0; |
53 | } | 53 | } |
54 | 54 | ||
55 | static struct of_device_id __initdata power_match[] = { | 55 | static const struct of_device_id power_match[] = { |
56 | { | 56 | { |
57 | .name = "power", | 57 | .name = "power", |
58 | }, | 58 | }, |
diff --git a/arch/sparc/kernel/systbls_32.S b/arch/sparc/kernel/systbls_32.S index ec396e1916b9..47ac73c32e88 100644 --- a/arch/sparc/kernel/systbls_32.S +++ b/arch/sparc/kernel/systbls_32.S | |||
@@ -83,5 +83,5 @@ sys_call_table: | |||
83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 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, sys_accept4, sys_preadv | 84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv |
85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 85 | /*325*/ .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64 | 86 | /*330*/ .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
87 | 87 | /*335*/ .long sys_syncfs | |
diff --git a/arch/sparc/kernel/systbls_64.S b/arch/sparc/kernel/systbls_64.S index 8cfcaa549580..4f3170c1ef47 100644 --- a/arch/sparc/kernel/systbls_64.S +++ b/arch/sparc/kernel/systbls_64.S | |||
@@ -84,7 +84,8 @@ sys_call_table32: | |||
84 | .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 84 | .word compat_sys_timerfd_settime, compat_sys_timerfd_gettime, compat_sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv | 85 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv |
86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init | 86 | .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init |
87 | /*330*/ .word sys32_fanotify_mark, sys_prlimit64 | 87 | /*330*/ .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime |
88 | .word sys_syncfs | ||
88 | 89 | ||
89 | #endif /* CONFIG_COMPAT */ | 90 | #endif /* CONFIG_COMPAT */ |
90 | 91 | ||
@@ -160,4 +161,5 @@ sys_call_table: | |||
160 | .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 161 | .word sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
161 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv | 162 | /*320*/ .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv |
162 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init | 163 | .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init |
163 | /*330*/ .word sys_fanotify_mark, sys_prlimit64 | 164 | /*330*/ .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime |
165 | .word sys_syncfs | ||
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c index 8237dd4dfeb4..4e236391b635 100644 --- a/arch/sparc/kernel/time_32.c +++ b/arch/sparc/kernel/time_32.c | |||
@@ -145,6 +145,10 @@ static int __devinit clock_probe(struct platform_device *op) | |||
145 | if (!model) | 145 | if (!model) |
146 | return -ENODEV; | 146 | return -ENODEV; |
147 | 147 | ||
148 | /* Only the primary RTC has an address property */ | ||
149 | if (!of_find_property(dp, "address", NULL)) | ||
150 | return -ENODEV; | ||
151 | |||
148 | m48t59_rtc.resource = &op->resource[0]; | 152 | m48t59_rtc.resource = &op->resource[0]; |
149 | if (!strcmp(model, "mk48t02")) { | 153 | if (!strcmp(model, "mk48t02")) { |
150 | /* Map the clock register io area read-only */ | 154 | /* Map the clock register io area read-only */ |
diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index 95ec25faba39..2b8d54b2d850 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c | |||
@@ -442,7 +442,7 @@ static int __devinit rtc_probe(struct platform_device *op) | |||
442 | return platform_device_register(&rtc_cmos_device); | 442 | return platform_device_register(&rtc_cmos_device); |
443 | } | 443 | } |
444 | 444 | ||
445 | static struct of_device_id __initdata rtc_match[] = { | 445 | static const struct of_device_id rtc_match[] = { |
446 | { | 446 | { |
447 | .name = "rtc", | 447 | .name = "rtc", |
448 | .compatible = "m5819", | 448 | .compatible = "m5819", |
@@ -487,7 +487,7 @@ static int __devinit bq4802_probe(struct platform_device *op) | |||
487 | return platform_device_register(&rtc_bq4802_device); | 487 | return platform_device_register(&rtc_bq4802_device); |
488 | } | 488 | } |
489 | 489 | ||
490 | static struct of_device_id __initdata bq4802_match[] = { | 490 | static const struct of_device_id bq4802_match[] = { |
491 | { | 491 | { |
492 | .name = "rtc", | 492 | .name = "rtc", |
493 | .compatible = "bq4802", | 493 | .compatible = "bq4802", |
@@ -552,7 +552,7 @@ static int __devinit mostek_probe(struct platform_device *op) | |||
552 | return platform_device_register(&m48t59_rtc); | 552 | return platform_device_register(&m48t59_rtc); |
553 | } | 553 | } |
554 | 554 | ||
555 | static struct of_device_id __initdata mostek_match[] = { | 555 | static const struct of_device_id mostek_match[] = { |
556 | { | 556 | { |
557 | .name = "eeprom", | 557 | .name = "eeprom", |
558 | }, | 558 | }, |