History log of /drivers/acpi/pci_bind.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b67ea76172d4b1922c4b3c46c8ea8e9fec1ff38c 17-Feb-2010 Rafael J. Wysocki <rjw@sisk.pl> PCI / ACPI / PM: Platform support for PCI PME wake-up

Although the majority of PCI devices can generate PMEs that in
principle may be used to wake up devices suspended at run time,
platform support is generally necessary to convert PMEs into wake-up
events that can be delivered to the kernel. If ACPI is used for this
purpose, PME signals generated by a PCI device will trigger the ACPI
GPE associated with the device to generate an ACPI wake-up event that
we can set up a handler for, provided that everything is configured
correctly.

Unfortunately, the subset of PCI devices that have GPEs associated
with them is quite limited. The devices without dedicated GPEs have
to rely on the GPEs associated with other devices (in the majority of
cases their upstream bridges and, possibly, the root bridge) to
generate ACPI wake-up events in response to PME signals from them.

Add ACPI platform support for PCI PME wake-up:
o Add a framework making is possible to use ACPI system notify
handlers for run-time PM.
o Add new PCI platform callback ->run_wake() to struct
pci_platform_pm_ops allowing us to enable/disable the platform to
generate wake-up events for given device. Implemet this callback
for the ACPI platform.
o Define ACPI wake-up handlers for PCI devices and PCI root buses and
make the PCI-ACPI binding code register wake-up notifiers for all
PCI devices present in the ACPI tables.
o Add function pci_dev_run_wake() which can be used by PCI drivers to
check if given device is capable of generating wake-up events at
run time.

Developed in cooperation with Matthew Garrett <mjg@redhat.com>.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
/drivers/acpi/pci_bind.c
80ffdedf6020a77adcd06c01cfe6c488312b28f8 10-Jun-2009 Alexander Chiang <achiang@hp.com> ACPI: kill acpi_get_pci_id

acpi_get_pci_dev() is better, and all callers have been converted, so
eliminate acpi_get_pci_id().

Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
97719a8726fe8d3ea12a85fbf4f514a915ba30ec 10-Jun-2009 Alexander Chiang <achiang@hp.com> ACPI: acpi_pci_unbind should clean up properly after acpi_pci_bind

In acpi_pci_bind, we set device->ops.bind and device->ops.unbind, but
never clear them out.

Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
d9efae3688addb15994c9ad9761dada6f988bc14 10-Jun-2009 Alexander Chiang <achiang@hp.com> ACPI: simplify acpi_pci_irq_del_prt() API

There is no need to pass a segment/bus tuple to this API, as the callsite
always has a struct pci_bus. We can derive segment/bus from the
struct pci_bus, so let's take this opportunit to simplify the API and
make life easier for the callers.

Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
859a3f86ca83346f4097e956d0b27d96aa7a1cff 10-Jun-2009 Alexander Chiang <achiang@hp.com> ACPI: simplify acpi_pci_irq_add_prt() API

A PCI domain cannot change as you descend down subordinate buses, which
makes the 'segment' argument to acpi_pci_irq_add_prt() useless.

Change the interface to take a struct pci_bus *, from whence we can derive
the bus number and segment. Reducing the number of arguments makes life
simpler for callers.

Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
499650de6906722184b639989b47227a362b62f8 10-Jun-2009 Alexander Chiang <achiang@hp.com> ACPI: eviscerate pci_bind.c

Now that we can dynamically convert an ACPI CA handle to a
struct pci_dev at runtime, there's no need to statically bind
them during boot.

acpi_pci_bind/unbind are vastly simplified, and are only used
to evaluate _PRT methods on P2P bridges and non-bridge children.

This patch also changes the time-space tradeoff ever so slightly.

Looking up the ACPI-PCI binding is never in the performance path, and by
eliminating this caching, we save 24 bytes for each _ADR device in the
ACPI namespace.

This patch lays further groundwork to eventually eliminate
the acpi_driver_ops.bind callback.

Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
c22d7f5a389dad15de448b142f44e4000b3426f0 10-Jun-2009 Alexander Chiang <achiang@hp.com> ACPI: rearrange acpi_pci_bind/acpi_pci_unbind in pci_bind.c

This is a pure code movement patch that does $subject in order
to make the following patch easier to read and review.

No functional change.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
ce597bb42aa84bc73db80509b7c37e7fbc0b75c4 10-Jun-2009 Alexander Chiang <achiang@hp.com> ACPI: make acpi_pci_bind() static

acpi_pci_root_add() explicitly assigns device->ops.bind, and later
calls acpi_pci_bind_root(), which also does the same thing.

We don't need to repeat ourselves; removing the explicit assignment
allows us to make acpi_pci_bind() static.

Signed-off-by: Alex Chiang <achiang@hp.com>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
dacd2549ca61ddbdd1ed62a76ca95dea3f0e02c6 26-May-2009 Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> PCI/ACPI: fix wrong ref count handling in acpi_pci_bind()

The 'dev' field of struct acpi_pci_data is having a pointer to struct
pci_dev without incrementing the reference counter. Because of this, I
got the following kernel oops when I was doing some pci hotplug
operations. This patch fixes this bug by replacing wrong hand-made
pci_find_slot() with pci_get_slot() in acpi_pci_bind().

BUG: unable to handle kernel NULL pointer dereference at 00000000000000e8
IP: [<ffffffff803f0e9b>] acpi_pci_unbind+0xb1/0xdd

Call Trace:
[<ffffffff803ecee4>] acpi_bus_remove+0x54/0x68
[<ffffffff803ecf6d>] acpi_bus_trim+0x75/0xe3
[<ffffffffa0345ddd>] acpiphp_disable_slot+0x16d/0x1e0 [acpiphp]
[<ffffffffa03441f0>] disable_slot+0x20/0x60 [acpiphp]
[<ffffffff803cfc18>] power_write_file+0xc8/0x110
[<ffffffff803c6a54>] pci_slot_attr_store+0x24/0x30
[<ffffffff803469ce>] sysfs_write_file+0xce/0x140
[<ffffffff802e94e7>] vfs_write+0xc7/0x170
[<ffffffff802e9aa0>] sys_write+0x50/0x90
[<ffffffff8020bd6b>] system_call_fastpath+0x16/0x1b

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Reviewed-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Reviewed-by: Alex Chiang <achiang@hp.com>
Tested-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
087da3b4e2d7d3ef70a4fa649b9a286fdeb0e44e 31-Dec-2008 Len Brown <len.brown@intel.com> ACPI: simplify buffer management for acpi_pci_bind() etc.

use ACPI_ALLOCATE_BUFFER to remove the allocations
within acpi_pci_bind(), acpi_pci_unbind() and acpi_pci_bind_root().
While there, delete some unnecessary param inits from those routines.

Delete concept of ACPI_PATHNAME_MAX, since this was the last use.

Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
21a53283a012f21764f2aaaac9414849e1153d93 09-Dec-2008 Bjorn Helgaas <bjorn.helgaas@hp.com> ACPI: PCI: use conventional PCI address format

Use the conventional format for PCI addresses (%04x:%02x:%02x.%d).

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
e5685b9d35c2cc0a98425b05df30cb837dd1e632 24-Oct-2007 Adrian Bunk <bunk@kernel.org> ACPI: misc cleanups

This patch contains the following possible cleanups:
- make the following needlessly global code static:
- drivers/acpi/bay.c:dev_attr_eject
- drivers/acpi/bay.c:dev_attr_present
- drivers/acpi/dock.c:dev_attr_docked
- drivers/acpi/dock.c:dev_attr_flags
- drivers/acpi/dock.c:dev_attr_uid
- drivers/acpi/dock.c:dev_attr_undock
- drivers/acpi/pci_bind.c:acpi_pci_unbind()
- drivers/acpi/pci_link.c:acpi_link_lock
- drivers/acpi/sbs.c:acpi_sbs_callback()
- drivers/acpi/sbshc.c:acpi_smbus_transaction()
- drivers/acpi/sleep/main.c:acpi_sleep_prepare()
- #if 0 the following unused global functions:
- drivers/acpi/numa.c:acpi_unmap_pxm_to_node()
- remove the following unused EXPORT_SYMBOL's:
- acpi_register_gsi
- acpi_unregister_gsi
- acpi_strict
- acpi_bus_receive_event
- register_acpi_bus_type
- unregister_acpi_bus_type
- acpi_os_printf
- acpi_os_sleep
- acpi_os_stall
- acpi_os_read_pci_configuration
- acpi_os_create_semaphore
- acpi_os_delete_semaphore
- acpi_os_wait_semaphore
- acpi_os_signal_semaphore
- acpi_os_signal
- acpi_pci_irq_enable
- acpi_get_pxm

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
6ce7641b879e4b9ead46e14275d9d3645b47fa63 20-Nov-2007 Gary Hade <garyhade@us.ibm.com> ACPI: acpiphp: Remove dmesg spam on device remove

In cases where acpi_pci_bind() does not
attach device data, acpi_pci_unbind()
complains via an ACPI exception about the missing data when
the device is removed. For example, acpi_pci_bind() does not
attach data for non-existent device functions so when the device
is removed using the ACPI PCI hotplug driver 'acpiphp' an ACPI
exception is logged for every non-existent function. This patch
avoids the confusing log messages by removing the unnecessary
ACPI exception.

Signed-off-by: Gary Hade <garyhade@us.ibm.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
f52fd66d2ea794010c2d7536cf8e6abed0ac4947 13-Feb-2007 Len Brown <len.brown@intel.com> ACPI: clean up ACPI_MODULE_NAME() use

cosmetic only

Make "module name" actually match the file name.
Invoke with ';' as leaving it off confuses Lindent and gcc doesn't care.
Fix indentation where Lindent did get confused.

Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
36bcbec7ce21e2e8b3143b11a05747330abeca70 19-Dec-2006 Burman Yan <yan_952@hotmail.com> ACPI: replace kmalloc+memset with kzalloc

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
50dd096973f1d95aa03c6a6d9e148d706b62b68e 01-Oct-2006 Jan Engelhardt <jengelh@linux01.gwdg.de> ACPI: Remove unnecessary from/to-void* and to-void casts in drivers/acpi

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
d550d98d3317378d93a4869db204725d270ec812 27-Jun-2006 Patrick Mochel <mochel@linux.intel.com> ACPI: delete tracing macros from drivers/acpi/*.c

Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
6468463abd7051fcc29f3ee7c931f9bbbb26f5a4 27-Jun-2006 Len Brown <len.brown@intel.com> ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)

Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
a6fc67202e0224e6c9d1d285cc0b444bce887ed5 27-Jun-2006 Thomas Renninger <trenn@suse.de> ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUG

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
8713cbefafbb5a101ade541a4b0ffa108bf697cc 02-Sep-2005 Adrian Bunk <bunk@stusta.de> [ACPI] add static to function definitions

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
4be44fcd3bf648b782f4460fd06dfae6c42ded4b 05-Aug-2005 Len Brown <len.brown@intel.com> [ACPI] Lindent all ACPI files

Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/pci_bind.c
4ce448e5fae62689b06027b46f470b944e5c2193 28-Apr-2005 Rajesh Shah <rajesh.shah@intel.com> [PATCH] acpi bridge hotadd: Export the interface to get PCI id for an ACPI handle

Export an acpi interface to get PCI domain/bus/devfn information from the
corresponding namespace handle. Used by acpiphp code to transpate the device
handle of the hot-plugged root bridge to the corresponding pci location
information.

Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/acpi/pci_bind.c
c431ada45d65b305a6aab4557067e564b23ce5a5 28-Apr-2005 Rajesh Shah <rajesh.shah@intel.com> [PATCH] acpi bridge hotadd: ACPI based root bridge hot-add

When you hot-plug a (root) bridge hierarchy, it may have p2p bridges and
devices attached to it that have not been configured by firmware. In this
case, we need to configure the devices before starting them. This patch
separates device start from device scan so that we can introduce the
configuration step in the middle.

I kept the existing semantics for pci_scan_bus() since there are a huge number
of callers to that function.

Also, I have no way of testing the changes I made to the parisc files, so this
needs review by those folks. Sorry for the massive cross-post, this touches
files in many different places.

Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/acpi/pci_bind.c
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
/drivers/acpi/pci_bind.c