From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90C943FC5AB for ; Mon, 13 Jul 2026 12:08:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783944513; cv=none; b=V383R4rjGlh9FPwsnb4t3V+t0RVuk0ulPpI3p3TLQ8Zgbq7Y+roQYWMTRnVBYPeu5tP6wjAkEW2yhl2CxtRoIPUKFyw8goYmhB3sl4Cd8JLl97mBBfEAPpQkyUB1IifdxSMzdhyA04dwupjV6CXZ9QaWRmKpIXeWPLtCZpyVRfk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783944513; c=relaxed/simple; bh=+HomR7Z3nEGy40+7CYb3o1h4NrGDbzB7xoNgXDgjhyA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=KdSuZTqf6re8IJ2t5693OzRohIdhG2gckm5cv9NqGslk4IeW0lIJ92u4qwTpbU87tDSsy552mRUPonWgSf7o6kXjNwg5ywHq2M2hCcxF6oj9g9sOWcPPjP/XfDClTPaZhiVArYR0a2bNBlKTA77sh/X1RtEC+tPhFzrpqdQyhmo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.198]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTPS id 4gzLmb2dhVzKHMVW for ; Mon, 13 Jul 2026 20:07:59 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.252]) by mail.maildlp.com (Postfix) with ESMTP id 6641540CB2 for ; Mon, 13 Jul 2026 20:08:28 +0800 (CST) Received: from [10.166.163.161] (unknown [10.166.163.161]) by APP3 (Coremail) with UTF8SMTPA id _Ch0CgA3A6Q71VRqUEFOBA--.9881S2; Mon, 13 Jul 2026 20:08:28 +0800 (CST) Message-ID: <5fc734a2-d9d2-4695-ada4-06ac83eb5ce8@huaweicloud.com> Date: Mon, 13 Jul 2026 20:08:27 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 6/6] irqchip/gic-v3-its: Remove redundant check in its_vpe_db_proxy_unmap_locked() To: Radu Rendec , maz@kernel.org, tglx@kernel.org, jason@lakedaemon.net, lpieralisi@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260702033050.1583-1-shikemeng@huaweicloud.com> <20260702033050.1583-7-shikemeng@huaweicloud.com> <1d141ab4b472533ba728c65201ea7cb74047acba.camel@rendec.net> From: Kemeng Shi In-Reply-To: <1d141ab4b472533ba728c65201ea7cb74047acba.camel@rendec.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CM-TRANSID:_Ch0CgA3A6Q71VRqUEFOBA--.9881S2 X-Coremail-Antispam: 1UD129KBjvJXoW7uw1UZr1xWrW5Zr4xGFWrGrg_yoW8uF47pF s5Wryqkr429rs7Jr4DGr4xJ3Wayr1xtry3AFW5Gw129rn8G3ZrtF1vvayYvas2vrW7JFsr XF1fXay8AF4UCaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUyGb4IE77IF4wAFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4 vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_JFI_Gr1l84ACjcxK6xIIjxv20xvEc7Cj xVAFwI0_Cr0_Gr1UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x 0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG 6I80ewAv7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFV Cjc4AY6r1j6r4UM4x0Y48IcVAKI48JMxkF7I0En4kS14v26r126r1DMxAIw28IcxkI7VAK I48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7 xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xII jxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw2 0EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x02 67AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IUbiF4tUUUUU== X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ 在 2026/7/5 0:32:44, Radu Rendec 写道: > On Thu, 2026-07-02 at 11:30 +0800, Kemeng Shi wrote: >> The high level functions already ensure that gic_rdists->has_rvpeid >> is false before calling its_vpe_db_proxy_unmap_locked(), so we can >> remove the redundant check in its_vpe_db_proxy_unmap_locked() > > That's true for what the code is *today*. By removing the check, you're > setting up a trap in case a new call to its_vpe_db_proxy_unmap_locked() > is added in the future with the assumption that it will do "the right > thing". The way I see these functions, they are not really "high level" > and "low level". For example, its_vpe_db_proxy_map_locked() is called > both by its_vpe_db_proxy_move() (which is another db_proxy function) > and by its_vpe_send_cmd() directly. > > FWIW, the code you're removing is just this: > 0xffff8000806cf934 <+44>: adrp x0, 0xffff80008177e000 > 0xffff8000806cf938 <+48>: add x4, x0, #0x348 > 0xffff8000806cf93c <+52>: ldr x0, [x0, #840] > 0xffff8000806cf940 <+56>: ldrb w0, [x0, #45] > 0xffff8000806cf944 <+60>: tbnz w0, #0, 0xffff8000806cf9dc > > I would argue that the gain in terms of both code size and speed is > negligible (and these functions are subject to inlining anyway). > Sure. Will drop this one in next version. Thanks.>> Signed-off-by: Kemeng Shi >> --- >>  drivers/irqchip/irq-gic-v3-its.c | 4 ---- >>  1 file changed, 4 deletions(-) >> >> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c >> index 120f6f29e978..b0069fbe1e69 100644 >> --- a/drivers/irqchip/irq-gic-v3-its.c >> +++ b/drivers/irqchip/irq-gic-v3-its.c >> @@ -3801,10 +3801,6 @@ static const struct irq_domain_ops its_domain_ops = { >>   */ >>  static void its_vpe_db_proxy_unmap_locked(struct its_vpe *vpe) >>  { >> - /* GICv4.1 doesn't use a proxy, so nothing to do here */ >> - if (gic_rdists->has_rvpeid) >> - return; >> - >>   /* Already unmapped? */ >>   if (vpe->vpe_proxy_event == -1) >>   return;