2019-05-27 08:55:06 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-06-02 16:54:30 +08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-18 15:21:31 +09:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-02-17 23:44:09 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-11-10 15:30:45 -07:00
|
|
|
|
2014-11-09 22:48:03 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
ACPI: Support _OSI("Darwin") correctly
Apple hardware queries _OSI("Darwin") in order to determine whether the
system is running OS X, and changes firmware behaviour based on the
answer. The most obvious difference in behaviour is that Thunderbolt
hardware is forcibly powered down unless the system is running OS X. The
obvious solution would be to simply add Darwin to the list of supported
_OSI strings, but this causes problems.
Recent Apple hardware includes two separate methods for checking _OSI
strings. The first will check whether Darwin is supported, and if so
will exit. The second will check whether Darwin is supported, but will
then continue to check for further operating systems. If a further
operating system is found then later firmware code will assume that the
OS is not OS X. This results in the unfortunate situation where the
Thunderbolt controller is available at boot time but remains powered
down after suspend.
The easiest way to handle this is to special-case it in the
Linux-specific OSI handling code. If we see Darwin, we should answer
true and then disable all other _OSI vendor strings.
The next problem is that the Apple PCI _OSC method has the following
code:
if (LEqual (0x01, OSDW ()))
if (LAnd (LEqual (Arg0, GUID), NEXP)
(do stuff)
else
(fail)
NEXP is a value in high memory and is presumably under the control of
the firmware. No methods sets it. The methods that are called in the "do
stuff" path are dummies. Unless there's some additional firmware call in
early boot, there's no way for this call to succeed - and even if it
does, it doesn't do anything.
The easiest way to handle this is simply to ignore it. We know which
flags would be set, so just set them by hand if the platform is running
in Darwin mode.
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
[andreas.noever@gmail.com: merged two patches, do not touch ACPICA]
Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-09-20 13:19:47 +02:00
|
|
|
|
2017-08-01 14:10:41 +02:00
|
|
|
|
2013-11-07 01:41:48 +01:00
|
|
|
|
|
|
|
|
|
2013-01-30 14:27:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-11-22 21:55:20 +01:00
|
|
|
|
|
|
|
|
|
2014-02-04 00:45:13 +01:00
|
|
|
|
2013-11-22 21:55:20 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-05 15:07:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-07 00:55:09 +01:00
|
|
|
|
2010-01-10 17:15:36 +01:00
|
|
|
|
2007-07-23 14:44:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-30 14:27:33 +01:00
|
|
|
|
2007-07-23 14:44:41 +02:00
|
|
|
|
2013-01-30 14:27:33 +01:00
|
|
|
|
|
|
|
|
|
2013-11-20 14:25:34 +01:00
|
|
|
|
2013-11-22 21:55:20 +01:00
|
|
|
|
|
|
|
|
|
2013-11-20 14:25:34 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2009-06-10 19:55:14 +00:00
|
|
|
|
|
|
|
|
|
2020-09-22 10:32:25 +08:00
|
|
|
|
2009-06-10 19:55:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-03 17:37:10 +01:00
|
|
|
|
2009-06-10 19:55:14 +00:00
|
|
|
|
|
|
|
|
|
2021-12-03 17:37:10 +01:00
|
|
|
|
2009-06-10 19:55:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-08-05 00:44:28 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-06-21 23:48:50 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-06-21 23:48:50 -06:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2015-01-26 16:58:56 +08:00
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
2015-01-26 16:58:56 +08:00
|
|
|
|
|
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-18 14:46:52 -06:00
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
2005-08-05 00:44:28 -04:00
|
|
|
|
|
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-05 15:07:45 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PCI/DPC: Add Error Disconnect Recover (EDR) support
Error Disconnect Recover (EDR) is a feature that allows ACPI firmware to
notify OSPM that a device has been disconnected due to an error condition
(ACPI v6.3, sec 5.6.6). OSPM advertises its support for EDR on PCI devices
via _OSC (see [1], sec 4.5.1, table 4-4). The OSPM EDR notify handler
should invalidate software state associated with disconnected devices and
may attempt to recover them. OSPM communicates the status of recovery to
the firmware via _OST (sec 6.3.5.2).
For PCIe, firmware may use Downstream Port Containment (DPC) to support
EDR. Per [1], sec 4.5.1, table 4-6, even if firmware has retained control
of DPC, OSPM may read/write DPC control and status registers during the EDR
notification processing window, i.e., from the time it receives an EDR
notification until it clears the DPC Trigger Status.
Note that per [1], sec 4.5.1 and 4.5.2.4,
1. If the OS supports EDR, it should advertise that to firmware by
setting OSC_PCI_EDR_SUPPORT in _OSC Support.
2. If the OS sets OSC_PCI_EXPRESS_DPC_CONTROL in _OSC Control to request
control of the DPC capability, it must also set OSC_PCI_EDR_SUPPORT in
_OSC Support.
Add an EDR notify handler to attempt recovery.
[1] Downstream Port Containment Related Enhancements ECN, Jan 28, 2019,
affecting PCI Firmware Specification, Rev. 3.2
https://members.pcisig.com/wg/PCI-SIG/document/12888
[bhelgaas: squash add/enable patches into one]
Link: https://lore.kernel.org/r/90f91fe6d25c13f9d2255d2ce97ca15be307e1bb.1585000084.git.sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
2020-03-23 17:26:07 -07:00
|
|
|
|
2019-03-15 14:29:40 -05:00
|
|
|
|
2013-09-05 15:07:45 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-17 10:58:09 -05:00
|
|
|
|
PCI/DPC: Add Error Disconnect Recover (EDR) support
Error Disconnect Recover (EDR) is a feature that allows ACPI firmware to
notify OSPM that a device has been disconnected due to an error condition
(ACPI v6.3, sec 5.6.6). OSPM advertises its support for EDR on PCI devices
via _OSC (see [1], sec 4.5.1, table 4-4). The OSPM EDR notify handler
should invalidate software state associated with disconnected devices and
may attempt to recover them. OSPM communicates the status of recovery to
the firmware via _OST (sec 6.3.5.2).
For PCIe, firmware may use Downstream Port Containment (DPC) to support
EDR. Per [1], sec 4.5.1, table 4-6, even if firmware has retained control
of DPC, OSPM may read/write DPC control and status registers during the EDR
notification processing window, i.e., from the time it receives an EDR
notification until it clears the DPC Trigger Status.
Note that per [1], sec 4.5.1 and 4.5.2.4,
1. If the OS supports EDR, it should advertise that to firmware by
setting OSC_PCI_EDR_SUPPORT in _OSC Support.
2. If the OS sets OSC_PCI_EXPRESS_DPC_CONTROL in _OSC Control to request
control of the DPC capability, it must also set OSC_PCI_EDR_SUPPORT in
_OSC Support.
Add an EDR notify handler to attempt recovery.
[1] Downstream Port Containment Related Enhancements ECN, Jan 28, 2019,
affecting PCI Firmware Specification, Rev. 3.2
https://members.pcisig.com/wg/PCI-SIG/document/12888
[bhelgaas: squash add/enable patches into one]
Link: https://lore.kernel.org/r/90f91fe6d25c13f9d2255d2ce97ca15be307e1bb.1585000084.git.sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
2020-03-23 17:26:07 -07:00
|
|
|
|
2013-09-05 15:07:45 -06:00
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-05 15:07:45 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-03-11 08:09:58 +01:00
|
|
|
|
2013-09-05 15:07:45 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:17 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2022-04-13 01:36:17 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2009-10-29 11:04:50 +08:00
|
|
|
|
2022-04-13 01:36:17 -06:00
|
|
|
|
2009-10-29 11:04:50 +08:00
|
|
|
|
2022-04-13 01:36:17 -06:00
|
|
|
|
2009-10-29 11:04:50 +08:00
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:17 -06:00
|
|
|
|
2009-10-29 11:04:50 +08:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-29 11:04:50 +08:00
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
2010-08-21 01:53:27 +02:00
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2013-09-05 15:05:54 -06:00
|
|
|
|
|
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:17 -06:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2010-08-21 01:53:27 +02:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:17 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-23 17:03:00 -06:00
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2021-12-03 17:37:10 +01:00
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2009-06-18 14:47:02 -06:00
|
|
|
|
2021-12-03 17:37:10 +01:00
|
|
|
|
2012-09-18 15:23:23 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2009-07-23 17:03:00 -06:00
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2009-06-10 19:55:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-10 15:23:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-10 19:55:20 +00:00
|
|
|
|
2022-09-10 15:23:46 +02:00
|
|
|
|
|
|
|
|
|
2009-06-10 19:55:20 +00:00
|
|
|
|
2022-09-10 15:23:46 +02:00
|
|
|
|
2009-06-10 19:55:20 +00:00
|
|
|
|
2022-09-10 15:23:46 +02:00
|
|
|
|
|
|
|
|
|
2022-10-18 19:34:03 +02:00
|
|
|
|
2022-09-10 15:23:46 +02:00
|
|
|
|
2009-10-13 01:01:57 +02:00
|
|
|
|
|
|
|
|
|
2009-06-10 19:55:20 +00:00
|
|
|
|
|
|
|
|
|
2022-09-10 15:23:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-10 19:55:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2010-08-23 23:53:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-23 10:28:56 +08:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2010-08-23 23:53:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2020-06-02 17:27:33 -05:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2010-08-23 23:53:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
|
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-23 23:53:11 +02:00
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-23 23:53:11 +02:00
|
|
|
|
2020-06-02 17:27:33 -05:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-23 23:53:11 +02:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
ACPI/PCI: Do not preserve _OSC control bits returned by a query
There is the assumption in acpi_pci_osc_control_set() that it is
always sufficient to compare the mask of _OSC control bits to be
requested with the result of an _OSC query where all of the known
control bits have been checked. However, in general, that need not
be the case. For example, if an _OSC feature A depends on an _OSC
feature B and control of A, B plus another _OSC feature C is
requested simultaneously, the BIOS may return A, B, C, while it would
only return C if A and C were requested without B.
That may result in passing a wrong mask of _OSC control bits to an
_OSC control request, in which case the BIOS may only grant control
of a subset of the requested features. Moreover, acpi_pci_run_osc()
will return error code if that happens and the caller of
acpi_pci_osc_control_set() will not know that it's been granted
control of some _OSC features. Consequently, the system will
generally not work as expected.
Apart from this acpi_pci_osc_control_set() always uses the mask
of _OSC control bits returned by the very first invocation of
acpi_pci_query_osc(), but that is done with the second argument
equal to OSC_PCI_SEGMENT_GROUPS_SUPPORT which generally happens
to affect the returned _OSC control bits.
For these reasons, make acpi_pci_osc_control_set() always check if
control of the requested _OSC features will be granted before making
the final control request. As a result, the osc_control_qry and
osc_queried members of struct acpi_pci_root are not necessary any
more, so drop them and remove the remaining code referring to them.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-08-23 23:55:59 +02:00
|
|
|
|
2010-08-23 23:53:11 +02:00
|
|
|
|
2013-09-05 15:07:45 -06:00
|
|
|
|
|
|
|
|
|
2020-06-02 17:27:33 -05:00
|
|
|
|
2009-02-09 15:59:29 +09:00
|
|
|
|
|
|
|
|
|
2013-09-05 15:05:54 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-08-24 14:20:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:17 -06:00
|
|
|
|
2013-09-05 15:07:41 -06:00
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
2013-09-05 15:07:41 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ACPI: Support _OSI("Darwin") correctly
Apple hardware queries _OSI("Darwin") in order to determine whether the
system is running OS X, and changes firmware behaviour based on the
answer. The most obvious difference in behaviour is that Thunderbolt
hardware is forcibly powered down unless the system is running OS X. The
obvious solution would be to simply add Darwin to the list of supported
_OSI strings, but this causes problems.
Recent Apple hardware includes two separate methods for checking _OSI
strings. The first will check whether Darwin is supported, and if so
will exit. The second will check whether Darwin is supported, but will
then continue to check for further operating systems. If a further
operating system is found then later firmware code will assume that the
OS is not OS X. This results in the unfortunate situation where the
Thunderbolt controller is available at boot time but remains powered
down after suspend.
The easiest way to handle this is to special-case it in the
Linux-specific OSI handling code. If we see Darwin, we should answer
true and then disable all other _OSI vendor strings.
The next problem is that the Apple PCI _OSC method has the following
code:
if (LEqual (0x01, OSDW ()))
if (LAnd (LEqual (Arg0, GUID), NEXP)
(do stuff)
else
(fail)
NEXP is a value in high memory and is presumably under the control of
the firmware. No methods sets it. The methods that are called in the "do
stuff" path are dummies. Unless there's some additional firmware call in
early boot, there's no way for this call to succeed - and even if it
does, it doesn't do anything.
The easiest way to handle this is simply to ignore it. We know which
flags would be set, so just set them by hand if the platform is running
in Darwin mode.
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
[andreas.noever@gmail.com: merged two patches, do not touch ACPICA]
Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-09-20 13:19:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-08-01 14:10:41 +02:00
|
|
|
|
ACPI: Support _OSI("Darwin") correctly
Apple hardware queries _OSI("Darwin") in order to determine whether the
system is running OS X, and changes firmware behaviour based on the
answer. The most obvious difference in behaviour is that Thunderbolt
hardware is forcibly powered down unless the system is running OS X. The
obvious solution would be to simply add Darwin to the list of supported
_OSI strings, but this causes problems.
Recent Apple hardware includes two separate methods for checking _OSI
strings. The first will check whether Darwin is supported, and if so
will exit. The second will check whether Darwin is supported, but will
then continue to check for further operating systems. If a further
operating system is found then later firmware code will assume that the
OS is not OS X. This results in the unfortunate situation where the
Thunderbolt controller is available at boot time but remains powered
down after suspend.
The easiest way to handle this is to special-case it in the
Linux-specific OSI handling code. If we see Darwin, we should answer
true and then disable all other _OSI vendor strings.
The next problem is that the Apple PCI _OSC method has the following
code:
if (LEqual (0x01, OSDW ()))
if (LAnd (LEqual (Arg0, GUID), NEXP)
(do stuff)
else
(fail)
NEXP is a value in high memory and is presumably under the control of
the firmware. No methods sets it. The methods that are called in the "do
stuff" path are dummies. Unless there's some additional firmware call in
early boot, there's no way for this call to succeed - and even if it
does, it doesn't do anything.
The easiest way to handle this is simply to ignore it. We know which
flags would be set, so just set them by hand if the platform is running
in Darwin mode.
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
[andreas.noever@gmail.com: merged two patches, do not touch ACPICA]
Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-09-20 13:19:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-08-24 14:20:52 +02:00
|
|
|
|
2013-09-05 15:07:45 -06:00
|
|
|
|
|
|
|
|
|
2018-08-10 04:32:12 +00:00
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
|
|
|
|
|
2018-08-10 04:32:12 +00:00
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-05 15:50:52 -06:00
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
2013-09-05 15:50:52 -06:00
|
|
|
|
2013-09-05 15:07:41 -06:00
|
|
|
|
2015-04-07 11:07:00 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-05 15:07:41 -06:00
|
|
|
|
2015-04-07 11:07:00 -07:00
|
|
|
|
|
|
|
|
|
2013-09-05 15:07:41 -06:00
|
|
|
|
|
|
|
|
|
2013-09-05 15:50:52 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:17 -06:00
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-13 01:36:18 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-08-24 14:20:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-05 15:07:41 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-30 14:27:33 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-06-18 14:46:52 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-28 18:31:27 -06:00
|
|
|
|
2015-04-07 11:07:00 -07:00
|
|
|
|
2017-05-16 20:42:38 +02:00
|
|
|
|
2022-04-13 01:36:17 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-18 14:46:52 -06:00
|
|
|
|
2013-05-28 18:31:27 -06:00
|
|
|
|
2009-06-18 14:46:52 -06:00
|
|
|
|
|
|
|
|
|
2013-05-28 18:10:05 -06:00
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
|
|
|
|
|
2009-06-18 14:46:52 -06:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-06-18 14:46:52 -06:00
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
2013-05-28 18:31:27 -06:00
|
|
|
|
2009-06-18 14:46:52 -06:00
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-28 18:10:05 -06:00
|
|
|
|
|
|
|
|
|
2013-05-28 18:31:27 -06:00
|
|
|
|
2011-06-19 18:51:37 -05:00
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-28 18:10:05 -06:00
|
|
|
|
2010-03-11 12:20:06 -07:00
|
|
|
|
|
|
|
|
|
2009-06-18 14:46:52 -06:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-05-19 16:54:39 -04:00
|
|
|
|
2009-06-18 14:47:07 -06:00
|
|
|
|
2008-09-22 14:37:34 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2014-11-09 22:48:03 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-03-13 13:58:30 +01:00
|
|
|
|
|
|
|
|
|
2012-10-30 15:24:50 +09:00
|
|
|
|
2013-05-28 18:31:27 -06:00
|
|
|
|
2012-06-22 14:55:16 +08:00
|
|
|
|
2022-04-13 01:36:17 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-01-07 00:55:09 +01:00
|
|
|
|
PCI/ACPI: Fix _OSC ordering to allow PCIe hotplug use when available
This fixes the problem of acpiphp claiming slots that should be managed
by pciehp, which may keep ExpressCard slots from working.
The acpiphp driver claims PCIe slots unless the BIOS has granted us
control of PCIe native hotplug via _OSC. Prior to v3.10, the acpiphp
.add method (add_bridge()) was always called *after* we had requested
native hotplug control with _OSC.
But after 3b63aaa70e ("PCI: acpiphp: Do not use ACPI PCI subdriver
mechanism"), which appeared in v3.10, acpiphp initialization is done
during the bus scan via the pcibios_add_bus() hook, and this happens
*before* we request native hotplug control.
Therefore, acpiphp doesn't know yet whether the BIOS will grant control,
and it claims slots that we should be handling with native hotplug.
This patch requests native hotplug control earlier, so we know whether
the BIOS granted it to us before we initialize acpiphp.
To avoid reintroducing the ASPM issue fixed by b8178f130e ('Revert
"PCI/ACPI: Request _OSC control before scanning PCI root bus"'), we run
_OSC earlier but defer the actual ASPM calls until after the bus scan is
complete.
Tested successfully by myself.
[bhelgaas: changelog, mark for stable]
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=60736
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
CC: stable@vger.kernel.org # v3.10+
CC: Len Brown <lenb@kernel.org>
CC: "Rafael J. Wysocki" <rjw@sisk.pl>
2013-08-29 16:17:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-11-14 00:54:17 +01:00
|
|
|
|
PCI/ACPI: Fix _OSC ordering to allow PCIe hotplug use when available
This fixes the problem of acpiphp claiming slots that should be managed
by pciehp, which may keep ExpressCard slots from working.
The acpiphp driver claims PCIe slots unless the BIOS has granted us
control of PCIe native hotplug via _OSC. Prior to v3.10, the acpiphp
.add method (add_bridge()) was always called *after* we had requested
native hotplug control with _OSC.
But after 3b63aaa70e ("PCI: acpiphp: Do not use ACPI PCI subdriver
mechanism"), which appeared in v3.10, acpiphp initialization is done
during the bus scan via the pcibios_add_bus() hook, and this happens
*before* we request native hotplug control.
Therefore, acpiphp doesn't know yet whether the BIOS will grant control,
and it claims slots that we should be handling with native hotplug.
This patch requests native hotplug control earlier, so we know whether
the BIOS granted it to us before we initialize acpiphp.
To avoid reintroducing the ASPM issue fixed by b8178f130e ('Revert
"PCI/ACPI: Request _OSC control before scanning PCI root bus"'), we run
_OSC earlier but defer the actual ASPM calls until after the bus scan is
complete.
Tested successfully by myself.
[bhelgaas: changelog, mark for stable]
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=60736
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
CC: stable@vger.kernel.org # v3.10+
CC: Len Brown <lenb@kernel.org>
CC: "Rafael J. Wysocki" <rjw@sisk.pl>
2013-08-29 16:17:05 -04:00
|
|
|
|
2014-11-09 22:48:03 +08:00
|
|
|
|
PCI/ACPI: Fix _OSC ordering to allow PCIe hotplug use when available
This fixes the problem of acpiphp claiming slots that should be managed
by pciehp, which may keep ExpressCard slots from working.
The acpiphp driver claims PCIe slots unless the BIOS has granted us
control of PCIe native hotplug via _OSC. Prior to v3.10, the acpiphp
.add method (add_bridge()) was always called *after* we had requested
native hotplug control with _OSC.
But after 3b63aaa70e ("PCI: acpiphp: Do not use ACPI PCI subdriver
mechanism"), which appeared in v3.10, acpiphp initialization is done
during the bus scan via the pcibios_add_bus() hook, and this happens
*before* we request native hotplug control.
Therefore, acpiphp doesn't know yet whether the BIOS will grant control,
and it claims slots that we should be handling with native hotplug.
This patch requests native hotplug control earlier, so we know whether
the BIOS granted it to us before we initialize acpiphp.
To avoid reintroducing the ASPM issue fixed by b8178f130e ('Revert
"PCI/ACPI: Request _OSC control before scanning PCI root bus"'), we run
_OSC earlier but defer the actual ASPM calls until after the bus scan is
complete.
Tested successfully by myself.
[bhelgaas: changelog, mark for stable]
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=60736
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
CC: stable@vger.kernel.org # v3.10+
CC: Len Brown <lenb@kernel.org>
CC: "Rafael J. Wysocki" <rjw@sisk.pl>
2013-08-29 16:17:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-15 13:48:14 +01:00
|
|
|
|
2017-06-24 01:58:53 +02:00
|
|
|
|
2010-02-17 23:44:09 +01:00
|
|
|
|
2014-11-09 22:48:03 +08:00
|
|
|
|
2012-11-03 21:39:31 -07:00
|
|
|
|
2013-07-22 14:37:18 -07:00
|
|
|
|
2016-08-17 16:00:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-17 16:00:33 +08:00
|
|
|
|
2013-05-28 18:04:46 -06:00
|
|
|
|
2012-10-30 14:31:32 -06:00
|
|
|
|
2014-01-10 15:23:14 +01:00
|
|
|
|
2009-06-18 14:46:57 -06:00
|
|
|
|
2014-01-10 15:23:14 +01:00
|
|
|
|
2013-01-30 14:27:33 +01:00
|
|
|
|
2012-12-21 00:36:45 +01:00
|
|
|
|
2014-11-09 22:48:03 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-12-21 00:36:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-28 00:25:45 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-01-30 14:27:33 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2009-06-18 14:46:57 -06:00
|
|
|
|
2012-09-18 15:20:34 +09:00
|
|
|
|
2014-01-10 15:23:14 +01:00
|
|
|
|
|
|
|
|
|
2012-10-30 14:31:43 -06:00
|
|
|
|
|
|
|
|
|
2017-02-28 21:34:29 +08:00
|
|
|
|
2017-06-24 01:58:53 +02:00
|
|
|
|
2010-02-17 23:44:09 +01:00
|
|
|
|
|
|
|
|
|
2012-10-30 14:31:43 -06:00
|
|
|
|
2017-02-28 21:34:29 +08:00
|
|
|
|
2012-10-30 14:31:43 -06:00
|
|
|
|
2014-11-09 22:48:03 +08:00
|
|
|
|
|
|
|
|
|
2014-01-10 15:23:14 +01:00
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-06-10 21:55:12 +02:00
|
|
|
|
|
|
|
|
|
2015-10-14 14:29:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-09 11:21:25 -06:00
|
|
|
|
2015-10-14 14:29:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-09 11:21:25 -06:00
|
|
|
|
|
|
|
|
|
2018-05-23 17:22:19 -05:00
|
|
|
|
2018-05-23 17:40:23 -05:00
|
|
|
|
|
|
|
|
|
2018-03-09 11:21:25 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-17 10:58:09 -05:00
|
|
|
|
|
|
|
|
|
PCI/DPC: Add Error Disconnect Recover (EDR) support
Error Disconnect Recover (EDR) is a feature that allows ACPI firmware to
notify OSPM that a device has been disconnected due to an error condition
(ACPI v6.3, sec 5.6.6). OSPM advertises its support for EDR on PCI devices
via _OSC (see [1], sec 4.5.1, table 4-4). The OSPM EDR notify handler
should invalidate software state associated with disconnected devices and
may attempt to recover them. OSPM communicates the status of recovery to
the firmware via _OST (sec 6.3.5.2).
For PCIe, firmware may use Downstream Port Containment (DPC) to support
EDR. Per [1], sec 4.5.1, table 4-6, even if firmware has retained control
of DPC, OSPM may read/write DPC control and status registers during the EDR
notification processing window, i.e., from the time it receives an EDR
notification until it clears the DPC Trigger Status.
Note that per [1], sec 4.5.1 and 4.5.2.4,
1. If the OS supports EDR, it should advertise that to firmware by
setting OSC_PCI_EDR_SUPPORT in _OSC Support.
2. If the OS sets OSC_PCI_EXPRESS_DPC_CONTROL in _OSC Control to request
control of the DPC capability, it must also set OSC_PCI_EDR_SUPPORT in
_OSC Support.
Add an EDR notify handler to attempt recovery.
[1] Downstream Port Containment Related Enhancements ECN, Jan 28, 2019,
affecting PCI Firmware Specification, Rev. 3.2
https://members.pcisig.com/wg/PCI-SIG/document/12888
[bhelgaas: squash add/enable patches into one]
Link: https://lore.kernel.org/r/90f91fe6d25c13f9d2255d2ce97ca15be307e1bb.1585000084.git.sathyanarayanan.kuppuswamy@linux.intel.com
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
2020-03-23 17:26:07 -07:00
|
|
|
|
|
|
|
|
|
2018-03-09 11:21:25 -06:00
|
|
|
|
2022-12-11 23:06:19 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-04 17:25:04 +02:00
|
|
|
|
|
|
|
|
|
2015-10-14 14:29:39 +08:00
|
|
|
|
2018-03-09 11:21:25 -06:00
|
|
|
|
|
|
|
|
|
2015-10-14 14:29:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-30 14:27:33 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-11-22 21:55:20 +01:00
|
|
|
|
2013-01-21 13:20:48 -08:00
|
|
|
|
|
|
|
|
|
2013-11-22 21:55:20 +01:00
|
|
|
|
|
|
|
|
|
2013-01-21 13:20:48 -08:00
|
|
|
|