Re: [PATCH] Add irqdevice interface + userint implementation

Christoph Hellwig
2007-04-08T10:33:52Z

On Sun, Apr 08, 2007 at 01:23:15PM +0300, Avi Kivity wrote:
> Christoph Hellwig wrote:
> >>+/*----------------------------------------------------------------------
> >>+ * optimized bitarray object - works like bitarrays in bitops, but uses
> >>+ * a summary field to accelerate lookups. Assumes external locking
> >>+ *---------------------------------------------------------------------*/
> >>+
> >>+struct bitarray {
> >>+ unsigned long summary; /* 1 per word in pending */
> >>+ unsigned long pending[NR_IRQ_WORDS];
> >>+};
> >>+
> >>
> >This should go into a separate header, probably even in include/linux/
> >
>
> It's limited to BITS_PER_LONG * BITS_PER_LONG bits (1K or 4K, depending
> on arch). Do you see any potential users?
>
> Making it generic would be difficult in C without preprocessor abuse.

True, scrap that comment.