From patchwork Fri Oct 18 08:51:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11197821 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 CDA1B13B1 for ; Fri, 18 Oct 2019 08:52:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A4E00222CD for ; Fri, 18 Oct 2019 08:52:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="lTsXurNK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442233AbfJRIwQ (ORCPT ); Fri, 18 Oct 2019 04:52:16 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:34029 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729861AbfJRIwP (ORCPT ); Fri, 18 Oct 2019 04:52:15 -0400 Received: by mail-pg1-f195.google.com with SMTP id k20so3004661pgi.1 for ; Fri, 18 Oct 2019 01:52:15 -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=lTsXurNKTYLDEE0SwwsqiJT0OyzmCa9BCTZgXPIo12WVhfKNguSizgglpk5iGYkpKX Uuh/HxVVMdDbVznllp28i58olYO+JQqua10Ir8j3vDgFUdNS0p2Jjsh1wO4bHUrT7W/Y SZoGJqYaa+87P/qTpcNCT428TBQZ/KNW23iWZHDJDRgR9L9iVVcHz/7JgHnVOLFKNco1 6GYSTuFYZFwBdGxwiwC7JEWCDSwchR13aV1ZroA+875ZoqeLNh6In41hMFsnbRGklFUO ImqUbsmUYZyzCRIYAMJl58OiIYN7/bkXUztcmkpCxRvkwH8YHrohXbfHTCwNSSWy9V9W nzIQ== 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=jzcymnXj+fuW5CDIVPrfk78jmb1OvoXwtUPunP8NYPnzqz1WgLqXjcjpfa6DAbM5+u Ak9DwDZX2jjHyph3Ynt39MiM7GmvAK95NPsfKi3rZqiXTHYXqwLlyUeaFFdDN8Im9Voz 52fK7hD02fjWjE/u36tne03aO29wvswY3atFEdTp7NX965Nfdo7wHi1rWv5yNXOjAX53 /shygq8At79Bd1+HGtDh9CD6Pgl4rDxYyUbc91tNWQTvfxNU4GcT4YVXpSzkLJcn2Xqd jg6q2LvxCvLZXFMeVLpFw6VU0+HlGebm7QTmEmGiGy66oRoRBI3SoUFmyG3GgUiB21i/ bsxg== X-Gm-Message-State: APjAAAVaeJOUvpDQGxm380xyy8B30htdxZgRMcc0AMfWyMDJjmlVLgWe qU4uMcvgHNnJnNxmX/+HOz8cqg== X-Google-Smtp-Source: APXvYqzurDAMMBm7Nz2fZ+nPuZ7egqv61ZuJaPX7gCvZlG1c3dsUNUmcm3fh4kjhT2Rm2E6YVL2piA== X-Received: by 2002:a17:90a:868c:: with SMTP id p12mr10031253pjn.45.1571388734516; Fri, 18 Oct 2019 01:52:14 -0700 (PDT) Received: from localhost ([49.248.178.134]) by smtp.gmail.com with ESMTPSA id a21sm5440978pfi.0.2019.10.18.01.52.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Oct 2019 01:52:14 -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 v4 1/6] thermal: Remove netlink support Date: Fri, 18 Oct 2019 14:21:58 +0530 Message-Id: <8ff02cf62186c7a54fff325fad40a2e9ca3affa6.1571387352.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 Fri Oct 18 08:51:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11197825 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 DBEAF17E1 for ; Fri, 18 Oct 2019 08:52:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BA65521897 for ; Fri, 18 Oct 2019 08:52:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="dmfM6j4A" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2442247AbfJRIwU (ORCPT ); Fri, 18 Oct 2019 04:52:20 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:45472 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2442245AbfJRIwT (ORCPT ); Fri, 18 Oct 2019 04:52:19 -0400 Received: by mail-pl1-f196.google.com with SMTP id u12so2511225pls.12 for ; Fri, 18 Oct 2019 01:52:19 -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=dmfM6j4ABh73a19Lql/07zj2f/0Iwn3aie8/jiCr1K6Vb5Ytac72LE/hl62BYZwskf QBwjojv+SJ1y1JjFxvkRx0+t3VRWbQXLB4bs1jv9Bgr6T1w7haFGcRELPXqQh8cLsO9Q o/LW/pGLKqF1eb3h0BDTea7w3frkGKdGJ1fc8F3C3UyetgUMZBobiCcynMF0g6pUJd5+ uelEYgHFlec1Kc0m2bSBsZ/9BmMTMOFHR35jIjaxBSH3+KO1kKE1rm8v1Y4A9HPOZB5N 6u8HtAVKYO42M0csV83e7fwx0jGrnSAMPeHvLPR8wH6PomL1eIVbxOHmIwYfaHBw2nhj +fxA== 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=UxY22kn+hGo6hsQy/NitlnbgIn2BCjGDIgnZ2lviJVrK9BCj9GH7woXPmXki4teK0q SR9LeW0Q28FxlWOSmJa3tj6eBhs9JNjav1ogyaE2unoArO0cmkr7f09BRXxZjImpU6gC aENn0ynzCdKgeB+27Ebr+tI31t09Q4dW21NxvbJri9YHVbbxurhNAAxsD3nMmTzMx9IW atnrNzwmrAlRfMsNh2eIRnfZOS481BKbmtzfHjMCs5UZqI1+8jQZH1eSepB1I80G+ti3 SkBmVMMfYdoZ90wtApsJgqdehOmk4e+3NofXTRbNZVSes5o8oQkAacsCucqc8nYMabeJ WgVQ== X-Gm-Message-State: APjAAAUzMisDwbLmngcpgd1pbRDpO2zoKDwcj+/VFKI+CvRej2TXablf vLlSeYIazIP7d676xjo3fKrxAB7SCUiUUQ== X-Google-Smtp-Source: APXvYqxSXKnzx+2EEFL8oM5GrGOtshkcJz4Aom/KrgOWjvBC/g0YvXv1JagKhBDGg1PhBCmj3qhHyQ== X-Received: by 2002:a17:902:8505:: with SMTP id bj5mr8309860plb.296.1571388738714; Fri, 18 Oct 2019 01:52:18 -0700 (PDT) Received: from localhost ([49.248.178.134]) by smtp.gmail.com with ESMTPSA id x5sm5246107pfi.32.2019.10.18.01.52.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Oct 2019 01:52:18 -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 v4 2/6] thermal: Initialize thermal subsystem earlier Date: Fri, 18 Oct 2019 14:21:59 +0530 Message-Id: <511b47ab70f6be4ba0f2d7f69217ee593a0bcfd8.1571387352.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 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 Fri Oct 18 08:52:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11197831 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 9E3BF69B7 for ; Fri, 18 Oct 2019 08:52:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7D098222CC for ; Fri, 18 Oct 2019 08:52:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="W0/ZDYAS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2632968AbfJRIw2 (ORCPT ); Fri, 18 Oct 2019 04:52:28 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:44768 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2632963AbfJRIwZ (ORCPT ); Fri, 18 Oct 2019 04:52:25 -0400 Received: by mail-pf1-f194.google.com with SMTP id q21so3434366pfn.11 for ; Fri, 18 Oct 2019 01:52:24 -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=pOGwcMchIXdaRlZBtyBhTrAkf1RWijM6eAT3n0JAvC8=; b=W0/ZDYASOJLvNqpxJwakFyLljNCg9m3gU0qus8PbZv80d4MBYV61s6YgkTZ2o092HT l6Hox1rxqw02mP0hkE4dmTIBOWuWzQnun3CAx8iQoBX+ieOgLqXuGkwjkkOBDHTp5Ej+ bSnCeOZpuByrGXv865yvZBGp5e3L4VUeAZx+58RmXzR2DvP9GDKFU1ygQ9w2uMVTfPcz smHMCtUiUzR34xEfz0yeFzUvh94kWKg6jMr4+OVdRPZ10fXTx3dQH2GQTaOGk6Ngx4Uk IMX2iqAmFPlLvk2rQBvqd8zGqL8L0dUK+Ga6BJIMHRfiL0VXN79mrWTRE45HPF/mmQAF dwcw== 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=pOGwcMchIXdaRlZBtyBhTrAkf1RWijM6eAT3n0JAvC8=; b=RVissVTsTlrnN8yDIIhFym7LXrhRVm/qVAbQX+Y9o15JKoVisbpFolKnqiAQNjtQdJ IM3PGHxSqZXlDdso8g/jKdtPjFV+Kwxo+Iv0CDRcAF5zlzpnkNGkmJpzKreEnKYTkOhg FInWTJuTXvWQMBocrL3bE8IJS+clchfEqSR3VnbNALEOYUENl5mjEbn7jW8FQrceYGVd DOY285us1PiHk1t+JmK0l5ULuNcZQMOFrIBh9YqfnXyD6qoCuHEoepeQfQXqbdjAuZn0 2xvDe62QvZr321vcXzXeRDvDxUndy9NvKUYR+gP9GM+q2931eisbvLjnkrjo0fFLXEs7 xzMQ== X-Gm-Message-State: APjAAAVR43wI4inVeTNW0p9p1Us67bdTT9uxepLHMS5pJ0AgH3bd7kG4 KO8dBQCb7bpI6CUaR4jKX0cbdg== X-Google-Smtp-Source: APXvYqwoQ5ESE21BX6wAak+ChcC8b4+hgljou3Np9qGufEF8scYDPgxmkBTLTmXkiWYDrLsXbM03IA== X-Received: by 2002:a17:90a:bd8e:: with SMTP id z14mr9466041pjr.40.1571388743507; Fri, 18 Oct 2019 01:52:23 -0700 (PDT) Received: from localhost ([49.248.178.134]) by smtp.gmail.com with ESMTPSA id c34sm5688183pgb.35.2019.10.18.01.52.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Oct 2019 01:52: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-pm@vger.kernel.org Subject: [PATCH v4 3/6] cpufreq: Initialise the governors in core_initcall Date: Fri, 18 Oct 2019 14:22:00 +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 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 Fri Oct 18 08:52:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11197829 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 737AB17E1 for ; Fri, 18 Oct 2019 08:52:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 518B3222CC for ; Fri, 18 Oct 2019 08:52:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="npNq6UNt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2632963AbfJRIw2 (ORCPT ); Fri, 18 Oct 2019 04:52:28 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:47034 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2394154AbfJRIw2 (ORCPT ); Fri, 18 Oct 2019 04:52:28 -0400 Received: by mail-pf1-f196.google.com with SMTP id q5so3434075pfg.13 for ; Fri, 18 Oct 2019 01:52:27 -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=tSzJEpJmDmeHOSEU0I3AfQXPKpO46HQzH7+Mdke63aU=; b=npNq6UNtXYpoaXJ3I7t2IdXdGe06e+rEdJhFxtv6H/2c3gYxsM311WsUfYe2YPeLXv 768UOT5TJugLFh5EWKwXxgf4gtmYK6e7eIRLahWH2yT1KURVAnfccBCO2XbYoIymgvLe oZst0d+algxp9nI8DMjO10QY+hsuBXYeJ6RYVcE51TeViEB0PkvV9xzBvleJJJZps71V lsDlm3yKkeYTjOg9cL7X6UdsU62Tc0D0PP1k+7cqUcXlI4ONOObK0fbVD9B6cNngIhZ0 kSh+IrH7TnmolNGlzhyO0VOTLYEfDqPxcS8iRqahIyPJVRFKb6+MQ/gJ++/MrcAHG6sG aDNg== 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=tSzJEpJmDmeHOSEU0I3AfQXPKpO46HQzH7+Mdke63aU=; b=FugD+gXBB8wKkGrqO/UjOljUa8ZPzqArGBwRTpviX0eeEgMwpatuv1V7UnXG2lFvKM u0hBSfZo27Fvxpy5JEPgAlrbFF5ckhKk2CZXtB2AU5RlDBByVTwSWfAdghB78y6Suyyl TjumaBF0Cz62w/diTK3iDksOPZLV6N9Wa6DoqJKVv7h5sc8EFwTI2zg4hW4Hbb9Co0sb QKf/OzWO/uO+C9ODW7p4MAZYTbOhA31ZakMsWSeldByXs05lm9feALQgqAAtpH6qTlAd gbJ5pay+RPjANll86HHSdTrgW2nyq8a0fA6yeqUlMI8+f1fR9e4yC3QEXsmRn3pGY1Qz KOJw== X-Gm-Message-State: APjAAAX/B1xh+fkycUuBXDfxGVN9oZNVs4ybBd7OaC1dULomVkmCgx5L 82JjcnrYhiYtCDfDFcH4SbJpWw== X-Google-Smtp-Source: APXvYqwZ9DcorsT0otODsjVhMRV+5vmVK01y/h76Hpz5XctIkGGXzAYAJLgHoIMc38KZoHfdcV+AJw== X-Received: by 2002:a63:6b0a:: with SMTP id g10mr8500894pgc.296.1571388747372; Fri, 18 Oct 2019 01:52:27 -0700 (PDT) Received: from localhost ([49.248.178.134]) by smtp.gmail.com with ESMTPSA id x19sm8025248pgc.59.2019.10.18.01.52.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Oct 2019 01:52:26 -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 v4 4/6] cpufreq: Initialize cpufreq-dt driver earlier Date: Fri, 18 Oct 2019 14:22:01 +0530 Message-Id: <66d8ae593ce7936a5f492d0c6855c1ac225b64ee.1571387352.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 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 Fri Oct 18 08:52:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11197837 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 12A8469B7 for ; Fri, 18 Oct 2019 08:52:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E61F4222CC for ; Fri, 18 Oct 2019 08:52:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VmFlhBj2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2632964AbfJRIwd (ORCPT ); Fri, 18 Oct 2019 04:52:33 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:37153 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2632988AbfJRIwc (ORCPT ); Fri, 18 Oct 2019 04:52:32 -0400 Received: by mail-pf1-f196.google.com with SMTP id y5so3450326pfo.4 for ; Fri, 18 Oct 2019 01:52: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=yJmW/rmXm26duaDyfOHOFYteagLDpotWOjrp7D9YhkU=; b=VmFlhBj2FrlOil5Ro2+R3NNGOF/BhIIl/xJUhPKmdZjV4yp/3W9q2FDa07vgRUyBwe 77DJhlG/aRp27LbwoEJXO7aSur71B1sjKABDOgQo9FiuCPRzwhM2EGYDXppyDUskM2w4 oDQKuW9cziROsrSoLFPjze+hVNCnYlyglffqO4JyHA1qALqjQJkA+0jJJrI4srNoaco/ 6gZXAyhkxhS6Z12KgmQrt3Ou3COXNlyA9t3QoHgdbQxa9NpK4QKcBfmpGK0KTEp58xFY ZXoClqiKOSskIQt0qq3AHrxAfi3TvvA9L/F4nD/q4KeBj9rMfrxCDjL9eW/mmDmSOhtO aj+A== 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=yJmW/rmXm26duaDyfOHOFYteagLDpotWOjrp7D9YhkU=; b=G7GX/ayahopWRq6zxFpKQDLjozMnrxX6CvwI5K6Cq8z9krII5+wS/vnBT8bKMir0re M3qta3/ezbJu0TXZw+a7dg5oL5QJxv9jXJ2g7SMKhb+0Q13w6s1v/dUfIffyXL2hpfDi Gw6Yia3+aYbIR5a9tISPCR/PsWJ7Mr4Mrc2VlctFyyv7CQSMYsYtOpwY3aK7X+WJ4zfN Lz8eZD/wG1W98S1kRXOMKWkWU/AkiAW2OyZtAEpUqQjCQwBwokaUSgiXgstUaKgdcxJI 31IP3zrPRemNvzh8GxbNvtF3NuvIUK1xwPlyFdlhIHnCREdDLXDsXQwGk+G5If6vdtrp kYAA== X-Gm-Message-State: APjAAAUF3jZ7cDaHTNKpGh4E+KUF2EWqOi+nmtmm317flmE9tkwnnh/y zxocvrNaUsoFkG4C2aazqo0cPg== X-Google-Smtp-Source: APXvYqxI49Qp/6OHcYXVbuLyz5IE0hCMoyGFSumazKMZCgeoR23NYt8ytaEwx3DYBTG7pFS8jSIMCg== X-Received: by 2002:a63:f854:: with SMTP id v20mr8674374pgj.92.1571388751747; Fri, 18 Oct 2019 01:52:31 -0700 (PDT) Received: from localhost ([49.248.178.134]) by smtp.gmail.com with ESMTPSA id d11sm5278150pfo.104.2019.10.18.01.52.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Oct 2019 01:52: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-clk@vger.kernel.org Subject: [PATCH v4 5/6] clk: qcom: Initialise clock drivers earlier Date: Fri, 18 Oct 2019 14:22:02 +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 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 Fri Oct 18 08:52:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 11197841 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 630F569B7 for ; Fri, 18 Oct 2019 08:52:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 42DDD222C5 for ; Fri, 18 Oct 2019 08:52:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mbBsczHQ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730432AbfJRIwk (ORCPT ); Fri, 18 Oct 2019 04:52:40 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:32805 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2633000AbfJRIwh (ORCPT ); Fri, 18 Oct 2019 04:52:37 -0400 Received: by mail-pg1-f194.google.com with SMTP id i76so3008520pgc.0 for ; Fri, 18 Oct 2019 01:52: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=Pg58XqMrgMUueF1t0WSUT94hNH4L7QyXjN2jFD44ecQ=; b=mbBsczHQ7geTZHLUH4glHa/GX3d3C6ZLa1u5dvWDZVaHWaS2JW7g3tU6SDyLxy6o1u Ds+uGnMxFI1XvqwwerVewsBsOJm0LG3yhE5/CfT0nTve6T4lYLg/BgbpeWs9FCp3bkP/ 2Ibs1iUqmJT+tkwK3dSKnVoWyVL0cPq9GW2PyGPwzyZQKgs07xKmYmo06UC3UTN9b1TI 6DN0X7GFdOLHiURDDIY1mq6bMBwOnZi5VaudeF59RJejJJtl3JcMLLSqmVEKZh12MXZO O9krPHLIXRIT3dWmX/RwRshSQBwsyDEVqof8bpki2b5GXrFYAUiuAvb6PPcfNflVbqGI UBcQ== 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=Pg58XqMrgMUueF1t0WSUT94hNH4L7QyXjN2jFD44ecQ=; b=K0x4M3+YK5iqHd1tP4L4LVp1ctDt7/uiIuQDMxM9jcqyMDL1nI8DEDpDhdq75XBx3l zZ1/gwFK6jf/w60uoWobBh85DbMhKTgBWPUFUH0dmz2U0k7MRduz/FG/WUg5lwiDYppG yqksqbCtbt1mMGl4CvihyjS4V3ww6Fm1f5PHdCm/6eF3TiGnLiIFxnZbOp152Kk/IVWj QyMTIbSxbznm9FztvXghMoyfqMYplrGeSz9TBfdyDEZ02pvIrTgGvkWqu4T6McEHD/Y7 NLOp0vVfdp/j3buEzw9Cu7alqfRn6GtG+Riz/CsG+e2I/Aeb6t38C+VIN29dDWKUPxLc D7pQ== X-Gm-Message-State: APjAAAV3oUBEu3YKf+O0wDnZ282MJaT5JIAwgdn9/c3yA8Y0b/LR85LJ kT4B4zIidSGNymH5HYEtYIMXFA== X-Google-Smtp-Source: APXvYqx8Mpcrks1BZxeEuPxaAnWhLPj55ZV7f4Bw1XHAjGHH8rk1ne6dxHoD9m6lONZAOPVwKvp1Fg== X-Received: by 2002:a62:4ed6:: with SMTP id c205mr5321495pfb.208.1571388755817; Fri, 18 Oct 2019 01:52:35 -0700 (PDT) Received: from localhost ([49.248.178.134]) by smtp.gmail.com with ESMTPSA id s1sm4662870pgi.52.2019.10.18.01.52.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Oct 2019 01:52: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 v4 6/6] cpufreq: qcom-hw: Move driver initialisation earlier Date: Fri, 18 Oct 2019 14:22:03 +0530 Message-Id: <3d367762ba72fa1cbd6391dc55d94b3284f6c00c.1571387352.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 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: 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) {