OSDN Git Service

pseries: Implement set-time-of-day RTAS function
authorBreno Leitao <brenohl@br.ibm.com>
Wed, 28 Sep 2011 16:53:16 +0000 (16:53 +0000)
committerAlexander Graf <agraf@suse.de>
Thu, 6 Oct 2011 07:48:09 +0000 (09:48 +0200)
commitac26f8c3891dde7a3fc7f24a3a87905df843d905
tree094e85b6026005b5df614a9921089fd15432e84c
parente6c866d417d1a09536f489e66c21cf49b7ec60b6
pseries: Implement set-time-of-day RTAS function

Currently there is no implementation for set-time-of-day rtas function,
which causes the following warning "setting the clock failed (-1)" on
the guest.

This patch just creates this function, get the timedate diff and store in
the papr environment, so that the correct value will be returned by
get-time-of-day.

In order to try it, just adjust the hardware time, run hwclock --systohc,
so that, on when the system runs hwclock --hctosys, the value is correctly
adjusted, i.e. the host time plus the timediff.

Signed-off-by: Breno Leitao <brenohl@br.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/spapr.h
hw/spapr_rtas.c