xref: /linux/arch/powerpc/mm/book3s64/internal.h (revision 3203a08c1266689c204fb8f10d6bb5186921fce2)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 #ifndef ARCH_POWERPC_MM_BOOK3S64_INTERNAL_H
3 #define ARCH_POWERPC_MM_BOOK3S64_INTERNAL_H
4 
5 #include <linux/jump_label.h>
6 
7 extern bool stress_slb_enabled;
8 
9 DECLARE_STATIC_KEY_FALSE(stress_slb_key);
10 
stress_slb(void)11 static inline bool stress_slb(void)
12 {
13 	return static_branch_unlikely(&stress_slb_key);
14 }
15 
16 extern bool stress_hpt_enabled;
17 
18 DECLARE_STATIC_KEY_FALSE(stress_hpt_key);
19 
stress_hpt(void)20 static inline bool stress_hpt(void)
21 {
22 	return static_branch_unlikely(&stress_hpt_key);
23 }
24 
25 extern bool no_slb_preload;
26 DECLARE_STATIC_KEY_FALSE(no_slb_preload_key);
slb_preload_disabled(void)27 static inline bool slb_preload_disabled(void)
28 {
29 	return static_branch_unlikely(&no_slb_preload_key);
30 }
31 
32 void hpt_do_stress(unsigned long ea, unsigned long hpte_group);
33 
34 #endif /* ARCH_POWERPC_MM_BOOK3S64_INTERNAL_H */
35