Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5273687pxj; Tue, 22 Jun 2021 20:12:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6Qaahvl2YYt66lasn50Y8CJMXLASla0OpeFXR5IYJaA4WWT016DCivrPTQ7GF72x/I/A9 X-Received: by 2002:a50:fb01:: with SMTP id d1mr9360683edq.347.1624417938195; Tue, 22 Jun 2021 20:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624417938; cv=none; d=google.com; s=arc-20160816; b=Mf9VXdXb3zdaXnIIRqXM78gWgWJ5ECo5XMxEouCN5xfzBGBPKYg2Q/5n799G80ZK70 AP269RvA/B89p6wskQLv7EB5neSYqlJXeApUW6Ez4Lr3VOBbxRe9uRLNapZQq1mLtaxm mGkcChdsWi2QPaH0DCEmxJDZAvv0N1cShmdrDDPhvPLBPGya1uGCP7dcJ94W3aBaiA1m mTd5qolhYobYgGJaCv0A7X+ynnRVJAQIsrRApCJSuVOaIsiqLXWN5e30A/qjrRAlgpAV 5i8CGvqogt76GU+E/XDOKOWf61HHVFudqEa4GuEOyGf9PtwEgoWCewrcCVSzkel7iBBx PSEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=X0gPs/cs8YvnQjVNndlg//nehJAxA2/r7AIcl6qRSJw=; b=oC1N6MKtSYOfCZFwOTCenDJRK/K+82YutIz4wtopHk36mgKl7acYfG977+v6mFDthd I78LqjbJlxKIc4AbBHdo4XgN8teqi/6B7SB+th7jiT4Q6Kydjjgas+tDg0fu9w81FsH3 XmqnnW/1LFQtiVv6Xe+ifXDVI4PqbkvHNo/FCIZ/Gg+Twc3IgpzQOEwG8lf2rOdque6H l0TasFlO+GJ8n5A3ozzH0N7ZKUNoRjFi3EyMaXJ//TDA/2HdTsOU6nEZ7RllrDvvGbDk l/I1yM/j5sgAgYxzf0eRr8RC2FVqwz4aNBrRVhvwkILMG9dL7rVzo/8r3k6Wbhh9KbH6 Rcuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wpfhEedf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nc38si15151779ejc.708.2021.06.22.20.11.55; Tue, 22 Jun 2021 20:12:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wpfhEedf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229774AbhFWDNN (ORCPT + 99 others); Tue, 22 Jun 2021 23:13:13 -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-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