Re: PATCH: 2.6.26-rc8: Fix IRQF_DISABLED for shared interrupts

From: Stefan Becker
Date: Mon Jun 30 2008 - 01:29:42 EST


Hi David,

ext David Brownell wrote:

By the way, did you notice the oddness of IRQF_SAMPLE_RANDOM there?
For a shared IRQ, I would rather think that if any IRQ was flagged
as "too predictable for use as IRQ randomness" (by not having that
flag set) then the IRQ should never be sampled ... there's some odd
thought (or non-thought) involved in IRQ sharing.

Good question. What happens when you mix a random and a not-so-random source: does the result have an as good random quality as the original random source? If the answer is yes then the current code is OK.


One technical comment:

--- a/kernel/irq/internals.h
>>
+ * IRQF_DISABLED_CUMULATIVE - one handler in the chain has IRQF_DISABLED
set + */
+#define IRQF_DISABLED_CUMULATIVE 0x80000000

I don't think you should need that flag; and if you did, it should be
declared in <linux/irq.h> to prevent anyone else from using that bit
for some other purpose.

My fear was that if it is a public flag in linux/interrupt.h then somebody might misuse it.


Instead, I think you can set IRQF_DISABLED in irq_desc[irq].status
to achieve the same effect.

I actually had the same idea but missed the "irq" in the handle_IRQ_event() signature :-(


I'll try to send an updated patch today...

Regards,

Stefan

---
Stefan Becker
E-Mail: Stefan.Becker@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/