[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH target-arm v8 1/1] target-arm: Implements the AR
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH target-arm v8 1/1] target-arm: Implements the ARM PMCCNTR register |
Date: |
Tue, 25 Feb 2014 15:43:57 +0000 |
On 21 February 2014 01:07, Alistair Francis <address@hidden> wrote:
> This patch implements the ARM PMCCNTR register including
> the disable and reset components of the PMCR register.
>
> Signed-off-by: Alistair Francis <address@hidden>
> ---
> @@ -478,9 +485,42 @@ static CPAccessResult pmreg_access(CPUARMState *env,
> const ARMCPRegInfo *ri)
> static void pmcr_write(CPUARMState *env, const ARMCPRegInfo *ri,
> uint64_t value)
> {
> + /* Don't computer the number of ticks in user mode */
> + #ifndef CONFIG_LINUX_USER
> + uint32_t temp_ticks;
> +
> + temp_ticks = qemu_clock_get_us(QEMU_CLOCK_VIRTUAL) *
> + get_ticks_per_sec() / 1000000;
This isn't what I asked for.
1. you want CONFIG_USER_ONLY, not CONFIG_LINUX_USER
2. just put one set of #ifdefs to encompass the entire set
of functions
3. don't define a reginfo entry for the register at all if
we're CONFIG_USER_ONLY
None of this stuff can be accessed from user mode in
Linux so that will work fine.
thanks
-- PMM