From nobody Fri Dec 19 16:05:42 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 9256B1990B7; Tue, 15 Apr 2025 06:36:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744698998; cv=none; b=oDK6aD4hnq4zxR0B3pUOrovGRMRE3lu6s1WzFRrnKp/nhUNEpaxL9rz15GKdaB1hw3XuDW9xEFfPWZmLX3lQTJEF7Y5OPuBFrR4EJXYpdgX/Ot5MWYWz8b+NGsJ/FgGfAp0XerdTGxirEphHeJgB6BfIIEfBJq5se7eA002RUl8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744698998; c=relaxed/simple; bh=jmECu0W5gkM+EdNaKjmTt1FLSYp8t9qYRxN83IdkgDw=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=GGJW4LPX/xr/CMrrgVh/MlJRhZQEfUYYIzyqzsZXiRV4iPdYEkF/qXZ24DM4NuoDM3rz2xjxpDq3y69AMgJf2JYTQy5Fmk5WIImozH2DNsb035HGdpoRstxeqqf8HV1YITnt4WMVkq1XAfMCMFzvWVmfgL0kMntzkiLRatwz7dA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=K08ehPeV; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=IDOQfltW; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="K08ehPeV"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="IDOQfltW" Date: Tue, 15 Apr 2025 06:36:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1744698994; h=from:from:sender:sender:reply-to: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=uLfPNClUajV8YyLq/z3GhUQy2R7VoYzshCUbepJFlgs=; b=K08ehPeV68xVr072V4h4d7i6gYmRaKeLg0ZS8a6ED6iAAXKcgkbv45jhoDkME/+KL4qxq6 WZeG2zaDrpW0ehCNJ4p58OsTOZ1rHKXv4K/qRAsdSAIz6z+xc9ywlttGyi6y4IWi0G6/9H R7SpST7yk4c121VLxiBlJ2OTRPU3GGMpXxE27HapRkI6Yrg1X7F8MbI7JUMyj1HvJ9GCQA K3dX98Gl5I5wBCVveDrNPCA3qPTnWOSHUH7gXZIesdT+t5FeIijpth5IRvhFPp3z6wiMuj Ug3srjgLjtlmekZdMMHQsFLEbAV3PpprACp54tD4fm2VxHAdWysUa/uCu982RQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1744698994; h=from:from:sender:sender:reply-to: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=uLfPNClUajV8YyLq/z3GhUQy2R7VoYzshCUbepJFlgs=; b=IDOQfltWbX8ljhVS4R+gb9H75ukKqUHu007bT7w98lLtsclY1rpW1zhdcTIkbfY3mZxSW2 mUCJDC5VN0g3MNBQ== From: "tip-bot2 for Jonathan Currier" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/urgent] net/niu: Niu requires MSIX ENTRY_DATA fields touch before entry reads Cc: Jonathan Currier , Thomas Gleixner , stable@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20241117234843.19236-3-dullfire@yahoo.com> References: <20241117234843.19236-3-dullfire@yahoo.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <174469898928.31282.16263243968287889224.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the irq/urgent branch of tip: Commit-ID: fbb429ddff5c8e479edcc7dde5a542c9295944e6 Gitweb: https://git.kernel.org/tip/fbb429ddff5c8e479edcc7dde5a542c92= 95944e6 Author: Jonathan Currier AuthorDate: Sun, 17 Nov 2024 17:48:43 -06:00 Committer: Thomas Gleixner CommitterDate: Tue, 15 Apr 2025 08:32:19 +02:00 net/niu: Niu requires MSIX ENTRY_DATA fields touch before entry reads Fix niu_try_msix() to not cause a fatal trap on sparc systems. Set PCI_DEV_FLAGS_MSIX_TOUCH_ENTRY_DATA_FIRST on the struct pci_dev to work around a bug in the hardware or firmware. For each vector entry in the msix table, niu chips will cause a fatal trap if any registers in that entry are read before that entries' ENTRY_DATA register is written to. Testing indicates writes to other registers are not sufficient to prevent the fatal trap, however the value does not appear to matter. This only needs to happen once after power up, so simply rebooting into a kernel lacking this fix will NOT cause the trap. NON-RESUMABLE ERROR: Reporting on cpu 64 NON-RESUMABLE ERROR: TPC [0x00000000005f6900] NON-RESUMABLE ERROR: RAW [4010000000000016:00000e37f93e32ff:000000020200008= 0:ffffffffffffffff NON-RESUMABLE ERROR: 0000000800000000:0000000000000000:000000000000000= 0:0000000000000000] NON-RESUMABLE ERROR: handle [0x4010000000000016] stick [0x00000e37f93e32ff] NON-RESUMABLE ERROR: type [precise nonresumable] NON-RESUMABLE ERROR: attrs [0x02000080] < ASI sp-faulted priv > NON-RESUMABLE ERROR: raddr [0xffffffffffffffff] NON-RESUMABLE ERROR: insn effective address [0x000000c50020000c] NON-RESUMABLE ERROR: size [0x8] NON-RESUMABLE ERROR: asi [0x00] CPU: 64 UID: 0 PID: 745 Comm: kworker/64:1 Not tainted 6.11.5 #63 Workqueue: events work_for_cpu_fn TSTATE: 0000000011001602 TPC: 00000000005f6900 TNPC: 00000000005f6904 Y: 00= 000000 Not tainted TPC: g0: 00000000000002e9 g1: 000000000000000c g2: 000000c50020000c g3: 00000000= 00000100 g4: ffff8000470307c0 g5: ffff800fec5be000 g6: ffff800047a08000 g7: 00000000= 00000000 o0: ffff800014feb000 o1: ffff800047a0b620 o2: 0000000000000011 o3: ffff8000= 47a0b620 o4: 0000000000000080 o5: 0000000000000011 sp: ffff800047a0ad51 ret_pc: 0000= 0000005f7128 RPC: <__pci_enable_msix_range+0x3cc/0x460> l0: 000000000000000d l1: 000000000000c01f l2: ffff800014feb0a8 l3: 00000000= 00000020 l4: 000000000000c000 l5: 0000000000000001 l6: 0000000020000000 l7: ffff8000= 47a0b734 i0: ffff800014feb000 i1: ffff800047a0b730 i2: 0000000000000001 i3: 00000000= 0000000d i4: 0000000000000000 i5: 0000000000000000 i6: ffff800047a0ae81 i7: 00000000= 101888b0 I7: Call Trace: [<00000000101888b0>] niu_try_msix.constprop.0+0xc0/0x130 [niu] [<000000001018f840>] niu_get_invariants+0x183c/0x207c [niu] [<00000000101902fc>] niu_pci_init_one+0x27c/0x2fc [niu] [<00000000005ef3e4>] local_pci_probe+0x28/0x74 [<0000000000469240>] work_for_cpu_fn+0x8/0x1c [<000000000046b008>] process_scheduled_works+0x144/0x210 [<000000000046b518>] worker_thread+0x13c/0x1c0 [<00000000004710e0>] kthread+0xb8/0xc8 [<00000000004060c8>] ret_from_fork+0x1c/0x2c [<0000000000000000>] 0x0 Kernel panic - not syncing: Non-resumable error. Fixes: 7d5ec3d36123 ("PCI/MSI: Mask all unused MSI-X entries") Signed-off-by: Jonathan Currier Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20241117234843.19236-3-dullfire@yahoo.com --- drivers/net/ethernet/sun/niu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index 73c07f1..379b6e9 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c @@ -9064,6 +9064,8 @@ static void niu_try_msix(struct niu *np, u8 *ldg_num_= map) msi_vec[i].entry =3D i; } =20 + pdev->dev_flags |=3D PCI_DEV_FLAGS_MSIX_TOUCH_ENTRY_DATA_FIRST; + num_irqs =3D pci_enable_msix_range(pdev, msi_vec, 1, num_irqs); if (num_irqs < 0) { np->flags &=3D ~NIU_FLAGS_MSIX;