Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5312716pxj; Tue, 22 Jun 2021 21:25:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUTwQQCXcTFSgiBUJ7ugV+eA3G/f1OrW8a3HGcTHL6UYw6qiLUHQMIOTZeHCTVMeEEfQ/S X-Received: by 2002:a05:6602:188:: with SMTP id m8mr5477345ioo.201.1624422337897; Tue, 22 Jun 2021 21:25:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624422337; cv=none; d=google.com; s=arc-20160816; b=cozYWBveyo3q1vOoPOXsW9eVT4SErsEDhejBfzbtkgFaG3ectcEbzeQd4wYDBKg2S4 Z7VHd39UNtcZddu7BJ+oq/pXxRSXfUGvZADrm7DH0ggsp+37T086GXSrKK989/zZjyfH fDaDOHWTFcOz3CsY+xmQh5Yr9h2nW2guOZr0282gP86v8UFr9dcHwY9689fMmv1BfLk8 irq1F+XsAS59f9vFnpZ1E7Guyyt+vy3eKPGkGX9lcCP+AW0V+nPTquTFHTqIwwBpOC53 1iuMgsgBOIN96QUHdJ8BbodjtqHQdufnD8WIh6Na0ar+xh8Lz11QeKfz7vDgpLe5tVAt UeUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gou6rZ1fClnIKlq6Cu8N3kM3E3lWreX0Ru3iix00OOg=; b=yPsp4Haj8fA37BCldKB7NOq/SbABPNyo7xMW1n1bW1RTAeyezvls/niFJ6XtQ2pJOJ VUHvZe5eN0sLBXC2pxbs99Big4t2gCre1iSCjWImmsg4youCor4ySCjdcWN87T5OoYJZ n8zkYQXxQF9X7G3g7ChkQRFSvt1AcfTHX+MSXuSND0pmfKtm3ML8hm4Msm+B/4Ydox7e BiyEaPjYs1aX63rat7iGKVt0yHp1YPXrQnoNoLPv38RfglU1Pv6IEyF9MktzJyOOu7ci E3iZe+6oZ4G+JL2eJP5PE616/sVgowD11i5AX9cDdwPCaP4J37HcpON6UKO9YqF6+i1A IxlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Yk45k7i+; 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 y7si7790479ily.44.2021.06.22.21.25.26; Tue, 22 Jun 2021 21:25:37 -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=Yk45k7i+; 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 S229938AbhFWE1O (ORCPT + 99 others); Wed, 23 Jun 2021 00:27:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbhFWE1N (ORCPT ); Wed, 23 Jun 2021 00:27:13 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D0562C06175F for ; Tue, 22 Jun 2021 21:24:55 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id a2so676707pgi.6 for ; Tue, 22 Jun 2021 21:24:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gou6rZ1fClnIKlq6Cu8N3kM3E3lWreX0Ru3iix00OOg=; b=Yk45k7i+nKXIrumvirg4IqL1aBpbj1sB2EW5lDMY7mla0i7rjMxwlcIgPNXjinslmj ugsDMLwLFfREcqd7ii8nvlAUoJvREVNKSVh1AdcoWC3XjARJ7QGoL9L7mB7R/EcJPanP W9/yIzNUW6VQgSEzPWFHTBxz7MKxgYyL8bbqJpm35IFk8OxSLo9/AHb6xtU5GX9Am81D kIBVuANU47QyJrAInAEDdBC+4WkY5GHvqInPMMhyEdXtuuHnVx9LNJ/l4/hiCW3OdFbX NUlecpupFDfgH0hEqZTYsNc5I20FzYcLRquq99SDTmzJC5nyajkqAreMfq4JvA0JmfXS hIBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gou6rZ1fClnIKlq6Cu8N3kM3E3lWreX0Ru3iix00OOg=; b=Er6bBaSS0q9Yj3a1dTDFT5L/PqRicTaBBNFyBgVuxgGsjFir40ioc0um282NIfeVKv oTGRqoDHeYXwX1+/hLNgIit953sz8cGPfgeY7dmX/iZRSC2em0j1I9XlZl1a/KsT1xcv e6aimMro09ljr+JFSlG3KWi8yeWstXtT3DCRhqvrrb1TIw+mYiDraJkTWao13JWvLJKx 75MyvrGUbFlahp3u83lJI+baNmnKrLh7nqpjjKSFcJYKpEiWXEsNzX+0izJeJvAqQway wZgka0YynGSNGx5iV6LaArkUgfvrrhaUphTD03rFO9REuVPabn6hoxYR/RtVbvYIs98k FwEQ== X-Gm-Message-State: AOAM532u19d+T+UQZwmZZpv7A8lLeUf/j9hAt0C9h1X2GbRT8qWrdhvA +nPAmlFQg5LirQIbQX5Q1V3IIg== X-Received: by 2002:aa7:8d86:0:b029:2ec:82d2:5805 with SMTP id i6-20020aa78d860000b02902ec82d25805mr54120pfr.11.1624422295255; Tue, 22 Jun 2021 21:24:55 -0700 (PDT) Received: from localhost ([136.185.134.182]) by smtp.gmail.com with ESMTPSA id u21sm779531pfh.163.2021.06.22.21.24.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Jun 2021 21:24:54 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Alex Shi , Benjamin Herrenschmidt , Jonathan Corbet , Len Brown , Michael Ellerman , Paul Mackerras , Srinivas Pandruvada , Viresh Kumar Cc: linux-pm@vger.kernel.org, Vincent Guittot , Dirk Brandewie , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH V4 0/4] cpufreq: Migrate away from ->stop_cpu() callback Date: Wed, 23 Jun 2021 09:54:38 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rafael, These are based on your patch [1] now. commit 367dc4aa932b ("cpufreq: Add stop CPU callback to cpufreq_driver interface") added the stop_cpu() callback to allow the drivers to do clean up before the CPU is completely down and its state can't be modified. At that time the CPU hotplug framework used to call the cpufreq core's registered notifier for different events like CPU_DOWN_PREPARE and CPU_POST_DEAD. The stop_cpu() callback was called during the CPU_DOWN_PREPARE event. This is no longer the case, cpuhp_cpufreq_offline() is called only once by the CPU hotplug core now and we don't really need two separate callbacks for cpufreq drivers, i.e. stop_cpu() and exit(), as everything can be done from the exit() callback itself. Migrate to using the offline() or exit() callback instead of stop_cpu(). V3->V4: - Based on a cleanup patch [1] from Rafael, apart from 5.13-rc7. - No need to update exit() for intel pstate anymore. - Remove the stop_cpu() callback completely. -- Viresh [1] https://lore.kernel.org/linux-pm/5490292.DvuYhMxLoT@kreacher/ Viresh Kumar (4): cpufreq: cppc: Migrate to ->exit() callback instead of ->stop_cpu() cpufreq: intel_pstate: Migrate to ->offline() instead of ->stop_cpu() cpufreq: powerenv: Migrate to ->exit() callback instead of ->stop_cpu() cpufreq: Remove stop_cpu() callback Documentation/cpu-freq/cpu-drivers.rst | 3 -- .../zh_CN/cpu-freq/cpu-drivers.rst | 3 -- drivers/cpufreq/cppc_cpufreq.c | 46 ++++++++++--------- drivers/cpufreq/cpufreq.c | 3 -- drivers/cpufreq/intel_pstate.c | 10 +--- drivers/cpufreq/powernv-cpufreq.c | 23 ++++------ include/linux/cpufreq.h | 1 - 7 files changed, 35 insertions(+), 54 deletions(-) -- 2.31.1.272.g89b43f80a514