WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Remove 'hpet_force' option. Replace with

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Remove 'hpet_force' option. Replace with 'clocksource' option to allow
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Jun 2007 03:16:14 -0700
Delivery-date: Mon, 04 Jun 2007 03:30:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1180546161 -3600
# Node ID c9d66baad22b6f4cfd644b1272a8506372bb2947
# Parent  2d7d33ac982a0720408d841b13c3b97a2190eae4
Remove 'hpet_force' option. Replace with 'clocksource' option to allow
forced selection of platform clocksource, overriding the default
priority ordering.

Usage: clocksource={pit,hpet,cyclone,acpi}

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/time.c |   37 ++++++++++++++++++++++++-------------
 1 files changed, 24 insertions(+), 13 deletions(-)

diff -r 2d7d33ac982a -r c9d66baad22b xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Wed May 30 18:12:02 2007 +0100
+++ b/xen/arch/x86/time.c       Wed May 30 18:29:21 2007 +0100
@@ -31,10 +31,9 @@
 #include <asm/hpet.h>
 #include <io_ports.h>
 
-/* opt_hpet_force: If true, force HPET configuration via PCI space. */
-/* NB. This is a gross hack. Mainly useful for HPET testing. */
-static int opt_hpet_force = 0;
-boolean_param("hpet_force", opt_hpet_force);
+/* opt_clocksource: Force clocksource to one of: pit, hpet, cyclone, acpi. */
+static char opt_clocksource[10];
+string_param("clocksource", opt_clocksource);
 
 #define EPOCH MILLISECS(1000)
 
@@ -357,15 +356,6 @@ static int init_hpet(void)
     u32 hpet_id, hpet_period, cfg;
     int i;
 
-    if ( (hpet_address == 0) && opt_hpet_force )
-    {
-        outl(0x800038a0, 0xcf8);
-        outl(0xff000001, 0xcfc);
-        outl(0x800038a0, 0xcf8);
-        hpet_address = inl(0xcfc) & 0xfffffffe;
-        printk("WARNING: Forcibly enabled HPET at %#lx.\n", hpet_address);
-    }
-
     if ( hpet_address == 0 )
         return 0;
 
@@ -603,6 +593,27 @@ static void platform_time_calibration(vo
 
 static void init_platform_timer(void)
 {
+    if ( opt_clocksource[0] != '\0' )
+    {
+        int rc = -1;
+
+        if ( !strcmp(opt_clocksource, "pit") )
+            rc = (init_pit(), 1);
+        else if ( !strcmp(opt_clocksource, "hpet") )
+            rc = init_hpet();
+        else if ( !strcmp(opt_clocksource, "cyclone") )
+            rc = init_cyclone();
+        else if ( !strcmp(opt_clocksource, "acpi") )
+            rc = init_pmtimer();
+
+        if ( rc == 1 )
+            return;
+
+        printk("WARNING: %s clocksource '%s'.\n",
+               (rc == 0) ? "Could not initialise" : "Unrecognised",
+               opt_clocksource);
+    }
+
     if ( !init_cyclone() && !init_hpet() && !init_pmtimer() )
         init_pit();
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Remove 'hpet_force' option. Replace with 'clocksource' option to allow, Xen patchbot-unstable <=