aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-01-11 21:28:06 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-11 21:28:06 -0500
commit3d116a66ed9df0271b8d267093b3bfde2be19b3a (patch)
tree8415b051c87b44ea9f7ecd50bf850155b028737e /include/linux
parentb4cee21ee057ff3e5c9014fb6a175bd932c5ce62 (diff)
parentd3b421cd07e4c0d4d6c0bbd55ca169c054fc081d (diff)
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq updates from Thomas Gleixner: "The irq department provides: - Support for MSI to wire bridges and a first user of it - More ACPI support for ARM/GIC - A new TS-4800 interrupt controller driver - RCU based free of interrupt descriptors to support the upcoming Intel VMD technology without introducing a locking nightmare - The usual pile of fixes and updates to drivers and core code" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (41 commits) irqchip/omap-intc: Add support for spurious irq handling irqchip/zevio: Use irq_data_get_chip_type() helper irqchip/omap-intc: Remove duplicate setup for IRQ chip type handler irqchip/ts4800: Add TS-4800 interrupt controller irqchip/ts4800: Add documentation for TS-4800 interrupt controller irq/platform-MSI: Increase the maximum MSIs the MSI framework can support irqchip/gicv2m: Miscellaneous fixes for v2m resources and SPI ranges irqchip/bcm2836: Make code more readable irqchip/bcm2836: Tolerate IRQs while no flag is set in ISR irqchip/bcm2836: Add SMP support for the 2836 irqchip/bcm2836: Fix initialization of the LOCAL_IRQ_CNT timers irqchip/gic-v2m: acpi: Introducing GICv2m ACPI support irqchip/gic-v2m: Refactor to prepare for ACPI support irqdomain: Introduce is_fwnode_irqchip helper acpi: pci: Setup MSI domain for ACPI based pci devices genirq/msi: Export functions to allow MSI domains in modules irqchip/mbigen: Implement the mbigen irq chip operation functions irqchip/mbigen: Create irq domain for each mbigen device irqchip/mgigen: Add platform device driver for mbigen device dt-bindings: Documents the mbigen bindings ...
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/interrupt.h1
-rw-r--r--include/linux/irqchip/arm-gic.h13
-rw-r--r--include/linux/irqdesc.h6
-rw-r--r--include/linux/irqdomain.h13
-rw-r--r--include/linux/msi.h18
-rw-r--r--include/linux/pci.h10
-rw-r--r--include/linux/platform_data/irq-renesas-intc-irqpin.h29
7 files changed, 60 insertions, 30 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index ad16809c8596..cb30edbfe9fc 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -195,6 +195,7 @@ extern void disable_irq(unsigned int irq);
195extern void disable_percpu_irq(unsigned int irq); 195extern void disable_percpu_irq(unsigned int irq);
196extern void enable_irq(unsigned int irq); 196extern void enable_irq(unsigned int irq);
197extern void enable_percpu_irq(unsigned int irq, unsigned int type); 197extern void enable_percpu_irq(unsigned int irq, unsigned int type);
198extern bool irq_percpu_is_enabled(unsigned int irq);
198extern void irq_wake_thread(unsigned int irq, void *dev_id); 199extern void irq_wake_thread(unsigned int irq, void *dev_id);
199 200
200/* The following three functions are for the core kernel use only. */ 201/* The following three functions are for the core kernel use only. */
diff --git a/include/linux/irqchip/arm-gic.h b/include/linux/irqchip/arm-gic.h
index bae69e5d693c..9c940263ca23 100644
--- a/include/linux/irqchip/arm-gic.h
+++ b/include/linux/irqchip/arm-gic.h
@@ -103,10 +103,21 @@ struct device_node;
103void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); 103void gic_cascade_irq(unsigned int gic_nr, unsigned int irq);
104int gic_cpu_if_down(unsigned int gic_nr); 104int gic_cpu_if_down(unsigned int gic_nr);
105 105
106/*
107 * Subdrivers that need some preparatory work can initialize their
108 * chips and call this to register their GICs.
109 */
110int gic_of_init(struct device_node *node, struct device_node *parent);
111
112/*
113 * Legacy platforms not converted to DT yet must use this to init
114 * their GIC
115 */
106void gic_init(unsigned int nr, int start, 116void gic_init(unsigned int nr, int start,
107 void __iomem *dist , void __iomem *cpu); 117 void __iomem *dist , void __iomem *cpu);
108 118
109int gicv2m_of_init(struct device_node *node, struct irq_domain *parent); 119int gicv2m_init(struct fwnode_handle *parent_handle,
120 struct irq_domain *parent);
110 121
111void gic_send_sgi(unsigned int cpu_id, unsigned int irq); 122void gic_send_sgi(unsigned int cpu_id, unsigned int irq);
112int gic_get_cpu_id(unsigned int cpu); 123int gic_get_cpu_id(unsigned int cpu);
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index a587a33363c7..dcca77c4b9d2 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -1,6 +1,8 @@
1#ifndef _LINUX_IRQDESC_H 1#ifndef _LINUX_IRQDESC_H
2#define _LINUX_IRQDESC_H 2#define _LINUX_IRQDESC_H
3 3
4#include <linux/rcupdate.h>
5
4/* 6/*
5 * Core internal functions to deal with irq descriptors 7 * Core internal functions to deal with irq descriptors
6 */ 8 */
@@ -40,6 +42,7 @@ struct pt_regs;
40 * IRQF_NO_SUSPEND set 42 * IRQF_NO_SUSPEND set
41 * @force_resume_depth: number of irqactions on a irq descriptor with 43 * @force_resume_depth: number of irqactions on a irq descriptor with
42 * IRQF_FORCE_RESUME set 44 * IRQF_FORCE_RESUME set
45 * @rcu: rcu head for delayed free
43 * @dir: /proc/irq/ procfs entry 46 * @dir: /proc/irq/ procfs entry
44 * @name: flow handler name for /proc/interrupts output 47 * @name: flow handler name for /proc/interrupts output
45 */ 48 */
@@ -82,6 +85,9 @@ struct irq_desc {
82#ifdef CONFIG_PROC_FS 85#ifdef CONFIG_PROC_FS
83 struct proc_dir_entry *dir; 86 struct proc_dir_entry *dir;
84#endif 87#endif
88#ifdef CONFIG_SPARSE_IRQ
89 struct rcu_head rcu;
90#endif
85 int parent_irq; 91 int parent_irq;
86 struct module *owner; 92 struct module *owner;
87 const char *name; 93 const char *name;
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index d5e5c5bef28c..f64622ad02c1 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -211,6 +211,11 @@ static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *node)
211 return node ? &node->fwnode : NULL; 211 return node ? &node->fwnode : NULL;
212} 212}
213 213
214static inline bool is_fwnode_irqchip(struct fwnode_handle *fwnode)
215{
216 return fwnode && fwnode->type == FWNODE_IRQCHIP;
217}
218
214static inline struct irq_domain *irq_find_matching_host(struct device_node *node, 219static inline struct irq_domain *irq_find_matching_host(struct device_node *node,
215 enum irq_domain_bus_token bus_token) 220 enum irq_domain_bus_token bus_token)
216{ 221{
@@ -367,6 +372,9 @@ static inline int irq_domain_alloc_irqs(struct irq_domain *domain,
367 return __irq_domain_alloc_irqs(domain, -1, nr_irqs, node, arg, false); 372 return __irq_domain_alloc_irqs(domain, -1, nr_irqs, node, arg, false);
368} 373}
369 374
375extern int irq_domain_alloc_irqs_recursive(struct irq_domain *domain,
376 unsigned int irq_base,
377 unsigned int nr_irqs, void *arg);
370extern int irq_domain_set_hwirq_and_chip(struct irq_domain *domain, 378extern int irq_domain_set_hwirq_and_chip(struct irq_domain *domain,
371 unsigned int virq, 379 unsigned int virq,
372 irq_hw_number_t hwirq, 380 irq_hw_number_t hwirq,
@@ -410,6 +418,11 @@ static inline bool irq_domain_is_hierarchy(struct irq_domain *domain)
410static inline void irq_dispose_mapping(unsigned int virq) { } 418static inline void irq_dispose_mapping(unsigned int virq) { }
411static inline void irq_domain_activate_irq(struct irq_data *data) { } 419static inline void irq_domain_activate_irq(struct irq_data *data) { }
412static inline void irq_domain_deactivate_irq(struct irq_data *data) { } 420static inline void irq_domain_deactivate_irq(struct irq_data *data) { }
421static inline struct irq_domain *irq_find_matching_fwnode(
422 struct fwnode_handle *fwnode, enum irq_domain_bus_token bus_token)
423{
424 return NULL;
425}
413#endif /* !CONFIG_IRQ_DOMAIN */ 426#endif /* !CONFIG_IRQ_DOMAIN */
414 427
415#endif /* _LINUX_IRQDOMAIN_H */ 428#endif /* _LINUX_IRQDOMAIN_H */
diff --git a/include/linux/msi.h b/include/linux/msi.h
index f71a25e5fd25..1c6342ab8c0e 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -174,6 +174,7 @@ struct msi_controller {
174#include <asm/msi.h> 174#include <asm/msi.h>
175 175
176struct irq_domain; 176struct irq_domain;
177struct irq_domain_ops;
177struct irq_chip; 178struct irq_chip;
178struct device_node; 179struct device_node;
179struct fwnode_handle; 180struct fwnode_handle;
@@ -279,6 +280,23 @@ struct irq_domain *platform_msi_create_irq_domain(struct fwnode_handle *fwnode,
279int platform_msi_domain_alloc_irqs(struct device *dev, unsigned int nvec, 280int platform_msi_domain_alloc_irqs(struct device *dev, unsigned int nvec,
280 irq_write_msi_msg_t write_msi_msg); 281 irq_write_msi_msg_t write_msi_msg);
281void platform_msi_domain_free_irqs(struct device *dev); 282void platform_msi_domain_free_irqs(struct device *dev);
283
284/* When an MSI domain is used as an intermediate domain */
285int msi_domain_prepare_irqs(struct irq_domain *domain, struct device *dev,
286 int nvec, msi_alloc_info_t *args);
287int msi_domain_populate_irqs(struct irq_domain *domain, struct device *dev,
288 int virq, int nvec, msi_alloc_info_t *args);
289struct irq_domain *
290platform_msi_create_device_domain(struct device *dev,
291 unsigned int nvec,
292 irq_write_msi_msg_t write_msi_msg,
293 const struct irq_domain_ops *ops,
294 void *host_data);
295int platform_msi_domain_alloc(struct irq_domain *domain, unsigned int virq,
296 unsigned int nr_irqs);
297void platform_msi_domain_free(struct irq_domain *domain, unsigned int virq,
298 unsigned int nvec);
299void *platform_msi_get_host_data(struct irq_domain *domain);
282#endif /* CONFIG_GENERIC_MSI_IRQ_DOMAIN */ 300#endif /* CONFIG_GENERIC_MSI_IRQ_DOMAIN */
283 301
284#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN 302#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 6ae25aae88fd..d86378c226fb 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1946,6 +1946,16 @@ static inline struct irq_domain *
1946pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; } 1946pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; }
1947#endif /* CONFIG_OF */ 1947#endif /* CONFIG_OF */
1948 1948
1949#ifdef CONFIG_ACPI
1950struct irq_domain *pci_host_bridge_acpi_msi_domain(struct pci_bus *bus);
1951
1952void
1953pci_msi_register_fwnode_provider(struct fwnode_handle *(*fn)(struct device *));
1954#else
1955static inline struct irq_domain *
1956pci_host_bridge_acpi_msi_domain(struct pci_bus *bus) { return NULL; }
1957#endif
1958
1949#ifdef CONFIG_EEH 1959#ifdef CONFIG_EEH
1950static inline struct eeh_dev *pci_dev_to_eeh_dev(struct pci_dev *pdev) 1960static inline struct eeh_dev *pci_dev_to_eeh_dev(struct pci_dev *pdev)
1951{ 1961{
diff --git a/include/linux/platform_data/irq-renesas-intc-irqpin.h b/include/linux/platform_data/irq-renesas-intc-irqpin.h
deleted file mode 100644
index e4cb911066a6..000000000000
--- a/include/linux/platform_data/irq-renesas-intc-irqpin.h
+++ /dev/null
@@ -1,29 +0,0 @@
1/*
2 * Renesas INTC External IRQ Pin Driver
3 *
4 * Copyright (C) 2013 Magnus Damm
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef __IRQ_RENESAS_INTC_IRQPIN_H__
21#define __IRQ_RENESAS_INTC_IRQPIN_H__
22
23struct renesas_intc_irqpin_config {
24 unsigned int sense_bitfield_width;
25 unsigned int irq_base;
26 bool control_parent;
27};
28
29#endif /* __IRQ_RENESAS_INTC_IRQPIN_H__ */