Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5922074rwl; Tue, 11 Apr 2023 11:53:45 -0700 (PDT) X-Google-Smtp-Source: AKy350aPG4RI1B/mTVcQpNlVD7GFtZ4RC/u+GPHbtwAhzWzVx3QxGXRG4xw3/qPRp7sRifH+W380 X-Received: by 2002:aa7:cf8f:0:b0:502:30e6:1e65 with SMTP id z15-20020aa7cf8f000000b0050230e61e65mr3033270edx.12.1681239224761; Tue, 11 Apr 2023 11:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681239224; cv=none; d=google.com; s=arc-20160816; b=HAeYQmHJ5ARE/kU7/rogw7LVVXfib8ikQ+r4032vlOgW95MrKLBNLUfkaezrSFr9+4 oJRd9jLBbD8GJ8MCJ2qoJ6O+S94JERch8i4h+UJuZDH5Yc2pK6g+letRkWjdZx+/eVLC b/SEfVJOgMJAP7GIhjcZdW0OEslS7wgKvUrZGJo7oTtz7P/Wbl0H26VblniwkSHl4LeA Lw7Sa2DmnfUIvCkwm1ouHEiHL7gY1xgMTdcYNhxY45Dvw4NYwtMuRp9eGIOvDPJKbov2 qVmaY85ufcZJcT0Qh7ity3jrZVHnJpJYMjvewjg5BYkXRiO4KrZXxsF0jAkuLrWsoqyL N9bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=Up6ZdZarIQOWZfypljYtwkcXaDrBaMn1K2mAs13rTTQ=; b=0XAakmbt9r3soH6cE1VqnjHzEwHmmfNiBG1ny/YiFeV+IhdF7nXq/JJItea+TQxdML aBMMXITYYZ8JTHf7GsYzct7iie+uXPzGizOCkheiQ9hZhsucE1yg8+fI0JQxk/m2T415 fLqbwB1GpnI2Fqo0PmnUFPupfpcvCjKkl8rejA030Ozs9fVI1av3cKLbwXDP4y9yn79S yu5FMEz5lNJHu7maF06Baa2OXyt3H9GXBS5krPRk/sU+nxxVvK6ZNDGlQJj5i4KvOqRs AWOC+Fhx0rA30Fu/iMHfexioqI6tmOESV+oTwAy4vNJfipM0/A2SuoIMc4SycljijIZa Sfkw== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k5-20020a1709063e0500b0094a5e213098si685716eji.729.2023.04.11.11.53.18; Tue, 11 Apr 2023 11:53:44 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229877AbjDKSuE convert rfc822-to-8bit (ORCPT + 99 others); Tue, 11 Apr 2023 14:50:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbjDKSuC (ORCPT ); Tue, 11 Apr 2023 14:50:02 -0400 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7038ED; Tue, 11 Apr 2023 11:50:01 -0700 (PDT) Received: by mail-ej1-f46.google.com with SMTP id j17so13216129ejs.5; Tue, 11 Apr 2023 11:50:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681239000; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w+TaIaODjml5dEA7Y057pqtaYonpYR4Ushac5ObDGuw=; b=YHwjGeBM16wwcHV/iUWUQ9GcYaTNJRSiqIPr9YQBIeLJv3VNrCfn+FSgRd4pYmrn1/ PtGsMrdssgMpJQ11Wzh8TyRV4zjCzjumfKDMDzRuQlCWdySDV4vk5E9GyXT8AzDdO8k+ qwrpEZ4nBEYVXmlKSHa6wa0CeQiVipMQfCE2FfNFHhIC049Lr5/iXUyI/oTkK72wrB2Y yKAFJS6Xa0dRKtGLG8kpBroNSgK0BE+2XUNUDOoKMNIbK9vLt+qlAlBiwcBBCOhKlwnW rxYOV3PSh/8ZVGpv76OQ095Jp89rhiq+Hu4O7VIO1PDTYWhXegmhIuM48TtLQV3/0PZ3 VBdA== X-Gm-Message-State: AAQBX9c0DNYUnAz4hW9FzqMVxh6n2LN+CH2g3qblRtKFTIE1BJwaiUAM GcYEGiPjS90gpgmWb0IfXQRG2ulf0NBILobwz1Y= X-Received: by 2002:a17:907:8a0e:b0:94e:7ce:4d1f with SMTP id sc14-20020a1709078a0e00b0094e07ce4d1fmr1944566ejc.2.1681239000272; Tue, 11 Apr 2023 11:50:00 -0700 (PDT) MIME-Version: 1.0 References: <20230330141314.1364083-1-wyes.karny@amd.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Tue, 11 Apr 2023 20:49:49 +0200 Message-ID: Subject: Re: [PATCH] amd-pstate: Fix amd_pstate mode switch To: Wyes Karny Cc: "Rafael J. Wysocki" , viresh.kumar@linaro.org, ray.huang@amd.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Alexey Kardashevskiy , Mario Limonciello , Perry Yuan Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=0.5 required=5.0 tests=FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no 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 On Fri, Mar 31, 2023 at 12:18 PM Wyes Karny wrote: > > On 31 Mar 11:11, Rafael J. Wysocki wrote: > > On Fri, Mar 31, 2023 at 8:12 AM Wyes Karny wrote: > > > > > > Hi Rafael, > > > > > > On 30 Mar 20:19, Rafael J. Wysocki wrote: > > > > On Thu, Mar 30, 2023 at 4:13 PM Wyes Karny wrote: > > > > > > > > > > amd_pstate mode can be changed by writing the mode name to the `status` > > > > > sysfs. But some combinations are not working. Fix this issue by taking > > > > > care of the edge cases. > > > > > > > > > > Before the fix the mode change combination test fails: > > > > > > > > > > #./pst_test.sh > > > > > Test passed: from: disable, to > > > > > Test passed: from: disable, to disable > > > > > Test failed: 1, From mode: disable, to mode: passive > > > > > Test failed: 1, From mode: disable, to mode: active > > > > > Test failed: 1, From mode: passive, to mode: active > > > > > Test passed: from: passive, to disable > > > > > Test failed: 1, From mode: passive, to mode: passive > > > > > Test failed: 1, From mode: passive, to mode: active > > > > > Test failed: 1, From mode: active, to mode: active > > > > > Test passed: from: active, to disable > > > > > Test failed: 1, From mode: active, to mode: passive > > > > > Test failed: 1, From mode: active, to mode: active > > > > > > > > > > After the fix test passes: > > > > > > > > > > #./pst_test.sh > > > > > Test passed: from: disable, to > > > > > Test passed: from: disable, to disable > > > > > Test passed: from: disable, to passive > > > > > Test passed: from: disable, to active > > > > > Test passed: from: passive, to active > > > > > Test passed: from: passive, to disable > > > > > Test passed: from: passive, to passive > > > > > Test passed: from: passive, to active > > > > > Test passed: from: active, to active > > > > > Test passed: from: active, to disable > > > > > Test passed: from: active, to passive > > > > > Test passed: from: active, to active > > > > > > > > > > Fixes: abd61c08ef349 ("cpufreq: amd-pstate: add driver working mode switch support") > > > > > > > > > > Acked-by: Huang Rui > > > > > Reviewed-by: Alexey Kardashevskiy > > > > > Signed-off-by: Wyes Karny > > > > > > > > > > Cc: "Rafael J. Wysocki" > > > > > Cc: Viresh Kumar > > > > > Cc: Mario Limonciello > > > > > Cc: Perry Yuan > > > > > > > > This is all fine, but you need to tell me how it interacts with the > > > > amd-pstate changes in linux-next. > > > > > > > > Does it affect the code in linux-next at all or is it only for 6.3-rc? > > > > > > > > > > This is only for 6.3-rc. > > > The commit 3ca7bc818d8c ("cpufreq: amd-pstate: Add guided mode control > > > support via sysfs") in linux-next may not apply cleanly after this fix. > > > Please let me know if I need to rebase and send the guided mode patches [1]. > > > > > > [1]: https://lore.kernel.org/linux-pm/20230307112740.132338-1-wyes.karny@amd.com/ > > > > Well, instead, you please let me know how to resolve the merge > > conflict between the patch below and your series. > > > > Can I simply assume that the code added by commit 3ca7bc818d8c > > replaces the code modified by the $subject patch? > > Yes, commit 3ca7bc818d8c replaces the whole `amd_pstate_update_status` > function with new implementation. OK, thanks! $subject patch has been queued up for 6.3-rc7, thanks!