diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-28 16:06:32 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-28 16:06:32 -0400 |
| commit | b34e138e8bcbdfd8da0c4b063a689d54e9ba9f16 (patch) | |
| tree | f580f0f531702b14d22e9f3a5d00fdbfee59dd51 | |
| parent | 445aef374594207b278477dfd98fc5d1498d353a (diff) | |
| parent | 324808c2bc190e9424200e73faab1045df9b7d2e (diff) | |
Merge branch 'for-linus' of git://gitserver.sunplusct.com/linux-2.6-score
* 'for-linus' of git://gitserver.sunplusct.com/linux-2.6-score:
score: Use generic show_interrupts()
score: Convert to new irq function names
score: lost a semicolon in asm/irqflags.h
score: Select GENERIC_HARDIRQS_NO_DEPRECATED
score: Convert irq_chip to new functions
| -rw-r--r-- | arch/score/Kconfig | 2 | ||||
| -rw-r--r-- | arch/score/include/asm/irqflags.h | 2 | ||||
| -rw-r--r-- | arch/score/kernel/irq.c | 53 |
3 files changed, 11 insertions, 46 deletions
diff --git a/arch/score/Kconfig b/arch/score/Kconfig index 27b2295f41f3..4278bbc032ce 100644 --- a/arch/score/Kconfig +++ b/arch/score/Kconfig | |||
| @@ -3,6 +3,8 @@ menu "Machine selection" | |||
| 3 | config SCORE | 3 | config SCORE |
| 4 | def_bool y | 4 | def_bool y |
| 5 | select HAVE_GENERIC_HARDIRQS | 5 | select HAVE_GENERIC_HARDIRQS |
| 6 | select GENERIC_HARDIRQS_NO_DEPRECATED | ||
| 7 | select GENERIC_IRQ_SHOW | ||
| 6 | 8 | ||
| 7 | choice | 9 | choice |
| 8 | prompt "System type" | 10 | prompt "System type" |
diff --git a/arch/score/include/asm/irqflags.h b/arch/score/include/asm/irqflags.h index 5c7563891e28..37c6ac9dd6e8 100644 --- a/arch/score/include/asm/irqflags.h +++ b/arch/score/include/asm/irqflags.h | |||
| @@ -29,7 +29,7 @@ static inline unsigned long arch_local_save_flags(void) | |||
| 29 | 29 | ||
| 30 | static inline unsigned long arch_local_irq_save(void) | 30 | static inline unsigned long arch_local_irq_save(void) |
| 31 | { | 31 | { |
| 32 | unsigned long flags | 32 | unsigned long flags; |
| 33 | 33 | ||
| 34 | asm volatile( | 34 | asm volatile( |
| 35 | " mfcr r8, cr0 \n" | 35 | " mfcr r8, cr0 \n" |
diff --git a/arch/score/kernel/irq.c b/arch/score/kernel/irq.c index 47647dde09ca..d4196732c65e 100644 --- a/arch/score/kernel/irq.c +++ b/arch/score/kernel/irq.c | |||
| @@ -52,9 +52,9 @@ asmlinkage void do_IRQ(int irq) | |||
| 52 | irq_exit(); | 52 | irq_exit(); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | static void score_mask(unsigned int irq_nr) | 55 | static void score_mask(struct irq_data *d) |
| 56 | { | 56 | { |
| 57 | unsigned int irq_source = 63 - irq_nr; | 57 | unsigned int irq_source = 63 - d->irq; |
| 58 | 58 | ||
| 59 | if (irq_source < 32) | 59 | if (irq_source < 32) |
| 60 | __raw_writel((__raw_readl(SCORE_PIC + INT_MASKL) | \ | 60 | __raw_writel((__raw_readl(SCORE_PIC + INT_MASKL) | \ |
| @@ -64,9 +64,9 @@ static void score_mask(unsigned int irq_nr) | |||
| 64 | (1 << (irq_source - 32))), SCORE_PIC + INT_MASKH); | 64 | (1 << (irq_source - 32))), SCORE_PIC + INT_MASKH); |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | static void score_unmask(unsigned int irq_nr) | 67 | static void score_unmask(struct irq_data *d) |
| 68 | { | 68 | { |
| 69 | unsigned int irq_source = 63 - irq_nr; | 69 | unsigned int irq_source = 63 - d->irq; |
| 70 | 70 | ||
| 71 | if (irq_source < 32) | 71 | if (irq_source < 32) |
| 72 | __raw_writel((__raw_readl(SCORE_PIC + INT_MASKL) & \ | 72 | __raw_writel((__raw_readl(SCORE_PIC + INT_MASKL) & \ |
| @@ -78,9 +78,9 @@ static void score_unmask(unsigned int irq_nr) | |||
| 78 | 78 | ||
| 79 | struct irq_chip score_irq_chip = { | 79 | struct irq_chip score_irq_chip = { |
| 80 | .name = "Score7-level", | 80 | .name = "Score7-level", |
| 81 | .mask = score_mask, | 81 | .irq_mask = score_mask, |
| 82 | .mask_ack = score_mask, | 82 | .irq_mask_ack = score_mask, |
| 83 | .unmask = score_unmask, | 83 | .irq_unmask = score_unmask, |
| 84 | }; | 84 | }; |
| 85 | 85 | ||
| 86 | /* | 86 | /* |
| @@ -92,7 +92,7 @@ void __init init_IRQ(void) | |||
| 92 | unsigned long target_addr; | 92 | unsigned long target_addr; |
| 93 | 93 | ||
| 94 | for (index = 0; index < NR_IRQS; ++index) | 94 | for (index = 0; index < NR_IRQS; ++index) |
| 95 | set_irq_chip_and_handler(index, &score_irq_chip, | 95 | irq_set_chip_and_handler(index, &score_irq_chip, |
| 96 | handle_level_irq); | 96 | handle_level_irq); |
| 97 | 97 | ||
| 98 | for (target_addr = IRQ_VECTOR_BASE_ADDR; | 98 | for (target_addr = IRQ_VECTOR_BASE_ADDR; |
| @@ -109,40 +109,3 @@ void __init init_IRQ(void) | |||
| 109 | : : "r" (EXCEPTION_VECTOR_BASE_ADDR | \ | 109 | : : "r" (EXCEPTION_VECTOR_BASE_ADDR | \ |
| 110 | VECTOR_ADDRESS_OFFSET_MODE16)); | 110 | VECTOR_ADDRESS_OFFSET_MODE16)); |
| 111 | } | 111 | } |
| 112 | |||
| 113 | /* | ||
| 114 | * Generic, controller-independent functions: | ||
| 115 | */ | ||
| 116 | int show_interrupts(struct seq_file *p, void *v) | ||
| 117 | { | ||
| 118 | int i = *(loff_t *)v, cpu; | ||
| 119 | struct irqaction *action; | ||
| 120 | unsigned long flags; | ||
| 121 | |||
| 122 | if (i == 0) { | ||
| 123 | seq_puts(p, " "); | ||
| 124 | for_each_online_cpu(cpu) | ||
| 125 | seq_printf(p, "CPU%d ", cpu); | ||
| 126 | seq_putc(p, '\n'); | ||
| 127 | } | ||
| 128 | |||
| 129 | if (i < NR_IRQS) { | ||
| 130 | spin_lock_irqsave(&irq_desc[i].lock, flags); | ||
| 131 | action = irq_desc[i].action; | ||
| 132 | if (!action) | ||
| 133 | goto unlock; | ||
| 134 | |||
| 135 | seq_printf(p, "%3d: ", i); | ||
| 136 | seq_printf(p, "%10u ", kstat_irqs(i)); | ||
| 137 | seq_printf(p, " %8s", irq_desc[i].chip->name ? : "-"); | ||
| 138 | seq_printf(p, " %s", action->name); | ||
| 139 | for (action = action->next; action; action = action->next) | ||
| 140 | seq_printf(p, ", %s", action->name); | ||
| 141 | |||
| 142 | seq_putc(p, '\n'); | ||
| 143 | unlock: | ||
| 144 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | ||
| 145 | } | ||
| 146 | |||
| 147 | return 0; | ||
| 148 | } | ||
