ARM: Fix build after memfd_create syscall
[GitHub/LineageOS/android_kernel_samsung_universal7580.git] / drivers / cpufreq / cpu_load_metric.h
1 /*
2 * ARM Intelligent Power Allocation
3 *
4 * Copyright (C) 2013 ARM Limited.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 */
17
18 #ifndef _DRIVERS_CPU_LOAD_METRIC_H
19 #define _DRIVERS_CPU_LOAD_METRIC_H
20
21 #include <linux/cpufreq.h>
22 #include <linux/cpumask.h>
23
24 struct cluster_stats
25 {
26 int util;
27 int utils[NR_CPUS];
28 int freq;
29 cpumask_var_t mask;
30 };
31
32 void update_cpu_metric(int cpu, u64 now, u64 delta_idle, u64 delta_time, struct cpufreq_policy *policy);
33
34 void cpu_load_metric_get(int *load, int *freq);
35 void get_cluster_stats(struct cluster_stats *clstats);
36
37 #endif /* _DRIVERS_CPU_LOAD_METRIC_H */