From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752104AbdKUMSY (ORCPT ); Tue, 21 Nov 2017 07:18:24 -0500 Received: from bastet.se.axis.com ([195.60.68.11]:56360 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751317AbdKUMSW (ORCPT ); Tue, 21 Nov 2017 07:18:22 -0500 Subject: Re: [PATCH v4 01/17] PCI: dwc: Use the DMA-API to get the MSI address To: Joao Pinto , Bjorn Helgaas CC: Jingoo Han , Bjorn Helgaas , , References: <20171103134722.5532-1-niklas.cassel@axis.com> <20171103134722.5532-2-niklas.cassel@axis.com> <20171108005614.GF22847@bhelgaas-glaptop.roam.corp.google.com> <1c059ad0-aa57-fca4-6d92-e68736ffad5f@synopsys.com> From: Niklas Cassel Message-ID: <233b3102-0ca3-ca28-5b43-34e55a5c87c4@axis.com> Date: Tue, 21 Nov 2017 13:18:18 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1c059ad0-aa57-fca4-6d92-e68736ffad5f@synopsys.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.0.5.60] X-ClientProxiedBy: XBOX02.axis.com (10.0.5.16) To XBOX02.axis.com (10.0.5.16) X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/11/17 13:45, Joao Pinto wrote: > Hello to all, > > Às 12:56 AM de 11/8/2017, Bjorn Helgaas escreveu: >> 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(-) >>> ... > > Let me test this patch-set in my setup first! > I will give feedback until Friday. > Hello Joao, did you manage to find any time to test the designware related patches? If not, I posted a V5 yesterday, so in case you are still planning on testing them, could you please test V5 instead? Best regards, Niklas