From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 081B5C07E9D for ; Mon, 26 Sep 2022 14:37:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234953AbiIZOhF (ORCPT ); Mon, 26 Sep 2022 10:37:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234327AbiIZOgj (ORCPT ); Mon, 26 Sep 2022 10:36:39 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DC1C97B37; Mon, 26 Sep 2022 05:55:35 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 9256B60C6E; Mon, 26 Sep 2022 12:55:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0E39C433D6; Mon, 26 Sep 2022 12:55:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664196934; bh=qq99K9XkP93M84dnnMozsOV4GmoylkCVnPnfD0oKiyU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dwbRZmynfcASU15mDDPIzON0HAGhIomclk99wjisGdXoNQkSUsw/jgfv99lUFcfMg 3WuYpxn6O3BJgwMZ1E1r3ywIRWZqYwaIKhkm4w7SnAf4xECi8v6MM4Px4AZjYJg8sX UqrJnZCiNlx6BZZF1X5/uYJUOrU7Qn1IyVtEkASBfHzp7PPIPcHpqKZ+ScFR4lKXMr wznyCujjpvNoPdU9zd/xvw81c7cJTTivqrrmay3NfR+rXfT3y4Kdk4Ela8FrQrGCN7 RKaihDTuH4axR6ALGxNS/rJrLdIcCjDiJ7O/YdYq2oUhPK75VEA7Nubzs5+pHtZygG CRygiM5FVL9Ig== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ocndz-00Ch5r-SD; Mon, 26 Sep 2022 13:55:31 +0100 Date: Mon, 26 Sep 2022 08:55:31 -0400 Message-ID: <865yha8fcs.wl-maz@kernel.org> From: Marc Zyngier To: Bartosz Golaszewski Cc: Wei Yongjun , Thomas Gleixner , Linus Walleij , Wei Yongjun , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] genirq/irq_sim: Allow both one and two cell bindings In-Reply-To: References: <20220926084428.1792815-1-weiyongjun@huaweicloud.com> <20220926084428.1792815-2-weiyongjun@huaweicloud.com> 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.219.108.64 X-SA-Exim-Rcpt-To: brgl@bgdev.pl, weiyongjun@huaweicloud.com, tglx@linutronix.de, linus.walleij@linaro.org, weiyongjun1@huawei.com, linux-gpio@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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Mon, 26 Sep 2022 07:24:48 -0400, Bartosz Golaszewski wrote: > > On Mon, Sep 26, 2022 at 10:27 AM Wei Yongjun wrote: > > > > From: Wei Yongjun > > > > The IRQ simulator only support one cell binding now, this patch make it > > works with either one or two cell bindings, where the cell values map > > directly to the irq number and irq flags. > > > > Signed-off-by: Wei Yongjun > > --- > > kernel/irq/irq_sim.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/kernel/irq/irq_sim.c b/kernel/irq/irq_sim.c > > index dd76323ea3fd..73a90b7b6022 100644 > > --- a/kernel/irq/irq_sim.c > > +++ b/kernel/irq/irq_sim.c > > @@ -149,6 +149,7 @@ static void irq_sim_domain_unmap(struct irq_domain *domain, unsigned int virq) > > static const struct irq_domain_ops irq_sim_domain_ops = { > > .map = irq_sim_domain_map, > > .unmap = irq_sim_domain_unmap, > > + .xlate = irq_domain_xlate_onetwocell, > > }; > > > > /** > > -- > > 2.34.1 > > > > You'll need Marc's (Cc'ed) Ack here. The question is what will the simulator code do with this information. Throw it away? What of 3/4/5 cell bindings? I'd rather see the simulator being extended to deal with arbitrary bindings instead of trading a harcoded limit for another one. And also give some semantics to the extra cells. Thanks, M. -- Without deviation from the norm, progress is not possible.