From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6CAEC2B9F4 for ; Wed, 23 Jun 2021 03:11:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9503061374 for ; Wed, 23 Jun 2021 03:11:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230272AbhFWDNO (ORCPT ); Tue, 22 Jun 2021 23:13:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbhFWDNM (ORCPT ); Tue, 22 Jun 2021 23:13:12 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69F48C061756 for ; Tue, 22 Jun 2021 20:10:55 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id p9so572111pgb.1 for ; Tue, 22 Jun 2021 20:10:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=X0gPs/cs8YvnQjVNndlg//nehJAxA2/r7AIcl6qRSJw=; b=wpfhEedfhZcJ6o7g7lFoOV4VkVD/dYlAckXkDcsS8MHNP8iNBhshJtmdcdsVFRknCy ekPFziu3c6jKykAou/RtZewHx0KJk5/kr/pmKqQOjDngYzDTLa3HVc1qbR8m6gJJajmA iPGV9W4iLR0dr8qx5/XG+eZpULi86fAU7/Nrc7iyzTiJee5RB0xgyvok2nWxEuqKZmRp qDpNj86TgJxYYO4QReHiuWrqjSlY70SXX9zV8c9SXo58gmzvvvpbEcMEhwnf+MeoBMxc 7zgtfdMmPEyiC5p5oXuqm6gKOUJRtV6+yffa058IjKUgpTF3BMR0ijAtgwoXmmzIHwTy yvjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=X0gPs/cs8YvnQjVNndlg//nehJAxA2/r7AIcl6qRSJw=; b=aN1JDP/zQ7AY+jKBC9akDnvUs2Mq8PnRmu23Wag1ZIqcGCfN1muneXhpkVG4lsMcQy B46dhw6aHSL4y1d98/sJaaKZj3N5cZNijCNiMXk259K7DJJWQRVn2kamBooS8kzWj5tF fepc101Hm+LRkcBsQCBq2m31rLzlNk3+fZaUpSg7ick9HEuqhSCOr1OEPKjxYjWGMsdo THYNi4ZQ03y4hvmOxWCTh1wov411Ekzjp3cDK/qmuxr+d7iJbx0Bmvh5Fu1niTVK1h9e l/AP4+rHh6XtfolKOTyHRAxCKaEMV87kklblUzcmpC2JysvTB4YKE8481FbyeOnjVGVp nk8Q== X-Gm-Message-State: AOAM533oTWscP4ijhhHsAFu4U4tk5UXDG2FVD36Acb4zOkt97F+IaFNx 1iPhEtH1ak82x2CbmPCfg8YFaQ== X-Google-Smtp-Source: ABdhPJyy3UQ9Fcvn1OWMeug2nlY5olK42S2yBzsHOzX5nuv98ZPVPdeGAxStLE4FLbrDL0wQ/IqH+Q== X-Received: by 2002:a05:6a00:c2:b029:2ee:9cfc:af85 with SMTP id e2-20020a056a0000c2b02902ee9cfcaf85mr6680704pfj.78.1624417854712; Tue, 22 Jun 2021 20:10:54 -0700 (PDT) Received: from localhost ([136.185.134.182]) by smtp.gmail.com with ESMTPSA id f17sm20974482pgm.37.2021.06.22.20.10.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Jun 2021 20:10:54 -0700 (PDT) Date: Wed, 23 Jun 2021 08:40:51 +0530 From: Viresh Kumar To: "Rafael J. Wysocki" Cc: Linux PM , LKML Subject: Re: [PATCH v2] cpufreq: Make cpufreq_online() call driver->offline() on errors Message-ID: <20210623031051.xsbcug5erbgvzjde@vireshk-i7> References: <11788436.O9o76ZdvQC@kreacher> <5490292.DvuYhMxLoT@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5490292.DvuYhMxLoT@kreacher> User-Agent: NeoMutt/20180716-391-311a52 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22-06-21, 21:11, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > Subject: [PATCH] cpufreq: Make cpufreq_online() call driver->offline() on errors > > In the CPU removal path the ->offline() callback provided by the > driver is always invoked before ->exit(), but in the cpufreq_online() > error path it is not, so ->exit() is expected to somehow know the > context in which it has been called and act accordingly. > > That is less than straightforward, so make cpufreq_online() invoke > the driver's ->offline() callback, if present, on errors before > ->exit() too. > > This only potentially affects intel_pstate. > > Fixes: 91a12e91dc39 ("cpufreq: Allow light-weight tear down and bring up of CPUs") > Signed-off-by: Rafael J. Wysocki > --- > > -> v2: > * Avoid calling ->offline() after a failing ->online(). > * Add a comment regarding the expected state after calling ->init(). > * Edit the changelog a bit. Acked-by: Viresh Kumar -- viresh