Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit daecbf58 authored by David S. Miller's avatar David S. Miller
Browse files

sparc64: Use a seperate counter for timer interrupts and NMI checks, like x86.



This keeps us from having to use kstat_irqs_cpu() from the NMI handler,
the former of which is a profiled function.

Instead we use a currently empty slot in the cpu_data

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f8e8a8e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -17,7 +17,7 @@ typedef struct {
	unsigned int	__nmi_count;
	unsigned int	__nmi_count;
	unsigned long	clock_tick;	/* %tick's per second */
	unsigned long	clock_tick;	/* %tick's per second */
	unsigned long	__pad;
	unsigned long	__pad;
	unsigned int	__pad1;
	unsigned int	irq0_irqs;
	unsigned int	__pad2;
	unsigned int	__pad2;


	/* Dcache line 2, rarely used */
	/* Dcache line 2, rarely used */
+1 −2
Original line number Original line Diff line number Diff line
@@ -92,7 +92,6 @@ static void die_nmi(const char *str, struct pt_regs *regs, int do_panic)
notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
{
{
	unsigned int sum, touched = 0;
	unsigned int sum, touched = 0;
	int cpu = smp_processor_id();


	clear_softint(1 << irq);
	clear_softint(1 << irq);


@@ -106,7 +105,7 @@ notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)
	else
	else
		pcr_ops->write(PCR_PIC_PRIV);
		pcr_ops->write(PCR_PIC_PRIV);


	sum = kstat_irqs_cpu(0, cpu);
	sum = local_cpu_data().irq0_irqs;
	if (__get_cpu_var(nmi_touch)) {
	if (__get_cpu_var(nmi_touch)) {
		__get_cpu_var(nmi_touch) = 0;
		__get_cpu_var(nmi_touch) = 0;
		touched = 1;
		touched = 1;
+1 −0
Original line number Original line Diff line number Diff line
@@ -728,6 +728,7 @@ void timer_interrupt(int irq, struct pt_regs *regs)


	irq_enter();
	irq_enter();


	local_cpu_data().irq0_irqs++;
	kstat_incr_irqs_this_cpu(0, irq_to_desc(0));
	kstat_incr_irqs_this_cpu(0, irq_to_desc(0));


	if (unlikely(!evt->event_handler)) {
	if (unlikely(!evt->event_handler)) {