Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2011-08-24 15:29:06 -0400
committerJeff Mahoney <jeffm@suse.com>2011-08-24 15:29:06 -0400
commit7d43f4b6a85e98439b57b7f25ce76fe903291f52 (patch)
tree70d45f2db1ead8c6787e19702bbe62b258b34a87
parent70cadcd555c987b45aff248e6ac01cb720da9161 (diff)
- Refresh and re-enable patches.arch/x86_64-hpet-64bit-timer.patch.
-rw-r--r--patches.arch/x86_64-hpet-64bit-timer.patch61
-rw-r--r--series.conf2
2 files changed, 33 insertions, 30 deletions
diff --git a/patches.arch/x86_64-hpet-64bit-timer.patch b/patches.arch/x86_64-hpet-64bit-timer.patch
index d7b889c872..c0f89f0364 100644
--- a/patches.arch/x86_64-hpet-64bit-timer.patch
+++ b/patches.arch/x86_64-hpet-64bit-timer.patch
@@ -35,16 +35,19 @@ This patch allows the Timer0 to be configured in 64-bit mode
on x86_64 when a hpet64 command-line option is specified.
Updated-by: Jeff Mahoney <jeffm@suse.com>
+Updated-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
---
Documentation/kernel-parameters.txt | 2
- arch/x86/kernel/hpet.c | 88 ++++++++++++++++++++++++++++++++----
- 2 files changed, 81 insertions(+), 9 deletions(-)
+ arch/x86/kernel/hpet.c | 86 ++++++++++++++++++++++++++++++++----
+ 2 files changed, 80 insertions(+), 8 deletions(-)
---- a/Documentation/kernel-parameters.txt
-+++ b/Documentation/kernel-parameters.txt
-@@ -497,6 +497,8 @@ and is between 256 and 4096 characters.
+Index: linux-3.0-tmp-jikos/Documentation/kernel-parameters.txt
+===================================================================
+--- linux-3.0-tmp-jikos.orig/Documentation/kernel-parameters.txt
++++ linux-3.0-tmp-jikos/Documentation/kernel-parameters.txt
+@@ -494,6 +494,8 @@ bytes respectively. Such letter suffixes
Range: 0 - 8192
Default: 64
@@ -53,9 +56,11 @@ Signed-off-by: Jiri Bohac <jbohac@suse.cz>
com20020= [HW,NET] ARCnet - COM20020 chipset
Format:
<io>[,<irq>[,<nodeID>[,<backplane>[,<ckp>[,<timeout>]]]]]
---- a/arch/x86/kernel/hpet.c
-+++ b/arch/x86/kernel/hpet.c
-@@ -37,6 +37,7 @@ unsigned long hpet_address;
+Index: linux-3.0-tmp-jikos/arch/x86/kernel/hpet.c
+===================================================================
+--- linux-3.0-tmp-jikos.orig/arch/x86/kernel/hpet.c
++++ linux-3.0-tmp-jikos/arch/x86/kernel/hpet.c
+@@ -43,6 +43,7 @@ u8 hpet_msi_disable;
static unsigned long hpet_num_timers;
#endif
static void __iomem *hpet_virt_address;
@@ -63,7 +68,7 @@ Signed-off-by: Jiri Bohac <jbohac@suse.cz>
struct hpet_dev {
struct clock_event_device evt;
-@@ -59,6 +60,33 @@ static inline void hpet_writel(unsigned
+@@ -65,6 +66,33 @@ static inline void hpet_writel(unsigned
#ifdef CONFIG_X86_64
#include <asm/pgtable.h>
@@ -97,7 +102,7 @@ Signed-off-by: Jiri Bohac <jbohac@suse.cz>
#endif
static inline void hpet_set_mapping(void)
-@@ -103,6 +131,17 @@ static int __init disable_hpet(char *str
+@@ -109,6 +137,17 @@ static int __init disable_hpet(char *str
}
__setup("nohpet", disable_hpet);
@@ -115,15 +120,15 @@ Signed-off-by: Jiri Bohac <jbohac@suse.cz>
static inline int is_hpet_capable(void)
{
return !boot_hpet_disable && hpet_address;
-@@ -212,6 +251,7 @@ static void hpet_reserve_platform_timers
+@@ -218,6 +257,7 @@ static void hpet_reserve_platform_timers
* Common hpet info
*/
- static unsigned long hpet_period;
+ static unsigned long hpet_freq;
+static int hpet_legacy_use_64_bits; /* configure T0 in 64-bit mode? */
static void hpet_legacy_set_mode(enum clock_event_mode mode,
struct clock_event_device *evt);
-@@ -278,10 +318,38 @@ static void hpet_enable_legacy_int(void)
+@@ -283,10 +323,38 @@ static void hpet_enable_legacy_int(void)
hpet_legacy_int_enabled = 1;
}
@@ -161,8 +166,8 @@ Signed-off-by: Jiri Bohac <jbohac@suse.cz>
+ hpet_legacy_use_64_bits = timer0_use_64_bits();
/*
- * The mult factor is defined as (include/linux/clockchips.h)
-@@ -328,9 +396,10 @@ static void hpet_set_mode(enum clock_eve
+ * Start hpet with the boot cpu mask and make it
+@@ -318,9 +386,10 @@ static void hpet_set_mode(enum clock_eve
/* Make sure we use edge triggered interrupts */
cfg &= ~HPET_TN_LEVEL;
cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
@@ -175,16 +180,16 @@ Signed-off-by: Jiri Bohac <jbohac@suse.cz>
udelay(1);
/*
* HPET on AMD 81xx needs a second write (with HPET_TN_SETVAL
-@@ -339,7 +408,7 @@ static void hpet_set_mode(enum clock_eve
+@@ -329,7 +398,7 @@ static void hpet_set_mode(enum clock_eve
* (See AMD-8111 HyperTransport I/O Hub Data Sheet,
* Publication # 24674)
*/
-- hpet_writel((unsigned long) delta, HPET_Tn_CMP(timer));
+- hpet_writel((unsigned int) delta, HPET_Tn_CMP(timer));
+ hpet_write_value((unsigned long) delta, HPET_Tn_CMP(timer));
hpet_start_counter();
hpet_print_config();
break;
-@@ -347,7 +416,8 @@ static void hpet_set_mode(enum clock_eve
+@@ -337,7 +406,8 @@ static void hpet_set_mode(enum clock_eve
case CLOCK_EVT_MODE_ONESHOT:
cfg = hpet_readl(HPET_Tn_CFG(timer));
cfg &= ~HPET_TN_PERIODIC;
@@ -194,12 +199,13 @@ Signed-off-by: Jiri Bohac <jbohac@suse.cz>
hpet_writel(cfg, HPET_Tn_CFG(timer));
break;
-@@ -376,11 +446,11 @@ static void hpet_set_mode(enum clock_eve
+@@ -366,12 +436,12 @@ static void hpet_set_mode(enum clock_eve
static int hpet_next_event(unsigned long delta,
struct clock_event_device *evt, int timer)
{
- u32 cnt;
+ unsigned long cnt;
+ s32 res;
- cnt = hpet_readl(HPET_COUNTER);
+ cnt = hpet_read_value(HPET_COUNTER);
@@ -207,17 +213,14 @@ Signed-off-by: Jiri Bohac <jbohac@suse.cz>
- hpet_writel(cnt, HPET_Tn_CMP(timer));
+ hpet_write_value(cnt, HPET_Tn_CMP(timer));
- hpet_readl(HPET_Tn_CMP(timer)); /* pre-read for bnc#433746 */
/*
-@@ -388,9 +458,9 @@ static int hpet_next_event(unsigned long
- * what we wrote hit the chip before we compare it to the
- * counter.
+ * HPETs are a complete disaster. The compare register is
+@@ -395,7 +465,7 @@ static int hpet_next_event(unsigned long
+ * the event. The minimum programming delta for the generic
+ * clockevents code is set to 1.5 * HPET_MIN_CYCLES.
*/
-- WARN_ON_ONCE((u32)hpet_readl(HPET_Tn_CMP(timer)) != cnt);
-+ WARN_ON_ONCE((u32)hpet_readl(HPET_Tn_CMP(timer)) != (u32)cnt);
+- res = (s32)(cnt - hpet_readl(HPET_COUNTER));
++ res = (s32)((u32)cnt - (u32)hpet_readl(HPET_COUNTER));
-- return (s32)((u32)hpet_readl(HPET_COUNTER) - cnt) >= 0 ? -ETIME : 0;
-+ return (s32)((u32)hpet_readl(HPET_COUNTER) - (u32)cnt) >= 0 ? -ETIME : 0;
+ return res < HPET_MIN_CYCLES ? -ETIME : 0;
}
-
- static void hpet_legacy_set_mode(enum clock_event_mode mode,
diff --git a/series.conf b/series.conf
index 0cb1576968..cb8c3347d2 100644
--- a/series.conf
+++ b/series.conf
@@ -102,7 +102,7 @@
########################################################
# x86_64/i386 biarch
########################################################
-+needs_update-33 patches.arch/x86_64-hpet-64bit-timer.patch
+ patches.arch/x86_64-hpet-64bit-timer.patch
+needs_update patches.arch/kvm-split-paravirt-ops-by-functionality
+needs_update patches.arch/kvm-only-export-selected-pv-ops-feature-structs