1. 05 5月, 2016 1 次提交
  2. 17 10月, 2015 2 次提交
  3. 18 6月, 2015 1 次提交
  4. 10 6月, 2015 1 次提交
    • B
      x86/PCI: Use host bridge _CRS info on Foxconn K8M890-8237A · 1dace011
      Bjorn Helgaas 提交于
      The Foxconn K8M890-8237A has two PCI host bridges, and we can't assign
      resources correctly without the information from _CRS that tells us which
      address ranges are claimed by which bridge.  In the bugs mentioned below,
      we incorrectly assign a sound card address (this example is from 1033299):
      
        bus: 00 index 2 [mem 0x80000000-0xfcffffffff]
        ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-7f])
        pci_root PNP0A08:00: host bridge window [mem 0x80000000-0xbfefffff] (ignored)
        pci_root PNP0A08:00: host bridge window [mem 0xc0000000-0xdfffffff] (ignored)
        pci_root PNP0A08:00: host bridge window [mem 0xf0000000-0xfebfffff] (ignored)
        ACPI: PCI Root Bridge [PCI1] (domain 0000 [bus 80-ff])
        pci_root PNP0A08:01: host bridge window [mem 0xbff00000-0xbfffffff] (ignored)
        pci 0000:80:01.0: [1106:3288] type 0 class 0x000403
        pci 0000:80:01.0: reg 10: [mem 0xbfffc000-0xbfffffff 64bit]
        pci 0000:80:01.0: address space collision: [mem 0xbfffc000-0xbfffffff 64bit] conflicts with PCI Bus #00 [mem 0x80000000-0xfcffffffff]
        pci 0000:80:01.0: BAR 0: assigned [mem 0xfd00000000-0xfd00003fff 64bit]
        BUG: unable to handle kernel paging request at ffffc90000378000
        IP: [<ffffffffa0345f63>] azx_create+0x37c/0x822 [snd_hda_intel]
      
      We assigned 0xfd_0000_0000, but that is not in any of the host bridge
      windows, and the sound card doesn't work.
      
      Turn on pci=use_crs automatically for this system.
      
      Link: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/931368
      Link: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1033299Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: stable@vger.kernel.org
      1dace011
  5. 28 5月, 2015 1 次提交
    • R
      PCI / ACPI: Do not set ACPI companions for host bridges with parents · dc4fdaf0
      Rafael J. Wysocki 提交于
      Commit 97badf87 (device property: Make it possible to use
      secondary firmware nodes) uncovered a bug in the x86 (and ia64) PCI
      host bridge initialization code that assumes bridge->bus->sysdata
      to always point to a struct pci_sysdata object which need not be
      the case (in particular, the Xen PCI frontend driver sets it to point
      to a different data type).  If it is not the case, an incorrect
      pointer (or a piece of data that is not a pointer at all) will be
      passed to ACPI_COMPANION_SET() and that may cause interesting
      breakage to happen going forward.
      
      To work around this problem use the observation that the ACPI
      host bridge initialization always passes NULL as parent to
      pci_create_root_bus(), so if pcibios_root_bridge_prepare() sees
      a non-NULL parent of the bridge, it should not attempt to set
      an ACPI companion for it, because that means that
      pci_create_root_bus() has been called by someone else.
      
      Fixes: 97badf87 (device property: Make it possible to use secondary firmware nodes)
      Reported-and-tested-by: NSander Eikelenboom <linux@eikelenboom.it>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      dc4fdaf0
  6. 01 5月, 2015 1 次提交
    • J
      x86/PCI/ACPI: Make all resources except [io 0xcf8-0xcff] available on PCI bus · 2c62e849
      Jiang Liu 提交于
      An IO port or MMIO resource assigned to a PCI host bridge may be
      consumed by the host bridge itself or available to its child
      bus/devices. The ACPI specification defines a bit (Producer/Consumer)
      to tell whether the resource is consumed by the host bridge itself,
      but firmware hasn't used that bit consistently, so we can't rely on it.
      
      Before commit 593669c2 ("x86/PCI/ACPI: Use common ACPI resource
      interfaces to simplify implementation"), arch/x86/pci/acpi.c ignored
      all IO port resources defined by acpi_resource_io and
      acpi_resource_fixed_io to filter out IO ports consumed by the host
      bridge itself.
      
      Commit 593669c2 ("x86/PCI/ACPI: Use common ACPI resource interfaces
      to simplify implementation") started accepting all IO port and MMIO
      resources, which caused a regression that IO port resources consumed
      by the host bridge itself became available to its child devices.
      
      Then commit 63f1789e ("x86/PCI/ACPI: Ignore resources consumed by
      host bridge itself") ignored resources consumed by the host bridge
      itself by checking the IORESOURCE_WINDOW flag, which accidently removed
      MMIO resources defined by acpi_resource_memory24, acpi_resource_memory32
      and acpi_resource_fixed_memory32.
      
      On x86 and IA64 platforms, all IO port and MMIO resources are assumed
      to be available to child bus/devices except one special case:
          IO port [0xCF8-0xCFF] is consumed by the host bridge itself
          to access PCI configuration space.
      
      So explicitly filter out PCI CFG IO ports[0xCF8-0xCFF]. This solution
      will also ease the way to consolidate ACPI PCI host bridge common code
      from x86, ia64 and ARM64.
      
      Related ACPI table are archived at:
      https://bugzilla.kernel.org/show_bug.cgi?id=94221
      
      Related discussions at:
      http://patchwork.ozlabs.org/patch/461633/
      https://lkml.org/lkml/2015/3/29/304
      
      Fixes: 63f1789e (Ignore resources consumed by host bridge itself)
      Reported-by: NBernhard Thaler <bernhard.thaler@wvnet.at>
      Signed-off-by: NJiang Liu <jiang.liu@linux.intel.com>
      Cc: 4.0+ <stable@vger.kernel.org> # 4.0+
      Reviewed-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2c62e849
  7. 04 3月, 2015 1 次提交
  8. 05 2月, 2015 2 次提交
  9. 26 1月, 2015 1 次提交
    • L
      ACPICA: Resources: Provide common part for struct acpi_resource_address structures. · a45de93e
      Lv Zheng 提交于
      struct acpi_resource_address and struct acpi_resource_extended_address64 share substracts
      just at different offsets. To unify the parsing functions, OSPMs like Linux
      need a new ACPI_ADDRESS64_ATTRIBUTE as their substructs, so they can
      extract the shared data.
      
      This patch also synchronizes the structure changes to the Linux kernel.
      The usages are searched by matching the following keywords:
      1. acpi_resource_address
      2. acpi_resource_extended_address
      3. ACPI_RESOURCE_TYPE_ADDRESS
      4. ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS
      And we found and fixed the usages in the following files:
       arch/ia64/kernel/acpi-ext.c
       arch/ia64/pci/pci.c
       arch/x86/pci/acpi.c
       arch/x86/pci/mmconfig-shared.c
       drivers/xen/xen-acpi-memhotplug.c
       drivers/acpi/acpi_memhotplug.c
       drivers/acpi/pci_root.c
       drivers/acpi/resource.c
       drivers/char/hpet.c
       drivers/pnp/pnpacpi/rsparser.c
       drivers/hv/vmbus_drv.c
      
      Build tests are passed with defconfig/allnoconfig/allyesconfig and
      defconfig+CONFIG_ACPI=n.
      Original-by: NThomas Gleixner <tglx@linutronix.de>
      Original-by: NJiang Liu <jiang.liu@linux.intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a45de93e
  10. 22 6月, 2014 1 次提交
  11. 22 5月, 2014 1 次提交
    • M
      x86/PCI: Warn if we have to "guess" host bridge node information · 33673101
      Myron Stowe 提交于
      The vast majority of platforms are not supplying ACPI _PXM (proximity)
      information corresponding to host bridge (PNP0A03/PNP0A08) devices
      resulting in sysfs "numa_node" values of -1 (NUMA_NO_NODE):
      
        # for i in /sys/devices/pci0000\:00/*/numa_node; do cat $i; done | uniq
        -1
      
        # find /sys/ -name "numa_node" | while read fname; do cat $fname; \
          done | uniq
        -1
      
      AMD based platforms provide a fall-back for this situation via amd_bus.c.
      These platforms snoop out the information by directly reading specific
      registers from the Northbridge and caching them via alloc_pci_root_info().
      
      Later during boot processing when host bridges are discovered -
      pci_acpi_scan_root() - the kernel looks for their corresponding ACPI _PXM
      method - drivers/acpi/numa.c::acpi_get_node().  If the BIOS supplied a _PXM
      method then that node (proximity) value is associated.  If the BIOS did not
      supply a _PXM method *and* the platform is AMD-based, the fall-back cached
      values obtained directly from the Northbridge are used; otherwise,
      "NUMA_NO_NODE" is associated.
      
      There are a number of issues with this fall-back mechanism the most notable
      being that amd_bus.c extracts a 3-bit number from a CPU register and uses
      it as the node number.  The node numbers used by Linux are logical and
      there's no reason they need to be identical to settings in the CPU
      registers.  So if we have some node information obtained in the normal way
      (from _PXM, SLIT, SRAT, etc.) and some from amd_bus.c, there's no reason to
      believe they will be compatible.
      
      This patch warns when this situation occurs:
      
        pci_root PNP0A08:00: [Firmware Bug]: no _PXM; falling back to node 0 from hardware (may be inconsistent with ACPI node numbers)
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=72051Signed-off-by: NMyron Stowe <myron.stowe@redhat.com>
      Signed-off-by: NSuravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      33673101
  12. 13 2月, 2014 3 次提交
  13. 04 2月, 2014 4 次提交
  14. 15 11月, 2013 1 次提交
    • R
      ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node · 7b199811
      Rafael J. Wysocki 提交于
      Modify struct acpi_dev_node to contain a pointer to struct acpi_device
      associated with the given device object (that is, its ACPI companion
      device) instead of an ACPI handle corresponding to it.  Introduce two
      new macros for manipulating that pointer in a CONFIG_ACPI-safe way,
      ACPI_COMPANION() and ACPI_COMPANION_SET(), and rework the
      ACPI_HANDLE() macro to take the above changes into account.
      Drop the ACPI_HANDLE_SET() macro entirely and rework its users to
      use ACPI_COMPANION_SET() instead.  For some of them who used to
      pass the result of acpi_get_child() directly to ACPI_HANDLE_SET()
      introduce a helper routine acpi_preset_companion() doing an
      equivalent thing.
      
      The main motivation for doing this is that there are things
      represented by struct acpi_device objects that don't have valid
      ACPI handles (so called fixed ACPI hardware features, such as
      power and sleep buttons) and we would like to create platform
      device objects for them and "glue" them to their ACPI companions
      in the usual way (which currently is impossible due to the
      lack of valid ACPI handles).  However, there are more reasons
      why it may be useful.
      
      First, struct acpi_device pointers allow of much better type checking
      than void pointers which are ACPI handles, so it should be more
      difficult to write buggy code using modified struct acpi_dev_node
      and the new macros.  Second, the change should help to reduce (over
      time) the number of places in which the result of ACPI_HANDLE() is
      passed to acpi_bus_get_device() in order to obtain a pointer to the
      struct acpi_device associated with the given "physical" device,
      because now that pointer is returned by ACPI_COMPANION() directly.
      Finally, the change should make it easier to write generic code that
      will build both for CONFIG_ACPI set and unset without adding explicit
      compiler directives to it.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> # on Haswell
      Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: Aaron Lu <aaron.lu@intel.com> # for ATA and SDIO part
      7b199811
  15. 10 10月, 2013 1 次提交
  16. 23 8月, 2013 1 次提交
  17. 29 5月, 2013 1 次提交
  18. 14 1月, 2013 1 次提交
    • R
      ACPI / PCI: Set root bridge ACPI handle in advance · 6c0cc950
      Rafael J. Wysocki 提交于
      The ACPI handles of PCI root bridges need to be known to
      acpi_bind_one(), so that it can create the appropriate
      "firmware_node" and "physical_node" files for them, but currently
      the way it gets to know those handles is not exactly straightforward
      (to put it lightly).
      
      This is how it works, roughly:
      
        1. acpi_bus_scan() finds the handle of a PCI root bridge,
           creates a struct acpi_device object for it and passes that
           object to acpi_pci_root_add().
      
        2. acpi_pci_root_add() creates a struct acpi_pci_root object,
           populates its "device" field with its argument's address
           (device->handle is the ACPI handle found in step 1).
      
        3. The struct acpi_pci_root object created in step 2 is passed
           to pci_acpi_scan_root() and used to get resources that are
           passed to pci_create_root_bus().
      
        4. pci_create_root_bus() creates a struct pci_host_bridge object
           and passes its "dev" member to device_register().
      
        5. platform_notify(), which for systems with ACPI is set to
           acpi_platform_notify(), is called.
      
      So far, so good.  Now it starts to be "interesting".
      
        6. acpi_find_bridge_device() is used to find the ACPI handle of
           the given device (which is the PCI root bridge) and executes
           acpi_pci_find_root_bridge(), among other things, for the
           given device object.
      
        7. acpi_pci_find_root_bridge() uses the name (sic!) of the given
           device object to extract the segment and bus numbers of the PCI
           root bridge and passes them to acpi_get_pci_rootbridge_handle().
      
        8. acpi_get_pci_rootbridge_handle() browses the list of ACPI PCI
           root bridges and finds the one that matches the given segment
           and bus numbers.  Its handle is then used to initialize the
           ACPI handle of the PCI root bridge's device object by
           acpi_bind_one().  However, this is *exactly* the ACPI handle we
           started with in step 1.
      
      Needless to say, this is quite embarassing, but it may be avoided
      thanks to commit f3fd0c8a (ACPI: Allow ACPI handles of devices to be
      initialized in advance), which makes it possible to initialize the
      ACPI handle of a device before passing it to device_register().
      
      Accordingly, add a new __weak routine, pcibios_root_bridge_prepare(),
      defaulting to an empty implementation that can be replaced by the
      interested architecutres (x86 and ia64 at the moment) with functions
      that will set the root bridge's ACPI handle before its dev member is
      passed to device_register().  Make both x86 and ia64 provide such
      implementations of pcibios_root_bridge_prepare() and remove
      acpi_pci_find_root_bridge() and acpi_get_pci_rootbridge_handle() that
      aren't necessary any more.
      
      Included is a fix for breakage on systems with non-ACPI PCI host
      bridges from Bjorn Helgaas.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      6c0cc950
  19. 04 1月, 2013 1 次提交
    • G
      X86: drivers: remove __dev* attributes. · a18e3690
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitconst,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Daniel Drake <dsd@laptop.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a18e3690
  20. 16 11月, 2012 1 次提交
    • R
      Revert "ACPI / x86: Add quirk for "CheckPoint P-20-00" to not use bridge _CRS_ info" · bacaf7cd
      Rafael J. Wysocki 提交于
      This reverts commit 0a290ac4 on
      the basis of the following comment from Bjorn Helgaas:
      
        Here's my reasoning: this is a CheckPoint product, and it looks
        like an appliance, not really a general-purpose machine.  The issue
        has apparently been there from day one, and the kernel shipped on
        the machine complains noisily about the issue, but apparently
        nobody bothered to investigate it.
      
        This corruption will clearly break other ACPI-related things.  We
        can sort of work around this one (though the workaround does
        prevent us from doing any PCI resource reassignment), but we have
        no idea what the other lurking ACPI issues are (and we have no
        assurance that *only* ACPI things are broken -- maybe the
        memory corruption affects other unknown things).  It may take
        significant debugging effort to identify the next problem.
      
        The only report I've seen (this one) is apparently from a
        CheckPoint employee, so it's not clear that anybody else is trying
        to run upstream Linux on it.  Being a CheckPoint employee, [...]
        is probably in a position to get the BIOS fixed.
      
        You might still be able to convince me, but it seems like the
        benefit to a quirk for this platform is small, and it does cost
        everybody else something in code size and complexity.
      
      References: https://bugzilla.kernel.org/show_bug.cgi?id=47981#c36Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      bacaf7cd
  21. 15 11月, 2012 1 次提交
  22. 08 11月, 2012 2 次提交
    • M
      x86/PCI: Allow x86 platforms to use translation offsets · b4873931
      Mike Yoknis 提交于
      The memory range descriptors in the _CRS control method contain an address
      translation offset for host bridges.  This value is used to translate
      addresses across the bridge.  The support to use _TRA values is present for
      other architectures but not for X86 platforms.
      
      For existing X86 platforms the _TRA value is zero.  Non-zero _TRA values
      are expected on future X86 platforms.  This change will register that value
      with the resource.
      Signed-off-by: NMike Yoknis <mike.yoknis@hp.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      b4873931
    • B
      x86/PCI: Ignore _SEG on HP xw9300 · 1f09b09b
      Bjorn Helgaas 提交于
      The xw9300 BIOS supplies _SEG methods that are incorrect, which results
      in some LSI SCSI devices not being discovered.  This adds a quirk to
      ignore _SEG on this machine and default to zero.
      
      The xw9300 has three host bridges:
      
          ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3f])
          ACPI: PCI Root Bridge [PCI1] (domain 0001 [bus 40-7f])
          ACPI: PCI Root Bridge [PCI2] (domain 0002 [bus 80-ff])
      
      When the BIOS "ACPI Bus Segmentation" option is enabled (as it is by
      default), the _SEG methods of the PCI1 and PCI2 bridges return 1 and 2,
      respectively.  However, the BIOS implementation appears to be incomplete,
      and we can't enumerate devices in those domains.
      
      But if we assume PCI1 and PCI2 really lead to buses in domain 0,
      everything works fine.  Windows XP and Vista also seem to ignore
      these _SEG methods.
      
      Reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=543308
      Reference: https://bugzilla.kernel.org/show_bug.cgi?id=15362Reported-and-Tested-by: NSean M. Pappalardo <pegasus@renegadetech.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      1f09b09b
  23. 22 9月, 2012 1 次提交
  24. 23 6月, 2012 2 次提交
  25. 14 6月, 2012 2 次提交
  26. 08 5月, 2012 1 次提交
  27. 01 5月, 2012 4 次提交