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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 80E75C48BE5 for ; Wed, 23 Jun 2021 04:24:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 60EFB6052B for ; Wed, 23 Jun 2021 04:24:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229996AbhFWE1P (ORCPT ); Wed, 23 Jun 2021 00:27:15 -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-Google-Smtp-Source: ABdhPJyy710LA90MinM5iDdivfKD7aD592/AhCFzZHQnDhskdAN8PTcQO74w1Zq6FFRznhQXkhmmsA== 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