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: 173644 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp1341510ilq; Wed, 11 Sep 2019 15:32:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEKKuRoL4O6zWokjRBI3sHJIcY5m48xGNJaZbGu8ow6zk+r02cHp+eQ749Ugnqf13d+y8v X-Received: by 2002:a17:906:cf8a:: with SMTP id um10mr30814317ejb.310.1568241167494; Wed, 11 Sep 2019 15:32:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568241167; cv=none; d=google.com; s=arc-20160816; b=w+U33foSXkLyCsIui6M3lHOQrYE7ezAMefGBBYrED15j4A6TiGjbdV/+mSPaRXHpNj OlTwB/6c96FJRbBJfowWEW3SWjbnqrNZqgUxvCpe+odNb20ggCYLO+W0GQ2DNK2XuP93 TO0grduCdro8GohnjnrNK8DGpRPFuPbnqdRoPDgnNpvDrwaxJTG0c6OpzfonFEcWtx5z 6zJv+ZPq/CQOu7rWWzM+DG4tRb2o27wrllcFiDGSrMsbfdmwtV5essfvsESoAnE1P0/k /f4HDucNsAut95P8kfJZMog1EoCs1yaX+oSLVEQmvDreJdo4x6Qu0mXjWPwr3pvsxsl6 iDjw== 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=ScbFZHT8u+sMIz+KTn9O5YNo5f1GPSOha1PRAwThAGs=; b=s/udXxxowQsq4ZiCVLBc81Lqw/oOi1oA9XulcZIz2jyv5YbgOAs3Wk5WalfaEbFhBC cBKJOnHN7g1Xq9LHDDw1in4dyXz0su5R3kYJluIs9QQH2S3u0MLPjFTJJj1IcXinaZvB KZw4m2BexZTyPSipNdge4WN/HcaChmBVasOvvrXPnEauJX06Ma8NlhB4a3QDhsHBEoeB 0rv7WrjKU+Q6MOgqwQ3Zd/J/inQ3OaAzowIJ1vGeg2dj4KpJn9ZXHtZmW9zUfyZocnUz 5KHbzRM5oRyK4HrzO//ULHaqUCvwyAq1U7ISiakMmdX6G19xlykYW6zeDGZwTE0vRvm/ oQaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ByRODCAW; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 qq22si12042300ejb.288.2019.09.11.15.32.44; Wed, 11 Sep 2019 15:32:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=ByRODCAW; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1728746AbfIKWco (ORCPT + 15 others); 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-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(-) -- 2.17.1 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: 173645 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp1341539ilq; Wed, 11 Sep 2019 15:32:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwpbzQ39XLPm1jL8mLOoukuIaExpBPZh1D/pkjOC0DsoHk0uxNPvnxvc4o8LU9vjKxMbbip X-Received: by 2002:a50:981b:: with SMTP id g27mr39012152edb.105.1568241169246; Wed, 11 Sep 2019 15:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568241169; cv=none; d=google.com; s=arc-20160816; b=uDU3heFp6uqo6txSffrBOtgdOcDCiP+c8h1arzh+olP0q7U+Dxr5BvlG3PaO397qzK Z89qpP6EFs5ljZxV3TCeX+RTN0Hw18kC4dZuIY8rkmv3BXuUw2oUOLiqGqiAHCK6ci1U myZmTHzHadCSopYlSRAOVHkf/QHdbfge8aoKnunl6IgeMgOQRnTHhdrYABu4SbIodcR0 4ndrI7brSjJki05dXFjl1yTaHmBR/pv1fWWyKFPLtZX2d0/vMV7L5if3E2dX/1mycL/x zj426vcrq+nPtgCxUJmR+QAo/AHy/6ZXqN7m7AAZywyKX49BFIWNs4nMVxCtIQqHR3gs PRug== 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=OSYcY8IBbPXHFII/5CsrnXT8+IaVG+jk8Oh4t4Zn6xA=; b=hbJSCIftZrfjf1W/fdQFx2hrge21o68ON2ld6Gb3KeRU3D2bHV9UqAdFpEwfEj75Y6 L1Cx3SyyJnXWzbrWRWk1qgDyktMqannCqK97pzgpdVDOrcQ++jdB2oIzXULcB1mhlHQ9 3IpYG2+HOLym/nz1GV6aVdaEp7tDpFimn7SzP17Qf+Q8qkvE5Yz0uAi9zq2IDONdYQ8k ak+fvVyvFGzsxeDx8trYPLsSc3ZP3ThUnwZyUfQ8tTBYb9pGPNEtDaPqSucGS/svOQuq fylZnyqOi77BmjfSUOV/Zar+3MiiLVlx0KjjMP7NHzMfmnfXFd0OyLtIoe4YH08NvVsb MN/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="o/hNxA2g"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 qq22si12042300ejb.288.2019.09.11.15.32.49; Wed, 11 Sep 2019 15:32:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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="o/hNxA2g"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1728819AbfIKWcs (ORCPT + 15 others); 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-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 --- 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(-) -- 2.17.1 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: 173646 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp1341647ilq; Wed, 11 Sep 2019 15:32:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwblOiqnV4wf84FkLmRRoLVA/SZepehMZ1B/h2tuitLucUqMOKTeA5s/jIdHxKW36eam42O X-Received: by 2002:a05:6402:7d1:: with SMTP id u17mr38814042edy.132.1568241173510; Wed, 11 Sep 2019 15:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568241173; cv=none; d=google.com; s=arc-20160816; b=l3wgmSTDKGOTC6e5tKK1PlMHlp+5Q9oRNqBN2LCj9fZ5Tv8hHVQ9d51uMZ8XF/o4tw 2+gxX5gu21RWzStU0RW051vzrU7oZZO9BbEuFBqPGr9vMBdAIVo9l3pYHXe95WGU/E0k uJ8yyTdqZ1b6yuUCrYyGb5fzxSiM0YXvhe+aXlmSQPJ396s41ph2H7DkPD6jVRoloGfO JQ7XoLjr9NQnYCxK4+HCvzLpVzadDLCXKKOuFsQSk4ueftlzNsiHLtGtUprdpFoqWMlH oOmtK/HerMyksX6rwZXg1udGL64rB2BE47vudPArwVoUfW8wO8XKA2KqJrTkF5ZmV1AB lb3Q== 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=rCgC8Qrm5F0gNSrIs0vFn+72THJYWJ5Zs57TxaytFro=; b=rnny+IaOHEUJfY2rOpY1Bk4Zws703WwjUhJVY2s70GBBlpdN9QMxAI79kimoCFeLSk uAcKpnx/I7ILb1FPanKW7wVxPQTRyUAPRGNl2HUE+O1da3CGDt9MpgTDyxz35oWAW787 tSiN9oAyNB0o9YyAVTmaX70fk2lfpailZvuvjZ7x/6jVZUnYJ+ExOFYBh94gP1q6dlAo 8l8kbvmpjHNyovvEVZqtLgdHkjb5uxrVn5DQHZo8Ao19ndJ3meBR+Z8ADf4Nj2c+V2gA o2NH4F6YAKGGZ8vwJ/WNEYjgNzKxE9orLEscrEd2a0YduCYYnh+NXnL7TOWoOYmtzO31 YsTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uAu3IFF7; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 jo17si10259261ejb.167.2019.09.11.15.32.53; Wed, 11 Sep 2019 15:32:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=uAu3IFF7; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1728872AbfIKWcv (ORCPT + 15 others); 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-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 --- drivers/cpufreq/cpufreq-dt-platdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 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: 173647 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp1341739ilq; Wed, 11 Sep 2019 15:32:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxG84sUXOiN3phpAhAMQ68my0pLXCmGXrDD+NEDsZHV8wrcLgf4iKBZqdxZKDs7hNRH+3uW X-Received: by 2002:a50:d084:: with SMTP id v4mr39751186edd.48.1568241177468; Wed, 11 Sep 2019 15:32:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568241177; cv=none; d=google.com; s=arc-20160816; b=Au8ET6Iz8mm3WN89HJE4MigYY6K7xpWJ+6Vzrggs4xGRCua/O/FWKRK6MNnC0LkzqS Tg6qPZNIoikD0u3DOeXvcOxMjU6NnbgaA687XVbQufkTKhJVSaxhbss+pKSwLRFfWWi1 YYbjVrMijRrNWlfhqZxlApOOZddOpL1K5urgMh3lYdjW/nA7Q7WMrVhhV3mjFhbI5olt BJSjcoaLdAuIgCV8fXYEYtE3CE2sxuue3kgPVFxxlRnSX2GBf7a7Typr17aW5o24CAtQ +R3CCPxWpLXXL5wTKDhflwHhFK0aIh4T+fgsEG4YVHd7alqRdXLK7VEvTa7jvZxiptEz klQg== 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=YaAXQthtgG2MBssj57BLbE1LV2recijh1io10AfY2RI=; b=GIQ/fO/DD6Mmo4b6vhZa46Cbz4LGkVdzTqIsLHTNG3/x0rDtqrZORt1+3WJCqAqmMq QE1qJhi4f1pmArumxauw7cRFqbrhn/klnxq5aMKfpHPOEx9Q9QRNMziTeL5h9dwOZp97 Ln6gotJul5mFadSeoR3sYE5X8Dx6VokAql3VufgFD3OdotRn2PlpfXmr59QTUu3Y2g2B 1Dsey5nVJyCCS9ASz74fS3xQt+IV48B3erSHusDow4/OUZ7BiqqwvjYiVUNa3dez1XNg ZLJXj68LpByd6N/IeFfKFDjjclg6rWlOJI/AmUY6Oo88PLuJYBFVeHipB9zeqSfkpL0J HnAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SoIVvGxk; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 op27si11099508ejb.163.2019.09.11.15.32.57; Wed, 11 Sep 2019 15:32:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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=SoIVvGxk; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1727782AbfIKWcz (ORCPT + 15 others); 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-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(-) -- 2.17.1 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) {