Thread (14 messages) 14 messages, 5 authors, 2013-03-04
DORMANTno replies

[PATCH 1/2] gpio/omap: convert gpio irq domain to linear mapping

From: Felipe Balbi <hidden>
Date: 2013-03-04 18:47:56
Also in: linux-omap

Hi,

On Mon, Mar 04, 2013 at 11:58:23AM -0600, Jon Hunter wrote:
quoted
quoted
quoted
while (isr) {
	unsigned long bit = __ffs(isr);

	/* clear this bit */
	isr &= ~bit;

	generic_handle_irq(irq_find_mapping(bank->domain, bit);
}

this way you will only iterate the amount of bits enabled in the isr
register.
Definitely cleaner but I am wondering which approach would be more
efficient from an instruction standpoint. This could definitely be much
more efficient if there is only a couple bits set.
__ffs() is done with CLZ instruction, so it's pretty fast.
Ok, yes I see that now for ARMv5 onwards. Grant has pushed the patch,
but may be we can update this as an optimisation separately.
sure, that was my suggestion from the beginning :-) It's clearly subject
to a separate patch.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130304/57368795/attachment-0001.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help