PPC64: Fix timebase
authorAlexander Graf <agraf@suse.de>
Mon, 21 Dec 2009 11:24:17 +0000 (12:24 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Mon, 21 Dec 2009 12:42:37 +0000 (13:42 +0100)
commitfdb40e9a63ec610fee99a5be7d5a4544e23d6d98
tree7ce782d8d043830083b0aed139da7f28ea591383
parentd72b098b9fdd6e61a98fd1c3bacd43035e7affda
PPC64: Fix timebase

On PPC we have a 64-bit time base. Usually (PPC32) this is accessed using
two separate 32 bit SPR accesses to SPR_TBU and SPR_TBL.

On PPC64 the SPR_TBL register acts as 64 bit though, so we get the full
64 bits as return value. If we only take the lower ones, fine. But Linux
wants to see all 64 bits or it breaks.

This patch makes PPC64 Linux work even after TB crossed the 32-bit boundary,
which usually happened a few seconds after bootup.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
darwin-user/main.c
hw/ppc.c
linux-user/main.c
target-ppc/cpu.h
target-ppc/op_helper.c