Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Mar 2012 21:02:12 +0000 (14:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Mar 2012 21:02:12 +0000 (14:02 -0700)
Pull PCI changes (including maintainer change) from Jesse Barnes:
 "This pull has some good cleanups from Bjorn and Yinghai, as well as
  some more code from Yinghai to better handle resource re-allocation
  when enabled.

  There's also a new initcall_debug feature from Arjan which will print
  out quirk timing information to help identify slow quirks for fixing
  or refinement (Yinghai sent in a few patches to do just that once the
  new debug code landed).

  Beyond that, I'm handing off PCI maintainership to Bjorn Helgaas.
  He's been a core PCI and Linux contributor for some time now, and has
  kindly volunteered to take over.  I just don't feel I have the time
  for PCI review and work that it deserves lately (I've taken on some
  other projects), and haven't been as responsive lately as I'd like, so
  I approached Bjorn asking if he'd like to manage things.  He's going
  to give it a try, and I'm confident he'll do at least as well as I
  have in keeping the tree managed, patches flowing, and keeping things
  stable."

Fix up some fairly trivial conflicts due to other cleanups (mips device
resource fixup cleanups clashing with list handling cleanup, ppc iseries
removal clashing with pci_probe_only cleanup etc)

* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci: (112 commits)
  PCI: Bjorn gets PCI hotplug too
  PCI: hand PCI maintenance over to Bjorn Helgaas
  unicore32/PCI: move <asm-generic/pci-bridge.h> include to asm/pci.h
  sparc/PCI: convert devtree and arch-probed bus addresses to resource
  powerpc/PCI: allow reallocation on PA Semi
  powerpc/PCI: convert devtree bus addresses to resource
  powerpc/PCI: compute I/O space bus-to-resource offset consistently
  arm/PCI: don't export pci_flags
  PCI: fix bridge I/O window bus-to-resource conversion
  x86/PCI: add spinlock held check to 'pcibios_fwaddrmap_lookup()'
  PCI / PCIe: Introduce command line option to disable ARI
  PCI: make acpihp use __pci_remove_bus_device instead
  PCI: export __pci_remove_bus_device
  PCI: Rename pci_remove_behind_bridge to pci_stop_and_remove_behind_bridge
  PCI: Rename pci_remove_bus_device to pci_stop_and_remove_bus_device
  PCI: print out PCI device info along with duration
  PCI: Move "pci reassigndev resource alignment" out of quirks.c
  PCI: Use class for quirk for usb host controller fixup
  PCI: Use class for quirk for ti816x class fixup
  PCI: Use class for quirk for intel e100 interrupt fixup
  ...

19 files changed:
1  2 
Documentation/kernel-parameters.txt
MAINTAINERS
arch/arm/common/it8152.c
arch/powerpc/include/asm/ppc-pci.h
arch/powerpc/kernel/pci-common.c
arch/powerpc/kernel/rtas_pci.c
arch/powerpc/platforms/powernv/pci.c
arch/powerpc/platforms/pseries/pci_dlpar.c
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/platforms/wsp/wsp_pci.c
arch/sh/drivers/pci/pci.c
arch/x86/pci/acpi.c
drivers/pci/pci-driver.c
drivers/pci/pcie/aspm.c
drivers/pci/quirks.c
drivers/pci/xen-pcifront.c
drivers/scsi/mpt2sas/mpt2sas_base.c
drivers/usb/host/pci-quirks.c
include/linux/pci.h

@@@ -713,21 -713,6 +713,21 @@@ bytes respectively. Such letter suffixe
                        The filter can be disabled or changed to another
                        driver later using sysfs.
  
 +      drm_kms_helper.edid_firmware=[<connector>:]<file>
 +                      Broken monitors, graphic adapters and KVMs may
 +                      send no or incorrect EDID data sets. This parameter
 +                      allows to specify an EDID data set in the
 +                      /lib/firmware directory that is used instead.
 +                      Generic built-in EDID data sets are used, if one of
 +                      edid/1024x768.bin, edid/1280x1024.bin,
 +                      edid/1680x1050.bin, or edid/1920x1080.bin is given
 +                      and no file with the same name exists. Details and
 +                      instructions how to build your own EDID data are
 +                      available in Documentation/EDID/HOWTO.txt. An EDID
 +                      data set will only be used for a particular connector,
 +                      if its name and a colon are prepended to the EDID
 +                      name.
 +
        dscc4.setup=    [NET]
  
        earlycon=       [KNL] Output early console device and options.
                             controller
        i8042.nopnp     [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
                             controllers
 -      i8042.notimeout [HW] Ignore timeout condition signalled by conroller
 +      i8042.notimeout [HW] Ignore timeout condition signalled by controller
        i8042.reset     [HW] Reset the controller during init and cleanup
        i8042.unlock    [HW] Unlock (ignore) the keylock
  
                        of returning the full 64-bit number.
                        The default is to return 64-bit inode numbers.
  
 +      nfs.max_session_slots=
 +                      [NFSv4.1] Sets the maximum number of session slots
 +                      the client will attempt to negotiate with the server.
 +                      This limits the number of simultaneous RPC requests
 +                      that the client can send to the NFSv4.1 server.
 +                      Note that there is little point in setting this
 +                      value higher than the max_tcp_slot_table_limit.
 +
        nfs.nfs4_disable_idmapping=
                        [NFSv4] When set to the default of '1', this option
                        ensures that both the RPC level authentication
                        back to using the idmapper.
                        To turn off this behaviour, set the value to '0'.
  
 +      nfs.send_implementation_id =
 +                      [NFSv4.1] Send client implementation identification
 +                      information in exchange_id requests.
 +                      If zero, no implementation identification information
 +                      will be sent.
 +                      The default is to send the implementation identification
 +                      information.
 +
 +
 +      objlayoutdriver.osd_login_prog=
 +                      [NFS] [OBJLAYOUT] sets the pathname to the program which
 +                      is used to automatically discover and login into new
 +                      osd-targets. Please see:
 +                      Documentation/filesystems/pnfs.txt for more explanations
 +
        nmi_debug=      [KNL,AVR32,SH] Specify one or more actions to take
                        when a NMI is triggered.
                        Format: [state][,regs][,debounce][,die]
                                the default.
                                off: Turn ECRC off
                                on: Turn ECRC on.
-               realloc         reallocate PCI resources if allocations done by BIOS
-                               are erroneous.
+               realloc=        Enable/disable reallocating PCI bridge resources
+                               if allocations done by BIOS are too small to
+                               accommodate resources required by all child
+                               devices.
+                               off: Turn realloc off
+                               on: Turn realloc on
+               realloc         same as realloc=on
+               noari           do not use PCIe ARI.
  
        pcie_aspm=      [PCIE] Forcibly enable or disable PCIe Active State Power
                        Management.
                force   Enable ASPM even on devices that claim not to support it.
                        WARNING: Forcing ASPM on may cause system lockups.
  
+       pcie_hp=        [PCIE] PCI Express Hotplug driver options:
+               nomsi   Do not use MSI for PCI Express Native Hotplug (this
+                       makes all PCIe ports use INTx for hotplug services).
        pcie_ports=     [PCIE] PCIe ports handling:
                auto    Ask the BIOS whether or not to use native PCIe services
                        associated with PCIe ports (PME, hot-plug, AER).  Use
  
                        default: off.
  
 +      printk.always_kmsg_dump=
 +                      Trigger kmsg_dump for cases other than kernel oops or
 +                      panics
 +                      Format: <bool>  (1/Y/y=enable, 0/N/n=disable)
 +                      default: disabled
 +
        printk.time=    Show timing data prefixed to each printk message line
                        Format: <bool>  (1/Y/y=enable, 0/N/n=disable)
  
                        For more information see Documentation/vm/slub.txt.
  
        slub_min_order= [MM, SLUB]
 -                      Determines the mininum page order for slabs. Must be
 +                      Determines the minimum page order for slabs. Must be
                        lower than slub_max_order.
                        For more information see Documentation/vm/slub.txt.
  
  
        threadirqs      [KNL]
                        Force threading of all interrupt handlers except those
 -                      marked explicitely IRQF_NO_THREAD.
 +                      marked explicitly IRQF_NO_THREAD.
  
        topology=       [S390]
                        Format: {off | on}
                        to facilitate early boot debugging.
                        See also Documentation/trace/events.txt
  
 +      transparent_hugepage=
 +                      [KNL]
 +                      Format: [always|madvise|never]
 +                      Can be used to control the default behavior of the system
 +                      with respect to transparent hugepages.
 +                      See Documentation/vm/transhuge.txt for more details.
 +
        tsc=            Disable clocksource stability checks for TSC.
                        Format: <string>
                        [x86] reliable: mark tsc clocksource as reliable, this
diff --combined MAINTAINERS
@@@ -159,7 -159,7 +159,7 @@@ S: Maintaine
  F:    drivers/net/ethernet/realtek/r8169.c
  
  8250/16?50 (AND CLONE UARTS) SERIAL DRIVER
 -M:    Greg Kroah-Hartman <gregkh@suse.de>
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    linux-serial@vger.kernel.org
  W:    http://serial.sourceforge.net
  S:    Maintained
@@@ -269,6 -269,7 +269,6 @@@ S: Orpha
  F:    drivers/platform/x86/wmi.c
  
  AD1889 ALSA SOUND DRIVER
 -M:    Kyle McMartin <kyle@mcmartin.ca>
  M:    Thibaut Varene <T-Bone@parisc-linux.org>
  W:    http://wiki.parisc-linux.org/AD1889
  L:    linux-parisc@vger.kernel.org
@@@ -788,6 -789,12 +788,6 @@@ F:        arch/arm/mach-mx*
  F:    arch/arm/mach-imx/
  F:    arch/arm/plat-mxc/
  
 -ARM/FREESCALE IMX51
 -M:    Amit Kucheria <amit.kucheria@canonical.com>
 -L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -S:    Maintained
 -F:    arch/arm/mach-mx5/
 -
  ARM/FREESCALE IMX6
  M:    Shawn Guo <shawn.guo@linaro.org>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@@@ -962,7 -969,7 +962,7 @@@ F: drivers/tty/serial/msm_serial.
  F:    drivers/platform/msm/
  F:    drivers/*/pm8???-*
  F:    include/linux/mfd/pm8xxx/
 -T:    git git://codeaurora.org/quic/kernel/davidb/linux-msm.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git
  S:    Maintained
  
  ARM/TOSA MACHINE SUPPORT
@@@ -1310,7 -1317,7 +1310,7 @@@ F:      drivers/atm
  F:    include/linux/atm*
  
  ATMEL AT91 MCI DRIVER
 -M:    Nicolas Ferre <nicolas.ferre@atmel.com>
 +M:    Ludovic Desroches <ludovic.desroches@atmel.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.atmel.com/products/AT91/
  W:    http://www.at91.com/
@@@ -1318,7 -1325,7 +1318,7 @@@ S:      Maintaine
  F:    drivers/mmc/host/at91_mci.c
  
  ATMEL AT91 / AT32 MCI DRIVER
 -M:    Nicolas Ferre <nicolas.ferre@atmel.com>
 +M:    Ludovic Desroches <ludovic.desroches@atmel.com>
  S:    Maintained
  F:    drivers/mmc/host/atmel-mci.c
  F:    drivers/mmc/host/atmel-mci-regs.h
@@@ -1405,7 -1412,7 +1405,7 @@@ F:      net/ax25
  B43 WIRELESS DRIVER
  M:    Stefano Brivio <stefano.brivio@polimi.it>
  L:    linux-wireless@vger.kernel.org
 -L:    b43-dev@lists.infradead.org (moderated for non-subscribers)
 +L:    b43-dev@lists.infradead.org
  W:    http://linuxwireless.org/en/users/Drivers/b43
  S:    Maintained
  F:    drivers/net/wireless/b43/
@@@ -1414,7 -1421,6 +1414,7 @@@ B43LEGACY WIRELESS DRIVE
  M:    Larry Finger <Larry.Finger@lwfinger.net>
  M:    Stefano Brivio <stefano.brivio@polimi.it>
  L:    linux-wireless@vger.kernel.org
 +L:    b43-dev@lists.infradead.org
  W:    http://linuxwireless.org/en/users/Drivers/b43
  S:    Maintained
  F:    drivers/net/wireless/b43legacy/
@@@ -1514,23 -1520,19 +1514,23 @@@ F:   drivers/mtd/devices/block2mtd.
  
  BLUETOOTH DRIVERS
  M:    Marcel Holtmann <marcel@holtmann.org>
 -M:    "Gustavo F. Padovan" <padovan@profusion.mobi>
 +M:    Gustavo Padovan <gustavo@padovan.org>
 +M:    Johan Hedberg <johan.hedberg@gmail.com>
  L:    linux-bluetooth@vger.kernel.org
  W:    http://www.bluez.org/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-2.6.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jh/bluetooth.git
  S:    Maintained
  F:    drivers/bluetooth/
  
  BLUETOOTH SUBSYSTEM
  M:    Marcel Holtmann <marcel@holtmann.org>
 -M:    "Gustavo F. Padovan" <padovan@profusion.mobi>
 +M:    Gustavo Padovan <gustavo@padovan.org>
 +M:    Johan Hedberg <johan.hedberg@gmail.com>
  L:    linux-bluetooth@vger.kernel.org
  W:    http://www.bluez.org/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth-2.6.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jh/bluetooth.git
  S:    Maintained
  F:    net/bluetooth/
  F:    include/net/bluetooth/
@@@ -1572,6 -1574,7 +1572,6 @@@ F:      drivers/net/ethernet/broadcom/tg3.
  
  BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
  M:    Brett Rudley <brudley@broadcom.com>
 -M:    Henry Ptasinski <henryp@broadcom.com>
  M:    Roland Vossen <rvossen@broadcom.com>
  M:    Arend van Spriel <arend@broadcom.com>
  M:    Franky (Zhenhui) Lin <frankyl@broadcom.com>
@@@ -1721,14 -1724,6 +1721,14 @@@ F:    include/linux/can/error.
  F:    include/linux/can/netlink.h
  F:    include/linux/can/platform/
  
 +CAPABILITIES
 +M:    Serge Hallyn <serge.hallyn@canonical.com>
 +L:    linux-security-module@vger.kernel.org
 +S:    Supported       
 +F:    include/linux/capability.h
 +F:    security/capability.c
 +F:    security/commoncap.c 
 +
  CELL BROADBAND ENGINE ARCHITECTURE
  M:    Arnd Bergmann <arnd@arndb.de>
  L:    linuxppc-dev@lists.ozlabs.org
@@@ -1788,9 -1783,9 +1788,9 @@@ X:      net/wireless/wext
  
  CHAR and MISC DRIVERS
  M:    Arnd Bergmann <arnd@arndb.de>
 -M:    Greg Kroah-Hartman <greg@kroah.com>
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
 -S:    Maintained
 +S:    Supported
  F:    drivers/char/*
  F:    drivers/misc/*
  
@@@ -1809,8 -1804,7 +1809,8 @@@ F:      Documentation/zh_CN
  CISCO VIC ETHERNET NIC DRIVER
  M:    Christian Benvenuti <benve@cisco.com>
  M:    Roopa Prabhu <roprabhu@cisco.com>
 -M:    David Wang <dwang2@cisco.com>
 +M:    Neel Patel <neepatel@cisco.com>
 +M:    Nishank Trivedi <nistrive@cisco.com>
  S:    Supported
  F:    drivers/net/ethernet/cisco/enic/
  
@@@ -1832,13 -1826,6 +1832,13 @@@ L:    alsa-devel@alsa-project.org (moderat
  S:    Supported
  F:    sound/soc/codecs/cs4270*
  
 +CLEANCACHE API
 +M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    mm/cleancache.c
 +F:    include/linux/cleancache.h
 +
  CLK API
  M:    Russell King <linux@arm.linux.org.uk>
  F:    include/linux/clk.h
@@@ -2109,13 -2096,6 +2109,13 @@@ W:    http://www.cyclades.com
  S:    Orphan
  F:    drivers/net/wan/pc300*
  
 +CYTTSP TOUCHSCREEN DRIVER
 +M:      Javier Martinez Canillas <javier@dowhile0.org>
 +L:      linux-input@vger.kernel.org
 +S:      Maintained
 +F:      drivers/input/touchscreen/cyttsp*
 +F:      include/linux/input/cyttsp.h
 +
  DAMA SLAVE for AX.25
  M:    Joerg Reuter <jreuter@yaina.de>
  W:    http://yaina.de/jreuter/
@@@ -2257,15 -2237,6 +2257,15 @@@ F:    Documentation/filesystems/quota.tx
  F:    fs/quota/
  F:    include/linux/quota*.h
  
 +DISPLAYLINK USB 2.0 FRAMEBUFFER DRIVER (UDLFB)
 +M:    Bernie Thompson <bernie@plugable.com>
 +L:    linux-fbdev@vger.kernel.org
 +S:    Maintained
 +W:    http://plugable.com/category/projects/udlfb/
 +F:    drivers/video/udlfb.c
 +F:    include/video/udlfb.h
 +F:    Documentation/fb/udlfb.txt
 +
  DISTRIBUTED LOCK MANAGER (DLM)
  M:    Christine Caulfield <ccaulfie@redhat.com>
  M:    David Teigland <teigland@redhat.com>
@@@ -2316,7 -2287,7 +2316,7 @@@ F:      drivers/acpi/dock.
  DOCUMENTATION
  M:    Randy Dunlap <rdunlap@xenotime.net>
  L:    linux-doc@vger.kernel.org
 -T:    quilt http://userweb.kernel.org/~rdunlap/kernel-doc-patches/current/
 +T:    quilt http://xenotime.net/kernel-doc-patches/current/
  S:    Maintained
  F:    Documentation/
  
@@@ -2349,7 -2320,7 +2349,7 @@@ F:      lib/lru_cache.
  F:    Documentation/blockdev/drbd/
  
  DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
 -M:    Greg Kroah-Hartman <gregkh@suse.de>
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6.git
  S:    Supported
  F:    Documentation/kobject.txt
@@@ -2667,21 -2638,6 +2667,21 @@@ M:    Mimi Zohar <zohar@us.ibm.com
  S:    Supported
  F:    security/integrity/evm/
  
 +EXYNOS DP DRIVER
 +M:    Jingoo Han <jg1.han@samsung.com>
 +L:    linux-fbdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/video/exynos/exynos_dp*
 +
 +EXYNOS MIPI DISPLAY DRIVERS
 +M:    Inki Dae <inki.dae@samsung.com>
 +M:    Donghwa Lee <dh09.lee@samsung.com>
 +M:    Kyungmin Park <kyungmin.park@samsung.com>
 +L:    linux-fbdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/video/exynos/exynos_mipi*
 +F:    include/video/exynos_mipi*
 +
  F71805F HARDWARE MONITORING DRIVER
  M:    Jean Delvare <khali@linux-fr.org>
  L:    lm-sensors@lm-sensors.org
@@@ -2896,12 -2852,6 +2896,12 @@@ S:    Maintaine
  F:    drivers/media/video/m5mols/
  F:    include/media/m5mols.h
  
 +FUJITSU TABLET EXTRAS
 +M:    Robert Gerlach <khnz@gmx.de>
 +L:    platform-driver-x86@vger.kernel.org
 +S:    Maintained
 +F:    drivers/platform/x86/fujitsu-tablet.c
 +
  FUSE: FILESYSTEM IN USERSPACE
  M:    Miklos Szeredi <miklos@szeredi.hu>
  L:    fuse-devel@lists.sourceforge.net
@@@ -3103,6 -3053,7 +3103,6 @@@ F:      drivers/hwspinlock/hwspinlock_
  F:    include/linux/hwspinlock.h
  
  HARMONY SOUND DRIVER
 -M:    Kyle McMartin <kyle@mcmartin.ca>
  L:    linux-parisc@vger.kernel.org
  S:    Maintained
  F:    sound/parisc/harmony.*
@@@ -3373,12 -3324,6 +3373,12 @@@ S:    Maintaine
  F:    net/ieee802154/
  F:    drivers/ieee802154/
  
 +IIO SUBSYSTEM AND DRIVERS
 +M:    Jonathan Cameron <jic23@cam.ac.uk>
 +L:    linux-iio@vger.kernel.org
 +S:    Maintained
 +F:    drivers/staging/iio/
 +
  IKANOS/ADI EAGLE ADSL USB DRIVER
  M:    Matthieu Castet <castet.matthieu@free.fr>
  M:    Stanislaw Gruszka <stf_xl@wp.pl>
@@@ -3695,15 -3640,6 +3695,15 @@@ S:    Maintaine
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
  F:    kernel/irq/
  
 +IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
 +M:    Benjamin Herrenschmidt <benh@kernel.crashing.org>
 +M:    Grant Likely <grant.likely@secretlab.ca>
 +T:    git git://git.secretlab.ca/git/linux-2.6.git irqdomain/next
 +S:    Maintained
 +F:    Documentation/IRQ-domain.txt
 +F:    include/linux/irqdomain.h
 +F:    kernel/irq/irqdomain.c
 +
  ISAPNP
  M:    Jaroslav Kysela <perex@perex.cz>
  S:    Maintained
@@@ -3846,7 -3782,7 +3846,7 @@@ F:      Documentation/kdump
  
  KERNEL AUTOMOUNTER v4 (AUTOFS4)
  M:    Ian Kent <raven@themaw.net>
 -L:    autofs@linux.kernel.org
 +L:    autofs@vger.kernel.org
  S:    Maintained
  F:    fs/autofs4/
  
@@@ -4056,11 -3992,11 +4056,11 @@@ M:   Rusty Russell <rusty@rustcorp.com.au
  L:    lguest@lists.ozlabs.org
  W:    http://lguest.ozlabs.org/
  S:    Odd Fixes
 -F:    Documentation/virtual/lguest/
 +F:    arch/x86/include/asm/lguest*.h
  F:    arch/x86/lguest/
  F:    drivers/lguest/
  F:    include/linux/lguest*.h
 -F:    arch/x86/include/asm/lguest*.h
 +F:    tools/lguest/
  
  LINUX FOR IBM pSERIES (RS/6000)
  M:    Paul Mackerras <paulus@au.ibm.com>
@@@ -4100,7 -4036,7 +4100,7 @@@ M:      Josh Boyer <jwboyer@gmail.com
  M:    Matt Porter <mporter@kernel.crashing.org>
  W:    http://www.penguinppc.org/
  L:    linuxppc-dev@lists.ozlabs.org
 -T:    git git://git.infradead.org/users/jwboyer/powerpc-4xx.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
  S:    Maintained
  F:    arch/powerpc/platforms/40x/
  F:    arch/powerpc/platforms/44x/
@@@ -4200,11 -4136,10 +4200,11 @@@ L:   linux-ntfs-dev@lists.sourceforge.ne
  W:    http://www.linux-ntfs.org/content/view/19/37/
  S:    Maintained
  F:    Documentation/ldm.txt
 -F:    fs/partitions/ldm.*
 +F:    block/partitions/ldm.*
  
  LogFS
  M:    Joern Engel <joern@logfs.org>
 +M:    Prasad Joshi <prasadjoshi.linux@gmail.com>
  L:    logfs@logfs.org
  W:    logfs.org
  S:    Maintained
@@@ -4346,6 -4281,13 +4346,6 @@@ S:     Orpha
  F:    drivers/video/matrox/matroxfb_*
  F:    include/linux/matroxfb.h
  
 -MAX1668 TEMPERATURE SENSOR DRIVER
 -M:    "David George" <david.george@ska.ac.za>
 -L:    lm-sensors@lm-sensors.org
 -S:    Maintained
 -F:    Documentation/hwmon/max1668
 -F:    drivers/hwmon/max1668.c
 -
  MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
  M:    "Hans J. Koch" <hjk@hansjkoch.de>
  L:    lm-sensors@lm-sensors.org
@@@ -4751,7 -4693,7 +4751,7 @@@ NTFS FILESYSTE
  M:    Anton Altaparmakov <anton@tuxera.com>
  L:    linux-ntfs-dev@lists.sourceforge.net
  W:    http://www.tuxera.com/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs-2.6.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs.git
  S:    Supported
  F:    Documentation/filesystems/ntfs.txt
  F:    fs/ntfs/
@@@ -4976,6 -4918,8 +4976,6 @@@ F:      fs/ocfs2
  
  ORINOCO DRIVER
  L:    linux-wireless@vger.kernel.org
 -L:    orinoco-users@lists.sourceforge.net
 -L:    orinoco-devel@lists.sourceforge.net
  W:    http://linuxwireless.org/en/users/Drivers/orinoco
  W:    http://www.nongnu.org/orinoco/
  S:    Orphan
@@@ -5062,8 -5006,9 +5062,8 @@@ F:      Documentation/blockdev/paride.tx
  F:    drivers/block/paride/
  
  PARISC ARCHITECTURE
 -M:    Kyle McMartin <kyle@mcmartin.ca>
 -M:    Helge Deller <deller@gmx.de>
  M:    "James E.J. Bottomley" <jejb@parisc-linux.org>
 +M:    Helge Deller <deller@gmx.de>
  L:    linux-parisc@vger.kernel.org
  W:    http://www.parisc-linux.org/
  Q:    http://patchwork.kernel.org/project/linux-parisc/list/
@@@ -5120,7 -5065,7 +5120,7 @@@ F:      Documentation/PCI/pci-error-recovery
  F:    Documentation/powerpc/eeh-pci-error-recovery.txt
  
  PCI SUBSYSTEM
- M:    Jesse Barnes <jbarnes@virtuousgeek.org>
+ M:    Bjorn Helgaas <bhelgaas@google.com>
  L:    linux-pci@vger.kernel.org
  Q:    http://patchwork.kernel.org/project/linux-pci/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6.git
@@@ -5130,7 -5075,7 +5130,7 @@@ F:      drivers/pci
  F:    include/linux/pci*
  
  PCI HOTPLUG
- M:    Jesse Barnes <jbarnes@virtuousgeek.org>
+ M:    Bjorn Helgaas <bhelgaas@google.com>
  L:    linux-pci@vger.kernel.org
  S:    Supported
  F:    drivers/pci/hotplug
@@@ -5382,17 -5327,6 +5382,17 @@@ L:    cbe-oss-dev@lists.ozlabs.or
  S:    Maintained
  F:    drivers/block/ps3vram.c
  
 +PTP HARDWARE CLOCK SUPPORT
 +M:    Richard Cochran <richardcochran@gmail.com>
 +S:    Maintained
 +W:    http://linuxptp.sourceforge.net/
 +F:    Documentation/ABI/testing/sysfs-ptp
 +F:    Documentation/ptp/*
 +F:    drivers/net/gianfar_ptp.c
 +F:    drivers/net/phy/dp83640*
 +F:    drivers/ptp/*
 +F:    include/linux/ptp_cl*
 +
  PTRACE SUPPORT
  M:    Roland McGrath <roland@redhat.com>
  M:    Oleg Nesterov <oleg@redhat.com>
@@@ -5705,7 -5639,7 +5705,7 @@@ W:      http://www.ibm.com/developerworks/li
  S:    Supported
  F:    arch/s390/
  F:    drivers/s390/
 -F:    fs/partitions/ibm.c
 +F:    block/partitions/ibm.c
  F:    Documentation/s390/
  F:    Documentation/DocBook/s390*
  
@@@ -5928,13 -5862,12 +5928,13 @@@ F:   drivers/mmc/host/sdhci-s3c.
  
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) ST SPEAR DRIVER
  M:    Viresh Kumar <viresh.kumar@st.com>
 +L:    spear-devel@list.st.com
  L:    linux-mmc@vger.kernel.org
  S:    Maintained
  F:    drivers/mmc/host/sdhci-spear.c
  
  SECURITY SUBSYSTEM
 -M:    James Morris <jmorris@namei.org>
 +M:    James Morris <james.l.morris@oracle.com>
  L:    linux-security-module@vger.kernel.org (suggested Cc:)
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git
  W:    http://security.wiki.kernel.org/
@@@ -5947,7 -5880,7 +5947,7 @@@ S:      Supporte
  
  SELINUX SECURITY MODULE
  M:    Stephen Smalley <sds@tycho.nsa.gov>
 -M:    James Morris <jmorris@namei.org>
 +M:    James Morris <james.l.morris@oracle.com>
  M:    Eric Paris <eparis@parisplace.org>
  L:    selinux@tycho.nsa.gov (subscribers-only, general discussion)
  W:    http://selinuxproject.org
@@@ -6260,8 -6193,8 +6260,8 @@@ L:      sparclinux@vger.kernel.or
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6.git
  S:    Maintained
 +F:    include/linux/sunserialcore.h
  F:    drivers/tty/serial/suncore.c
 -F:    drivers/tty/serial/suncore.h
  F:    drivers/tty/serial/sunhv.c
  F:    drivers/tty/serial/sunsab.c
  F:    drivers/tty/serial/sunsab.h
@@@ -6271,32 -6204,24 +6271,32 @@@ F:   drivers/tty/serial/sunzilog.
  
  SPEAR PLATFORM SUPPORT
  M:    Viresh Kumar <viresh.kumar@st.com>
 +L:    spear-devel@list.st.com
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.st.com/spear
  S:    Maintained
  F:    arch/arm/plat-spear/
  
  SPEAR3XX MACHINE SUPPORT
  M:    Viresh Kumar <viresh.kumar@st.com>
 +L:    spear-devel@list.st.com
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.st.com/spear
  S:    Maintained
  F:    arch/arm/mach-spear3xx/
  
  SPEAR6XX MACHINE SUPPORT
  M:    Rajeev Kumar <rajeev-dlh.kumar@st.com>
 +L:    spear-devel@list.st.com
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.st.com/spear
  S:    Maintained
  F:    arch/arm/mach-spear6xx/
  
  SPEAR CLOCK FRAMEWORK SUPPORT
  M:    Viresh Kumar <viresh.kumar@st.com>
 +L:    spear-devel@list.st.com
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.st.com/spear
  S:    Maintained
  F:    arch/arm/mach-spear*/clock.c
@@@ -6305,8 -6230,6 +6305,8 @@@ F:      arch/arm/plat-spear/include/plat/clo
  
  SPEAR PAD MULTIPLEXING SUPPORT
  M:    Viresh Kumar <viresh.kumar@st.com>
 +L:    spear-devel@list.st.com
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  W:    http://www.st.com/spear
  S:    Maintained
  F:    arch/arm/plat-spear/include/plat/padmux.h
@@@ -6359,15 -6282,15 +6359,15 @@@ S:   Maintaine
  F:    arch/alpha/kernel/srm_env.c
  
  STABLE BRANCH
 -M:    Greg Kroah-Hartman <greg@kroah.com>
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    stable@vger.kernel.org
 -S:    Maintained
 +S:    Supported
  
  STAGING SUBSYSTEM
 -M:    Greg Kroah-Hartman <gregkh@suse.de>
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
  L:    devel@driverdev.osuosl.org
 -S:    Maintained
 +S:    Supported
  F:    drivers/staging/
  
  STAGING - AGERE HERMES II and II.5 WIRELESS DRIVERS
@@@ -6443,11 -6366,6 +6443,11 @@@ W:    http://wiki.laptop.org/go/DCO
  S:    Odd Fixes
  F:    drivers/staging/olpc_dcon/
  
 +STAGING - OZMO DEVICES USB OVER WIFI DRIVER
 +M:    Chris Kelly <ckelly@ozmodevices.com>
 +S:    Maintained
 +F:    drivers/staging/ozwpan/
 +
  STAGING - PARALLEL LCD/KEYPAD PANEL DRIVER
  M:    Willy Tarreau <willy@meta-x.org>
  S:    Odd Fixes
@@@ -6484,6 -6402,11 +6484,6 @@@ M:     Omar Ramirez Luna <omar.ramirez@ti.c
  S:    Odd Fixes
  F:    drivers/staging/tidspbridge/
  
 -STAGING - TRIDENT TVMASTER TMxxxx USB VIDEO CAPTURE DRIVERS
 -L:    linux-media@vger.kernel.org
 -S:    Odd Fixes
 -F:    drivers/staging/tm6000/
 -
  STAGING - USB ENE SM/MS CARD READER DRIVER
  M:    Al Cho <acho@novell.com>
  S:    Odd Fixes
@@@ -6752,10 -6675,10 +6752,10 @@@ S:   Maintaine
  K:    ^Subject:.*(?i)trivial
  
  TTY LAYER
 -M:    Greg Kroah-Hartman <gregkh@suse.de>
 -S:    Maintained
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6.git
 -F:    drivers/tty/*
 +F:    drivers/tty/
  F:    drivers/tty/serial/serial_core.c
  F:    include/linux/serial_core.h
  F:    include/linux/serial.h
@@@ -7041,7 -6964,7 +7041,7 @@@ S:      Maintaine
  F:    drivers/usb/serial/digi_acceleport.c
  
  USB SERIAL DRIVER
 -M:    Greg Kroah-Hartman <gregkh@suse.de>
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    linux-usb@vger.kernel.org
  S:    Supported
  F:    Documentation/usb/usb-serial.txt
@@@ -7056,8 -6979,9 +7056,8 @@@ S:      Maintaine
  F:    drivers/usb/serial/empeg.c
  
  USB SERIAL KEYSPAN DRIVER
 -M:    Greg Kroah-Hartman <greg@kroah.com>
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    linux-usb@vger.kernel.org
 -W:    http://www.kroah.com/linux/
  S:    Maintained
  F:    drivers/usb/serial/*keyspan*
  
@@@ -7085,7 -7009,7 +7085,7 @@@ F:      Documentation/video4linux/sn9c102.tx
  F:    drivers/media/video/sn9c102/
  
  USB SUBSYSTEM
 -M:    Greg Kroah-Hartman <gregkh@suse.de>
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    linux-usb@vger.kernel.org
  W:    http://www.linux-usb.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6.git
@@@ -7172,7 -7096,7 +7172,7 @@@ F:      fs/hppfs
  
  USERSPACE I/O (UIO)
  M:    "Hans J. Koch" <hjk@hansjkoch.de>
 -M:    Greg Kroah-Hartman <gregkh@suse.de>
 +M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  S:    Maintained
  F:    Documentation/DocBook/uio-howto.tmpl
  F:    drivers/uio/
@@@ -7362,7 -7286,7 +7362,7 @@@ WATCHDOG DEVICE DRIVER
  M:    Wim Van Sebroeck <wim@iguana.be>
  L:    linux-watchdog@vger.kernel.org
  W:    http://www.linux-watchdog.org/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog.git
 +T:    git git://www.linux-watchdog.org/linux-watchdog.git
  S:    Maintained
  F:    Documentation/watchdog/
  F:    drivers/watchdog/
@@@ -7447,7 -7371,6 +7447,7 @@@ S:      Supporte
  F:    Documentation/hwmon/wm83??
  F:    arch/arm/mach-s3c64xx/mach-crag6410*
  F:    drivers/leds/leds-wm83*.c
 +F:    drivers/hwmon/wm83??-hwmon.c
  F:    drivers/input/misc/wm831x-on.c
  F:    drivers/input/touchscreen/wm831x-ts.c
  F:    drivers/input/touchscreen/wm97*.c
@@@ -7549,12 -7472,6 +7549,12 @@@ S:    Supporte
  F:    Documentation/filesystems/xfs.txt
  F:    fs/xfs/
  
 +XILINX AXI ETHERNET DRIVER
 +M:    Ariane Keller <ariane.keller@tik.ee.ethz.ch>
 +M:    Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
 +S:    Maintained
 +F:    drivers/net/ethernet/xilinx/xilinx_axienet*
 +
  XILINX SYSTEMACE DRIVER
  M:    Grant Likely <grant.likely@secretlab.ca>
  W:    http://www.secretlab.ca/
diff --combined arch/arm/common/it8152.c
@@@ -299,8 -299,8 +299,8 @@@ int __init it8152_pci_setup(int nr, str
                goto err1;
        }
  
-       pci_add_resource(&sys->resources, &it8152_io);
-       pci_add_resource(&sys->resources, &it8152_mem);
+       pci_add_resource_offset(&sys->resources, &it8152_io, sys->io_offset);
+       pci_add_resource_offset(&sys->resources, &it8152_mem, sys->mem_offset);
  
        if (platform_notify || platform_notify_remove) {
                printk(KERN_ERR "PCI: Can't use platform_notify\n");
@@@ -320,6 -320,13 +320,6 @@@ err0
        return -EBUSY;
  }
  
 -/*
 - * If we set up a device for bus mastering, we need to check the latency
 - * timer as we don't have even crappy BIOSes to set it properly.
 - * The implementation is from arch/i386/pci/i386.c
 - */
 -unsigned int pcibios_max_latency = 255;
 -
  /* ITE bridge requires setting latency timer to avoid early bus access
     termination by PCI bus master devices
  */
@@@ -45,23 -45,92 +45,21 @@@ extern void init_pci_config_tokens (voi
  extern unsigned long get_phb_buid (struct device_node *);
  extern int rtas_setup_phb(struct pci_controller *phb);
  
- extern unsigned long pci_probe_only;
 -/* ---- EEH internal-use-only related routines ---- */
  #ifdef CONFIG_EEH
  
 +void pci_addr_cache_build(void);
  void pci_addr_cache_insert_device(struct pci_dev *dev);
  void pci_addr_cache_remove_device(struct pci_dev *dev);
 -void pci_addr_cache_build(void);
 -struct pci_dev *pci_get_device_by_addr(unsigned long addr);
 -
 -/**
 - * eeh_slot_error_detail -- record and EEH error condition to the log
 - * @pdn:      pci device node
 - * @severity: EEH_LOG_TEMP_FAILURE or EEH_LOG_PERM_FAILURE
 - *
 - * Obtains the EEH error details from the RTAS subsystem,
 - * and then logs these details with the RTAS error log system.
 - */
 -#define EEH_LOG_TEMP_FAILURE 1
 -#define EEH_LOG_PERM_FAILURE 2
 -void eeh_slot_error_detail (struct pci_dn *pdn, int severity);
 -
 -/**
 - * rtas_pci_enable - enable IO transfers for this slot
 - * @pdn:       pci device node
 - * @function:  either EEH_THAW_MMIO or EEH_THAW_DMA 
 - *
 - * Enable I/O transfers to this slot 
 - */
 -#define EEH_THAW_MMIO 2
 -#define EEH_THAW_DMA  3
 -int rtas_pci_enable(struct pci_dn *pdn, int function);
 -
 -/**
 - * rtas_set_slot_reset -- unfreeze a frozen slot
 - * @pdn:       pci device node
 - *
 - * Clear the EEH-frozen condition on a slot.  This routine
 - * does this by asserting the PCI #RST line for 1/8th of
 - * a second; this routine will sleep while the adapter is
 - * being reset.
 - *
 - * Returns a non-zero value if the reset failed.
 - */
 -int rtas_set_slot_reset (struct pci_dn *);
 -int eeh_wait_for_slot_status(struct pci_dn *pdn, int max_wait_msecs);
 -
 -/** 
 - * eeh_restore_bars - Restore device configuration info.
 - * @pdn:       pci device node
 - *
 - * A reset of a PCI device will clear out its config space.
 - * This routines will restore the config space for this
 - * device, and is children, to values previously obtained
 - * from the firmware.
 - */
 -void eeh_restore_bars(struct pci_dn *);
 -
 -/**
 - * rtas_configure_bridge -- firmware initialization of pci bridge
 - * @pdn:       pci device node
 - *
 - * Ask the firmware to configure all PCI bridges devices
 - * located behind the indicated node. Required after a
 - * pci device reset. Does essentially the same hing as
 - * eeh_restore_bars, but for brdges, and lets firmware 
 - * do the work.
 - */
 -void rtas_configure_bridge(struct pci_dn *);
 -
 +struct pci_dev *pci_addr_cache_get_device(unsigned long addr);
 +void eeh_slot_error_detail(struct eeh_dev *edev, int severity);
 +int eeh_pci_enable(struct eeh_dev *edev, int function);
 +int eeh_reset_pe(struct eeh_dev *);
 +void eeh_restore_bars(struct eeh_dev *);
  int rtas_write_config(struct pci_dn *, int where, int size, u32 val);
  int rtas_read_config(struct pci_dn *, int where, int size, u32 *val);
 -
 -/**
 - * eeh_mark_slot -- set mode flags for pertition endpoint
 - * @pdn:       pci device node
 - *
 - * mark and clear slots: find "partition endpoint" PE and set or 
 - * clear the flags for each subnode of the PE.
 - */
 -void eeh_mark_slot (struct device_node *dn, int mode_flag);
 -void eeh_clear_slot (struct device_node *dn, int mode_flag);
 -
 -/**
 - * find_device_pe -- Find the associated "Partiationable Endpoint" PE
 - * @pdn:       pci device node
 - */
 -struct device_node * find_device_pe(struct device_node *dn);
 +void eeh_mark_slot(struct device_node *dn, int mode_flag);
 +void eeh_clear_slot(struct device_node *dn, int mode_flag);
 +struct device_node *eeh_find_device_pe(struct device_node *dn);
  
  void eeh_sysfs_add_device(struct pci_dev *pdev);
  void eeh_sysfs_remove_device(struct pci_dev *pdev);
@@@ -71,11 -140,6 +69,11 @@@ static inline const char *eeh_pci_name(
        return pdev ? pci_name(pdev) : "<null>";
  } 
  
 +static inline const char *eeh_driver_name(struct pci_dev *pdev)
 +{
 +      return (pdev && pdev->driver) ? pdev->driver->name : "<null>";
 +}
 +
  #endif /* CONFIG_EEH */
  
  #else /* CONFIG_PCI */
@@@ -38,6 -38,7 +38,6 @@@
  #include <asm/byteorder.h>
  #include <asm/machdep.h>
  #include <asm/ppc-pci.h>
 -#include <asm/firmware.h>
  #include <asm/eeh.h>
  
  static DEFINE_SPINLOCK(hose_spinlock);
@@@ -49,9 -50,6 +49,6 @@@ static int global_phb_number;         /* Globa
  /* ISA Memory physical address */
  resource_size_t isa_mem_base;
  
- /* Default PCI flags is 0 on ppc32, modified at boot on ppc64 */
- unsigned int pci_flags = 0;
  
  static struct dma_map_ops *pci_dma_ops = &dma_direct_ops;
  
@@@ -218,6 -216,20 +215,6 @@@ static int pci_read_irq_line(struct pci
        struct of_irq oirq;
        unsigned int virq;
  
 -      /* The current device-tree that iSeries generates from the HV
 -       * PCI informations doesn't contain proper interrupt routing,
 -       * and all the fallback would do is print out crap, so we
 -       * don't attempt to resolve the interrupts here at all, some
 -       * iSeries specific fixup does it.
 -       *
 -       * In the long run, we will hopefully fix the generated device-tree
 -       * instead.
 -       */
 -#ifdef CONFIG_PPC_ISERIES
 -      if (firmware_has_feature(FW_FEATURE_ISERIES))
 -              return -1;
 -#endif
 -
        pr_debug("PCI: Try to map irq for %s...\n", pci_name(pci_dev));
  
  #ifdef DEBUG
@@@ -834,60 -846,6 +831,6 @@@ int pci_proc_domain(struct pci_bus *bus
        return 1;
  }
  
- void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
-                            struct resource *res)
- {
-       resource_size_t offset = 0, mask = (resource_size_t)-1;
-       struct pci_controller *hose = pci_bus_to_host(dev->bus);
-       if (!hose)
-               return;
-       if (res->flags & IORESOURCE_IO) {
-               offset = (unsigned long)hose->io_base_virt - _IO_BASE;
-               mask = 0xffffffffu;
-       } else if (res->flags & IORESOURCE_MEM)
-               offset = hose->pci_mem_offset;
-       region->start = (res->start - offset) & mask;
-       region->end = (res->end - offset) & mask;
- }
- EXPORT_SYMBOL(pcibios_resource_to_bus);
- void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
-                            struct pci_bus_region *region)
- {
-       resource_size_t offset = 0, mask = (resource_size_t)-1;
-       struct pci_controller *hose = pci_bus_to_host(dev->bus);
-       if (!hose)
-               return;
-       if (res->flags & IORESOURCE_IO) {
-               offset = (unsigned long)hose->io_base_virt - _IO_BASE;
-               mask = 0xffffffffu;
-       } else if (res->flags & IORESOURCE_MEM)
-               offset = hose->pci_mem_offset;
-       res->start = (region->start + offset) & mask;
-       res->end = (region->end + offset) & mask;
- }
- EXPORT_SYMBOL(pcibios_bus_to_resource);
- /* Fixup a bus resource into a linux resource */
- static void __devinit fixup_resource(struct resource *res, struct pci_dev *dev)
- {
-       struct pci_controller *hose = pci_bus_to_host(dev->bus);
-       resource_size_t offset = 0, mask = (resource_size_t)-1;
-       if (res->flags & IORESOURCE_IO) {
-               offset = (unsigned long)hose->io_base_virt - _IO_BASE;
-               mask = 0xffffffffu;
-       } else if (res->flags & IORESOURCE_MEM)
-               offset = hose->pci_mem_offset;
-       res->start = (res->start + offset) & mask;
-       res->end = (res->end + offset) & mask;
- }
  /* This header fixup will do the resource fixup for all devices as they are
   * probed, but not for bridge ranges
   */
@@@ -927,18 -885,11 +870,11 @@@ static void __devinit pcibios_fixup_res
                        continue;
                }
  
-               pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] fixup...\n",
+               pr_debug("PCI:%s Resource %d %016llx-%016llx [%x]\n",
                         pci_name(dev), i,
                         (unsigned long long)res->start,\
                         (unsigned long long)res->end,
                         (unsigned int)res->flags);
-               fixup_resource(res, dev);
-               pr_debug("PCI:%s            %016llx-%016llx\n",
-                        pci_name(dev),
-                        (unsigned long long)res->start,
-                        (unsigned long long)res->end);
        }
  
        /* Call machine specific resource fixup */
@@@ -1040,27 -991,18 +976,18 @@@ static void __devinit pcibios_fixup_bri
                        continue;
                }
  
-               pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x] fixup...\n",
+               pr_debug("PCI:%s Bus rsrc %d %016llx-%016llx [%x]\n",
                         pci_name(dev), i,
                         (unsigned long long)res->start,\
                         (unsigned long long)res->end,
                         (unsigned int)res->flags);
  
-               /* Perform fixup */
-               fixup_resource(res, dev);
                /* Try to detect uninitialized P2P bridge resources,
                 * and clear them out so they get re-assigned later
                 */
                if (pcibios_uninitialized_bridge_resource(bus, res)) {
                        res->flags = 0;
                        pr_debug("PCI:%s            (unassigned)\n", pci_name(dev));
-               } else {
-                       pr_debug("PCI:%s            %016llx-%016llx\n",
-                                pci_name(dev),
-                                (unsigned long long)res->start,
-                                (unsigned long long)res->end);
                }
        }
  }
@@@ -1550,6 -1492,11 +1477,11 @@@ int pcibios_enable_device(struct pci_de
        return pci_enable_resources(dev, mask);
  }
  
+ resource_size_t pcibios_io_space_offset(struct pci_controller *hose)
+ {
+       return (unsigned long) hose->io_base_virt - _IO_BASE;
+ }
  static void __devinit pcibios_setup_phb_resources(struct pci_controller *hose, struct list_head *resources)
  {
        struct resource *res;
                 (unsigned long long)res->start,
                 (unsigned long long)res->end,
                 (unsigned long)res->flags);
-       pci_add_resource(resources, res);
+       pci_add_resource_offset(resources, res, pcibios_io_space_offset(hose));
  
        /* Hookup PHB Memory resources */
        for (i = 0; i < 3; ++i) {
                         (unsigned long long)res->start,
                         (unsigned long long)res->end,
                         (unsigned long)res->flags);
-               pci_add_resource(resources, res);
+               pci_add_resource_offset(resources, res, hose->pci_mem_offset);
        }
  
        pr_debug("PCI: PHB MEM offset     = %016llx\n",
@@@ -275,11 -275,8 +275,11 @@@ void __init find_and_init_phbs(void
        of_node_put(root);
        pci_devs_phb_init();
  
 +      /* Create EEH devices for all PHBs */
 +      eeh_dev_phb_init();
 +
        /*
-        * pci_probe_only and pci_assign_all_buses can be set via properties
+        * PCI_PROBE_ONLY and PCI_REASSIGN_ALL_BUS can be set via properties
         * in chosen.
         */
        if (of_chosen) {
  
                prop = of_get_property(of_chosen,
                                "linux,pci-probe-only", NULL);
-               if (prop)
-                       pci_probe_only = *prop;
+               if (prop) {
+                       if (*prop)
+                               pci_add_flags(PCI_PROBE_ONLY);
+                       else
+                               pci_clear_flags(PCI_PROBE_ONLY);
+               }
  
  #ifdef CONFIG_PPC32 /* Will be made generic soon */
                prop = of_get_property(of_chosen,
@@@ -31,7 -31,6 +31,7 @@@
  #include <asm/iommu.h>
  #include <asm/tce.h>
  #include <asm/abs_addr.h>
 +#include <asm/firmware.h>
  
  #include "powernv.h"
  #include "pci.h"
@@@ -53,38 -52,32 +53,38 @@@ static int pnv_msi_check_device(struct 
  
  static unsigned int pnv_get_one_msi(struct pnv_phb *phb)
  {
 -      unsigned int id;
 +      unsigned long flags;
 +      unsigned int id, rc;
 +
 +      spin_lock_irqsave(&phb->lock, flags);
  
 -      spin_lock(&phb->lock);
        id = find_next_zero_bit(phb->msi_map, phb->msi_count, phb->msi_next);
        if (id >= phb->msi_count && phb->msi_next)
                id = find_next_zero_bit(phb->msi_map, phb->msi_count, 0);
        if (id >= phb->msi_count) {
 -              spin_unlock(&phb->lock);
 -              return 0;
 +              rc = 0;
 +              goto out;
        }
        __set_bit(id, phb->msi_map);
 -      spin_unlock(&phb->lock);
 -      return id + phb->msi_base;
 +      rc = id + phb->msi_base;
 +out:
 +      spin_unlock_irqrestore(&phb->lock, flags);
 +      return rc;
  }
  
  static void pnv_put_msi(struct pnv_phb *phb, unsigned int hwirq)
  {
 +      unsigned long flags;
        unsigned int id;
  
        if (WARN_ON(hwirq < phb->msi_base ||
                    hwirq >= (phb->msi_base + phb->msi_count)))
                return;
        id = hwirq - phb->msi_base;
 -      spin_lock(&phb->lock);
 +
 +      spin_lock_irqsave(&phb->lock, flags);
        __clear_bit(id, phb->msi_map);
 -      spin_unlock(&phb->lock);
 +      spin_unlock_irqrestore(&phb->lock, flags);
  }
  
  static int pnv_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
@@@ -562,10 -555,7 +562,7 @@@ void __init pnv_pci_init(void
  {
        struct device_node *np;
  
-       pci_set_flags(PCI_CAN_SKIP_ISA_ALIGN);
-       /* We do not want to just probe */
-       pci_probe_only = 0;
+       pci_add_flags(PCI_CAN_SKIP_ISA_ALIGN);
  
        /* OPAL absent, try POPAL first then RTAS detection of PHBs */
        if (!firmware_has_feature(FW_FEATURE_OPAL)) {
@@@ -84,7 -84,7 +84,7 @@@ void pcibios_remove_pci_devices(struct 
        list_for_each_entry_safe(dev, tmp, &bus->devices, bus_list) {
                pr_debug("     * Removing %s...\n", pci_name(dev));
                eeh_remove_bus_device(dev);
-               pci_remove_bus_device(dev);
+               pci_stop_and_remove_bus_device(dev);
        }
  }
  EXPORT_SYMBOL_GPL(pcibios_remove_pci_devices);
@@@ -147,9 -147,6 +147,9 @@@ struct pci_controller * __devinit init_
  
        pci_devs_phb_init_dynamic(phb);
  
 +      /* Create EEH devices for the PHB */
 +      eeh_dev_phb_init_dynamic(phb);
 +
        if (dn->child)
                eeh_add_device_tree_early(dn);
  
@@@ -190,8 -190,9 +190,8 @@@ static void __init pseries_mpic_init_IR
        BUG_ON(openpic_addr == 0);
  
        /* Setup the openpic driver */
 -      mpic = mpic_alloc(pSeries_mpic_node, openpic_addr, 0,
 -                        16, 250, /* isu size, irq count */
 -                        " MPIC     ");
 +      mpic = mpic_alloc(pSeries_mpic_node, openpic_addr,
 +                      MPIC_NO_RESET, 16, 0, " MPIC     ");
        BUG_ON(mpic == NULL);
  
        /* Add ISUs */
@@@ -260,12 -261,8 +260,12 @@@ static int pci_dn_reconfig_notifier(str
        switch (action) {
        case PSERIES_RECONFIG_ADD:
                pci = np->parent->data;
 -              if (pci)
 +              if (pci) {
                        update_dn_pci_info(np, pci->phb);
 +
 +                      /* Create EEH device for the OF node */
 +                      eeh_dev_init(np, pci->phb);
 +              }
                break;
        default:
                err = NOTIFY_DONE;
@@@ -383,9 -380,11 +383,12 @@@ static void __init pSeries_setup_arch(v
  
        fwnmi_init();
  
+       /* By default, only probe PCI (can be overriden by rtas_pci) */
+       pci_add_flags(PCI_PROBE_ONLY);
        /* Find and initialize PCI host bridges */
        init_pci_config_tokens();
 +      eeh_pseries_init();
        find_and_init_phbs();
        pSeries_reconfig_notifier_register(&pci_dn_reconfig_nb);
        eeh_init();
@@@ -468,15 -468,15 +468,15 @@@ static void __init wsp_pcie_configure_h
  #define DUMP_REG(x) \
        pr_debug("%-30s : 0x%016llx\n", #x, in_be64(hose->cfg_data + x))
  
 -#ifdef CONFIG_WSP_DD1_WORKAROUND_BAD_PCIE_CLASS
 -      /* WSP DD1 has a bogus class code by default in the PCI-E
 -       * root complex's built-in P2P bridge */
 +      /*
 +       * Some WSP variants  has a bogus class code by default in the PCI-E
 +       * root complex's built-in P2P bridge
 +       */
        val = in_be64(hose->cfg_data + PCIE_REG_SYS_CFG1);
        pr_debug("PCI-E SYS_CFG1 : 0x%llx\n", val);
        out_be64(hose->cfg_data + PCIE_REG_SYS_CFG1,
                 (val & ~PCIE_REG_SYS_CFG1_CLASS_CODE) | (PCI_CLASS_BRIDGE_PCI << 8));
        pr_debug("PCI-E SYS_CFG1 : 0x%llx\n", in_be64(hose->cfg_data + PCIE_REG_SYS_CFG1));
 -#endif /* CONFIG_WSP_DD1_WORKAROUND_BAD_PCIE_CLASS */
  
  #ifdef CONFIG_WSP_DD1_WORKAROUND_DD1_TCE_BUGS
        /* XXX Disable TCE caching, it doesn't work on DD1 */
@@@ -682,7 -682,6 +682,6 @@@ static int __init wsp_setup_one_phb(str
        /* XXX Force re-assigning of everything for now */
        pci_add_flags(PCI_REASSIGN_ALL_BUS | PCI_REASSIGN_ALL_RSRC |
                      PCI_ENABLE_PROC_DOMAINS);
-       pci_probe_only = 0;
  
        /* Calculate how the TCE space is divided */
        phb->dma32_base         = 0;
@@@ -37,11 -37,20 +37,20 @@@ static void __devinit pcibios_scanbus(s
        static int next_busno;
        static int need_domain_info;
        LIST_HEAD(resources);
+       struct resource *res;
+       resource_size_t offset;
        int i;
        struct pci_bus *bus;
  
-       for (i = 0; i < hose->nr_resources; i++)
-               pci_add_resource(&resources, hose->resources + i);
+       for (i = 0; i < hose->nr_resources; i++) {
+               res = hose->resources + i;
+               offset = 0;
+               if (res->flags & IORESOURCE_IO)
+                       offset = hose->io_offset;
+               else if (res->flags & IORESOURCE_MEM)
+                       offset = hose->mem_offset;
+               pci_add_resource_offset(&resources, res, offset);
+       }
  
        bus = pci_scan_root_bus(NULL, next_busno, hose->pci_ops, hose,
                                &resources);
@@@ -143,42 -152,12 +152,12 @@@ static int __init pcibios_init(void
  }
  subsys_initcall(pcibios_init);
  
- static void pcibios_fixup_device_resources(struct pci_dev *dev,
-       struct pci_bus *bus)
- {
-       /* Update device resources.  */
-       struct pci_channel *hose = bus->sysdata;
-       unsigned long offset = 0;
-       int i;
-       for (i = 0; i < PCI_NUM_RESOURCES; i++) {
-               if (!dev->resource[i].start)
-                       continue;
-               if (dev->resource[i].flags & IORESOURCE_IO)
-                       offset = hose->io_offset;
-               else if (dev->resource[i].flags & IORESOURCE_MEM)
-                       offset = hose->mem_offset;
-               dev->resource[i].start += offset;
-               dev->resource[i].end += offset;
-       }
- }
  /*
   *  Called after each bus is probed, but before its children
   *  are examined.
   */
  void __devinit pcibios_fixup_bus(struct pci_bus *bus)
  {
-       struct pci_dev *dev;
-       struct list_head *ln;
-       for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) {
-               dev = pci_dev_b(ln);
-               if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
-                       pcibios_fixup_device_resources(dev, bus);
-       }
  }
  
  /*
@@@ -208,36 -187,6 +187,6 @@@ resource_size_t pcibios_align_resource(
        return start;
  }
  
- void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
-                            struct resource *res)
- {
-       struct pci_channel *hose = dev->sysdata;
-       unsigned long offset = 0;
-       if (res->flags & IORESOURCE_IO)
-               offset = hose->io_offset;
-       else if (res->flags & IORESOURCE_MEM)
-               offset = hose->mem_offset;
-       region->start = res->start - offset;
-       region->end = res->end - offset;
- }
- void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
-                            struct pci_bus_region *region)
- {
-       struct pci_channel *hose = dev->sysdata;
-       unsigned long offset = 0;
-       if (res->flags & IORESOURCE_IO)
-               offset = hose->io_offset;
-       else if (res->flags & IORESOURCE_MEM)
-               offset = hose->mem_offset;
-       res->start = region->start + offset;
-       res->end = region->end + offset;
- }
  int pcibios_enable_device(struct pci_dev *dev, int mask)
  {
        return pci_enable_resources(dev, mask);
@@@ -356,8 -305,8 +305,8 @@@ int pci_mmap_page_range(struct pci_dev 
  
  #ifndef CONFIG_GENERIC_IOMAP
  
 -static void __iomem *ioport_map_pci(struct pci_dev *dev,
 -                                  unsigned long port, unsigned int nr)
 +void __iomem *__pci_ioport_map(struct pci_dev *dev,
 +                             unsigned long port, unsigned int nr)
  {
        struct pci_channel *chan = dev->sysdata;
  
@@@ -381,8 -330,6 +330,6 @@@ EXPORT_SYMBOL(pci_iounmap)
  #endif /* CONFIG_GENERIC_IOMAP */
  
  #ifdef CONFIG_HOTPLUG
- EXPORT_SYMBOL(pcibios_resource_to_bus);
- EXPORT_SYMBOL(pcibios_bus_to_resource);
  EXPORT_SYMBOL(PCIBIOS_MIN_IO);
  EXPORT_SYMBOL(PCIBIOS_MIN_MEM);
  #endif
diff --combined arch/x86/pci/acpi.c
@@@ -60,16 -60,6 +60,16 @@@ static const struct dmi_system_id pci_u
                        DMI_MATCH(DMI_BIOS_VENDOR, "American Megatrends Inc."),
                },
        },
 +      /* https://bugzilla.kernel.org/show_bug.cgi?id=42619 */
 +      {
 +              .callback = set_use_crs,
 +              .ident = "MSI MS-7253",
 +              .matches = {
 +                      DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"),
 +                      DMI_MATCH(DMI_BOARD_NAME, "MS-7253"),
 +                      DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies, LTD"),
 +              },
 +      },
  
        /* Now for the blacklist.. */
  
@@@ -292,6 -282,9 +292,6 @@@ static void add_resources(struct pci_ro
        int i;
        struct resource *res, *root, *conflict;
  
 -      if (!pci_use_crs)
 -              return;
 -
        coalesce_windows(info, IORESOURCE_MEM);
        coalesce_windows(info, IORESOURCE_IO);
  
@@@ -343,13 -336,8 +343,13 @@@ get_current_resources(struct acpi_devic
        acpi_walk_resources(device->handle, METHOD_NAME__CRS, setup_resource,
                                &info);
  
 -      add_resources(&info);
 -      return;
 +      if (pci_use_crs) {
 +              add_resources(&info);
 +
 +              return;
 +      }
 +
 +      kfree(info.name);
  
  name_alloc_fail:
        kfree(info.res);
@@@ -416,7 -404,12 +416,12 @@@ struct pci_bus * __devinit pci_acpi_sca
                kfree(sd);
        } else {
                get_current_resources(device, busnum, domain, &resources);
-               if (list_empty(&resources))
+               /*
+                * _CRS with no apertures is normal, so only fall back to
+                * defaults or native bridge info if we're ignoring _CRS.
+                */
+               if (!pci_use_crs)
                        x86_pci_root_bus_resources(busnum, &resources);
                bus = pci_create_root_bus(NULL, busnum, &pci_root_ops, sd,
                                          &resources);
diff --combined drivers/pci/pci-driver.c
@@@ -72,7 -72,9 +72,7 @@@ int pci_add_dynid(struct pci_driver *dr
        list_add_tail(&dynid->node, &drv->dynids.list);
        spin_unlock(&drv->dynids.lock);
  
 -      get_driver(&drv->driver);
        retval = driver_attach(&drv->driver);
 -      put_driver(&drv->driver);
  
        return retval;
  }
@@@ -188,34 -190,43 +188,34 @@@ store_remove_id(struct device_driver *d
  static DRIVER_ATTR(remove_id, S_IWUSR, NULL, store_remove_id);
  
  static int
 -pci_create_newid_file(struct pci_driver *drv)
 +pci_create_newid_files(struct pci_driver *drv)
  {
        int error = 0;
 -      if (drv->probe != NULL)
 -              error = driver_create_file(&drv->driver, &driver_attr_new_id);
 -      return error;
 -}
 -
 -static void pci_remove_newid_file(struct pci_driver *drv)
 -{
 -      driver_remove_file(&drv->driver, &driver_attr_new_id);
 -}
  
 -static int
 -pci_create_removeid_file(struct pci_driver *drv)
 -{
 -      int error = 0;
 -      if (drv->probe != NULL)
 -              error = driver_create_file(&drv->driver,&driver_attr_remove_id);
 +      if (drv->probe != NULL) {
 +              error = driver_create_file(&drv->driver, &driver_attr_new_id);
 +              if (error == 0) {
 +                      error = driver_create_file(&drv->driver,
 +                                      &driver_attr_remove_id);
 +                      if (error)
 +                              driver_remove_file(&drv->driver,
 +                                              &driver_attr_new_id);
 +              }
 +      }
        return error;
  }
  
 -static void pci_remove_removeid_file(struct pci_driver *drv)
 +static void pci_remove_newid_files(struct pci_driver *drv)
  {
        driver_remove_file(&drv->driver, &driver_attr_remove_id);
 +      driver_remove_file(&drv->driver, &driver_attr_new_id);
  }
  #else /* !CONFIG_HOTPLUG */
 -static inline int pci_create_newid_file(struct pci_driver *drv)
 +static inline int pci_create_newid_files(struct pci_driver *drv)
  {
        return 0;
  }
 -static inline void pci_remove_newid_file(struct pci_driver *drv) {}
 -static inline int pci_create_removeid_file(struct pci_driver *drv)
 -{
 -      return 0;
 -}
 -static inline void pci_remove_removeid_file(struct pci_driver *drv) {}
 +static inline void pci_remove_newid_files(struct pci_driver *drv) {}
  #endif
  
  /**
@@@ -419,6 -430,16 +419,16 @@@ static void pci_device_shutdown(struct 
                drv->shutdown(pci_dev);
        pci_msi_shutdown(pci_dev);
        pci_msix_shutdown(pci_dev);
+       /*
+        * Devices may be enabled to wake up by runtime PM, but they need not
+        * be supposed to wake up the system from its "power off" state (e.g.
+        * ACPI S5).  Therefore disable wakeup for all devices that aren't
+        * supposed to wake up the system at this point.  The state argument
+        * will be ignored by pci_enable_wake().
+        */
+       if (!device_may_wakeup(dev))
+               pci_enable_wake(pci_dev, PCI_UNKNOWN, false);
  }
  
  #ifdef CONFIG_PM
@@@ -1127,12 -1148,18 +1137,12 @@@ int __pci_register_driver(struct pci_dr
        if (error)
                goto out;
  
 -      error = pci_create_newid_file(drv);
 +      error = pci_create_newid_files(drv);
        if (error)
                goto out_newid;
 -
 -      error = pci_create_removeid_file(drv);
 -      if (error)
 -              goto out_removeid;
  out:
        return error;
  
 -out_removeid:
 -      pci_remove_newid_file(drv);
  out_newid:
        driver_unregister(&drv->driver);
        goto out;
  void
  pci_unregister_driver(struct pci_driver *drv)
  {
 -      pci_remove_removeid_file(drv);
 -      pci_remove_newid_file(drv);
 +      pci_remove_newid_files(drv);
        driver_unregister(&drv->driver);
        pci_free_dynids(drv);
  }
diff --combined drivers/pci/pcie/aspm.c
@@@ -76,7 -76,15 +76,15 @@@ static LIST_HEAD(link_list)
  #define POLICY_DEFAULT 0      /* BIOS default setting */
  #define POLICY_PERFORMANCE 1  /* high performance */
  #define POLICY_POWERSAVE 2    /* high power saving */
+ #ifdef CONFIG_PCIEASPM_PERFORMANCE
+ static int aspm_policy = POLICY_PERFORMANCE;
+ #elif defined CONFIG_PCIEASPM_POWERSAVE
+ static int aspm_policy = POLICY_POWERSAVE;
+ #else
  static int aspm_policy;
+ #endif
  static const char *policy_str[] = {
        [POLICY_DEFAULT] = "default",
        [POLICY_PERFORMANCE] = "performance",
@@@ -500,9 -508,6 +508,9 @@@ static int pcie_aspm_sanity_check(struc
        int pos;
        u32 reg32;
  
 +      if (aspm_disabled)
 +              return 0;
 +
        /*
         * Some functions in a slot might not all be PCIe functions,
         * very strange. Disable ASPM for the whole slot
diff --combined drivers/pci/quirks.c
  #include <linux/dmi.h>
  #include <linux/pci-aspm.h>
  #include <linux/ioport.h>
+ #include <linux/sched.h>
+ #include <linux/ktime.h>
  #include <asm/dma.h>  /* isa_dma_bridge_buggy */
  #include "pci.h"
  
- /*
-  * This quirk function disables memory decoding and releases memory resources
-  * of the device specified by kernel's boot parameter 'pci=resource_alignment='.
-  * It also rounds up size to specified alignment.
-  * Later on, the kernel will assign page-aligned memory resource back
-  * to the device.
-  */
- static void __devinit quirk_resource_alignment(struct pci_dev *dev)
- {
-       int i;
-       struct resource *r;
-       resource_size_t align, size;
-       u16 command;
-       if (!pci_is_reassigndev(dev))
-               return;
-       if (dev->hdr_type == PCI_HEADER_TYPE_NORMAL &&
-           (dev->class >> 8) == PCI_CLASS_BRIDGE_HOST) {
-               dev_warn(&dev->dev,
-                       "Can't reassign resources to host bridge.\n");
-               return;
-       }
-       dev_info(&dev->dev,
-               "Disabling memory decoding and releasing memory resources.\n");
-       pci_read_config_word(dev, PCI_COMMAND, &command);
-       command &= ~PCI_COMMAND_MEMORY;
-       pci_write_config_word(dev, PCI_COMMAND, command);
-       align = pci_specified_resource_alignment(dev);
-       for (i=0; i < PCI_BRIDGE_RESOURCES; i++) {
-               r = &dev->resource[i];
-               if (!(r->flags & IORESOURCE_MEM))
-                       continue;
-               size = resource_size(r);
-               if (size < align) {
-                       size = align;
-                       dev_info(&dev->dev,
-                               "Rounding up size of resource #%d to %#llx.\n",
-                               i, (unsigned long long)size);
-               }
-               r->end = size - 1;
-               r->start = 0;
-       }
-       /* Need to disable bridge's resource window,
-        * to enable the kernel to reassign new resource
-        * window later on.
-        */
-       if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE &&
-           (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
-               for (i = PCI_BRIDGE_RESOURCES; i < PCI_NUM_RESOURCES; i++) {
-                       r = &dev->resource[i];
-                       if (!(r->flags & IORESOURCE_MEM))
-                               continue;
-                       r->end = resource_size(r) - 1;
-                       r->start = 0;
-               }
-               pci_disable_bridge_window(dev);
-       }
- }
- DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_resource_alignment);
  /*
   * Decoding should be disabled for a PCI device during BAR sizing to avoid
   * conflict. But doing so may cause problems on host bridge and perhaps other
   */
  static void __devinit quirk_mmio_always_on(struct pci_dev *dev)
  {
-       if ((dev->class >> 8) == PCI_CLASS_BRIDGE_HOST)
-               dev->mmio_always_on = 1;
+       dev->mmio_always_on = 1;
  }
- DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, quirk_mmio_always_on);
+ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID,
+                               PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on);
  
  /* The Mellanox Tavor device gives false positive parity errors
   * Mark this device with a broken_parity_status, to allow
@@@ -1002,12 -941,12 +941,12 @@@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_
   */
  static void quirk_cardbus_legacy(struct pci_dev *dev)
  {
-       if ((PCI_CLASS_BRIDGE_CARDBUS << 8) ^ dev->class)
-               return;
        pci_write_config_dword(dev, PCI_CB_LEGACY_MODE_BASE, 0);
  }
- DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy);
- DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_ANY_ID, PCI_ANY_ID, quirk_cardbus_legacy);
+ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
+                       PCI_CLASS_BRIDGE_CARDBUS, 8, quirk_cardbus_legacy);
+ DECLARE_PCI_FIXUP_CLASS_RESUME_EARLY(PCI_ANY_ID, PCI_ANY_ID,
+                       PCI_CLASS_BRIDGE_CARDBUS, 8, quirk_cardbus_legacy);
  
  /*
   * Following the PCI ordering rules is optional on the AMD762. I'm not
@@@ -1164,17 -1103,20 +1103,20 @@@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_I
  
  static void __devinit quirk_no_ata_d3(struct pci_dev *pdev)
  {
-       /* Quirk the legacy ATA devices only. The AHCI ones are ok */
-       if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE)
-               pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
+       pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
  }
- DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_ANY_ID, quirk_no_ata_d3);
- DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_ATI, PCI_ANY_ID, quirk_no_ata_d3);
+ /* Quirk the legacy ATA devices only. The AHCI ones are ok */
+ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_SERVERWORKS, PCI_ANY_ID,
+                               PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
+ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_ATI, PCI_ANY_ID,
+                               PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
  /* ALi loses some register settings that we cannot then restore */
- DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_AL, PCI_ANY_ID, quirk_no_ata_d3);
+ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_AL, PCI_ANY_ID,
+                               PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
  /* VIA comes back fine but we need to keep it alive or ACPI GTM failures
     occur when mode detecting */
- DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_VIA, PCI_ANY_ID, quirk_no_ata_d3);
+ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_VIA, PCI_ANY_ID,
+                               PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
  
  /* This was originally an Alpha specific thing, but it really fits here.
   * The i82375 PCI/EISA bridge appears as non-classified. Fix that.
@@@ -1873,8 -1815,7 +1815,7 @@@ static void __devinit quirk_netmos(stru
        case PCI_DEVICE_ID_NETMOS_9745:
        case PCI_DEVICE_ID_NETMOS_9845:
        case PCI_DEVICE_ID_NETMOS_9855:
-               if ((dev->class >> 8) == PCI_CLASS_COMMUNICATION_SERIAL &&
-                   num_parallel) {
+               if (num_parallel) {
                        dev_info(&dev->dev, "Netmos %04x (%u parallel, "
                                "%u serial); changing class SERIAL to OTHER "
                                "(use parport_serial)\n",
                }
        }
  }
- DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID, quirk_netmos);
+ DECLARE_PCI_FIXUP_CLASS_HEADER(PCI_VENDOR_ID_NETMOS, PCI_ANY_ID,
+                        PCI_CLASS_COMMUNICATION_SERIAL, 8, quirk_netmos);
  
  static void __devinit quirk_e100_interrupt(struct pci_dev *dev)
  {
  
        iounmap(csr);
  }
- DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_e100_interrupt);
+ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID,
+                       PCI_CLASS_NETWORK_ETHERNET, 8, quirk_e100_interrupt);
  
  /*
   * The 82575 and 82598 may experience data corruption issues when transitioning
@@@ -2161,24 -2104,6 +2104,24 @@@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_B
                        PCI_DEVICE_ID_NX2_5709S,
                        quirk_brcm_570x_limit_vpd);
  
 +static void __devinit quirk_brcm_5719_limit_mrrs(struct pci_dev *dev)
 +{
 +      u32 rev;
 +
 +      pci_read_config_dword(dev, 0xf4, &rev);
 +
 +      /* Only CAP the MRRS if the device is a 5719 A0 */
 +      if (rev == 0x05719000) {
 +              int readrq = pcie_get_readrq(dev);
 +              if (readrq > 2048)
 +                      pcie_set_readrq(dev, 2048);
 +      }
 +}
 +
 +DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_BROADCOM,
 +                       PCI_DEVICE_ID_TIGON3_5719,
 +                       quirk_brcm_5719_limit_mrrs);
 +
  /* Originally in EDAC sources for i82875P:
   * Intel tells BIOS developers to hide device 6 which
   * configures the overflow device access containing
@@@ -2834,12 -2759,11 +2777,11 @@@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_I
  static void __devinit fixup_ti816x_class(struct pci_dev* dev)
  {
        /* TI 816x devices do not have class code set when in PCIe boot mode */
-       if (dev->class == PCI_CLASS_NOT_DEFINED) {
-               dev_info(&dev->dev, "Setting PCI class for 816x PCIe device\n");
-               dev->class = PCI_CLASS_MULTIMEDIA_VIDEO;
-       }
+       dev_info(&dev->dev, "Setting PCI class for 816x PCIe device\n");
+       dev->class = PCI_CLASS_MULTIMEDIA_VIDEO;
  }
- DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_TI, 0xb800, fixup_ti816x_class);
+ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_TI, 0xb800,
+                                PCI_CLASS_NOT_DEFINED, 0, fixup_ti816x_class);
  
  /* Some PCIe devices do not work reliably with the claimed maximum
   * payload size supported.
@@@ -2924,17 -2848,73 +2866,73 @@@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
  
+ static void do_one_fixup_debug(void (*fn)(struct pci_dev *dev), struct pci_dev *dev)
+ {
+       ktime_t calltime, delta, rettime;
+       unsigned long long duration;
+       printk(KERN_DEBUG "calling  %pF @ %i for %s\n",
+                       fn, task_pid_nr(current), dev_name(&dev->dev));
+       calltime = ktime_get();
+       fn(dev);
+       rettime = ktime_get();
+       delta = ktime_sub(rettime, calltime);
+       duration = (unsigned long long) ktime_to_ns(delta) >> 10;
+       printk(KERN_DEBUG "pci fixup %pF returned after %lld usecs for %s\n",
+                       fn, duration, dev_name(&dev->dev));
+ }
+ /*
+  * Some BIOS implementations leave the Intel GPU interrupts enabled,
+  * even though no one is handling them (f.e. i915 driver is never loaded).
+  * Additionally the interrupt destination is not set up properly
+  * and the interrupt ends up -somewhere-.
+  *
+  * These spurious interrupts are "sticky" and the kernel disables
+  * the (shared) interrupt line after 100.000+ generated interrupts.
+  *
+  * Fix it by disabling the still enabled interrupts.
+  * This resolves crashes often seen on monitor unplug.
+  */
+ #define I915_DEIER_REG 0x4400c
+ static void __devinit disable_igfx_irq(struct pci_dev *dev)
+ {
+       void __iomem *regs = pci_iomap(dev, 0, 0);
+       if (regs == NULL) {
+               dev_warn(&dev->dev, "igfx quirk: Can't iomap PCI device\n");
+               return;
+       }
+       /* Check if any interrupt line is still enabled */
+       if (readl(regs + I915_DEIER_REG) != 0) {
+               dev_warn(&dev->dev, "BIOS left Intel GPU interrupts enabled; "
+                       "disabling\n");
+               writel(0, regs + I915_DEIER_REG);
+       }
+       pci_iounmap(dev, regs);
+ }
+ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq);
+ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
  static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f,
                          struct pci_fixup *end)
  {
-       while (f < end) {
-               if ((f->vendor == dev->vendor || f->vendor == (u16) PCI_ANY_ID) &&
-                   (f->device == dev->device || f->device == (u16) PCI_ANY_ID)) {
+       for (; f < end; f++)
+               if ((f->class == (u32) (dev->class >> f->class_shift) ||
+                    f->class == (u32) PCI_ANY_ID) &&
+                   (f->vendor == dev->vendor ||
+                    f->vendor == (u16) PCI_ANY_ID) &&
+                   (f->device == dev->device ||
+                    f->device == (u16) PCI_ANY_ID)) {
                        dev_dbg(&dev->dev, "calling %pF\n", f->hook);
-                       f->hook(dev);
+                       if (initcall_debug)
+                               do_one_fixup_debug(f->hook, dev);
+                       else
+                               f->hook(dev);
                }
-               f++;
-       }
  }
  
  extern struct pci_fixup __start_pci_fixups_early[];
@@@ -189,7 -189,7 +189,7 @@@ static int pcifront_bus_read(struct pci
  
        if (verbose_request)
                dev_info(&pdev->xdev->dev,
 -                       "read dev=%04x:%02x:%02x.%01x - offset %x size %d\n",
 +                       "read dev=%04x:%02x:%02x.%d - offset %x size %d\n",
                         pci_domain_nr(bus), bus->number, PCI_SLOT(devfn),
                         PCI_FUNC(devfn), where, size);
  
@@@ -228,7 -228,7 +228,7 @@@ static int pcifront_bus_write(struct pc
  
        if (verbose_request)
                dev_info(&pdev->xdev->dev,
 -                       "write dev=%04x:%02x:%02x.%01x - "
 +                       "write dev=%04x:%02x:%02x.%d - "
                         "offset %x size %d val %x\n",
                         pci_domain_nr(bus), bus->number,
                         PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val);
@@@ -432,7 -432,7 +432,7 @@@ static int __devinit pcifront_scan_bus(
                d = pci_scan_single_device(b, devfn);
                if (d)
                        dev_info(&pdev->xdev->dev, "New device on "
 -                               "%04x:%02x:%02x.%02x found.\n", domain, bus,
 +                               "%04x:%02x:%02x.%d found.\n", domain, bus,
                                 PCI_SLOT(devfn), PCI_FUNC(devfn));
        }
  
@@@ -544,7 -544,7 +544,7 @@@ static void free_root_bus_devs(struct p
                dev = container_of(bus->devices.next, struct pci_dev,
                                   bus_list);
                dev_dbg(&dev->dev, "removing device\n");
-               pci_remove_bus_device(dev);
+               pci_stop_and_remove_bus_device(dev);
        }
  }
  
@@@ -593,7 -593,7 +593,7 @@@ static pci_ers_result_t pcifront_common
        }
        pdrv = pcidev->driver;
  
 -      if (get_driver(&pdrv->driver)) {
 +      if (pdrv) {
                if (pdrv->err_handler && pdrv->err_handler->error_detected) {
                        dev_dbg(&pcidev->dev,
                                "trying to call AER service\n");
                                }
                        }
                }
 -              put_driver(&pdrv->driver);
        }
        if (!flag)
                result = PCI_ERS_RESULT_NONE;
@@@ -1040,15 -1041,15 +1040,15 @@@ static int pcifront_detach_devices(stru
                pci_dev = pci_get_slot(pci_bus, PCI_DEVFN(slot, func));
                if (!pci_dev) {
                        dev_dbg(&pdev->xdev->dev,
 -                              "Cannot get PCI device %04x:%02x:%02x.%02x\n",
 +                              "Cannot get PCI device %04x:%02x:%02x.%d\n",
                                domain, bus, slot, func);
                        continue;
                }
-               pci_remove_bus_device(pci_dev);
+               pci_stop_and_remove_bus_device(pci_dev);
                pci_dev_put(pci_dev);
  
                dev_dbg(&pdev->xdev->dev,
 -                      "PCI device %04x:%02x:%02x.%02x removed.\n",
 +                      "PCI device %04x:%02x:%02x.%d removed.\n",
                        domain, bus, slot, func);
        }
  
@@@ -132,7 -132,7 +132,7 @@@ static int mpt2sas_remove_dead_ioc_func
                pdev = ioc->pdev;
                if ((pdev == NULL))
                        return -1;
-               pci_remove_bus_device(pdev);
+               pci_stop_and_remove_bus_device(pdev);
                return 0;
  }
  
@@@ -2575,11 -2575,6 +2575,11 @@@ _base_allocate_memory_pools(struct MPT2
  
        ioc->chain_lookup = (struct chain_tracker *)__get_free_pages(
            GFP_KERNEL, ioc->chain_pages);
 +      if (!ioc->chain_lookup) {
 +              printk(MPT2SAS_ERR_FMT "chain_lookup: get_free_pages failed, "
 +                  "sz(%d)\n", ioc->name, (int)sz);
 +              goto out;
 +      }
        ioc->chain_dma_pool = pci_pool_create("chain pool", ioc->pdev,
            ioc->request_sz, 16, 0);
        if (!ioc->chain_dma_pool) {
@@@ -4553,7 -4548,7 +4553,7 @@@ mpt2sas_base_hard_reset_handler(struct 
                printk(MPT2SAS_ERR_FMT "%s: pci error recovery reset\n",
                    ioc->name, __func__);
                r = 0;
 -              goto out;
 +              goto out_unlocked;
        }
  
        if (mpt2sas_fwfault_debug)
        spin_unlock_irqrestore(&ioc->ioc_reset_in_progress_lock, flags);
        mutex_unlock(&ioc->reset_in_progress_mutex);
  
 + out_unlocked:
        dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: exit\n", ioc->name,
            __func__));
        return r;
@@@ -867,22 -867,6 +867,22 @@@ hc_init
  
  static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
  {
 +      /* Skip Netlogic mips SoC's internal PCI USB controller.
 +       * This device does not need/support EHCI/OHCI handoff
 +       */
 +      if (pdev->vendor == 0x184e)     /* vendor Netlogic */
 +              return;
 +      if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI &&
 +                      pdev->class != PCI_CLASS_SERIAL_USB_OHCI &&
 +                      pdev->class != PCI_CLASS_SERIAL_USB_EHCI &&
 +                      pdev->class != PCI_CLASS_SERIAL_USB_XHCI)
 +              return;
 +
 +      if (pci_enable_device(pdev) < 0) {
 +              dev_warn(&pdev->dev, "Can't enable PCI device, "
 +                              "BIOS handoff failed.\n");
 +              return;
 +      }
        if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI)
                quirk_usb_handoff_uhci(pdev);
        else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI)
                quirk_usb_disable_ehci(pdev);
        else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI)
                quirk_usb_handoff_xhci(pdev);
 +      pci_disable_device(pdev);
  }
- DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff);
+ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
+                       PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff);
diff --combined include/linux/pci.h
@@@ -299,7 -299,6 +299,6 @@@ struct pci_dev 
         */
        unsigned int    irq;
        struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
-       resource_size_t fw_addr[DEVICE_COUNT_RESOURCE]; /* FW-assigned addr */
  
        /* These fields are used by common fixups */
        unsigned int    transparent:1;  /* Transparent PCI bridge */
@@@ -369,24 -368,17 +368,17 @@@ static inline int pci_channel_offline(s
        return (pdev->error_state != pci_channel_io_normal);
  }
  
- static inline struct pci_cap_saved_state *pci_find_saved_cap(
-       struct pci_dev *pci_dev, char cap)
- {
-       struct pci_cap_saved_state *tmp;
-       struct hlist_node *pos;
-       hlist_for_each_entry(tmp, pos, &pci_dev->saved_cap_space, next) {
-               if (tmp->cap.cap_nr == cap)
-                       return tmp;
-       }
-       return NULL;
- }
+ struct pci_host_bridge_window {
+       struct list_head list;
+       struct resource *res;           /* host bridge aperture (CPU address) */
+       resource_size_t offset;         /* bus address + offset = CPU address */
+ };
  
- static inline void pci_add_saved_cap(struct pci_dev *pci_dev,
-       struct pci_cap_saved_state *new_cap)
- {
-       hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
- }
+ struct pci_host_bridge {
+       struct list_head list;
+       struct pci_bus *bus;            /* root bus */
+       struct list_head windows;       /* pci_host_bridge_windows */
+ };
  
  /*
   * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
@@@ -656,6 -648,10 +648,10 @@@ void pci_fixup_cardbus(struct pci_bus *
  
  /* Generic PCI functions used internally */
  
+ void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
+                            struct resource *res);
+ void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
+                            struct pci_bus_region *region);
  void pcibios_scan_specific_bus(int busn);
  extern struct pci_bus *pci_find_bus(int domain, int busnr);
  void pci_bus_add_devices(const struct pci_bus *bus);
@@@ -690,7 -686,8 +686,8 @@@ u8 pci_common_swizzle(struct pci_dev *d
  extern struct pci_dev *pci_dev_get(struct pci_dev *dev);
  extern void pci_dev_put(struct pci_dev *dev);
  extern void pci_remove_bus(struct pci_bus *b);
- extern void pci_remove_bus_device(struct pci_dev *dev);
+ extern void __pci_remove_bus_device(struct pci_dev *dev);
+ extern void pci_stop_and_remove_bus_device(struct pci_dev *dev);
  extern void pci_stop_bus_device(struct pci_dev *dev);
  void pci_setup_cardbus(struct pci_bus *bus);
  extern void pci_sort_breadthfirst(void);
@@@ -746,28 -743,28 +743,28 @@@ int pci_bus_write_config_dword(struct p
                               int where, u32 val);
  struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops);
  
 -static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val)
 +static inline int pci_read_config_byte(const struct pci_dev *dev, int where, u8 *val)
  {
        return pci_bus_read_config_byte(dev->bus, dev->devfn, where, val);
  }
 -static inline int pci_read_config_word(struct pci_dev *dev, int where, u16 *val)
 +static inline int pci_read_config_word(const struct pci_dev *dev, int where, u16 *val)
  {
        return pci_bus_read_config_word(dev->bus, dev->devfn, where, val);
  }
 -static inline int pci_read_config_dword(struct pci_dev *dev, int where,
 +static inline int pci_read_config_dword(const struct pci_dev *dev, int where,
                                        u32 *val)
  {
        return pci_bus_read_config_dword(dev->bus, dev->devfn, where, val);
  }
 -static inline int pci_write_config_byte(struct pci_dev *dev, int where, u8 val)
 +static inline int pci_write_config_byte(const struct pci_dev *dev, int where, u8 val)
  {
        return pci_bus_write_config_byte(dev->bus, dev->devfn, where, val);
  }
 -static inline int pci_write_config_word(struct pci_dev *dev, int where, u16 val)
 +static inline int pci_write_config_word(const struct pci_dev *dev, int where, u16 val)
  {
        return pci_bus_write_config_word(dev->bus, dev->devfn, where, val);
  }
 -static inline int pci_write_config_dword(struct pci_dev *dev, int where,
 +static inline int pci_write_config_dword(const struct pci_dev *dev, int where,
                                         u32 val)
  {
        return pci_bus_write_config_dword(dev->bus, dev->devfn, where, val);
@@@ -883,6 -880,7 +880,7 @@@ void set_pcie_hotplug_bridge(struct pci
  /* Functions for PCI Hotplug drivers to use */
  int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap);
  #ifdef CONFIG_HOTPLUG
+ unsigned int pci_rescan_bus_bridge_resize(struct pci_dev *bridge);
  unsigned int pci_rescan_bus(struct pci_bus *bus);
  #endif
  
@@@ -892,13 -890,13 +890,13 @@@ ssize_t pci_write_vpd(struct pci_dev *d
  int pci_vpd_truncate(struct pci_dev *dev, size_t size);
  
  /* Helper functions for low-level code (drivers/pci/setup-[bus,res].c) */
+ resource_size_t pcibios_retrieve_fw_addr(struct pci_dev *dev, int idx);
  void pci_bus_assign_resources(const struct pci_bus *bus);
  void pci_bus_size_bridges(struct pci_bus *bus);
  int pci_claim_resource(struct pci_dev *, int);
  void pci_assign_unassigned_resources(void);
  void pci_assign_unassigned_bridge_resources(struct pci_dev *bridge);
  void pdev_enable_device(struct pci_dev *);
- void pdev_sort_resources(struct pci_dev *, struct resource_list *);
  int pci_enable_resources(struct pci_dev *, int mask);
  void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *),
                    int (*)(const struct pci_dev *, u8, u8));
@@@ -915,6 -913,8 +913,8 @@@ void pci_release_selected_regions(struc
  
  /* drivers/pci/bus.c */
  void pci_add_resource(struct list_head *resources, struct resource *res);
+ void pci_add_resource_offset(struct list_head *resources, struct resource *res,
+                            resource_size_t offset);
  void pci_free_resource_list(struct list_head *resources);
  void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, unsigned int flags);
  struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n);
@@@ -947,20 -947,7 +947,20 @@@ int __must_check __pci_register_driver(
        __pci_register_driver(driver, THIS_MODULE, KBUILD_MODNAME)
  
  void pci_unregister_driver(struct pci_driver *dev);
- void pci_remove_behind_bridge(struct pci_dev *dev);
 +
 +/**
 + * module_pci_driver() - Helper macro for registering a PCI driver
 + * @__pci_driver: pci_driver struct
 + *
 + * Helper macro for PCI drivers which do not do anything special in module
 + * init/exit. This eliminates a lot of boilerplate. Each module may only
 + * use this macro once, and calling it replaces module_init() and module_exit()
 + */
 +#define module_pci_driver(__pci_driver) \
 +      module_driver(__pci_driver, pci_register_driver, \
 +                     pci_unregister_driver)
 +
+ void pci_stop_and_remove_behind_bridge(struct pci_dev *dev);
  struct pci_driver *pci_dev_driver(const struct pci_dev *dev);
  int pci_add_dynid(struct pci_driver *drv,
                  unsigned int vendor, unsigned int device,
@@@ -1396,7 -1383,10 +1396,10 @@@ static inline void pci_resource_to_user
   */
  
  struct pci_fixup {
-       u16 vendor, device;     /* You can use PCI_ANY_ID here of course */
+       u16 vendor;             /* You can use PCI_ANY_ID here of course */
+       u16 device;             /* You can use PCI_ANY_ID here of course */
+       u32 class;              /* You can use PCI_ANY_ID here too */
+       unsigned int class_shift;       /* should be 0, 8, 16 */
        void (*hook)(struct pci_dev *dev);
  };
  
@@@ -1411,30 -1401,68 +1414,68 @@@ enum pci_fixup_pass 
  };
  
  /* Anonymous variables would be nice... */
- #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, hook)        \
-       static const struct pci_fixup __pci_fixup_##name __used         \
-       __attribute__((__section__(#section))) = { vendor, device, hook };
+ #define DECLARE_PCI_FIXUP_SECTION(section, name, vendor, device, class,       \
+                                 class_shift, hook)                    \
+       static const struct pci_fixup const __pci_fixup_##name __used   \
+       __attribute__((__section__(#section), aligned((sizeof(void *)))))    \
+               = { vendor, device, class, class_shift, hook };
+ #define DECLARE_PCI_FIXUP_CLASS_EARLY(vendor, device, class,          \
+                                        class_shift, hook)             \
+       DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early,                     \
+               vendor##device##hook, vendor, device, class, class_shift, hook)
+ #define DECLARE_PCI_FIXUP_CLASS_HEADER(vendor, device, class,         \
+                                        class_shift, hook)             \
+       DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header,                    \
+               vendor##device##hook, vendor, device, class, class_shift, hook)
+ #define DECLARE_PCI_FIXUP_CLASS_FINAL(vendor, device, class,          \
+                                        class_shift, hook)             \
+       DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final,                     \
+               vendor##device##hook, vendor, device, class, class_shift, hook)
+ #define DECLARE_PCI_FIXUP_CLASS_ENABLE(vendor, device, class,         \
+                                        class_shift, hook)             \
+       DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable,                    \
+               vendor##device##hook, vendor, device, class, class_shift, hook)
+ #define DECLARE_PCI_FIXUP_CLASS_RESUME(vendor, device, class,         \
+                                        class_shift, hook)             \
+       DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume,                    \
+               resume##vendor##device##hook, vendor, device, class,    \
+               class_shift, hook)
+ #define DECLARE_PCI_FIXUP_CLASS_RESUME_EARLY(vendor, device, class,   \
+                                        class_shift, hook)             \
+       DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume_early,              \
+               resume_early##vendor##device##hook, vendor, device,     \
+               class, class_shift, hook)
+ #define DECLARE_PCI_FIXUP_CLASS_SUSPEND(vendor, device, class,                \
+                                        class_shift, hook)             \
+       DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend,                   \
+               suspend##vendor##device##hook, vendor, device, class,   \
+               class_shift, hook)
  #define DECLARE_PCI_FIXUP_EARLY(vendor, device, hook)                 \
        DECLARE_PCI_FIXUP_SECTION(.pci_fixup_early,                     \
-                       vendor##device##hook, vendor, device, hook)
+               vendor##device##hook, vendor, device, PCI_ANY_ID, 0, hook)
  #define DECLARE_PCI_FIXUP_HEADER(vendor, device, hook)                        \
        DECLARE_PCI_FIXUP_SECTION(.pci_fixup_header,                    \
-                       vendor##device##hook, vendor, device, hook)
+               vendor##device##hook, vendor, device, PCI_ANY_ID, 0, hook)
  #define DECLARE_PCI_FIXUP_FINAL(vendor, device, hook)                 \
        DECLARE_PCI_FIXUP_SECTION(.pci_fixup_final,                     \
-                       vendor##device##hook, vendor, device, hook)
+               vendor##device##hook, vendor, device, PCI_ANY_ID, 0, hook)
  #define DECLARE_PCI_FIXUP_ENABLE(vendor, device, hook)                        \
        DECLARE_PCI_FIXUP_SECTION(.pci_fixup_enable,                    \
-                       vendor##device##hook, vendor, device, hook)
+               vendor##device##hook, vendor, device, PCI_ANY_ID, 0, hook)
  #define DECLARE_PCI_FIXUP_RESUME(vendor, device, hook)                        \
        DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume,                    \
-                       resume##vendor##device##hook, vendor, device, hook)
+               resume##vendor##device##hook, vendor, device,           \
+               PCI_ANY_ID, 0, hook)
  #define DECLARE_PCI_FIXUP_RESUME_EARLY(vendor, device, hook)          \
        DECLARE_PCI_FIXUP_SECTION(.pci_fixup_resume_early,              \
-                       resume_early##vendor##device##hook, vendor, device, hook)
+               resume_early##vendor##device##hook, vendor, device,     \
+               PCI_ANY_ID, 0, hook)
  #define DECLARE_PCI_FIXUP_SUSPEND(vendor, device, hook)                       \
        DECLARE_PCI_FIXUP_SECTION(.pci_fixup_suspend,                   \
-                       suspend##vendor##device##hook, vendor, device, hook)
+               suspend##vendor##device##hook, vendor, device,          \
+               PCI_ANY_ID, 0, hook)
  
  #ifdef CONFIG_PCI_QUIRKS
  void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
@@@ -1661,13 -1689,6 +1702,13 @@@ static inline void pci_set_bus_of_node(
  static inline void pci_release_bus_of_node(struct pci_bus *bus) { }
  #endif  /* CONFIG_OF */
  
 +#ifdef CONFIG_EEH
 +static inline struct eeh_dev *pci_dev_to_eeh_dev(struct pci_dev *pdev)
 +{
 +      return pdev->dev.archdata.edev;
 +}
 +#endif
 +
  /**
   * pci_find_upstream_pcie_bridge - find upstream PCIe-to-PCI bridge of a device
   * @pdev: the PCI device