From patchwork Wed Jun 10 17:13:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 6583721 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 901B9C0020 for ; Wed, 10 Jun 2015 17:16:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A331E2044C for ; Wed, 10 Jun 2015 17:16:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CDA252041C for ; Wed, 10 Jun 2015 17:16:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z2jZx-0002rv-Be; Wed, 10 Jun 2015 17:14:17 +0000 Received: from mail-vn0-x22e.google.com ([2607:f8b0:400c:c0f::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z2jZs-0002ju-Ph; Wed, 10 Jun 2015 17:14:13 +0000 Received: by vnbg7 with SMTP id g7so9252985vnb.1; Wed, 10 Jun 2015 10:13:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=ikHfr3CF9D0rWobz4qI8rKAd7k6zWn2HHGvVYL6d9mQ=; b=ZYU++NpAdaqTlhmpbnTgRf0O7Pz9n2tWoCT4vkIU3SJMrCNw1YNlpRB08Pz0bIrVAX WTB5w0kgjtCpSH0Qq24nCgOJ+aWAyS17OmGRwodHKD6VKIKM3xg4uZC1OjFYoxzlodPN 4Zr2sjfnkNpmmqTIWm5YKYUMZcIeYKmpFaMi9Yw4ZA6G4RduWAnvu2NW0KWv9xusYfYz hL7aU0OSPR9I7uSgee0Dfc2IqTUpbN9sCzL9bPkOQuPJ5m5L/vdn4/xqktPvur+9/DGv Gb0CYKSWA2yxk+0g50cI7OoW7952avmwgnf2/EGsw23U8fla9rExzAuMt1hoQzqqvdzg DCLw== X-Received: by 10.53.5.170 with SMTP id cn10mr8447465vdd.76.1433956431309; Wed, 10 Jun 2015 10:13:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.197.134 with HTTP; Wed, 10 Jun 2015 10:13:30 -0700 (PDT) In-Reply-To: <1433874401-27161-8-git-send-email-robh@kernel.org> References: <1433874401-27161-1-git-send-email-robh@kernel.org> <1433874401-27161-8-git-send-email-robh@kernel.org> From: Rob Herring Date: Wed, 10 Jun 2015 12:13:30 -0500 X-Google-Sender-Auth: 9hK7MtPUvW-4D8Uo-TKtq1zwDwE Message-ID: Subject: Re: [PATCH 07/15] irqchip: kill off set_irq_flags usage To: "linux-arm-kernel@lists.infradead.org" , Thomas Gleixner , Jason Cooper X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150610_101412_971393_4B8D27ED X-CRM114-Status: GOOD ( 15.62 ) X-Spam-Score: 0.3 (/) Cc: Rob Herring , Krzysztof Kozlowski , "linux-samsung-soc@vger.kernel.org" , Russell King , "arm@kernel.org" , Alexander Shiyan , Stephen Warren , Lee Jones , "linux-kernel@vger.kernel.org" , Kukjin Kim , linux-rpi-kernel@lists.infradead.org, Maxime Ripard X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jun 9, 2015 at 1:26 PM, Rob Herring wrote: > 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. [...] > diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c > index 33127f1..e3609ae 100644 > --- a/drivers/irqchip/irq-clps711x.c > +++ b/drivers/irqchip/irq-clps711x.c > @@ -133,14 +133,14 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq, > irq_hw_number_t hw) > { > irq_flow_handler_t handler = handle_level_irq; > - unsigned int flags = IRQF_VALID | IRQF_PROBE; > + unsigned int flags = 0; > > if (!clps711x_irqs[hw].flags) > return 0; > > if (clps711x_irqs[hw].flags & CLPS711X_FLAG_FIQ) { > handler = handle_bad_irq; > - flags |= IRQF_NOAUTOEN; > + flags |= IRQ_NOAUTOEN; > } else if (clps711x_irqs[hw].eoi) { > handler = handle_fasteoi_irq; > } > @@ -150,7 +150,7 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq, > writel_relaxed(0, clps711x_intc->base + clps711x_irqs[hw].eoi); > > irq_set_chip_and_handler(virq, &clps711x_intc_chip, handler); > - set_irq_flags(virq, flags); > + irq_modify_status_flags(irq, IRQ_NOPROBE, flags); One fix needed here: } diff --git a/drivers/irqchip/irq-clps711x.c b/drivers/irqchip/irq-clps711x.c index e3609ae..2e74e81 100644 --- a/drivers/irqchip/irq-clps711x.c +++ b/drivers/irqchip/irq-clps711x.c @@ -150,7 +150,7 @@ static int __init clps711x_intc_irq_map(struct irq_domain *h, unsigned int virq, writel_relaxed(0, clps711x_intc->base + clps711x_irqs[hw].eoi); irq_set_chip_and_handler(virq, &clps711x_intc_chip, handler); - irq_modify_status_flags(irq, IRQ_NOPROBE, flags); + irq_modify_status(virq, IRQ_NOPROBE, flags); return 0;