1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 /* 3 * Copyright (C) 1999 Cort Dougan <cort@cs.nmt 4 */ 5 #ifndef _ASM_POWERPC_RUNLATCH_H 6 #define _ASM_POWERPC_RUNLATCH_H 7 8 #ifdef CONFIG_PPC64 9 10 extern void __ppc64_runlatch_on(void); 11 extern void __ppc64_runlatch_off(void); 12 13 /* 14 * We manually hard enable-disable, this is ca 15 * in the idle loop and we don't want to mess 16 * with soft-disable/enable & interrupt replay 17 */ 18 #define ppc64_runlatch_off() 19 do { 20 if (cpu_has_feature(CPU_FTR_CT 21 test_thread_local_flags(_T 22 __hard_irq_disable(); 23 __ppc64_runlatch_off() 24 if (!(local_paca->irq_ 25 __hard_irq_ena 26 } 27 } while (0) 28 29 #define ppc64_runlatch_on() 30 do { 31 if (cpu_has_feature(CPU_FTR_CT 32 !test_thread_local_flags(_ 33 __hard_irq_disable(); 34 __ppc64_runlatch_on(); 35 if (!(local_paca->irq_ 36 __hard_irq_ena 37 } 38 } while (0) 39 #else 40 #define ppc64_runlatch_on() 41 #define ppc64_runlatch_off() 42 #endif /* CONFIG_PPC64 */ 43 44 #endif /* _ASM_POWERPC_RUNLATCH_H */ 45
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.