Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225873
b: refs/heads/master
c: f13cd41
h: refs/heads/master
i:
  225871: 7c88fc4
v: v3
  • Loading branch information
Russell King committed Dec 20, 2010
1 parent e5efc85 commit 807b2ff
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cab8c6f3053c1b147bba825844c8e208f8b3b9f4
refs/heads/master: f13cd4170ee789f63b3c9585c1ae34e028bd549d
2 changes: 1 addition & 1 deletion trunk/arch/arm/include/asm/mach/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct seq_file;
extern unsigned int arch_nr_irqs;
extern void (*init_arch_irq)(void);
extern void init_FIQ(void);
extern int show_fiq_list(struct seq_file *, void *);
extern int show_fiq_list(struct seq_file *, int);

/*
* This is for easy migration, but should be changed in the source
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/include/asm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct seq_file;
/*
* generate IPI list text
*/
extern void show_ipi_list(struct seq_file *p);
extern void show_ipi_list(struct seq_file *, int);

/*
* Called from assembly code, this handles an IPI.
Expand Down Expand Up @@ -97,6 +97,6 @@ extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
/*
* show local interrupt info
*/
extern void show_local_irqs(struct seq_file *);
extern void show_local_irqs(struct seq_file *, int);

#endif /* ifndef __ASM_ARM_SMP_H */
5 changes: 3 additions & 2 deletions trunk/arch/arm/kernel/fiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ static struct fiq_handler default_owner = {

static struct fiq_handler *current_fiq = &default_owner;

int show_fiq_list(struct seq_file *p, void *v)
int show_fiq_list(struct seq_file *p, int prec)
{
if (current_fiq != &default_owner)
seq_printf(p, "FIQ: %s\n", current_fiq->name);
seq_printf(p, "%*s: %s\n", prec, "FIQ",
current_fiq->name);

return 0;
}
Expand Down
16 changes: 10 additions & 6 deletions trunk/arch/arm/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,15 @@ int show_interrupts(struct seq_file *p, void *v)
struct irq_desc *desc;
struct irqaction * action;
unsigned long flags;
int prec, n;

for (prec = 3, n = 1000; prec < 10 && n <= nr_irqs; prec++)
n *= 10;

if (i == 0) {
char cpuname[12];

seq_printf(p, " ");
seq_printf(p, "%*s ", prec, "");
for_each_present_cpu(cpu) {
sprintf(cpuname, "CPU%d", cpu);
seq_printf(p, " %10s", cpuname);
Expand All @@ -76,7 +80,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!action)
goto unlock;

seq_printf(p, "%3d: ", i);
seq_printf(p, "%*d: ", prec, i);
for_each_present_cpu(cpu)
seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu));
seq_printf(p, " %10s", desc->chip->name ? : "-");
Expand All @@ -89,15 +93,15 @@ int show_interrupts(struct seq_file *p, void *v)
raw_spin_unlock_irqrestore(&desc->lock, flags);
} else if (i == nr_irqs) {
#ifdef CONFIG_FIQ
show_fiq_list(p, v);
show_fiq_list(p, prec);
#endif
#ifdef CONFIG_SMP
show_ipi_list(p);
show_ipi_list(p, prec);
#endif
#ifdef CONFIG_LOCAL_TIMERS
show_local_irqs(p);
show_local_irqs(p, prec);
#endif
seq_printf(p, "Err: %10lu\n", irq_err_count);
seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count);
}
return 0;
}
Expand Down
14 changes: 7 additions & 7 deletions trunk/arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,16 +382,16 @@ void arch_send_call_function_single_ipi(int cpu)
smp_cross_call(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE);
}

void show_ipi_list(struct seq_file *p)
void show_ipi_list(struct seq_file *p, int prec)
{
unsigned int cpu;

seq_puts(p, "IPI:");
seq_printf(p, "%*s: ", prec, "IPI");

for_each_present_cpu(cpu)
seq_printf(p, " %10u", __get_irq_stat(cpu, ipi_irqs));
seq_printf(p, "%10u ", __get_irq_stat(cpu, ipi_irqs));

seq_putc(p, '\n');
seq_printf(p, " Inter-processor interrupts\n");
}

/*
Expand Down Expand Up @@ -421,16 +421,16 @@ asmlinkage void __exception do_local_timer(struct pt_regs *regs)
set_irq_regs(old_regs);
}

void show_local_irqs(struct seq_file *p)
void show_local_irqs(struct seq_file *p, int prec)
{
unsigned int cpu;

seq_printf(p, "LOC: ");
seq_printf(p, "%*s: ", prec, "LOC");

for_each_present_cpu(cpu)
seq_printf(p, "%10u ", __get_irq_stat(cpu, local_timer_irqs));

seq_putc(p, '\n');
seq_printf(p, " Local timer interrupts\n");
}
#endif

Expand Down

0 comments on commit 807b2ff

Please sign in to comment.