diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2018-06-21 16:43:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-06-25 21:30:12 +0800 |
commit | 1f9f9d168ce619608572b01771c47a41b15429e6 (patch) | |
tree | 515557fef9cb493734872e6b9a5a996b3941b18e /scripts/checkkconfigsymbols.py | |
parent | d2d2e3c46be5d6dd8001d0eebdf7cafb9bc7006b (diff) | |
download | linux-stable-1f9f9d168ce619608572b01771c47a41b15429e6.tar.gz linux-stable-1f9f9d168ce619608572b01771c47a41b15429e6.tar.bz2 linux-stable-1f9f9d168ce619608572b01771c47a41b15429e6.zip |
usb: typec: ucsi: acpi: Workaround for cache mode issue
This fixes an issue where the driver fails with an error:
ioremap error for 0x3f799000-0x3f79a000, requested 0x2, got 0x0
On some platforms the UCSI ACPI mailbox SystemMemory
Operation Region may be setup before the driver has been
loaded. That will lead into the driver failing to map the
mailbox region, as it has been already marked as write-back
memory. acpi_os_ioremap() for x86 uses ioremap_cache()
unconditionally.
When the issue happens, the embedded controller has a
pending query event for the UCSI notification right after
boot-up which causes the operation region to be setup before
UCSI driver has been loaded.
The fix is to notify acpi core that the driver is about to
access memory region which potentially overlaps with an
operation region right before mapping it.
acpi_release_memory() will check if the memory has already
been setup (mapped) by acpi core, and deactivate it (unmap)
if it has. The driver is then able to map the memory with
ioremap_nocache() and set the memtype to uncached for the
region.
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Fixes: 8243edf44152 ("usb: typec: ucsi: Add ACPI driver")
Cc: stable@vger.kernel.org
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/checkkconfigsymbols.py')
0 files changed, 0 insertions, 0 deletions