Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp758631rwi; Wed, 19 Oct 2022 02:31:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Cx6/ojAk5sI7RKw56/shxzEGjccBSQDCbyGN+M+hEs8VpMssGaKewDG7cWiFUICrG6qQ/ X-Received: by 2002:a17:903:2307:b0:181:e618:b4c5 with SMTP id d7-20020a170903230700b00181e618b4c5mr7403295plh.172.1666171870522; Wed, 19 Oct 2022 02:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666171870; cv=none; d=google.com; s=arc-20160816; b=VjVggYYytDHL/nE3ijmc7u3eO3HCKbPIndYRinUPd9Ogl6aOR9U/GvV8fJ1WiBdrms f8U2+D4OA+ELUDHcBEqx6ovN0WZ/v1nz4JQ5t12ntFMPot7YIYtsv3bGT0Qzb+v6J8SN uIZPK4U70mPtXopGWTB54/Z9qGFx86IDe+GiLHatLkiOPhjaeAOwIloLqmnuMCyM6W68 hDubyvsA+aiV1zkJAT/28eGGiIqpwTJs/oBH9lpW8rQXGxLKoOcikIpaS0cGpfdM+KH7 UrhUNezdLBJEbyd/0WTU98rxXfQ94sIJtsXe9g7Ogl/V4mNTQ2DemiAeGkSqbhxjj10O qSbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=4J+LmAGsUx6iPNGLSp66sltybrf7dGNr9n+r8yStXDA=; b=m7qmdsS4lodcYp0uYRhXda7xS71EJScBKTdIkEWxhiRf6cRKpTtcuMN3y12GL6tMgt h4aKKuo/llHe8JFrtkqLhT9jXDU/qzzJbhl3LE3T0/AjlNOhs6PteJJZHqskoHxOZ2yk /0Rz6XWvpu/q4J9fobRciIZkDPsg/Evu39MISVQj4A5o+1Yh1w7Q0tnObSLBt8TrXADJ aiXp4DcAvD7FhLh0Zs1wu6r1R5Zjd9IhmHfdcYPa+YRcNDqLh1fWyQaeKiyQhqHSAdQF wJvklbUahp6N6GkhmKm4R6vPtXPD8UaN8CdPlwJNKoTB4nk41pP857uGnUelapQuDU23 Pm8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a24-20020a1709027d9800b0017835995e40si17025181plm.414.2022.10.19.02.30.58; Wed, 19 Oct 2022 02:31:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231463AbiJSIp7 (ORCPT + 99 others); Wed, 19 Oct 2022 04:45:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231543AbiJSIoY (ORCPT ); Wed, 19 Oct 2022 04:44:24 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1097C7E80D; Wed, 19 Oct 2022 01:43:22 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=guanjun@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VSa04gl_1666168845; Received: from localhost(mailfrom:guanjun@linux.alibaba.com fp:SMTPD_---0VSa04gl_1666168845) by smtp.aliyun-inc.com; Wed, 19 Oct 2022 16:40:46 +0800 From: 'Guanjun' To: schspa@gmail.com, rafael@kernel.org, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, guanjun@linux.alibaba.com, zelin.deng@linux.alibaba.com Subject: [PATCH 0/1] cpufreq: Fix show()/store() issue for hotplugging Date: Wed, 19 Oct 2022 16:40:44 +0800 Message-Id: <1666168845-67690-1-git-send-email-guanjun@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zelin Deng Hello maintainers, After I brought one CPU (64) offline, I got failure when I used lscpu: lscpu: cannot read /sys/devices/system/cpu/cpu64/cpufreq/cpuinfo_max_freq: Device or resource busy I found in commit d4627a287e251, policy_is_inactive() check was added to avoid the case in which policy initialization failed. However it didn't consider the situation in which policy has been created successfully but is not inactive: CPU is hotplugging offline. This patch just add an addtional check whether CPU is online or not to fix the issue. Zelin Deng (1): cpufreq: Fix show()/store() issue for hotplugging offline CPU drivers/cpufreq/cpufreq.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) -- 2.32.0.GIT