Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1752024pxm; Fri, 4 Mar 2022 02:48:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxr+3GmrB+8zJ+hwNYF7csquP3ppiM6y822n8nVivaiBbgU2VmatEAagI5n4A/vhYV1F+Wt X-Received: by 2002:a63:a22:0:b0:362:b5d4:fa89 with SMTP id 34-20020a630a22000000b00362b5d4fa89mr34001018pgk.372.1646390909665; Fri, 04 Mar 2022 02:48:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646390909; cv=none; d=google.com; s=arc-20160816; b=Xkrw0543BBxJ8MgOrajru7b/824jt8khtg6LHyn53WWAmF47RnSMMRaeZwq/g1OmxD JUTEfiypVJxoxadLHTYnDJZb7KiSMrG2VHNZojqQWUjAhZEOZzM7hi3+pVmH/SBtaaNr IAr3wxwfzEkDZMkDv3QXnKbAGOQ2atgMpgDPsHLeObUfVXqIrjLMpA4gyQSMM0AXV9JK Eq0Z3b9iYo9J0/8vLQaEVobkArGGJt58WXcofkwyduyJ0TVPWylB7Tt6awh2pjshGs6n 3nGhlP3nuOpmFQC6afOJx4lvPgwl0LtEyrnWS2MKJOSvzzvXKel4dOOpUsW2b+3c214H ptKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=buTQUH4eJnaTizaS8r8ZpHDCwJrTTPmX8XYyX53Ov8k=; b=WjORG1JyNSG535PfVAzfFu0TE4AcJuM+pkmYpTx9/8jlNQiAKJOYAB+jiw74r4Mq5Q ly1IkzTOX/I2hsLpS3nI0+eDWjIx7HamW5WfM2gut0VZ96m4FFOZVhniEBY96gqWxvn3 ileRFRCNjO2QtQlb/JSaKw7uv2aesCeZRvA+1CsCjRL1mUw7/iqWv3g00+xeuuuIKJwQ wxkMxQzIzMWUZo1YSw7q6DpNzEqq1h2HKp+IiG6whJUimdOtPcyz8k4EuVxduJcwpKw6 nrxQLEe6GHLdz+omAKCBdjL3HqSVGeseCALw0ia/SogXgZpV5msZcsdL7WYC1sUSoDBq nJqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cXIjvpAT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w20-20020a63c114000000b00373cc1ad7ebsi4574306pgf.546.2022.03.04.02.48.11; Fri, 04 Mar 2022 02:48:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cXIjvpAT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239036AbiCDIAM (ORCPT + 99 others); Fri, 4 Mar 2022 03:00:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239030AbiCDIAK (ORCPT ); Fri, 4 Mar 2022 03:00:10 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13AB6149961; Thu, 3 Mar 2022 23:59:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 114F2B827A1; Fri, 4 Mar 2022 07:59:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 969CBC340E9; Fri, 4 Mar 2022 07:59:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646380759; bh=NZb/jyj/jkqA0t/E0dt1LZydRqSTZzkEbnbs7Uesp6s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cXIjvpATyWGIm/KCqM2kBndDnYceqLiPrwdSFhAvTItKb9Sxkfj24A09JR23uwUpM ggKcW99vfTOH1UwIlkv+J9F2oQ+C4FAlsW1CloUIJhG8A/hQF/DexYwgz7UVdTKKZo N2KFo/MeOgCnK4DDwehxxJOd01o4vT1LKfevyj/0oDz1Y55tBCqdkKN0yjS1HZkug8 LVzF7OHKZMhWyUFvaxK1i+UcYj+v95SkkTzPXb476jnifPgwN234w/8uvzOYVzKzRY WILhkqzEzGf8VEMpp4FqSP6aK1IWCT7Zu/7MIjiuXuTEqXFU98N60dPqliYQqpT7j0 5KIfiCdKwI3Yg== Received: from ip-185-104-136-29.ptr.icomera.net ([185.104.136.29] helo=billy-the-mountain.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nQ2qL-00C9Jo-5G; Fri, 04 Mar 2022 07:59:17 +0000 Date: Fri, 04 Mar 2022 07:59:15 +0000 Message-ID: <87fsnytagc.wl-maz@kernel.org> From: Marc Zyngier To: Shawn Guo Cc: Thomas Gleixner , Maulik Shah , Bjorn Andersson , Sudeep Holla , Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 2/2] irqchip: Add Qualcomm MPM controller driver In-Reply-To: <20220303040229.GN269879@dragon> References: <20220301062414.2987591-1-shawn.guo@linaro.org> <20220301062414.2987591-3-shawn.guo@linaro.org> <87ee3m2aed.wl-maz@kernel.org> <20220302084028.GL269879@dragon> <877d9c3b2u.wl-maz@kernel.org> <20220302133441.GM269879@dragon> <875yow31a0.wl-maz@kernel.org> <20220303040229.GN269879@dragon> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.104.136.29 X-SA-Exim-Rcpt-To: shawn.guo@linaro.org, tglx@linutronix.de, quic_mkshah@quicinc.com, bjorn.andersson@linaro.org, sudeep.holla@arm.com, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 03 Mar 2022 04:02:29 +0000, Shawn Guo wrote: > > On Wed, Mar 02, 2022 at 01:57:27PM +0000, Marc Zyngier wrote: > > This code actually makes me ask more questions. Why is it programming > > 2 'pins' for each IRQ? > > The mapping between MPM pin and GIC IRQ is not strictly 1-1. There are > some rare case that up to 2 MPM pins map to a single GIC IRQ, for > example the last two in QC2290 'qcom,mpm-pin-map' below. > > qcom,mpm-pin-map = <2 275>, /* tsens0_tsens_upper_lower_int */ > <5 296>, /* lpass_irq_out_sdc */ > <12 422>, /* b3_lfps_rxterm_irq */ > <24 79>, /* bi_px_lpi_1_aoss_mx */ > <86 183>, /* mpm_wake,spmi_m */ > <90 260>, /* eud_p0_dpse_int_mx */ > <91 260>; /* eud_p0_dmse_int_mx */ > > > The downstream uses a DT bindings that specifies GIC hwirq number in > client device nodes. In that case, d->hwirq in the driver is GIC IRQ > number, and the driver will need to query mapping table, find out the > possible 2 MPM pins, and set them up. > > The patches I'm posting here use a different bindings that specifies MPM > pin instead in client device nodes. Thus the driver can simply get the > MPM pin from d->hwirq, so that the whole look-up procedure can be saved. It still remains that there is no 1:1 mapping between input and output, which is the rule #1 to be able to use a hierarchical setup. /me puzzled. > > > > > > > > > It seems MPM_REG_POLARITY is only meant for level interrupts, since edge > > > interrupts already have separate registers for rising and falling. > > > > Then level interrupts must clear both the edge registers at all times. > > The downstream logic already covers that, right? The edge register bits > will be cleared as long as 'flowtype' is not EDGE. I am talking about *your* code, not the Qualcomm stuff. M. -- Without deviation from the norm, progress is not possible.