mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-08 04:26:40 +07:00
8f0ddf91f2
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (26 commits) clockevents: Convert to raw_spinlock clockevents: Make tick_device_lock static debugobjects: Convert to raw_spinlocks perf_event: Convert to raw_spinlock hrtimers: Convert to raw_spinlocks genirq: Convert irq_desc.lock to raw_spinlock smp: Convert smplocks to raw_spinlocks rtmutes: Convert rtmutex.lock to raw_spinlock sched: Convert pi_lock to raw_spinlock sched: Convert cpupri lock to raw_spinlock sched: Convert rt_runtime_lock to raw_spinlock sched: Convert rq->lock to raw_spinlock plist: Make plist debugging raw_spinlock aware bkl: Fixup core_lock fallout locking: Cleanup the name space completely locking: Further name space cleanups alpha: Fix fallout from locking changes locking: Implement new raw_spinlock locking: Convert raw_rwlock functions to arch_rwlock locking: Convert raw_rwlock to arch_rwlock ...
66 lines
1.4 KiB
C
66 lines
1.4 KiB
C
/*
|
|
* Copyright (C) 2004-2006 Atmel Corporation
|
|
*
|
|
* Based on arch/i386/kernel/irq.c
|
|
* Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#include <linux/interrupt.h>
|
|
#include <linux/irq.h>
|
|
#include <linux/kernel_stat.h>
|
|
#include <linux/proc_fs.h>
|
|
#include <linux/seq_file.h>
|
|
#include <linux/sysdev.h>
|
|
|
|
/* May be overridden by platform code */
|
|
int __weak nmi_enable(void)
|
|
{
|
|
return -ENOSYS;
|
|
}
|
|
|
|
void __weak nmi_disable(void)
|
|
{
|
|
|
|
}
|
|
|
|
#ifdef CONFIG_PROC_FS
|
|
int show_interrupts(struct seq_file *p, void *v)
|
|
{
|
|
int i = *(loff_t *)v, cpu;
|
|
struct irqaction *action;
|
|
unsigned long flags;
|
|
|
|
if (i == 0) {
|
|
seq_puts(p, " ");
|
|
for_each_online_cpu(cpu)
|
|
seq_printf(p, "CPU%d ", cpu);
|
|
seq_putc(p, '\n');
|
|
}
|
|
|
|
if (i < NR_IRQS) {
|
|
raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
|
|
action = irq_desc[i].action;
|
|
if (!action)
|
|
goto unlock;
|
|
|
|
seq_printf(p, "%3d: ", i);
|
|
for_each_online_cpu(cpu)
|
|
seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu));
|
|
seq_printf(p, " %8s", irq_desc[i].chip->name ? : "-");
|
|
seq_printf(p, " %s", action->name);
|
|
for (action = action->next; action; action = action->next)
|
|
seq_printf(p, ", %s", action->name);
|
|
|
|
seq_putc(p, '\n');
|
|
unlock:
|
|
raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
#endif
|