sched/walt: Move public declarations of core_ctl.h to walt.h

core_ctl is part of WALT. There is no separate config for
core_ctl. So it makes sense to declare all the WALT related
public interfaces in a single header file.

Change-Id: I0ae5585c0037295eee4268705f0e553d14c60fd9
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Sai Harshini Nimmala <snimmala@codeaurora.org>
This commit is contained in:
Sai Harshini Nimmala 2021-10-26 17:41:04 -07:00 committed by Rishabh Bhatnagar
parent 42840f1cc5
commit d90415f374
6 changed files with 1260 additions and 39 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,36 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2016, 2019-2021, The Linux Foundation. All rights reserved.
*/
#ifndef __CORE_CTL_H
#define __CORE_CTL_H
#include <linux/types.h>
#define MAX_CPUS_PER_CLUSTER 6
#define MAX_CLUSTERS 3
struct core_ctl_notif_data {
unsigned int nr_big;
unsigned int coloc_load_pct;
unsigned int ta_util_pct[MAX_CLUSTERS];
unsigned int cur_cap_pct[MAX_CLUSTERS];
};
struct notifier_block;
#if IS_ENABLED(CONFIG_SCHED_WALT)
extern int core_ctl_set_boost(bool boost);
extern void core_ctl_notifier_register(struct notifier_block *n);
extern void core_ctl_notifier_unregister(struct notifier_block *n);
#else
static inline int core_ctl_set_boost(bool boost)
{
return 0;
}
static inline void core_ctl_notifier_register(struct notifier_block *n) {}
static inline void core_ctl_notifier_unregister(struct notifier_block *n) {}
#endif
#endif

View File

@ -12,6 +12,16 @@
#if IS_ENABLED(CONFIG_SCHED_WALT)
#define MAX_CPUS_PER_CLUSTER 6
#define MAX_CLUSTERS 3
struct core_ctl_notif_data {
unsigned int nr_big;
unsigned int coloc_load_pct;
unsigned int ta_util_pct[MAX_CLUSTERS];
unsigned int cur_cap_pct[MAX_CLUSTERS];
};
#define WALT_NR_CPUS 8
#define RAVG_HIST_SIZE_MAX 5
#define NUM_BUSY_BUCKETS 10
@ -118,6 +128,11 @@ static inline void set_wake_up_idle(bool wake_up_idle)
extern int sched_lpm_disallowed_time(int cpu, u64 *timeout);
extern int set_task_boost(int boost, u64 period);
struct notifier_block;
extern void core_ctl_notifier_register(struct notifier_block *n);
extern void core_ctl_notifier_unregister(struct notifier_block *n);
extern int core_ctl_set_boost(bool boost);
#else
static inline int sched_lpm_disallowed_time(int cpu, u64 *timeout)
{
@ -141,6 +156,20 @@ static inline int sched_set_wake_up_idle(struct task_struct *p, bool wake_up_idl
static inline void set_wake_up_idle(bool wake_up_idle)
{
}
static inline int core_ctl_set_boost(bool boost)
{
return 0;
}
static inline void core_ctl_notifier_register(struct notifier_block *n)
{
}
static inline void core_ctl_notifier_unregister(struct notifier_block *n)
{
}
#endif
#endif /* _LINUX_SCHED_WALT_H */

View File

@ -4,7 +4,6 @@
*/
#include <linux/of.h>
#include <linux/sched/core_ctl.h>
#include "walt.h"
#include "trace.h"

View File

@ -14,7 +14,6 @@
#include <linux/sched/rt.h>
#include <linux/syscore_ops.h>
#include <uapi/linux/sched/types.h>
#include <linux/sched/core_ctl.h>
#include "walt.h"
#include "trace.h"

View File

@ -9,7 +9,6 @@
#include "../../../kernel/sched/sched.h"
#include "../../../fs/proc/internal.h"
#include <linux/sched/walt.h>
#include <linux/sched/core_ctl.h>
#include <linux/jump_label.h>
#include <linux/cgroup.h>