ppc: Improve emulation of THRM registers
commitf0278900d38b2d8d9531c484bd088d9a7d5d4ea2
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 20 Jun 2016 01:27:14 +0000 (20 11:27 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 22 Jun 2016 01:12:17 +0000 (22 11:12 +1000)
tree87f334374778673b1f16d31fed49195d8eff6cc4
parent820724d170dd97bd216810c6965ee1ebd0ba01e8
ppc: Improve emulation of THRM registers

The 75x and 74xx processors have some thermal monitoring SPRs that
some OSes such as MacOS do use. Our current "dumb" implementation
isn't good enough and will cause some versions of MacOS to hang during
boot.

This lifts an improved emulation from MacOnLinux and adapts it to
qemu, thus fixing the problem.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[dwg: Fixed typo in comment, a number of minor checkpatch warnings,
 and a compile failure with CONFIG_USER_ONLY]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target-ppc/helper.h
target-ppc/misc_helper.c
target-ppc/translate_init.c