2 * Copyright (c) 2012 NVIDIA CORPORATION. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #ifndef _LINUX_CPUONLINE_H
20 #define _LINUX_CPUONLINE_H
22 #include <linux/sysfs.h>
23 #include <linux/kobject.h>
25 #define CPUQUIET_NAME_LEN 16
27 struct cpuquiet_governor {
28 char name[CPUQUIET_NAME_LEN];
29 struct list_head governor_list;
32 int (*store_active) (unsigned int cpu, bool active);
36 struct cpuquiet_driver {
37 char name[CPUQUIET_NAME_LEN];
38 int (*quiesence_cpu) (unsigned int cpunumber);
39 int (*wake_cpu) (unsigned int cpunumber);
42 extern int cpuquiet_register_governor(struct cpuquiet_governor *gov);
43 extern void cpuquiet_unregister_governor(struct cpuquiet_governor *gov);
44 extern int cpuquiet_quiesence_cpu(unsigned int cpunumber);
45 extern int cpuquiet_wake_cpu(unsigned int cpunumber);
46 extern int cpuquiet_register_driver(struct cpuquiet_driver *drv);
47 extern void cpuquiet_unregister_driver(struct cpuquiet_driver *drv);
48 extern int cpuquiet_add_group(struct attribute_group *attrs);
49 extern void cpuquiet_remove_group(struct attribute_group *attrs);
50 int cpuquiet_kobject_init(struct kobject *kobj, struct kobj_type *type,
52 extern unsigned int nr_cluster_ids;