WIP FPC-III support
[linux/fpc-iii.git] / arch / ia64 / include / asm / xtp.h
blob5bf1d70ad860a09198da09de2d29689f124dc1c4
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_IA64_XTP_H
3 #define _ASM_IA64_XTP_H
5 #include <asm/io.h>
7 #ifdef CONFIG_SMP
9 #define XTP_OFFSET 0x1e0008
11 #define SMP_IRQ_REDIRECTION (1 << 0)
12 #define SMP_IPI_REDIRECTION (1 << 1)
14 extern unsigned char smp_int_redirect;
17 * XTP control functions:
18 * min_xtp : route all interrupts to this CPU
19 * normal_xtp: nominal XTP value
20 * max_xtp : never deliver interrupts to this CPU.
23 static inline void
24 min_xtp (void)
26 if (smp_int_redirect & SMP_IRQ_REDIRECTION)
27 writeb(0x00, ipi_base_addr + XTP_OFFSET); /* XTP to min */
30 static inline void
31 normal_xtp (void)
33 if (smp_int_redirect & SMP_IRQ_REDIRECTION)
34 writeb(0x08, ipi_base_addr + XTP_OFFSET); /* XTP normal */
37 static inline void
38 max_xtp (void)
40 if (smp_int_redirect & SMP_IRQ_REDIRECTION)
41 writeb(0x0f, ipi_base_addr + XTP_OFFSET); /* Set XTP to max */
44 #endif /* CONFIG_SMP */
46 #endif /* _ASM_IA64_XTP_Hy */