[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1005182250460.3368@localhost.localdomain>
Date: Tue, 18 May 2010 22:54:47 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Jacob Pan <jacob.jun.pan@...ux.intel.com>
cc: LKML <linux-kernel@...r.kernel.org>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...e.hu>,
Alek Du <alek.du@...el.com>, Alan Cox <alan@...ux.intel.com>,
Feng Tang <feng.tang@...el.com>
Subject: Re: [PATCH 1/2] v4 x86/mrst: add cpu type detection
On Tue, 18 May 2010, Jacob Pan wrote:
>
> +int mrst_identify_cpu(void)
> +{
> + u32 mrst_cpu_chip;
> +
> + if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 0x27)
> + mrst_cpu_chip = MRST_CPU_CHIP_PENWELL;
> + else if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 0x26)
> + mrst_cpu_chip = MRST_CPU_CHIP_LINCROFT;
> + else {
> + pr_err("Unknown Moorestown CPU (%d:%d), default to Lincroft\n",
> + boot_cpu_data.x86, boot_cpu_data.x86_model);
> + mrst_cpu_chip = MRST_CPU_CHIP_LINCROFT;
> + }
> + pr_debug("Moorestown CPU %s identified\n",
> + (mrst_cpu_chip == MRST_CPU_CHIP_LINCROFT) ?
> + "Lincroft" : "Penwell");
Do you really want a printk for each call ?
Aside of that wouldn't it make more sense to do the chip
identification only once from mrst_init() and cache the result and
change mrst_identify_cpu()
int mrst_indetify_cpu(void)
{
return mrst_cpu_chip;
}
EXPORT_SYMBOL_GPL(mrst_identify_cpu);
I think one of your earlier versions did that, but was not consistent
in it's behaviour.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists