From patchwork Wed Sep 11 22:32:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11141925 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DA6D314ED for ; Wed, 11 Sep 2019 22:32:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AEB7F2087E for ; Wed, 11 Sep 2019 22:32:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ByRODCAW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728753AbfIKWco (ORCPT ); Wed, 11 Sep 2019 18:32:44 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:39977 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728743AbfIKWco (ORCPT ); Wed, 11 Sep 2019 18:32:44 -0400 Received: by mail-pg1-f194.google.com with SMTP id w10so12277043pgj.7 for ; Wed, 11 Sep 2019 15:32:43 -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=ScbFZHT8u+sMIz+KTn9O5YNo5f1GPSOha1PRAwThAGs=; b=ByRODCAWvy/kyXsVj95HgmPjB3MkHbd/yKPycsFepYBcnM6Wz2GxAzfDZvefAaoIf9 /I9cKG+8WEqcquskrx5j4vVH9a7aCTDg3GQoN0oAjEv84zEVwcrXiPmkQx0HUc8vtKtb SNd0RfJcM811JvaSxdh7ovqo/QBId4Ds4cpSX3yYQWEvWYSbXHZINi7TcurTXCILekRn CazeH4EQSzp2WPG1phLN1DYAFAqgNy5OrtFHLwYP0kfeMnl7+l/jlLqlQDj8Zohe2yIZ gv7jYIJQhP6AFhlrJbHk8u8ezIMMucJomybd69kFN9F+dcV9Zp289DqDnRQg6+nCLXSd kfHw== 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=ScbFZHT8u+sMIz+KTn9O5YNo5f1GPSOha1PRAwThAGs=; b=dpiImzprXobKBSO+RpSwuJpY37t8m/aqHhmtqxgJ6MiPPiSaw8OxaU3Ur0qVcItNw6 cCSglcgDNu2FonXNNnBfflLPyojeU0td/fxxeRB7FrUOJFSlgPG2/nQAigMV5ihl/JEM PGigbVeamH84FcTscLCT3o6zUTLluY2E33OEALiu9KGx/Vl0g3RtDUMYHHv0jezscCeE REXVMk/FmFMp0thF03G2BvAP7zOuAOzl9KDTatlWZdVF0YO/WuRz1M3L+nJ/lYvd0uVH FjmCzbewDd8bSiXRrWG910cqZtUoZx3epxYgFgZ9HsKDjelQtRIFn0cclwBK/UeHuWbL LX5Q== X-Gm-Message-State: APjAAAV2UkeUBDkPvohGa26eNH0VB50Nr8EQLoBBp5Pyb9QeFyQE6ohu 94UlzNiGIi3+02Db6vKruFa8EA== X-Google-Smtp-Source: APXvYqzO01KcR+Fqbd/dFsrfKluayh1lDx0tMBmOmiHAY33FGUehgIiOMFiY9w8z/47tg3LBnVhf2Q== X-Received: by 2002:a17:90a:210b:: with SMTP id a11mr7931109pje.23.1568241163434; Wed, 11 Sep 2019 15:32:43 -0700 (PDT) Received: from localhost ([49.248.179.160]) by smtp.gmail.com with ESMTPSA id t9sm20936002pgj.89.2019.09.11.15.32.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2019 15:32:42 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, tdas@codeaurora.org, swboyd@chromium.org, ilina@codeaurora.org, "Rafael J. Wysocki" , Daniel Lezcano , Viresh Kumar , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH 1/5] thermal: Initialize thermal subsystem earlier Date: Thu, 12 Sep 2019 04:02:30 +0530 Message-Id: <97b6f861e6e6a2ac7b50efb7211f3c8e7fe872b0.1568240476.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Lina Iyer Now that the thermal framework is built-in, in order to facilitate thermal mitigation as early as possible in the boot cycle, move the thermal framework initialization to core_initcall. However, netlink initialization happens only as part of subsys_initcall. At this time in the boot process, the userspace is not available yet. So initialize the netlink events later in fs_initcall. Signed-off-by: Lina Iyer [Rebased, refactored and moved to core_initcall] Signed-off-by: Amit Kucheria --- drivers/thermal/thermal_core.c | 41 ++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 6bab66e84eb5..b13e8a9298cc 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1468,6 +1468,8 @@ static struct genl_family thermal_event_genl_family __ro_after_init = { .n_mcgrps = ARRAY_SIZE(thermal_event_mcgrps), }; +static bool allow_netlink_events; + int thermal_generate_netlink_event(struct thermal_zone_device *tz, enum events event) { @@ -1482,6 +1484,9 @@ int thermal_generate_netlink_event(struct thermal_zone_device *tz, if (!tz) return -EINVAL; + if (!allow_netlink_events) + return -ENODEV; + /* allocate memory */ size = nla_total_size(sizeof(struct thermal_genl_event)) + nla_total_size(0); @@ -1533,16 +1538,18 @@ EXPORT_SYMBOL_GPL(thermal_generate_netlink_event); static int __init genetlink_init(void) { - return genl_register_family(&thermal_event_genl_family); -} + int ret; -static void genetlink_exit(void) -{ - genl_unregister_family(&thermal_event_genl_family); + ret = genl_register_family(&thermal_event_genl_family); + if (!ret) + allow_netlink_events = true; + return ret; } + #else /* !CONFIG_NET */ static inline int genetlink_init(void) { return 0; } -static inline void genetlink_exit(void) {} +static inline int thermal_generate_netlink_event(struct thermal_zone_device *tz, + enum events event) { return -ENODEV; } #endif /* !CONFIG_NET */ static int thermal_pm_notify(struct notifier_block *nb, @@ -1591,19 +1598,15 @@ static int __init thermal_init(void) mutex_init(&poweroff_lock); result = thermal_register_governors(); if (result) - goto error; + goto init_exit; result = class_register(&thermal_class); if (result) goto unregister_governors; - result = genetlink_init(); - if (result) - goto unregister_class; - result = of_parse_thermal_zones(); if (result) - goto exit_netlink; + goto exit_zone_parse; result = register_pm_notifier(&thermal_pm_nb); if (result) @@ -1612,13 +1615,11 @@ static int __init thermal_init(void) return 0; -exit_netlink: - genetlink_exit(); -unregister_class: +exit_zone_parse: class_unregister(&thermal_class); unregister_governors: thermal_unregister_governors(); -error: +init_exit: ida_destroy(&thermal_tz_ida); ida_destroy(&thermal_cdev_ida); mutex_destroy(&thermal_list_lock); @@ -1626,4 +1627,10 @@ static int __init thermal_init(void) mutex_destroy(&poweroff_lock); return result; } -fs_initcall(thermal_init); + +static int __init thermal_netlink_init(void) +{ + return genetlink_init(); +} +core_initcall(thermal_init); +fs_initcall(thermal_netlink_init); From patchwork Wed Sep 11 22:32:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11141931 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D10D16B1 for ; Wed, 11 Sep 2019 22:32:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B31820CC7 for ; Wed, 11 Sep 2019 22:32:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="o/hNxA2g" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728808AbfIKWcs (ORCPT ); Wed, 11 Sep 2019 18:32:48 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:36945 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728810AbfIKWcs (ORCPT ); Wed, 11 Sep 2019 18:32:48 -0400 Received: by mail-pl1-f194.google.com with SMTP id b10so10836964plr.4 for ; Wed, 11 Sep 2019 15:32:47 -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=OSYcY8IBbPXHFII/5CsrnXT8+IaVG+jk8Oh4t4Zn6xA=; b=o/hNxA2gr0vDUeX9kntmZsI+c644sUOFOjeuCT21i22ln2dgMqCeD+ac/azR80Ssz1 FeA575pCuqYEFUSjPfrcnwZ2dY+6oq8PyzemYUloMch5Qsw7ZJKxtaEPMaRLZi1yacCh dwCK84LSrzklc9yE0pL3xJawW8MODGsnOCLi07pY4uM53SKgRSvuXqnMtwfhgJZk4Jxj P0aNX8We7coIMq3hfcxnM7tef1PTGpkgpeOUycGITRBuG/Zq3MsfCHWrriPK+TuIY4u0 F+L/B7RfsqFnS7zRnnPWV40L4TgtLk7vMsnVXcnsg7uzoXeMmD41j3ZfC3BYib3uB7Mn acNg== 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=OSYcY8IBbPXHFII/5CsrnXT8+IaVG+jk8Oh4t4Zn6xA=; b=UItAMDYO7V0H11XAZ/kkuV+fkbdX+YGOB7BRALxSwH2UittnzGKq9f2t/caXjXcewB Me7lEuW5SInvitByGYZ00QRc/phaEmJ7EluJSDF7BwspEvEQYcAxgTerQ9IowttEWmHU QNe0xeN6rCrSFqJARMeJUHwtu9+Zdn+Q+/VBJzxsntmZfqBWZiHKtGgWFoUKNkRvVDxM K2d9BB1wEyk/JUGySAJKKbTmRO6og67XeKY8ycdN0XiFxAGajC9Cct2fYExcctDUWuiL yb18WyMNBp9S5+63wOrPcZQzHrRXMMpMmGpHmNWw81Aga5tQSIDfuh/HQhohXLTT3P93 prgg== X-Gm-Message-State: APjAAAV6YQikiX8AWI8GxNsM8MJfwyMe55Zw2UrIE8cWB8mZBw8crSae o5+L2lHBr9D0aoWI2FdKTUjTsA== X-Google-Smtp-Source: APXvYqzvuQibd2D6UfQ//STmLBnUmZhqs5HY1ImusyRyrxLJ/G1YruEWbLPZRbhabAyr6M3Iq1nTrw== X-Received: by 2002:a17:902:7792:: with SMTP id o18mr37634234pll.73.1568241167291; Wed, 11 Sep 2019 15:32:47 -0700 (PDT) Received: from localhost ([49.248.179.160]) by smtp.gmail.com with ESMTPSA id v5sm22415190pfv.76.2019.09.11.15.32.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2019 15:32:46 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, tdas@codeaurora.org, swboyd@chromium.org, ilina@codeaurora.org, "Rafael J. Wysocki" , Daniel Lezcano , Viresh Kumar , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH 2/5] cpufreq: Initialise the governors in core_initcall Date: Thu, 12 Sep 2019 04:02:31 +0530 Message-Id: <6ac50a647b8b9ee4af70a33fab10bb5df4a6b5ff.1568240476.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Initialise the cpufreq governors earlier to allow for earlier performance control during the boot process. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- 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 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c index b66e81c06a57..737ff3b9c2c0 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 dced033875bf..82a4d37ddecb 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 aaa04dfcacd9..def9afe0f5b8 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 c143dc237d87..1ae66019eb83 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 cbd81c58cb8f..b43e7cd502c5 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 From patchwork Wed Sep 11 22:32:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11141941 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80A7118A6 for ; Wed, 11 Sep 2019 22:33:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5DD0620CC7 for ; Wed, 11 Sep 2019 22:33:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="uAu3IFF7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728864AbfIKWcx (ORCPT ); Wed, 11 Sep 2019 18:32:53 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36458 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728815AbfIKWcw (ORCPT ); Wed, 11 Sep 2019 18:32:52 -0400 Received: by mail-pg1-f194.google.com with SMTP id j191so1728959pgd.3 for ; Wed, 11 Sep 2019 15:32:51 -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=rCgC8Qrm5F0gNSrIs0vFn+72THJYWJ5Zs57TxaytFro=; b=uAu3IFF7H4n58zHhmASCIixwb4gEbmqJtpGTmmF7HVJPuloEcVxrhqHsmxgMVu0Xc3 MR9qPqOcC5Mpz1Kscbp6vse4E4prUvF6A2P2TgBH20yQMocZPth0L35N+4OFswJWTiiS aQSGs0wbIg7MU3if4kuGqUq+frQ6peNPr19+hIkBr6vC7XZuz5N8Rx9Eq3lc55a6QKe+ n2i2q4/inHIe6HrJWm/54cQ7pjHzszN44EL5iuSGKnelBzv0mfiwVPyr4CAYJmj9K9W4 +6M1RPvmEoMhPqNxEadBR7sSbKhu9ZFSQhD8PfuSbAzehJ3G5I3DWjzDMIS7Erk4C8Uc V9QA== 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=rCgC8Qrm5F0gNSrIs0vFn+72THJYWJ5Zs57TxaytFro=; b=K2h4zOuFf3DbnM0z7T4QpW/Mv5+rmaQ3TZSTYoGMpAtPFxNFnerRLIk7x96S0TGtTq d2lt+CGWX09BnZZlHDRtx/6zmSSttaJAR1sBqIzHNF1M66jrLJiJw485Wc8ULQxEBkuq rd3bVQfVpLZHsew+QQjkhH3YU1FkDcLDZPbSiMMnIK5XzOzFVkaY/zdpLIWXV633V1aT PuYvER91GksORW7q+uTmgM+kqSC3uziPqUuUesMQSi73zvx4BvvcXlmeNRphXBKndVER s0vCfrmqyXEHLJlQ6tWVBQbdkdR3PCjtahayJQ/Hl9JiWCBNDeWaSKaRcvHG0dmofRYv JYxA== X-Gm-Message-State: APjAAAXH6bLxbY9g0E0gzHLb9oZsiYPCJcXb+oxS3s7why4vHsYzYaF2 hxS6j8Dygvu3y6O6KANiz4YZbA== X-Google-Smtp-Source: APXvYqxjHp1AP2HznEflZ+tVWWOn7YNF8jnr1eEJ2vJdV+IzbtqSmn/f2+XvWevzUHetdPPxoCAjEQ== X-Received: by 2002:a17:90a:ad46:: with SMTP id w6mr8144055pjv.52.1568241170728; Wed, 11 Sep 2019 15:32:50 -0700 (PDT) Received: from localhost ([49.248.179.160]) by smtp.gmail.com with ESMTPSA id p68sm42585690pfp.9.2019.09.11.15.32.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2019 15:32:50 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, tdas@codeaurora.org, swboyd@chromium.org, ilina@codeaurora.org, "Rafael J. Wysocki" , Daniel Lezcano , Viresh Kumar , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH 3/5] cpufreq: Initialize cpufreq-dt driver earlier Date: Thu, 12 Sep 2019 04:02:32 +0530 Message-Id: <23d3ed7edc8b859da8e7640f77cf3028ad5804f3.1568240476.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This allows HW drivers that depend on cpufreq-dt to initialise earlier. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/cpufreq/cpufreq-dt-platdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c index 03dc4244ab00..12c79c92a2b8 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -175,4 +175,4 @@ static int __init cpufreq_dt_platdev_init(void) -1, data, sizeof(struct cpufreq_dt_platform_data))); } -device_initcall(cpufreq_dt_platdev_init); +core_initcall(cpufreq_dt_platdev_init); From patchwork Wed Sep 11 22:32:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11141939 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E29F14ED for ; Wed, 11 Sep 2019 22:33:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1B90C21479 for ; Wed, 11 Sep 2019 22:33:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="iIqmRKYb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729015AbfIKWc7 (ORCPT ); Wed, 11 Sep 2019 18:32:59 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:35657 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728421AbfIKWc6 (ORCPT ); Wed, 11 Sep 2019 18:32:58 -0400 Received: by mail-pg1-f196.google.com with SMTP id n4so12288228pgv.2 for ; Wed, 11 Sep 2019 15:32:58 -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=eHfwVmwRPrvBBQCHCMtELR2XIT6WK3JZDo6MrEMP+JI=; b=iIqmRKYbvavAa/xuuU8kPkn7fxW5tBdl+m37NywaOZtqPeAc9v+0vQMv1An+TbS/lq h2h/lvNN7VuQCP5dJHAqjPqeE84W7DrbhAXAPa7fOnwH4R9zJCBhJcpU2a7J9weR7se0 hEZVIg+idKp6P3t3UXVpLxNPkhdMK61ihXOBWZUTZew9Bbo4OYl6lYRkaVfAPVTutAxH eQZS0sGdSY+f2lYxtZWKCQt0ptOk112EhKPbLjHY0UUgyM4Dab/lcE2Ye51VrQVmmeUv ehGxPIHQpkPl2H0jFp3cQpp0pCy3SJodRf64SQUKKyI6xZ8y/JLjVXSIV7XDFh9HHj2Y QQ+w== 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=eHfwVmwRPrvBBQCHCMtELR2XIT6WK3JZDo6MrEMP+JI=; b=OijIhIIMO2sU9AAQuzKzTMHy6YDcydN3gr53upQvwNwaFZ+tppFIMxYHXH2gncudqD EvuvlZ6LwJ9TR9BF/z3mv/fyUlnntB9CMePDHMK/+2PRhv6sBMJCfu+7FZ59IpQxUzNE kudmkFPAP5u0ccJxBdV5d5K8qRLmfzS5ixfTiJjBTXn5sTudkuzFwU7bv0R51Gqxux23 zdOOH0d/uaLHCtqJDCjXF3WN2vFT7zHP4YMn8vXRdns6J/n9o3Dlx/Ku+c1kR9g/fFBJ 2Ixo7eVKg7Iw2rBjTlqsYmR6NjspdRu8bzivIAInDbyGIPbVK2xICiJEueaxBqqk70Go VxHw== X-Gm-Message-State: APjAAAVpKISA9k68g+r9iHrKJ/PioLUx9zl4P+PmJkRLdagOE2NwyaH8 KND/XnJyMRSYMd4h2MHY92libA== X-Google-Smtp-Source: APXvYqwXpm2pHm8jH8I/tTmio2/EH4EjPAWMxPZdHsmxvodKvWV4WrJTmQONqaYs2sPtqqMgcPT8dw== X-Received: by 2002:a17:90a:af8d:: with SMTP id w13mr5333319pjq.141.1568241178117; Wed, 11 Sep 2019 15:32:58 -0700 (PDT) Received: from localhost ([49.248.179.160]) by smtp.gmail.com with ESMTPSA id t8sm3431343pjq.30.2019.09.11.15.32.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2019 15:32:57 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, tdas@codeaurora.org, swboyd@chromium.org, ilina@codeaurora.org, "Rafael J. Wysocki" , Daniel Lezcano , Viresh Kumar , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH 5/5] cpufreq: qcom-hw: Move driver initialisation earlier Date: Thu, 12 Sep 2019 04:02:34 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Allow qcom-hw driver to initialise right after the cpufreq and thermal subsystems are initialised in core_initcall so we get earlier access to thermal mitigation. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar Acked-by: Daniel Lezcano --- drivers/cpufreq/qcom-cpufreq-hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index 4b0b50403901..04676cc82ba6 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -327,7 +327,7 @@ static int __init qcom_cpufreq_hw_init(void) { return platform_driver_register(&qcom_cpufreq_hw_driver); } -device_initcall(qcom_cpufreq_hw_init); +postcore_initcall(qcom_cpufreq_hw_init); static void __exit qcom_cpufreq_hw_exit(void) {