qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] tests: add XSCOM tests for the PowerNV mach


From: Cédric Le Goater
Subject: Re: [Qemu-devel] [PATCH 3/3] tests: add XSCOM tests for the PowerNV machine
Date: Mon, 14 Nov 2016 09:41:03 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

> +static uint64_t pnv_xscom_addr(const PnvChip *chip, uint32_t pcba)
> +{
> +    uint64_t addr = chip->xscom_base;
> +
> +    if (chip->chip_type == PNV_CHIP_POWER9) {
> +        return addr | ((uint64_t) pcba << 3);
> +    } else {
> +        return addr | (((uint64_t) pcba << 4) & ~0xfful) |

This should be '~0xffull' on 32bit systems. I will send a v2 including 
a change to replace hweight_long() by ctpop64() in pnv.c

Thanks,

C. 

> +            (((uint64_t) pcba << 3) & 0x78);
> +    }
> +}
> +




reply via email to

[Prev in Thread] Current Thread [Next in Thread]