Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756188AbdIHPHk (ORCPT ); Fri, 8 Sep 2017 11:07:40 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:38182 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754969AbdIHPHh (ORCPT ); Fri, 8 Sep 2017 11:07:37 -0400 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com v88F7TMS031527 X-Nifty-SrcIP: [209.85.161.177] X-Google-Smtp-Source: ADKCNb6ZaSMfU0uApY5hqPc7hD7a8uJsPE+N8HrV30BHc+nOp5CMQP+qDjsF58Vg9jnS/RN7ppU/fvY54138JFVZ4N8= MIME-Version: 1.0 In-Reply-To: References: <1504784522-26841-1-git-send-email-yamada.masahiro@socionext.com> From: Masahiro Yamada Date: Sat, 9 Sep 2017 00:06:48 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 0/6] irqdomain, gpio: expand irq_domain_push_irq() for DT use and use it for GPIO To: Marc Zyngier Cc: Thomas Gleixner , Linus Walleij , linux-gpio@vger.kernel.org, Rob Herring , Jassi Brar , devicetree@vger.kernel.org, Jason Cooper , Masami Hiramatsu , David Daney , Linux Kernel Mailing List , Mark Rutland , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1316 Lines: 48 Hi Marc. 2017-09-07 21:39 GMT+09:00 Marc Zyngier : >> I think there is a possibility where a device tries to get IRQ >> after irq_domain_create_hierarchy(), but before irq_domain_push_irq(). >> >> priv->domain = irq_domain_create_hierarchy(...) >> if (!priv->domain) >> return -ENOMEM; >> >> [ *** What if a irq consumer device request the irq here? *** ] > > We've explicitly forbidden such a use case. There is a (not exactly fool > proof) check in irq_domain_push_irq(), but it is pretty easy to bypass > it. "Don't do it" is the conclusion we reached with David Daney. > > If you don't want these interrupts to be requested, you might as well > flag them as IRQ_NOREQUEST, and unflag them when the hierarchy is ready. > > Would that work for you? Sorry if my description was unclear. I do not think IRQ_NOREQUEST is equivalent to IRQ_DOMAIN_FLAG_NO_CREATE I am trying to add in 5/6. My intention is to prevent platform_get_irq() from allocating a new virq. I think IRQ_NOREQUEST only affects request_irq(). Having said that, this series got negative response as a whole. My motivation is to get my GPIO driver (6/6) in by hook or by crook. If you do not like this series, please feel free to throw it away. -- Best Regards Masahiro Yamada