12 Jan, 2012

1 commit

  • * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: (80 commits)
    x86/PCI: Expand the x86_msi_ops to have a restore MSIs.
    PCI: Increase resource array mask bit size in pcim_iomap_regions()
    PCI: DEVICE_COUNT_RESOURCE should be equal to PCI_NUM_RESOURCES
    PCI: pci_ids: add device ids for STA2X11 device (aka ConneXT)
    PNP: work around Dell 1536/1546 BIOS MMCONFIG bug that breaks USB
    x86/PCI: amd: factor out MMCONFIG discovery
    PCI: Enable ATS at the device state restore
    PCI: msi: fix imbalanced refcount of msi irq sysfs objects
    PCI: kconfig: English typo in pci/pcie/Kconfig
    PCI/PM/Runtime: make PCI traces quieter
    PCI: remove pci_create_bus()
    xtensa/PCI: convert to pci_scan_root_bus() for correct root bus resources
    x86/PCI: convert to pci_create_root_bus() and pci_scan_root_bus()
    x86/PCI: use pci_scan_bus() instead of pci_scan_bus_parented()
    x86/PCI: read Broadcom CNB20LE host bridge info before PCI scan
    sparc32, leon/PCI: convert to pci_scan_root_bus() for correct root bus resources
    sparc/PCI: convert to pci_create_root_bus()
    sh/PCI: convert to pci_scan_root_bus() for correct root bus resources
    powerpc/PCI: convert to pci_create_root_bus()
    powerpc/PCI: split PHB part out of pcibios_map_io_space()
    ...

    Fix up conflicts in drivers/pci/msi.c and include/linux/pci_regs.h due
    to the same patches being applied in other branches.

    Linus Torvalds
     

11 Jan, 2012

1 commit

  • lib: use generic pci_iomap on all architectures

    Many architectures don't want to pull in iomap.c,
    so they ended up duplicating pci_iomap from that file.
    That function isn't trivial, and we are going to modify it
    https://lkml.org/lkml/2011/11/14/183
    so the duplication hurts.

    This reduces the scope of the problem significantly,
    by moving pci_iomap to a separate file and
    referencing that from all architectures.

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    alpha: drop pci_iomap/pci_iounmap from pci-noop.c
    mn10300: switch to GENERIC_PCI_IOMAP
    mn10300: add missing __iomap markers
    frv: switch to GENERIC_PCI_IOMAP
    tile: switch to GENERIC_PCI_IOMAP
    tile: don't panic on iomap
    sparc: switch to GENERIC_PCI_IOMAP
    sh: switch to GENERIC_PCI_IOMAP
    powerpc: switch to GENERIC_PCI_IOMAP
    parisc: switch to GENERIC_PCI_IOMAP
    mips: switch to GENERIC_PCI_IOMAP
    microblaze: switch to GENERIC_PCI_IOMAP
    arm: switch to GENERIC_PCI_IOMAP
    alpha: switch to GENERIC_PCI_IOMAP
    lib: add GENERIC_PCI_IOMAP
    lib: move GENERIC_IOMAP to lib/Kconfig

    Fix up trivial conflicts due to changes nearby in arch/{m68k,score}/Kconfig

    Linus Torvalds
     

07 Jan, 2012

5 commits

  • Microblaze doesn't need to replace pci_scan_child_bus() or do anything
    special before pci_bus_add_devices(), so we can use the more generic PCI
    path in pci_scan_root_bus().

    CC: Michal Simek
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     
  • Convert from pci_create_bus() to pci_create_root_bus(). This way the root
    bus resources are correct immediately. This patch doesn't fix a problem
    because microblaze fixed the resources before scanning the bus, but it makes
    microblaze more consistent with other architectures. It also allows us to
    use the pci_scan_root_bus() path safely.

    CC: Michal Simek
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     
  • CC: Michal Simek
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     
  • The pci_bus_for_each_resource() iterator sets "res" itself, so there's
    no need to look it up in the bus->resource[] table.

    Logically part of 89a74ecccd and 8a66da71fa.

    CC: Michal Simek
    Signed-off-by: Bjorn Helgaas
    Signed-off-by: Jesse Barnes

    Bjorn Helgaas
     
  • This patch converts MicroBlaze's architecture-specific
    'pcibios_set_master()' routine to a non-inlined function. This will
    allow follow on patches to create a generic 'pcibios_set_master()'
    function using the '__weak' attribute which can be used by all
    architectures as a default which, if necessary, can then be over-
    ridden by architecture-specific code.

    Converting 'pci_bios_set_master()' to a non-inlined function will
    allow MicroBlaze's 'pcibios_set_master()' implementation to remain
    architecture-specific after the generic version is introduced and thus,
    not change current behavior.

    No functional change.

    Signed-off-by: Myron Stowe
    Signed-off-by: Jesse Barnes

    Myron Stowe
     

05 Jan, 2012

1 commit

  • NO_IRQ shouldn't be used by any driver. All Microblaze
    drivers are fixed that's why NO_IRQ can be removed.

    Also fix pci-common.c which has references to NO_IRQ removed.

    Signed-off-by: Michal Simek
    Reviewed-by: Ryan Mallon
    Acked-by: Grant Likely
    CC: Benjamin Herrenschmidt

    Michal Simek
     

29 Nov, 2011

1 commit

  • microblaze copied pci_iomap from generic code, probably to avoid
    pulling the rest of iomap.c in. Since that's in
    a separate file now, we can reuse the common implementation.

    The only difference is handling of nocache flag,
    that turns out to be done correctly by the
    generic code since arch/microblaze/include/asm/io.h
    defines ioremap_nocache same as ioremap.

    Signed-off-by: Michael S. Tsirkin

    Michael S. Tsirkin
     

01 Nov, 2011

1 commit


26 Jul, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    fs: Merge split strings
    treewide: fix potentially dangerous trailing ';' in #defined values/expressions
    uwb: Fix misspelling of neighbourhood in comment
    net, netfilter: Remove redundant goto in ebt_ulog_packet
    trivial: don't touch files that are removed in the staging tree
    lib/vsprintf: replace link to Draft by final RFC number
    doc: Kconfig: `to be' -> `be'
    doc: Kconfig: Typo: square -> squared
    doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
    drivers/net: static should be at beginning of declaration
    drivers/media: static should be at beginning of declaration
    drivers/i2c: static should be at beginning of declaration
    XTENSA: static should be at beginning of declaration
    SH: static should be at beginning of declaration
    MIPS: static should be at beginning of declaration
    ARM: static should be at beginning of declaration
    rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
    Update my e-mail address
    PCIe ASPM: forcedly -> forcibly
    gma500: push through device driver tree
    ...

    Fix up trivial conflicts:
    - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
    - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
    - drivers/net/r8169.c (just context changes)

    Linus Torvalds
     

10 Jun, 2011

1 commit


08 Jun, 2011

3 commits

  • There's no point in keeping this separate. Even if microblaze grows
    a 64-bit variant, it will probably be able to re-use that code as-is

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Michal Simek
    Acked-by: Grant Likely

    Benjamin Herrenschmidt
     
  • The whole business with re-assigning all bus numbers, creating
    an OF bus "map" etc... is ancient powermac stuff that you really
    don't care about on microblaze.

    Similarly pci_device_from_OF_node() is unused and by getting rid
    of it we can get rid of a whole lot of code otherwise unused on
    this architecture

    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Grant Likely
    Acked-by: Michal Simek

    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: Benjamin Herrenschmidt
    Acked-by: Michal Simek
    Acked-by: Jesse Barnes

    Benjamin Herrenschmidt
     

31 Mar, 2011

1 commit


29 Mar, 2011

1 commit


05 Feb, 2011

2 commits

  • Currently, ppc32 uses sysdata for the pci_controller pointer, and
    ppc64 uses it to hold the device_node pointer. This patch moves the
    of_node pointer into (struct pci_bus*)->dev.of_node and
    (struct pci_dev*)->dev.of_node so that sysdata can be converted to always
    use the pci_controller pointer instead. It also fixes up the
    allocating of pci devices so that the of_node pointer gets assigned
    consistently and increments the ref count.

    Signed-off-by: Grant Likely

    Grant Likely
     
  • There is a tiny difference between PPC32 and PPC64. Microblaze uses the
    PPC32 variant.

    Signed-off-by: Sebastian Andrzej Siewior
    [grant.likely@secretlab.ca: Added comment to #endif, moved documentation
    block to function implementation, fixed for non ppc and microblaze
    compiles]
    Signed-off-by: Grant Likely

    Sebastian Andrzej Siewior
     

21 Oct, 2010

2 commits


17 Aug, 2010

2 commits


12 Jun, 2010

1 commit

  • Yannick found that video does not work with 2.6.34. The cause of this
    bug was that the BIOS had assigned the wrong range to the PCI bridge
    above the video device. Before 2.6.34 the kernel would have shrunk
    the size of the bridge window, but since
    d65245c PCI: don't shrink bridge resources
    the kernel will avoid shrinking BIOS ranges.

    So zero out the old range if we fail to claim it at boot time; this will
    cause us to allocate a new range at startup, restoring the 2.6.34
    behavior.

    Fixes regression https://bugzilla.kernel.org/show_bug.cgi?id=16009.

    Reported-by: Yannick
    Acked-by: Bjorn Helgaas
    Signed-off-by: Yinghai Lu
    Signed-off-by: Jesse Barnes

    Yinghai Lu
     

13 May, 2010

1 commit


06 May, 2010

2 commits

  • This change should be part of b26b2d494b659f988b4d75eb394dfa0ddac415c9

    Origin description:

    resource/PCI: align functions now return start of resource

    As suggested by Linus, align functions should return the start
    of a resource, not void. An update of "res->start" is no longer
    necessary.

    Signed-off-by: Michal Simek

    Michal Simek
     
  • This change should be part of 89a74ecccd1f78e51faf6287e5c0e93a92ac096e

    Origin description:

    PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs

    No functional change; this converts loops that iterate from 0 to
    PCI_BUS_NUM_RESOURCES through pci_bus resource[] table to use the
    pci_bus_for_each_resource() iterator instead.

    This doesn't change the way resources are stored; it merely removes
    dependencies on the fact that they're in a table.

    Signed-off-by: Michal Simek

    Michal Simek
     

30 Mar, 2010

1 commit

  • …it 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: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

11 Mar, 2010

4 commits