From: Jaswinder Singh Rajput <jaswinder@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: x86 maintainers <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip] x86: cpu_debug.c prepare report if files are inappropriate or CPU is not supported
Date: Tue, 14 Apr 2009 22:31:21 +0530 [thread overview]
Message-ID: <1239728481.2966.21.camel@ht.satnam> (raw)
In-Reply-To: <20090414165052.GA2089@elte.hu>
On Tue, 2009-04-14 at 18:50 +0200, Ingo Molnar wrote:
> * Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
>
> > + if (!per_cpu(cpu_modelflag, cpu))
>
> hm, on a second look - the whole cpu_model / cpu_modelflag
> business in arch/x86/kernel/cpu/cpu_debug.c looks
> over-complicated and broken. You encode it into a
> 'modelflag':
>
> per_cpu(cpu_model, cpu) = ((cpui->x86_vendor << 16) |
> (cpui->x86 << 8) |
> (cpui->x86_model));
>
> just to decode it later on:
>
> flag = per_cpu(cpu_model, cpu);
>
> switch (flag >> 16) {
>
> That does not make much sense. Please use a proper
> boot_cpu_data.x86_vendor switch() statement, ok?
>
I am using flags for each cpu, in case there are different CPU in the
sockets:
struct cpuinfo_x86 *cpui;
cpui = &cpu_data(cpu);
Do you still think that boot_cpu_data.x86_vendor is better option in
case for multiple CPUs.
--
JSR
next prev parent reply other threads:[~2009-04-14 17:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-14 16:07 [PATCH -tip] x86: cpu_debug.c prepare report if files are inappropriate or CPU is not supported Jaswinder Singh Rajput
2009-04-14 16:50 ` Ingo Molnar
2009-04-14 17:01 ` Jaswinder Singh Rajput [this message]
2009-04-14 18:42 ` Ingo Molnar
2009-04-14 18:54 ` Jaswinder Singh Rajput
2009-04-14 19:02 ` Alan Cox
2009-04-14 19:16 ` Ingo Molnar
2009-04-15 5:34 ` Jaswinder Singh Rajput
2009-04-15 10:17 ` Ingo Molnar
2009-06-05 17:57 ` Jaswinder Singh Rajput
2009-06-06 10:21 ` Jaswinder Singh Rajput
2009-06-07 10:20 ` Ingo Molnar
2009-06-07 12:16 ` [tip:x86/cpu] x86: cpu_debug: Remove model information to reduce encoding-decoding tip-bot for Jaswinder Singh Rajput
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=1239728481.2966.21.camel@ht.satnam \
--to=jaswinder@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.