From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 343DECA6CBF for ; Tue, 27 Jan 2026 09:26:14 +0000 (UTC) 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-Owner; bh=Wl6BkALJV39VIIfHpGJRd/uOHe73v7PqmR9BLgKGuyA=; b=M1lWQ0C16H0cQV fTBtZ6XO4+yaWHcz80g7X9EVfZVFJRb9q8u/XPL0l9WZwYgCa9+QjSH5/rNf8KGLtONVkJfOtsjyx RIukxK6pgWZgVaHbxbP1RvrN6ebMrd25IJb2qYWVGpsGPXtsNzMuAfiZ5AGfDxG0PEWlIXRM+wM7i 7H5wTOLZ+BOZVlLBSgVW8ZYCR5NHkajutKhpHmaWugfjwtAcky379MbKmxsNKgZT64Fq7CDIJyD6N wdXwT5eswIdVjb0xJFqFpjVVTX9RQ98i8QlpczSsBhtMPq6SvmfuGDEjyKhKkYqIxLuWJC/9EefvP gF8410XAtLpwILkPyDpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vkfKe-0000000DvqC-1CgC; Tue, 27 Jan 2026 09:25:56 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vkfKY-0000000DvpL-1SKC for linux-riscv@lists.infradead.org; Tue, 27 Jan 2026 09:25:52 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 8841760132; Tue, 27 Jan 2026 09:25:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AD12C2BC86; Tue, 27 Jan 2026 09:25:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769505949; bh=4jiQZv9wxoQeg5GZ0kgb1xulJUpKBRxTXH2y58bWr18=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=MwfWSVSNX2GZRCGGxBdlvB8xQYGAbi+lkcajYFbHijmcWUpTHXDVhI7ydYg1uDjw4 HPpv7cCWzutovVqQJEFV3KZL//Hjra5aOIzQJyjIGBzCYXBC3ssyUAgViMMRma4E8N 9SI9RpBNdQlO2gZ1RG3HWsxR056Wvm49DwJQ5mjLp02M/PoyIPmVEZs045/mNPrN8l XEVpJ/uVSxciHV8bwp11WnyYsne7NENgI/2Vp0/n6QymhC8d5j3IAzg0x8lS3r/mDR Luvuoy36/GTL+oCN+smnWQtd3kI0mNNEOL3E95afS5itU4dMOYSPhDbadVadZSN/bL xSVk3WlsToqFA== From: Thomas Gleixner To: Vivian Wang , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , "Christophe Leroy (CS GROUP)" , Alex Deucher , Christian =?utf-8?Q?K=C3=B6nig?= , David Airlie , Simona Vetter , "Creeley, Brett" , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Bjorn Helgaas , Jaroslav Kysela , Takashi Iwai Cc: Han Gao , Vivian Wang , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, netdev@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, linux-riscv@lists.infradead.org, sophgo@lists.linux.dev, Takashi Iwai Subject: Re: [PATCH v3 1/4] PCI/MSI: Conservatively generalize no_64bit_msi into msi_addr_mask In-Reply-To: <20260123-pci-msi-addr-mask-v3-1-9f9baa048524@iscas.ac.cn> References: <20260123-pci-msi-addr-mask-v3-0-9f9baa048524@iscas.ac.cn> <20260123-pci-msi-addr-mask-v3-1-9f9baa048524@iscas.ac.cn> Date: Tue, 27 Jan 2026 10:25:46 +0100 Message-ID: <87o6mfbe5h.ffs@tglx> MIME-Version: 1.0 X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Fri, Jan 23 2026 at 14:07, Vivian Wang wrote: > Some PCI devices have PCI_MSI_FLAGS_64BIT in the MSI capability, but > implement less than 64 address bits. This breaks on platforms where such > a device is assigned an MSI address higher than what's reachable. > > Currently, we deal with this with a single no_64bit_msi flag, and we don't deal with anything. The code has a single bit limitation. Please use passive voice as documented. > (notably on powerpc) forces 32-bit MSI address for these devices. this is not a valid sentence. > However, on some platforms the MSI doorbell address is above 32-bit but > within device ability. > > As a first step to enabling MSI on those combinations of devices and > platforms, conservatively generalize the single-bit flag no_64bit_msi > into msi_addr_mask. (The name msi_addr_mask is chosen to avoid confusion > with msi_mask.) > > The translation is essentially: > > - no_64bit_msi = 1 -> msi_addr_mask = DMA_BIT_MASK(32) > - no_64bit_msi = 0 -> msi_addr_mask = DMA_BIT_MASK(64) > - if (no_64bit_msi) -> if (msi_addr_mask < DMA_BIT_MASK(64)) > > Since no values other than DMA_BIT_MASK(32) and DMA_BIT_MASK(64) is s/is/are/ > used, no functional change is intended. Future patches that make use of > intermediate values of msi_addr_mask will follow, allowing devices that > cannot use full 64-bit addresses for MSI to work on platforms with MSI > doorbell above 32-bit address space. > > Acked-by: Takashi Iwai > Signed-off-by: Vivian Wang Other than those nits: Reviewed-by: Thomas Gleixner _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv