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 D6220C04A95 for ; Wed, 28 Sep 2022 07:55:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233872AbiI1Hzh (ORCPT ); Wed, 28 Sep 2022 03:55:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233854AbiI1HzA (ORCPT ); Wed, 28 Sep 2022 03:55:00 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE7BD2DF0; Wed, 28 Sep 2022 00:54:47 -0700 (PDT) Received: from canpemm500009.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Mcp6p0N5SzHqPY; Wed, 28 Sep 2022 15:30:10 +0800 (CST) Received: from [10.174.178.165] (10.174.178.165) by canpemm500009.china.huawei.com (7.192.105.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 28 Sep 2022 15:32:26 +0800 Subject: Re: [PATCH v2 1/3] genirq/irq_sim: Allow both one and two cell bindings To: Marc Zyngier , Bartosz Golaszewski CC: Wei Yongjun , Thomas Gleixner , Linus Walleij , , References: <20220926084428.1792815-1-weiyongjun@huaweicloud.com> <20220926084428.1792815-2-weiyongjun@huaweicloud.com> <865yha8fcs.wl-maz@kernel.org> From: Wei Yongjun Message-ID: Date: Wed, 28 Sep 2022 15:32:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <865yha8fcs.wl-maz@kernel.org> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.165] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500009.china.huawei.com (7.192.105.203) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/9/26 20:55, Marc Zyngier wrote: > 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. Hi Marc, > > 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 The 3/4/5 cell bindings is selience ignored currently. > 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. Would you means we should allow the users to overwrite the xlate callback or overwrite the domain_ops? Regards, Wei Yongjun