Messages in this thread | | | Subject | Re: [git pull] x86: declaration fixes | From | Jaswinder Singh <> | Date | Tue, 22 Jul 2008 08:48:35 +0530 |
| |
Hello Ingo,
On Mon, 2008-07-21 at 20:04 +0200, Ingo Molnar wrote: > * Jaswinder Singh <jaswinder@infradead.org> wrote: > > > Hello Ingo, > > > > 2. [PATCH] x86: process_32.c declare cpu_number before they get used > > why is cpu_number moved over from smp.h to current.h? I think it's more > logical in smp.h. If it's missing somewhere then add an #include > <asm/smp.h> to that file? >
Because cpu_number is used by everyone independent of smp.
In smp.h It was declared under #ifdef CONFIG_X86_32_SMP which was wrong.
> also, this change: > > +++ b/include/linux/timer.h > @@ -6,6 +6,10 @@ > #include <linux/stddef.h> > #include <linux/debugobjects.h> > > +#ifdef CONFIG_X86 > +#include <asm/timer.h> > +#endif /* CONFIG_X86 */ > > is not really acceptable in a generic header, nor is: > > --- a/include/linux/syscalls.h > +++ b/include/linux/syscalls.h > @@ -65,6 +67,10 @@ struct getcpu_cache; > #include <linux/quota.h> > #include <linux/key.h> > > +#ifdef CONFIG_X86 > +#include <asm/syscalls.h> > +#endif /* CONFIG_X86 */ > > i'd suggest we just do asm-x86/syscall.h and asm-x86/timer.h changes and > add #include <asm/syscall.h> and #include <asm/timer.h> to the affected > x86 .c files. Once every architecture has it, linux/syscall.h can be > extended with an unconditional asm/syscall.h include. >
Because checkpatch.pl raise objection for it.
$ ./scripts/checkpatch.pl ../test.patch WARNING: Use #include <linux/timer.h> instead of <asm/timer.h> #9: FILE: arch/x86/kernel/time_32.c:40: +#include <asm/timer.h>
> +#ifdef CONFIG_X86_32 > extern int timer_ack; > -extern int no_timer_check; > extern int recalibrate_cpu_khz(void); > +#endif /* CONFIG_X86_32 */ > + > +extern int no_timer_check; > > hm, why was this needed? >
Because timer_ack is only required for X86_32 and int recalibrate_cpu_khz(void) is declared inside #ifdef CONFIG_X86_32 in arch/x86/kernel/tsc.c
Thank you,
Jaswinder Singh.
-- 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/
| |