]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
platform/x86: intel_pmc_ipc: Use spin_lock to protect GCR updates
authorKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Sat, 7 Oct 2017 22:19:51 +0000 (15:19 -0700)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 23 Oct 2017 17:16:36 +0000 (20:16 +0300)
commit6687aeb9cd3d40904d1f9e884d2145603c23adfa
tree22ff9a06a7b2be7f928cbeade5a25910350d3739
parent83beee5c88a6c71ded70e2eef5ca7406a02605cc
platform/x86: intel_pmc_ipc: Use spin_lock to protect GCR updates

Currently, update_no_reboot_bit() function implemented in this driver
uses mutex_lock() to protect its register updates. But this function is
called with in atomic context in iTCO_wdt_start() and iTCO_wdt_stop()
functions in iTCO_wdt.c driver, which in turn causes "sleeping into
atomic context" issue. This patch fixes this issue by replacing the
mutex_lock() with spin_lock() to protect the GCR read/write/update APIs.

Fixes: 9d855d4 ("platform/x86: intel_pmc_ipc: Fix iTCO_wdt GCS memory mapping failure")
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kupuswamy@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/intel_pmc_ipc.c