1. 30 10月, 2015 1 次提交
    • Y
      sparc/PCI: Add mem64 resource parsing for root bus · af86fa40
      Yinghai Lu 提交于
      David reported that a T5-8 sparc system failed to boot with:
      
        pci_sun4v f02dbcfc: PCI host bridge to bus 0000:00
        pci_bus 0000:00: root bus resource [io  0x804000000000-0x80400fffffff] (bus address [0x0000-0xfffffff])
        pci_bus 0000:00: root bus resource [mem 0x800000000000-0x80007effffff] (bus address [0x00000000-0x7effffff])
        pci 0000:00:01.0: can't claim BAR 15 [mem 0x100000000-0x4afffffff pref]: no compatible bridge window
      
      Note that we don't know about a host bridge aperture that contains
      BAR 15.  OF does report a MEM64 aperture, but before this patch,
      pci_determine_mem_io_space() ignored it.
      
      Add support for host bridge apertures with 64-bit PCI addresses.  Also
      set IORESOURCE_MEM_64 for PCI device and bridge resources in PCI 64-bit
      memory space.
      
      Sparc doesn't actually print the device and bridge resources, but after
      this patch, we should have the equivalent of this:
      
        pci_sun4v f02dbcfc: PCI host bridge to bus 0000:00
        pci_bus 0000:00: root bus resource [io  0x804000000000-0x80400fffffff] (bus address [0x0000-0xfffffff])
        pci_bus 0000:00: root bus resource [mem 0x800000000000-0x80007effffff] (bus address [0x00000000-0x7effffff])
        pci_bus 0000:00: root bus resource [mem 0x800100000000-0x8007ffffffff] (bus address [0x100000000-0x7ffffffff])
        pci 0000:00:01.0:   bridge window [mem 0x800100000000-0x8004afffffff 64bit pref]
      
      [bhelgaas: changelog, URL to David's report]
      Fixes: d63e2e1f ("sparc/PCI: Clip bridge windows to fit in upstream windows")
      Link: http://lkml.kernel.org/r/5514391F.2030300@oracle.comReported-by: NDavid Ahern <david.ahern@oracle.com>
      Tested-by: NDavid Ahern <david.ahern@oracle.com>
      Tested-by: NKhalid Aziz <khalid.aziz@oracle.com>
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      af86fa40
  2. 11 8月, 2015 1 次提交
    • D
      cleanup IORESOURCE_CACHEABLE vs ioremap() · 92b19ff5
      Dan Williams 提交于
      Quoting Arnd:
          I was thinking the opposite approach and basically removing all uses
          of IORESOURCE_CACHEABLE from the kernel. There are only a handful of
          them.and we can probably replace them all with hardcoded
          ioremap_cached() calls in the cases they are actually useful.
      
      All existing usages of IORESOURCE_CACHEABLE call ioremap() instead of
      ioremap_nocache() if the resource is cacheable, however ioremap() is
      uncached by default. Clearly none of the existing usages care about the
      cacheability. Particularly devm_ioremap_resource() never worked as
      advertised since it always fell back to plain ioremap().
      
      Clean this up as the new direction we want is to convert
      ioremap_<type>() usages to memremap(..., flags).
      Suggested-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      92b19ff5
  3. 31 7月, 2015 1 次提交
  4. 23 7月, 2015 1 次提交
  5. 01 6月, 2015 1 次提交
  6. 08 4月, 2015 1 次提交
  7. 19 3月, 2015 1 次提交
  8. 17 1月, 2015 1 次提交
  9. 14 8月, 2014 3 次提交
  10. 28 5月, 2014 1 次提交
  11. 19 5月, 2014 1 次提交
  12. 29 1月, 2014 1 次提交
    • P
      sparc: don't use module_init in non-modular pci.c code · 1b925b57
      Paul Gortmaker 提交于
      The pci.o is built for SPARC64_PCI -- which is bool, and hence
      this code is either present or absent.  It will never be modular,
      so using module_init as an alias for __initcall can be somewhat
      misleading.
      
      Fix this up now, so that we can relocate module_init from
      init.h into module.h in the future.  If we don't do this, we'd
      have to add module.h to obviously non-modular code, and that
      would be a worse thing.
      
      Note that direct use of __initcall is discouraged, vs. one
      of the priority categorized subgroups.  As __initcall gets
      mapped onto device_initcall, our use of device_initcall
      directly in this change means that the runtime impact is
      zero -- it will remain at level 6 in initcall ordering.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b925b57
  13. 22 12月, 2013 1 次提交
    • Y
      PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev · fc279850
      Yinghai Lu 提交于
      These interfaces:
      
        pcibios_resource_to_bus(struct pci_dev *dev, *bus_region, *resource)
        pcibios_bus_to_resource(struct pci_dev *dev, *resource, *bus_region)
      
      took a pci_dev, but they really depend only on the pci_bus.  And we want to
      use them in resource allocation paths where we have the bus but not a
      device, so this patch converts them to take the pci_bus instead of the
      pci_dev:
      
        pcibios_resource_to_bus(struct pci_bus *bus, *bus_region, *resource)
        pcibios_bus_to_resource(struct pci_bus *bus, *resource, *bus_region)
      
      In fact, with standard PCI-PCI bridges, they only depend on the host
      bridge, because that's the only place address translation occurs, but
      we aren't going that far yet.
      
      [bhelgaas: changelog]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      fc279850
  14. 15 11月, 2013 1 次提交
  15. 29 6月, 2013 1 次提交
  16. 06 6月, 2013 1 次提交
    • G
      PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) · 8b1fce04
      Gu Zheng 提交于
      Use the new pci_alloc_dev(bus) to replace the existing using of
      alloc_pci_dev(void).
      
      [bhelgaas: drop pci_bus ref later in pci_release_dev()]
      Signed-off-by: NGu Zheng <guz.fnst@cn.fujitsu.com>
      Signed-off-by: NJiang Liu <jiang.liu@huawei.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Neela Syam Kolli <megaraidlinux@lsi.com>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      8b1fce04
  17. 21 5月, 2013 1 次提交
  18. 13 1月, 2013 1 次提交
  19. 04 1月, 2013 1 次提交
    • G
      SPARC: drivers: remove __dev* attributes. · 7c9503b8
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7c9503b8
  20. 09 10月, 2012 1 次提交
    • K
      mm: kill vma flag VM_RESERVED and mm->reserved_vm counter · 314e51b9
      Konstantin Khlebnikov 提交于
      A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
      currently it lost original meaning but still has some effects:
      
       | effect                 | alternative flags
      -+------------------------+---------------------------------------------
      1| account as reserved_vm | VM_IO
      2| skip in core dump      | VM_IO, VM_DONTDUMP
      3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
      4| do not mlock           | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
      
      This patch removes reserved_vm counter from mm_struct.  Seems like nobody
      cares about it, it does not exported into userspace directly, it only
      reduces total_vm showed in proc.
      
      Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.
      
      remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
      remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.
      
      [akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]
      Signed-off-by: NKonstantin Khlebnikov <khlebnikov@openvz.org>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Carsten Otte <cotte@de.ibm.com>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Cyrill Gorcunov <gorcunov@openvz.org>
      Cc: Eric Paris <eparis@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Morris <james.l.morris@oracle.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
      Cc: Matt Helsley <matthltc@us.ibm.com>
      Cc: Nick Piggin <npiggin@kernel.dk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: Venkatesh Pallipadi <venki@google.com>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      314e51b9
  21. 19 9月, 2012 1 次提交
  22. 10 7月, 2012 1 次提交
  23. 06 7月, 2012 1 次提交
  24. 14 6月, 2012 2 次提交
  25. 21 3月, 2012 1 次提交
    • B
      sparc/PCI: convert devtree and arch-probed bus addresses to resource · a031589b
      Bjorn Helgaas 提交于
      Normal PCI enumeration via PCI config space uses __pci_read_base(), where
      the PCI core applies any bus-to-resource offset.  But sparc sometimes
      reads PCI config space itself, and sometimes it gets addresses from the
      device tree.
      
      In ac1edcc5, I converted sparc to use the PCI core bus-to-resource
      conversion, but I missed these sparc-specific paths.  I don't have a way
      to test it, but I think sparc is broken between that commit and this one.
      
      This patch replaces the sparc-specific pci_resource_adjust() with the
      generic pcibios_bus_to_resource() in the following paths:
      
          pci_cfg_fake_ranges()       (addresses read from PCI config)
          apb_fake_ranges()           (addresses computed based on PCI config)
          of_scan_pci_bridge()        (addresses from OF "ranges" property)
      
      N.B.: Resources of non-P2P bridge devices are set in pci_parse_of_addrs()
      and, as far as I can see, never converted to CPU addresses.  I do not
      understand why these would be treated differently than bridge windows.
      
      CC: "David S. Miller" <davem@davemloft.net>
      CC: sparclinux@vger.kernel.org
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      a031589b
  26. 24 2月, 2012 1 次提交
    • B
      sparc/PCI: get rid of device resource fixups · ac1edcc5
      Bjorn Helgaas 提交于
      Tell the PCI core about host bridge address translation so it can take
      care of bus-to-resource conversion for us.
      
      N.B. Leon apparently never uses initial BAR values, so it didn't matter
      that we never fixed up the I/O resources from bus address to CPU addresses.
      
      Other sparc uses pci_of_scan_bus(), which sets device resources directly
      to CPU addresses, not bus addresses, so it didn't need pcibios_fixup_bus()
      either.  But by telling the core about the offsets, we can nuke
      pcibios_resource_to_bus().
      
      CC: "David S. Miller" <davem@davemloft.net>
      CC: sparclinux@vger.kernel.org
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      ac1edcc5
  27. 07 1月, 2012 2 次提交
  28. 01 11月, 2011 1 次提交
  29. 20 10月, 2011 1 次提交
  30. 10 6月, 2011 1 次提交
  31. 08 6月, 2011 2 次提交
  32. 29 3月, 2011 1 次提交
  33. 17 3月, 2011 2 次提交
  34. 24 7月, 2010 1 次提交