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: 176779 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp557594ocf; Fri, 18 Oct 2019 01:52:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxT9HA4WJoPh28eYwEz+jt50nGJXWBLhXQfvHlDem8Rxh5soTa5OdE72oDvygM2ODuQ7A3E X-Received: by 2002:a05:6402:1359:: with SMTP id y25mr8344334edw.183.1571388741586; Fri, 18 Oct 2019 01:52:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571388741; cv=none; d=google.com; s=arc-20160816; b=pKUGbHr7CNeGm0BO2bW5N73EqHIbJ7V2uddDfjtAehOX7R8l2xydfKslUnexTt/kMp aVe5p/1ILQN9mi9A3+Plw2nQFtH6TeatSk8txNe6BHplahI8Xh8NdxKo3Jot7DEbrqp1 CUudGUgGpTvy0Zu+Rj4H23bZR1ApjHnXrQsHBJ/vrUzkJoRZgsSlDbZO3VzUZI9ub6Zz +RCyCI0Em/fjWw0Zxw5FtQBAHAXodBb4ofvtAmjndEWhGmc6NbAl7qCQ52J6HBjyJ/LF VXAy2g2GUNLECqMgFzcyhsdDXIzaUyPQvzp+dmuje/EErKPL2p2XOsDCNukopGcPbmgB y7Sg== 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=Sa4xZAx/AZis8Bith/bcGJfRn7RQ+aAIMqtybRUr7Os=; b=g8+pmNXz0LbYFfsSETa3EKLCOrk15oxjUU5bs7zuNOJ9u7RZK9Rxa3jibeIGiqj54X vuH18ril19uSwsSyNg10HDRjjPBFdcdGfhF/jgV4Kj9S1cJrs2Xhcllq59sWAxPE5c8x Ewadj91LXulttl20m0qiWAgpE08bZrX+B58hiKB/Zkzce8xusdAgRFWWuvORXq1JR/9x dDNYU1h77blRbIQ2T/r7iVZUH+IwOFHGpbiqXtRzZJ8qey8xmEFQz2SwHaeHK17SpkP/ 9Co4Kfomq7MNVm+Z4fLeoO1xe2UgU2upI3/Aw5suDxTDHKAL04SSQ/kCH2UXzuDg8xJm n1MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lTsXurNK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 f19si3492166edb.385.2019.10.18.01.52.21; Fri, 18 Oct 2019 01:52:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=lTsXurNK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S2442242AbfJRIwQ (ORCPT + 26 others); Fri, 18 Oct 2019 04:52:16 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40805 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2442232AbfJRIwP (ORCPT ); Fri, 18 Oct 2019 04:52:15 -0400 Received: by mail-pg1-f193.google.com with SMTP id e13so2986225pga.7 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=sBjdxWzh2afHscQRZ//xiFOBIGYTwKD1fKXNQRVBmHnWjJUx/GFAyBNgGM2Dwi0EF1 ISZMl/zZ21+/IGP8SElxqyPf/uAIhq0MpZFVkzc0Y2KgbpJrPCx6uP1HvdhN35NBH5i7 qIUg6AVApB0oUjnfcquzWoI1VszkH1faLF2kbSi0oCSVTTzSnYmiBfhq0mATYnuldo8Q FxtI960eINd3EmR7uJYbQe9mMTb13H+l1Hm6rUhBQLy3KsouFRIEt4gwM0eZDkQhLv2c hd8qOsT3IgDC7U1Z3u91cvnbtJ0jmPj4CbTIT+1cJvzWt3iSE95Eyb6fHPntmP8kjH/h ZWAg== X-Gm-Message-State: APjAAAW7FrmOOfPrxKLX9mvgq+ASZP5nQCgH+PHZ60ouQxbdFJ6mvCeD UHNDiLjzjtW2mshpgR2zAvwCzmZkxkQNGA== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) -- 2.17.1 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: 176780 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp557627ocf; Fri, 18 Oct 2019 01:52:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwxsizUee4uEEND8JS9F7wRpufmjuM4REsZ/pS87nV4KI8fn4rMDnS83fYgz5b3JSxhpven X-Received: by 2002:a17:906:cc85:: with SMTP id oq5mr7358572ejb.81.1571388742766; Fri, 18 Oct 2019 01:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571388742; cv=none; d=google.com; s=arc-20160816; b=xG1aJUQcnnFBMjmtX3KgXIhUBj4kwvXUEaOvu2t/8OoB6Yh9UPxZ8JTArbfgCimTa9 Idm+JFlJngJbTEzXyECIAYT/cqGaJxdykQuE5Pq318ocWTM7Qnd2s9iQY7NiusNav8Cr /myIMPTBsflio0r5wTGf2Rd6HhXP3YSb4yGQd/DNVytTjvQyHwBlSNmqxchjYubkVYMY w0PuO/MU52n544mQQC49yPbA6NjRKt7VVd3d7NnydNvhH83rxEFG1/BsT3/lTuQkXvBQ ROkr9zUNOOmGXc0jFJPQnEhxcFKbSlOh+WPAiiw8uGu2EdYnjaTdVyKZ/G4f8gmX/Zt4 388w== 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=OV9GCJs4s7auzZpPSYG5QvReU/tq3thTyE+8LoeVN7Y=; b=u/TX1q5RAqSyzSxmIaIwxbCuQYH6pecwKUrjUWi8PCVgYTFhpO2HK7zuOuid+YKToU n3w4CuATZI65kg/yd0H6YuuV4G0mV5yjpOlLy3LbdOn+G4CS9ofFsqyT6oMy8VcA/dq9 IeyZ6WXrdFXlfPvXKvt+YWKrilb50fo6IqAUHt0tLggLzD9ztXU7j+GqBYYEG0pi+5CZ aSsufmY5AoltFDD4DC51msPYKdUqK2AzmG+BCo+Xjx7lpPMmldmvuMtiPOlsqnRnhMfa 9JjcHi7rLeE4TjqIOg6abN1ibtvqqO/bQoAUw03iqZteqxpb0cCKwwvLjyVXBHPLkUnQ lZzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dmfM6j4A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 f19si3492166edb.385.2019.10.18.01.52.22; Fri, 18 Oct 2019 01:52:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=dmfM6j4A; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S2632961AbfJRIwV (ORCPT + 26 others); Fri, 18 Oct 2019 04:52:21 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:35713 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2442246AbfJRIwT (ORCPT ); Fri, 18 Oct 2019 04:52:19 -0400 Received: by mail-pl1-f196.google.com with SMTP id c3so2534234plo.2 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=RUwcITMeQMqsrKuGmGANKy2bkEEUmyiuJbbE0MEXnRlxX2Z6XOwFNb8CnU50nW6Cqu sdmLa9yhTBGBgft88whyNtc6NI0J17Fc0/AKPg3XOTeQ36WpTziYcnAdI9R7xvAZFbOK d0G/TUhuVQU58hL7d2YQxBdTMy6A4nyD7CzmS17j493+LeR8+pqTKmLP6n1QiJRXS/Xe OkTQq4n8J/9e5x7ws9tqCr0jiWyaU2te7kTO76SHDrPEMjEE2DRBX3sHbhpzPnWBrnII 8+tQa7VY7wyue+W8MAe60rIqTSQudVuiZAhOn6jeyWncymm368yRlh3QMhHiyxiYzw7F 2sfA== X-Gm-Message-State: APjAAAUNkeYKTQMrjDmkLTqggRnCnv5zU33R4elU0cDPAGztXYzT1m3n rb1YUaeDySiIx6TV3la1KUDVv3u2MhHh7g== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) -- 2.17.1 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: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: 176784 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp557885ocf; Fri, 18 Oct 2019 01:52:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQftHYe1xEfn/vOMgNB/x65x/72S40Kxh0rDM3mFIpxzmA4qY/2yjl/VLcsGXv2jEgSxWq X-Received: by 2002:a17:906:2ada:: with SMTP id m26mr7515795eje.87.1571388760685; Fri, 18 Oct 2019 01:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571388760; cv=none; d=google.com; s=arc-20160816; b=hiF6c7rbN+sE97uojS94/X1NObO4Rj0MN3jir/cmrppsj2jr0V3aqf2CrdtJ7Lp5zT kFtXenbm5Da7mJuEZ/5aIHCib9z4J+BsuMO3SmVBgN2pogdHCkblfAHGnWNKJTLT1lbG 7Jdd3CNfAdO6YOOrVg33RDmhGXJuZhF4FF7Y/+y/p0e/YkPH6v9K/5R58dVoQMKju0iO yvhOGToolfJzfvlQw13/xTyQ3TP7kMUeqA1zttCuq0v9VF4w0L11yg3slHxQt+0odaMu 6g6okgGy8kCej34ELzil5GyHHep+4RPWvt6mdDDBBqIjuxfL+9TFQH0AKrWc5aS6YRfN EmCQ== 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=Pg58XqMrgMUueF1t0WSUT94hNH4L7QyXjN2jFD44ecQ=; b=HsUm4wqhfkHPqq4nb0JbCN+VVwHsjmBusqJcm7LAlAqj1Qxb/uvbesl1lGJDm0qo95 o+NFoxoLT2S3faa5sxAa1lmiQUDgGNZ9LiMt+9XyOn6RqDbIF/GpWl5snDl/qPndC3HN w33IcG8mhpH8bsFd5YQaeha97ny8nSPKwDrzOqBLe5FuLbEsLmDdlMJ42AC++XpTrkol Yrg30ioOBjEPZH2AqXjggwYSCMUMl5LtxH1r4fT69S5Sx8lj32CuvJdKM34YFuPJBbmm v4AF2OtVV/4VTQ4T/dhIXZ7Io8iDfsSakBqP/gxcrsOeQdcSkYoHI0aSc8N5QEzuKqKB jWOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mbBsczHQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 j21si3141342edr.376.2019.10.18.01.52.40; Fri, 18 Oct 2019 01:52:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=mbBsczHQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S2633010AbfJRIwh (ORCPT + 26 others); Fri, 18 Oct 2019 04:52:37 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:34868 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2632989AbfJRIwg (ORCPT ); Fri, 18 Oct 2019 04:52:36 -0400 Received: by mail-pf1-f195.google.com with SMTP id 205so3458334pfw.2 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=G3HelI2ycZgCLicZl+hgGt3EV2j/ljXi7776ygouF3pLKlbnB7GjaKL0RvTsNhjlQD pV1TuVICMsBy4vVZe3tbFcYbE48cRykKMoT7bxE095Zb/2/K36VOv6U29MxGsl78jowM gPbvG5AlPg7vNBRx4Kj0X5rOsBK2zFddqfsT4b/1IIGmmzq302VpDDdBQVZX+Om9LyoE DMzWL3tKx+8MmRiaQ9M5GUzDOnrUBQuS2vi1htKCEpUL/DLE7tvAQdWAU+wzPN6vSMrg eXTvpTTwzBvb3Q2IloGPSjBbOC9BZclskiNo0B97qBR9HhTdTerlANBF9t525DlCCy6I bvmA== X-Gm-Message-State: APjAAAW+3EsdEBsxwJDb0OppluLoK6Ddc4R/nx8fQetKmPgjMrkQqxl9 7dcKYv65r0L8/ZP/N8qPuP8VhbMVKeCvmw== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 --- drivers/cpufreq/qcom-cpufreq-hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 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) {