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

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

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _ASM_X86_HW_IRQ_H
  3 #define _ASM_X86_HW_IRQ_H
  4 
  5 /*
  6  * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
  7  *
  8  * moved some of the old arch/i386/kernel/irq.h to here. VY
  9  *
 10  * IRQ/IPI changes taken from work by Thomas Radke
 11  * <tomsoft@informatik.tu-chemnitz.de>
 12  *
 13  * hacked by Andi Kleen for x86-64.
 14  * unified by tglx
 15  */
 16 
 17 #include <asm/irq_vectors.h>
 18 
 19 #ifndef __ASSEMBLY__
 20 
 21 #include <linux/percpu.h>
 22 #include <linux/profile.h>
 23 #include <linux/smp.h>
 24 
 25 #include <linux/atomic.h>
 26 #include <asm/irq.h>
 27 #include <asm/sections.h>
 28 
 29 #ifdef  CONFIG_IRQ_DOMAIN_HIERARCHY
 30 struct irq_data;
 31 struct pci_dev;
 32 struct msi_desc;
 33 
 34 enum irq_alloc_type {
 35         X86_IRQ_ALLOC_TYPE_IOAPIC = 1,
 36         X86_IRQ_ALLOC_TYPE_HPET,
 37         X86_IRQ_ALLOC_TYPE_PCI_MSI,
 38         X86_IRQ_ALLOC_TYPE_PCI_MSIX,
 39         X86_IRQ_ALLOC_TYPE_DMAR,
 40         X86_IRQ_ALLOC_TYPE_AMDVI,
 41         X86_IRQ_ALLOC_TYPE_UV,
 42 };
 43 
 44 struct ioapic_alloc_info {
 45         int             pin;
 46         int             node;
 47         u32             is_level        : 1;
 48         u32             active_low      : 1;
 49         u32             valid           : 1;
 50 };
 51 
 52 struct uv_alloc_info {
 53         int             limit;
 54         int             blade;
 55         unsigned long   offset;
 56         char            *name;
 57 
 58 };
 59 
 60 /**
 61  * irq_alloc_info - X86 specific interrupt allocation info
 62  * @type:       X86 specific allocation type
 63  * @flags:      Flags for allocation tweaks
 64  * @devid:      Device ID for allocations
 65  * @hwirq:      Associated hw interrupt number in the domain
 66  * @mask:       CPU mask for vector allocation
 67  * @desc:       Pointer to msi descriptor
 68  * @data:       Allocation specific data
 69  *
 70  * @ioapic:     IOAPIC specific allocation data
 71  * @uv:         UV specific allocation data
 72 */
 73 struct irq_alloc_info {
 74         enum irq_alloc_type     type;
 75         u32                     flags;
 76         u32                     devid;
 77         irq_hw_number_t         hwirq;
 78         const struct cpumask    *mask;
 79         struct msi_desc         *desc;
 80         void                    *data;
 81 
 82         union {
 83                 struct ioapic_alloc_info        ioapic;
 84                 struct uv_alloc_info            uv;
 85         };
 86 };
 87 
 88 struct irq_cfg {
 89         unsigned int            dest_apicid;
 90         unsigned int            vector;
 91 };
 92 
 93 extern struct irq_cfg *irq_cfg(unsigned int irq);
 94 extern struct irq_cfg *irqd_cfg(struct irq_data *irq_data);
 95 extern void lock_vector_lock(void);
 96 extern void unlock_vector_lock(void);
 97 #ifdef CONFIG_SMP
 98 extern void vector_schedule_cleanup(struct irq_cfg *);
 99 extern void irq_complete_move(struct irq_cfg *cfg);
100 #else
101 static inline void vector_schedule_cleanup(struct irq_cfg *c) { }
102 static inline void irq_complete_move(struct irq_cfg *c) { }
103 #endif
104 
105 extern void apic_ack_edge(struct irq_data *data);
106 #else   /*  CONFIG_IRQ_DOMAIN_HIERARCHY */
107 static inline void lock_vector_lock(void) {}
108 static inline void unlock_vector_lock(void) {}
109 #endif  /* CONFIG_IRQ_DOMAIN_HIERARCHY */
110 
111 /* Statistics */
112 extern atomic_t irq_err_count;
113 extern atomic_t irq_mis_count;
114 
115 extern void elcr_set_level_irq(unsigned int irq);
116 
117 extern char irq_entries_start[];
118 #ifdef CONFIG_TRACING
119 #define trace_irq_entries_start irq_entries_start
120 #endif
121 
122 extern char spurious_entries_start[];
123 
124 #define VECTOR_UNUSED           NULL
125 #define VECTOR_SHUTDOWN         ((void *)-1L)
126 #define VECTOR_RETRIGGERED      ((void *)-2L)
127 
128 typedef struct irq_desc* vector_irq_t[NR_VECTORS];
129 DECLARE_PER_CPU(vector_irq_t, vector_irq);
130 
131 #endif /* !ASSEMBLY_ */
132 
133 #endif /* _ASM_X86_HW_IRQ_H */
134 

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php