Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp392087imp; Wed, 20 Feb 2019 02:06:13 -0800 (PST) X-Google-Smtp-Source: AHgI3IYbWG2VKoTil4ZIOTvYIrYFF6zbVtge3iDkjnPAu08Rh6C2EE4WOPRf4RNFNlKrh7C+X5/H X-Received: by 2002:a17:902:1022:: with SMTP id b31mr35500571pla.141.1550657173727; Wed, 20 Feb 2019 02:06:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550657173; cv=none; d=google.com; s=arc-20160816; b=j+Dj7qq52SKFR3dpW0fnjtP/RVKaB82x+a467mu2BXKbjZ2srL8unqGFIf12w4IEM4 hMAkqr+9+5wWHOcmyJNvmqoHv9kb0tkftZNXNcE7nQJad1EvFDT5eQ4Eb2hWMNJ+ZzB9 HYUYDWHnrT2QSM2AoAh9rJc7nw/hg/qQLu/AMASPj3XjoaWWjHlu15dceGCjQqJjePQy 0BoJes+q5iiCTd6nxTKau+mE9+1KPCPZBLlRcftx8Z0/ERzsx3KRuA73nSO/i458huaP EidMJvfr18HIiunK40qHKX/v028JtLjjWsOdC1rFUTXfneXIB59lwEY5cda2jF63vsKc wfLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:organization:user-agent :references:in-reply-to:subject:cc:to:from:message-id:date; bh=ub0RxKrUhAo3het99S59Yr8KLaN43wqd05/NBpELrGM=; b=Vmk7iEmOFsx/du4QKW9/28CniiSoks7BpnOa7JDupyzcNWQQiDy6Vt7BO0xAxWmXkT Jbz/U609nLTvQQYD7q8VyCBIZxMXDlKMPx6DBXAs4eCyv6eFZgxtTbynS6o05p9VgAT9 Su5vCCGxo4bOF95x5SAOoGpyRlToTSjO+y/MQ3awSAsQvBfOSJ1CHfDNqbDPnd9Dw9zM Hcj7rwaTeWB8DOaCSeac4Unt8MVzfKnAqJyXMMiRbtblach9IltSvdQd6SQzIuhsPkS8 BXDkuVYWZYjf6OPHqQFuBgr53cUHcsfl8hpDdZCe5x2H1Sbfs4v/EGFEKQfynvzbDy/1 xUpg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6si18328025pgc.488.2019.02.20.02.05.58; Wed, 20 Feb 2019 02:06:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727209AbfBTKEm (ORCPT + 99 others); Wed, 20 Feb 2019 05:04:42 -0500 Received: from foss.arm.com ([217.140.101.70]:55078 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726000AbfBTKEm (ORCPT ); Wed, 20 Feb 2019 05:04:42 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9B751A78; Wed, 20 Feb 2019 02:04:41 -0800 (PST) Received: from big-swifty.misterjones.org (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B618C3F575; Wed, 20 Feb 2019 02:04:39 -0800 (PST) Date: Wed, 20 Feb 2019 10:04:36 +0000 Message-ID: <86va1erd1n.wl-marc.zyngier@arm.com> From: Marc Zyngier To: Phil Edworthy Cc: Thomas Gleixner , Jason Cooper , Geert Uytterhoeven , "linux-renesas-soc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Linus Walleij Subject: Re: [PATCH v4 2/2] irqchip: Add support for Renesas RZ/N1 GPIO interrupt multiplexer In-Reply-To: References: <20190219155511.28507-1-phil.edworthy@renesas.com> <20190219155511.28507-3-phil.edworthy@renesas.com> <20190219202842.59bc7719@why.wild-wind.fr.eu.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: ARM Ltd MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 20 Feb 2019 09:07:02 +0000, Phil Edworthy wrote: > > Hi Marc > > On 19 February 2019 20:29 Marc Zyngier wrote: [...] > > > + for (i = 0; i < MAX_NR_INPUT_IRQS; i++) > > > + irq_create_mapping(priv->irq_domain, i); > > > > This should never happen. Mappings should be created from discovering the > > interrupt specifiers for devices in the DT, and not eagerly at probe time. > > The key issue here is that the mappings should not be dynamically > allocated. On the device that has this hardware, there is a Cortex > M3 that is likely to use some of these GPIO interrupts. Maybe it > would be better to limit the number of GPIO irqs that Linux can > configure dynamically. But whatever the M3 is going to use is known statically for a given instance of this platform, right? You can always tell from the device tree which pins are available for Linux and which are not. Or can't you? > Looks like I've gone off in the wrong direction yet again. Nothing we can't help with. If you can explain all the constraints of the platform, we can come up with a fairly simple driver. And surely LinusW can chime in for the DT part, which seems to need some loving too. Thanks, M. -- Jazz is not dead, it just smell funny.