Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6081755ybi; Wed, 29 May 2019 02:33:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8xL3EHM4GcvKJYmFI/6QaeWs3NsMmDOUIS47Hla3PtQ0sGri1qTxv58p3nUHxAvkPE4oP X-Received: by 2002:a63:3d89:: with SMTP id k131mr4136275pga.121.1559122381047; Wed, 29 May 2019 02:33:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559122381; cv=none; d=google.com; s=arc-20160816; b=RyDkfn+5f5VrY2AlNvSM1WwA5o+CrHZEb7NyzsrvbjiN453NRH7u24BgxnAZnDZygh RkvAyHydc4dUHkU8oY/twoaL828o1xPXSnFl8b31QRtw6eMH/APevFPYa+XxHFzVSCTA rcZYc/4hX2NJ6oi+ZUAv7JnUuyq1mawRFT3i4IPAtdma6qP9ZMKI3QNeabZX6xBazM02 dE33JwKT2rVzcnHtnOea0fJnZqSkRu3cfEnQle4Y8XWEKbal0qWWPMx3eWiBEoLw8giz JiS9EeQudADx1uMnXKTlZdd+nafX7Ppb2b5mKYOcewuMamAh4JwFc2MwSmohb7e5S7RR a6YA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=eligdv1quOVXKH7HDd0FqD46YBcCyvQsP+n2Kt162OY=; b=JGys6E41pYjYFuUBMuslDHlCy1iMsXsKVRsQZwVuE0RZP6Fz/a4lnl/SIjhGlLhtZx OqHDlcCfx2ijDBHJPlDwGqjBQ3gGl6JzrnzT7599LnzGiyMUzMMJxcANZFOdKASqEVCV NpOx+InL00Av3DcTO1AqWRdWbPPxXpBy2K0lKIfa667bFmso1ThheZhS5uzJEYj3x8fm WH09nPy65vWDHTyaCElMVeTP83iarK/oLgXyHzG/pHoEAaNnZAW4lJdlF39mrCb/+3pq NYxkKGKFhUtr9IeJv8E6wnNaYcRDpcloVnBip0EK1KHk4ZXLY04pcNUaeA8aKYDHupeL 0+Qg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r127si25384742pgr.359.2019.05.29.02.32.43; Wed, 29 May 2019 02:33:01 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726399AbfE2JbK (ORCPT + 99 others); Wed, 29 May 2019 05:31:10 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:49464 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbfE2JbJ (ORCPT ); Wed, 29 May 2019 05:31:09 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4T9RXDx006968 for ; Wed, 29 May 2019 05:31:08 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ssq2vs4bm-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 29 May 2019 05:31:08 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 29 May 2019 10:31:06 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 29 May 2019 10:31:03 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4T9V2n028049590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 29 May 2019 09:31:02 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8B242AE045; Wed, 29 May 2019 09:31:02 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9CB81AE053; Wed, 29 May 2019 09:31:01 +0000 (GMT) Received: from boston16h.aus.stglabs.ibm.com (unknown [9.3.23.78]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 29 May 2019 09:31:01 +0000 (GMT) From: Abhishek Goel To: trenn@suse.com, shuah@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Abhishek Goel Subject: [PATCH] cpupower : frequency-set -r option misses the last cpu in related cpu list Date: Wed, 29 May 2019 04:30:33 -0500 X-Mailer: git-send-email 2.17.1 X-TM-AS-GCONF: 00 x-cbid: 19052909-0016-0000-0000-0000028091A9 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19052909-0017-0000-0000-000032DDA13B Message-Id: <20190529093033.30068-1-huntbag@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-29_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905290063 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 1eef0aed6..08a405593 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.17.1