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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Mar 04, 2013 at 11:58:23AM -0600, Jon Hunter wrote:
> >>> 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

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux