Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753572AbbK3Kec (ORCPT ); Mon, 30 Nov 2015 05:34:32 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:32900 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752630AbbK3Ke1 (ORCPT ); Mon, 30 Nov 2015 05:34:27 -0500 Date: Mon, 30 Nov 2015 16:04:22 +0530 From: Viresh Kumar To: dawei chien Cc: "Rafael J. Wysocki" , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Matthias Brugger , Daniel Kurtz , Sascha Hauer , Daniel Lezcano , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, Sascha Hauer , Punit Agrawal Subject: Re: [PATCH v4 3/3] thermal: mediatek: Add cpu dynamic power cooling model. Message-ID: <20151130103422.GA4899@ubuntu> References: <1448616727-29367-1-git-send-email-dawei.chien@mediatek.com> <1448616727-29367-4-git-send-email-dawei.chien@mediatek.com> <20151130053845.GM3373@ubuntu> <1448875581.29031.14.camel@mtksdaap41> <20151130093042.GA8556@ubuntu> <1448878884.29031.49.camel@mtksdaap41> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1448878884.29031.49.camel@mtksdaap41> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1041 Lines: 31 On 30-11-15, 18:21, dawei chien wrote: > As far as I know, user or shell script has the right for using command online/offline cpu. Right. > Either user by console or shell script could make cpu2 online even cpu2 already onlined. Hey, no. You can't online that is already online. You can write '1' to the file /sys/devices/system/cpu/cpuX/online, but it wouldn't have any affect. > That could cause of_cpufreq_cooling_register execute many times for the > same cooling device. No. > "echo 1 > /sys/devices/system/cpu/cpu2/online" > > With above hotplug command, mtk_cpufreq_ready will register cooling > device again as well, but fail since the cooling device already created, > so we might need not register cooling device again on this case. Have you tested this yourself ? -- viresh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/