Skip to content

Commit

Permalink
parisc: tlb flush counting fix for SMP and UP
Browse files Browse the repository at this point in the history
Fix up build error on UP and show correctly number of function call
(ipi) irqs.

Signed-off-by: Helge Deller <deller@gmx.de>
  • Loading branch information
Helge Deller committed May 7, 2013
1 parent cd85d55 commit 0fc537d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
6 changes: 1 addition & 5 deletions arch/parisc/include/asm/hardirq.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ typedef struct {
#ifdef CONFIG_SMP
unsigned int irq_resched_count;
unsigned int irq_call_count;
/*
* irq_tlb_count is double-counted in irq_call_count, so it must be
* subtracted from irq_call_count when displaying irq_call_count
*/
unsigned int irq_tlb_count;
#endif
unsigned int irq_tlb_count;
} ____cacheline_aligned irq_cpustat_t;

DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
Expand Down
2 changes: 2 additions & 0 deletions arch/parisc/include/asm/tlbflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ extern spinlock_t pa_tlb_lock;
extern void flush_tlb_all(void);
extern void flush_tlb_all_local(void *);

#define smp_flush_tlb_all() flush_tlb_all()

/*
* flush_tlb_mm()
*
Expand Down
5 changes: 2 additions & 3 deletions arch/parisc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,13 @@ int arch_show_interrupts(struct seq_file *p, int prec)
seq_printf(p, " Rescheduling interrupts\n");
seq_printf(p, "%*s: ", prec, "CAL");
for_each_online_cpu(j)
seq_printf(p, "%10u ", irq_stats(j)->irq_call_count -
irq_stats(j)->irq_tlb_count);
seq_printf(p, "%10u ", irq_stats(j)->irq_call_count);
seq_printf(p, " Function call interrupts\n");
#endif
seq_printf(p, "%*s: ", prec, "TLB");
for_each_online_cpu(j)
seq_printf(p, "%10u ", irq_stats(j)->irq_tlb_count);
seq_printf(p, " TLB shootdowns\n");
#endif
return 0;
}

Expand Down
11 changes: 0 additions & 11 deletions arch/parisc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,17 +263,6 @@ void arch_send_call_function_single_ipi(int cpu)
send_IPI_single(cpu, IPI_CALL_FUNC_SINGLE);
}

/*
* Flush all other CPU's tlb and then mine. Do this with on_each_cpu()
* as we want to ensure all TLB's flushed before proceeding.
*/

void
smp_flush_tlb_all(void)
{
on_each_cpu(flush_tlb_all_local, NULL, 1);
}

/*
* Called by secondaries to update state and initialize CPU registers.
*/
Expand Down

0 comments on commit 0fc537d

Please sign in to comment.