Tigran Aivazian wrote:
>
> Hi guys,
>
> It would appear that fop->read() methods assume that interrupts are always
> enabled on the current cpu. For example, drivers/char/rtc:rtc_read() uses
> spin_lock_irq(&rtc_lock) while the interrupt handler uses the plain
> spin_lock(&rtc_lock). It is clear why rtc_interrupt() use spin_lock() but
> is not clear why rtc_read() uses spin_lock_irq() and not the generic
> spin_lock_irqsave().
rtc_read is never called w/ interrupts disabled, so you can use the
cheaper version of the spinlock
Jeff
-- Jeff Garzik | Building 1024 | Free beer tomorrow. MandrakeSoft, Inc. |- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Jun 26 2000 - 21:00:09 EST