Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3821813ybi; Mon, 29 Jul 2019 13:17:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqykmzasKXlFQmVt1aHWZ3PbMnU6Qb5dVn2Iq0oO7WzaTHfU2DMCGJtJtQEHgnjXVyJftF6p X-Received: by 2002:a63:6187:: with SMTP id v129mr21113453pgb.153.1564431447914; Mon, 29 Jul 2019 13:17:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564431447; cv=none; d=google.com; s=arc-20160816; b=RftA8PfX50APfNZ1UvZY7ESvZqYk38lw9O2gAyEuaIAa16RXRulofXCn4srDtwwDUE 1iH+eetg8cWh3klep5HXo3hF70iq5TPOk5CXJG+q5FlQahdzgZCaIVqT4eonqAiZbjCi a7ZpDTKozszMaU36LCAS1BeYv2MApDGrLEBxcvkPutfBajBhw89DHK9rHZ65XYL7nmVf pMP0Sx+CpkIU32SqWNFqVpZp3VJCqWhT2+FBOIDx6nobEeljc3WTpPM3pAmiL0U+1bXq 5ByhnfbwDOQMuhk0GuzUDOYtc2mLVMTrlAxBz9yUhY3NCajqbWPcdIcS3TW8xYUi/Awb Ncdw== 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=MszWrt2f1ZglRvAdaEXfzHKjEnEJ/9hKQRHuUvg60BcskP9/pf4YjLjULLPm0lRpaL uSYTZXo7ytNmlv8CwR+j2QERqSWD7MskTYytbk6QccM0xF6PxfwyczqJlSTqMkAWyRj1 JVVKNp5/lmeB+PL5rZN+egFEVMPENKzCT5cg5nm1efPB9CH+Czn981m8KPUE8ciK0xZe PWMzjMBVvzciO9QAUQRNjLuxfBejiKG29K4orvWARN+um8shRvfFfTLc9JFV7NZYdO3/ re08tnDk+d+aJKqR0zXLTzihlIgybQMMLJFsMP4f1KKF25ti4E46jxTtrVdh7W6P6skk UElA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gmF1FnRl; 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 145si27337182pfb.262.2019.07.29.13.17.13; Mon, 29 Jul 2019 13:17:27 -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=gmF1FnRl; 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 S1729598AbfG2TZF (ORCPT + 99 others); Mon, 29 Jul 2019 15:25:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:37304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729586AbfG2TZC (ORCPT ); Mon, 29 Jul 2019 15:25:02 -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 1A7772171F; Mon, 29 Jul 2019 19:25:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428301; bh=NFkFRIwreOSnCR1vC8YOMvLJ+63nA0WPzzDhF9pxoIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gmF1FnRlwVRD7RXAyRhFlQi6Z/zBb+b3raPTWQRnSr46xU581KOK8Mq7O81iVCJ1k rGjai2gWo+PFozx8l4ZwTPJqdHRL7jpjYCF6YSRJixrj84PS8kraLZSP7KbZFk/cJ6 tfYlchxksRjED+JFxvPytDCSNCCZTxxtYoSu4yCA= 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.14 033/293] cpupower : frequency-set -r option misses the last cpu in related cpu list Date: Mon, 29 Jul 2019 21:18:44 +0200 Message-Id: <20190729190824.592246385@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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