xive.h (c002c27874faaa170b535d03d7efee89ecdd9be4) xive.h (eac1e731b59ee3b5f5e641a7765c7ed41ed26226)
1/*
2 * Copyright 2016,2017 IBM Corporation.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */

--- 96 unchanged lines hidden (view full) ---

105#define XIVE_ESB_VAL_P 0x2
106#define XIVE_ESB_VAL_Q 0x1
107
108/* Global enable flags for the XIVE support */
109extern bool __xive_enabled;
110
111static inline bool xive_enabled(void) { return __xive_enabled; }
112
1/*
2 * Copyright 2016,2017 IBM Corporation.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 */

--- 96 unchanged lines hidden (view full) ---

105#define XIVE_ESB_VAL_P 0x2
106#define XIVE_ESB_VAL_Q 0x1
107
108/* Global enable flags for the XIVE support */
109extern bool __xive_enabled;
110
111static inline bool xive_enabled(void) { return __xive_enabled; }
112
113extern bool xive_spapr_init(void);
113extern bool xive_native_init(void);
114extern void xive_smp_probe(void);
115extern int xive_smp_prepare_cpu(unsigned int cpu);
116extern void xive_smp_setup_cpu(void);
117extern void xive_smp_disable_cpu(void);
114extern bool xive_native_init(void);
115extern void xive_smp_probe(void);
116extern int xive_smp_prepare_cpu(unsigned int cpu);
117extern void xive_smp_setup_cpu(void);
118extern void xive_smp_disable_cpu(void);
119extern void xive_teardown_cpu(void);
118extern void xive_kexec_teardown_cpu(int secondary);
119extern void xive_shutdown(void);
120extern void xive_flush_interrupt(void);
121
122/* xmon hook */
123extern void xmon_xive_do_dump(int cpu);
124
125/* APIs used by KVM */

--- 16 unchanged lines hidden (view full) ---

142extern int xive_native_enable_vp(u32 vp_id);
143extern int xive_native_disable_vp(u32 vp_id);
144extern int xive_native_get_vp_info(u32 vp_id, u32 *out_cam_id, u32 *out_chip_id);
145
146#else
147
148static inline bool xive_enabled(void) { return false; }
149
120extern void xive_kexec_teardown_cpu(int secondary);
121extern void xive_shutdown(void);
122extern void xive_flush_interrupt(void);
123
124/* xmon hook */
125extern void xmon_xive_do_dump(int cpu);
126
127/* APIs used by KVM */

--- 16 unchanged lines hidden (view full) ---

144extern int xive_native_enable_vp(u32 vp_id);
145extern int xive_native_disable_vp(u32 vp_id);
146extern int xive_native_get_vp_info(u32 vp_id, u32 *out_cam_id, u32 *out_chip_id);
147
148#else
149
150static inline bool xive_enabled(void) { return false; }
151
152static inline bool xive_spapr_init(void) { return false; }
150static inline bool xive_native_init(void) { return false; }
151static inline void xive_smp_probe(void) { }
152extern inline int xive_smp_prepare_cpu(unsigned int cpu) { return -EINVAL; }
153static inline void xive_smp_setup_cpu(void) { }
154static inline void xive_smp_disable_cpu(void) { }
155static inline void xive_kexec_teardown_cpu(int secondary) { }
156static inline void xive_shutdown(void) { }
157static inline void xive_flush_interrupt(void) { }
158
159static inline u32 xive_native_alloc_vp_block(u32 max_vcpus) { return XIVE_INVALID_VP; }
160static inline void xive_native_free_vp_block(u32 vp_base) { }
161
162#endif
163
164#endif /* _ASM_POWERPC_XIVE_H */
153static inline bool xive_native_init(void) { return false; }
154static inline void xive_smp_probe(void) { }
155extern inline int xive_smp_prepare_cpu(unsigned int cpu) { return -EINVAL; }
156static inline void xive_smp_setup_cpu(void) { }
157static inline void xive_smp_disable_cpu(void) { }
158static inline void xive_kexec_teardown_cpu(int secondary) { }
159static inline void xive_shutdown(void) { }
160static inline void xive_flush_interrupt(void) { }
161
162static inline u32 xive_native_alloc_vp_block(u32 max_vcpus) { return XIVE_INVALID_VP; }
163static inline void xive_native_free_vp_block(u32 vp_base) { }
164
165#endif
166
167#endif /* _ASM_POWERPC_XIVE_H */