.. | .. |
---|
16 | 16 | */ |
---|
17 | 17 | |
---|
18 | 18 | #include <linux/module.h> |
---|
| 19 | +#include <linux/pgtable.h> |
---|
19 | 20 | |
---|
20 | 21 | #include <linux/jiffies.h> |
---|
21 | 22 | #include <linux/errno.h> |
---|
.. | .. |
---|
37 | 38 | #include <asm/intrinsics.h> |
---|
38 | 39 | #include <asm/io.h> |
---|
39 | 40 | #include <asm/hw_irq.h> |
---|
40 | | -#include <asm/machvec.h> |
---|
41 | | -#include <asm/pgtable.h> |
---|
42 | 41 | #include <asm/tlbflush.h> |
---|
43 | | - |
---|
44 | | -#ifdef CONFIG_PERFMON |
---|
45 | | -# include <asm/perfmon.h> |
---|
46 | | -#endif |
---|
47 | 42 | |
---|
48 | 43 | #define IRQ_DEBUG 0 |
---|
49 | 44 | |
---|
.. | .. |
---|
53 | 48 | #define IRQ_USED (1) |
---|
54 | 49 | #define IRQ_RSVD (2) |
---|
55 | 50 | |
---|
56 | | -/* These can be overridden in platform_irq_init */ |
---|
57 | 51 | int ia64_first_device_vector = IA64_DEF_FIRST_DEVICE_VECTOR; |
---|
58 | 52 | int ia64_last_device_vector = IA64_DEF_LAST_DEVICE_VECTOR; |
---|
59 | 53 | |
---|
.. | .. |
---|
250 | 244 | } |
---|
251 | 245 | } |
---|
252 | 246 | |
---|
253 | | -#if defined(CONFIG_SMP) && (defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG)) |
---|
| 247 | +#ifdef CONFIG_SMP |
---|
254 | 248 | |
---|
255 | 249 | static enum vector_domain_type { |
---|
256 | 250 | VECTOR_DOMAIN_NONE, |
---|
.. | .. |
---|
314 | 308 | cpumask_and(&cleanup_mask, &cfg->old_domain, cpu_online_mask); |
---|
315 | 309 | cfg->move_cleanup_count = cpumask_weight(&cleanup_mask); |
---|
316 | 310 | for_each_cpu(i, &cleanup_mask) |
---|
317 | | - platform_send_ipi(i, IA64_IRQ_MOVE_VECTOR, IA64_IPI_DM_INT, 0); |
---|
| 311 | + ia64_send_ipi(i, IA64_IRQ_MOVE_VECTOR, IA64_IPI_DM_INT, 0); |
---|
318 | 312 | cfg->move_in_progress = 0; |
---|
319 | 313 | } |
---|
320 | 314 | |
---|
.. | .. |
---|
352 | 346 | } |
---|
353 | 347 | return IRQ_HANDLED; |
---|
354 | 348 | } |
---|
355 | | - |
---|
356 | | -static struct irqaction irq_move_irqaction = { |
---|
357 | | - .handler = smp_irq_move_cleanup_interrupt, |
---|
358 | | - .name = "irq_move" |
---|
359 | | -}; |
---|
360 | 349 | |
---|
361 | 350 | static int __init parse_vector_domain(char *arg) |
---|
362 | 351 | { |
---|
.. | .. |
---|
585 | 574 | static irqreturn_t dummy_handler (int irq, void *dev_id) |
---|
586 | 575 | { |
---|
587 | 576 | BUG(); |
---|
| 577 | + return IRQ_NONE; |
---|
588 | 578 | } |
---|
589 | | - |
---|
590 | | -static struct irqaction ipi_irqaction = { |
---|
591 | | - .handler = handle_IPI, |
---|
592 | | - .name = "IPI" |
---|
593 | | -}; |
---|
594 | 579 | |
---|
595 | 580 | /* |
---|
596 | 581 | * KVM uses this interrupt to force a cpu out of guest mode |
---|
597 | 582 | */ |
---|
598 | | -static struct irqaction resched_irqaction = { |
---|
599 | | - .handler = dummy_handler, |
---|
600 | | - .name = "resched" |
---|
601 | | -}; |
---|
602 | | - |
---|
603 | | -static struct irqaction tlb_irqaction = { |
---|
604 | | - .handler = dummy_handler, |
---|
605 | | - .name = "tlb_flush" |
---|
606 | | -}; |
---|
607 | 583 | |
---|
608 | 584 | #endif |
---|
609 | 585 | |
---|
610 | 586 | void |
---|
611 | | -ia64_native_register_percpu_irq (ia64_vector vec, struct irqaction *action) |
---|
| 587 | +register_percpu_irq(ia64_vector vec, irq_handler_t handler, unsigned long flags, |
---|
| 588 | + const char *name) |
---|
612 | 589 | { |
---|
613 | 590 | unsigned int irq; |
---|
614 | 591 | |
---|
.. | .. |
---|
616 | 593 | BUG_ON(bind_irq_vector(irq, vec, CPU_MASK_ALL)); |
---|
617 | 594 | irq_set_status_flags(irq, IRQ_PER_CPU); |
---|
618 | 595 | irq_set_chip(irq, &irq_type_ia64_lsapic); |
---|
619 | | - if (action) |
---|
620 | | - setup_irq(irq, action); |
---|
| 596 | + if (handler) |
---|
| 597 | + if (request_irq(irq, handler, flags, name, NULL)) |
---|
| 598 | + pr_err("Failed to request irq %u (%s)\n", irq, name); |
---|
621 | 599 | irq_set_handler(irq, handle_percpu_irq); |
---|
622 | 600 | } |
---|
623 | 601 | |
---|
.. | .. |
---|
625 | 603 | ia64_native_register_ipi(void) |
---|
626 | 604 | { |
---|
627 | 605 | #ifdef CONFIG_SMP |
---|
628 | | - register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction); |
---|
629 | | - register_percpu_irq(IA64_IPI_RESCHEDULE, &resched_irqaction); |
---|
630 | | - register_percpu_irq(IA64_IPI_LOCAL_TLB_FLUSH, &tlb_irqaction); |
---|
| 606 | + register_percpu_irq(IA64_IPI_VECTOR, handle_IPI, 0, "IPI"); |
---|
| 607 | + register_percpu_irq(IA64_IPI_RESCHEDULE, dummy_handler, 0, "resched"); |
---|
| 608 | + register_percpu_irq(IA64_IPI_LOCAL_TLB_FLUSH, dummy_handler, 0, |
---|
| 609 | + "tlb_flush"); |
---|
631 | 610 | #endif |
---|
632 | 611 | } |
---|
633 | 612 | |
---|
634 | 613 | void __init |
---|
635 | 614 | init_IRQ (void) |
---|
636 | 615 | { |
---|
637 | | -#ifdef CONFIG_ACPI |
---|
638 | 616 | acpi_boot_init(); |
---|
639 | | -#endif |
---|
640 | 617 | ia64_register_ipi(); |
---|
641 | | - register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); |
---|
| 618 | + register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL, 0, NULL); |
---|
642 | 619 | #ifdef CONFIG_SMP |
---|
643 | | -#if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG) |
---|
644 | | - if (vector_domain_type != VECTOR_DOMAIN_NONE) |
---|
645 | | - register_percpu_irq(IA64_IRQ_MOVE_VECTOR, &irq_move_irqaction); |
---|
| 620 | + if (vector_domain_type != VECTOR_DOMAIN_NONE) { |
---|
| 621 | + register_percpu_irq(IA64_IRQ_MOVE_VECTOR, |
---|
| 622 | + smp_irq_move_cleanup_interrupt, 0, |
---|
| 623 | + "irq_move"); |
---|
| 624 | + } |
---|
646 | 625 | #endif |
---|
647 | | -#endif |
---|
648 | | -#ifdef CONFIG_PERFMON |
---|
649 | | - pfm_init_percpu(); |
---|
650 | | -#endif |
---|
651 | | - platform_irq_init(); |
---|
652 | 626 | } |
---|
653 | 627 | |
---|
654 | 628 | void |
---|