[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4] x86/cpufreq: Add Kconfig option for CPU frequency scaling
- To: Stefano Stabellini <stefano.stabellini@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
- Date: Mon, 16 Feb 2026 12:13:26 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=tJBlKMOhG9WZs9g/JRLbEW7LhpsQ/zQlhKqh/Y8/C94=; b=BLeCVA0fFH5nlChk8j9A37GkapNfH+M+w/aiZkdvbMm0RR8H7ATNRaXNPjU2WYTeDn/rix6omv+FzEFbFnuEVmm9MEjMniXszqazBK5yv41opE5OMGRAXRHoV24wkZKrmN74db8SAgQ24hg3RRtPdgZhAjgiH4NFKaE9ExIU1qQbHrLWCEGBt3MZiWrKn4fPk9Fj801Q4WHMybDnPDAEJfX+jgdIIqCvNPkoo2dAg3Zyr5ETVUgy7D7V7StTZvx4PUhodkoavLtNDV0ez44b7YeOTpxCPdP5619atHoqdGc9Kp35aLRWA0jOH0t/aND1LWamJIMufUfkz6pOn+onAg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lsNRPUyPoGXFTWmhfMdskQU7qYiLj6dSJWnM8T6zHT+P7dxxNkXzRd4E28ot6/A7DcbdG78UTxDh7a/Mp8NLbWIey8G3SDm4s1Je6uQpgHW+7SbQlsublMalHe4x4eqiN4j4lrJ/egVBe/8FaoEq8h+DA9Z95hj/0ObaogMKXvfL7FiWhZP9H4LRSfUj5WfzQTrRB6R+FTp3jo49PRB57YH5paH5mqhKkS0ggdOd+eWnHWc7F3JKDDreZOysetPoXkgLd7VYdO+iJYTYcpvUFhQF4+a0lN/4s7cw5GccIxTn4BHCglCNnW4m3m8LHMlpWUFDr9R+MI9OsNzwV/qLxg==
- Cc: <jbeulich@xxxxxxxx>, <andrew.cooper3@xxxxxxxxxx>, <roger.pau@xxxxxxxxxx>, <jason.andryuk@xxxxxxx>
- Delivery-date: Mon, 16 Feb 2026 11:13:53 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Sat Feb 14, 2026 at 12:51 AM CET, Stefano Stabellini wrote:
> - if ( op->cpuid >= nr_cpu_ids || !cpu_online(op->cpuid) )
> + if ( op->cpuid >= nr_cpu_ids || !cpu_online(op->cpuid) ||
> + !IS_ENABLED(CONFIG_CPUFREQ) )
Largely inconsequential here (and other places in the patch), but I think
IS_ENABLED(foo) should go first in all conditional chains so that any invoked
function in the OR list is skipped. It's likely in this case it doesn't matter,
because cpu_onlin() is a macro that calls a static inline so the whole AST
is known to the compiler, but it's trickier when there's non-obvious extern
functions at play. In those cases the compiler will still make the calls because
it can't know the call won't have side effects.
Thus, as a matter of principle, I think IS_ENABLED() checks should always come
first.
Cheers,
Alejandro
|