quota: Add lock annotations to struct members
[sfrench/cifs-2.6.git] / include / linux / psci.h
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License version 2 as
4  * published by the Free Software Foundation.
5  *
6  * This program is distributed in the hope that it will be useful,
7  * but WITHOUT ANY WARRANTY; without even the implied warranty of
8  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9  * GNU General Public License for more details.
10  *
11  * Copyright (C) 2015 ARM Limited
12  */
13
14 #ifndef __LINUX_PSCI_H
15 #define __LINUX_PSCI_H
16
17 #include <linux/init.h>
18 #include <linux/types.h>
19
20 #define PSCI_POWER_STATE_TYPE_STANDBY           0
21 #define PSCI_POWER_STATE_TYPE_POWER_DOWN        1
22
23 bool psci_tos_resident_on(int cpu);
24
25 int psci_cpu_init_idle(unsigned int cpu);
26 int psci_cpu_suspend_enter(unsigned long index);
27
28 struct psci_operations {
29         int (*cpu_suspend)(u32 state, unsigned long entry_point);
30         int (*cpu_off)(u32 state);
31         int (*cpu_on)(unsigned long cpuid, unsigned long entry_point);
32         int (*migrate)(unsigned long cpuid);
33         int (*affinity_info)(unsigned long target_affinity,
34                         unsigned long lowest_affinity_level);
35         int (*migrate_info_type)(void);
36 };
37
38 extern struct psci_operations psci_ops;
39
40 #if defined(CONFIG_ARM_PSCI_FW)
41 int __init psci_dt_init(void);
42 #else
43 static inline int psci_dt_init(void) { return 0; }
44 #endif
45
46 #if defined(CONFIG_ARM_PSCI_FW) && defined(CONFIG_ACPI)
47 int __init psci_acpi_init(void);
48 bool __init acpi_psci_present(void);
49 bool __init acpi_psci_use_hvc(void);
50 #else
51 static inline int psci_acpi_init(void) { return 0; }
52 static inline bool acpi_psci_present(void) { return false; }
53 #endif
54
55 #endif /* __LINUX_PSCI_H */