intr_remapping.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) 2012 Advanced Micro Devices, Inc.
  3. * Author: Joerg Roedel <joerg.roedel@amd.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License version 2 as published
  7. * by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. *
  18. * This header file contains the interface of the interrupt remapping code to
  19. * the x86 interrupt management code.
  20. */
  21. #ifndef __X86_INTR_REMAPPING_H
  22. #define __X86_INTR_REMAPPING_H
  23. #ifdef CONFIG_IRQ_REMAP
  24. extern int intr_remapping_enabled;
  25. extern void setup_intr_remapping(void);
  26. extern int intr_remapping_supported(void);
  27. extern int intr_hardware_init(void);
  28. extern int intr_hardware_enable(void);
  29. extern void intr_hardware_disable(void);
  30. extern int intr_hardware_reenable(int);
  31. extern int intr_enable_fault_handling(void);
  32. #else /* CONFIG_IRQ_REMAP */
  33. #define intr_remapping_enabled 0
  34. static inline void setup_intr_remapping(void) { }
  35. static inline int intr_remapping_supported(void) { return 0; }
  36. static inline int intr_hardware_init(void) { return -ENODEV; }
  37. static inline int intr_hardware_enable(void) { return -ENODEV; }
  38. static inline void intr_hardware_disable(void) { }
  39. static inline int intr_hardware_reenable(int eim) { return -ENODEV; }
  40. static inline int intr_enable_fault_handling(void) { return -ENODEV; }
  41. #endif /* CONFIG_IRQ_REMAP */
  42. #endif /* __X86_INTR_REMAPPING_H */