Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
This patch changes the implementation of acpi_pci_find_root().
We can access acpi_pci_root without scanning acpi_pci_roots list.
If hostbridge hotplug is supported, acpi_pci_roots list will be
protected by mutex. We should not access acpi_pci_roots list
if preventable to lessen deadlock risk.
Signed-off-by: Taku Izumi <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
Use mutex to protect acpi_pci_roots list against PCI host bridge
hotplug operations.
[bhelgaas: s/struct acpi_handle *handle/acpi_handle handle/]
Signed-off-by: Taku Izumi <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
This patch changes the function signature of walk_root_bridge().
We can omit _STA, _SEG, and _BBN evaluation by passing not acpi_handle
but acpi_pci_root. Now that acpi_pci_slot_add() which is the only
caller of walk_root_bridge() gets acpi_pci_root structure, changing
signature of walk_root_bridge() is reasonable.
[bhelgaas: changelog]
Signed-off-by: Taku Izumi <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
This patch changes .add/.remove interfaces of acpi_pci_driver.
In the current implementation acpi_handle is passed as a parameter
of .add/.remove interface. However, the acpi_pci_root structure
contains more useful information than just the acpi_handle. This
enables us to avoid some useless lookups in each acpi_pci_driver.
Note: This changes interfaces used by acpi_pci_register_driver(), an
exported symbol. This patch updates all the in-kernel users, but any
out-of-kernel acpi_pci_register_driver() users will need updates.
[bhelgaas: changelog]
Signed-off-by: Taku Izumi <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
Use mutex to protect global acpi_pci_drivers list against PCI
host bridge hotplug operations.
Signed-off-by: Jiang Liu <[email protected]>
Signed-off-by: Yinghai Lu <[email protected]>
Signed-off-by: Taku Izumi <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
When hot-plugging PCI root bridge, acpi_pci_drivers' add()/remove()
methods should be invoked to notify registered drivers.
Signed-off-by: Jiang Liu <[email protected]>
Signed-off-by: Yinghai Lu <[email protected]>
Signed-off-by: Taku Izumi <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
Use normal list for struct acpi_pci_driver to simplify code.
Signed-off-by: Jiang Liu <[email protected]>
Signed-off-by: Yinghai Lu <[email protected]>
Signed-off-by: Taku Izumi <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
When we bind a device to an ACPI handle, the handle is stored in
dev->archdata.acpi_handle. For such devices, there's no need to
search the acpi_pci_roots list with acpi_get_pci_rootbridge_handle();
we can just use DEVICE_ACPI_HANDLE(dev) directly.
[bhelgaas: changelog, reorder "if" to avoid negation]
Signed-off-by: Yinghai Lu <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: Len Brown <[email protected]>
Cc: [email protected]
|
|
* pci/yinghai-revert-pci_find_bus-and-remove-cleanup:
PCI: Stop all children first, before removing all children
Revert "PCI: Use hotplug-safe pci_get_domain_bus_and_slot()"
|
|
This restores the previous behavior of stopping all child devices before
removing any of them. The current SR-IOV design, where removing the PF
also drops references on all the VFs, depends on having the VFs continue
to exist after having been stopped.
[bhelgaas: changelog]
Signed-off-by: Yinghai Lu <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
This reverts commit 433efd2247b0cbf5e7e86275e1f21281d3b99047.
When we remove an SR-IOV device, we have this call chain:
driver .remove() method
pci_disable_sriov()
sriov_disable()
virtfn_remove()
pci_get_domain_bus_and_slot()
sriov_disable() is only called for PFs, not for VFs. When it's called
for a PF, it loops through all the VFs and calls virtfn_remove() for
each. But we stop and remove VFs before PFs, so by the time we get
to virtfn_remove(), the VFs have already been stopped and deleted
from the device list. Now pci_get_domain_bus_and_slot(), which uses
bus_find_device() and relies on that device list, doesn't find the
VFs, so the VF references aren't released correctly.
Reported-by: Yinghai Lu <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
* pci/thierry-fixup-irqs:
PCI: Provide a default pcibios_update_irq()
PCI: Discard __init annotations for pci_fixup_irqs() and related functions
|
|
Most architectures implement this in exactly the same way. Instead of
having each architecture duplicate this function, provide a single
implementation in the core and make it a weak symbol so that it can be
overridden on architectures where it is required.
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
Remove the __init annotations in order to keep pci_fixup_irqs() around
after init (e.g. for hotplug). This requires the same change for the
implementation of pcibios_update_irq() on all architectures. While at
it, all __devinit annotations are removed as well, since they will be
useless now that HOTPLUG is always on.
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
|
|
* pci/konstantin-sysfs:
PCI: Convert "new_id"/"remove_id" into generic pci_bus driver attributes
|
|
* pci/jiang-get-domain-bus-slot:
xen-pcifront: Use hotplug-safe pci_get_domain_bus_and_slot()
PCI: Use hotplug-safe pci_get_domain_bus_and_slot()
PCI/cpcihp: Use hotplug-safe pci_get_domain_bus_and_slot()
PCI/vga: Use hotplug-safe pci_get_domain_bus_and_slot()
ia64/PCI: Use hotplug-safe pci_get_domain_bus_and_slot()
|
|
This patch removes hardcoded sysfs attributes manipulation and
converts them into generic pci_bus->drv_attrs. This saves several bytes.
Signed-off-by: Konstantin Khlebnikov <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
* pci/trivial:
PCI: Drop duplicate const in DECLARE_PCI_FIXUP_SECTION
PCI: Drop bogus default from ARCH_SUPPORTS_MSI
PCI: cpqphp: Remove unreachable path
PCI: Remove bus number resource debug messages
PCI/AER: Print completion message at KERN_INFO to match starting message
PCI: Fix drivers/pci/pci.c kernel-doc warnings
|
|
* commit 'v3.6-rc5': (1098 commits)
Linux 3.6-rc5
HID: tpkbd: work even if the new Lenovo Keyboard driver is not configured
Remove user-triggerable BUG from mpol_to_str
xen/pciback: Fix proper FLR steps.
uml: fix compile error in deliver_alarm()
dj: memory scribble in logi_dj
Fix order of arguments to compat_put_time[spec|val]
xen: Use correct masking in xen_swiotlb_alloc_coherent.
xen: fix logical error in tlb flushing
xen/p2m: Fix one-off error in checking the P2M tree directory.
powerpc: Don't use __put_user() in patch_instruction
powerpc: Make sure IPI handlers see data written by IPI senders
powerpc: Restore correct DSCR in context switch
powerpc: Fix DSCR inheritance in copy_thread()
powerpc: Keep thread.dscr and thread.dscr_inherit in sync
powerpc: Update DSCR on all CPUs when writing sysfs dscr_default
powerpc/powernv: Always go into nap mode when CPU is offline
powerpc: Give hypervisor decrementer interrupts their own handler
powerpc/vphn: Fix arch_update_cpu_topology() return value
ARM: gemini: fix the gemini build
...
Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
drivers/rapidio/devices/tsi721.c
|
|
Following code has a race window between pci_find_bus() and pci_get_slot()
if PCI hotplug operation happens between them which removes the pci_bus.
So use PCI hotplug safe interface pci_get_domain_bus_and_slot() instead,
which also reduces code complexity.
struct pci_bus *pci_bus = pci_find_bus(domain, busno);
struct pci_dev *pci_dev = pci_get_slot(pci_bus, devfn);
Tested-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Jiang Liu <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Konrad Rzeszutek Wilk <[email protected]>
|
|
Following code has a race window between pci_find_bus() and pci_get_slot()
if PCI hotplug operation happens between them which removes the pci_bus.
So use PCI hotplug safe interface pci_get_domain_bus_and_slot() instead,
which also reduces code complexity.
struct pci_bus *pci_bus = pci_find_bus(domain, busno);
struct pci_dev *pci_dev = pci_get_slot(pci_bus, devfn);
Signed-off-by: Jiang Liu <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
Following code has a race window between pci_find_bus() and pci_get_slot()
if PCI hotplug operation happens between them which removes the pci_bus.
So use PCI hotplug safe interface pci_get_domain_bus_and_slot() instead,
which also reduces code complexity.
struct pci_bus *pci_bus = pci_find_bus(domain, busno);
struct pci_dev *pci_dev = pci_get_slot(pci_bus, devfn);
Signed-off-by: Jiang Liu <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
Following code has a race window between pci_find_bus() and pci_get_slot()
if PCI hotplug operation happens between them which removes the pci_bus.
So use PCI hotplug safe interface pci_get_domain_bus_and_slot() instead,
which also reduces code complexity.
struct pci_bus *pci_bus = pci_find_bus(domain, busno);
struct pci_dev *pci_dev = pci_get_slot(pci_bus, devfn);
Signed-off-by: Jiang Liu <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
Following code has a race window between pci_find_bus() and pci_get_slot()
if PCI hotplug operation happens between them which removes the pci_bus.
So use PCI hotplug safe interface pci_get_domain_bus_and_slot() instead,
which also reduces code complexity.
struct pci_bus *pci_bus = pci_find_bus(domain, busno);
struct pci_dev *pci_dev = pci_get_slot(pci_bus, devfn);
Signed-off-by: Jiang Liu <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
* pci/stephen-const:
make drivers with pci error handlers const
scsi: make pci error handlers const
netdev: make pci_error_handlers const
PCI: Make pci_error_handlers const
|
|
* pci/gavin-window-alignment:
powerpc/powernv: I/O and memory alignment for P2P bridges
powerpc/PCI: Override pcibios_window_alignment()
PCI: Refactor pbus_size_mem()
PCI: Align P2P windows using pcibios_window_alignment()
PCI: Add weak pcibios_window_alignment() interface
|
|
The patch implements ppc_md.pcibios_window_alignment for powernv
platform so that the resource reassignment in PCI core will be
done according to the I/O and memory alignment returned from
powernv platform. The alignments returned from powernv platform
is closely depending on the scheme for PE segmenting. Besides,
the patch isn't useful for now, but the subsequent patches will
be working based on it.
[bhelgaas: use pci_pcie_type() since pci_dev.pcie_type was removed]
Signed-off-by: Gavin Shan <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
This patch implements pcibios_window_alignment() so powerpc platforms can
force P2P bridge windows to be at larger alignments than the PCI spec
requires.
[bhelgaas: changelog]
Signed-off-by: Gavin Shan <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
The original idea comes from Ram Pai. This patch puts the chunk of
code for calculating the minimal alignment of memory window into a
separate inline function.
Signed-off-by: Gavin Shan <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
This patch changes pbus_size_io() and pbus_size_mem() to do window (I/O,
memory and prefetchable memory) reassignment based on the minimal
alignments for the P2P bridge, which was retrieved by window_alignment().
[bhelgaas: changelog]
Signed-off-by: Gavin Shan <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
This patch implements a weak function to return the default I/O or memory
window alignment for a P2P bridge. By default, I/O windows are aligned to
4KiB or 1KiB and memory windows are aligned to 4MiB. Some platforms, e.g.,
powernv, have special alignment requirements and can override
pcibios_window_alignment().
[bhelgaas: changelog]
Signed-off-by: Gavin Shan <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
It's redundant and makes sparse complain about it.
Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
Options without prompts and without dependencies don't usefully have a
default value - they're intended to be selected from other options
only.
Signed-off-by: Jan Beulich <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
register & 0x0B == 0x04 is never true, the code will always take the
(identical) 0x00 path anyway. Remove the dead code paths.
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44151
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
* pci/shengzhou-irq:
PCI: Use dev->irq instead of dev->pin to enable non MSI/INTx interrupt
|
|
* pci/oliver-pciehp-resume:
PCI: pciehp: Always implement resume, regardless of pciehp_force param
|
|
* pci/feng-avoid-kmalloc:
PCI: Remove the obsolete no_pci_devices() check
PCI: Use pci_device_id on stack for pci_get_subsys/class() to avoid kmalloc
|
|
In function pci_get_subsys() there is a check:
/*
* pci_find_subsys() can be called on the ide_setup() path,
* super-early in boot. But the down_read() will enable local
* interrupts, which can cause some machines to crash. So here we
* detect and flag that situation and bail out early.
*/
if (unlikely(no_pci_devices()))
return NULL;
But there is no ide_setup() now, and no down_read() either, which
makes the check obsolete. So remove it.
Signed-off-by: Feng Tang <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
|
|
|
|
git://git.linaro.org/people/mszyprowski/linux-dma-mapping
Pull DMA-mapping fixes from Marek Szyprowski:
"Another set of fixes for ARM dma-mapping subsystem.
Commit e9da6e9905e6 replaced custom consistent buffer remapping code
with generic vmalloc areas. It however introduced some regressions
caused by limited support for allocations in atomic context. This
series contains fixes for those regressions.
For some subplatforms the default, pre-allocated pool for atomic
allocations turned out to be too small, so a function for setting its
size has been added.
Another set of patches adds support for atomic allocations to
IOMMU-aware DMA-mapping implementation.
The last part of this pull request contains two fixes for Contiguous
Memory Allocator, which relax too strict requirements."
* 'fixes-for-3.6' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
ARM: dma-mapping: IOMMU allocates pages from atomic_pool with GFP_ATOMIC
ARM: dma-mapping: Introduce __atomic_get_pages() for __iommu_get_pages()
ARM: dma-mapping: Refactor out to introduce __in_atomic_pool
ARM: dma-mapping: atomic_pool with struct page **pages
ARM: Kirkwood: increase atomic coherent pool size
ARM: DMA-Mapping: print warning when atomic coherent allocation fails
ARM: DMA-Mapping: add function for setting coherent pool size from platform code
ARM: relax conditions required for enabling Contiguous Memory Allocator
mm: cma: fix alignment requirements for contiguous regions
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem updates from Dmitry Torokhov.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: wacom - add support for EMR on Cintiq 24HD touch
Input: i8042 - add Gigabyte T1005 series netbooks to noloop table
Input: imx_keypad - reset the hardware before enabling
Input: edt-ft5x06 - fix build error when compiling wthout CONFIG_DEBUG_FS
|
|
Previously, the driver ignored resume unless the pciehp_force module_param
was specified. On some laptops that means that interrupts are not
delivered after S3, so card removals and insertions are not handled.
This patch makes the driver handle resume regardless of pciehp_force.
[bhelgaas: changelog]
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Rafael J. Wysocki <[email protected]>
|
|
Covers the rest of the uses of pci error handler.
Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
Since pci_error_handlers is just a function table make it const.
Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Linas Vepstas <[email protected]>
|
|
On some platforms, root port has neither MSI/MSI-X nor INTx interrupt
generated in RC mode. In this case, we have to use other interrupt, e.g.,
system shared interrupt, for port service IRQ to have AER, Hot-plug, etc.,
services work.
Signed-off-by: Shengzhou Liu <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
|
|
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Pull HID updates from Jiri Kosina:
"It contains a fix for Eaton Ellipse MAX UPS from Alan Stern,
performance improvement (not processing debug data if noone is
interested), by Henrik Rydberg, and allowing tpkbd-driven devices to
work even with generic driver in a crippled mode, by Andres Freund."
* 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: tpkbd: work even if the new Lenovo Keyboard driver is not configured
HID: Only dump input if someone is listening
HID: add NOGET quirk for Eaton Ellipse MAX UPS
|
|
c1dcad2d32d0252e8a3023d20311b52a187ecda3 added a new driver configured by
HID_LENOVO_TPKBD but made the hid_have_special_driver entry non-optional which
lead to a recognized but non-working device if the new driver wasn't
configured (which is the correct default).
Signed-off-by: Andres Freund <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
|