diff options
Diffstat (limited to 'arch/sparc/kernel/irq_64.c')
-rw-r--r-- | arch/sparc/kernel/irq_64.c | 68 |
1 files changed, 5 insertions, 63 deletions
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index 4ac5c651e00d..3d2c6baae96b 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c | |||
@@ -196,6 +196,11 @@ int show_interrupts(struct seq_file *p, void *v) | |||
196 | seq_putc(p, '\n'); | 196 | seq_putc(p, '\n'); |
197 | skip: | 197 | skip: |
198 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 198 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
199 | } else if (i == NR_IRQS) { | ||
200 | seq_printf(p, "NMI: "); | ||
201 | for_each_online_cpu(j) | ||
202 | seq_printf(p, "%10u ", cpu_data(j).__nmi_count); | ||
203 | seq_printf(p, " Non-maskable interrupts\n"); | ||
199 | } | 204 | } |
200 | return 0; | 205 | return 0; |
201 | } | 206 | } |
@@ -779,69 +784,6 @@ void do_softirq(void) | |||
779 | local_irq_restore(flags); | 784 | local_irq_restore(flags); |
780 | } | 785 | } |
781 | 786 | ||
782 | static void unhandled_perf_irq(struct pt_regs *regs) | ||
783 | { | ||
784 | unsigned long pcr, pic; | ||
785 | |||
786 | read_pcr(pcr); | ||
787 | read_pic(pic); | ||
788 | |||
789 | write_pcr(0); | ||
790 | |||
791 | printk(KERN_EMERG "CPU %d: Got unexpected perf counter IRQ.\n", | ||
792 | smp_processor_id()); | ||
793 | printk(KERN_EMERG "CPU %d: PCR[%016lx] PIC[%016lx]\n", | ||
794 | smp_processor_id(), pcr, pic); | ||
795 | } | ||
796 | |||
797 | /* Almost a direct copy of the powerpc PMC code. */ | ||
798 | static DEFINE_SPINLOCK(perf_irq_lock); | ||
799 | static void *perf_irq_owner_caller; /* mostly for debugging */ | ||
800 | static void (*perf_irq)(struct pt_regs *regs) = unhandled_perf_irq; | ||
801 | |||
802 | /* Invoked from level 15 PIL handler in trap table. */ | ||
803 | void perfctr_irq(int irq, struct pt_regs *regs) | ||
804 | { | ||
805 | clear_softint(1 << irq); | ||
806 | perf_irq(regs); | ||
807 | } | ||
808 | |||
809 | int register_perfctr_intr(void (*handler)(struct pt_regs *)) | ||
810 | { | ||
811 | int ret; | ||
812 | |||
813 | if (!handler) | ||
814 | return -EINVAL; | ||
815 | |||
816 | spin_lock(&perf_irq_lock); | ||
817 | if (perf_irq != unhandled_perf_irq) { | ||
818 | printk(KERN_WARNING "register_perfctr_intr: " | ||
819 | "perf IRQ busy (reserved by caller %p)\n", | ||
820 | perf_irq_owner_caller); | ||
821 | ret = -EBUSY; | ||
822 | goto out; | ||
823 | } | ||
824 | |||
825 | perf_irq_owner_caller = __builtin_return_address(0); | ||
826 | perf_irq = handler; | ||
827 | |||
828 | ret = 0; | ||
829 | out: | ||
830 | spin_unlock(&perf_irq_lock); | ||
831 | |||
832 | return ret; | ||
833 | } | ||
834 | EXPORT_SYMBOL_GPL(register_perfctr_intr); | ||
835 | |||
836 | void release_perfctr_intr(void (*handler)(struct pt_regs *)) | ||
837 | { | ||
838 | spin_lock(&perf_irq_lock); | ||
839 | perf_irq_owner_caller = NULL; | ||
840 | perf_irq = unhandled_perf_irq; | ||
841 | spin_unlock(&perf_irq_lock); | ||
842 | } | ||
843 | EXPORT_SYMBOL_GPL(release_perfctr_intr); | ||
844 | |||
845 | #ifdef CONFIG_HOTPLUG_CPU | 787 | #ifdef CONFIG_HOTPLUG_CPU |
846 | void fixup_irqs(void) | 788 | void fixup_irqs(void) |
847 | { | 789 | { |