int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), unsigned long irqflags, const char * devname, void *dev_id)
中的irqflags加入SA_SAMPLE_RANDOM
會在setup_irq(unsigned int irq, struct irqaction* act);
if request_irq() with SA_SAMPLE_RANDOM flag, the setup_irq() will call rand_initialize_irq()
If irqaction has SA_SAMPLE_RANDOM flag, handle_IRQ_event() will call add_interrupt_randomness
The disk and keyboard/mouse is more appropriate, the periodic interrupt like timer interrupt is not suitable.
沒有留言:
張貼留言