<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/irqdomain.h, branch v3.16.3</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.3</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.16.3'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-06-24T13:02:41Z</updated>
<entry>
<title>irqdomain: make irq_linear_revmap() a fast path again</title>
<updated>2013-06-24T13:02:41Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2013-06-10T11:19:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d3dcb436f61593843af178d4a520c8c43c04d3fc'/>
<id>urn:sha1:d3dcb436f61593843af178d4a520c8c43c04d3fc</id>
<content type='text'>
Over the years, irq_linear_revmap() gained tests and checks to make sure
callers were using it safely, which while important, also make it less
of a fast path. After the irqdomain refactoring done recently, it is now
possible to make irq_linear_revmap() a fast path again. This patch moves
irq_linear_revmap() to the header file and makes it a static inline so
that interrupt controller drivers using a linear mapping can decode the
virq from a hwirq in just a couple of instructions.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>irqdomain: remove irq_domain_generate_simple()</title>
<updated>2013-06-24T13:02:41Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2013-06-10T00:09:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=56a3d5ac774d054ece9373277a861338a468a294'/>
<id>urn:sha1:56a3d5ac774d054ece9373277a861338a468a294</id>
<content type='text'>
Nobody calls it; remove the function

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>irqdomain: Refactor irq_domain_associate_many()</title>
<updated>2013-06-24T13:01:42Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2013-06-10T00:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ddaf144c61da45ae5c49ae38556c3ac4524f9318'/>
<id>urn:sha1:ddaf144c61da45ae5c49ae38556c3ac4524f9318</id>
<content type='text'>
Originally, irq_domain_associate_many() was designed to unwind the
mapped irqs on a failure of any individual association. However, that
proved to be a problem with certain IRQ controllers. Some of them only
support a subset of irqs, and will fail when attempting to map a
reserved IRQ. In those cases we want to map as many IRQs as possible, so
instead it is better for irq_domain_associate_many() to make a
best-effort attempt to map irqs, but not fail if any or all of them
don't succeed. If a caller really cares about how many irqs got
associated, then it should instead go back and check that all of the
irqs is cares about were mapped.

The original design open-coded the individual association code into the
body of irq_domain_associate_many(), but with no longer needing to
unwind associations, the code becomes simpler to split out
irq_domain_associate() to contain the bulk of the logic, and
irq_domain_associate_many() to be a simple loop wrapper.

This patch also adds a new error check to the associate path to make
sure it isn't called for an irq larger than the controller can handle,
and adds locking so that the irq_domain_mutex is held while setting up a
new association.

v3: Fixup missing change to irq_domain_add_tree()
v2: Fixup x86 warning. irq_domain_associate_many() no longer returns an
    error code, but reports errors to the printk log directly. In the
    majority of cases we don't actually want to fail if there is a
    problem, but rather log it and still try to boot the system.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;

irqdomain: Fix flubbed irq_domain_associate_many refactoring

commit d39046ec72, "irqdomain: Refactor irq_domain_associate_many()" was
missing the following hunk which causes a boot failure on anything using
irq_domain_add_tree() to allocate an irq domain.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Michael Neuling &lt;mikey@neuling.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;,
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;,
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
</content>
</entry>
<entry>
<title>irqdomain: Clean up aftermath of irq_domain refactoring</title>
<updated>2013-06-10T10:52:09Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2013-06-08T11:57:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fa40f377577752b83252b9d2b3165d4acee0eb7c'/>
<id>urn:sha1:fa40f377577752b83252b9d2b3165d4acee0eb7c</id>
<content type='text'>
After refactoring the irqdomain code, there are a number of API
functions that are merely empty wrappers around core code. Drop those
wrappers out of the C file and replace them with static inlines in the
header.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>irqdomain: Eliminate revmap type</title>
<updated>2013-06-10T10:52:09Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2013-06-08T11:03:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1aa0dd94ca07df818cf14588c9031ab1d7fd84d3'/>
<id>urn:sha1:1aa0dd94ca07df818cf14588c9031ab1d7fd84d3</id>
<content type='text'>
The NOMAP irq_domain type is only used by a handful of interrupt
controllers and it unnecessarily complicates the code by adding special
cases on how to look up mappings and different revmap functions are used
for each type which need to validate the correct type is passed to it
before performing the reverse map. Eliminating the revmap_type and
making a single reverse mapping function simplifies the code. It also
shouldn't be any slower than having separate revmap functions because
the type of the revmap needed to be checked anyway.

The linear and tree revmap types were already merged in a previous
patch. This patch rolls the NOMAP or direct mapping behaviour into the
same domain code making is possible for an irq domain to do any mapping
type; linear, tree or direct; and that the mapping will be transparent
to the interrupt controller driver.

With this change, direct mappings will get stored in the linear or tree
mapping for consistency. Reverse mapping from the hwirq to virq will go
through the normal lookup process. However, any controller using a
direct mapping can take advantage of knowing that hwirq==virq for any
mapped interrupts skip doing a revmap lookup when handling IRQs.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>irqdomain: merge linear and tree reverse mappings.</title>
<updated>2013-06-10T10:52:09Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2012-07-11T16:24:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cef5075c8c238ffd04c86a77a5a9bdbd18031137'/>
<id>urn:sha1:cef5075c8c238ffd04c86a77a5a9bdbd18031137</id>
<content type='text'>
Keeping them separate makes irq_domain more complex and adds a lot of
code (as proven by the diffstat).  Merging them simplifies the whole
scheme.  This change makes it so both the tree and linear methods can be
used by the same irq_domain instance.  If the hwirq is less than the
-&gt;linear_size, then the linear map is used to reverse map the hwirq.
Otherwise the radix tree is used.  The test for which map to use is no
more expensive that the existing code, so the performance of fast path
is preserved.

It also means that complex interrupt controllers can use both the
linear map and a tree in the same domain.  This may be useful for an
interrupt controller with a base set of core irqs and a large number
of GPIOs which might be used as irqs.  The linear map could cover the
core irqs, and the tree used for thas irqs.  The linear map could
cover the core irqs, and the tree used for the gpios.

v2: Drop reorganization of revmap data

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;</content>
</entry>
<entry>
<title>irqdomain: Add a name field</title>
<updated>2013-06-10T10:52:09Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2013-06-06T13:23:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0bb4afb45dd1add73ca643a865daa38716aeff0c'/>
<id>urn:sha1:0bb4afb45dd1add73ca643a865daa38716aeff0c</id>
<content type='text'>
This patch adds a name field to the irq_domain structure to help mere
mortals understand the mappings between irq domains and virqs. It also
converts a number of places that have open-coded some kind of fudging
an irqdomain name to use the new field. This means a more consistent
display of names in irq domain log messages and debugfs output.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
</content>
</entry>
<entry>
<title>irqdomain: Replace LEGACY mapping with LINEAR</title>
<updated>2013-06-10T10:52:09Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@linaro.org</email>
</author>
<published>2013-06-06T11:10:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9bbf877d3b6b8c5991000296f40a3f0fe66fa89b'/>
<id>urn:sha1:9bbf877d3b6b8c5991000296f40a3f0fe66fa89b</id>
<content type='text'>
The LEGACY mapping unnecessarily complicates the irqdomain code and
can easily be implemented with a linear mapping.  By ripping it out
and replacing it with the LINEAR mapping the object size of
irqdomain.c shrinks by about 330 bytes (ARMv7) which offsets the
additional allocation required by the linear map.  It also makes it
possible for current LEGACY map users to pre-allocate irq_descs for a
subset of the hwirqs and dynamically allocate the rest as needed.

Signed-off-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
</content>
</entry>
<entry>
<title>genirq: Generic chip: Add linear irq domain support</title>
<updated>2013-05-29T08:57:11Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2013-05-06T14:30:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=088f40b7b027dad6519712ff224a5798dd62a204'/>
<id>urn:sha1:088f40b7b027dad6519712ff224a5798dd62a204</id>
<content type='text'>
Provide infrastructure for irq chip implementations which work on
linear irq domains.

- Interface to allocate multiple generic chips which are associated to
  the irq domain.

- Interface to get the generic chip pointer for a particular hardware
  interrupt in the domain.

- irq domain mapping function to install the chip for a particular
  interrupt.

Note: This lacks a removal function for now.

[ Sebastian Hesselbarth: Mask cache and pointer math fixups ]

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Thomas Petazzoni &lt;thomas.petazzoni@free-electrons.com&gt;
Cc: Andrew Lunn &lt;andrew@lunn.ch&gt;
Cc: Russell King - ARM Linux &lt;linux@arm.linux.org.uk&gt;
Cc: Jason Cooper &lt;jason@lakedaemon.net&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Jean-Francois Moine &lt;moinejf@free.fr&gt;
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
Cc: Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Cc: Gregory Clement &lt;gregory.clement@free-electrons.com&gt;
Cc: Gerlando Falauto &lt;gerlando.falauto@keymile.com&gt;
Cc: Rob Landley &lt;rob@landley.net&gt;
Acked-by: Grant Likely &lt;grant.likely@linaro.org&gt;
Cc: Maxime Ripard &lt;maxime.ripard@free-electrons.com&gt;
Cc: Ezequiel Garcia &lt;ezequiel.garcia@free-electrons.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: Sebastian Hesselbarth &lt;sebastian.hesselbarth@gmail.com&gt;
Link: http://lkml.kernel.org/r/20130506142539.450634298@linutronix.de
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>irqdomain: Eliminate dedicated radix lookup functions</title>
<updated>2012-07-11T15:16:00Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2012-06-04T05:04:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d6b0d1f7058f7cf818138cd7fd116dca3f3576d9'/>
<id>urn:sha1:d6b0d1f7058f7cf818138cd7fd116dca3f3576d9</id>
<content type='text'>
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 &lt;grant.likely@secretlab.ca&gt;
Cc: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
</content>
</entry>
</feed>
