linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Cc: rubini@gnudd.com, hch@infradead.org,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	helgaas@kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 2/2] x86/PCI: sta2x11: use default DMA address translation
Date: Wed, 30 Oct 2019 14:45:48 -0700	[thread overview]
Message-ID: <20191030214548.GC25515@infradead.org> (raw)
In-Reply-To: <20191018110044.22062-3-nsaenzjulienne@suse.de>

On Fri, Oct 18, 2019 at 01:00:44PM +0200, 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.

Looks sensible to me:

Reviewed-by: Christoph Hellwig <hch@lst.de>

But I can't tested it either, and kinda wonder if this code is actually
still used by anyone..

  reply	other threads:[~2019-10-30 21:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 11:00 [PATCH v2 0/2] x86: Get rid of custom DMA functions Nicolas Saenz Julienne
2019-10-18 11:00 ` [PATCH v2 1/2] dma-direct: check for overflows on 32 bit DMA addresses Nicolas Saenz Julienne
2019-10-30 21:41   ` Christoph Hellwig
2019-10-31 10:44     ` Nicolas Saenz Julienne
2019-10-18 11:00 ` [PATCH v2 2/2] x86/PCI: sta2x11: use default DMA address translation Nicolas Saenz Julienne
2019-10-30 21:45   ` Christoph Hellwig [this message]
2019-10-31 10:43     ` Nicolas Saenz Julienne
2019-10-31 13:59     ` Alessandro Rubini

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=20191030214548.GC25515@infradead.org \
    --to=hch@infradead.org \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=helgaas@kernel.org \
    --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).