mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>,
	Alek Du <alek.du@intel.com>, Alan Cox <alan@linux.intel.com>,
	Feng Tang <feng.tang@intel.com>
Subject: Re: [PATCH 1/2] v4 x86/mrst: add cpu type detection
Date: Tue, 18 May 2010 22:54:47 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1005182250460.3368@localhost.localdomain> (raw)
In-Reply-To: <1274184166-17242-2-git-send-email-jacob.jun.pan@linux.intel.com>

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

  reply	other threads:[~2010-05-18 20:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-18 12:02 [PATCH 0/2] v3 Moorestown clock related patches Jacob Pan
2010-05-18 12:02 ` [PATCH 1/2] v4 x86/mrst: add cpu type detection Jacob Pan
2010-05-18 20:54   ` Thomas Gleixner [this message]
2010-05-19  9:23     ` jacob pan
2010-05-19 10:19       ` Thomas Gleixner
2010-05-18 12:02 ` [PATCH 2/2] v4 x86/mrst: add more timer config options Jacob Pan
2010-05-18 20:50   ` Thomas Gleixner
2010-05-18 22:57     ` jacob pan
2010-05-18 23:00       ` Thomas Gleixner
2010-05-18 12:11 ` [PATCH 0/2] v3 Moorestown clock related patches jacob pan

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=alpine.LFD.2.00.1005182250460.3368@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=alan@linux.intel.com \
    --cc=alek.du@intel.com \
    --cc=feng.tang@intel.com \
    --cc=hpa@zytor.com \
    --cc=jacob.jun.pan@linux.intel.com \
    --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®