From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754062AbbGMUqP (ORCPT ); Mon, 13 Jul 2015 16:46:15 -0400 Received: from www.linutronix.de ([62.245.132.108]:56009 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753697AbbGMUqM (ORCPT ); Mon, 13 Jul 2015 16:46:12 -0400 Message-Id: <20150713200715.113667554@linutronix.de> User-Agent: quilt/0.63-1 Date: Mon, 13 Jul 2015 20:46:04 -0000 From: Thomas Gleixner To: LKML Cc: Ralf Baechle , Jiang Liu , linux-mips@linux-mips.org Subject: [patch 08/12] MIPS/alchemy: Remove pointless irqdisable/enable References: <20150713200602.799079101@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Disposition: inline; filename=MIPS-alchemy--Remove-pointless-irqdisable-enable.patch X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org bcsr_csc_handler() is a cascading interrupt handler. It has 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 Cc: Ralf Baechle Cc: linux-mips@linux-mips.org --- arch/mips/alchemy/devboards/bcsr.c | 2 -- 1 file changed, 2 deletions(-) Index: tip/arch/mips/alchemy/devboards/bcsr.c =================================================================== --- tip.orig/arch/mips/alchemy/devboards/bcsr.c +++ tip/arch/mips/alchemy/devboards/bcsr.c @@ -89,9 +89,7 @@ static void bcsr_csc_handler(unsigned in { unsigned short bisr = __raw_readw(bcsr_virt + BCSR_REG_INTSTAT); - disable_irq_nosync(irq); generic_handle_irq(bcsr_csc_base + __ffs(bisr)); - enable_irq(irq); } static void bcsr_irq_mask(struct irq_data *d)