irq.h 882 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _irq_h
  2. #define _irq_h
  3. #include "cpumask.h"
  4. #include "cpu.h"
  5. struct irq_s {
  6. unsigned int irq;
  7. char *type; /* IRQ type from /proc/interrupts like PCI-MSI-edge */
  8. char *desc; /* IRQ text description - device list */
  9. int refresh; /* Refresh flag. It !=0 if irq was found while populate */
  10. cpumask_t local_cpus;
  11. unsigned long long intr;
  12. unsigned long long old_intr;
  13. cpu_t *cpu;
  14. };
  15. typedef struct irq_s irq_t;
  16. #define SYSFS_PCI_PATH "/sys/bus/pci/devices"
  17. #define PROC_INTERRUPTS "/proc/interrupts"
  18. #define PROC_IRQ "/proc/irq"
  19. /* Compare function for global IRQ list */
  20. int irq_list_compare(const void *first, const void *second);
  21. /* IRQ list functions */
  22. int irq_list_populate(lub_list_t *irqs, lub_list_t *balance_irqs);
  23. int irq_list_free(lub_list_t *irqs);
  24. int irq_list_show(lub_list_t *irqs);
  25. irq_t * irq_list_search(lub_list_t *irqs, unsigned int num);
  26. #endif