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 (Arm)" X-Patchwork-Id: 6583701 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CB2AA9F326 for ; Wed, 10 Jun 2015 17:13:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA85C20412 for ; Wed, 10 Jun 2015 17:13:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AFA192041C for ; Wed, 10 Jun 2015 17:13:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754406AbbFJRNw (ORCPT ); Wed, 10 Jun 2015 13:13:52 -0400 Received: from mail-vn0-f42.google.com ([209.85.216.42]:37661 "EHLO mail-vn0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752640AbbFJRNw (ORCPT ); Wed, 10 Jun 2015 13:13:52 -0400 Received: by vnbg62 with SMTP id g62so9199958vnb.4; 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 Cc: Russell King , "linux-kernel@vger.kernel.org" , "arm@kernel.org" , Rob Herring , Kukjin Kim , Krzysztof Kozlowski , Stephen Warren , Lee Jones , Alexander Shiyan , Maxime Ripard , "linux-samsung-soc@vger.kernel.org" , linux-rpi-kernel@lists.infradead.org Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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: } --- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;