Re: [PATCH 2/2] v4 x86/mrst: add more timer config options
From: Thomas Gleixner
Date: Tue May 18 2010 - 16:50:56 EST
On Tue, 18 May 2010, Jacob Pan wrote:
> Always-on local APIC timer (ARAT) has been introduced to Medfield, along
> with the platform APB timers we have more timer configuration options
> between Moorestown and Medfield.
>
> +/**
Do not use kerneldoc /** opener from plain comments. Randy
complained about that yesterday already
> void __init mrst_time_init(void)
> {
> + switch (mrst_timer_options) {
> + case MRST_TIMER_APBT_ONLY:
> + pr_info("Use APB timer option on Moorestown\n");
Do we really need all this pr_info spew ? /proc/timer_list will tell
you if you're interested
> + break;
> + case MRST_TIMER_LAPIC_APBT:
> + pr_info("Use LAPIC and APB timer option on Moorestown\n");
> + x86_init.timers.setup_percpu_clockev = setup_boot_APIC_clock;
> + x86_cpuinit.setup_percpu_clockev = setup_secondary_APIC_clock;
> + break;
> + default:
> + pr_info("Use default timer option on Moorestown\n");
And this printk is completely useless. It'd be way more interesting
to see which timer gets selected as a default. but see above
> + if (mrst_identify_cpu() == MRST_CPU_CHIP_PENWELL) {
Why do you want to pin that on PENWELL and not on ARAT ? If you
check ARAT, you have coverd all next gen cpus as well.
> + x86_init.timers.setup_percpu_clockev =
> + setup_boot_APIC_clock;
> + x86_cpuinit.setup_percpu_clockev =
> + setup_secondary_APIC_clock;
> + return;
> + }
You can avoid that line splits by doing:
if (!has(ARAT))
break:
x86_init.timers. ...
...
return;
Way easier to read.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/