aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-02-15 17:06:08 -0500
committerGrant Likely <grant.likely@secretlab.ca>2012-04-12 02:37:48 -0400
commit6fa6c8e25e95bdc73e92e4c96b8e3299169b616e (patch)
tree34dc13fb2448eab4916f55edd10dfa34c36505df /include
parent15e06bf64f686befd2030da867a3dad965b96cc0 (diff)
irq_domain: Move irq_virq_count into NOMAP revmap
This patch replaces the old global setting of irq_virq_count that is only used by the NOMAP mapping and instead uses a revmap_data property so that the maximum NOMAP allocation can be set per NOMAP irq_domain. There is exactly one user of irq_virq_count in-tree right now: PS3. Also, irq_virq_count is only useful for the NOMAP mapping. So, instead of having a single global irq_virq_count values, this change drops it entirely and added a max_irq argument to irq_domain_add_nomap(). That makes it a property of an individual nomap irq domain instead of a global system settting. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Milton Miller <miltonm@bga.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/irqdomain.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index ac17b9b2e7be..c65740d76e66 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -98,6 +98,9 @@ struct irq_domain {
98 unsigned int size; 98 unsigned int size;
99 unsigned int *revmap; 99 unsigned int *revmap;
100 } linear; 100 } linear;
101 struct {
102 unsigned int max_irq;
103 } nomap;
101 struct radix_tree_root tree; 104 struct radix_tree_root tree;
102 } revmap_data; 105 } revmap_data;
103 const struct irq_domain_ops *ops; 106 const struct irq_domain_ops *ops;
@@ -120,6 +123,7 @@ struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
120 const struct irq_domain_ops *ops, 123 const struct irq_domain_ops *ops,
121 void *host_data); 124 void *host_data);
122struct irq_domain *irq_domain_add_nomap(struct device_node *of_node, 125struct irq_domain *irq_domain_add_nomap(struct device_node *of_node,
126 unsigned int max_irq,
123 const struct irq_domain_ops *ops, 127 const struct irq_domain_ops *ops,
124 void *host_data); 128 void *host_data);
125struct irq_domain *irq_domain_add_tree(struct device_node *of_node, 129struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
@@ -128,7 +132,6 @@ struct irq_domain *irq_domain_add_tree(struct device_node *of_node,
128 132
129extern struct irq_domain *irq_find_host(struct device_node *node); 133extern struct irq_domain *irq_find_host(struct device_node *node);
130extern void irq_set_default_host(struct irq_domain *host); 134extern void irq_set_default_host(struct irq_domain *host);
131extern void irq_set_virq_count(unsigned int count);
132 135
133static inline struct irq_domain *irq_domain_add_legacy_isa( 136static inline struct irq_domain *irq_domain_add_legacy_isa(
134 struct device_node *of_node, 137 struct device_node *of_node,
@@ -140,7 +143,6 @@ static inline struct irq_domain *irq_domain_add_legacy_isa(
140} 143}
141extern struct irq_domain *irq_find_host(struct device_node *node); 144extern struct irq_domain *irq_find_host(struct device_node *node);
142extern void irq_set_default_host(struct irq_domain *host); 145extern void irq_set_default_host(struct irq_domain *host);
143extern void irq_set_virq_count(unsigned int count);
144 146
145 147
146extern unsigned int irq_create_mapping(struct irq_domain *host, 148extern unsigned int irq_create_mapping(struct irq_domain *host,