Messages in this thread | | | Date | Wed, 15 Jun 2005 13:33:38 -0700 | From | Andrew Morton <> | Subject | Re: [patch 1/2] pcspeaker driver update |
| |
Stas Sergeev <stsp@aknet.ru> wrote: > > Andrew Morton wrote: > >> Attached one is just a clean-up: > >> it removes the extern definitions > >> for the i8253_lock and i8259A_lock, > >> making the use of the appropriate > >> headers instead. > > A nice cleanup to make, however we cannot include asm/timer.h from generic > > code, because only a few architectures have such a file. > OK, what a bugger... > Does the attached one look any better?
Well not really - for example you now have drivers/input/joystick/analog.c including asm/8253pit.h, which not all architectures implement.
The basic problem is that we have generic code referring to an x86-specific lock inside `#ifdef __i386__'.
Perhaps what you could do is to declare those locks in include/asm-i386/hardirq.h and then make sure that all the relevant files include <linux/hardirq.h>. That's a bit of an abuse of hardirq.h, but we don't have a generic "platform.h" place to put things like this.
If abusing hardirq.h offends you then you could make sure that all architectures implement asm/rtc.h (most already do) (just copy include/asm-alpha/rtc.h) and put the declarations in include/asm-i386/rtc.h, which is more appropriate.
Whichever way you go, please check that x86_64 works OK too. - 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/
| |