diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-07-13 16:46:06 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-08-26 09:23:31 -0400 |
commit | 9d9a2fa7dcbd05a1608a6a38b6ec1a092e117c3c (patch) | |
tree | f7cd23d58b7e10edb95282a8c97a027e59d02e7b | |
parent | e0288a0a7bb8b28787453cb96f7aad272086def1 (diff) |
MIPS: ath91: Remove pointless irqdisable/enable
The various interrupt flow handlers in ath79 are cascading interrupt
handlers. They all have a disable_irq_nosync()/enable_irq() pair
around the generic_handle_irq() call. The value of this disable/enable
is zero because its a complete noop:
disable_irq_nosync() merily increments the disable count without
actually masking the interrupt. enable_irq() soleley decrements the
disable count without touching the interrupt chip. The interrupt
cannot arrive again because the complete call chain runs with
interrupts disabled.
Remove it.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mips@linux-mips.org
Cc: LKML <linux-kernel@vger.kernel.org>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Patchwork: https://patchwork.linux-mips.org/patch/10703/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/ath79/irq.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/arch/mips/ath79/irq.c b/arch/mips/ath79/irq.c index 2021be20d9d9..807132b838b2 100644 --- a/arch/mips/ath79/irq.c +++ b/arch/mips/ath79/irq.c | |||
@@ -123,8 +123,6 @@ static void ar934x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc) | |||
123 | { | 123 | { |
124 | u32 status; | 124 | u32 status; |
125 | 125 | ||
126 | disable_irq_nosync(irq); | ||
127 | |||
128 | status = ath79_reset_rr(AR934X_RESET_REG_PCIE_WMAC_INT_STATUS); | 126 | status = ath79_reset_rr(AR934X_RESET_REG_PCIE_WMAC_INT_STATUS); |
129 | 127 | ||
130 | if (status & AR934X_PCIE_WMAC_INT_PCIE_ALL) { | 128 | if (status & AR934X_PCIE_WMAC_INT_PCIE_ALL) { |
@@ -136,8 +134,6 @@ static void ar934x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc) | |||
136 | } else { | 134 | } else { |
137 | spurious_interrupt(); | 135 | spurious_interrupt(); |
138 | } | 136 | } |
139 | |||
140 | enable_irq(irq); | ||
141 | } | 137 | } |
142 | 138 | ||
143 | static void ar934x_ip2_irq_init(void) | 139 | static void ar934x_ip2_irq_init(void) |
@@ -156,14 +152,12 @@ static void qca955x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc) | |||
156 | { | 152 | { |
157 | u32 status; | 153 | u32 status; |
158 | 154 | ||
159 | disable_irq_nosync(irq); | ||
160 | |||
161 | status = ath79_reset_rr(QCA955X_RESET_REG_EXT_INT_STATUS); | 155 | status = ath79_reset_rr(QCA955X_RESET_REG_EXT_INT_STATUS); |
162 | status &= QCA955X_EXT_INT_PCIE_RC1_ALL | QCA955X_EXT_INT_WMAC_ALL; | 156 | status &= QCA955X_EXT_INT_PCIE_RC1_ALL | QCA955X_EXT_INT_WMAC_ALL; |
163 | 157 | ||
164 | if (status == 0) { | 158 | if (status == 0) { |
165 | spurious_interrupt(); | 159 | spurious_interrupt(); |
166 | goto enable; | 160 | return; |
167 | } | 161 | } |
168 | 162 | ||
169 | if (status & QCA955X_EXT_INT_PCIE_RC1_ALL) { | 163 | if (status & QCA955X_EXT_INT_PCIE_RC1_ALL) { |
@@ -175,17 +169,12 @@ static void qca955x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc) | |||
175 | /* TODO: flush DDR? */ | 169 | /* TODO: flush DDR? */ |
176 | generic_handle_irq(ATH79_IP2_IRQ(1)); | 170 | generic_handle_irq(ATH79_IP2_IRQ(1)); |
177 | } | 171 | } |
178 | |||
179 | enable: | ||
180 | enable_irq(irq); | ||
181 | } | 172 | } |
182 | 173 | ||
183 | static void qca955x_ip3_irq_dispatch(unsigned int irq, struct irq_desc *desc) | 174 | static void qca955x_ip3_irq_dispatch(unsigned int irq, struct irq_desc *desc) |
184 | { | 175 | { |
185 | u32 status; | 176 | u32 status; |
186 | 177 | ||
187 | disable_irq_nosync(irq); | ||
188 | |||
189 | status = ath79_reset_rr(QCA955X_RESET_REG_EXT_INT_STATUS); | 178 | status = ath79_reset_rr(QCA955X_RESET_REG_EXT_INT_STATUS); |
190 | status &= QCA955X_EXT_INT_PCIE_RC2_ALL | | 179 | status &= QCA955X_EXT_INT_PCIE_RC2_ALL | |
191 | QCA955X_EXT_INT_USB1 | | 180 | QCA955X_EXT_INT_USB1 | |
@@ -193,7 +182,7 @@ static void qca955x_ip3_irq_dispatch(unsigned int irq, struct irq_desc *desc) | |||
193 | 182 | ||
194 | if (status == 0) { | 183 | if (status == 0) { |
195 | spurious_interrupt(); | 184 | spurious_interrupt(); |
196 | goto enable; | 185 | return; |
197 | } | 186 | } |
198 | 187 | ||
199 | if (status & QCA955X_EXT_INT_USB1) { | 188 | if (status & QCA955X_EXT_INT_USB1) { |
@@ -210,9 +199,6 @@ static void qca955x_ip3_irq_dispatch(unsigned int irq, struct irq_desc *desc) | |||
210 | /* TODO: flush DDR? */ | 199 | /* TODO: flush DDR? */ |
211 | generic_handle_irq(ATH79_IP3_IRQ(2)); | 200 | generic_handle_irq(ATH79_IP3_IRQ(2)); |
212 | } | 201 | } |
213 | |||
214 | enable: | ||
215 | enable_irq(irq); | ||
216 | } | 202 | } |
217 | 203 | ||
218 | static void qca955x_irq_init(void) | 204 | static void qca955x_irq_init(void) |