Re: [PATCH] x86 (64): make calibrate_APIC_clock() SMI-safe (take 3)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Martin Wilck
Date: Friday, July 25, 2008 - 7:01 am

Cyrill Gorcunov wrote:


The patch would still be needed. Just the reported failure of my 
simplified patch on the old kernel would not have occurred in the 
current kernel. IOW, the patch is fine for the current kernel, but not 
for the old one.


The problem was not that the divisor 16 was used for the counter speed 
(APIC_TDR_DIV_16), but that the old code set the counter start value to 
(250000000/16) rather than just 250000000. That means the counter will 
underflow earlier.

I am attaching a "take 3" patch which minimizes the risk of an underflow 
by using the maximum possible initial value for the APIC timer.

Martin

-- 
Martin Wilck
PRIMERGY System Software Engineer
FSC IP ESP DEV 6

Fujitsu Siemens Computers GmbH
Heinz-Nixdorf-Ring 1
33106 Paderborn
Germany

Tel:			++49 5251 8 15113
Fax:			++49 5251 8 20209
Email:			mailto:martin.wilck@fujitsu-siemens.com
Internet:		http://www.fujitsu-siemens.com
Company Details:	http://www.fujitsu-siemens.com/imprint.html
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] x86 (64): make calibrate_APIC_clock() smp-safe, Martin Wilck, (Thu Jul 24, 3:47 am)
Re: [PATCH] x86 (64): make calibrate_APIC_clock() smp-safe, Cyrill Gorcunov, (Thu Jul 24, 4:16 am)
Re: [PATCH] x86 (64): make calibrate_APIC_clock() smp-safe, Cyrill Gorcunov, (Thu Jul 24, 5:05 am)
Re: [PATCH] x86 (64): make calibrate_APIC_clock() smp-safe, H. Peter Anvin, (Thu Jul 24, 6:31 am)
Re: [PATCH] x86 (64): make calibrate_APIC_clock() SMI-safe, Cyrill Gorcunov, (Thu Jul 24, 7:31 am)
Re: [PATCH] x86 (64): make calibrate_APIC_clock() SMI-safe, Cyrill Gorcunov, (Thu Jul 24, 8:01 am)
Re: [PATCH] x86 (64): make calibrate_APIC_clock() SMI-safe ..., Martin Wilck, (Fri Jul 25, 7:01 am)