WIP FPC-III support
[linux/fpc-iii.git] / arch / powerpc / include / asm / hmi.h
blob155748460c5d9d0d0f62e8db23d6be9f35f65b39
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Hypervisor Maintenance Interrupt header file.
5 * Copyright 2015 IBM Corporation
6 * Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
7 */
9 #ifndef __ASM_PPC64_HMI_H__
10 #define __ASM_PPC64_HMI_H__
12 #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
14 #define CORE_TB_RESYNC_REQ_BIT 63
15 #define MAX_SUBCORE_PER_CORE 4
18 * sibling_subcore_state structure is used to co-ordinate all threads
19 * during HMI to avoid TB corruption. This structure is allocated once
20 * per each core and shared by all threads on that core.
22 struct sibling_subcore_state {
23 unsigned long flags;
24 u8 in_guest[MAX_SUBCORE_PER_CORE];
27 extern void wait_for_subcore_guest_exit(void);
28 extern void wait_for_tb_resync(void);
29 #else
30 static inline void wait_for_subcore_guest_exit(void) { }
31 static inline void wait_for_tb_resync(void) { }
32 #endif
34 struct pt_regs;
35 extern long hmi_handle_debugtrig(struct pt_regs *regs);
37 #endif /* __ASM_PPC64_HMI_H__ */