Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1182356

[PATCH v2 11/13] sh: kill off set_irq_flags usage

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Rob Herring <robh@kernel.org>
Newsgroups linux.kernel
Subject [PATCH v2 11/13] sh: kill off set_irq_flags usage
Date Sun, 12 Jul 2015 16:30:01 +0200
Message-ID <pLqqt-Rf-5@gated-at.bofh.it> (permalink)
References <pLqqt-Rf-3@gated-at.bofh.it>
X-Original-To linux-arm-kernel@lists.infradead.org, Russell King <linux@arm.linux.org.uk>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=ILUxGNitL+1fNZv9OPFzmg5To4ArRmRXKRkaE87kpWc=; b=qyRV+I9Bpb1y13lIHbus4pes+YU8SBvELC2abAc2/G6689O4Pg7KuYckipI7Hh7Qaw iQ7CP0SdlXeaJWIW64JS4jjc11iF+mKO6TY42lxlSB1keedgZEHWMZhnhGMGfF2ntaA+ HI80/B5YpFIlgmBHHeOdP3/M9ww5X5JXnpMfW+7KCRBWykCXYIjHcjAz7G+9C466lg69 VKOjc5sFgswe0ykWoMK+kSG+WZSwz/V3H7Xzdeqz3pqplpn0YqvFntFpZrXvYmEkhSS6 hrKiUtDCXG0AyzIgxnOwcbz0qIX/7gpI2+Bp1tLhCiIlXcuPu6ttBtRki/nQTVUom/p1 dSHg==
X-Received by 10.182.86.39 with SMTP id m7mr12111358obz.18.1436711229371; Sun, 12 Jul 2015 07:27:09 -0700 (PDT)
X-Mailer git-send-email 2.1.0
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 52
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, arm@kernel.org, Magnus Damm <magnus.damm@gmail.com>, linux-sh@vger.kernel.org
X-Original-Date Sun, 12 Jul 2015 09:26:49 -0500
X-Original-Message-ID <1436711211-18223-12-git-send-email-robh@kernel.org>
X-Original-References <1436711211-18223-1-git-send-email-robh@kernel.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1182356

Show key headers only | View raw


set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:

IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN

For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also set IRQ_NOPROBE and this has been maintained although it is not
clear that is really needed. There appears to be a great deal of blind
copy and paste of this code.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Simon Horman <horms@verge.net.au>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: linux-sh@vger.kernel.org
---
 drivers/sh/intc/internals.h | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
index 7dff08e..897ffb1 100644
--- a/drivers/sh/intc/internals.h
+++ b/drivers/sh/intc/internals.h
@@ -99,15 +99,7 @@ static inline struct intc_desc_int *get_intc_desc(unsigned int irq)
  */
 static inline void activate_irq(int irq)
 {
-#ifdef CONFIG_ARM
-	/* ARM requires an extra step to clear IRQ_NOREQUEST, which it
-	 * sets on behalf of every irq_chip.  Also sets IRQ_NOPROBE.
-	 */
-	set_irq_flags(irq, IRQF_VALID);
-#else
-	/* same effect on other architectures */
-	irq_set_noprobe(irq);
-#endif
+	irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
 }
 
 static inline int intc_handle_int_cmp(const void *a, const void *b)
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v2 11/13] sh: kill off set_irq_flags usage Rob Herring <robh@kernel.org> - 2015-07-12 16:30 +0200

csiph-web