From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 45E2DA3F; Sun, 9 Jun 2024 12:32:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717936362; cv=none; b=TJdKuc/pKs93O/rGfaoEi6E6JHWwc5ByaUKYm96bU2zZCTclcqvwPRyIo3qSBCPrbmYbh8zBTwJuo7kLJBGNyJzBpaQqVkb1lOMLWOxBz5FirzXWWsLzBGX1lHFhkXrHYm0zNj3s1IgCyAwoRn3jK0xNFjJVdqFBDYF/7ei6PCo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717936362; c=relaxed/simple; bh=gfageaVpPs5ry5xzWB7cccoG0GS182Wtm9HpTExW198=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=at4mnhDumS0tYYRoplprPiKrlNC8cx9M+47wuj//Tq1bHHc+7Khf7vWaauqtqIBQK6klHzEJlc+YHmOIm7RIH3MXfVJSSmu2SM2eA/6xzpk2I0Ymp+lZhrDTqxvgTPGWBBGvJspX7aDOcuNf/JZsE35uM0WYwN8P27NNYTvWaLU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c1SUlV46; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c1SUlV46" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9AAFC2BD10; Sun, 9 Jun 2024 12:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717936361; bh=gfageaVpPs5ry5xzWB7cccoG0GS182Wtm9HpTExW198=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=c1SUlV46y1QW7hzJho8wZS2A0M4LByF1N4p2SZaHAX0Ol+cj9rIw12osuerjHfxTD XPSa0rgG/o7BLlTed8gNqA5lUUFGEPnjKUtGja2IArtozwzScXQmBD9iAxNlywX1PW Fz/7WBxQjc0CTSjqPNrI1ZF6JnxFrprlXxhSx07/iKW7Ri2qvmD1euHiKJ9j0RFvOz 9pvNbYEsJGSpwsylYgVP3KOQBh8mz2BQzJaRbHAxeZdzZ1IO41JXW3bEg8dO7iUKyd b5hJ4ZIhw1bfdTo2qC9fyuzo5xnZDPs/m944aAE+rFsKhwDWbeHzjU81dL7d1jf1T8 9Tjy8KBqAlDZg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sGHix-002715-Di; Sun, 09 Jun 2024 13:32:39 +0100 Date: Sun, 09 Jun 2024 13:32:38 +0100 Message-ID: <864ja2l2jd.wl-maz@kernel.org> From: Marc Zyngier To: Manivannan Sadhasivam Cc: Jianjun Wang , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= , Rob Herring , Bjorn Helgaas , Matthias Brugger , AngeloGioacchino Del Regno , Ryder Lee , linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jieyy.yang@mediatek.com, chuanjia.liu@mediatek.com, qizhong.cheng@mediatek.com, jian.yang@mediatek.com, jianguo.zhang@mediatek.com Subject: Re: [PATCH v2 1/3] PCI: mediatek: Allocate MSI address with dmam_alloc_coherent() In-Reply-To: <20240608090152.GB3282@thinkpad> References: <20231211085256.31292-1-jianjun.wang@mediatek.com> <20231211085256.31292-2-jianjun.wang@mediatek.com> <20240608090152.GB3282@thinkpad> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: mani@kernel.org, jianjun.wang@mediatek.com, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, ryder.lee@mediatek.com, linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jieyy.yang@mediatek.com, chuanjia.liu@mediatek.com, qizhong.cheng@mediatek.com, jian.yang@mediatek.com, jianguo.zhang@mediatek.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Sat, 08 Jun 2024 10:01:52 +0100, Manivannan Sadhasivam wrote: > > On Mon, Dec 11, 2023 at 04:52:54PM +0800, Jianjun Wang wrote: > > Use dmam_alloc_coherent() to allocate the MSI address, instead of using > > virt_to_phys(). > > > > What is the reason for this change? So now PCIE_MSI_VECTOR becomes unused? More importantly, this is yet another example of the DW reference driver nonsense, where memory is allocated for *MSI*, while the whole point of MSIs is that it is a write that doesn't target memory, making any form of RAM allocation absolutely pointless. This silly approach has been cargo-culted for years, and while I caught a few in my time, you can't beat copy-paste. IMO, this patch is only making things worse instead of fixing things. M. -- Without deviation from the norm, progress is not possible.