From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.100 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796092216; b=PMFcHnbzTIir4AB2ZOFaBQOENCfJT4t6O3yqmM4YdeevF6mnFy4PtbHSAYatjf9o2cuI HYVTc7H2Rr9CLbOHpKoRoFv9L5qSAujq/1+CbDbiRzVaTMmiBJPER7S5PXTJnszdZnonV c9tHxZn4iRedL6/JL7iPSrZjTTVkLW42jBNM+J+XsKf4ja/ZOTKtZTahvjci0trj/Wcvu Eq+2R0BBHvMSn4nrp3wcaQkrg+geUvtjJvhfBaZpZkLBvvmdqgA5cOXg+LNah4z89Esaw Hm9O2wvJN14QOPcZPZSet6LuXJS9z7AYwjmPK3EGJ5AwvdtCLXPGCpvPCcLSI5xUdqg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796092216; h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:From:To:Cc: Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=Ij4c0jokrYopi+w8005/sfpOTE7o14nykhd//oO0jAw=; b=Faq91M4aVO6gZ2wE1qXWSxe3U4ORS3Rq6by/isGGKmxuLA1psd9d7or86ELqaXPehLjB 6AQoh7lc9EWqiGpHQmc1cMTLgGqCkVuRYQ79TF2mcBeKeE+phrNxxb5g3zD25DZcJ5Xqs KSsnblaPxE6jEKHa+CqNJt4XOyqYTeZ0ZNFNzpljtJgVHeUM8AK1YmIlyzT67b86gXA9a OqYduI/YHyH62vnCE/JV4178AIiFijELyhkvTzyXJrelhuIf6R6EYevS9fo/PIE9g6Me9 FN2t5SLSwuLOOrxWbzbUlVsLBYueAqSizK0aTEZ1fqtauX1W8/axENroPrrkxTVvHrw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=bF52zW7b; arc=none smtp.remote-ip=115.124.30.100 Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41E67606A31A; Tue, 1 Dec 2026 02:30:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 41E67606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=bF52zW7b DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1796092212; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=Ij4c0jokrYopi+w8005/sfpOTE7o14nykhd//oO0jAw=; b=bF52zW7b5m+dkMA3RqV1YSuGOqROeQpgqUdFWx1pJzwW6QMIG7oWNRkzX4lh6AMHIf/KmCL1WMfkwm2KyDZ/Z5jcI1d9VSYIlMs6W3S62O90+cIfxNJKVCMcV7Gq3MKPL3PftV+PS4kGp3ybHouR9cWUNpnyZxrgW+g8n6K64rA= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045144198;MF=jiangtianfeng@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0XFrUtcJ_1796092203; Received: from h68d07384.sqa.eu95.tbsite.net(mailfrom:jiangtianfeng@linux.alibaba.com fp:SMTPD_---0XFrUtcJ_1796092203 cluster:ay36) by smtp.aliyun-inc.com; Tue, 01 Dec 2026 10:30:11 +0800 From: Jiangtian Feng To: rafael@kernel.org, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, zhongqiu.han@oss.qualcomm.com, christian.loehle@arm.com, ananthu.cv@oss.qualcomm.com, pierre.gondois@arm.com, zhangpengjie2@huawei.com, zhenglifeng1@huawei.com, zhanjie9@hisilicon.com Subject: [PATCH v6 0/2] cpufreq: Keep global boost enabled after partial enable Date: Tue, 1 Dec 2026 10:29:59 +0800 Message-ID: <20261201023001.1131130-1-jiangtianfeng@linux.alibaba.com> X-Mailer: git-send-email 2.47.3 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series treats global boost as a persistent permission that userspace can configure even when no active policy currently supports boost. The first patch initializes ret to 0 so the no-active-capable-policy case records the requested setting and returns success. The active-policy loop is unchanged: active, boost-capable policies are still updated through policy_set_boost(), and real callback failures are preserved. This intentionally removes the no-policy -EOPNOTSUPP result introduced by 77cf053b041f, which userspace sees as an -EINVAL write failure. This also handles the CPPC default-enabled case: userspace can disable boost before a capable policy becomes available instead of having a failed write leave the global permission enabled. The second patch is the existing partial-enable change. If enabling at least one policy succeeds before a later failure, global boost remains enabled so that the valid mixed per-policy state remains locally repairable. Disable and no-success failure paths retain their previous behavior. Base: Linux v7.4-rc5 fe6ff8d5d675c01793b9f051d16055dd4aa75244 Changes in v6: - Simplify patch 1 to ret = 0, restore for_each_active_policy(), and drop the v5 any_boost_supported tracking. - Explicitly document the intentional no-policy ABI change from 77cf053b041f and the CPPC default-enabled motivation. - Keep patch 2 code unchanged and add Pengjie's Reviewed-by. Previous version: https://lore.kernel.org/all/20261130111348.363810-1-jiangtianfeng@linux.alibaba.com/ Pengjie's default-enabled review: https://lore.kernel.org/all/467b9ef5-1fc3-4771-9895-363e815670c7@huawei.com/ CPPC default boost change: https://lore.kernel.org/all/20261118013558.3075038-1-zhangpengjie2@huawei.com/ Validation: - ARM64 W=1 build of drivers/cpufreq/cpufreq.o with Buildroot GCC 13.3.0 and binutils 2.43.1. - Complete ARM64 Image build; size 43,010,560 bytes, SHA-256 d8bd08acc9584356805575d8b7fcbf758b85d2173787df23c11c71faf4525953. - Static state-matrix and policy-list locking/lifetime review covering no-policy, no-support, inactive-capable, active success/failure, partial-enable and subsequent online behavior. - Independent review found no High/Medium/Low functional code issue in the two-patch candidate; the commit-description findings were corrected. - Final signed patches: checkpatch 0 errors and 0 warnings for both patches. NOT_RUN: - CPU hotplug, suspend/resume, driver unregister/global-write concurrency, lockdep and KCSAN testing. - CPPC, ACPI, AMD and ARM hardware frequency/QoS testing. - Runtime fault injection for policy_set_boost() failures. - The existing policy-online callback-failure handling is unchanged and is not claimed to be fixed by this series. Qoder, an AI coding assistant, helped analyze the review history, design and draft the preparatory change, and review the state matrix and failure paths. The submitter reviewed the resulting changes and is responsible for the final validation and submission.