lkml.org 
[lkml]   [2010]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] v4 x86/mrst: add more timer config options
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


\
 
 \ /
  Last update: 2010-05-18 22:53    [W:0.073 / U:1.016 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site