Skip to content

PCI: Fixup for 64bit resource with sparc

Yinghai Lu linux-devicetree linux-pci linuxppc-dev lkml sparclinux 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v14 Latest17 patches 0 repliesNew
  2. v1316 patches 6 repliesSuperseded
  3. v1215 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v3 RFC2 patches0 repliesSuperseded

Patches in v14 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17PCI: Fix proc mmap on sparcdrivers/pci/pci-sysfs.c+8 -30 replies
2/17PCI: Let pci_mmap_page_range() take resource addressarch/microblaze/pci/pci-common.c arch/powerpc/kernel/pci-common.c arch/sparc/kernel/pci.c +4 more+93 -400 replies
3/17PCI: Remove __pci_mmap_make_offset()arch/microblaze/pci/pci-common.c arch/powerpc/kernel/pci-common.c arch/sparc/kernel/pci.c +1 more+0 -3010 replies
4/17PCI: Check resource alignment for /sys pci_mmap_resource pathdrivers/pci/pci-sysfs.c+10 -00 replies
5/17sparc/PCI: Use correct offset for bus address to resourcearch/sparc/kernel/pci.c arch/sparc/kernel/pci_common.c arch/sparc/kernel/pci_impl.h+31 -110 replies
6/17PCI: Add pci_find_bus_resource()drivers/pci/pci.c include/linux/pci.h+18 -110 replies
7/17sparc/PCI: Reserve legacy mmio after PCI mmioarch/sparc/kernel/pci.c arch/sparc/kernel/pci_common.c arch/sparc/kernel/pci_impl.h+33 -280 replies
8/17sparc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsingarch/sparc/kernel/of_device_32.c arch/sparc/kernel/of_device_64.c+6 -40 replies
9/17sparc/PCI: Keep resource idx order with bridge register numberarch/sparc/kernel/pci.c+7 -10 replies
10/17powerpc/PCI: Keep resource idx order with bridge register numberarch/powerpc/kernel/pci_of_scan.c+7 -10 replies
11/17powerpc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsingarch/powerpc/kernel/pci_of_scan.c+3 -10 replies
12/17OF/PCI: Add IORESOURCE_MEM_64 for 64-bit resourcedrivers/of/address.c+3 -10 replies
13/17PCI: Check pref compatible bit for mem64 resource of PCIe devicearch/sparc/kernel/pci_common.c drivers/pci/pci.c drivers/pci/pci.h +4 more+66 -90 replies
14/17PCI: Only treat non-pref mmio64 as pref if all bridges have MEM_64drivers/pci/setup-bus.c+29 -20 replies
15/17PCI: Add has_mem64 for struct host_bridgedrivers/pci/probe.c include/linux/pci.h+8 -00 replies
16/17PCI: Only treat non-pref mmio64 as pref if host bridge has mmio64drivers/pci/setup-bus.c+1 -10 replies
17/17PCI: Restore pref MMIO allocation logic for host bridge without mmio64drivers/pci/bus.c drivers/pci/setup-bus.c drivers/pci/setup-res.c+18 -80 replies

Reviews trailers per patch

None of the 17 patches has a Reviewed-by or Acked-by.

PatchKhalid AzizDavid AhernTJ
1/17
2/17
3/17
4/17
5/17T-b
6/17
7/17T-b
8/17T-b
9/17T-b
10/17
11/17
12/17T-b
13/17T-b T-b T-b
14/17T-b
15/17T-b
16/17T-b
17/17T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v14 thread

Cover letter [PATCH v14 00/17] PCI: Fixup for 64bit resource with sparc

Hi Bjorn,

After 5b28541552ef (PCI: Restrict 64-bit prefetchable bridge windows to 64-bit resources), we have several reports on resource allocation failure, and we try to fix the problem with resource clip, and find more problems.

One is from sparc that have problem with clip as we don't parse mem64 for it.

This patchset try to fix the problem for sparc.

patch 1-5: try to fix the pci mmap for proc path for sparc, that will make fix for sparc 64bit resource offset handling much simple.

patch 6-12: parse MEM64 for sparc and other system with OF. So device 64bit resource could find their parent resource.

patch 13-16: MMIO64 handling enhancement
treat non-pref mmio64 if parent bridges are all pcie.

patch 17: restore old pref allocation logic if hostbridge does not support mmio64.

Khalid Aziz tested on some sparc platforms that have different offset to mem space start or support 64bit mmio.

-v14: update patchset on linus/master of 2016-09-16

Yinghai Lu (17):
PCI: Fix proc mmap on sparc
PCI: Let pci_mmap_page_range() take resource address
PCI: Remove __pci_mmap_make_offset()
PCI: Check resource alignment for /sys pci_mmap_resource path sparc/PCI: Use correct offset for bus address to resource
PCI: Add pci_find_bus_resource()
sparc/PCI: Reserve legacy mmio after PCI mmio
sparc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing sparc/PCI: Keep resource idx order with bridge register number powerpc/PCI: Keep resource idx order with bridge register number powerpc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing OF/PCI: Add IORESOURCE_MEM_64 for 64-bit resource
PCI: Check pref compatible bit for mem64 resource of PCIe device
PCI: Only treat non-pref mmio64 as pref if all bridges have MEM_64
PCI: Add has_mem64 for struct host_bridge
PCI: Only treat non-pref mmio64 as pref if host bridge has mmio64
PCI: Restore pref MMIO allocation logic for host bridge without mmio64

 arch/microblaze/pci/pci-common.c  |  74 ++-------------------
 arch/powerpc/kernel/pci-common.c  |  74 ++-------------------
 arch/powerpc/kernel/pci_of_scan.c |  12 +++-
 arch/sparc/kernel/of_device_32.c  |   5 +-
 arch/sparc/kernel/of_device_64.c  |   5 +-
 arch/sparc/kernel/pci.c           | 132 ++++----------------------------------
 arch/sparc/kernel/pci_common.c    |  91 +++++++++++++++-----------
 arch/sparc/kernel/pci_impl.h      |   5 ++
 arch/xtensa/kernel/pci.c          |  75 +++-------------------
 drivers/of/address.c              |   4 +-
 drivers/pci/bus.c                 |   4 +-
 drivers/pci/pci-sysfs.c           |  35 +++++++---
 drivers/pci/pci.c                 |  31 +++++----
 drivers/pci/pci.h                 |   4 +-
 drivers/pci/probe.c               |  40 ++++++++++++
 drivers/pci/proc.c                |  60 ++++++++++++++---
 drivers/pci/setup-bus.c           |  65 ++++++++++++++++---
 drivers/pci/setup-res.c           |  13 +++-
 include/linux/pci.h               |   4 ++
 19 files changed, 326 insertions(+), 407 deletions(-)
Signature · 1 line
2.8.3