From patchwork Mon Oct 21 12:15:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 177071 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3336572ill; Mon, 21 Oct 2019 05:15:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOleOeOY2JhRnsg7Z9uAW3vmKVjqoUpSkSWEUk/cBttBPt9KyJkQKjN4oHgG0Hi8+7Ny+O X-Received: by 2002:a05:6402:1514:: with SMTP id f20mr24933868edw.35.1571660139792; Mon, 21 Oct 2019 05:15:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571660139; cv=none; d=google.com; s=arc-20160816; b=zGzA0sFEyn+fgly/XI5/9pzI1wBcybGk3h9do4akZTmERznAhSQ4odxBeerRrS5fU9 6EXvQScN2eKKer8AQLe0cvm2/4nwasao4oYzFqFSJnLtVhoE3OYwavY7x4+SWg/vzeid 2okgKBcyl1H0vVSMUMFiUsmWrg/YXDb9OxPM3/mPS+DnvMEQw4aj3SCuWBo32Q2JmvrV kQHqjD6dEaLkj/GM7HJcPft6su1o4+UBKFWE2uRfplMKWl3yS6gQ54bNKQVMy+zIuZqT iLHoTrR15qYlmWiJliXves0gh9hhQ9c7PeaCwJGWX6SoDMXikakrKOidz0LZHtZwFTa4 DvcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=icSR5Ia8C4BY/f3U2+rIIkMs08i+QoePFXJHRUnWtH8=; b=WQNl6NpsK3MDzDT3G+EjyexjgJAanvqg/mAK/hdzj8gi2ZLenwmB4s1e/2LchsE1Ct lwZguiPsEv9KT/utOE8YE34/lcYoRcY2ljf+LJUr195wfpVerPwbQhd3bzqZoV73AEWr 2kH9Zytv7NBRmyDnmuFj5pzekwCTZAqI46ts3Q6moHb+LzmfGwWz7ZDW0kQxAt3sz595 oMQqfhqfzVE8ogjidrGmB2uQM5CwHeubPPqQ7TjjPUz89wFwWkmUWim0W32rVIgUrikc eSgYYNy3TTruWthdd8rBuQaDcSXRijNlUDUmsrW2u1D6L32l4RdmjwZV5gUI0XzKNwTg 9bow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qtBCgbp8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id p1si9643935eda.406.2019.10.21.05.15.39; Mon, 21 Oct 2019 05:15:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qtBCgbp8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728679AbfJUMPf (ORCPT + 26 others); Mon, 21 Oct 2019 08:15:35 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:35443 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728667AbfJUMPd (ORCPT ); Mon, 21 Oct 2019 08:15:33 -0400 Received: by mail-pf1-f195.google.com with SMTP id 205so8333671pfw.2 for ; Mon, 21 Oct 2019 05:15:33 -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:in-reply-to:references :in-reply-to:references; bh=icSR5Ia8C4BY/f3U2+rIIkMs08i+QoePFXJHRUnWtH8=; b=qtBCgbp8DNzK+gpDpDW9X0cKqML0CGpQ4bSaNLGj9blAogVaQgmb2yQnayWfotrEgk Hlc1OI63l4JGYvX7jtcnuCj3DH6pgDy23RyzWkkuP/PWlsr2Cz0JL3+kU7fv2uG7B13e nPjC/6+HjZG9rrmcscVM/Udu9PEnbsZDZZv8aVVa2r37J9nc7UFccEGrzAfNlW39YJMQ bUvvmyo7//WvL1uRJD1bndSuSMFwKB5OAXW6UVaK4pekYbfRqB1qHY3RGbZ1mbD1+1Vv xwuc1N44r/BkKmnjlYLkocFFiZ68VG2wVutkt4L3pQfvOkWatXanfxAKDsBr4RGdpAzt +XHA== 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:in-reply-to :references:in-reply-to:references; bh=icSR5Ia8C4BY/f3U2+rIIkMs08i+QoePFXJHRUnWtH8=; b=Y0IIWpjvKVkm86/gwotbNSkGdSY1TrUyRMfS22hTaeap3s7jBucTMHgFwtyibeXsAq vFu/Aezei+LW/ZG19LGbar5YSHTGNwgvX9Sukeddh1oLcVJ09nkAIqh2GTFzCBSKjP9U HdLsiaIvousAszdZSBNP+MYJtk8Q33wh5Mk9GhZMiwuGyViwttLBQ5+xT0/St+P6JJ84 fAdkpCDrvOiBbhUFFgVY6GgVKofVrvzgvQgjgl+GdsFViBTWIGk2Z1+jo/cwD8M1CjSI 244xyYymU8jcIDpmUe2gR/dxdfhhji+sTWrBMt0uFyhhxy7L96zhr/KipKH7IyenYijC 8tUw== X-Gm-Message-State: APjAAAWnjxfmJrWX3yLSGz7h5eTHevnExydUGic2jQB2VrVvUlNbUYfP x2ZSNaB7npkNevR1PnoQMu8TNzcKytH0PQ== X-Received: by 2002:a17:90a:b292:: with SMTP id c18mr28713603pjr.4.1571660132274; Mon, 21 Oct 2019 05:15:32 -0700 (PDT) Received: from localhost ([49.248.62.222]) by smtp.gmail.com with ESMTPSA id r23sm15004545pgk.46.2019.10.21.05.15.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 05:15:31 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, daniel.lezcano@linaro.org, viresh.kumar@linaro.org, sudeep.holla@arm.com, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, tdas@codeaurora.org, swboyd@chromium.org, ilina@codeaurora.org, "Rafael J. Wysocki" , Amit Kucheria , Ben Segall , Dietmar Eggemann , Ingo Molnar , Juri Lelli , Mel Gorman , Peter Zijlstra , Steven Rostedt , Vincent Guittot , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH v5 3/6] cpufreq: Initialize the governors in core_initcall Date: Mon, 21 Oct 2019 17:45:12 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Initialize the cpufreq governors earlier to allow for earlier performance control during the boot process. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar Reviewed-by: Rafael J. Wysocki --- drivers/cpufreq/cpufreq_conservative.c | 2 +- drivers/cpufreq/cpufreq_ondemand.c | 2 +- drivers/cpufreq/cpufreq_performance.c | 2 +- drivers/cpufreq/cpufreq_powersave.c | 2 +- drivers/cpufreq/cpufreq_userspace.c | 2 +- kernel/sched/cpufreq_schedutil.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) -- 2.17.1 diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index b66e81c06a575..737ff3b9c2c09 100644 --- a/drivers/cpufreq/cpufreq_conservative.c +++ b/drivers/cpufreq/cpufreq_conservative.c @@ -346,7 +346,7 @@ struct cpufreq_governor *cpufreq_default_governor(void) return CPU_FREQ_GOV_CONSERVATIVE; } -fs_initcall(cpufreq_gov_dbs_init); +core_initcall(cpufreq_gov_dbs_init); #else module_init(cpufreq_gov_dbs_init); #endif diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c index dced033875bf8..82a4d37ddecb3 100644 --- a/drivers/cpufreq/cpufreq_ondemand.c +++ b/drivers/cpufreq/cpufreq_ondemand.c @@ -483,7 +483,7 @@ struct cpufreq_governor *cpufreq_default_governor(void) return CPU_FREQ_GOV_ONDEMAND; } -fs_initcall(cpufreq_gov_dbs_init); +core_initcall(cpufreq_gov_dbs_init); #else module_init(cpufreq_gov_dbs_init); #endif diff --git a/drivers/cpufreq/cpufreq_performance.c b/drivers/cpufreq/cpufreq_performance.c index aaa04dfcacd9d..def9afe0f5b86 100644 --- a/drivers/cpufreq/cpufreq_performance.c +++ b/drivers/cpufreq/cpufreq_performance.c @@ -50,5 +50,5 @@ MODULE_AUTHOR("Dominik Brodowski "); MODULE_DESCRIPTION("CPUfreq policy governor 'performance'"); MODULE_LICENSE("GPL"); -fs_initcall(cpufreq_gov_performance_init); +core_initcall(cpufreq_gov_performance_init); module_exit(cpufreq_gov_performance_exit); diff --git a/drivers/cpufreq/cpufreq_powersave.c b/drivers/cpufreq/cpufreq_powersave.c index c143dc237d878..1ae66019eb835 100644 --- a/drivers/cpufreq/cpufreq_powersave.c +++ b/drivers/cpufreq/cpufreq_powersave.c @@ -43,7 +43,7 @@ struct cpufreq_governor *cpufreq_default_governor(void) return &cpufreq_gov_powersave; } -fs_initcall(cpufreq_gov_powersave_init); +core_initcall(cpufreq_gov_powersave_init); #else module_init(cpufreq_gov_powersave_init); #endif diff --git a/drivers/cpufreq/cpufreq_userspace.c b/drivers/cpufreq/cpufreq_userspace.c index cbd81c58cb8f0..b43e7cd502c58 100644 --- a/drivers/cpufreq/cpufreq_userspace.c +++ b/drivers/cpufreq/cpufreq_userspace.c @@ -147,7 +147,7 @@ struct cpufreq_governor *cpufreq_default_governor(void) return &cpufreq_gov_userspace; } -fs_initcall(cpufreq_gov_userspace_init); +core_initcall(cpufreq_gov_userspace_init); #else module_init(cpufreq_gov_userspace_init); #endif diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 86800b4d5453f..322ca8860f548 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -915,7 +915,7 @@ static int __init sugov_register(void) { return cpufreq_register_governor(&schedutil_gov); } -fs_initcall(sugov_register); +core_initcall(sugov_register); #ifdef CONFIG_ENERGY_MODEL extern bool sched_energy_update;