Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1103276ybi; Fri, 2 Aug 2019 09:21:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWYcE9cY+ica4UP1YMLZagakqjY1UGdE7S/wTydoaQpVTJaMi6+LBT8647IsSkGOxuaF4e X-Received: by 2002:a17:90b:95:: with SMTP id bb21mr5206485pjb.8.1564762880348; Fri, 02 Aug 2019 09:21:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564762880; cv=none; d=google.com; s=arc-20160816; b=MXE2u5oMZHWXHvIdcUIWNLfaGLKl2NpQSggmg8RsgHCaRoJlxXhE4YRgy5kvSy854K +bWXxpTS1gIqzX6XvCZuGnZJE4oIoIKMYu2hqHxVyNRGhy8LLd6cB8zFW8GsKaI00T3F AseW3tfajpm8hfjP6EqgPULMP5w+nWISb6UpRNac+gveTymsr2WZip0jGqlAUsk5DfQ9 1EmXxj4wJQacMJ52SkcUTdqGvVe4WAmqRlqg8rmGrg5gPaosR21KQVaTUeauSm6ooU3k ZOH8+knXKLBhZyBwcH2LL4yobpo2rOyMzhGfLwUOI2rncmN89Zx4p2P6kg0OXT80MetO 3HSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9J3wPHihkQG762B1DnhJjnsdI/TaWNaGubo6iV7Aq2o=; b=YnsNWXT7VAcigQyHsmxO8gEOsXQPIphR5K/6AOj8VpQDXUBHZRLlnW2woIe7FTTcoR PH7w4BOaQkqSBcRrcvAFSr45I/KUaxZtvxL47o+RmGKOTrTpJfTXHEvWgJ2WfV6gtuDZ bkGz8ZVFiRKDQSYSC2Sxt8CGpgjP1zRVzE1WxDr0iTqaDR0VeBb1pXsy4DdQCww/hrem iCCbFTpK0zc4meRuU1489eykEslOjd1ASu7pbNiz7kQ7qwbLk2AIdoe2NuIF2TFaisUO dSMzM+yegeZV5bxJPP2n2N/VCpXDbfVpABh2uyecUHw9seyBVcKoZYzBro4bxVNI3S5B 2How== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bk6ZTt1X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w17si35383222plp.404.2019.08.02.09.21.05; Fri, 02 Aug 2019 09:21:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bk6ZTt1X; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389427AbfHBJlQ (ORCPT + 99 others); Fri, 2 Aug 2019 05:41:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:42642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391800AbfHBJlM (ORCPT ); Fri, 2 Aug 2019 05:41:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2A50E20B7C; Fri, 2 Aug 2019 09:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564738871; bh=NFkFRIwreOSnCR1vC8YOMvLJ+63nA0WPzzDhF9pxoIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bk6ZTt1XLP9CTm+f3KKEomFdua7iekBX3VRP8Vxp/9Uv8Ms6dTPFmcqravVw4jy1v RX2YmCh4YyjR5/bYzA66hfnR21TlNcPQbWL7Kl5yi5zyk1NPc0kqSxdrBwFhg4JTfN ek+rzKbosIHMwj7XlfLJ/Eny1+3wpC1qw24Pn1eM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abhishek Goel , Thomas Renninger , Shuah Khan , Sasha Levin Subject: [PATCH 4.9 028/223] cpupower : frequency-set -r option misses the last cpu in related cpu list Date: Fri, 2 Aug 2019 11:34:13 +0200 Message-Id: <20190802092240.839216152@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092238.692035242@linuxfoundation.org> References: <20190802092238.692035242@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 04507c0a9385cc8280f794a36bfff567c8cc1042 ] To set frequency on specific cpus using cpupower, following syntax can be used : cpupower -c #i frequency-set -f #f -r While setting frequency using cpupower frequency-set command, if we use '-r' option, it is expected to set frequency for all cpus related to cpu #i. But it is observed to be missing the last cpu in related cpu list. This patch fixes the problem. Signed-off-by: Abhishek Goel Reviewed-by: Thomas Renninger Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin --- tools/power/cpupower/utils/cpufreq-set.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/power/cpupower/utils/cpufreq-set.c b/tools/power/cpupower/utils/cpufreq-set.c index 1eef0aed6423..08a405593a79 100644 --- a/tools/power/cpupower/utils/cpufreq-set.c +++ b/tools/power/cpupower/utils/cpufreq-set.c @@ -306,6 +306,8 @@ int cmd_freq_set(int argc, char **argv) bitmask_setbit(cpus_chosen, cpus->cpu); cpus = cpus->next; } + /* Set the last cpu in related cpus list */ + bitmask_setbit(cpus_chosen, cpus->cpu); cpufreq_put_related_cpus(cpus); } } -- 2.20.1