From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756517Ab3GZJgs (ORCPT ); Fri, 26 Jul 2013 05:36:48 -0400 Received: from mail-oa0-f54.google.com ([209.85.219.54]:52803 "EHLO mail-oa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752142Ab3GZJgq (ORCPT ); Fri, 26 Jul 2013 05:36:46 -0400 MIME-Version: 1.0 In-Reply-To: <20130726103321.21238bbb@amdc308.digital.local> References: <1370502472-7249-1-git-send-email-l.majewski@samsung.com> <1374770011-22171-1-git-send-email-l.majewski@samsung.com> <1374770011-22171-3-git-send-email-l.majewski@samsung.com> <20130726103321.21238bbb@amdc308.digital.local> Date: Fri, 26 Jul 2013 15:06:45 +0530 Message-ID: Subject: Re: [PATCH v6 2/8] cpufreq: Add boost frequency support in core From: Viresh Kumar To: Lukasz Majewski Cc: "Rafael J. Wysocki" , Zhang Rui , Eduardo Valentin , "cpufreq@vger.kernel.org" , Linux PM list , Jonghwa Lee , Lukasz Majewski , linux-kernel , Bartlomiej Zolnierkiewicz , Daniel Lezcano , Kukjin Kim , Myungjoo Ham , durgadoss.r@intel.com, Lists linaro-kernel Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26 July 2013 14:03, Lukasz Majewski wrote: > The problem here is with the cpufreq_driver->set_boost() call. > > I tried to avoid acquiring lock at one function and release it at > another (in this case cpufreq_boost_set_sw), especially since the > __cpufreq_governor() acquires its own lock - good place for deadlock. > > Is it OK for you to grab lock at one function > (cpufreq_boost_trigger_state()) and then at other function > (cpufreq_boost_set_sw) release it before calling __cpufreq_governor() > and grab it again after its completion? Problem is not only that.. but we shouldn't call boost_set() of drivers like acpi-cpufreq with this lock..... Leave it as it is for now.. Let me see if I can think of any problems that can happen due to this.