1. 16 6月, 2012 1 次提交
    • G
      devicetree: add helper inline for retrieving a node's full name · efd68e72
      Grant Likely 提交于
      The pattern (np ? np->full_name : "<none>") is rather common in the
      kernel, but can also make for quite long lines.  This patch adds a new
      inline function, of_node_full_name() so that the test for a valid node
      pointer doesn't need to be open coded at all call sites.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      efd68e72
  2. 21 3月, 2012 2 次提交
  3. 24 2月, 2012 2 次提交
  4. 07 1月, 2012 3 次提交
  5. 07 12月, 2011 1 次提交
  6. 25 11月, 2011 2 次提交
    • B
      powerpc/pci: Change how re-assigning resouces work · 48c2ce97
      Benjamin Herrenschmidt 提交于
      When PCI_REASSIGN_ALL_RSRC is set, we used to clear all bus resources
      at the beginning of survey and re-allocate them later.
      
      This changes it so instead, during early fixup, we mark all resources
      as IORESOURCE_UNSET and move them down to be 0-based.
      
      Later, if bus resources are still unset at the beginning of the survey,
      then we clear them.
      
      This shouldn't impact the re-assignment case on 4xx, but will enable
      us to have the platform do some custom resource assignment before the
      survey, by clearing individual resources IORESOURCE_UNSET bit.
      
      Also limits the clutter in the kernel log from fixup when re-assigning
      since we don't care about the offset applied to the BAR values in this
      case.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      48c2ce97
    • B
      powerpc/pci: Add a platform hook after probe and before resource survey · 491b98c3
      Benjamin Herrenschmidt 提交于
      Some platforms need to perform resource allocation using a custom algorithm
      due to HW constraints, or may want to tweak things globally below a host
      bridge. For example OPAL support for IODA will need to perform a
      resource allocation pass that applies IODA specific segmentation
      constraints to MMIO which cannot be done simply using the kernel generic
      resource management code.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      491b98c3
  7. 24 11月, 2011 1 次提交
  8. 01 11月, 2011 1 次提交
  9. 26 9月, 2011 1 次提交
  10. 20 9月, 2011 1 次提交
  11. 12 7月, 2011 1 次提交
  12. 23 6月, 2011 1 次提交
  13. 10 6月, 2011 1 次提交
  14. 08 6月, 2011 1 次提交
    • B
      pci/of: Match PCI devices to OF nodes dynamically · 98d9f30c
      Benjamin Herrenschmidt 提交于
      powerpc has two different ways of matching PCI devices to their
      corresponding OF node (if any) for historical reasons. The ppc64 one
      does a scan looking for matching bus/dev/fn, while the ppc32 one does a
      scan looking only for matching dev/fn on each level in order to be
      agnostic to busses being renumbered (which Linux does on some
      platforms).
      
      This removes both and instead moves the matching code to the PCI core
      itself. It's the most logical place to do it: when a pci_dev is created,
      we know the parent and thus can do a single level scan for the matching
      device_node (if any).
      
      The benefit is that all archs now get the matching for free. There's one
      hook the arch might want to provide to match a PHB bus to its device
      node. A default weak implementation is provided that looks for the
      parent device device node, but it's not entirely reliable on powerpc for
      various reasons so powerpc provides its own.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NMichal Simek <monstr@monstr.eu>
      Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      98d9f30c
  15. 29 3月, 2011 1 次提交
  16. 05 2月, 2011 2 次提交
  17. 13 10月, 2010 1 次提交
  18. 01 8月, 2010 1 次提交
    • G
      of/address: Clean up function declarations · 22ae782f
      Grant Likely 提交于
      This patch moves the declaration of of_get_address(), of_get_pci_address(),
      and of_pci_address_to_resource() out of arch code and into the common
      linux/of_address header file.
      
      This patch also fixes some of the asm/prom.h ordering issues.  It still
      includes some header files that it ideally shouldn't be, but at least the
      ordering is consistent now so that of_* overrides work.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      22ae782f
  19. 12 6月, 2010 1 次提交
  20. 19 5月, 2010 1 次提交
    • G
      of: eliminate of_device->node and dev_archdata->{of,prom}_node · 58f9b0b0
      Grant Likely 提交于
      This patch eliminates the node pointer from struct of_device and the
      of_node (or prom_node) pointer from struct dev_archdata since the node
      pointer is now part of struct device proper when CONFIG_OF is set, and
      all users of the old pointer locations have already been converted over
      to use device->of_node.
      
      Also remove dev_archdata_{get,set}_node() as it is no longer used by
      anything.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      58f9b0b0
  21. 29 4月, 2010 1 次提交
    • G
      driver-core: Add device node pointer to struct device · d706c1b0
      Grant Likely 提交于
      Currently, platforms using CONFIG_OF add a 'struct device_node *of_node'
      to dev->archdata.  However, with CONFIG_OF becoming generic for all
      architectures, it makes sense for commonality to move it out of archdata
      and into struct device proper.
      
      This patch adds a struct device_node *of_node member to struct device
      and updates all locations which currently write the device_node pointer
      into archdata to also update dev->of_node.  Subsequent patches will
      modify callers to use the archdata location and ultimately remove
      the archdata member entirely.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      CC: Michal Simek <monstr@monstr.eu>
      CC: Greg Kroah-Hartman <gregkh@suse.de>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: Stephen Rothwell <sfr@canb.auug.org.au>
      CC: Jeremy Kerr <jeremy.kerr@canonical.com>
      CC: microblaze-uclinux@itee.uq.edu.au
      CC: linux-kernel@vger.kernel.org
      CC: linuxppc-dev@ozlabs.org
      CC: sparclinux@vger.kernel.org
      d706c1b0
  22. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  23. 13 3月, 2010 1 次提交
  24. 24 2月, 2010 1 次提交
  25. 23 2月, 2010 2 次提交
  26. 17 12月, 2009 1 次提交
    • B
      PCI/cardbus: Add a fixup hook and fix powerpc · 2d1c8618
      Benjamin Herrenschmidt 提交于
      The cardbus code creates PCI devices without ever going through the
      necessary fixup bits and pieces that normal PCI devices go through.
      
      There's in fact a commented out call to pcibios_fixup_bus() in there,
      it's commented because ... it doesn't work.
      
      I could make pcibios_fixup_bus() do the right thing on powerpc easily
      but I felt it cleaner instead to provide a specific hook pci_fixup_cardbus
      for which a weak empty implementation is provided by the PCI core.
      
      This fixes cardbus on powerbooks and probably all other PowerPC
      platforms which was broken completely for ever on some platforms and
      since 2.6.31 on others such as PowerBooks when we made the DMA ops
      mandatory (since those are setup by the fixups).
      Acked-by: NDominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      2d1c8618
  27. 14 10月, 2009 1 次提交
    • H
      powerpc/pci: Fix MODPOST warning · 0f6023d5
      Heiko Schocher 提交于
      making a powerpc target with PCI support, shows the
      following warning:
      
        MODPOST vmlinux.o
      WARNING: vmlinux.o(.text+0x10430): Section mismatch in reference from the
      function pcibios_allocate_bus_resources() to the function .init.text:reparent_resources()
      
      The function pcibios_allocate_bus_resources() references
      the function __init reparent_resources().
      
      This is often because pcibios_allocate_bus_resources lacks a __init
      annotation or the annotation of reparent_resources is wrong.
      
      This patch fix this warning by removing the __init
      annotation before reparent_resources.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      0f6023d5
  28. 24 9月, 2009 1 次提交
  29. 02 9月, 2009 1 次提交
  30. 28 8月, 2009 4 次提交