From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FC2A606A32D for ; Wed, 11 Nov 2026 00:09:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=W87q1Pxh; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YA9OSEpy DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=AncNs0FAINNcjdJY4yAUm6SX03PPKH8M9uSCEsvpf5o=; b=W87q1PxhPbmTxCM30nvsQKl1yB NBjbAloBvFTby08EW7ktJwyqYzw8mADYm366+tMLp6MQW0ie6BJ9bvn6m6Lzdp+9IxBeOHS+zf/9h CcGELGe/6z+Z/na4rhSLyY98SId6pbgdxm4DQGMMPyFvS3kkG86vEJAkTtNkMpYZuqn3NraKkeC+a W6FwBT8nwXtnC4cidHwljW9I6Fwey77xvbYhoIFqbqWsL6cUVqvMKMwE2rKZvEKWI7axAao3tJKlU k5fy40fRNugBWb1/6GumYtGNBWRE8prC+gMuif9oM1DvYZ9vmVE731bcKdpto/49LMFtLXQ4IueTu 7gGZCw6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xQvu2-00000005HaD-2tux; Wed, 11 Nov 2026 00:09:26 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xQvu1-00000005Ha5-1x7j for linux-riscv@lists.infradead.org; Wed, 11 Nov 2026 00:09:25 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 8C8816183E; Wed, 11 Nov 2026 00:09:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7439C1F0089F; Wed, 11 Nov 2026 00:09:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794355764; bh=bA/vc0IAQMibteH6oL/6f45Pa4KgnYo//AbMRDRKPrs=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=YA9OSEpy11u4570/HDYCBBvcWN1tPK6cGRQd7g8cRYGfUpimGFuexldvFA9QPKoT7 JHv9tI6MZnwPdMxJ2Nonmvm/UzgNgwHxovM+MN1NoDSoub8PZ31hUVbivHk5S3LBfK faDmyzsthcMIC2pYDoX1l70zJyG0//8PoIqJ9wgWpfAdSgyAr4OMvFF3OMzUYURXNn PJbJDGFggyzKZj0wMSli+EdOva5ToeM/5pF2U/gmnSCpL+E8NSyrEiquPGmp0E5+V8 VFNco3vwdOldHlh8ChcDHgNLl+SF1A0oKYQVFTeWzA5QjqjKJK8in+B/g6DW0+ij/5 xFNUI7Pu4XSnw== From: Thomas Gleixner To: Troy Mitchell , Anup Patel , Radu Rendec , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , =?utf-8?B?Qmo=?= =?utf-8?B?w7ZybiBUw7ZwZWw=?= Cc: Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Troy Mitchell Subject: Re: [PATCH v2 2/2] irqchip/riscv-aplic: Apply pending affinity changes for level MSI sources In-Reply-To: <20261110-aplic-affinity-fix-v2-2-6c143b8b4e8c@linux.dev> References: <20261110-aplic-affinity-fix-v2-0-6c143b8b4e8c@linux.dev> <20261110-aplic-affinity-fix-v2-2-6c143b8b4e8c@linux.dev> Date: Wed, 11 Nov 2026 01:09:20 +0100 Message-ID: <87fqx8tej3.ffs@fw13> X-Archived-By: MIME-Version: 1.0 X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Tue, Nov 10 2026 at 12:06, Troy Mitchell wrote: > IMSIC rejects an affinity change with -EBUSY while a previous vector > move is still in flight, and the IRQ core then records the new mask as > pending. The change is applied by irq_move_irq() in the IMSIC irq_ack > callback, but level-triggered APLIC MSI interrupts are handled by > handle_fasteoi_irq(), which never calls irq_ack. > > The pending change is therefore never applied. While it is pending, > later affinity changes only update the pending mask, so the interrupt > stays on its old CPU. > > Use handle_fasteoi_ack_irq() for level-triggered sources. It acks the > interrupt before invoking the handler, so a pending affinity change is > applied on the next interrupt, and the EOI retrigger then targets the > new CPU. Smart! _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv