From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796208770; b=wle8tdMBLTyzMT5P+mc1FHeBggbOCnk+K5Xdy5SlLO6ZXErdsr9b2k8lGL2Ac7Ic3bf6 xBjPvkXG56LUvhhQ7Q9ude5MkJ3T7DxOM4Kw3spuCpVAd9YeJhi0+/OeemD1U2kMDaaNS OURJdHAA57O3v5Ew/+a1C1xh997bIItnlAfOf2VQ8PFaTyipEw0FnPbH2akUoBUPI9CYM +YXLgotKM2BmbLHF7NI3D5OHBvba9/uOgVDmj4L1Cm3BjAHCtcmsLEV/etgw3uk0xggb9 N3aJzN8+tYs7lxFUtONFhFz9txdeblmSq+33DTUmWABBdtXlf/Ej656/CMAY3VIFi6w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796208770; h=Received:DKIM-Signature:Subject:To:Cc:From:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=5e4NC7ZcaqZaPu1XiKsWiR4u35wQFULr4OTe+xpKMM4=; b=N+YsC/pWPdEwmqiglTmRK4LqERgxwp2kTxbOEBlNHFPrJvPXB09/zJD2wz1dMh9BF4iw MIehM0GHffDPjY/wMgluus5NnLQ9CfHEp8q38axkoBOOskri2t3tSJwNA9G/+aCuLOr2V bHwGD93oQ2FgHA7Rw/k4Ylvyx9P4Bics4f5kSC42V//XK988zdFRK+2JyB10P0jQPjevA OMLAI7OK/GdaQ6/T21hzKj0R6Hb0WKrwnNS1s6ExHogO2/gSSuFL3AmNOIqcht8D8TFRP KvKdtjIbAQf63PNRHTl/1G6+DtRHdvR4g9xMjMMuU211+KDAcEuont1tGnduX12PEiw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=JfC2C93o; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDEA1606A339 for ; Wed, 2 Dec 2026 10:52:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=JfC2C93o Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D2BC1F000C1; Wed, 2 Dec 2026 10:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796208770; bh=5e4NC7ZcaqZaPu1XiKsWiR4u35wQFULr4OTe+xpKMM4=; h=Subject:To:Cc:From:Date; b=JfC2C93o1Z3jAw/O+ZSxeXuYpNa1Zkgt4qtf9EmyGJ9AJnaxfVWGMKEe5Qm+6T6it 2cUFY7AdE4Fms266M65kWjHXmBWratjUNQKnweS7Mw1yXOpm1fXSbVjHe8POEwh05Q VNK51fVp9ehPiVdPWEdH25zDix3gvevCUz9hNMd4= Subject: FAILED: patch "[PATCH] drm/nouveau/gsp: only handle GSP interrupts routed to the" failed to apply to 6.12-stable tree To: joe@sudmix.de,airlied@redhat.com Cc: From: Date: Wed, 02 Dec 2026 11:52:47 +0100 Message-ID: <2026120247-debit-emergency-54eb@gregkh> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 54d3ff1b5ac08d0e28029b93a1719ddd9ff670a4 # git commit -s git send-email --to '' --in-reply-to '2026120247-debit-emergency-54eb@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..' Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 54d3ff1b5ac08d0e28029b93a1719ddd9ff670a4 Mon Sep 17 00:00:00 2001 From: Joe Finzel Date: Fri, 23 Oct 2026 11:38:05 +0200 Subject: [PATCH] drm/nouveau/gsp: only handle GSP interrupts routed to the host The GSP's interrupt handler takes every pending interrupt the RISC-V IRQMASK enables as its own, without looking at IRQDEST, which says whether an interrupt goes to the host or to the GSP itself. One that belongs to GSP-RM, pending when the host's handler runs for the message queue, is reported as unknown, cleared and masked off with IRQMCLR, taking it away from the firmware: nouveau 0000:01:00.0: gsp: intr 00040000 NVIDIA's driver reads the interrupts routed to the host as IRQSTAT & IRQMASK & IRQDEST (kflcnRiscvReadIntrStatus_TU102() and _GA102()). Do the same, with IRQDEST from NVIDIA's register headers next to IRQMASK on each falcon. Seen once in a few boots on an RTX 3070 Ti (GA104, GSP-RM 570.144), before the login prompt. There IRQMASK reads 0x01049042 and IRQDEST 0x01000040: 0x00040000 is enabled but routed to the GSP. Fixes: 830531e94712 ("drm/nouveau/gsp/r535: add interrupt handling") Cc: stable@vger.kernel.org Signed-off-by: Joe Finzel Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie Link: https://patch.msgid.link/20261023-nouveau-gsp-irqdest-v1-1-5dd6131faa14@sudmix.de diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h index 341f133dc38c..eb8adaf07fe5 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h @@ -63,6 +63,7 @@ struct nvkm_falcon_func { int (*select)(struct nvkm_falcon *); u32 addr2; u32 riscv_irqmask; + u32 riscv_irqdest; bool reset_pmc; int (*reset_eng)(struct nvkm_falcon *); int (*reset_prep)(struct nvkm_falcon *); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga100.c index d5126fe39d27..10e2813a0163 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga100.c @@ -27,6 +27,7 @@ ga100_gsp_flcn = { .enable = gm200_flcn_enable, .addr2 = 0x1000, .riscv_irqmask = 0x2b4, + .riscv_irqdest = 0x2b8, .reset_eng = gp102_flcn_reset_eng, .reset_wait_mem_scrubbing = gm200_flcn_reset_wait_mem_scrubbing, .bind_inst = gm200_flcn_bind_inst, diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c index b6b3eb6f4c00..96fa26fa6122 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/ga102.c @@ -140,6 +140,7 @@ ga102_gsp_flcn = { .select = ga102_flcn_select, .addr2 = 0x1000, .riscv_irqmask = 0x528, + .riscv_irqdest = 0x52c, .reset_eng = gp102_flcn_reset_eng, .reset_prep = ga102_flcn_reset_prep, .reset_wait_mem_scrubbing = ga102_flcn_reset_wait_mem_scrubbing, diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c index 63aa30f94747..fe590a045d70 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c @@ -64,7 +64,9 @@ r535_gsp_intr(struct nvkm_inth *inth) u32 intr = nvkm_falcon_rd32(&gsp->falcon, 0x0008); u32 inte = nvkm_falcon_rd32(&gsp->falcon, gsp->falcon.func->addr2 + gsp->falcon.func->riscv_irqmask); - u32 stat = intr & inte; + u32 dest = nvkm_falcon_rd32(&gsp->falcon, gsp->falcon.func->addr2 + + gsp->falcon.func->riscv_irqdest); + u32 stat = intr & inte & dest; if (!stat) { nvkm_debug(subdev, "inte %08x %08x\n", intr, inte); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c index 11a37963bd4e..823532758afd 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/tu102.c @@ -420,6 +420,7 @@ tu102_gsp_flcn = { .enable = gm200_flcn_enable, .addr2 = 0x1000, .riscv_irqmask = 0x2b4, + .riscv_irqdest = 0x2b8, .reset_eng = gp102_flcn_reset_eng, .reset_wait_mem_scrubbing = gm200_flcn_reset_wait_mem_scrubbing, .bind_inst = gm200_flcn_bind_inst,