From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx2.zhaoxin.com (mx2.zhaoxin.com [61.152.208.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CBFF45BD68 for ; Wed, 21 Jan 2026 08:51:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=61.152.208.219 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768985485; cv=none; b=FcaFEazx4iL4MQUTfR2PfUILk/44KDIgz3eBUpg2vi+I5QkajTrX1FOxz2QTdsYR1hVgrL6ugui7YjdYGM0zvit7EHcsCT72e6l1RIMchgjTgH6aolL2tqXGuFUrqyril8DJ/yn1xsnmRiF4i1z4G4LRt2T6s2s4RzErR0nWgAs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768985485; c=relaxed/simple; bh=t8AxgcrUiDxyo6xrma8hT4+Wt9+aUACZuPus/ho8qzw=; h=Message-ID:Date:MIME-Version:From:Subject:To:CC:References: In-Reply-To:Content-Type; b=AeYnxBlFNxBn4iXYcNdfCshlTVoGMGy2t27UDiqFtgdPWnSBqn7SvMgS8nV4e+SMqHQ119t+p4Ht7etc39vDuKNZ4YxqYUegmKnqNyl+3t20K4hHRpgvt3V518xXxrbO4p041xa2Dngak1d8O8OXpJRiJ+auNYl4lAKByeXrHM8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zhaoxin.com; spf=pass smtp.mailfrom=zhaoxin.com; arc=none smtp.client-ip=61.152.208.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=zhaoxin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zhaoxin.com X-ASG-Debug-ID: 1768985468-1eb14e7c0423e40001-xx1T2L Received: from ZXBJMBX02.zhaoxin.com (ZXBJMBX02.zhaoxin.com [10.29.252.6]) by mx2.zhaoxin.com with ESMTP id ocMSZHYg6l5XbDHc (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 21 Jan 2026 16:51:09 +0800 (CST) X-Barracuda-Envelope-From: TonyWWang-oc@zhaoxin.com X-Barracuda-RBL-Trusted-Forwarder: 10.29.252.6 Received: from ZXSHMBX1.zhaoxin.com (10.28.252.163) by ZXBJMBX02.zhaoxin.com (10.29.252.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.59; Wed, 21 Jan 2026 16:51:08 +0800 Received: from ZXSHMBX1.zhaoxin.com ([fe80::936:f2f9:9efa:3c85]) by ZXSHMBX1.zhaoxin.com ([fe80::936:f2f9:9efa:3c85%7]) with mapi id 15.01.2507.059; Wed, 21 Jan 2026 16:51:08 +0800 X-Barracuda-RBL-Trusted-Forwarder: 10.29.252.6 Received: from [10.32.64.8] (10.32.64.8) by ZXBJMBX03.zhaoxin.com (10.29.252.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.59; Wed, 21 Jan 2026 16:38:07 +0800 Message-ID: <345044bb-15e8-48d3-bc03-d5f327aeb3ae@zhaoxin.com> Date: Wed, 21 Jan 2026 16:37:48 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Tony W Wang-oc Subject: Re: [PATCH] cpufreq: Add CPU frequency policy change notification support To: Viresh Kumar X-ASG-Orig-Subj: Re: [PATCH] cpufreq: Add CPU frequency policy change notification support CC: , , , , , , References: <20260120092445.5711-1-TonyWWang-oc@zhaoxin.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: zxbjmbx1.zhaoxin.com (10.29.252.163) To ZXBJMBX03.zhaoxin.com (10.29.252.7) X-Moderation-Data: 1/21/2026 4:51:07 PM X-Barracuda-Connect: ZXBJMBX02.zhaoxin.com[10.29.252.6] X-Barracuda-Start-Time: 1768985469 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://10.28.252.36:4443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at zhaoxin.com X-Barracuda-Scan-Msg-Size: 1231 X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.153350 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- On 2026/1/21 13:51, Viresh Kumar wrote: > > > > On 20-01-26, 17:24, Tony W Wang-oc wrote: >> Implemented CPUFREQ_CHANGE_POLICY notification in cpufreq subsystem. >> This enhancement allows kernel modules to be notified when a CPU frequency >> policy is modified, facilitating more integrated system management. >> The notification is dispatched after a successful governor switch during >> policy updates. >> >> Signed-off-by: Tony W Wang-oc >> --- >> drivers/cpufreq/cpufreq.c | 2 ++ >> include/linux/cpufreq.h | 1 + >> 2 files changed, 3 insertions(+) > > Who is using this stuff ? Please explain why you need this and how you > are going to use it. I don't think it is a great idea, but I still > want to see what you are doing in the first place. > The expectation is to register a notifier of type CPUFREQ_POLICY_NOTIFIER via cpufreq_register_notifier in one of our drivers. The notifier callback will configure Zhaoxin registers to different values based on the different cpufreq governors when the event is CPUFREQ_GOVERNOR_CHANGE, thereby allowing the Zhaoxin hardware to adopt different power management strategies. Sincerely! TonyWWang-oc