diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-11-14 05:23:05 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-11-14 05:23:05 -0500 |
commit | 41cc30412d6692c25506bf2d4e65c4364c70c10a (patch) | |
tree | d9adeb9c94a54998002d46aeebb99f86f1232016 /include/linux | |
parent | b29c6ef7bb1257853c1e31616d84f55e561cf631 (diff) | |
parent | 29f411399aaa2e53882858e01d21981f3c301e2a (diff) |
Merge tag 'irqchip-4.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent
Pull irqchip updates for 4.15, take #4 from Marc Zyngier
- A core irq fix for legacy cases where the irq trigger is not reported
by firmware
- A couple of GICv3/4 fixes (Kconfig, of-node refcount, error handling)
- Trivial pr_err fixes
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/irq.h | 11 | ||||
-rw-r--r-- | include/linux/irqchip/arm-gic-v4.h | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h index b01d06db9101..e140f69163b6 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -211,6 +211,7 @@ struct irq_data { | |||
211 | * IRQD_MANAGED_SHUTDOWN - Interrupt was shutdown due to empty affinity | 211 | * IRQD_MANAGED_SHUTDOWN - Interrupt was shutdown due to empty affinity |
212 | * mask. Applies only to affinity managed irqs. | 212 | * mask. Applies only to affinity managed irqs. |
213 | * IRQD_SINGLE_TARGET - IRQ allows only a single affinity target | 213 | * IRQD_SINGLE_TARGET - IRQ allows only a single affinity target |
214 | * IRQD_DEFAULT_TRIGGER_SET - Expected trigger already been set | ||
214 | */ | 215 | */ |
215 | enum { | 216 | enum { |
216 | IRQD_TRIGGER_MASK = 0xf, | 217 | IRQD_TRIGGER_MASK = 0xf, |
@@ -231,6 +232,7 @@ enum { | |||
231 | IRQD_IRQ_STARTED = (1 << 22), | 232 | IRQD_IRQ_STARTED = (1 << 22), |
232 | IRQD_MANAGED_SHUTDOWN = (1 << 23), | 233 | IRQD_MANAGED_SHUTDOWN = (1 << 23), |
233 | IRQD_SINGLE_TARGET = (1 << 24), | 234 | IRQD_SINGLE_TARGET = (1 << 24), |
235 | IRQD_DEFAULT_TRIGGER_SET = (1 << 25), | ||
234 | }; | 236 | }; |
235 | 237 | ||
236 | #define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors) | 238 | #define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors) |
@@ -260,18 +262,25 @@ static inline void irqd_mark_affinity_was_set(struct irq_data *d) | |||
260 | __irqd_to_state(d) |= IRQD_AFFINITY_SET; | 262 | __irqd_to_state(d) |= IRQD_AFFINITY_SET; |
261 | } | 263 | } |
262 | 264 | ||
265 | static inline bool irqd_trigger_type_was_set(struct irq_data *d) | ||
266 | { | ||
267 | return __irqd_to_state(d) & IRQD_DEFAULT_TRIGGER_SET; | ||
268 | } | ||
269 | |||
263 | static inline u32 irqd_get_trigger_type(struct irq_data *d) | 270 | static inline u32 irqd_get_trigger_type(struct irq_data *d) |
264 | { | 271 | { |
265 | return __irqd_to_state(d) & IRQD_TRIGGER_MASK; | 272 | return __irqd_to_state(d) & IRQD_TRIGGER_MASK; |
266 | } | 273 | } |
267 | 274 | ||
268 | /* | 275 | /* |
269 | * Must only be called inside irq_chip.irq_set_type() functions. | 276 | * Must only be called inside irq_chip.irq_set_type() functions or |
277 | * from the DT/ACPI setup code. | ||
270 | */ | 278 | */ |
271 | static inline void irqd_set_trigger_type(struct irq_data *d, u32 type) | 279 | static inline void irqd_set_trigger_type(struct irq_data *d, u32 type) |
272 | { | 280 | { |
273 | __irqd_to_state(d) &= ~IRQD_TRIGGER_MASK; | 281 | __irqd_to_state(d) &= ~IRQD_TRIGGER_MASK; |
274 | __irqd_to_state(d) |= type & IRQD_TRIGGER_MASK; | 282 | __irqd_to_state(d) |= type & IRQD_TRIGGER_MASK; |
283 | __irqd_to_state(d) |= IRQD_DEFAULT_TRIGGER_SET; | ||
275 | } | 284 | } |
276 | 285 | ||
277 | static inline bool irqd_is_level_type(struct irq_data *d) | 286 | static inline bool irqd_is_level_type(struct irq_data *d) |
diff --git a/include/linux/irqchip/arm-gic-v4.h b/include/linux/irqchip/arm-gic-v4.h index 447da8ca2156..fa683ea5c769 100644 --- a/include/linux/irqchip/arm-gic-v4.h +++ b/include/linux/irqchip/arm-gic-v4.h | |||
@@ -109,6 +109,7 @@ int its_get_vlpi(int irq, struct its_vlpi_map *map); | |||
109 | int its_unmap_vlpi(int irq); | 109 | int its_unmap_vlpi(int irq); |
110 | int its_prop_update_vlpi(int irq, u8 config, bool inv); | 110 | int its_prop_update_vlpi(int irq, u8 config, bool inv); |
111 | 111 | ||
112 | struct irq_domain_ops; | ||
112 | int its_init_v4(struct irq_domain *domain, const struct irq_domain_ops *ops); | 113 | int its_init_v4(struct irq_domain *domain, const struct irq_domain_ops *ops); |
113 | 114 | ||
114 | #endif | 115 | #endif |