Andrew Morton wrote: >Corey Minyard wrote: > > >>This patch fixes a race between the CMOS clock setting and the NMI >> code. The NMI code indiscriminatly sets index registers and values >> in the same place the CMOS clock is set. If you are setting the >> CMOS clock and an NMI occurs, Bad values could be written to or >> read from the CMOS RAM, or the NMI operation might not occur >> correctly. >> >> Fixing this requires creating a special lock so the NMI code can >> know its CPU owns the lock an "do the right thing" in that case. >> >> > >hm, tricky patch. I can't see any holes in it. The volatile variable is >awkward but should be OK on x86 and I can see the need for it. > >There's a preposterous amount of inlining happening in this code. Hence >your patch took the size of drivers/char/rtc.o from > > text data bss dec hex filename > 3657 540 8 4205 106d drivers/char/rtc.o >to > 5419 540 8 5967 174f drivers/char/rtc.o > >Do you think you could take a look at uninlining everything sometime? > > Ok, done. With the attached patch I get ~2300 bytes less text in that file. It makes CMOS_READ and CMOS_WRITE functions. They were used all over the place in drivers/char/rtc.o, and the extra locking stuff took a lot of space. I also fixed some comment grammer and I discovered that linux/smp.h needed to be included, since smp_processor_id() was being called. -Corey