From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:38730 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753214AbdJGW3v (ORCPT ); Sat, 7 Oct 2017 18:29:51 -0400 Subject: Re: [RFC v4 2/8] platform/x86: intel_pmc_ipc: Use spin_lock to protect GCR updates To: Andy Shevchenko , Kuppuswamy Sathyanarayanan Cc: Alessandro Zummo , "x86@kernel.org" , Wim Van Sebroeck , Ingo Molnar , Alexandre Belloni , Zha Qipeng , "H. Peter Anvin" , "dvhart@infradead.org" , Thomas Gleixner , Lee Jones , Andy Shevchenko , Souvik Kumar Chakravarty , linux-rtc@vger.kernel.org, linux-watchdog@vger.kernel.org, "linux-kernel@vger.kernel.org" , Platform Driver References: From: "Kuppuswamy, Sathyanarayanan" Message-ID: <98547c75-c7a8-cdb8-a0e0-50d115df286a@gmail.com> Date: Sat, 7 Oct 2017 15:29:49 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Sender: linux-rtc-owner@vger.kernel.org List-ID: Hi, On 10/7/2017 9:13 AM, Andy Shevchenko wrote: > On Sat, Oct 7, 2017 at 5:33 AM, > wrote: >> From: Kuppuswamy Sathyanarayanan >> >> 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") > I think it need to be a one line. Fixed it in v5 version. But it crosses 80 char limit. I am not sure whether its alright. > > Does it apply on top of v4.14-rc3 ? Yes. Just checked it now.  It applies cleanly on top of v4.14-rc3. But v5 patch set is re-based on top of your review branch. So it has dependency on a patch ( "platform/x86: intel_pmc_ipc: Use devm_* calls in driver probe function") in your review branch. > Btw, this patch should be first in the series. Fixed it in v5 version. > >