lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1005182240480.3368@localhost.localdomain>
Date:	Tue, 18 May 2010 22:50:37 +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 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
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ