Linux PARISC architecture development
 help / color / mirror / Atom feed
* [parisc-linux] A smal chg proposal about: [PATCH] [PARISC] Allow nested interrupts
@ 2006-09-17 18:09 Joel Soete
  0 siblings, 0 replies; only message in thread
From: Joel Soete @ 2006-09-17 18:09 UTC (permalink / raw)
  To: James Bottomley; +Cc: Parisc List

Hello James,

Sorry to have read it so lately but I just figure out this:
- we can read in:
include/linux/bitops.h
--- snip ---
static inline unsigned fls_long(unsigned long l)
{
         if (sizeof(l) == 4)
                 return fls(l);
         return fls64(l);
}
--- snip ---

- otoh in your patch you wrote:
+static inline int eirr_to_irq(unsigned long eirr)
+{
+#ifdef CONFIG_64BIT
+       int bit = fls64(eirr);
+#else
+       int bit = fls(eirr);
+#endif
+       return (BITS_PER_LONG - bit) + TIMER_IRQ;
+}
+

so may be could it be simply writen:
	int bit = fls_long(eirr);

Hth,
	Joel

PS: I still have somewhere an optimized version for this stuff I will try to find it back ;-)
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-17 18:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-17 18:09 [parisc-linux] A smal chg proposal about: [PATCH] [PARISC] Allow nested interrupts Joel Soete

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox