From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (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 A69CD1E32D5; Fri, 2 May 2025 22:29:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746224997; cv=none; b=pXRE4cO6hQ4mWIlwbdgaJnhZv3vjL2GbqeBkzzDnSocklJpHSi3Nvvgtfy+zt/H520sKhgpKiuVdtktWm8U34HjbQTaIz8c8K8lgIhvyh+SMoSn4pMFvb26iZuzDMitQ5ZY/ZSwpGWwg+BYrKb6cw+zZLzY6918lozjStZwVFtE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746224997; c=relaxed/simple; bh=12slEHSSydirYvv1zO5VNqnzmBNqIh+tj6oaFB5Imfs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ap7DOYC2hciTacqywOcUD/kCkV2f6owUOGqua1mY8PlQnmXYadVWqbXmS9zzZz6ADUCPjUuP05egKBxmydr4tS5jXQ230tPi6RwU7HrlzUE5nm6VZcxyW9L+SAonotcE8rnoBIOlwUWVqtaFjbuIvqLejULQFQPUVceSuOs7LeA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b=cjD5Za7V; arc=none smtp.client-ip=212.227.15.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=w_armin@gmx.de header.b="cjD5Za7V" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1746224984; x=1746829784; i=w_armin@gmx.de; bh=XOY5mknf5eww30NwncIbeluV8XJxpGodV7W3OS8gW6o=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=cjD5Za7V8M+lejD0s3VxYEQhHItuFx1snseRX4JLJoxRwOV4XUtQ8qBYVuvIx0PP bOsO+dSkPbn2qTcxQh384NkKUMT1of1MljUr5W02LIqZPbUNGH2rE28yjKI5QMDn9 9PpXFR5x9xu7d3QWUCDD4a3TDJBOQyw7Fti9vPkmIGJEcSbjAz05W4Ugzvz5PiE8F 2NDB0Qiy3Lfb/25Vqp86pexBKgFu3WbeApPN+KJgIzCm6e6e5NjSf/VZi67nznt3f lvLqphBJXL2ESYY2ra5k2wGTmhRrhdkp+wPbAEkedsglQWZGkBj/v+85exoN/j+F+ 3pEAwOU/glrhN6z5zQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.0.24] ([87.177.78.219]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Md6Mj-1ukaYV0qqR-00bfTI; Sat, 03 May 2025 00:29:44 +0200 Message-ID: <5cec046e-c495-4517-82c8-83ae3cdb63a1@gmx.de> Date: Sat, 3 May 2025 00:29:42 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/3] ACPI: thermal: Properly support the _SCP control method To: "Rafael J. Wysocki" Cc: rui.zhang@intel.com, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20250410165456.4173-1-W_Armin@gmx.de> <91ea8aed-5f98-4e4e-b3ee-fdc86d54f787@gmx.de> <90cba8fa-e6a9-4dab-a4ea-fa96d570a870@gmx.de> Content-Language: en-US From: Armin Wolf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:S0g7n5IwUOhVBiDy+0LwI6pj2YBzt7DthiJi91tpzvSwhAzyRlG Qz+jHjyTWythb57tH2PqCVwToFGsMLDmRdBFs5z9qbVLFbSjtSMPwFiaOXjfr1xRAkR2VZj ZV3GkSvhAcvp/UjqN/4svAq9QB2Aiu3+Y8SfNO/AcsrOZ/Xh9P9yLEH8QAvmHXY7hiu+Ef6 07fxnOkQk4c6YiJeGwUiQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:NP8dYZINHec=;UQEVBJICDfb59P6qPzwxSFDOPtf v9iA8GS2iUfsookNJ8JuK3TDLJ/JKT6ytn8SjJsl57S+eBhQFV+And/au6ChQImplWBqGBE/0 XyH3p2vtqdju64woM4etZLJtGT+3IBT1zeSuoKId3Ds3sIUzHLMViH+829n4UKVM3zsFVUSEJ HZct18qRyHVRYEFriTUjEONuSkr9Zq7DfBmq3RfEMgJIg/Pvwuegb5ZRxU4qJdUVSOsAOKZGA 0bIDErz26Z2df31be1nNxvLC4gxVXM1VHea+a32qHLPSsE66bBpe5AF6lXVYu6IOxvIFPBOPP chjQWpmZSqGbafCkDs4m6Ny1kuEiR0frxgi1MGKNOnqNeTi8VKidoBiPspTorzisrpj0w1kgV 4Ds+DnyaTyCrK6gbFLrs83eWQ46rIxL/4xOwSsaEvE2SEET+deftZ0b9WncfbUZKGvJ/tp8XB P575jWJVNV44ExAYGt2xwouorBAJCXXvtak6yvpwdqpU8nLXgsVPL1Skf/HnCvFzmGcFasCjr 6fGWp76lExjriOpocw95XgkDq8h/sDWzSlePCi0kXoPBtPssTTzt36Q2dlUHhdXwn3uYztQxH +hE4MPryH0EyDn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n5DqDLkYXKlzxlAqewYR19C7gTo7S3s HWTGMsTJu0MYBnjho99A+/9hpUN8UQrl2brsLSiJmdeHyaMKRF7s17S6WwMl4FpYxyJib2Bwp CPGuSoP/PR/WHQ6IBJYsgT/EzGFzJd/YOgIK9kclKOHnymn/Rq/myuYLWqAUGZiB7WEaKIY24 jHU13gStCcXEnxaM3X4tHNB/p8cSwrnO+przusWxBiIIFFeuWM6ckDFSbi3c85OA4seREJfe2 fDHcYovKPok6gZHhAuqAFxvux++lehiLn8fNOTcRa1zi7ntkhUfkT8Llufx9cihF5o1qnptSt jsWcG9Cn/WEs0zzA9UYg/++zKUoawJrOV1w+fzA/35M Am 28.04.25 um 14:34 schrieb Rafael J. Wysocki: > On Mon, Apr 28, 2025 at 2:31=E2=80=AFPM Armin Wolf wrot= e: >> Am 27.04.25 um 00:52 schrieb Armin Wolf: >> >>> Am 26.04.25 um 15:12 schrieb Rafael J. Wysocki: >>> >>>> On Sat, Apr 26, 2025 at 1:20=E2=80=AFAM Armin Wolf w= rote: >>>>> Am 10.04.25 um 18:54 schrieb Armin Wolf: >>>>> >>>>>> The ACPI specification defines an interface for the operating syste= m >>>>>> to change the preferred cooling mode of a given ACPI thermal zone. >>>>>> This interface takes the form of a special ACPI control method call= ed >>>>>> _SCP (see section 11.4.13 for details) and is already supported by = the >>>>>> ACPI thermal driver. >>>>>> >>>>>> However this support as many issues: >>>>>> >>>>>> - the kernel advertises support for the "3.0 _SCP Extensions" >>>>>> yet the >>>>>> ACPI thermal driver does not support those extensions. This m= ay >>>>>> confuse the ACPI firmware. >>>>>> >>>>>> - the execution of the _SCP control method happens after the dr= iver >>>>>> retrieved the trip point values. This conflicts with the ACPI >>>>>> specification: >>>>>> >>>>>> "OSPM will automatically evaluate _ACx and _PSV objects aft= er >>>>>> executing _SCP." >>>>>> >>>>>> - the cooling mode is hardcoded to active cooling and cannot be >>>>>> changed by the user. >>>>>> >>>>>> Those issues are fixed in this patch series. In the end the user >>>>>> will be able to tell the ACPI firmware wether he prefers active or >>>>>> passive cooling. This setting will also be interesting for >>>>>> applications like TLP (https://linrunner.de/tlp/index.html). >>>>>> >>>>>> The whole series was tested on various devices supporting the _SCP >>>>>> control method and on a device without the _SCP control method and >>>>>> appears to work flawlessly. >>>>> Any updates on this? I can proof that the new interface for setting >>>>> the cooling mode >>>>> works. Additionally the first two patches fix two issues inside the >>>>> underlying code >>>>> itself, so having them inside the mainline tree would be beneficial >>>>> to users. >>>> Sure. >>>> >>>> I'm going to get to them next week, probably on Monday. >>> Ok, thanks. >>> >>> Armin Wolf >>> >> I am a bit ashamed of myself but i think we need to put this patch seri= es on hold after all :(. >> >> The reason of this is that i am confused by the ACPI specification rega= rding _SCP: >> >> 11.1.2.1. OSPM Change of Cooling Policy >> >> When OSPM changes the platform=E2=80=99s cooling policy from o= ne cooling mode to the other, the following occurs: >> >> 1. OSPM notifies the platform of the new cooling mode by runni= ng the Set Cooling Policy (_SCP) control method in all thermal zones and i= nvoking the OS-specific Set Cooling Policy interface to all participating = devices in each thermal zone. >> >> 2. Thresholds are updated in the hardware and OSPM is notified= of the change. >> >> 3. OSPM re-evaluates the active and passive cooling temperatur= e trip points for the zone and all devices in the zone to obtain the new t= emperature thresholds. >> >> This section of the ACPI specification tells me that we need to evaluat= e the _SCP control method of all ACPI thermal zones >> at the same time, yet section 11.4.13. tells me that each _SCP control = methods belongs to the individual thermal zone. >> >> The reason why i am concerned by this is because Windows adheres to sec= tion 11.1.2.1. and only exposes this setting >> as a global tunable. This might cause device manufacturers to depend on= this behavior and lead to strange things >> should two thermal zones have different _SCP settings. >> >> I will ask the UEFI mailing list which behavior is expected by the ACPI= specification. Until then i suggest that >> we put this patch series on hold. > Sure, no problem. > > Please resend it when you think it is good to go. > > Thanks! Alright, the UEFI mailing list gave no response, so i am kind of stuck. It seems that many firmware implementation only have a single cooling poli= cy register which is set by all _SCP control methods inside the whole syst= em. The reason for this seems to be that Windows threats this setting as globa= l, but the ACPI specification seemingly does not directly mandate this. Do you thing we should take the risk and allow users to control each _SCP = instance manually? Apart from that the first two patches should be safe, so you can still pic= k them. Only the last patch needs some more work. Thanks, Armin Wolf