diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2019-02-23 04:53:31 -0500 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2019-02-23 04:53:31 -0500 |
| commit | a324ca9cad4736252c33c1e28cffe1d87f262d03 (patch) | |
| tree | da64e14dd8432602634773b52073928c50dfb85c /include/linux | |
| parent | 4e6b26d23dc1faee318796d5c7f91b5692b1e6be (diff) | |
| parent | 28528fca4908142bd1a3247956cba56c9c667d71 (diff) | |
Merge tag 'irqchip-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core
Pull irqchip updates from Marc Zyngier
- Core pseudo-NMI handling code
- Allow the default irq domain to be retrieved
- A new interrupt controller for the Loongson LS1X platform
- Affinity support for the SiFive PLIC
- Better support for the iMX irqsteer driver
- NUMA aware memory allocations for GICv3
- A handful of other fixes (i8259, GICv3, PLIC)
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/interrupt.h | 18 | ||||
| -rw-r--r-- | include/linux/irq.h | 10 | ||||
| -rw-r--r-- | include/linux/irqdesc.h | 5 | ||||
| -rw-r--r-- | include/linux/irqdomain.h | 1 |
4 files changed, 34 insertions, 0 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index dcdddf4fa76b..690b238a44d5 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -156,6 +156,10 @@ __request_percpu_irq(unsigned int irq, irq_handler_t handler, | |||
| 156 | unsigned long flags, const char *devname, | 156 | unsigned long flags, const char *devname, |
| 157 | void __percpu *percpu_dev_id); | 157 | void __percpu *percpu_dev_id); |
| 158 | 158 | ||
| 159 | extern int __must_check | ||
| 160 | request_nmi(unsigned int irq, irq_handler_t handler, unsigned long flags, | ||
| 161 | const char *name, void *dev); | ||
| 162 | |||
| 159 | static inline int __must_check | 163 | static inline int __must_check |
| 160 | request_percpu_irq(unsigned int irq, irq_handler_t handler, | 164 | request_percpu_irq(unsigned int irq, irq_handler_t handler, |
| 161 | const char *devname, void __percpu *percpu_dev_id) | 165 | const char *devname, void __percpu *percpu_dev_id) |
| @@ -164,9 +168,16 @@ request_percpu_irq(unsigned int irq, irq_handler_t handler, | |||
| 164 | devname, percpu_dev_id); | 168 | devname, percpu_dev_id); |
| 165 | } | 169 | } |
| 166 | 170 | ||
| 171 | extern int __must_check | ||
| 172 | request_percpu_nmi(unsigned int irq, irq_handler_t handler, | ||
| 173 | const char *devname, void __percpu *dev); | ||
| 174 | |||
| 167 | extern const void *free_irq(unsigned int, void *); | 175 | extern const void *free_irq(unsigned int, void *); |
| 168 | extern void free_percpu_irq(unsigned int, void __percpu *); | 176 | extern void free_percpu_irq(unsigned int, void __percpu *); |
| 169 | 177 | ||
| 178 | extern const void *free_nmi(unsigned int irq, void *dev_id); | ||
| 179 | extern void free_percpu_nmi(unsigned int irq, void __percpu *percpu_dev_id); | ||
| 180 | |||
| 170 | struct device; | 181 | struct device; |
| 171 | 182 | ||
| 172 | extern int __must_check | 183 | extern int __must_check |
| @@ -217,6 +228,13 @@ extern void enable_percpu_irq(unsigned int irq, unsigned int type); | |||
| 217 | extern bool irq_percpu_is_enabled(unsigned int irq); | 228 | extern bool irq_percpu_is_enabled(unsigned int irq); |
| 218 | extern void irq_wake_thread(unsigned int irq, void *dev_id); | 229 | extern void irq_wake_thread(unsigned int irq, void *dev_id); |
| 219 | 230 | ||
| 231 | extern void disable_nmi_nosync(unsigned int irq); | ||
| 232 | extern void disable_percpu_nmi(unsigned int irq); | ||
| 233 | extern void enable_nmi(unsigned int irq); | ||
| 234 | extern void enable_percpu_nmi(unsigned int irq, unsigned int type); | ||
| 235 | extern int prepare_percpu_nmi(unsigned int irq); | ||
| 236 | extern void teardown_percpu_nmi(unsigned int irq); | ||
| 237 | |||
| 220 | /* The following three functions are for the core kernel use only. */ | 238 | /* The following three functions are for the core kernel use only. */ |
| 221 | extern void suspend_device_irqs(void); | 239 | extern void suspend_device_irqs(void); |
| 222 | extern void resume_device_irqs(void); | 240 | extern void resume_device_irqs(void); |
diff --git a/include/linux/irq.h b/include/linux/irq.h index def2b2aac8b1..5e91f6bcaacd 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
| @@ -442,6 +442,8 @@ static inline irq_hw_number_t irqd_to_hwirq(struct irq_data *d) | |||
| 442 | * @irq_set_vcpu_affinity: optional to target a vCPU in a virtual machine | 442 | * @irq_set_vcpu_affinity: optional to target a vCPU in a virtual machine |
| 443 | * @ipi_send_single: send a single IPI to destination cpus | 443 | * @ipi_send_single: send a single IPI to destination cpus |
| 444 | * @ipi_send_mask: send an IPI to destination cpus in cpumask | 444 | * @ipi_send_mask: send an IPI to destination cpus in cpumask |
| 445 | * @irq_nmi_setup: function called from core code before enabling an NMI | ||
| 446 | * @irq_nmi_teardown: function called from core code after disabling an NMI | ||
| 445 | * @flags: chip specific flags | 447 | * @flags: chip specific flags |
| 446 | */ | 448 | */ |
| 447 | struct irq_chip { | 449 | struct irq_chip { |
| @@ -490,6 +492,9 @@ struct irq_chip { | |||
| 490 | void (*ipi_send_single)(struct irq_data *data, unsigned int cpu); | 492 | void (*ipi_send_single)(struct irq_data *data, unsigned int cpu); |
| 491 | void (*ipi_send_mask)(struct irq_data *data, const struct cpumask *dest); | 493 | void (*ipi_send_mask)(struct irq_data *data, const struct cpumask *dest); |
| 492 | 494 | ||
| 495 | int (*irq_nmi_setup)(struct irq_data *data); | ||
| 496 | void (*irq_nmi_teardown)(struct irq_data *data); | ||
| 497 | |||
| 493 | unsigned long flags; | 498 | unsigned long flags; |
| 494 | }; | 499 | }; |
| 495 | 500 | ||
| @@ -505,6 +510,7 @@ struct irq_chip { | |||
| 505 | * IRQCHIP_ONESHOT_SAFE: One shot does not require mask/unmask | 510 | * IRQCHIP_ONESHOT_SAFE: One shot does not require mask/unmask |
| 506 | * IRQCHIP_EOI_THREADED: Chip requires eoi() on unmask in threaded mode | 511 | * IRQCHIP_EOI_THREADED: Chip requires eoi() on unmask in threaded mode |
| 507 | * IRQCHIP_SUPPORTS_LEVEL_MSI Chip can provide two doorbells for Level MSIs | 512 | * IRQCHIP_SUPPORTS_LEVEL_MSI Chip can provide two doorbells for Level MSIs |
| 513 | * IRQCHIP_SUPPORTS_NMI: Chip can deliver NMIs, only for root irqchips | ||
| 508 | */ | 514 | */ |
| 509 | enum { | 515 | enum { |
| 510 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), | 516 | IRQCHIP_SET_TYPE_MASKED = (1 << 0), |
| @@ -515,6 +521,7 @@ enum { | |||
| 515 | IRQCHIP_ONESHOT_SAFE = (1 << 5), | 521 | IRQCHIP_ONESHOT_SAFE = (1 << 5), |
| 516 | IRQCHIP_EOI_THREADED = (1 << 6), | 522 | IRQCHIP_EOI_THREADED = (1 << 6), |
| 517 | IRQCHIP_SUPPORTS_LEVEL_MSI = (1 << 7), | 523 | IRQCHIP_SUPPORTS_LEVEL_MSI = (1 << 7), |
| 524 | IRQCHIP_SUPPORTS_NMI = (1 << 8), | ||
| 518 | }; | 525 | }; |
| 519 | 526 | ||
| 520 | #include <linux/irqdesc.h> | 527 | #include <linux/irqdesc.h> |
| @@ -594,6 +601,9 @@ extern void handle_percpu_devid_irq(struct irq_desc *desc); | |||
| 594 | extern void handle_bad_irq(struct irq_desc *desc); | 601 | extern void handle_bad_irq(struct irq_desc *desc); |
| 595 | extern void handle_nested_irq(unsigned int irq); | 602 | extern void handle_nested_irq(unsigned int irq); |
| 596 | 603 | ||
| 604 | extern void handle_fasteoi_nmi(struct irq_desc *desc); | ||
| 605 | extern void handle_percpu_devid_fasteoi_nmi(struct irq_desc *desc); | ||
| 606 | |||
| 597 | extern int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg); | 607 | extern int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg *msg); |
| 598 | extern int irq_chip_pm_get(struct irq_data *data); | 608 | extern int irq_chip_pm_get(struct irq_data *data); |
| 599 | extern int irq_chip_pm_put(struct irq_data *data); | 609 | extern int irq_chip_pm_put(struct irq_data *data); |
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h index 1d679feff3f6..d6e2ab538ef2 100644 --- a/include/linux/irqdesc.h +++ b/include/linux/irqdesc.h | |||
| @@ -173,6 +173,11 @@ static inline int handle_domain_irq(struct irq_domain *domain, | |||
| 173 | { | 173 | { |
| 174 | return __handle_domain_irq(domain, hwirq, true, regs); | 174 | return __handle_domain_irq(domain, hwirq, true, regs); |
| 175 | } | 175 | } |
| 176 | |||
| 177 | #ifdef CONFIG_IRQ_DOMAIN | ||
| 178 | int handle_domain_nmi(struct irq_domain *domain, unsigned int hwirq, | ||
| 179 | struct pt_regs *regs); | ||
| 180 | #endif | ||
| 176 | #endif | 181 | #endif |
| 177 | 182 | ||
| 178 | /* Test to see if a driver has successfully requested an irq */ | 183 | /* Test to see if a driver has successfully requested an irq */ |
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 35965f41d7be..d2130dc7c0e6 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h | |||
| @@ -265,6 +265,7 @@ extern struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec, | |||
| 265 | enum irq_domain_bus_token bus_token); | 265 | enum irq_domain_bus_token bus_token); |
| 266 | extern bool irq_domain_check_msi_remap(void); | 266 | extern bool irq_domain_check_msi_remap(void); |
| 267 | extern void irq_set_default_host(struct irq_domain *host); | 267 | extern void irq_set_default_host(struct irq_domain *host); |
| 268 | extern struct irq_domain *irq_get_default_host(void); | ||
| 268 | extern int irq_domain_alloc_descs(int virq, unsigned int nr_irqs, | 269 | extern int irq_domain_alloc_descs(int virq, unsigned int nr_irqs, |
| 269 | irq_hw_number_t hwirq, int node, | 270 | irq_hw_number_t hwirq, int node, |
| 270 | const struct irq_affinity_desc *affinity); | 271 | const struct irq_affinity_desc *affinity); |
