From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B7F3C43387 for ; Fri, 11 Jan 2019 10:38:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0D50620874 for ; Fri, 11 Jan 2019 10:38:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VAExB+UK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D50620874 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rjwysocki.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+zSpcKkZh+0C+BUPILD7XhsUAOZ+urFrYn2peBOCXA0=; b=VAExB+UKjcBLH3 nezfRKCNgxIgPAa0/ZBRCBxbKGsNOGF+Mm4ah2pVYZ4ub4f3XA26d0qWbOhpW8U0kGaqoXA4gPUYr GgahK7uvfrJwNR0q1DT8pfUW6wEUrjqflWoi/myAcK0w2lwrUHhvNbV2i1WTXXL7/LNLKuBpHEi0x 5O7m1u6LYeVjQWmRmRKJDNeIjDmF6w+p+A3eaySFXZAL/RMAiQwXnLq+7N+NSKU10yJGyyOl03kEu zfgEvU10CNcpqvg7suClXnVWO6FfCjN7uizmgX3nF8dXKqoo/L9ERnhHLyvAmHkm7VWdvRtqLF24d 4HE9cVpcE+0zAC8J6xTw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ghuDF-0003Jm-9j; Fri, 11 Jan 2019 10:38:53 +0000 Received: from cloudserver094114.home.pl ([79.96.170.134]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ghuDB-0003Iz-OV for linux-arm-kernel@lists.infradead.org; Fri, 11 Jan 2019 10:38:51 +0000 Received: from 79.184.254.168.ipv4.supernova.orange.pl (79.184.254.168) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.183) id 089072fae489c38b; Fri, 11 Jan 2019 11:38:43 +0100 From: "Rafael J. Wysocki" To: Sudeep Holla , Viresh Kumar Subject: Re: [PATCH] cpufreq: scpi/scmi: Fix freeing of dynamic OPPs Date: Fri, 11 Jan 2019 11:37:57 +0100 Message-ID: <13587320.TAQQ9Zc4eI@aspire.rjw.lan> In-Reply-To: <20190104110142.GA28483@e107155-lin> References: <7dddbeabb434225d9b3d02600ea4a2313622ca26.1546594910.git.viresh.kumar@linaro.org> <20190104110142.GA28483@e107155-lin> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190111_023849_956413_ACFC38D5 X-CRM114-Status: GOOD ( 12.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishanth Menon , Vincent Guittot , linux-pm@vger.kernel.org, Stephen Boyd , linux-kernel@vger.kernel.org, "4 . 20" , dietmar.eggemann@arm.com, quentin.perret@arm.com, Douglas.Raillard@arm.com, Valentin Schneider , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Friday, January 4, 2019 12:01:42 PM CET Sudeep Holla wrote: > On Fri, Jan 04, 2019 at 03:14:33PM +0530, Viresh Kumar wrote: > > Since the commit 2a4eb7358aba ("OPP: Don't remove dynamic OPPs from > > _dev_pm_opp_remove_table()"), dynamically created OPP aren't > > automatically removed anymore by dev_pm_opp_cpumask_remove_table(). This > > affects the scpi and scmi cpufreq drivers which no longer free OPPs on > > failures or on invocations of the policy->exit() callback. > > > > Create a generic OPP helper dev_pm_opp_remove_all_dynamic() which can be > > called from these drivers instead of dev_pm_opp_cpumask_remove_table(). > > > > In dev_pm_opp_remove_all_dynamic(), we need to make sure that the > > opp_list isn't getting accessed simultaneously from other parts of the > > OPP core while the helper is freeing dynamic OPPs, i.e. we can't drop > > the opp_table->lock while traversing through the OPP list. And to > > accomplish that, this patch also creates _opp_kref_release_unlocked() > > which can be called from this new helper with the opp_table lock already > > held. > > > > I did test it but since I couldn't reproduce the original issue, my > tested-by is not that worth. Anyways the changes look fine to me. > > Reviewed-by: Sudeep Holla Applied and pushed to Linus, thanks! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel