xtp.h 938 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_IA64_XTP_H
  3. #define _ASM_IA64_XTP_H
  4. #include <asm/io.h>
  5. #ifdef CONFIG_SMP
  6. #define XTP_OFFSET 0x1e0008
  7. #define SMP_IRQ_REDIRECTION (1 << 0)
  8. #define SMP_IPI_REDIRECTION (1 << 1)
  9. extern unsigned char smp_int_redirect;
  10. /*
  11. * XTP control functions:
  12. * min_xtp : route all interrupts to this CPU
  13. * normal_xtp: nominal XTP value
  14. * max_xtp : never deliver interrupts to this CPU.
  15. */
  16. static inline void
  17. min_xtp (void)
  18. {
  19. if (smp_int_redirect & SMP_IRQ_REDIRECTION)
  20. writeb(0x00, ipi_base_addr + XTP_OFFSET); /* XTP to min */
  21. }
  22. static inline void
  23. normal_xtp (void)
  24. {
  25. if (smp_int_redirect & SMP_IRQ_REDIRECTION)
  26. writeb(0x08, ipi_base_addr + XTP_OFFSET); /* XTP normal */
  27. }
  28. static inline void
  29. max_xtp (void)
  30. {
  31. if (smp_int_redirect & SMP_IRQ_REDIRECTION)
  32. writeb(0x0f, ipi_base_addr + XTP_OFFSET); /* Set XTP to max */
  33. }
  34. #endif /* CONFIG_SMP */
  35. #endif /* _ASM_IA64_XTP_Hy */