From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934089AbdKHA4S (ORCPT ); Tue, 7 Nov 2017 19:56:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:57034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751841AbdKHA4R (ORCPT ); Tue, 7 Nov 2017 19:56:17 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1621021870 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Tue, 7 Nov 2017 18:56:14 -0600 From: Bjorn Helgaas To: Niklas Cassel Cc: Jingoo Han , Joao Pinto , Bjorn Helgaas , Niklas Cassel , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 01/17] PCI: dwc: Use the DMA-API to get the MSI address Message-ID: <20171108005614.GF22847@bhelgaas-glaptop.roam.corp.google.com> References: <20171103134722.5532-1-niklas.cassel@axis.com> <20171103134722.5532-2-niklas.cassel@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171103134722.5532-2-niklas.cassel@axis.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 03, 2017 at 02:47:05PM +0100, Niklas Cassel wrote: > Use the DMA-API to get the MSI address. This address will be written to > our PCI config space and to the register which determines which AXI > address the DWC IP will spoof for incoming MSI irqs. > > Since it is a PCIe endpoint device, rather than the CPU, that is supposed > to write to the MSI address, the proper way to get the MSI address is by > using the DMA API, not by using virt_to_phys(). > > Using virt_to_phys() might work on some systems, but using the DMA API > should work on all systems. > > This is essentially the same thing as allocating a buffer in a driver > to which the endpoint will write to. To do this, we use the DMA API. > > Signed-off-by: Niklas Cassel I'm expecting Jingoo and/or Joao to chime in and ack the DesignWare-related patches. I think all the others are in pretty good shape. > --- > drivers/pci/dwc/pcie-designware-host.c | 15 ++++++++++++--- > drivers/pci/dwc/pcie-designware.h | 3 ++- > 2 files changed, 14 insertions(+), 4 deletions(-) > ...