Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 20 commits
  • 14 files changed
  • 0 comments
  • 6 contributors
Jun 15, 2012
Grant Likely devicetree: add helper inline for retrieving a node's full name
The pattern (np ? np->full_name : "<none>") is rather common in the
kernel, but can also make for quite long lines.  This patch adds a new
inline function, of_node_full_name() so that the test for a valid node
pointer doesn't need to be open coded at all call sites.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
efd68e7
Paul Mundt irqdomain: Simple NUMA awareness.
While common irqdesc allocation is node aware, the irqdomain code is not.

Presently we observe a number of regressions/inconsistencies on
NUMA-capable platforms:

- Platforms using irqdomains with legacy mappings, where the
  irq_descs are allocated node-local and the irqdomain data
  structure is not.

- Drivers implementing irqdomains will lose node locality
  regardless of the underlying struct device's node id.

This plugs in NUMA node id proliferation across the various allocation
callsites by way of_node_to_nid() node lookup. While of_node_to_nid()
does the right thing for OF-capable platforms it doesn't presently handle
the non-DT case. This is trivially dealt with by simply wraping in to
numa_node_id() unconditionally.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
5ca4db6
Grant Likely irqdomain: Remove unnecessary test for IRQ_DOMAIN_MAP_LEGACY
Where irq_domain_associate() is called in irq_create_mapping, there is
no need to test for IRQ_DOMAIN_MAP_LEGACY because it is already tested
for earlier in the routine.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rob Herring <rob.herring@calxeda.com>
7325570
Jun 17, 2012
Grant Likely irqdomain: Make ops->map hook optional
There isn't a really compelling reason to force ->map to be populated,
so allow it to be left unset.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rob Herring <rob.herring@calxeda.com>
aed9804
Jul 11, 2012
Mark Brown broonie irq_domain: Standardise legacy/linear domain selection
A large proportion of interrupt controllers that support legacy mappings
do so because non-DT systems need to use fixed IRQ numbers when registering
devices via buses but can otherwise use a linear mapping. The interrupt
controller itself typically is not affected by the mapping used and best
practice is to use a linear mapping where possible so drivers frequently
select at runtime depending on if a legacy range has been allocated to
them.

Standardise this behaviour by providing irq_domain_register_simple() which
will allocate a linear mapping unless a positive first_irq is provided in
which case it will fall back to a legacy mapping. This helps make best
practice for irq_domain adoption clearer.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
781d0f4
Dong Aisheng irq_domain: correct a minor wrong comment for linear revmap
The revmap type should be linear for irq_domain_add_linear function.

Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
22076c7
Grant Likely Merge tag 'v3.5-rc6' into irqdomain/next
Linux 3.5-rc6
80c1834
Grant Likely irqdomain: Split disassociating code into separate function
This patch moves the irq disassociation code out into a separate
function in preparation to extend irq_setup_virq to handle multiple
irqs and rename it for use by interrupt controller drivers.  The new
function will be used by irq_setup_virq() in its error path.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rob Herring <rob.herring@calxeda.com>
913af20
Grant Likely irqdomain: Always update revmap when setting up a virq
At irq_setup_virq() time all of the data needed to update the reverse
map is available, but the current code ignores it and relies upon the
slow path to insert revmap records.  This patch adds revmap updating
to the setup path so the slow path will no longer be necessary.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rob Herring <rob.herring@calxeda.com>
2a71a1a
Grant Likely irqdomain: Support for static IRQ mapping and association.
This adds a new strict mapping API for supporting creation of linux IRQs
at existing positions within the domain. The new routines are as follows:

For dynamic allocation and insertion to specified ranges:

	- irq_create_identity_mapping()
	- irq_create_strict_mappings()

These will allocate and associate a range of linux IRQs at the specified
location. This can be used by controllers that have their own static linux IRQ
definitions to map a hwirq range to, as well as for platforms that wish to
establish 1:1 identity mapping between linux and hwirq space.

For insertion to specified ranges by platforms that do their own irq_desc
management:

	- irq_domain_associate()
	- irq_domain_associate_many()

These in turn call back in to the domain's ->map() routine, for further
processing by the platform. Disassociation of IRQs get handled through
irq_dispose_mapping() as normal.

With these in place it should be possible to begin migration of legacy IRQ
domains to linear ones, without requiring special handling for static vs
dynamic IRQ definitions in DT vs non-DT paths. This also makes it possible
for domains with static mappings to adopt whichever tree model best fits
their needs, rather than simply restricting them to linear revmaps.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
[grant.likely: Reorganized irq_domain_associate{,_many} to have all logic in one place]
[grant.likely: Add error checking for unallocated irq_descs at associate time]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rob Herring <rob.herring@calxeda.com>
98aa468
Grant Likely irqdomain: Eliminate dedicated radix lookup functions
In preparation to remove the slow revmap path, eliminate the public
radix revmap lookup functions.  This simplifies the code and makes the
slowpath removal patch a lot simpler.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rob Herring <rob.herring@calxeda.com>
d6b0d1f
Grant Likely irqdomain: Fix irq_create_direct_mapping() to test irq_domain type.
irq_create_direct_mapping can only be used with the NOMAP type.  Make
the function test to ensure it is passed the correct type of
irq_domain.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Rob Herring <rob.herring@calxeda.com>
9844a55
Jul 24, 2012
Grant Likely Merge remote-tracking branch 'origin' into irqdomain/next 6aeea3e
Grant Likely irqdomain: eliminate slow-path revmap lookups
With the current state of irq_domain, the reverse map is always updated
when new IRQs get mapped.  This means that the irq_find_mapping() function
can be simplified to execute the revmap lookup functions unconditionally

This patch adds lookup functions for the revmaps that don't yet have one
and removes the slow path lookup code path.

v8: Broke out unrelated changes into separate patches.  Rebased on Paul's irq
    association patches.
v7: Rebased to irqdomain/next for v3.4 and applied before the removal of 'hint'
v6: Remove the slow path entirely.  The only place where the slow path
    could get called is for a linear mapping if the hwirq number is larger
    than the linear revmap size.  There shouldn't be any interrupt
    controllers that do that.
v5: rewrite to not use a ->revmap() callback.  It is simpler, smaller,
    safer and faster to open code each of the revmap lookups directly into
    irq_find_mapping() via a switch statement.
v4: Fix build failure on incorrect variable reference.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Milton Miller <miltonm@bga.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Rob Herring <rob.herring@calxeda.com>
4c0946c
Mark Brown broonie irqdomain: Improve diagnostics when a domain mapping fails
When the map operation fails log the error code we get and add a WARN_ON()
so we get a backtrace (which should help work out which interrupt is the
source of the issue).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
f5a1ad0
Jul 31, 2012
Linus Torvalds torvalds Merge tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6
Pull irqdomain changes from Grant Likely:
 "Round of refactoring and enhancements to irq_domain infrastructure.
  This series starts the process of simplifying irqdomain.  The ultimate
  goal is to merge LEGACY, LINEAR and TREE mappings into a single
  system, but had to back off from that after some last minute bugs.
  Instead it mainly reorganizes the code and ensures that the reverse
  map gets populated when the irq is mapped instead of the first time it
  is looked up.

  Merging of the irq_domain types is deferred to v3.7

  In other news, this series adds helpers for creating static mappings
  on a linear or tree mapping."

* tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6:
  irqdomain: Improve diagnostics when a domain mapping fails
  irqdomain: eliminate slow-path revmap lookups
  irqdomain: Fix irq_create_direct_mapping() to test irq_domain type.
  irqdomain: Eliminate dedicated radix lookup functions
  irqdomain: Support for static IRQ mapping and association.
  irqdomain: Always update revmap when setting up a virq
  irqdomain: Split disassociating code into separate function
  irq_domain: correct a minor wrong comment for linear revmap
  irq_domain: Standardise legacy/linear domain selection
  irqdomain: Make ops->map hook optional
  irqdomain: Remove unnecessary test for IRQ_DOMAIN_MAP_LEGACY
  irqdomain: Simple NUMA awareness.
  devicetree: add helper inline for retrieving a node's full name
2d53492
Aug 01, 2012
Paul Mundt sh: intc: initial irqdomain support.
Trivial support for irq domains, using either a linear map or radix tree
depending on the vector layout.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1d6a21b
Kuninori Morimoto morimoto sh: sh7724: fixup renesas_usbhs clock settings
8cc88a5
(sh: sh7724: use runtime PM implementation) broke sh7724 clocks.

renesas_usbhs needs HWBLK_USB0/1 clock on sh7724

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
8a87776
Kuninori Morimoto morimoto sh: ecovec: care CN5 VBUS if USB host mode
renesas_usbhs driver can control both USB Host/Gadget,
but it needs VBUS output if Host mode.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1ca8fe3
Paul Mundt Merge branch 'common/irqdomain' into sh-latest f387704
5 Documentation/IRQ-domain.txt
@@ -93,6 +93,7 @@ Linux IRQ number into the hardware.
93 93 Most drivers cannot use this mapping.
94 94
95 95 ==== Legacy ====
  96 +irq_domain_add_simple()
96 97 irq_domain_add_legacy()
97 98 irq_domain_add_legacy_isa()
98 99
@@ -115,3 +116,7 @@ The legacy map should only be used if fixed IRQ mappings must be
115 116 supported. For example, ISA controllers would use the legacy map for
116 117 mapping Linux IRQs 0-15 so that existing ISA drivers get the correct IRQ
117 118 numbers.
  119 +
  120 +Most users of legacy mappings should use irq_domain_add_simple() which
  121 +will use a legacy domain only if an IRQ range is supplied by the
  122 +system and will otherwise use a linear domain mapping.
2  arch/powerpc/sysdev/xics/icp-hv.c
@@ -111,7 +111,7 @@ static unsigned int icp_hv_get_irq(void)
111 111 if (vec == XICS_IRQ_SPURIOUS)
112 112 return NO_IRQ;
113 113
114   - irq = irq_radix_revmap_lookup(xics_host, vec);
  114 + irq = irq_find_mapping(xics_host, vec);
115 115 if (likely(irq != NO_IRQ)) {
116 116 xics_push_cppr(vec);
117 117 return irq;
2  arch/powerpc/sysdev/xics/icp-native.c
@@ -119,7 +119,7 @@ static unsigned int icp_native_get_irq(void)
119 119 if (vec == XICS_IRQ_SPURIOUS)
120 120 return NO_IRQ;
121 121
122   - irq = irq_radix_revmap_lookup(xics_host, vec);
  122 + irq = irq_find_mapping(xics_host, vec);
123 123 if (likely(irq != NO_IRQ)) {
124 124 xics_push_cppr(vec);
125 125 return irq;
3  arch/powerpc/sysdev/xics/xics-common.c
@@ -329,9 +329,6 @@ static int xics_host_map(struct irq_domain *h, unsigned int virq,
329 329
330 330 pr_devel("xics: map virq %d, hwirq 0x%lx\n", virq, hw);
331 331
332   - /* Insert the interrupt mapping into the radix tree for fast lookup */
333   - irq_radix_revmap_insert(xics_host, virq, hw);
334   -
335 332 /* They aren't all level sensitive but we just don't really know */
336 333 irq_set_status_flags(virq, IRQ_LEVEL);
337 334
8 arch/sh/boards/mach-ecovec24/setup.c
@@ -244,9 +244,17 @@ static int usbhs_get_id(struct platform_device *pdev)
244 244 return gpio_get_value(GPIO_PTB3);
245 245 }
246 246
  247 +static void usbhs_phy_reset(struct platform_device *pdev)
  248 +{
  249 + /* enable vbus if HOST */
  250 + if (!gpio_get_value(GPIO_PTB3))
  251 + gpio_set_value(GPIO_PTB5, 1);
  252 +}
  253 +
247 254 static struct renesas_usbhs_platform_info usbhs_info = {
248 255 .platform_callback = {
249 256 .get_id = usbhs_get_id,
  257 + .phy_reset = usbhs_phy_reset,
250 258 },
251 259 .driver_param = {
252 260 .buswait_bwait = 4,
4 arch/sh/kernel/cpu/sh4a/clock-sh7724.c
@@ -334,8 +334,8 @@ static struct clk_lookup lookups[] = {
334 334 CLKDEV_CON_ID("tpu0", &mstp_clks[HWBLK_TPU]),
335 335 CLKDEV_CON_ID("irda0", &mstp_clks[HWBLK_IRDA]),
336 336 CLKDEV_CON_ID("tsif0", &mstp_clks[HWBLK_TSIF]),
337   - CLKDEV_CON_ID("usb1", &mstp_clks[HWBLK_USB1]),
338   - CLKDEV_CON_ID("usb0", &mstp_clks[HWBLK_USB0]),
  337 + CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[HWBLK_USB1]),
  338 + CLKDEV_DEV_ID("renesas_usbhs.0", &mstp_clks[HWBLK_USB0]),
339 339 CLKDEV_CON_ID("2dg0", &mstp_clks[HWBLK_2DG]),
340 340 CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[HWBLK_SDHI0]),
341 341 CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[HWBLK_SDHI1]),
4 drivers/sh/intc/Kconfig
... ... @@ -1,3 +1,7 @@
  1 +config SH_INTC
  2 + def_bool y
  3 + select IRQ_DOMAIN
  4 +
1 5 comment "Interrupt controller options"
2 6
3 7 config INTC_USERIMASK
2  drivers/sh/intc/Makefile
... ... @@ -1,4 +1,4 @@
1   -obj-y := access.o chip.o core.o handle.o virq.o
  1 +obj-y := access.o chip.o core.o handle.o irqdomain.o virq.o
2 2
3 3 obj-$(CONFIG_INTC_BALANCING) += balancing.o
4 4 obj-$(CONFIG_INTC_USERIMASK) += userimask.o
11 drivers/sh/intc/core.c
@@ -25,6 +25,7 @@
25 25 #include <linux/stat.h>
26 26 #include <linux/interrupt.h>
27 27 #include <linux/sh_intc.h>
  28 +#include <linux/irqdomain.h>
28 29 #include <linux/device.h>
29 30 #include <linux/syscore_ops.h>
30 31 #include <linux/list.h>
@@ -310,6 +311,8 @@ int __init register_intc_controller(struct intc_desc *desc)
310 311
311 312 BUG_ON(k > 256); /* _INTC_ADDR_E() and _INTC_ADDR_D() are 8 bits */
312 313
  314 + intc_irq_domain_init(d, hw);
  315 +
313 316 /* register the vectors one by one */
314 317 for (i = 0; i < hw->nr_vectors; i++) {
315 318 struct intc_vect *vect = hw->vectors + i;
@@ -319,8 +322,8 @@ int __init register_intc_controller(struct intc_desc *desc)
319 322 if (!vect->enum_id)
320 323 continue;
321 324
322   - res = irq_alloc_desc_at(irq, numa_node_id());
323   - if (res != irq && res != -EEXIST) {
  325 + res = irq_create_identity_mapping(d->domain, irq);
  326 + if (unlikely(res)) {
324 327 pr_err("can't get irq_desc for %d\n", irq);
325 328 continue;
326 329 }
@@ -340,8 +343,8 @@ int __init register_intc_controller(struct intc_desc *desc)
340 343 * IRQ support, each vector still needs to have
341 344 * its own backing irq_desc.
342 345 */
343   - res = irq_alloc_desc_at(irq2, numa_node_id());
344   - if (res != irq2 && res != -EEXIST) {
  346 + res = irq_create_identity_mapping(d->domain, irq2);
  347 + if (unlikely(res)) {
345 348 pr_err("can't get irq_desc for %d\n", irq2);
346 349 continue;
347 350 }
5 drivers/sh/intc/internals.h
... ... @@ -1,5 +1,6 @@
1 1 #include <linux/sh_intc.h>
2 2 #include <linux/irq.h>
  3 +#include <linux/irqdomain.h>
3 4 #include <linux/list.h>
4 5 #include <linux/kernel.h>
5 6 #include <linux/types.h>
@@ -66,6 +67,7 @@ struct intc_desc_int {
66 67 unsigned int nr_sense;
67 68 struct intc_window *window;
68 69 unsigned int nr_windows;
  70 + struct irq_domain *domain;
69 71 struct irq_chip chip;
70 72 bool skip_suspend;
71 73 };
@@ -187,6 +189,9 @@ unsigned long intc_get_ack_handle(unsigned int irq);
187 189 void intc_enable_disable_enum(struct intc_desc *desc, struct intc_desc_int *d,
188 190 intc_enum enum_id, int enable);
189 191
  192 +/* irqdomain.c */
  193 +void intc_irq_domain_init(struct intc_desc_int *d, struct intc_hw_desc *hw);
  194 +
190 195 /* virq.c */
191 196 void intc_subgroup_init(struct intc_desc *desc, struct intc_desc_int *d);
192 197 void intc_irq_xlate_set(unsigned int irq, intc_enum id, struct intc_desc_int *d);
68 drivers/sh/intc/irqdomain.c
... ... @@ -0,0 +1,68 @@
  1 +/*
  2 + * IRQ domain support for SH INTC subsystem
  3 + *
  4 + * Copyright (C) 2012 Paul Mundt
  5 + *
  6 + * This file is subject to the terms and conditions of the GNU General Public
  7 + * License. See the file "COPYING" in the main directory of this archive
  8 + * for more details.
  9 + */
  10 +#define pr_fmt(fmt) "intc: " fmt
  11 +
  12 +#include <linux/irqdomain.h>
  13 +#include <linux/sh_intc.h>
  14 +#include <linux/export.h>
  15 +#include "internals.h"
  16 +
  17 +/**
  18 + * intc_irq_domain_evt_xlate() - Generic xlate for vectored IRQs.
  19 + *
  20 + * This takes care of exception vector to hwirq translation through
  21 + * by way of evt2irq() translation.
  22 + *
  23 + * Note: For platforms that use a flat vector space without INTEVT this
  24 + * basically just mimics irq_domain_xlate_onecell() by way of a nopped
  25 + * out evt2irq() implementation.
  26 + */
  27 +static int intc_evt_xlate(struct irq_domain *d, struct device_node *ctrlr,
  28 + const u32 *intspec, unsigned int intsize,
  29 + unsigned long *out_hwirq, unsigned int *out_type)
  30 +{
  31 + if (WARN_ON(intsize < 1))
  32 + return -EINVAL;
  33 +
  34 + *out_hwirq = evt2irq(intspec[0]);
  35 + *out_type = IRQ_TYPE_NONE;
  36 +
  37 + return 0;
  38 +}
  39 +
  40 +static const struct irq_domain_ops intc_evt_ops = {
  41 + .xlate = intc_evt_xlate,
  42 +};
  43 +
  44 +void __init intc_irq_domain_init(struct intc_desc_int *d,
  45 + struct intc_hw_desc *hw)
  46 +{
  47 + unsigned int irq_base, irq_end;
  48 +
  49 + /*
  50 + * Quick linear revmap check
  51 + */
  52 + irq_base = evt2irq(hw->vectors[0].vect);
  53 + irq_end = evt2irq(hw->vectors[hw->nr_vectors - 1].vect);
  54 +
  55 + /*
  56 + * Linear domains have a hard-wired assertion that IRQs start at
  57 + * 0 in order to make some performance optimizations. Lamely
  58 + * restrict the linear case to these conditions here, taking the
  59 + * tree penalty for linear cases with non-zero hwirq bases.
  60 + */
  61 + if (irq_base == 0 && irq_end == (irq_base + hw->nr_vectors - 1))
  62 + d->domain = irq_domain_add_linear(NULL, hw->nr_vectors,
  63 + &intc_evt_ops, NULL);
  64 + else
  65 + d->domain = irq_domain_add_tree(NULL, &intc_evt_ops, NULL);
  66 +
  67 + BUG_ON(!d->domain);
  68 +}
28 include/linux/irqdomain.h
@@ -112,6 +112,11 @@ struct irq_domain {
112 112 };
113 113
114 114 #ifdef CONFIG_IRQ_DOMAIN
  115 +struct irq_domain *irq_domain_add_simple(struct device_node *of_node,
  116 + unsigned int size,
  117 + unsigned int first_irq,
  118 + const struct irq_domain_ops *ops,
  119 + void *host_data);
115 120 struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
116 121 unsigned int size,
117 122 unsigned int first_irq,
@@ -144,16 +149,31 @@ static inline struct irq_domain *irq_domain_add_legacy_isa(
144 149
145 150 extern void irq_domain_remove(struct irq_domain *host);
146 151
  152 +extern int irq_domain_associate_many(struct irq_domain *domain,
  153 + unsigned int irq_base,
  154 + irq_hw_number_t hwirq_base, int count);
  155 +static inline int irq_domain_associate(struct irq_domain *domain, unsigned int irq,
  156 + irq_hw_number_t hwirq)
  157 +{
  158 + return irq_domain_associate_many(domain, irq, hwirq, 1);
  159 +}
  160 +
147 161 extern unsigned int irq_create_mapping(struct irq_domain *host,
148 162 irq_hw_number_t hwirq);
149 163 extern void irq_dispose_mapping(unsigned int virq);
150 164 extern unsigned int irq_find_mapping(struct irq_domain *host,
151 165 irq_hw_number_t hwirq);
152 166 extern unsigned int irq_create_direct_mapping(struct irq_domain *host);
153   -extern void irq_radix_revmap_insert(struct irq_domain *host, unsigned int virq,
154   - irq_hw_number_t hwirq);
155   -extern unsigned int irq_radix_revmap_lookup(struct irq_domain *host,
156   - irq_hw_number_t hwirq);
  167 +extern int irq_create_strict_mappings(struct irq_domain *domain,
  168 + unsigned int irq_base,
  169 + irq_hw_number_t hwirq_base, int count);
  170 +
  171 +static inline int irq_create_identity_mapping(struct irq_domain *host,
  172 + irq_hw_number_t hwirq)
  173 +{
  174 + return irq_create_strict_mappings(host, hwirq, hwirq, 1);
  175 +}
  176 +
157 177 extern unsigned int irq_linear_revmap(struct irq_domain *host,
158 178 irq_hw_number_t hwirq);
159 179
15 include/linux/of.h
@@ -21,6 +21,7 @@
21 21 #include <linux/kref.h>
22 22 #include <linux/mod_devicetable.h>
23 23 #include <linux/spinlock.h>
  24 +#include <linux/topology.h>
24 25
25 26 #include <asm/byteorder.h>
26 27 #include <asm/errno.h>
@@ -158,11 +159,6 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)
158 159
159 160 #define OF_BAD_ADDR ((u64)-1)
160 161
161   -#ifndef of_node_to_nid
162   -static inline int of_node_to_nid(struct device_node *np) { return -1; }
163   -#define of_node_to_nid of_node_to_nid
164   -#endif
165   -
166 162 static inline const char* of_node_full_name(struct device_node *np)
167 163 {
168 164 return np ? np->full_name : "<no-node>";
@@ -427,6 +423,15 @@ static inline int of_machine_is_compatible(const char *compat)
427 423 while (0)
428 424 #endif /* CONFIG_OF */
429 425
  426 +#ifndef of_node_to_nid
  427 +static inline int of_node_to_nid(struct device_node *np)
  428 +{
  429 + return numa_node_id();
  430 +}
  431 +
  432 +#define of_node_to_nid of_node_to_nid
  433 +#endif
  434 +
430 435 /**
431 436 * of_property_read_bool - Findfrom a property
432 437 * @np: device node from which the property value is to be read.
362 kernel/irq/irqdomain.c
@@ -10,6 +10,7 @@
10 10 #include <linux/mutex.h>
11 11 #include <linux/of.h>
12 12 #include <linux/of_address.h>
  13 +#include <linux/topology.h>
13 14 #include <linux/seq_file.h>
14 15 #include <linux/slab.h>
15 16 #include <linux/smp.h>
@@ -45,7 +46,8 @@ static struct irq_domain *irq_domain_alloc(struct device_node *of_node,
45 46 {
46 47 struct irq_domain *domain;
47 48
48   - domain = kzalloc(sizeof(*domain), GFP_KERNEL);
  49 + domain = kzalloc_node(sizeof(*domain), GFP_KERNEL,
  50 + of_node_to_nid(of_node));
49 51 if (WARN_ON(!domain))
50 52 return NULL;
51 53
@@ -138,6 +140,36 @@ static unsigned int irq_domain_legacy_revmap(struct irq_domain *domain,
138 140 }
139 141
140 142 /**
  143 + * irq_domain_add_simple() - Allocate and register a simple irq_domain.
  144 + * @of_node: pointer to interrupt controller's device tree node.
  145 + * @size: total number of irqs in mapping
  146 + * @first_irq: first number of irq block assigned to the domain
  147 + * @ops: map/unmap domain callbacks
  148 + * @host_data: Controller private data pointer
  149 + *
  150 + * Allocates a legacy irq_domain if irq_base is positive or a linear
  151 + * domain otherwise.
  152 + *
  153 + * This is intended to implement the expected behaviour for most
  154 + * interrupt controllers which is that a linear mapping should
  155 + * normally be used unless the system requires a legacy mapping in
  156 + * order to support supplying interrupt numbers during non-DT
  157 + * registration of devices.
  158 + */
  159 +struct irq_domain *irq_domain_add_simple(struct device_node *of_node,
  160 + unsigned int size,
  161 + unsigned int first_irq,
  162 + const struct irq_domain_ops *ops,
  163 + void *host_data)
  164 +{
  165 + if (first_irq > 0)
  166 + return irq_domain_add_legacy(of_node, size, first_irq, 0,
  167 + ops, host_data);
  168 + else
  169 + return irq_domain_add_linear(of_node, size, ops, host_data);
  170 +}
  171 +
  172 +/**
141 173 * irq_domain_add_legacy() - Allocate and register a legacy revmap irq_domain.
142 174 * @of_node: pointer to interrupt controller's device tree node.
143 175 * @size: total number of irqs in legacy mapping
@@ -203,7 +235,8 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
203 235 * one can then use irq_create_mapping() to
204 236 * explicitly change them
205 237 */
206   - ops->map(domain, irq, hwirq);
  238 + if (ops->map)
  239 + ops->map(domain, irq, hwirq);
207 240
208 241 /* Clear norequest flags */
209 242 irq_clear_status_flags(irq, IRQ_NOREQUEST);
@@ -215,7 +248,7 @@ struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
215 248 EXPORT_SYMBOL_GPL(irq_domain_add_legacy);
216 249
217 250 /**
218   - * irq_domain_add_linear() - Allocate and register a legacy revmap irq_domain.
  251 + * irq_domain_add_linear() - Allocate and register a linear revmap irq_domain.
219 252 * @of_node: pointer to interrupt controller's device tree node.
220 253 * @size: Number of interrupts in the domain.
221 254 * @ops: map/unmap domain callbacks
@@ -229,7 +262,8 @@ struct irq_domain *irq_domain_add_linear(struct device_node *of_node,
229 262 struct irq_domain *domain;
230 263 unsigned int *revmap;
231 264
232   - revmap = kzalloc(sizeof(*revmap) * size, GFP_KERNEL);
  265 + revmap = kzalloc_node(sizeof(*revmap) * size, GFP_KERNEL,
  266 + of_node_to_nid(of_node));
233 267 if (WARN_ON(!revmap))
234 268 return NULL;
235 269
@@ -330,24 +364,112 @@ void irq_set_default_host(struct irq_domain *domain)
330 364 }
331 365 EXPORT_SYMBOL_GPL(irq_set_default_host);
332 366
333   -static int irq_setup_virq(struct irq_domain *domain, unsigned int virq,
334   - irq_hw_number_t hwirq)
  367 +static void irq_domain_disassociate_many(struct irq_domain *domain,
  368 + unsigned int irq_base, int count)
335 369 {
336   - struct irq_data *irq_data = irq_get_irq_data(virq);
  370 + /*
  371 + * disassociate in reverse order;
  372 + * not strictly necessary, but nice for unwinding
  373 + */
  374 + while (count--) {
  375 + int irq = irq_base + count;
  376 + struct irq_data *irq_data = irq_get_irq_data(irq);
  377 + irq_hw_number_t hwirq = irq_data->hwirq;
  378 +
  379 + if (WARN_ON(!irq_data || irq_data->domain != domain))
  380 + continue;
  381 +
  382 + irq_set_status_flags(irq, IRQ_NOREQUEST);
  383 +
  384 + /* remove chip and handler */
  385 + irq_set_chip_and_handler(irq, NULL, NULL);
  386 +
  387 + /* Make sure it's completed */
  388 + synchronize_irq(irq);
  389 +
  390 + /* Tell the PIC about it */
  391 + if (domain->ops->unmap)
  392 + domain->ops->unmap(domain, irq);
  393 + smp_mb();
337 394
338   - irq_data->hwirq = hwirq;
339   - irq_data->domain = domain;
340   - if (domain->ops->map(domain, virq, hwirq)) {
341   - pr_debug("irq-%i==>hwirq-0x%lx mapping failed\n", virq, hwirq);
342 395 irq_data->domain = NULL;
343 396 irq_data->hwirq = 0;
344   - return -1;
  397 +
  398 + /* Clear reverse map */
  399 + switch(domain->revmap_type) {
  400 + case IRQ_DOMAIN_MAP_LINEAR:
  401 + if (hwirq < domain->revmap_data.linear.size)
  402 + domain->revmap_data.linear.revmap[hwirq] = 0;
  403 + break;
  404 + case IRQ_DOMAIN_MAP_TREE:
  405 + mutex_lock(&revmap_trees_mutex);
  406 + radix_tree_delete(&domain->revmap_data.tree, hwirq);
  407 + mutex_unlock(&revmap_trees_mutex);
  408 + break;
  409 + }
345 410 }
  411 +}
  412 +
  413 +int irq_domain_associate_many(struct irq_domain *domain, unsigned int irq_base,
  414 + irq_hw_number_t hwirq_base, int count)
  415 +{
  416 + unsigned int virq = irq_base;
  417 + irq_hw_number_t hwirq = hwirq_base;
  418 + int i, ret;
  419 +
  420 + pr_debug("%s(%s, irqbase=%i, hwbase=%i, count=%i)\n", __func__,
  421 + of_node_full_name(domain->of_node), irq_base, (int)hwirq_base, count);
  422 +
  423 + for (i = 0; i < count; i++) {
  424 + struct irq_data *irq_data = irq_get_irq_data(virq + i);
  425 +
  426 + if (WARN(!irq_data, "error: irq_desc not allocated; "
  427 + "irq=%i hwirq=0x%x\n", virq + i, (int)hwirq + i))
  428 + return -EINVAL;
  429 + if (WARN(irq_data->domain, "error: irq_desc already associated; "
  430 + "irq=%i hwirq=0x%x\n", virq + i, (int)hwirq + i))
  431 + return -EINVAL;
  432 + };
  433 +
  434 + for (i = 0; i < count; i++, virq++, hwirq++) {
  435 + struct irq_data *irq_data = irq_get_irq_data(virq);
  436 +
  437 + irq_data->hwirq = hwirq;
  438 + irq_data->domain = domain;
  439 + if (domain->ops->map) {
  440 + ret = domain->ops->map(domain, virq, hwirq);
  441 + if (ret != 0) {
  442 + pr_err("irq-%i==>hwirq-0x%lx mapping failed: %d\n",
  443 + virq, hwirq, ret);
  444 + WARN_ON(1);
  445 + irq_data->domain = NULL;
  446 + irq_data->hwirq = 0;
  447 + goto err_unmap;
  448 + }
  449 + }
346 450
347   - irq_clear_status_flags(virq, IRQ_NOREQUEST);
  451 + switch (domain->revmap_type) {
  452 + case IRQ_DOMAIN_MAP_LINEAR:
  453 + if (hwirq < domain->revmap_data.linear.size)
  454 + domain->revmap_data.linear.revmap[hwirq] = virq;
  455 + break;
  456 + case IRQ_DOMAIN_MAP_TREE:
  457 + mutex_lock(&revmap_trees_mutex);
  458 + radix_tree_insert(&domain->revmap_data.tree, hwirq, irq_data);
  459 + mutex_unlock(&revmap_trees_mutex);
  460 + break;
  461 + }
  462 +
  463 + irq_clear_status_flags(virq, IRQ_NOREQUEST);
  464 + }
348 465
349 466 return 0;
  467 +
  468 + err_unmap:
  469 + irq_domain_disassociate_many(domain, irq_base, i);
  470 + return -EINVAL;
350 471 }
  472 +EXPORT_SYMBOL_GPL(irq_domain_associate_many);
351 473
352 474 /**
353 475 * irq_create_direct_mapping() - Allocate an irq for direct mapping
@@ -364,10 +486,10 @@ unsigned int irq_create_direct_mapping(struct irq_domain *domain)
364 486 if (domain == NULL)
365 487 domain = irq_default_domain;
366 488
367   - BUG_ON(domain == NULL);
368   - WARN_ON(domain->revmap_type != IRQ_DOMAIN_MAP_NOMAP);
  489 + if (WARN_ON(!domain || domain->revmap_type != IRQ_DOMAIN_MAP_NOMAP))
  490 + return 0;
369 491
370   - virq = irq_alloc_desc_from(1, 0);
  492 + virq = irq_alloc_desc_from(1, of_node_to_nid(domain->of_node));
371 493 if (!virq) {
372 494 pr_debug("create_direct virq allocation failed\n");
373 495 return 0;
@@ -380,7 +502,7 @@ unsigned int irq_create_direct_mapping(struct irq_domain *domain)
380 502 }
381 503 pr_debug("create_direct obtained virq %d\n", virq);
382 504
383   - if (irq_setup_virq(domain, virq, virq)) {
  505 + if (irq_domain_associate(domain, virq, virq)) {
384 506 irq_free_desc(virq);
385 507 return 0;
386 508 }
@@ -433,17 +555,16 @@ unsigned int irq_create_mapping(struct irq_domain *domain,
433 555 hint = hwirq % nr_irqs;
434 556 if (hint == 0)
435 557 hint++;
436   - virq = irq_alloc_desc_from(hint, 0);
  558 + virq = irq_alloc_desc_from(hint, of_node_to_nid(domain->of_node));
437 559 if (virq <= 0)
438   - virq = irq_alloc_desc_from(1, 0);
  560 + virq = irq_alloc_desc_from(1, of_node_to_nid(domain->of_node));
439 561 if (virq <= 0) {
440 562 pr_debug("-> virq allocation failed\n");
441 563 return 0;
442 564 }
443 565
444   - if (irq_setup_virq(domain, virq, hwirq)) {
445   - if (domain->revmap_type != IRQ_DOMAIN_MAP_LEGACY)
446   - irq_free_desc(virq);
  566 + if (irq_domain_associate(domain, virq, hwirq)) {
  567 + irq_free_desc(virq);
447 568 return 0;
448 569 }
449 570
@@ -454,6 +575,44 @@ unsigned int irq_create_mapping(struct irq_domain *domain,
454 575 }
455 576 EXPORT_SYMBOL_GPL(irq_create_mapping);
456 577
  578 +/**
  579 + * irq_create_strict_mappings() - Map a range of hw irqs to fixed linux irqs
  580 + * @domain: domain owning the interrupt range
  581 + * @irq_base: beginning of linux IRQ range
  582 + * @hwirq_base: beginning of hardware IRQ range
  583 + * @count: Number of interrupts to map
  584 + *
  585 + * This routine is used for allocating and mapping a range of hardware
  586 + * irqs to linux irqs where the linux irq numbers are at pre-defined
  587 + * locations. For use by controllers that already have static mappings
  588 + * to insert in to the domain.
  589 + *
  590 + * Non-linear users can use irq_create_identity_mapping() for IRQ-at-a-time
  591 + * domain insertion.
  592 + *
  593 + * 0 is returned upon success, while any failure to establish a static
  594 + * mapping is treated as an error.
  595 + */
  596 +int irq_create_strict_mappings(struct irq_domain *domain, unsigned int irq_base,
  597 + irq_hw_number_t hwirq_base, int count)
  598 +{
  599 + int ret;
  600 +
  601 + ret = irq_alloc_descs(irq_base, irq_base, count,
  602 + of_node_to_nid(domain->of_node));
  603 + if (unlikely(ret < 0))
  604 + return ret;
  605 +
  606 + ret = irq_domain_associate_many(domain, irq_base, hwirq_base, count);
  607 + if (unlikely(ret < 0)) {
  608 + irq_free_descs(irq_base, count);
  609 + return ret;
  610 + }
  611 +
  612 + return 0;
  613 +}
  614 +EXPORT_SYMBOL_GPL(irq_create_strict_mappings);
  615 +
457 616 unsigned int irq_create_of_mapping(struct device_node *controller,
458 617 const u32 *intspec, unsigned int intsize)
459 618 {
@@ -511,7 +670,6 @@ void irq_dispose_mapping(unsigned int virq)
511 670 {
512 671 struct irq_data *irq_data = irq_get_irq_data(virq);
513 672 struct irq_domain *domain;
514   - irq_hw_number_t hwirq;
515 673
516 674 if (!virq || !irq_data)
517 675 return;
@@ -524,33 +682,7 @@ void irq_dispose_mapping(unsigned int virq)
524 682 if (domain->revmap_type == IRQ_DOMAIN_MAP_LEGACY)
525 683 return;
526 684
527   - irq_set_status_flags(virq, IRQ_NOREQUEST);
528   -
529   - /* remove chip and handler */
530   - irq_set_chip_and_handler(virq, NULL, NULL);
531   -
532   - /* Make sure it's completed */
533   - synchronize_irq(virq);
534   -
535   - /* Tell the PIC about it */
536   - if (domain->ops->unmap)
537   - domain->ops->unmap(domain, virq);
538   - smp_mb();
539   -
540   - /* Clear reverse map */
541   - hwirq = irq_data->hwirq;
542   - switch(domain->revmap_type) {
543   - case IRQ_DOMAIN_MAP_LINEAR:
544   - if (hwirq < domain->revmap_data.linear.size)
545   - domain->revmap_data.linear.revmap[hwirq] = 0;
546   - break;
547   - case IRQ_DOMAIN_MAP_TREE:
548   - mutex_lock(&revmap_trees_mutex);
549   - radix_tree_delete(&domain->revmap_data.tree, hwirq);
550   - mutex_unlock(&revmap_trees_mutex);
551   - break;
552   - }
553   -
  685 + irq_domain_disassociate_many(domain, virq, 1);
554 686 irq_free_desc(virq);
555 687 }
556 688 EXPORT_SYMBOL_GPL(irq_dispose_mapping);
@@ -559,16 +691,11 @@ EXPORT_SYMBOL_GPL(irq_dispose_mapping);
559 691 * irq_find_mapping() - Find a linux irq from an hw irq number.
560 692 * @domain: domain owning this hardware interrupt
561 693 * @hwirq: hardware irq number in that domain space
562   - *
563   - * This is a slow path, for use by generic code. It's expected that an
564   - * irq controller implementation directly calls the appropriate low level
565   - * mapping function.
566 694 */
567 695 unsigned int irq_find_mapping(struct irq_domain *domain,
568 696 irq_hw_number_t hwirq)
569 697 {
570   - unsigned int i;
571   - unsigned int hint = hwirq % nr_irqs;
  698 + struct irq_data *data;
572 699
573 700 /* Look for default domain if nececssary */
574 701 if (domain == NULL)
@@ -576,115 +703,47 @@ unsigned int irq_find_mapping(struct irq_domain *domain,
576 703 if (domain == NULL)
577 704 return 0;
578 705
579   - /* legacy -> bail early */
580   - if (domain->revmap_type == IRQ_DOMAIN_MAP_LEGACY)
  706 + switch (domain->revmap_type) {
  707 + case IRQ_DOMAIN_MAP_LEGACY:
581 708 return irq_domain_legacy_revmap(domain, hwirq);
582   -
583   - /* Slow path does a linear search of the map */
584   - if (hint == 0)
585   - hint = 1;
586   - i = hint;
587   - do {
588   - struct irq_data *data = irq_get_irq_data(i);
  709 + case IRQ_DOMAIN_MAP_LINEAR:
  710 + return irq_linear_revmap(domain, hwirq);
  711 + case IRQ_DOMAIN_MAP_TREE:
  712 + rcu_read_lock();
  713 + data = radix_tree_lookup(&domain->revmap_data.tree, hwirq);
  714 + rcu_read_unlock();
  715 + if (data)
  716 + return data->irq;
  717 + break;
  718 + case IRQ_DOMAIN_MAP_NOMAP:
  719 + data = irq_get_irq_data(hwirq);
589 720 if (data && (data->domain == domain) && (data->hwirq == hwirq))
590   - return i;
591   - i++;
592   - if (i >= nr_irqs)
593   - i = 1;
594   - } while(i != hint);
  721 + return hwirq;
  722 + break;
  723 + }
  724 +
595 725 return 0;
596 726 }
597 727 EXPORT_SYMBOL_GPL(irq_find_mapping);
598 728
599 729 /**
600   - * irq_radix_revmap_lookup() - Find a linux irq from a hw irq number.
601   - * @domain: domain owning this hardware interrupt
602   - * @hwirq: hardware irq number in that domain space
603   - *
604   - * This is a fast path, for use by irq controller code that uses radix tree
605   - * revmaps
606   - */
607   -unsigned int irq_radix_revmap_lookup(struct irq_domain *domain,
608   - irq_hw_number_t hwirq)
609   -{
610   - struct irq_data *irq_data;
611   -
612   - if (WARN_ON_ONCE(domain->revmap_type != IRQ_DOMAIN_MAP_TREE))
613   - return irq_find_mapping(domain, hwirq);
614   -
615   - /*
616   - * Freeing an irq can delete nodes along the path to
617   - * do the lookup via call_rcu.
618   - */
619   - rcu_read_lock();
620   - irq_data = radix_tree_lookup(&domain->revmap_data.tree, hwirq);
621   - rcu_read_unlock();
622   -
623   - /*
624   - * If found in radix tree, then fine.
625   - * Else fallback to linear lookup - this should not happen in practice
626   - * as it means that we failed to insert the node in the radix tree.
627   - */
628   - return irq_data ? irq_data->irq : irq_find_mapping(domain, hwirq);
629   -}
630   -EXPORT_SYMBOL_GPL(irq_radix_revmap_lookup);
631   -
632   -/**
633   - * irq_radix_revmap_insert() - Insert a hw irq to linux irq number mapping.
634   - * @domain: domain owning this hardware interrupt
635   - * @virq: linux irq number
636   - * @hwirq: hardware irq number in that domain space
637   - *
638   - * This is for use by irq controllers that use a radix tree reverse
639   - * mapping for fast lookup.
640   - */
641   -void irq_radix_revmap_insert(struct irq_domain *domain, unsigned int virq,
642   - irq_hw_number_t hwirq)
643   -{
644   - struct irq_data *irq_data = irq_get_irq_data(virq);
645   -
646   - if (WARN_ON(domain->revmap_type != IRQ_DOMAIN_MAP_TREE))
647   - return;
648   -
649   - if (virq) {
650   - mutex_lock(&revmap_trees_mutex);
651   - radix_tree_insert(&domain->revmap_data.tree, hwirq, irq_data);
652   - mutex_unlock(&revmap_trees_mutex);
653   - }
654   -}
655   -EXPORT_SYMBOL_GPL(irq_radix_revmap_insert);
656   -
657   -/**
658 730 * irq_linear_revmap() - Find a linux irq from a hw irq number.
659 731 * @domain: domain owning this hardware interrupt
660 732 * @hwirq: hardware irq number in that domain space
661 733 *
662   - * This is a fast path, for use by irq controller code that uses linear
663   - * revmaps. It does fallback to the slow path if the revmap doesn't exist
664   - * yet and will create the revmap entry with appropriate locking
  734 + * This is a fast path that can be called directly by irq controller code to
  735 + * save a handful of instructions.
665 736 */
666 737 unsigned int irq_linear_revmap(struct irq_domain *domain,
667 738 irq_hw_number_t hwirq)
668 739 {
669   - unsigned int *revmap;
670   -
671   - if (WARN_ON_ONCE(domain->revmap_type != IRQ_DOMAIN_MAP_LINEAR))
672   - return irq_find_mapping(domain, hwirq);
  740 + BUG_ON(domain->revmap_type != IRQ_DOMAIN_MAP_LINEAR);
673 741
674   - /* Check revmap bounds */
675   - if (unlikely(hwirq >= domain->revmap_data.linear.size))
676   - return irq_find_mapping(domain, hwirq);
677   -
678   - /* Check if revmap was allocated */
679   - revmap = domain->revmap_data.linear.revmap;
680   - if (unlikely(revmap == NULL))
681   - return irq_find_mapping(domain, hwirq);
682   -
683   - /* Fill up revmap with slow path if no mapping found */
684   - if (unlikely(!revmap[hwirq]))
685   - revmap[hwirq] = irq_find_mapping(domain, hwirq);
  742 + /* Check revmap bounds; complain if exceeded */
  743 + if (WARN_ON(hwirq >= domain->revmap_data.linear.size))
  744 + return 0;
686 745
687   - return revmap[hwirq];
  746 + return domain->revmap_data.linear.revmap[hwirq];
688 747 }
689 748 EXPORT_SYMBOL_GPL(irq_linear_revmap);
690 749
@@ -761,12 +820,6 @@ static int __init irq_debugfs_init(void)
761 820 __initcall(irq_debugfs_init);
762 821 #endif /* CONFIG_IRQ_DOMAIN_DEBUG */
763 822
764   -static int irq_domain_simple_map(struct irq_domain *d, unsigned int irq,
765   - irq_hw_number_t hwirq)
766   -{
767   - return 0;
768   -}
769   -
770 823 /**
771 824 * irq_domain_xlate_onecell() - Generic xlate for direct one cell bindings
772 825 *
@@ -829,7 +882,6 @@ int irq_domain_xlate_onetwocell(struct irq_domain *d,
829 882 EXPORT_SYMBOL_GPL(irq_domain_xlate_onetwocell);
830 883
831 884 const struct irq_domain_ops irq_domain_simple_ops = {
832   - .map = irq_domain_simple_map,
833 885 .xlate = irq_domain_xlate_onetwocell,
834 886 };
835 887 EXPORT_SYMBOL_GPL(irq_domain_simple_ops);

No commit comments for this range

Something went wrong with that request. Please try again.