From patchwork Mon Oct 21 12:15:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11202093 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 B73B71390 for ; Mon, 21 Oct 2019 12:15:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83CA62166E for ; Mon, 21 Oct 2019 12:15:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Ez1JoBF8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728618AbfJUMP0 (ORCPT ); Mon, 21 Oct 2019 08:15:26 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:42016 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728611AbfJUMP0 (ORCPT ); Mon, 21 Oct 2019 08:15:26 -0400 Received: by mail-pg1-f195.google.com with SMTP id f14so7702966pgi.9 for ; Mon, 21 Oct 2019 05:15:25 -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=Sa4xZAx/AZis8Bith/bcGJfRn7RQ+aAIMqtybRUr7Os=; b=Ez1JoBF8psh8aBpdGOVZLQiOF+58fhCpBqjiyzg3Xv18V3SbWHD0rIM5wAHbfmiynx KyjD5whzmXc4m4gRu/iKapr5eCvLXXFuXgh4GtJn7JJ2HEU+JTLOivOTil60kyLO7IKh QIw8NaKmE1Itlz5GscdcE/IRiGyOa56gsNhy+RR0oZdaccxdcpd6yRZjPZrYaDCghC5U C/l9H4LTcmV3gJxnLLV43tYp3sGue5rd0JeOyVB/TKPKxK5Dhywj9OEAO4w7GZ/3MFJi VjRHNeQWxA6mLVqY48BfStEXV+080Xlj2GNOxE3NO3xjZDL49m27XLUqz+xYyGahwkjJ Pebg== 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=Sa4xZAx/AZis8Bith/bcGJfRn7RQ+aAIMqtybRUr7Os=; b=MPz5G57IGICgEI5/t5XzuPgeYqwyi7+Yga4671yyrFAh4mFy7mIWxjlYjtm+bIa0dk wW7F2NHSKfWeyLer1a/zCCktsmYAcJT3t1OGZ1ZWSMgpCgyZRDjnmZvZLciEaMuVdiPk xP4g43YxjH+SviudMn9oyxOOo1XsMo5FQ8c6eBNOf0XRV4AM5fhg9gPTe1o1qjCEzjtS 2T/5S+wP/UwWv+j05YqeinkGBDHIiQkzCAmvcHb+aUHuDbCIxOy1Md6xlU7lUCZt5qO0 q9LjD2uAkG9B2xenZ94WFwgxmFepjh39+FY+3tAjgiN0c2A/3FnFSSLkzP3nNDRnZ2Jv 5H7Q== X-Gm-Message-State: APjAAAXUKR7mIQ4agIh/U5N4otlh4B5gGIUUoaaA7Vn82gHEUkvVKqzj F/Pxe5XSl2PwxtLzbh5ytIH5qA== X-Google-Smtp-Source: APXvYqyXgffwzemjiiGcNy5wmH6kNuMf1/Dycbq3FbUv/fMiS77lueUj9nuedPC8b6CPbUWRW78pjw== X-Received: by 2002:a63:ff46:: with SMTP id s6mr25612864pgk.337.1571660124376; Mon, 21 Oct 2019 05:15:24 -0700 (PDT) Received: from localhost ([49.248.62.222]) by smtp.gmail.com with ESMTPSA id w14sm17543158pge.56.2019.10.21.05.15.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 05:15:23 -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-doc@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH v5 1/6] thermal: Remove netlink support Date: Mon, 21 Oct 2019 17:45:10 +0530 Message-Id: <8ff02cf62186c7a54fff325fad40a2e9ca3affa6.1571656014.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 There are no users of netlink messages for thermal inside the kernel. Remove the code and adjust the documentation. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- .../driver-api/thermal/sysfs-api.rst | 26 ++--- drivers/thermal/thermal_core.c | 101 +----------------- include/linux/thermal.h | 11 -- 3 files changed, 7 insertions(+), 131 deletions(-) diff --git a/Documentation/driver-api/thermal/sysfs-api.rst b/Documentation/driver-api/thermal/sysfs-api.rst index fab2c9b36d084..b40b1f8391481 100644 --- a/Documentation/driver-api/thermal/sysfs-api.rst +++ b/Documentation/driver-api/thermal/sysfs-api.rst @@ -725,24 +725,10 @@ method, the sys I/F structure will be built like this:: |---temp1_input: 37000 |---temp1_crit: 100000 -4. Event Notification +4. Export Symbol APIs ===================== -The framework includes a simple notification mechanism, in the form of a -netlink event. Netlink socket initialization is done during the _init_ -of the framework. Drivers which intend to use the notification mechanism -just need to call thermal_generate_netlink_event() with two arguments viz -(originator, event). The originator is a pointer to struct thermal_zone_device -from where the event has been originated. An integer which represents the -thermal zone device will be used in the message to identify the zone. The -event will be one of:{THERMAL_AUX0, THERMAL_AUX1, THERMAL_CRITICAL, -THERMAL_DEV_FAULT}. Notification can be sent when the current temperature -crosses any of the configured thresholds. - -5. Export Symbol APIs -===================== - -5.1. get_tz_trend +4.1. get_tz_trend ----------------- This function returns the trend of a thermal zone, i.e the rate of change @@ -751,14 +737,14 @@ are supposed to implement the callback. If they don't, the thermal framework calculated the trend by comparing the previous and the current temperature values. -5.2. get_thermal_instance +4.2. get_thermal_instance ------------------------- This function returns the thermal_instance corresponding to a given {thermal_zone, cooling_device, trip_point} combination. Returns NULL if such an instance does not exist. -5.3. thermal_notify_framework +4.3. thermal_notify_framework ----------------------------- This function handles the trip events from sensor drivers. It starts @@ -768,14 +754,14 @@ and does actual throttling for other trip points i.e ACTIVE and PASSIVE. The throttling policy is based on the configured platform data; if no platform data is provided, this uses the step_wise throttling policy. -5.4. thermal_cdev_update +4.4. thermal_cdev_update ------------------------ This function serves as an arbitrator to set the state of a cooling device. It sets the cooling device to the deepest cooling state if possible. -6. thermal_emergency_poweroff +5. thermal_emergency_poweroff ============================= On an event of critical trip temperature crossing. Thermal framework diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index d4481cc8958fe..cced0638b686f 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #define CREATE_TRACE_POINTS @@ -1464,97 +1462,6 @@ struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name) } EXPORT_SYMBOL_GPL(thermal_zone_get_zone_by_name); -#ifdef CONFIG_NET -static const struct genl_multicast_group thermal_event_mcgrps[] = { - { .name = THERMAL_GENL_MCAST_GROUP_NAME, }, -}; - -static struct genl_family thermal_event_genl_family __ro_after_init = { - .module = THIS_MODULE, - .name = THERMAL_GENL_FAMILY_NAME, - .version = THERMAL_GENL_VERSION, - .maxattr = THERMAL_GENL_ATTR_MAX, - .mcgrps = thermal_event_mcgrps, - .n_mcgrps = ARRAY_SIZE(thermal_event_mcgrps), -}; - -int thermal_generate_netlink_event(struct thermal_zone_device *tz, - enum events event) -{ - struct sk_buff *skb; - struct nlattr *attr; - struct thermal_genl_event *thermal_event; - void *msg_header; - int size; - int result; - static unsigned int thermal_event_seqnum; - - if (!tz) - return -EINVAL; - - /* allocate memory */ - size = nla_total_size(sizeof(struct thermal_genl_event)) + - nla_total_size(0); - - skb = genlmsg_new(size, GFP_ATOMIC); - if (!skb) - return -ENOMEM; - - /* add the genetlink message header */ - msg_header = genlmsg_put(skb, 0, thermal_event_seqnum++, - &thermal_event_genl_family, 0, - THERMAL_GENL_CMD_EVENT); - if (!msg_header) { - nlmsg_free(skb); - return -ENOMEM; - } - - /* fill the data */ - attr = nla_reserve(skb, THERMAL_GENL_ATTR_EVENT, - sizeof(struct thermal_genl_event)); - - if (!attr) { - nlmsg_free(skb); - return -EINVAL; - } - - thermal_event = nla_data(attr); - if (!thermal_event) { - nlmsg_free(skb); - return -EINVAL; - } - - memset(thermal_event, 0, sizeof(struct thermal_genl_event)); - - thermal_event->orig = tz->id; - thermal_event->event = event; - - /* send multicast genetlink message */ - genlmsg_end(skb, msg_header); - - result = genlmsg_multicast(&thermal_event_genl_family, skb, 0, - 0, GFP_ATOMIC); - if (result) - dev_err(&tz->device, "Failed to send netlink event:%d", result); - - return result; -} -EXPORT_SYMBOL_GPL(thermal_generate_netlink_event); - -static int __init genetlink_init(void) -{ - return genl_register_family(&thermal_event_genl_family); -} - -static void genetlink_exit(void) -{ - genl_unregister_family(&thermal_event_genl_family); -} -#else /* !CONFIG_NET */ -static inline int genetlink_init(void) { return 0; } -static inline void genetlink_exit(void) {} -#endif /* !CONFIG_NET */ - static int thermal_pm_notify(struct notifier_block *nb, unsigned long mode, void *_unused) { @@ -1607,13 +1514,9 @@ static int __init thermal_init(void) if (result) goto unregister_governors; - result = genetlink_init(); - if (result) - goto unregister_class; - result = of_parse_thermal_zones(); if (result) - goto exit_netlink; + goto unregister_class; result = register_pm_notifier(&thermal_pm_nb); if (result) @@ -1622,8 +1525,6 @@ static int __init thermal_init(void) return 0; -exit_netlink: - genetlink_exit(); unregister_class: class_unregister(&thermal_class); unregister_governors: diff --git a/include/linux/thermal.h b/include/linux/thermal.h index e45659c759209..d9111aebb97d6 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -544,15 +544,4 @@ static inline void thermal_notify_framework(struct thermal_zone_device *tz, { } #endif /* CONFIG_THERMAL */ -#if defined(CONFIG_NET) && IS_ENABLED(CONFIG_THERMAL) -extern int thermal_generate_netlink_event(struct thermal_zone_device *tz, - enum events event); -#else -static inline int thermal_generate_netlink_event(struct thermal_zone_device *tz, - enum events event) -{ - return 0; -} -#endif - #endif /* __THERMAL_H__ */ From patchwork Mon Oct 21 12:15:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11202095 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 199271895 for ; Mon, 21 Oct 2019 12:15:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EC6B9214B2 for ; Mon, 21 Oct 2019 12:15:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="NS7ZKy/C" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728645AbfJUMP3 (ORCPT ); Mon, 21 Oct 2019 08:15:29 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:36786 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728637AbfJUMP3 (ORCPT ); Mon, 21 Oct 2019 08:15:29 -0400 Received: by mail-pg1-f194.google.com with SMTP id 23so7722628pgk.3 for ; Mon, 21 Oct 2019 05:15:28 -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=OV9GCJs4s7auzZpPSYG5QvReU/tq3thTyE+8LoeVN7Y=; b=NS7ZKy/CJRKKWW9c979mMVqT188CSGr/jWJ+67EpTmxEJt+UAyi1cRDiv1812fo/pS u3kaC56+efRbFQ80M9Ze3QN6VK4AEJ71gDz1wks2LVQ5aeBAEZhtqQybfLA0rfejtnbO gbegVPOHbbj8LkvtYQKiZsyIT1jQdUs508eV9I+O/wCi+/Y1F79VBbJ3Kk5q+QPsm5S9 yYr4rExC53BA5VhyEJ8J8zwxQlS+B54pnEQWaMHdrE6mR0TXgqOpo+wcs+bONBYSo5gz kzoWjNtfmJnAmCD6kSw736Gvvjv6RjVD9mmRHy8gmg0H20Gn54q66uExxKiFnaYTa1d1 5OnA== 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=OV9GCJs4s7auzZpPSYG5QvReU/tq3thTyE+8LoeVN7Y=; b=CO4OOmuCJkVTWFmUJ2nwtb3REnNa4ZJB0Oj9AhZM2u69aIBLIdJERLZgZe5b63tOPy xofOtrQdsV6xYINSy00c4aiJydb+KnwcuTujrBYmSZ19Vz2HUm1fTQMCqffEA3kr5k3/ ocpqAn1Ng2LPWQ0RiDIymICbpp8hDuLBjfZwpJGHaQTiymIpbkUGoMZVvOFXCjveZNt7 bl7o7JMNXurnCkT44O9ZcMiUX24jIT6tqqwKbGDhB0H776WQvK/SsOPvKvsvJ6l1Pv9x ozwW9nsROYU0Jl0syQulP0PKFSJRjRWWrzf/eh0WH3eO9rNqFn3Sry4POaMviXdWEKVM yvFg== X-Gm-Message-State: APjAAAVNPkaEVzSvmCtN1jTavilClS2VnEtO8MfEASpncFECpGOF0BtK wf7aqrWxVfiFbZTJAjsNDWkzHQ== X-Google-Smtp-Source: APXvYqzNjdZjeH7TQCvvsCQr2viFo8Wmk1yaKRPtWsE+Sq3U4TjGWSFMCUSBrZ07XjV/Nnpi5dCUNA== X-Received: by 2002:a17:90b:144:: with SMTP id em4mr29096753pjb.8.1571660128323; Mon, 21 Oct 2019 05:15:28 -0700 (PDT) Received: from localhost ([49.248.62.222]) by smtp.gmail.com with ESMTPSA id u3sm14514404pfn.134.2019.10.21.05.15.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 05:15:27 -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 2/6] thermal: Initialize thermal subsystem earlier Date: Mon, 21 Oct 2019 17:45:11 +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 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. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar --- drivers/thermal/thermal_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index cced0638b686f..69fcd54f8a83e 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1537,4 +1537,4 @@ static int __init thermal_init(void) mutex_destroy(&poweroff_lock); return result; } -fs_initcall(thermal_init); +core_initcall(thermal_init); 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: 11202101 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 C06EE13BD for ; Mon, 21 Oct 2019 12:15:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E7AA20882 for ; Mon, 21 Oct 2019 12:15:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qtBCgbp8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728322AbfJUMPe (ORCPT ); Mon, 21 Oct 2019 08:15:34 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:42795 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728639AbfJUMPd (ORCPT ); Mon, 21 Oct 2019 08:15:33 -0400 Received: by mail-pf1-f195.google.com with SMTP id q12so8321687pff.9 for ; Mon, 21 Oct 2019 05:15:32 -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=cuvj4+kyheWrzA388WmmLGRxq8/nXQz2mvWZRap9SgisdArmtkcf+JbVZlMR9yGoas mLrhOe2m72N5FX+8M93fA0v8+pjbDskYjGtPSuA9Pjd4+ZWCpBUB51Z5ZdaDTssUN5vB W7nKDpnm/lxiywVIHdFEPCu9zCp2HFVXHY5cqjF6B9w4FWUA8zSNwbki1yFw1YJTeaUz aXcEJ9q2g317cTfqCQQuAAfXFM1a7MpAxCQAy4Tq8mhbNPmwDeSB6MOejsT2X49lsQ4+ 8D1SEuNaE3rm9INCUdCJXrUZpIfl0xLuD5bfRGz7kqiXaANKdNb6wJ+qrIjEC4kiUQL9 /i9w== X-Gm-Message-State: APjAAAURntey+Z6fvqRy9ApZ7P/BpdoHadb2IR378vGfPAkMtSh2aMSi dLH/01S0rJOzgDtOBXfRVcSE3w== X-Google-Smtp-Source: APXvYqyEOLoX1K9LXhjZqp/OeP3RoV4ghS1oTP0COLYV5CJGuCwdBPAOSwGk9K3/jhxm/k+SO8++Hw== 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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(-) 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; From patchwork Mon Oct 21 12:15:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11202099 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 F3E2E13BD for ; Mon, 21 Oct 2019 12:15:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2DDA20882 for ; Mon, 21 Oct 2019 12:15:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="h+Y0coRG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728683AbfJUMPh (ORCPT ); Mon, 21 Oct 2019 08:15:37 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36799 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728667AbfJUMPg (ORCPT ); Mon, 21 Oct 2019 08:15:36 -0400 Received: by mail-pg1-f193.google.com with SMTP id 23so7722794pgk.3 for ; Mon, 21 Oct 2019 05:15:36 -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=xR7W1GwN0go/X8fLSEXaPJYIpihUkOKlEqRzolNBmOs=; b=h+Y0coRGMly4KE+nb6Ra2tV4nrilADDUYPnv33sAaGK1eugmzVW/FzZHN5W0m3X4o3 UTml0Vzf8Z3tWGUifXS6P2VyXfqj1WfCsp9tnanGN2S3CDux8EIriXWqHoWKvE5bIP8k f2GOQYC4fQaP1Og3jqa7m5W1neAhuF1Ud7Hs8VgcazP+JFZ9rfw0RNxK2EjI6iOoQJs4 aQqyFEG0Zro+ajeqx3snZUlUr9CJNTzzsNyDHBF+XKqwtamsA+aHldGw395f1V9akZCl wGLZ+eqPPvlIss2oVUQXfASrOgnarubvZ+rVKlVANfx9SBRLyjxjVo1DkCdv+TuQJn3z k7cQ== 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=xR7W1GwN0go/X8fLSEXaPJYIpihUkOKlEqRzolNBmOs=; b=KofEbBUSi6wA98I+NysOWguCFPP2AfVxjOLuy6JJb7PoEK2iVoitD1MYOtgkZAqxoZ HShruOSFBMpP0uvi0eSomWx+68lQqx0/WhP+eE15PtmkLAgt425Uk7445NdO2cAg0Ddx XP05t+rwbjnW5VXrkg/JFeHKCbXq5sxl0K/yIWzjo4rp8TpcKT/uEJYEoTlP0lzTPL10 ep0uqRuZ8XZ+4Ej4L3xARjI3nfJ/nPWs6t39SB+/4JmFM+6SMp4nvJ9JnTfCuNJ+egqr 8IMGMRgGQ0oWz7gjrb6IeNMlwM1S8g+ucjrc6IPxKqN8Pd9Nacw5tymi/6/O5t0gUGNv WIOA== X-Gm-Message-State: APjAAAW9/Lh/Edg17T3Fyf6FJbuNzUoYJT1qti19nle9MJoXAmdFj3xl DtDNZ5WqgNU7RTIcKjSVjVotfg== X-Google-Smtp-Source: APXvYqwuE5ibzoeEar2RmNJatw8fKmT/CcJL8qyHAbJNydyMBKY12CDuW0bKMW/3gv35irjm6Xl82w== X-Received: by 2002:a62:1646:: with SMTP id 67mr22946275pfw.128.1571660135774; Mon, 21 Oct 2019 05:15:35 -0700 (PDT) Received: from localhost ([49.248.62.222]) by smtp.gmail.com with ESMTPSA id x10sm13800801pgl.53.2019.10.21.05.15.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 05:15:35 -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 4/6] cpufreq: Initialize cpufreq-dt driver earlier Date: Mon, 21 Oct 2019 17:45:13 +0530 Message-Id: <353c745d4ca1feff600bd44154c01c013f185ca4.1571656015.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 initialize 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 bca8d1f47fd2c..3282defe14d41 100644 --- a/drivers/cpufreq/cpufreq-dt-platdev.c +++ b/drivers/cpufreq/cpufreq-dt-platdev.c @@ -180,4 +180,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 Mon Oct 21 12:15:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11202111 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 3BED41390 for ; Mon, 21 Oct 2019 12:15:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19940205C9 for ; Mon, 21 Oct 2019 12:15:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sS7o7iqs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728713AbfJUMPt (ORCPT ); Mon, 21 Oct 2019 08:15:49 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:37545 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728500AbfJUMPl (ORCPT ); Mon, 21 Oct 2019 08:15:41 -0400 Received: by mail-pf1-f196.google.com with SMTP id y5so8327089pfo.4 for ; Mon, 21 Oct 2019 05:15:40 -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=FyfRV5Js9+leUaktEVHjzJNcbnyCVZmNmn0rQoEZsq8=; b=sS7o7iqs+RScyt6BaNZLIHcYIvEhJBzm7BJzVTX38JcWinbzToZ3aJ5g9oqzVF6+LA pQKXXkGuulQiZqNUINoLALWG17assWoUELh6fWzIh/rgY8oufCDbqAqSPPFYuaMrRoCJ zMf8Rf2YFIkiY3PAL4K1+UaQ1lOxuO39kCeF6/eV9yyNt1zvc+ElEWiQT9jhtWtWm8+f ittQeVB8GHx5bZtd372Di6jzjY/sBJQB5v1gBtU8T0phCcDpGFasEJ7mtIjf33oQV84m ijB5jkjTmzw4ey3nhVsYg200l/pNeOnk9DIUPSf2yrkqE4Nn1EXptze6w7LvBo1+xQPc frow== 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=FyfRV5Js9+leUaktEVHjzJNcbnyCVZmNmn0rQoEZsq8=; b=IoP5/i/T3rD4Z1NTQym7y7UUgnS09O2KYXHkRFUpecNSHzSz8kKdCS7xhBqcrlHk+j Logbc6/TTlCH4GepQtJV890ReybRdyqdCVj+aBSJjoT+V4dO/RhZ3nKj9kbqO0w46INZ Y7cy7tzRvlvpnelU85vR1k+N8QelNwLJWOzqP9NH2BoLmfufspLuNf50tNrCz4riYH4p QfX1rJfeDqxIhV1EgMdXHAVzmEslugyxmLLZZxX/RsKGhw+EEPtIg+nqgUGyC2twAy1F RBDdRQ3p4kXIjNXlDhro0uDZyCMsxQh9WVf5KxSQrjj8paWt0woThboj4fuYE7PKZ5V0 Pwhg== X-Gm-Message-State: APjAAAXx1e4tU4XN3l8MWPcmSrRp34c8c99QTL+LezVAuBXwcsDbHv3/ 5aRXUfJBSeQgNSl/1JxrRs+Z/g== X-Google-Smtp-Source: APXvYqw5PBkD1utYutUy6zvkffZmPfQ/KetF+YXD6Io7HIuCYrta9vEtYPa8mkg2wYcbkc+A22Qy0A== X-Received: by 2002:a65:68c3:: with SMTP id k3mr5280332pgt.247.1571660139404; Mon, 21 Oct 2019 05:15:39 -0700 (PDT) Received: from localhost ([49.248.62.222]) by smtp.gmail.com with ESMTPSA id 127sm15132523pfy.56.2019.10.21.05.15.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 05:15:38 -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-clk@vger.kernel.org Subject: [PATCH v5 5/6] clk: qcom: Initialize clock drivers earlier Date: Mon, 21 Oct 2019 17:45:14 +0530 Message-Id: <75ae9c3a1c0e69b95818c6ffe7181fdeaaf2d70e.1571656015.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 Initialize 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 Acked-by: Stephen Boyd Acked-by: Viresh Kumar --- 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 96a36f6ff667d..20d4258f125b9 100644 --- a/drivers/clk/qcom/clk-rpmh.c +++ b/drivers/clk/qcom/clk-rpmh.c @@ -487,7 +487,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 bd32212f37e64..9b0c4ce2ef4ec 100644 --- a/drivers/clk/qcom/gcc-qcs404.c +++ b/drivers/clk/qcom/gcc-qcs404.c @@ -2855,7 +2855,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 95be125c3bddf..49dcff1af2db1 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 Mon Oct 21 12:15:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11202107 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 842C21895 for ; Mon, 21 Oct 2019 12:15:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 62A2A205C9 for ; Mon, 21 Oct 2019 12:15:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EW5sDR0B" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728714AbfJUMPo (ORCPT ); Mon, 21 Oct 2019 08:15:44 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:37262 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728667AbfJUMPn (ORCPT ); Mon, 21 Oct 2019 08:15:43 -0400 Received: by mail-pl1-f196.google.com with SMTP id u20so6544625plq.4 for ; Mon, 21 Oct 2019 05:15: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=Cukx8ujHc8MZYDdytnpBWfM0F4aiiT0HrshMHuyoYiA=; b=EW5sDR0BhvXc5p2C2yYb6Ly5+xBcSNYaYAMkfBRcHMvST6fBuTLsWUipr6L1RkaRHR EyQ/H1mFn/ZhFeoaHosy+oDTjscGr13sRayWyNPEf5vnw4QJRA35GkR84gG6DyvZc416 VTWlu1owMddSIyvuBExTYfiRkBmm8T0iC4NPVX9FXIOxND35hCBjW51j8vY+xqn4Ztmx Vfl39SaOokAvpylKjusmOdhXZOyMu+1qRqwkgdcNrcewQot7pzpdBskEGhj6Ri86OLDh lrDsx8HLSHqVT07Ud81PSb2H10wWUkVZ/day47X+8dGQjogXPa1x617kWPv/z6Pw8KCl DKFA== 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=Cukx8ujHc8MZYDdytnpBWfM0F4aiiT0HrshMHuyoYiA=; b=NwDupi8XWwrLyMLgPqGYK5fzW/OKeOwAatvz2J/4rWRrDQ2G0gaQ0YKlgRhaE5ujxj pF0ABqhrLCRTTeJlQ7EyBTxDFGBFM6lYx60+Dr302xIfxT7Ty50Pl/mpRuRCPt1G4fF6 NlHNuTM8RM5VWtkW3sXRQRyGK+o9L1gJzVv5cwr6+Jn8srTdaR9yFAI1YFW0parHjMZG jibOnsvxhtC/j4sgziWXvo9tKBJG1StVOcL1/jWUa7wI7kH6vU94Q+F27WpwLJ1OrCbb hOZlioqLlIo1PG5/JdJlf+Jv4B9CUG0JoknJ3qF9s6greFsnWUvmJ/SFhzTB2062kAxL 0CDQ== X-Gm-Message-State: APjAAAWu4sCpC4U8GvYMFt8fRW5H3Kv3dOVwxbPPIeRiTt/xUEnfRubj 79crwtBx+wpAy6psdG7SOqA7MQ== X-Google-Smtp-Source: APXvYqxxOzJafjce4b4GYvuqt+JhynnibQqUNBuGu1L6adXLHdWZzFTJzN1XM6qXNR42+xvxeXPBuw== X-Received: by 2002:a17:902:fe8c:: with SMTP id x12mr14860552plm.55.1571660142988; Mon, 21 Oct 2019 05:15:42 -0700 (PDT) Received: from localhost ([49.248.62.222]) by smtp.gmail.com with ESMTPSA id e9sm12976482pgs.86.2019.10.21.05.15.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Oct 2019 05:15:42 -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 6/6] cpufreq: qcom-hw: Move driver initialization earlier Date: Mon, 21 Oct 2019 17:45:15 +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 initialize 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: Daniel Lezcano Acked-by: Taniya Das Acked-by: Viresh Kumar --- 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 a9ae2f84a4efc..fc92a8842e252 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -334,7 +334,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) {