From: tip-bot for Pierre Tardy <pierre.tardy@intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
johnstul@us.ibm.com, bunk@stusta.de, pierre.tardy@intel.com,
arjan@infradead.org, suresh.b.siddha@intel.com,
zippel@linux-m68k.org, tglx@linutronix.de, ak@suse.de,
hpa@linux.intel.com, mingo@elte.hu
Subject: [tip:x86/urgent] x86, lapic-timer: Increase the max_delta to 31 bits
Date: Mon, 10 Jan 2011 08:39:50 GMT [thread overview]
Message-ID: <tip-4aed89d6b515b9185351706ca95cd712c9d8d6a3@git.kernel.org> (raw)
In-Reply-To: <1294327409-19426-1-git-send-email-pierre.tardy@intel.com>
Commit-ID: 4aed89d6b515b9185351706ca95cd712c9d8d6a3
Gitweb: http://git.kernel.org/tip/4aed89d6b515b9185351706ca95cd712c9d8d6a3
Author: Pierre Tardy <pierre.tardy@intel.com>
AuthorDate: Thu, 6 Jan 2011 16:23:29 +0100
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 10 Jan 2011 09:36:49 +0100
x86, lapic-timer: Increase the max_delta to 31 bits
Latest atom socs(penwell) does not have hpet timer.
As their local APIC timer is clocked at 400KHZ, and the current
code limit their Initial Counter register to 23 bits, they
cannot sleep more than 1.34 seconds which leads to ~2 spurious
wakeup per second (1 per thread)
These SOCs support 32bit timer so we change the max_delta to at
least 31bits. So we can at least sleep for 300 seconds.
We could not find any previous chip errata where lapic would
only have 23 bit precision As powertop is suggesting to activate
HPET to "sleep longer", this could mean this problem is already
known.
Problem is here since very first implementation of lapic timer
as a clock event e9e2cdb [PATCH] clockevents: i386 drivers.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Adrian Bunk <bunk@stusta.de>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Andi Kleen <ak@suse.de>
LKML-Reference: <1294327409-19426-1-git-send-email-pierre.tardy@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/apic/apic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index ce65d44..1efd378 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -684,7 +684,7 @@ static int __init calibrate_APIC_clock(void)
lapic_clockevent.mult = div_sc(delta, TICK_NSEC * LAPIC_CAL_LOOPS,
lapic_clockevent.shift);
lapic_clockevent.max_delta_ns =
- clockevent_delta2ns(0x7FFFFF, &lapic_clockevent);
+ clockevent_delta2ns(0x7FFFFFFF, &lapic_clockevent);
lapic_clockevent.min_delta_ns =
clockevent_delta2ns(0xF, &lapic_clockevent);
prev parent reply other threads:[~2011-01-10 8:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-06 15:23 [PATCH] lapic-timer: increase the max_delta to 31 bits Pierre Tardy
2011-01-10 8:36 ` Thomas Gleixner
2011-01-10 8:39 ` tip-bot for Pierre Tardy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-4aed89d6b515b9185351706ca95cd712c9d8d6a3@git.kernel.org \
--to=pierre.tardy@intel.com \
--cc=ak@suse.de \
--cc=arjan@infradead.org \
--cc=bunk@stusta.de \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=zippel@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox