diff options
Diffstat (limited to 'kernel/irq/internals.h')
| -rw-r--r-- | kernel/irq/internals.h | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h index f444203a772d..4571ae7e085a 100644 --- a/kernel/irq/internals.h +++ b/kernel/irq/internals.h | |||
| @@ -18,17 +18,11 @@ extern int __irq_set_trigger(struct irq_desc *desc, unsigned int irq, | |||
| 18 | extern void __disable_irq(struct irq_desc *desc, unsigned int irq, bool susp); | 18 | extern void __disable_irq(struct irq_desc *desc, unsigned int irq, bool susp); |
| 19 | extern void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume); | 19 | extern void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume); |
| 20 | 20 | ||
| 21 | extern struct lock_class_key irq_desc_lock_class; | ||
| 22 | extern void init_kstat_irqs(struct irq_desc *desc, int node, int nr); | 21 | extern void init_kstat_irqs(struct irq_desc *desc, int node, int nr); |
| 23 | extern raw_spinlock_t sparse_irq_lock; | ||
| 24 | 22 | ||
| 25 | /* Resending of interrupts :*/ | 23 | /* Resending of interrupts :*/ |
| 26 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); | 24 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); |
| 27 | 25 | ||
| 28 | #ifdef CONFIG_SPARSE_IRQ | ||
| 29 | void replace_irq_desc(unsigned int irq, struct irq_desc *desc); | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #ifdef CONFIG_PROC_FS | 26 | #ifdef CONFIG_PROC_FS |
| 33 | extern void register_irq_proc(unsigned int irq, struct irq_desc *desc); | 27 | extern void register_irq_proc(unsigned int irq, struct irq_desc *desc); |
| 34 | extern void unregister_irq_proc(unsigned int irq, struct irq_desc *desc); | 28 | extern void unregister_irq_proc(unsigned int irq, struct irq_desc *desc); |
| @@ -110,99 +104,3 @@ static inline void print_irq_desc(unsigned int irq, struct irq_desc *desc) | |||
| 110 | 104 | ||
| 111 | #undef P | 105 | #undef P |
| 112 | 106 | ||
| 113 | /* Stuff below will be cleaned up after the sparse allocator is done */ | ||
| 114 | |||
| 115 | #ifdef CONFIG_SMP | ||
| 116 | /** | ||
| 117 | * alloc_desc_masks - allocate cpumasks for irq_desc | ||
| 118 | * @desc: pointer to irq_desc struct | ||
| 119 | * @node: node which will be handling the cpumasks | ||
| 120 | * @boot: true if need bootmem | ||
| 121 | * | ||
| 122 | * Allocates affinity and pending_mask cpumask if required. | ||
| 123 | * Returns true if successful (or not required). | ||
| 124 | */ | ||
| 125 | static inline bool alloc_desc_masks(struct irq_desc *desc, int node, | ||
| 126 | bool boot) | ||
| 127 | { | ||
| 128 | gfp_t gfp = GFP_ATOMIC; | ||
| 129 | |||
| 130 | if (boot) | ||
| 131 | gfp = GFP_NOWAIT; | ||
| 132 | |||
| 133 | #ifdef CONFIG_CPUMASK_OFFSTACK | ||
| 134 | if (!alloc_cpumask_var_node(&desc->irq_data.affinity, gfp, node)) | ||
| 135 | return false; | ||
| 136 | |||
| 137 | #ifdef CONFIG_GENERIC_PENDING_IRQ | ||
| 138 | if (!alloc_cpumask_var_node(&desc->pending_mask, gfp, node)) { | ||
| 139 | free_cpumask_var(desc->irq_data.affinity); | ||
| 140 | return false; | ||
| 141 | } | ||
| 142 | #endif | ||
| 143 | #endif | ||
| 144 | return true; | ||
| 145 | } | ||
| 146 | |||
| 147 | static inline void init_desc_masks(struct irq_desc *desc) | ||
| 148 | { | ||
| 149 | cpumask_setall(desc->irq_data.affinity); | ||
| 150 | #ifdef CONFIG_GENERIC_PENDING_IRQ | ||
| 151 | cpumask_clear(desc->pending_mask); | ||
| 152 | #endif | ||
| 153 | } | ||
| 154 | |||
| 155 | /** | ||
| 156 | * init_copy_desc_masks - copy cpumasks for irq_desc | ||
| 157 | * @old_desc: pointer to old irq_desc struct | ||
| 158 | * @new_desc: pointer to new irq_desc struct | ||
| 159 | * | ||
| 160 | * Insures affinity and pending_masks are copied to new irq_desc. | ||
| 161 | * If !CONFIG_CPUMASKS_OFFSTACK the cpumasks are embedded in the | ||
| 162 | * irq_desc struct so the copy is redundant. | ||
| 163 | */ | ||
| 164 | |||
| 165 | static inline void init_copy_desc_masks(struct irq_desc *old_desc, | ||
| 166 | struct irq_desc *new_desc) | ||
| 167 | { | ||
| 168 | #ifdef CONFIG_CPUMASK_OFFSTACK | ||
| 169 | cpumask_copy(new_desc->irq_data.affinity, old_desc->irq_data.affinity); | ||
| 170 | |||
| 171 | #ifdef CONFIG_GENERIC_PENDING_IRQ | ||
| 172 | cpumask_copy(new_desc->pending_mask, old_desc->pending_mask); | ||
| 173 | #endif | ||
| 174 | #endif | ||
| 175 | } | ||
| 176 | |||
| 177 | static inline void free_desc_masks(struct irq_desc *old_desc, | ||
| 178 | struct irq_desc *new_desc) | ||
| 179 | { | ||
| 180 | free_cpumask_var(old_desc->irq_data.affinity); | ||
| 181 | |||
| 182 | #ifdef CONFIG_GENERIC_PENDING_IRQ | ||
| 183 | free_cpumask_var(old_desc->pending_mask); | ||
| 184 | #endif | ||
| 185 | } | ||
| 186 | |||
| 187 | #else /* !CONFIG_SMP */ | ||
| 188 | |||
| 189 | static inline bool alloc_desc_masks(struct irq_desc *desc, int node, | ||
| 190 | bool boot) | ||
| 191 | { | ||
| 192 | return true; | ||
| 193 | } | ||
| 194 | |||
| 195 | static inline void init_desc_masks(struct irq_desc *desc) | ||
| 196 | { | ||
| 197 | } | ||
| 198 | |||
| 199 | static inline void init_copy_desc_masks(struct irq_desc *old_desc, | ||
| 200 | struct irq_desc *new_desc) | ||
| 201 | { | ||
| 202 | } | ||
| 203 | |||
| 204 | static inline void free_desc_masks(struct irq_desc *old_desc, | ||
| 205 | struct irq_desc *new_desc) | ||
| 206 | { | ||
| 207 | } | ||
| 208 | #endif /* CONFIG_SMP */ | ||
