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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1250286063.11545.43904.camel@localhost.localdomain>
Date:	Fri, 14 Aug 2009 14:41:03 -0700
From:	"Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com>
To:	"Li, Shaohua" <shaohua.li@...el.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...e.hu" <mingo@...e.hu>
Subject: Re: [PATCH] disable per-cpu hpet timer if ARAT is supported

Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@...el.com>


On Tue, 2009-08-11 at 20:16 -0700, Li, Shaohua wrote:
> If CPU support always running local APIC timer, per-cpu hpet timer could be
> disabled, which is useless and wasteful in such case. Let's leave the timers
> to others.
> Impact: should have no impact except reserving less timers.
> 
> Signed-off-by: Shaohua Li <shaohua.li@...el.com>
> diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
> index dedc2bd..5969e10 100644
> --- a/arch/x86/kernel/hpet.c
> +++ b/arch/x86/kernel/hpet.c
> @@ -584,6 +584,8 @@ static void hpet_msi_capability_lookup(unsigned int start_timer)
>  	unsigned int num_timers_used = 0;
>  	int i;
>  
> +	if (boot_cpu_has(X86_FEATURE_ARAT))
> +		return;
>  	id = hpet_readl(HPET_ID);
>  
>  	num_timers = ((id & HPET_ID_NUMBER) >> HPET_ID_NUMBER_SHIFT);
> @@ -872,10 +874,8 @@ int __init hpet_enable(void)
>  
>  	if (id & HPET_ID_LEGSUP) {
>  		hpet_legacy_clockevent_register();
> -		hpet_msi_capability_lookup(2);
>  		return 1;
>  	}
> -	hpet_msi_capability_lookup(0);
>  	return 0;
>  
>  out_nohpet:
> @@ -908,9 +908,17 @@ static __init int hpet_late_init(void)
>  	if (!hpet_virt_address)
>  		return -ENODEV;
>  
> +	if (hpet_readl(HPET_ID) & HPET_ID_LEGSUP)
> +		hpet_msi_capability_lookup(2);
> +	else
> +		hpet_msi_capability_lookup(0);
> +
>  	hpet_reserve_platform_timers(hpet_readl(HPET_ID));
>  	hpet_print_config();
>  
> +	if (boot_cpu_has(X86_FEATURE_ARAT))
> +		return 0;
> +
>  	for_each_online_cpu(cpu) {
>  		hpet_cpuhp_notify(NULL, CPU_ONLINE, (void *)(long)cpu);
>  	}

--
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