Messages in this thread | | | Subject | Re: [PATCH, RFC] Driver for reading HP laptop LCD brightness | From | Arjan van de Ven <> | Date | Sun, 05 Feb 2006 15:41:42 +0100 |
| |
On Sun, 2006-02-05 at 14:34 +0000, Matthew Garrett wrote: > On Sun, Feb 05, 2006 at 03:27:26PM +0100, Arjan van de Ven wrote: > > > disable_irq() and enable_irq() are really really evil. Are you sure you > > need these? To me on first sight it looks like a bug (think of shared > > interrupts for example), can you explain what you are trying to achieve > > with these? > > We're talking to the hardware directly. There's a potential race where > the BIOS will try to access the cmos at the same time, with potentially > interesting results (We set the address we want to read with the outb. > The BIOS runs, outbs its own address, and then reads. We then read from > the address the BIOS was looking at, rather than what we were looking > at).
.. and just disabling interrupts isn't going to work? Ok sure there is an SMP issue, but a spinlock ought to be able to fix that properly, instead of something this evil....
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |