Received: by 2002:ab2:68c1:0:b0:1fd:9a81:d0e4 with SMTP id e1csp486047lqp; Sun, 9 Jun 2024 05:32:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMw2HFGCFXYQwME8Yzq8qcgG67OynIDzqnJ0FyADIRNRxuYRT8R7JOXLRt1ZrUXdLHpx8ywIu4HgCy5cr/oSZ+YbS1tjG2+Td197ZvmA== X-Google-Smtp-Source: AGHT+IE+dS5QKB533wCYPWYHvh8O40LOkhKitDQG4c5YnSYSIGrzbXZ93fY3io/xHZ6SPmeeTZ6X X-Received: by 2002:a05:6a00:811:b0:704:1932:5607 with SMTP id d2e1a72fcca58-704193258f0mr6083185b3a.20.1717936370925; Sun, 09 Jun 2024 05:32:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717936370; cv=pass; d=google.com; s=arc-20160816; b=IB5zjIF2ZSPCPoI+63Sb4Qqg6t3QRh3AnEqVcGCDC7DqlTX+upExhLMhZidXUdSaai SSDyY3iI+yt66V1zueVYYb81oL4tVkDqBk7MISEH44yNa3nCEGp+UVQ2eAlW8LXxzhBq jOZVNr8Jdu6EXepVYOLJ8CjpxYvZ10J28hz18I6/URZeiIj1OYsxbbJA4+IQQn4LtiA5 VnfqXRbMBtOxiDya5rvj1Lyr3KrosJ+Qxj0tU/8ShY1QGduMfNk3JMmWhBGN7vVhAFKK KqongDxDYa6y62VyVcsWuH9gO37FksijUPLaSen7Rbn2ZAhkArxYpiOH8lewvrcds9Pi BfCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=iOi9N/nSSQsgietPsvs5I3VCicxzuSS2+LlhV6qmjjg=; fh=FAKDaXLCBEoSLbIh+OSapTh6QLgqgnqdqErqbSQlCos=; b=VpZMCXf3mkjmr76S3nK/hAwqbgfaIm7KNoBdYdXulDpuVNxuZm6TefsbpUyxfxnHOL 7fjg4oQsUj9sqEGDJcSe38QpU6mnfzcVgV6bVIcOkMWBlQnUtk3APKV4hQU2qLfzr3/6 AJBXB9AO2NjWNaQN0v2pq+2Rlv217l2psGODhvC+qBvt6JLzvbiqSnrTE0bd1ZOSmr60 tBs7ws3crPAb73lM/lZgutKPacHGMp3u9ZTd3kEyb5kGq7nzi2aJ8GvbL93wkiw9VwZL xGzOBBtTH5/Kqe1PwXQujvinsuAWm7S85YGczLXcJ6TRNxd7UqRt2NAkLeqTapSH3iE6 yKHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c1SUlV46; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207358-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207358-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e3f5d6f9f6si2374562a12.838.2024.06.09.05.32.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 05:32:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207358-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=c1SUlV46; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207358-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207358-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 86B95281A24 for ; Sun, 9 Jun 2024 12:32:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 357FE3F9D5; Sun, 9 Jun 2024 12:32:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c1SUlV46" 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 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.