From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753593AbdJHSyS (ORCPT ); Sun, 8 Oct 2017 14:54:18 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:37583 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752185AbdJHSyP (ORCPT ); Sun, 8 Oct 2017 14:54:15 -0400 X-Google-Smtp-Source: AOwi7QAY9xiXjgQRjvSon+0MtAQwSAYb7yT7kNnDYzVVZjBIxGgy+rl9VSLQ5eEp10rjvLo3WIpFxw== Subject: Re: [RFC v5 1/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 , Kuppuswamy Sathyanarayanan References: From: "Kuppuswamy, Sathyanarayanan" Message-ID: <3e38abb3-efce-49b9-ce2d-854c42bdfb12@gmail.com> Date: Sun, 8 Oct 2017 11:54:13 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andy, On 10/8/2017 11:38 AM, Andy Shevchenko wrote: > On Sun, Oct 8, 2017 at 1:19 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") >> Signed-off-by: Kuppuswamy Sathyanarayanan >> * Rebased this patch on top of Andy's review branch. > Oh, what I asked you is to use vanilla kernel as a base. > Please, be sure (you assured me, though it's not true) I did test this patch on top of 4.14-rc3, but I have included another patch (""platform/x86: intel_pmc_ipc: Use devm_* calls in driver probe function") from your review branch before testing. I assumed that your will be pushing this patch along with devm_* fixes patch (since you already reviewed it), So I re-based them together on top of 4.14-rc3.  Sorry, it looks like my assumption is incorrect. > that it's > applied against vanilla (or our fixes branch) and send just this one > patch separately. I will send it separately now. > > No need to resend v5 right now. >