Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1CBFC433EF for ; Fri, 26 Nov 2021 19:38:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237703AbhKZTl7 (ORCPT ); Fri, 26 Nov 2021 14:41:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236843AbhKZTj7 (ORCPT ); Fri, 26 Nov 2021 14:39:59 -0500 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FD89C06137F for ; Fri, 26 Nov 2021 11:10:26 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id d11so20504032ljg.8 for ; Fri, 26 Nov 2021 11:10:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telus.net; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v/nUUlQokdOLB5PSt1hTFYmsrGcrpyJxvqeThYufta0=; b=K9WBxs+3np+gSoWZtnavrHrjriDztJXlfxsI+dVokPvfBqmrSfb5XN/a0ceS/YRmwx RTsKXMs91VEb4IYWDICy+Bl/3ZkLpDcIAtgZz2BZ0gb+rpCBHDMqW0ncoau1t1QtUryi 9+588tQ+Tz6al9+xOamT/hukkPvcb8c+43yXYg9R8dWHCNdOhzK8j4O/r4CpRLMTRsG/ KEoDFJU2hKMh/xhRm+G68JBEBVN+WU67Y5KhDlmvyGwmF+2PjlrLI+yRJAOmbQI565ql czJwKsOe7kG/dfVG2MUAnQz/p6UXOHVj7NUaGpyPTn138d3x1SJuPEnbf94sN6VsC9G4 MdpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v/nUUlQokdOLB5PSt1hTFYmsrGcrpyJxvqeThYufta0=; b=a3cq/laafC62Q6hp+T7Q0cY+jpU2lY+1YlxKFmYSv1OuXzxhnvA2w6Do3zy/OjIxL4 5akTQMnm2Y6kNBgSxD0fz+lPCSinJuEY+0P/8pxfxJ/3xlLKQskoiAKaLfyxkOTa2xXC l+/UWE7I2J1hCgovmEZsixzQr0JqWSqIs+svkDflBE0+iczhzFa+rhJIu8AlH6xflXWv N/kBA9NQsfgz7rlEl9VtN0Dem9/SP720qR65+5DM0w2BN9YW20hMM90XhYtqNK4yGhCE jGIE0Q+lhmO1erTXTnoe6+xyDZG5lEtlu/HNC6TflwjThYkJdB3XxaiIxJYdPwd2Pgnl GjDQ== X-Gm-Message-State: AOAM530ADCutkZk3WPhoxB3kxTtqYPvaJfJU1BTmDEOwuGcJvV9HW6zo a40Ah7E6kmTApC04F9+InxMAaKrv7cQJF5NHMjigikiBecDTUA== X-Google-Smtp-Source: ABdhPJypBSwqOQ9WVkGSOuyRXqzgnhCvnOD4ehYZQOCksgsTkpoE/ivcICzXSabIi1UMQ2sEmf33ofWhsDG7jedcxpQ= X-Received: by 2002:a2e:9e08:: with SMTP id e8mr32848587ljk.472.1637953824609; Fri, 26 Nov 2021 11:10:24 -0800 (PST) MIME-Version: 1.0 References: <20210401183654.27214-1-daniel.lezcano@linaro.org> <20210401183654.27214-3-daniel.lezcano@linaro.org> In-Reply-To: From: Doug Smythies Date: Fri, 26 Nov 2021 11:10:14 -0800 Message-ID: Subject: Re: [PATCH v6 3/7] powercap/drivers/dtpm: Simplify the dtpm table To: "Rafael J. Wysocki" Cc: Daniel Lezcano , Linux PM list , Linux Kernel Mailing List , Lukasz Luba , Greg Kroah-Hartman , dsmythies Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 26, 2021 at 9:22 AM Rafael J. Wysocki wrote: > > Hi Doug, > > On Fri, Nov 26, 2021 at 6:08 PM Doug Smythies wrote: > > > > Hi Daniel, > > > > This patch introduces a regression, at least on my test system. > > I can no longer change CPU frequency scaling drivers, for example > > from intel_cpufreq (A.K.A intel_pstate in passive mode) to intel_pstate > > (A.K.A. active mode). The task just hangs forever. > > > > I bisected the kernel and got this commit as the result. > > As a double check, I reverted this commit: > > 7a89d7eacf8e84f2afb94db5ae9d9f9faa93f01c > > on kernel 5.16-rc2 and the issue was resolved. > > > > While your email is fairly old, I observe that it was only included as of > > kernel 5.16-rc1. > > > > Command Example that never completes: > > > > $ echo passive | sudo tee /sys/devices/system/cpu/intel_pstate/status > > > > syslog excerpt attached. > > This looks like it may be problematic: > > diff --git a/drivers/powercap/dtpm_cpu.c b/drivers/powercap/dtpm_cpu.c > index f6076de39540..98841524a782 100644 > --- a/drivers/powercap/dtpm_cpu.c > +++ b/drivers/powercap/dtpm_cpu.c > @@ -204,7 +204,7 @@ static int cpuhp_dtpm_cpu_online(unsigned int cpu) > return ret; > } > > -int dtpm_register_cpu(struct dtpm *parent) > +static int __init dtpm_cpu_init(void) > { > int ret; > > so please try to remove the __init annotation from dtpm_cpu_init() and > see if that helps. Hi Rafael, That did not fix the issue. Just to be clear this is what I did, on top of 5.16-rc2: $ git diff diff --git a/drivers/powercap/dtpm_cpu.c b/drivers/powercap/dtpm_cpu.c index b740866b228d..26d1a87bdec6 100644 --- a/drivers/powercap/dtpm_cpu.c +++ b/drivers/powercap/dtpm_cpu.c @@ -231,7 +231,7 @@ static int cpuhp_dtpm_cpu_online(unsigned int cpu) return ret; } -static int __init dtpm_cpu_init(void) +static int dtpm_cpu_init(void) { int ret;