<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/acpi/pci_bind.c, branch v3.2.68</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>PCI / ACPI / PM: Platform support for PCI PME wake-up</title>
<updated>2010-02-23T00:21:02+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2010-02-17T22:44:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b67ea76172d4b1922c4b3c46c8ea8e9fec1ff38c'/>
<id>b67ea76172d4b1922c4b3c46c8ea8e9fec1ff38c</id>
<content type='text'>
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 -&gt;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 &lt;mjg@redhat.com&gt;.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 -&gt;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 &lt;mjg@redhat.com&gt;.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: kill acpi_get_pci_id</title>
<updated>2009-06-18T03:32:23+00:00</updated>
<author>
<name>Alexander Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2009-06-10T19:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=80ffdedf6020a77adcd06c01cfe6c488312b28f8'/>
<id>80ffdedf6020a77adcd06c01cfe6c488312b28f8</id>
<content type='text'>
acpi_get_pci_dev() is better, and all callers have been converted, so
eliminate acpi_get_pci_id().

Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
acpi_get_pci_dev() is better, and all callers have been converted, so
eliminate acpi_get_pci_id().

Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: acpi_pci_unbind should clean up properly after acpi_pci_bind</title>
<updated>2009-06-18T03:22:16+00:00</updated>
<author>
<name>Alexander Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2009-06-10T19:55:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=97719a8726fe8d3ea12a85fbf4f514a915ba30ec'/>
<id>97719a8726fe8d3ea12a85fbf4f514a915ba30ec</id>
<content type='text'>
In acpi_pci_bind, we set device-&gt;ops.bind and device-&gt;ops.unbind, but
never clear them out.

Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In acpi_pci_bind, we set device-&gt;ops.bind and device-&gt;ops.unbind, but
never clear them out.

Signed-off-by: Alex Chiang &lt;achiang@hp.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: simplify acpi_pci_irq_del_prt() API</title>
<updated>2009-06-18T03:22:16+00:00</updated>
<author>
<name>Alexander Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2009-06-10T19:55:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d9efae3688addb15994c9ad9761dada6f988bc14'/>
<id>d9efae3688addb15994c9ad9761dada6f988bc14</id>
<content type='text'>
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 &lt;achiang@hp.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;achiang@hp.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: simplify acpi_pci_irq_add_prt() API</title>
<updated>2009-06-18T03:22:16+00:00</updated>
<author>
<name>Alexander Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2009-06-10T19:55:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=859a3f86ca83346f4097e956d0b27d96aa7a1cff'/>
<id>859a3f86ca83346f4097e956d0b27d96aa7a1cff</id>
<content type='text'>
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 &lt;achiang@hp.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;achiang@hp.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: eviscerate pci_bind.c</title>
<updated>2009-06-18T03:22:16+00:00</updated>
<author>
<name>Alexander Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2009-06-10T19:55:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=499650de6906722184b639989b47227a362b62f8'/>
<id>499650de6906722184b639989b47227a362b62f8</id>
<content type='text'>
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 &lt;achiang@hp.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;achiang@hp.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: rearrange acpi_pci_bind/acpi_pci_unbind in pci_bind.c</title>
<updated>2009-06-18T03:22:15+00:00</updated>
<author>
<name>Alexander Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2009-06-10T19:55:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c22d7f5a389dad15de448b142f44e4000b3426f0'/>
<id>c22d7f5a389dad15de448b142f44e4000b3426f0</id>
<content type='text'>
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 &lt;achiang@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;achiang@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: make acpi_pci_bind() static</title>
<updated>2009-06-18T03:22:15+00:00</updated>
<author>
<name>Alexander Chiang</name>
<email>achiang@hp.com</email>
</author>
<published>2009-06-10T19:55:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ce597bb42aa84bc73db80509b7c37e7fbc0b75c4'/>
<id>ce597bb42aa84bc73db80509b7c37e7fbc0b75c4</id>
<content type='text'>
acpi_pci_root_add() explicitly assigns device-&gt;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 &lt;achiang@hp.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
acpi_pci_root_add() explicitly assigns device-&gt;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 &lt;achiang@hp.com&gt;
Acked-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI/ACPI: fix wrong ref count handling in acpi_pci_bind()</title>
<updated>2009-05-27T21:53:07+00:00</updated>
<author>
<name>Kenji Kaneshige</name>
<email>kaneshige.kenji@jp.fujitsu.com</email>
</author>
<published>2009-05-26T00:08:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dacd2549ca61ddbdd1ed62a76ca95dea3f0e02c6'/>
<id>dacd2549ca61ddbdd1ed62a76ca95dea3f0e02c6</id>
<content type='text'>
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: [&lt;ffffffff803f0e9b&gt;] acpi_pci_unbind+0xb1/0xdd

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

Signed-off-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Reviewed-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Reviewed-by: Alex Chiang &lt;achiang@hp.com&gt;
Tested-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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: [&lt;ffffffff803f0e9b&gt;] acpi_pci_unbind+0xb1/0xdd

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

Signed-off-by: Kenji Kaneshige &lt;kaneshige.kenji@jp.fujitsu.com&gt;
Reviewed-by: Bjorn Helgaas &lt;bjorn.helgaas@hp.com&gt;
Reviewed-by: Alex Chiang &lt;achiang@hp.com&gt;
Tested-by: Alex Chiang &lt;achiang@hp.com&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ACPI: simplify buffer management for acpi_pci_bind() etc.</title>
<updated>2008-12-31T03:52:26+00:00</updated>
<author>
<name>Len Brown</name>
<email>len.brown@intel.com</email>
</author>
<published>2008-12-31T03:44:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=087da3b4e2d7d3ef70a4fa649b9a286fdeb0e44e'/>
<id>087da3b4e2d7d3ef70a4fa649b9a286fdeb0e44e</id>
<content type='text'>
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 &lt;len.brown@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;len.brown@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
