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] [IA64] Add localtime setting for PV/IA64

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] Add localtime setting for PV/IA64 domain
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Feb 2007 09:50:16 -0800
Delivery-date: Fri, 23 Feb 2007 09:50:48 -0800
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 awilliam@xxxxxxxxxxxx
# Date 1171300006 25200
# Node ID 5982d478698fd97099635feef97531d60ed6f0ae
# Parent  46a8d51134d0603f3db6b6c55ac048afc04839d8
[IA64] Add localtime setting for PV/IA64 domain

Signed-off-by: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/fw_emul.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+)

diff -r 46a8d51134d0 -r 5982d478698f xen/arch/ia64/xen/fw_emul.c
--- a/xen/arch/ia64/xen/fw_emul.c       Mon Feb 12 10:02:10 2007 -0700
+++ b/xen/arch/ia64/xen/fw_emul.c       Mon Feb 12 10:06:46 2007 -0700
@@ -33,6 +33,7 @@
 #include <xen/console.h>
 #include <xen/hypercall.h>
 #include <xen/softirq.h>
+#include <xen/time.h>
 
 static DEFINE_SPINLOCK(efi_time_services_lock);
 
@@ -675,6 +676,9 @@ efi_emulate_get_time(
        struct page_info *tv_page = NULL;
        struct page_info *tc_page = NULL;
        efi_status_t status = 0;
+       efi_time_t *tvp;
+       struct tm timeptr;
+       unsigned long xtimesec;
 
        tv = efi_translate_domain_addr(tv_addr, fault, &tv_page);
        if (*fault != IA64_NO_FAULT)
@@ -687,6 +691,17 @@ efi_emulate_get_time(
 
        spin_lock(&efi_time_services_lock);
        status = (*efi.get_time)((efi_time_t *) tv, (efi_time_cap_t *) tc);
+       tvp = (efi_time_t *)tv;
+       xtimesec = mktime(tvp->year, tvp->month, tvp->day, tvp->hour,
+                         tvp->minute, tvp->second);
+       xtimesec += current->domain->time_offset_seconds;
+       timeptr = gmtime(xtimesec);
+       tvp->second = timeptr.tm_sec;
+       tvp->minute = timeptr.tm_min;
+       tvp->hour   = timeptr.tm_hour;
+       tvp->day    = timeptr.tm_mday;
+       tvp->month  = timeptr.tm_mon + 1;
+       tvp->year   = timeptr.tm_year + 1900;
        spin_unlock(&efi_time_services_lock);
 
 errout:

_______________________________________________
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] [IA64] Add localtime setting for PV/IA64 domain, Xen patchbot-unstable <=