From patchwork Sun Jan 23 12:45:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 534424 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44336C433F5 for ; Sun, 23 Jan 2022 12:49:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236343AbiAWMtr (ORCPT ); Sun, 23 Jan 2022 07:49:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231757AbiAWMtr (ORCPT ); Sun, 23 Jan 2022 07:49:47 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB0AAC06173B for ; Sun, 23 Jan 2022 04:49:46 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id d12-20020a17090a628c00b001b4f47e2f51so14944465pjj.3 for ; Sun, 23 Jan 2022 04:49:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H4VFK06JndyOFW8C0SfR310BagEjOeINyHP/kSf4B1U=; b=mGvQlJVtSt6O4MtaGftzlhmTWrOVF8/RbP7HmD4g1GAhzinE8zfSpAOx/FH9PCy1hZ 0IaHXJW520J4k011Xzwf1mTogfp1rr1YhlugGBjZce+0+d4qfBXfAJG6F9Q3Q6GCivl+ TKoKPTDJFjJBXn7kY961XzpAfYwevhKyrKLWBw4dwTXk8I/bjlxujVKvQX7OxGYP8ixP /Evnu1kfE5kirymKb+GesLRFdfh/p4513X2X83mvTXwdPk/8+n30+r0Kwl+iJFlFXWl2 X3jVzK4Vq66erBURCHXOsFghAsHrgBfv80xrSEPQ90xo1GN8Sa98v85ua6MFuGVngZ2J bR0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H4VFK06JndyOFW8C0SfR310BagEjOeINyHP/kSf4B1U=; b=iYpLYbhJudOaAPylcUQbCZgW8elOxtRJKYQjgyPvo5jFH2eSNDn5sasCYrGDHKy8rW lEWlesYdtvXkBgrL08L4uinBwkY9l5GFC7z5++UIaZNXehwjOSuJmK1oA8iBmngnvAuy 0jSw7KJb++3cnlqSKuji32761pgGDQcJwRzGxxrURNn8GEX+QJ5ZF3MCI7S/UZ9LAflu iywF275XC2HU9MQDABDTufev/gt5N1u2vGYHccpKwL/dKLLl4kiK3ddCV0y4e/fgBqvT 20kYLmaS/lZe24eDuph7KWJzgSPdlJxZOW7f1F7KkHRGOciNwO6KsdGCOWBh7Z8Y8+90 jFKQ== X-Gm-Message-State: AOAM530wY8bxPL32vgwsr0yeHMbtgeBkiXq78RF57/lUtlE/iJT27xQ6 qTWzzyPG8oHNFuh6zPcyvNA6FdOYG5P3vA== X-Google-Smtp-Source: ABdhPJx0GwqNjUAV5Satjqlf4IVfHdvbqsV0eId+JIpWHOdPxDGIxbyzsncvxsmq90QMCqNvmGDspQ== X-Received: by 2002:a17:90a:550e:: with SMTP id b14mr9054799pji.98.1642942185931; Sun, 23 Jan 2022 04:49:45 -0800 (PST) Received: from pek-lpggp6.wrs.com (unknown-105-123.windriver.com. [147.11.105.123]) by smtp.gmail.com with ESMTPSA id om6sm9765972pjb.24.2022.01.23.04.49.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 04:49:45 -0800 (PST) From: Kevin Hao To: linux-pm@vger.kernel.org Cc: "Rafael J. Wysocki" , Viresh Kumar Subject: [PATCH 1/3] cpufreq: Move to_gov_attr_set() to cpufreq.h Date: Sun, 23 Jan 2022 20:45:06 +0800 Message-Id: <20220123124508.463305-1-haokexin@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org So it can be reused by other codes. Signed-off-by: Kevin Hao --- drivers/cpufreq/cpufreq_governor_attr_set.c | 5 ----- include/linux/cpufreq.h | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/cpufreq/cpufreq_governor_attr_set.c b/drivers/cpufreq/cpufreq_governor_attr_set.c index a6f365b9cc1a..771770ea0ed0 100644 --- a/drivers/cpufreq/cpufreq_governor_attr_set.c +++ b/drivers/cpufreq/cpufreq_governor_attr_set.c @@ -8,11 +8,6 @@ #include "cpufreq_governor.h" -static inline struct gov_attr_set *to_gov_attr_set(struct kobject *kobj) -{ - return container_of(kobj, struct gov_attr_set, kobj); -} - static inline struct governor_attr *to_gov_attr(struct attribute *attr) { return container_of(attr, struct governor_attr, attr); diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 1ab29e61b078..f0dfc0b260ec 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -658,6 +658,11 @@ struct gov_attr_set { /* sysfs ops for cpufreq governors */ extern const struct sysfs_ops governor_sysfs_ops; +static inline struct gov_attr_set *to_gov_attr_set(struct kobject *kobj) +{ + return container_of(kobj, struct gov_attr_set, kobj); +} + void gov_attr_set_init(struct gov_attr_set *attr_set, struct list_head *list_node); void gov_attr_set_get(struct gov_attr_set *attr_set, struct list_head *list_node); unsigned int gov_attr_set_put(struct gov_attr_set *attr_set, struct list_head *list_node); From patchwork Sun Jan 23 12:45:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 537488 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B535C433F5 for ; Sun, 23 Jan 2022 12:49:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236344AbiAWMtu (ORCPT ); Sun, 23 Jan 2022 07:49:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231757AbiAWMts (ORCPT ); Sun, 23 Jan 2022 07:49:48 -0500 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8B9DC06173B for ; Sun, 23 Jan 2022 04:49:48 -0800 (PST) Received: by mail-pj1-x1030.google.com with SMTP id d15-20020a17090a110f00b001b4e7d27474so13746650pja.2 for ; Sun, 23 Jan 2022 04:49:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4IJ116pTULrMfInhOwgQ7Wa1AIt7I4SXgaAAbmFElZU=; b=ZzN+AzMWBu61AjVgzA6AnEsv6bAx4+LF7/yiAqd2nOIqpWJjWpKE9bDKu2s4wGGdpz WRfUlQZBRMST+hB3I30TZYsNOu5DVoZ0FZcx1QbKlBYJrTNskJtIfkagkGpQT5BioL8H Xfjq0WpSBuuwzZoG2uPpU1WqXA/4D2DuuZBQ8fMx2bp/CZYjyGz5TwuY+ASzGjvxW5bo qq/NpZoq6R1NGX5PbiheHnv7reRz0o1NsEtTCwJGpArNZiluDgblNAopaOn68fI9JXgG 9txnBPWjX9Nk4WICZvwyC2i2zO7VxoWfq4il2DbKHVeAVpMLPyCqDVcs1Ux+L5Nqk1XM Ugug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4IJ116pTULrMfInhOwgQ7Wa1AIt7I4SXgaAAbmFElZU=; b=UV/6+MES8l8RRAis72UxUPjymiOQ89FNg0ulxEzBLr+TC+U2Cz/ZGGcFz+F0t8UTYX o4wvlbrHHORSwnGVHwOEPMT10F1/IKr4NIBci+9kKZimyLEFS+tR5BhL5MRj/OnFkKIe h++VIQM1ZUUeiLueyIJ4UDM+bNHYANi0EPWSPhxS0THa9t/Wu9KQWkfUNCKsTmqvy7fG if2+HGR1LgaGvU0ywP34vtmj/U6/ubyTqr9MJHM7qYj9E6cybSy4j50zNCr9VstM1PuA oO1AdOuWsE1UYd2Ye43Gdy+6L258m2XoO+Ww8BK7mUr5gv1OzkKJTJblTKOOvBD68IrD B18Q== X-Gm-Message-State: AOAM530owyheulZxf3CD6282ceunuHeI/d3cgzgY2bTUGvdxCmr354ka 0FzxkGAbe1bUA74s1VC8Bul639fbr38+cg== X-Google-Smtp-Source: ABdhPJxuWwN1cxy7n/uXuhPEUGXOZTxg7cQyr/G9lyYK/d3YEWtQHtL6zE4Ue00Q+Hj86h6DvO1+KA== X-Received: by 2002:a17:902:b947:b0:14a:a6aa:4fa6 with SMTP id h7-20020a170902b94700b0014aa6aa4fa6mr10932738pls.149.1642942188145; Sun, 23 Jan 2022 04:49:48 -0800 (PST) Received: from pek-lpggp6.wrs.com (unknown-105-123.windriver.com. [147.11.105.123]) by smtp.gmail.com with ESMTPSA id om6sm9765972pjb.24.2022.01.23.04.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 04:49:47 -0800 (PST) From: Kevin Hao To: linux-pm@vger.kernel.org Cc: "Rafael J. Wysocki" , Viresh Kumar Subject: [PATCH 2/3] cpufreq: schedutil: Use to_gov_attr_set() to get the gov_attr_set Date: Sun, 23 Jan 2022 20:45:07 +0800 Message-Id: <20220123124508.463305-2-haokexin@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220123124508.463305-1-haokexin@gmail.com> References: <20220123124508.463305-1-haokexin@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The to_gov_attr_set() has been moved to the cpufreq.h, so use it to get the gov_attr_set. Signed-off-by: Kevin Hao --- kernel/sched/cpufreq_schedutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 26778884d9ab..cffcd08f4ec8 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -539,7 +539,7 @@ ATTRIBUTE_GROUPS(sugov); static void sugov_tunables_free(struct kobject *kobj) { - struct gov_attr_set *attr_set = container_of(kobj, struct gov_attr_set, kobj); + struct gov_attr_set *attr_set = to_gov_attr_set(kobj); kfree(to_sugov_tunables(attr_set)); } From patchwork Sun Jan 23 12:45:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 534423 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A88FAC433EF for ; Sun, 23 Jan 2022 12:49:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236350AbiAWMtw (ORCPT ); Sun, 23 Jan 2022 07:49:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231757AbiAWMtv (ORCPT ); Sun, 23 Jan 2022 07:49:51 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1486C06173B for ; Sun, 23 Jan 2022 04:49:50 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id i1so3329209pla.0 for ; Sun, 23 Jan 2022 04:49:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZgfLmTvcNymeOaECAKvKLM5rkHMPHjnlAJ/ZmgbR67g=; b=agotq3Dm1aJCWZRoU/wqetBDEaStIHd6PE6U1cKn+g6Mt6H05YIIEjU5YY6KKu3AX6 B7HX8al5bpepWqRuzQQQGDNxCHF5f24gUpnGQ1LJNG3pqg9pwGbV34iavzh9FJqWQGJq riv2cr4e3QyLkjeoI+FTgQkzTAy43YehS/60DjREsrlqtsvEuaeNB8elU0WmH4Dz+F6X TPjMDKXXU/Pw/EV/Ci8zhLu60yxGq4guvl9TYouYO1tTsZzVLzjk+dwdQcSlF1LzZCgf jS6SJYmxW7cUEG4I+z7BCrtjhqNYVM0ckB/8q1TmnZHoPdLRYZ4dbIamEbgdEebS/tI3 4H9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZgfLmTvcNymeOaECAKvKLM5rkHMPHjnlAJ/ZmgbR67g=; b=Un/bg4SPlp233NzzUbzDotWzWV2JxjQABnSopf+jsY8XmKFId0j3iqSw8PX8lfUK8E JnxvZBctMpgxPuoBbrhjUL/pbCkFfuB43KDBtWE2sFhAgsHsE1la7GgIntyihg3cVTQP xClXwj/6/JLX6/zq74nQxyuS/IvDLEOJSREmalUVzy2G5N7QqWTb1DphPj/FgV++S5un DzdjmY/1vbuO9zwiLdrM5f3JbYRKQVZel6A9tgaeA6Dq5+hlE3640Mrhr0HYsgckxTfl CO5bDOCnTBZngDEwAS1JEZiWrK1Kb+pnfKoXqHgXK9RBBn0JRh4Lr5d7uxX5601Iqbjj YCqg== X-Gm-Message-State: AOAM531EHRG0zmRF5dKdasBxDOiAWfTqRSVNKAVbkEN65OA2Jl2s+Sl9 8FX0nq5+7SrPLV3KFnoZw379D1VQJqptsA== X-Google-Smtp-Source: ABdhPJzZm0ni/lsAD6vCs4gZkYbiGbMdQKoDpP9fYxwoR8I9kDmyo5qiL6kA9U+GTd/pUWxJEzYwsg== X-Received: by 2002:a17:90a:3f8b:: with SMTP id m11mr8840456pjc.176.1642942190276; Sun, 23 Jan 2022 04:49:50 -0800 (PST) Received: from pek-lpggp6.wrs.com (unknown-105-123.windriver.com. [147.11.105.123]) by smtp.gmail.com with ESMTPSA id om6sm9765972pjb.24.2022.01.23.04.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 04:49:50 -0800 (PST) From: Kevin Hao To: linux-pm@vger.kernel.org Cc: "Rafael J. Wysocki" , Viresh Kumar Subject: [PATCH 3/3] cpufreq: governor: Use kobject release() method to free dbs_data Date: Sun, 23 Jan 2022 20:45:08 +0800 Message-Id: <20220123124508.463305-3-haokexin@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220123124508.463305-1-haokexin@gmail.com> References: <20220123124508.463305-1-haokexin@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The struct dbs_data embeds a struct gov_attr_set and the struct gov_attr_set embeds a kobject. Since every kobject must have a release() method and we can't use kfree() to free it directly, so introduce cpufreq_dbs_data_release() to release the dbs_data via the kobject::release() method. This fixes the calltrace like below: ODEBUG: free active (active state 0) object type: timer_list hint: delayed_work_timer_fn+0x0/0x34 WARNING: CPU: 12 PID: 810 at lib/debugobjects.c:505 debug_print_object+0xb8/0x100 Modules linked in: CPU: 12 PID: 810 Comm: sh Not tainted 5.16.0-next-20220120-yocto-standard+ #536 Hardware name: Marvell OcteonTX CN96XX board (DT) pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : debug_print_object+0xb8/0x100 lr : debug_print_object+0xb8/0x100 sp : ffff80001dfcf9a0 x29: ffff80001dfcf9a0 x28: 0000000000000001 x27: ffff0001464f0000 x26: 0000000000000000 x25: ffff8000090e3f00 x24: ffff80000af60210 x23: ffff8000094dfb78 x22: ffff8000090e3f00 x21: ffff0001080b7118 x20: ffff80000aeb2430 x19: ffff800009e8f5e0 x18: 0000000000000000 x17: 0000000000000002 x16: 00004d62e58be040 x15: 013590470523aff8 x14: ffff8000090e1828 x13: 0000000001359047 x12: 00000000f5257d14 x11: 0000000000040591 x10: 0000000066c1ffea x9 : ffff8000080d15e0 x8 : ffff80000a1765a8 x7 : 0000000000000000 x6 : 0000000000000001 x5 : ffff800009e8c000 x4 : ffff800009e8c760 x3 : 0000000000000000 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff0001474ed040 Call trace: debug_print_object+0xb8/0x100 __debug_check_no_obj_freed+0x1d0/0x25c debug_check_no_obj_freed+0x24/0xa0 kfree+0x11c/0x440 cpufreq_dbs_governor_exit+0xa8/0xac cpufreq_exit_governor+0x44/0x90 cpufreq_set_policy+0x29c/0x570 store_scaling_governor+0x110/0x154 store+0xb0/0xe0 sysfs_kf_write+0x58/0x84 kernfs_fop_write_iter+0x12c/0x1c0 new_sync_write+0xf0/0x18c vfs_write+0x1cc/0x220 ksys_write+0x74/0x100 __arm64_sys_write+0x28/0x3c invoke_syscall.constprop.0+0x58/0xf0 do_el0_svc+0x70/0x170 el0_svc+0x54/0x190 el0t_64_sync_handler+0xa4/0x130 el0t_64_sync+0x1a0/0x1a4 irq event stamp: 189006 hardirqs last enabled at (189005): [] finish_task_switch.isra.0+0xe0/0x2c0 hardirqs last disabled at (189006): [] el1_dbg+0x24/0xa0 softirqs last enabled at (188966): [] __do_softirq+0x4b0/0x6a0 softirqs last disabled at (188957): [] __irq_exit_rcu+0x108/0x1a4 Fixes: c4435630361d ("cpufreq: governor: New sysfs show/store callbacks for governor tunables") Signed-off-by: Kevin Hao --- drivers/cpufreq/cpufreq_governor.c | 20 +++++++++++++------- drivers/cpufreq/cpufreq_governor.h | 1 + 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/cpufreq/cpufreq_governor.c b/drivers/cpufreq/cpufreq_governor.c index 63f7c219062b..55c80319d268 100644 --- a/drivers/cpufreq/cpufreq_governor.c +++ b/drivers/cpufreq/cpufreq_governor.c @@ -388,6 +388,15 @@ static void free_policy_dbs_info(struct policy_dbs_info *policy_dbs, gov->free(policy_dbs); } +static void cpufreq_dbs_data_release(struct kobject *kobj) +{ + struct dbs_data *dbs_data = to_dbs_data(to_gov_attr_set(kobj)); + struct dbs_governor *gov = dbs_data->gov; + + gov->exit(dbs_data); + kfree(dbs_data); +} + int cpufreq_dbs_governor_init(struct cpufreq_policy *policy) { struct dbs_governor *gov = dbs_governor_of(policy); @@ -425,6 +434,7 @@ int cpufreq_dbs_governor_init(struct cpufreq_policy *policy) goto free_policy_dbs_info; } + dbs_data->gov = gov; gov_attr_set_init(&dbs_data->attr_set, &policy_dbs->list); ret = gov->init(dbs_data); @@ -447,6 +457,7 @@ int cpufreq_dbs_governor_init(struct cpufreq_policy *policy) policy->governor_data = policy_dbs; gov->kobj_type.sysfs_ops = &governor_sysfs_ops; + gov->kobj_type.release = cpufreq_dbs_data_release; ret = kobject_init_and_add(&dbs_data->attr_set.kobj, &gov->kobj_type, get_governor_parent_kobj(policy), "%s", gov->gov.name); @@ -488,13 +499,8 @@ void cpufreq_dbs_governor_exit(struct cpufreq_policy *policy) policy->governor_data = NULL; - if (!count) { - if (!have_governor_per_policy()) - gov->gdbs_data = NULL; - - gov->exit(dbs_data); - kfree(dbs_data); - } + if (!count && !have_governor_per_policy()) + gov->gdbs_data = NULL; free_policy_dbs_info(policy_dbs, gov); diff --git a/drivers/cpufreq/cpufreq_governor.h b/drivers/cpufreq/cpufreq_governor.h index bab8e6140377..a6de26318abb 100644 --- a/drivers/cpufreq/cpufreq_governor.h +++ b/drivers/cpufreq/cpufreq_governor.h @@ -37,6 +37,7 @@ enum {OD_NORMAL_SAMPLE, OD_SUB_SAMPLE}; /* Governor demand based switching data (per-policy or global). */ struct dbs_data { struct gov_attr_set attr_set; + struct dbs_governor *gov; void *tuners; unsigned int ignore_nice_load; unsigned int sampling_rate;