On Thu, 21 Jul 2011 20:59:40 +0200
Alexander Graf wrote:
> >> +uint32_t kvmppc_get_clockfreq(void)
> >> +{
> >> +char buf[512];
> >> +uint32_t tb;
> >> +FILE *f;
> >> +int len;
> >> +
> >> +if (kvmppc_find_cpu_dt(buf, sizeof(buf))) {
> >> +return 0;
> >> +}
> >> +
Am 21.07.2011 um 19:51 schrieb Scott Wood :
> On Thu, 21 Jul 2011 03:27:25 +0200
> Alexander Graf wrote:
>
>> +/* Try to find a device tree node for a CPU with clock-frequency property */
>> +static int kvmppc_find_cpu_dt(char *buf, int buf_len)
>> +{
>> +struct dirent *dirp;
>> +DIR
On Thu, 21 Jul 2011 03:27:25 +0200
Alexander Graf wrote:
> +/* Try to find a device tree node for a CPU with clock-frequency property */
> +static int kvmppc_find_cpu_dt(char *buf, int buf_len)
> +{
> +struct dirent *dirp;
> +DIR *dp;
> +
> +if ((dp = opendir(PROC_DEVTREE_CPU)) == NUL
We need to find out the host's clock-frequency when running on KVM, so
let's export a respective function.
Signed-off-by: Alexander Graf
---
target-ppc/kvm.c | 65 ++
target-ppc/kvm_ppc.h |1 +
2 files changed, 66 insertions(+), 0 deletio