~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/hw_irq.h

Version: ~ [ linux-5.16-rc3 ] ~ [ linux-5.15.5 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.82 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.162 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.218 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.256 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.291 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.293 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _ASM_X86_HW_IRQ_H
  2 #define _ASM_X86_HW_IRQ_H
  3 
  4 /*
  5  * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
  6  *
  7  * moved some of the old arch/i386/kernel/irq.h to here. VY
  8  *
  9  * IRQ/IPI changes taken from work by Thomas Radke
 10  * <tomsoft@informatik.tu-chemnitz.de>
 11  *
 12  * hacked by Andi Kleen for x86-64.
 13  * unified by tglx
 14  */
 15 
 16 #include <asm/irq_vectors.h>
 17 
 18 #ifndef __ASSEMBLY__
 19 
 20 #include <linux/percpu.h>
 21 #include <linux/profile.h>
 22 #include <linux/smp.h>
 23 
 24 #include <linux/atomic.h>
 25 #include <asm/irq.h>
 26 #include <asm/sections.h>
 27 
 28 /* Interrupt handlers registered during init_IRQ */
 29 extern asmlinkage void apic_timer_interrupt(void);
 30 extern asmlinkage void x86_platform_ipi(void);
 31 extern asmlinkage void kvm_posted_intr_ipi(void);
 32 extern asmlinkage void kvm_posted_intr_wakeup_ipi(void);
 33 extern asmlinkage void error_interrupt(void);
 34 extern asmlinkage void irq_work_interrupt(void);
 35 
 36 extern asmlinkage void spurious_interrupt(void);
 37 extern asmlinkage void thermal_interrupt(void);
 38 extern asmlinkage void reschedule_interrupt(void);
 39 
 40 extern asmlinkage void irq_move_cleanup_interrupt(void);
 41 extern asmlinkage void reboot_interrupt(void);
 42 extern asmlinkage void threshold_interrupt(void);
 43 extern asmlinkage void deferred_error_interrupt(void);
 44 
 45 extern asmlinkage void call_function_interrupt(void);
 46 extern asmlinkage void call_function_single_interrupt(void);
 47 
 48 #ifdef CONFIG_TRACING
 49 /* Interrupt handlers registered during init_IRQ */
 50 extern void trace_apic_timer_interrupt(void);
 51 extern void trace_x86_platform_ipi(void);
 52 extern void trace_error_interrupt(void);
 53 extern void trace_irq_work_interrupt(void);
 54 extern void trace_spurious_interrupt(void);
 55 extern void trace_thermal_interrupt(void);
 56 extern void trace_reschedule_interrupt(void);
 57 extern void trace_threshold_interrupt(void);
 58 extern void trace_deferred_error_interrupt(void);
 59 extern void trace_call_function_interrupt(void);
 60 extern void trace_call_function_single_interrupt(void);
 61 #define trace_irq_move_cleanup_interrupt  irq_move_cleanup_interrupt
 62 #define trace_reboot_interrupt  reboot_interrupt
 63 #define trace_kvm_posted_intr_ipi kvm_posted_intr_ipi
 64 #define trace_kvm_posted_intr_wakeup_ipi kvm_posted_intr_wakeup_ipi
 65 #endif /* CONFIG_TRACING */
 66 
 67 #ifdef  CONFIG_X86_LOCAL_APIC
 68 struct irq_data;
 69 struct pci_dev;
 70 struct msi_desc;
 71 
 72 enum irq_alloc_type {
 73         X86_IRQ_ALLOC_TYPE_IOAPIC = 1,
 74         X86_IRQ_ALLOC_TYPE_HPET,
 75         X86_IRQ_ALLOC_TYPE_MSI,
 76         X86_IRQ_ALLOC_TYPE_MSIX,
 77         X86_IRQ_ALLOC_TYPE_DMAR,
 78         X86_IRQ_ALLOC_TYPE_UV,
 79 };
 80 
 81 struct irq_alloc_info {
 82         enum irq_alloc_type     type;
 83         u32                     flags;
 84         const struct cpumask    *mask;  /* CPU mask for vector allocation */
 85         union {
 86                 int             unused;
 87 #ifdef  CONFIG_HPET_TIMER
 88                 struct {
 89                         int             hpet_id;
 90                         int             hpet_index;
 91                         void            *hpet_data;
 92                 };
 93 #endif
 94 #ifdef  CONFIG_PCI_MSI
 95                 struct {
 96                         struct pci_dev  *msi_dev;
 97                         irq_hw_number_t msi_hwirq;
 98                 };
 99 #endif
100 #ifdef  CONFIG_X86_IO_APIC
101                 struct {
102                         int             ioapic_id;
103                         int             ioapic_pin;
104                         int             ioapic_node;
105                         u32             ioapic_trigger : 1;
106                         u32             ioapic_polarity : 1;
107                         u32             ioapic_valid : 1;
108                         struct IO_APIC_route_entry *ioapic_entry;
109                 };
110 #endif
111 #ifdef  CONFIG_DMAR_TABLE
112                 struct {
113                         int             dmar_id;
114                         void            *dmar_data;
115                 };
116 #endif
117 #ifdef  CONFIG_HT_IRQ
118                 struct {
119                         int             ht_pos;
120                         int             ht_idx;
121                         struct pci_dev  *ht_dev;
122                         void            *ht_update;
123                 };
124 #endif
125 #ifdef  CONFIG_X86_UV
126                 struct {
127                         int             uv_limit;
128                         int             uv_blade;
129                         unsigned long   uv_offset;
130                         char            *uv_name;
131                 };
132 #endif
133 #if IS_ENABLED(CONFIG_VMD)
134                 struct {
135                         struct msi_desc *desc;
136                 };
137 #endif
138         };
139 };
140 
141 struct irq_cfg {
142         unsigned int            dest_apicid;
143         u8                      vector;
144         u8                      old_vector;
145 };
146 
147 extern struct irq_cfg *irq_cfg(unsigned int irq);
148 extern struct irq_cfg *irqd_cfg(struct irq_data *irq_data);
149 extern void lock_vector_lock(void);
150 extern void unlock_vector_lock(void);
151 extern void setup_vector_irq(int cpu);
152 #ifdef CONFIG_SMP
153 extern void send_cleanup_vector(struct irq_cfg *);
154 extern void irq_complete_move(struct irq_cfg *cfg);
155 #else
156 static inline void send_cleanup_vector(struct irq_cfg *c) { }
157 static inline void irq_complete_move(struct irq_cfg *c) { }
158 #endif
159 
160 extern void apic_ack_edge(struct irq_data *data);
161 #else   /*  CONFIG_X86_LOCAL_APIC */
162 static inline void lock_vector_lock(void) {}
163 static inline void unlock_vector_lock(void) {}
164 #endif  /* CONFIG_X86_LOCAL_APIC */
165 
166 /* Statistics */
167 extern atomic_t irq_err_count;
168 extern atomic_t irq_mis_count;
169 
170 extern void elcr_set_level_irq(unsigned int irq);
171 
172 /* SMP */
173 extern __visible void smp_apic_timer_interrupt(struct pt_regs *);
174 extern __visible void smp_spurious_interrupt(struct pt_regs *);
175 extern __visible void smp_x86_platform_ipi(struct pt_regs *);
176 extern __visible void smp_error_interrupt(struct pt_regs *);
177 #ifdef CONFIG_X86_IO_APIC
178 extern asmlinkage void smp_irq_move_cleanup_interrupt(void);
179 #endif
180 #ifdef CONFIG_SMP
181 extern __visible void smp_reschedule_interrupt(struct pt_regs *);
182 extern __visible void smp_call_function_interrupt(struct pt_regs *);
183 extern __visible void smp_call_function_single_interrupt(struct pt_regs *);
184 #endif
185 
186 extern char irq_entries_start[];
187 #ifdef CONFIG_TRACING
188 #define trace_irq_entries_start irq_entries_start
189 #endif
190 
191 #define VECTOR_UNUSED           NULL
192 #define VECTOR_RETRIGGERED      ((void *)~0UL)
193 
194 typedef struct irq_desc* vector_irq_t[NR_VECTORS];
195 DECLARE_PER_CPU(vector_irq_t, vector_irq);
196 
197 #endif /* !ASSEMBLY_ */
198 
199 #endif /* _ASM_X86_HW_IRQ_H */
200 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp