lkml.org 
[lkml]   [2010]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 2/4] x86: Do not use hpet MSI as clockevent broadcast device
Current kernel uses hpet MSI interrupts as both percpu clockevent device
and also as clockevent broadcast device in place of IRQ0 timer.
There seems to be issues with HPET MSI usage on some platforms. So,
restrict it to be only used as a percpu clockevent device.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
---
arch/x86/kernel/hpet.c | 2 +-
include/linux/clockchips.h | 2 ++
kernel/time/tick-broadcast.c | 3 ++-
3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index ba6e658..dd9370b 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -556,7 +556,7 @@ static void init_one_hpet_msi_clockevent(struct hpet_dev *hdev, int cpu)
evt->irq = hdev->irq;

evt->rating = 110;
- evt->features = CLOCK_EVT_FEAT_ONESHOT;
+ evt->features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_NO_BROADCAST;
if (hdev->flags & HPET_DEV_PERI_CAP)
evt->features |= CLOCK_EVT_FEAT_PERIODIC;

diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 0cf725b..5352187 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -50,9 +50,11 @@ enum clock_event_nofitiers {
*
* - Clockevent source stops in C3 State and needs broadcast support.
* - Local APIC timer is used as a dummy device.
+ * - Do not use this device as a broadcast device.
*/
#define CLOCK_EVT_FEAT_C3STOP 0x000004
#define CLOCK_EVT_FEAT_DUMMY 0x000008
+#define CLOCK_EVT_FEAT_NO_BROADCAST 0x000010

/**
* struct clock_event_device - clock event device descriptor
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index b3bafd5..113f954 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -69,7 +69,8 @@ int tick_check_broadcast_device(struct clock_event_device *dev)
{
if ((tick_broadcast_device.evtdev &&
tick_broadcast_device.evtdev->rating >= dev->rating) ||
- (dev->features & CLOCK_EVT_FEAT_C3STOP))
+ dev->features & CLOCK_EVT_FEAT_C3STOP ||
+ dev->features & CLOCK_EVT_FEAT_NO_BROADCAST)
return 0;

clockevents_exchange_device(NULL, dev);
--
1.6.0.6
--



\
 
 \ /
  Last update: 2010-01-15 02:57    [W:0.059 / U:1.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site