linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	Christoph Hellwig <hch@lst.de>
Cc: rubini@gnudd.com, hch@infradead.org,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH v3 2/2] x86/PCI: sta2x11: use default DMA address translation
Date: Wed, 13 Nov 2019 19:54:20 +0100	[thread overview]
Message-ID: <20191113185420.GC1647@zn.tnic> (raw)
In-Reply-To: <20191107150646.13485-3-nsaenzjulienne@suse.de>

On Thu, Nov 07, 2019 at 04:06:45PM +0100, Nicolas Saenz Julienne wrote:
> The devices found behind this PCIe chip have unusual DMA mapping
> constraints as there is an AMBA interconnect placed in between them and
> the different PCI endpoints. The offset between physical memory
> addresses and AMBA's view is provided by reading a PCI config register,
> which is saved and used whenever DMA mapping is needed.
> 
> It turns out that this DMA setup can be represented by properly setting
> 'dma_pfn_offset', 'dma_bus_mask' and 'dma_mask' during the PCI device
> enable fixup. And ultimately allows us to get rid of this device's
> custom DMA functions.
> 
> Aside from the code deletion and DMA setup, sta2x11_pdev_to_mapping() is
> moved to avoid warnings whenever CONFIG_PM is not enabled.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> ---
> 
> Changed since v1:
>   - use variable to avoid recalculating AMBA's max address
>   - remove x86's dma-direct.h as it's not longer needed
> 
>  arch/x86/Kconfig                  |   1 -
>  arch/x86/include/asm/device.h     |   3 -
>  arch/x86/include/asm/dma-direct.h |   9 --
>  arch/x86/pci/sta2x11-fixup.c      | 135 ++++++------------------------
>  4 files changed, 26 insertions(+), 122 deletions(-)
>  delete mode 100644 arch/x86/include/asm/dma-direct.h

Ok, I have only 2/2 in my mbox so in the future, when sending a whole
set, make sure you Cc everybody on all the patches so that people can
see the whole thing.

Then, I went and read back all the discussion about this cleanup and
how it is hard to test it because it is not in PCs but in automotive
installations...

Long story, short, I like patches with negative diffstats :) so I could
take it through tip unless Christoph has different plans for this.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2019-11-13 18:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 15:06 [PATCH v3 0/2] x86: Get rid of custom DMA functions Nicolas Saenz Julienne
2019-11-07 15:06 ` [PATCH v3 2/2] x86/PCI: sta2x11: use default DMA address translation Nicolas Saenz Julienne
2019-11-13 18:54   ` Borislav Petkov [this message]
2019-11-14  7:29     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191113185420.GC1647@zn.tnic \
    --to=bp@alien8.de \
    --cc=bhelgaas@google.com \
    --cc=hch@infradead.org \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=rubini@gnudd.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).