Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4548743rwb; Tue, 17 Jan 2023 02:14:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXsTZEvUlFCpk1I3+yWOcC5+Qli+3nvtKtkmUIbuIs15eIfVxhXVR/aZzz4uwwzLIZibLzsr X-Received: by 2002:a17:90a:3e46:b0:227:c27:c7d8 with SMTP id t6-20020a17090a3e4600b002270c27c7d8mr2862530pjm.23.1673950483636; Tue, 17 Jan 2023 02:14:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673950483; cv=none; d=google.com; s=arc-20160816; b=yB9hjXIeGDdG+b3jzX1TXFrQOY3/0xL52HY8eBCT8U0H/4m47a7b11Rg/ohEvoklgl ZHx98cXbocA6z5y2SP0wifHKtxbW+lslXw/NBRR4Jl/f1pU6S6b8sPI0cdL9bzmJPajg 6Qml+soPUdHYtNyBWB2vrZvCliJax85oi6hUIEbGl9qm9BhpDvyrGc98QLuWdovdcW6d rNN2tsWOBAGjhV9m3k+1s9tb7/ojPsYcwjhLANsixxm7n7p013q6eIzFpd/3uXZrYP59 +kNvFUBN2qeyl41go9fzThHJu4yZXtZBY+Ii1K7B3enTJCw3OK77L+g0u9Oytp5HKIc4 7cAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=huHxyGFkEMa6d1D0Au6QELxVkmDV59quuX0vGDYSXaY=; b=HmZT5x+eiEnKQZNALb/xSNPd3j27Wcs8WeVlGGeKL8WuqPvtQvk9P6pAeYdc7VFDD0 T+p0nopzYs+CFklwbF4feuTQDP2cF3X1LgG5ViRTN/R4zV6EwPvbh2oHcUbS/qXHYkzs SHy5W4ccRHo6pjDv3K01Vcc5CAwoVTdIaNF4Eyob60059SctYPmjRGOxXTQiuoQ277TQ v/V5gWGSo0OB0LnveoSJ84cEDcMkGQ7IjBL6EGM9rLQmodTsJ7t9Nk7sbsW7T2eSWQ+e TI35gey/pIvC93v4zk/YO3XopbIKD4Nsir/j/c3KbRG9M80QY5xKFm7gaRkAcX+JC1ki la3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pgh2qjtw; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a17090aea9000b002298849dcd6si3873754pjz.125.2023.01.17.02.14.37; Tue, 17 Jan 2023 02:14:43 -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=@linutronix.de header.s=2020 header.b=pgh2qjtw; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236631AbjAQJlU (ORCPT + 49 others); Tue, 17 Jan 2023 04:41:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236619AbjAQJkq (ORCPT ); Tue, 17 Jan 2023 04:40:46 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5240C30B1C for ; Tue, 17 Jan 2023 01:38:43 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1673948322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=huHxyGFkEMa6d1D0Au6QELxVkmDV59quuX0vGDYSXaY=; b=pgh2qjtwzxp/nJa3JrElZ2JxShuREDd68JdE2OsjHkpHfJlyUDOKhRrPHHP4aLudOTRna9 Ns9ZLINgGtYh/9Yy5OXlS7Iryt+jSX6KnbowoOc+o52zSMTIEL2osZlRP566fmne9/fjuu ZmpeNn7FqoMO4ZjnHBsk+hW8XeI2BTxfKI0BiPlz9++cxLkhjbReiTTnuXX0d99+D9VoyW g/HGppyULW2tu1E8C/CCkTpYwLTmH4LYmEhXqFs2+A+AuSoa8mr5HitkUNDjgTTDRP8o11 VgmPfnADVuuAUrHyEcD75uqOO+pxfaN4vsuAZflJsl3DNol/pH0TEED2VIblBQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1673948322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=huHxyGFkEMa6d1D0Au6QELxVkmDV59quuX0vGDYSXaY=; b=px5BPESDxGc8ZR6+hAf/v8dN6WWVHToWOLpC98VyASSEh0tO4D1ZyJAulu/8o5HD2KwtT1 GhXenrlzW8lISbDA== To: Yipeng Zou , Marc Zyngier Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, hewenliang4@huawei.com, chris.zjh@huawei.com, liaochang1@huawei.com Subject: Re: [RFC PATCH] irqchip/gic-v3: wait irq done to set affinity In-Reply-To: <89553b60-c5dc-76ad-67a4-594858ebedee@huawei.com> References: <20230106082136.68501-1-zouyipeng@huawei.com> <86pmbrop11.wl-maz@kernel.org> <89553b60-c5dc-76ad-67a4-594858ebedee@huawei.com> Date: Tue, 17 Jan 2023 10:38:41 +0100 Message-ID: <87tu0plcv2.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS 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 Mon, Jan 09 2023 at 20:26, Yipeng Zou wrote: > =E5=9C=A8 2023/1/6 19:55, Marc Zyngier =E5=86=99=E9=81=93: > index 973ede0197e3..fad08ccb7fd9 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -1667,6 +1667,9 @@ static int its_set_affinity(struct irq_data *d,=20 > const struct cpumask *mask_val, > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* don't set the affinity whe= n the target cpu is same as=20 > current one */ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (cpu !=3D prev_cpu) { > + > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 // wait irq done on all cpus > + There is no way to wait here. The caller holds the interrupt descriptor lock. If this is really an issue for LPI, then the only way to deal with that is CONFIG_GENERIC_PENDING_IRQ, which delays the affinity change to interrupt context Why on earth must all the known hardware mistakes be repeated over and over? Thanks, tglx