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: 11141923 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 15CE414ED for ; Wed, 11 Sep 2019 22:32:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E7AAF206CD for ; Wed, 11 Sep 2019 22:32:44 +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 S1728746AbfIKWco (ORCPT ); Wed, 11 Sep 2019 18:32:44 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:38353 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728739AbfIKWco (ORCPT ); Wed, 11 Sep 2019 18:32:44 -0400 Received: by mail-pg1-f195.google.com with SMTP id d10so12271835pgo.5 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=B2TZFj5cHHGDMO25u2NBY6xT1edQe8M9FVm1VrH8uQJRYCGMS71Aup12n24Gc0DXkY iFjR+EQVSCRuR/Gz+DRVaApD8Kh+IMDoJzRekYkmH50V/G6LeFpxoUPMBf5BXhK0ly2m nGlBmR+WRKwqzQBQdyZfytGIZLljQPO9uQDqpmaNW0imQiEuYC7wvI7dKR16f+qmdYPV ZKlclqMnfAONK01xbsXeFT0+gAimH1fLH5jiyyFAqeA6KOskMzNYrhJfAVpFJ6V36CZN nLC8263EtkKLUvDgEnNIt5KNFlQ2lID2qkOnaqqyIJDO8GtM6aXcrNRonmJ7Exc3dWNN joCA== X-Gm-Message-State: APjAAAWyl/pvlLPuLpV+OZCEcbiKo5dK4voxs37pcJtNtS8VTVhJx5Vn KSiaSjwr1iFNyjsspEZlijyUuA== 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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: 11141927 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 4C86E14E5 for ; Wed, 11 Sep 2019 22:32:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 29E67208E4 for ; Wed, 11 Sep 2019 22:32:49 +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 S1728819AbfIKWcs (ORCPT ); Wed, 11 Sep 2019 18:32:48 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:44921 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728808AbfIKWcs (ORCPT ); Wed, 11 Sep 2019 18:32:48 -0400 Received: by mail-pl1-f194.google.com with SMTP id k1so10794328pls.11 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=PdWakx+5SSzAi+2sUVYoynG2SEBp4l10ZrMUJaKPqagvh9jZHg/qGCeKhUfGQD8UcD RZCjhC1q8HtXDmRC6hDrCzPYE8glwg0pB44Tkvzgh9M7fgq83zCF4oQ0jExatJQlIRsh 8oswXsvQCb0pO4t1jXoks9RAKsflSHecqhomHqTZhpcS9J0Q0bGg1IWmidjjNJZ1jS/N PHSJ/lWvbOUhzD2A5K9T8lTDyFS/iBuY+lApoWANUDzIrMLHupJUdGiffY+VAc57LVoH ZyIOy3UYhURD7C8uh2EWpwsY3n/Xk0ZH1jH0xkUkDX+fISLtxTUNl2XRi3xc5nUh46Ac 8rhg== X-Gm-Message-State: APjAAAUTX6ZLSNNsGqpsY71z6tL3Ey9VOIcf3bX1xZjMfYduO2/9DDYm rAcCXdhsQdFQphkIVSFnozs0sw== 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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: 11141929 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 E858C14E5 for ; Wed, 11 Sep 2019 22:32:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C577120CC7 for ; Wed, 11 Sep 2019 22:32:52 +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 S1728872AbfIKWcv (ORCPT ); Wed, 11 Sep 2019 18:32:51 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42829 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728521AbfIKWcv (ORCPT ); Wed, 11 Sep 2019 18:32:51 -0400 Received: by mail-pg1-f196.google.com with SMTP id z12so708893pgp.9 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=rYr3PZk4nuQbh1Iy+FLALEhntdsX6pY5cCsNaEIGG+8aZyth61LrCqBFLSKurY6XM8 1J6kKjBLpL5uqhK4lUYb8U3RW8rwZtvmrfHe6uNu9np9vgKsCVpaoZjDHcl8lbfwCDMs dgwPyj9hbEaE+eCdTKWbX15aQB2q3mDJXINGJ4IqUHl/4e1m8LDsbLQ4LHVJK3HlUh11 8DxhDHu/nFEh2MYNi5+QTLxc7/GsWN1+jDlfk29f+mvG0xuzxCRNIXwfFedzrw5zf/RH KRxDc6pTn2bdCHqy3TGfvH7yK+8mYWKIEIx8YBLvYTfTNZe7ai9fBBsRUWYX+X2nA8Wd qGbA== X-Gm-Message-State: APjAAAWeqILu28nTmpnD3/5FcQLYD896uQmI7Lmza4S2GmGS9jz105Tt huOHiKQ2Ayf0P70NehyjF7j6iw== 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11141933 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 C8DA414E5 for ; Wed, 11 Sep 2019 22:32:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A844D21479 for ; Wed, 11 Sep 2019 22:32:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SoIVvGxk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727782AbfIKWcz (ORCPT ); Wed, 11 Sep 2019 18:32:55 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:45421 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728521AbfIKWcz (ORCPT ); Wed, 11 Sep 2019 18:32:55 -0400 Received: by mail-pg1-f195.google.com with SMTP id 4so12247460pgm.12 for ; Wed, 11 Sep 2019 15:32: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:in-reply-to:references :in-reply-to:references; bh=YaAXQthtgG2MBssj57BLbE1LV2recijh1io10AfY2RI=; b=SoIVvGxkGwPW0vjHAhCUlzzpEn9xEJSfQSimpj9zTEt4BwHqSc4RQt8PGb7NS2wwQI MhYocNB+PZRwHRxD7xWamn9kaMnMMNFyQZ/PMgAaSchdpk+KCJW4iF/a0camj1lHBNXe gAk7NUHUZSqSZqg8z09FQ1X/wB7/Qlem15ix4Cv5gqYobvooPwVi5Ot7F8W+6dVkNeqZ Du5lvxl4asoSRD8w0hTmhncU1ixJHcJIt7eQzR6/4dC+b69dfFMpDEwlLqkCRNZF6DzC 66/gLhIIs5Mg2jNLNtKwcpyS5EB4onIogJxyGEVadt2e5jAZROo+0KdsR7Sb7zzG9mvR hWeg== 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=YaAXQthtgG2MBssj57BLbE1LV2recijh1io10AfY2RI=; b=ON0GYQ15EE9FTRdEt2pXpcLXT3JuRxvY2KMZEF1Sz6eBqRtrBQFasFMQBD9DTQaY7t AKoJhjWLmhsVYsCc/hYMKOwbrm4JtDgoHxrt4rjuw5yxKlSFo2rKA/H61GqqbtBqkqlM wlc4imApERycaAhFaQxpUhqthpYC2ob7El1kX7g3Xk9uZqgjA/1QG+p7pgSBKk5ICeAz dqj306iqHRi08z9KP6rGdlVcRxivkdU60pY/NR91UlpgBgHN6xOD20hRLXZGRCbCGlbT VHAuqANiV5H1N1QTG/aOgfeaeuNPiFsbq55aIoffD1FnoiOjrSKXXI9rxpjUPgE8JCx1 Jlyg== X-Gm-Message-State: APjAAAXbgwixEG8nMPWGCBOh67KqF1IKsJJHWSzvzR7pzpt8HaQswyKu OHg8L2Q8ke/aXonRUPlViR2omA== X-Google-Smtp-Source: APXvYqzDFsBhrW60Dw7QRdDgs4cVFH+08Im9dO91acdBcF+SuompVdjxW+lRm34AgGLVIEPXBnTneg== X-Received: by 2002:a65:51c5:: with SMTP id i5mr34983569pgq.312.1568241174545; Wed, 11 Sep 2019 15:32:54 -0700 (PDT) Received: from localhost ([49.248.179.160]) by smtp.gmail.com with ESMTPSA id s13sm23641511pfm.12.2019.09.11.15.32.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2019 15:32:54 -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-clk@vger.kernel.org Subject: [PATCH 4/5] clk: qcom: Initialise clock drivers earlier Date: Thu, 12 Sep 2019 04:02:33 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Initialise the clock drivers on sdm845 and qcs404 in core_initcall so we can have earlier access to cpufreq during booting. Signed-off-by: Amit Kucheria --- drivers/clk/qcom/clk-rpmh.c | 2 +- drivers/clk/qcom/gcc-qcs404.c | 2 +- drivers/clk/qcom/gcc-sdm845.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c index c3fd632af119..efed4e9d11cd 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -463,7 +463,7 @@ static int __init clk_rpmh_init(void) { return platform_driver_register(&clk_rpmh_driver); } -subsys_initcall(clk_rpmh_init); +core_initcall(clk_rpmh_init); static void __exit clk_rpmh_exit(void) { diff --git a/drivers/clk/qcom/gcc-qcs404.c b/drivers/clk/qcom/gcc-qcs404.c index 29cf464dd2c8..50066a6e99aa 100644 --- a/drivers/clk/qcom/gcc-qcs404.c +++ b/drivers/clk/qcom/gcc-qcs404.c @@ -2825,7 +2825,7 @@ static int __init gcc_qcs404_init(void) { return platform_driver_register(&gcc_qcs404_driver); } -subsys_initcall(gcc_qcs404_init); +core_initcall(gcc_qcs404_init); static void __exit gcc_qcs404_exit(void) { diff --git a/drivers/clk/qcom/gcc-sdm845.c b/drivers/clk/qcom/gcc-sdm845.c index 7131dcf9b060..13677c69932f 100644 --- a/drivers/clk/qcom/gcc-sdm845.c +++ b/drivers/clk/qcom/gcc-sdm845.c @@ -3628,7 +3628,7 @@ static int __init gcc_sdm845_init(void) { return platform_driver_register(&gcc_sdm845_driver); } -subsys_initcall(gcc_sdm845_init); +core_initcall(gcc_sdm845_init); static void __exit gcc_sdm845_exit(void) { 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: 11141935 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 BB85D14E5 for ; Wed, 11 Sep 2019 22:33:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 994AC20CC7 for ; Wed, 11 Sep 2019 22:33:03 +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 S1728943AbfIKWc7 (ORCPT ); Wed, 11 Sep 2019 18:32:59 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:39991 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728380AbfIKWc7 (ORCPT ); Wed, 11 Sep 2019 18:32:59 -0400 Received: by mail-pg1-f193.google.com with SMTP id w10so12277358pgj.7 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=idHUVFMIHWRPN7xpKm6c7hpRRRHBr7TTI8aJroxGXJt9+5Ga4cjjdduCibqqzxuVOs E5S5xk3Amg69X5+J9ennD9FbCxx5WFP3ezP14rBI+xURllCMXZWiJBfmkvr+uQW1gZes OtrPKK7V7X2n/5Yd5HC/XlwM4x5nrqgS7AGt06fhxrk1FkP6oVPhvd2raped1uI83oL4 G+6K4YqSLCmSFl5t9qDtTZKC4u6bwvpbSCpyqaS1OU1bRl66OThPv1bmBFassprvI1+P pTi1AeeZGGB/s+jzWp20Ez5WFjaMY4mTsrFKXdEtZ7d4LPSJeC/9vAo5MWyk00L0Hvms 9D+g== X-Gm-Message-State: APjAAAX2DFmEY9TUvhqCFgSVyEz8lY0htyrCxABsfMmY48TbzuI42+rI 48usCo1/rclHw+nhtv20HRm8UA== 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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) {