1. 07 11月, 2013 1 次提交
    • K
      PCI: Add x86_msi.msi_mask_irq() and msix_mask_irq() · 0e4ccb15
      Konrad Rzeszutek Wilk 提交于
      Certain platforms do not allow writes in the MSI-X BARs to setup or tear
      down vector values.  To combat against the generic code trying to write to
      that and either silently being ignored or crashing due to the pagetables
      being marked R/O this patch introduces a platform override.
      
      Note that we keep two separate, non-weak, functions default_mask_msi_irqs()
      and default_mask_msix_irqs() for the behavior of the arch_mask_msi_irqs()
      and arch_mask_msix_irqs(), as the default behavior is needed by x86 PCI
      code.
      
      For Xen, which does not allow the guest to write to MSI-X tables - as the
      hypervisor is solely responsible for setting the vector values - we
      implement two nops.
      
      This fixes a Xen guest crash when passing a PCI device with MSI-X to the
      guest.  See the bugzilla for more details.
      
      [bhelgaas: add bugzilla info]
      Reference: https://bugzilla.kernel.org/show_bug.cgi?id=64581Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      CC: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
      CC: Zhenzhong Duan <zhenzhong.duan@oracle.com>
      0e4ccb15
  2. 18 10月, 2013 3 次提交
  3. 10 10月, 2013 1 次提交
  4. 05 10月, 2013 1 次提交
  5. 24 9月, 2013 1 次提交
  6. 23 8月, 2013 1 次提交
  7. 27 7月, 2013 1 次提交
  8. 26 7月, 2013 1 次提交
  9. 23 7月, 2013 1 次提交
  10. 15 7月, 2013 1 次提交
    • P
      x86: delete __cpuinit usage from all x86 files · 148f9bb8
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      Note that some harmless section mismatch warnings may result, since
      notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
      are flagged as __cpuinit  -- so if we remove the __cpuinit from
      arch specific callers, we will also get section mismatch warnings.
      As an intermediate step, we intend to turn the linux/init.h cpuinit
      content into no-ops as early as possible, since that will get rid
      of these warnings.  In any case, they are temporary and harmless.
      
      This removes all the arch/x86 uses of the __cpuinit macros from
      all C files.  x86 only had the one __CPUINIT used in assembly files,
      and it wasn't paired off with a .previous or a __FINIT, so we can
      delete it directly w/o any corresponding additional change there.
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: x86@kernel.org
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NH. Peter Anvin <hpa@linux.intel.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      148f9bb8
  11. 06 6月, 2013 1 次提交
    • M
      x86/PCI: Map PCI setup data with ioremap() so it can be in highmem · 65694c5a
      Matt Fleming 提交于
      f9a37be0 ("x86: Use PCI setup data") added support for using PCI ROM
      images from setup_data.  This used phys_to_virt(), which is not valid for
      highmem addresses, and can cause a crash when booting a 32-bit kernel via
      the EFI boot stub.
      
      pcibios_add_device() assumes that the physical addresses stored in
      setup_data are accessible via the direct kernel mapping, and that calling
      phys_to_virt() is valid.  This isn't guaranteed to be true on x86 where the
      direct mapping range is much smaller than on x86-64.
      
      Calling phys_to_virt() on a highmem address results in the following:
      
       BUG: unable to handle kernel paging request at 39a3c198
       IP: [<c262be0f>] pcibios_add_device+0x2f/0x90
       ...
       Call Trace:
        [<c2370c73>] pci_device_add+0xe3/0x130
        [<c274640b>] pci_scan_single_device+0x8b/0xb0
        [<c2370d08>] pci_scan_slot+0x48/0x100
        [<c2371904>] pci_scan_child_bus+0x24/0xc0
        [<c262a7b0>] pci_acpi_scan_root+0x2c0/0x490
        [<c23b7203>] acpi_pci_root_add+0x312/0x42f
        ...
      
      The solution is to use ioremap() instead of phys_to_virt() to map the
      setup data into the kernel address space.
      
      [bhelgaas: changelog]
      Tested-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Seth Forshee <seth.forshee@canonical.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: stable@vger.kernel.org	# v3.8+
      65694c5a
  12. 29 5月, 2013 1 次提交
  13. 21 5月, 2013 1 次提交
  14. 10 5月, 2013 2 次提交
  15. 01 5月, 2013 1 次提交
  16. 17 4月, 2013 1 次提交
  17. 13 4月, 2013 1 次提交
  18. 01 3月, 2013 1 次提交
    • K
      xen/pci: We don't do multiple MSI's. · 884ac297
      Konrad Rzeszutek Wilk 提交于
      There is no hypercall to setup multiple MSI per PCI device.
      As such with these two new commits:
      -  08261d87
         PCI/MSI: Enable multiple MSIs with pci_enable_msi_block_auto()
      - 5ca72c4f
         AHCI: Support multiple MSIs
      
      we would call the PHYSDEVOP_map_pirq 'nvec' times with the same
      contents of the PCI device. Sander discovered that we would get
      the same PIRQ value 'nvec' times and return said values to the
      caller. That of course meant that the device was configured only
      with one MSI and AHCI would fail with:
      
      ahci 0000:00:11.0: version 3.0
      xen: registering gsi 19 triggering 0 polarity 1
      xen: --> pirq=19 -> irq=19 (gsi=19)
      (XEN) [2013-02-27 19:43:07] IOAPIC[0]: Set PCI routing entry (6-19 -> 0x99 -> IRQ 19 Mode:1 Active:1)
      ahci 0000:00:11.0: AHCI 0001.0200 32 slots 4 ports 6 Gbps 0xf impl SATA mode
      ahci 0000:00:11.0: flags: 64bit ncq sntf ilck pm led clo pmp pio slum part
      ahci: probe of 0000:00:11.0 failed with error -22
      
      That is b/c in ahci_host_activate the second call to
      devm_request_threaded_irq  would return -EINVAL as we passed in
      (on the second run) an IRQ that was never initialized.
      
      CC: stable@vger.kernel.org
      Reported-and-Tested-by: NSander Eikelenboom <linux@eikelenboom.it>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      884ac297
  19. 12 2月, 2013 1 次提交
  20. 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
  21. 08 1月, 2013 7 次提交
  22. 04 1月, 2013 2 次提交
    • 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
    • B
      x86/PCI: Remove unused pci_root_bus · b7869ba1
      Bjorn Helgaas 提交于
      pci_root_bus is unused, so remove all references to it.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      b7869ba1
  23. 27 12月, 2012 1 次提交
  24. 11 12月, 2012 1 次提交
  25. 08 12月, 2012 1 次提交
  26. 06 12月, 2012 1 次提交
  27. 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
  28. 15 11月, 2012 1 次提交
  29. 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