linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-pci@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 00/27] PCI resource mmap cleanup
Date: Tue, 18 Apr 2017 13:28:16 -0500	[thread overview]
Message-ID: <20170418182816.GB25295@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <cover.1491999859.git.dwmw2@infradead.org>

On Wed, Apr 12, 2017 at 01:25:49PM +0100, David Woodhouse wrote:
> This pursues my previous patch set all the way to its logical conclusion.
> 
> It kills off the legacy arch-provided pci_mmap_page_range() completely,
> along with its vile 'address converted by pci_resource_to_user()' API
> and the various bugs and other strange behaviour that various
> architectures had.
> 
> In some cases like IA64 I've killed off the odd behaviour *first* in
> separately reviewable patches, before the final switch over to the
> generic code which should then basically have no functional effect.
> 
> To accommodate the ARM64 maintainers' desire *not* to support mmap
> through /proc/bus/pci I have separated HAVE_PCI_MMAP from the sysfs
> implementation, which (as of the last patch in the series) ends up
> present on *all* platforms with an MMU. I still don't think that's a
> *good* idea though; it's a generic part of /proc, and nobody ever did
> answer my question about what *else* we can delete from /proc on ARM64
> "because it's a new platform"...
> 
> I would very much like the interesting parts of this to go through the
> arch maintainers' trees. I'd suggest that we can pull everything up to
> and including patch 19 ("pci: Add I/O BAR support to generic
> pci_mmap_resource_range()") through the PCI tree, which includes the
> relatively trivial architectures. Then the others can go through the
> appropriate arch tree with more careful review and testing.
> 
> Once everything's done, then we can apply something like the final
> patch ("pci: Kill ARCH_GENERIC_PCI_MMAP_RESOURCE"). But that's mostly
> just there for now as a demonstration of the intended end point.
> 
> This is in
>  git://git.infradead.org/users/dwmw2/random-2.6.git pcimmap
>  http://git.infradead.org/users/dwmw2/random-2.6.git/shortlog/refs/heads/pcimmap

Applied to pci/resource-mmap for v4.12, thanks!

This consists of the email patches + the acks/etc so far.  It doesn't
include any updates from your git branch (but it doesn't look like it's
been updated recently).

> David Woodhouse (27):
>   pci: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
>   pci: Fix another sanity check bug in /proc/pci mmap
>   pci: Only allow WC mmap on prefetchable resources
>   xtensa: Do not mmap PCI BARs to userspace as write-through
>   pci: Add arch_can_pci_mmap_wc() macro
>   pci: Move multiple declarations of pci_mmap_page_range() to
>     <linux/pci.h>
>   pci: Add arch_can_pci_mmap_io() on architectures which can mmap() I/O
>     space
>   pci: Use BAR index in sysfs attr->private instead of resource pointer
>   pci: Add BAR index argument to pci_mmap_page_range()
>   pci: Add pci_mmap_resource_range() and use it for ARM64
>   arm: Use generic pci_mmap_resource_range()
>   cris: Use generic pci_mmap_resource_range()
>   mips: Use generic pci_mmap_resource_range()
>   mn10300: Use generic pci_mmap_resource_range()
>   parisc: Use generic pci_mmap_resource_range()
>   sh: Use generic pci_mmap_resource_range()
>   unicore: Use generic pci_mmap_resource_range()
>   x86: Use generic pci_mmap_resource_range()
>   pci: Add I/O BAR support to generic pci_mmap_resource_range()
>   powerpc: Use generic pci_mmap_resource_range()
>   microblaze: Use generic pci_mmap_resource_range()
>   xtensa: Use generic pci_mmap_resource_range()
>   ia64: Remove redundant valid_mmap_phys_addr_range() from
>     pci_mmap_page_range()
>   ia64: Remove redundant checks for WC in pci_mmap_page_range()
>   ia64: Use generic pci_mmap_resource_range()
>   sparc: Use generic pci_mmap_resource_range()
>   pci: Kill ARCH_GENERIC_PCI_MMAP_RESOURCE
> 
>  Documentation/filesystems/sysfs-pci.txt |  12 ++-
>  arch/arm/include/asm/pci.h              |   2 -
>  arch/arm/kernel/bios32.c                |  19 ----
>  arch/cris/arch-v32/drivers/pci/bios.c   |  22 -----
>  arch/cris/include/asm/pci.h             |   3 -
>  arch/ia64/include/asm/pci.h             |   4 +-
>  arch/ia64/pci/pci.c                     |  46 ----------
>  arch/microblaze/include/asm/pci.h       |   8 +-
>  arch/microblaze/pci/pci-common.c        |  99 ++------------------
>  arch/mips/include/asm/pci.h             |   4 -
>  arch/mips/pci/pci.c                     |  24 -----
>  arch/mn10300/include/asm/pci.h          |   3 -
>  arch/mn10300/unit-asb2305/pci-asb2305.c |  23 -----
>  arch/parisc/include/asm/pci.h           |   3 -
>  arch/parisc/kernel/pci.c                |  28 ------
>  arch/powerpc/include/asm/pci.h          |   9 +-
>  arch/powerpc/kernel/pci-common.c        | 105 +++-------------------
>  arch/sh/drivers/pci/pci.c               |  21 -----
>  arch/sh/include/asm/pci.h               |   3 +-
>  arch/sparc/include/asm/pci_64.h         |   5 +-
>  arch/sparc/kernel/pci.c                 | 155 --------------------------------
>  arch/unicore32/include/asm/pci.h        |   2 -
>  arch/unicore32/kernel/pci.c             |  23 -----
>  arch/x86/include/asm/pci.h              |   6 +-
>  arch/x86/pci/i386.c                     |  47 ----------
>  arch/xtensa/include/asm/pci.h           |   9 +-
>  arch/xtensa/kernel/pci.c                | 112 ++---------------------
>  drivers/pci/Makefile                    |   1 +
>  drivers/pci/mmap.c                      |  67 ++++++++++++++
>  drivers/pci/pci-sysfs.c                 |  76 +++++++---------
>  drivers/pci/pci.h                       |   4 +-
>  drivers/pci/proc.c                      |  41 ++++++---
>  include/linux/pci.h                     |  30 +++++++
>  33 files changed, 211 insertions(+), 805 deletions(-)
>  create mode 100644 drivers/pci/mmap.c
> 
> -- 
> 2.9.3
> 

  parent reply	other threads:[~2017-04-18 18:28 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-12 12:25 [PATCH v2 00/27] PCI resource mmap cleanup David Woodhouse
2017-04-12 12:25 ` [PATCH v2 01/27] pci: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms David Woodhouse
2017-04-12 12:25 ` [PATCH v2 02/27] pci: Fix another sanity check bug in /proc/pci mmap David Woodhouse
2017-04-12 12:25 ` [PATCH v2 03/27] pci: Only allow WC mmap on prefetchable resources David Woodhouse
2017-04-12 12:25 ` [PATCH v2 04/27] xtensa: Do not mmap PCI BARs to userspace as write-through David Woodhouse
2017-04-12 12:25 ` [PATCH v2 05/27] pci: Add arch_can_pci_mmap_wc() macro David Woodhouse
2017-04-12 12:25 ` [PATCH v2 06/27] pci: Move multiple declarations of pci_mmap_page_range() to <linux/pci.h> David Woodhouse
2017-04-12 12:25 ` [PATCH v2 07/27] pci: Add arch_can_pci_mmap_io() on architectures which can mmap() I/O space David Woodhouse
2017-04-12 12:25 ` [PATCH v2 08/27] pci: Use BAR index in sysfs attr->private instead of resource pointer David Woodhouse
2017-04-12 12:25 ` [PATCH v2 09/27] pci: Add BAR index argument to pci_mmap_page_range() David Woodhouse
2017-04-12 12:25 ` [PATCH v2 10/27] pci: Add pci_mmap_resource_range() and use it for ARM64 David Woodhouse
2017-04-12 12:26 ` [PATCH v2 11/27] arm: Use generic pci_mmap_resource_range() David Woodhouse
2017-04-12 12:26 ` [PATCH v2 12/27] cris: " David Woodhouse
2017-04-13  7:37   ` Jesper Nilsson
2017-04-13  8:39     ` David Woodhouse
2017-04-12 12:26 ` [PATCH v2 13/27] mips: " David Woodhouse
2017-04-12 12:26 ` [PATCH v2 14/27] mn10300: " David Woodhouse
2017-04-12 12:26 ` [PATCH v2 15/27] parisc: " David Woodhouse
2017-04-12 12:26 ` [PATCH v2 16/27] sh: " David Woodhouse
2017-04-12 12:26 ` [PATCH v2 17/27] unicore: " David Woodhouse
2017-04-12 12:26 ` [PATCH v2 18/27] x86: " David Woodhouse
2017-04-12 12:26 ` [PATCH v2 19/27] pci: Add I/O BAR support to " David Woodhouse
2017-04-12 12:26 ` [PATCH v2 20/27] powerpc: Use " David Woodhouse
2017-04-12 12:26 ` [PATCH v2 21/27] microblaze: " David Woodhouse
2017-04-12 12:26 ` [PATCH v2 22/27] xtensa: " David Woodhouse
2017-04-12 12:26 ` [PATCH v2 23/27] ia64: Remove redundant valid_mmap_phys_addr_range() from pci_mmap_page_range() David Woodhouse
2017-04-12 12:26 ` [PATCH v2 24/27] ia64: Remove redundant checks for WC in pci_mmap_page_range() David Woodhouse
2017-04-12 12:26 ` [PATCH v2 25/27] ia64: Use generic pci_mmap_resource_range() David Woodhouse
2017-04-12 21:47   ` Tony Luck
2017-04-12 21:53     ` Thomas Gleixner
2017-04-13  8:39     ` David Woodhouse
2017-04-12 12:26 ` [PATCH v2 26/27] sparc: " David Woodhouse
2017-04-12 12:26 ` [PATCH v2 27/27] pci: Kill ARCH_GENERIC_PCI_MMAP_RESOURCE David Woodhouse
2017-04-13  9:22 ` [PATCH v2 14/27] mn10300: Use generic pci_mmap_resource_range() David Howells
2017-04-13  9:22 ` [PATCH v2 10/27] pci: Add pci_mmap_resource_range() and use it for ARM64 David Howells
2017-04-18 18:28 ` Bjorn Helgaas [this message]
2017-04-18 18:51   ` [PATCH v2 00/27] PCI resource mmap cleanup Bjorn Helgaas
2017-04-19  7:23   ` David Woodhouse
2017-04-19 18:37     ` Bjorn Helgaas

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=20170418182816.GB25295@bhelgaas-glaptop.roam.corp.google.com \
    --to=helgaas@kernel.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.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).