From: Jaswinder Singh <jaswinder@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [git pull] x86: declaration fixes
Date: Tue, 22 Jul 2008 08:48:35 +0530 [thread overview]
Message-ID: <1216696715.2823.9.camel@jaswinder.satnam> (raw)
In-Reply-To: <20080721180439.GA13720@elte.hu>
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.
next prev parent reply other threads:[~2008-07-22 3:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-21 17:47 Jaswinder Singh
2008-07-21 18:04 ` Ingo Molnar
2008-07-22 3:18 ` Jaswinder Singh [this message]
2008-07-22 5:57 ` Jaswinder Singh
2008-07-22 19:36 Jaswinder Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1216696715.2823.9.camel@jaswinder.satnam \
--to=jaswinder@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®