[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH qom-cpu v2 19/29] cpu: Replace cpu_si
From: |
Richard Henderson |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH qom-cpu v2 19/29] cpu: Replace cpu_single_env with CPUState cpu_single_cpu |
Date: |
Mon, 17 Jun 2013 13:40:53 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130514 Thunderbird/17.0.6 |
On 06/16/2013 08:57 AM, Andreas Färber wrote:
> diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c
> index 207dcad..f0b1f6f 100644
> --- a/hw/alpha/typhoon.c
> +++ b/hw/alpha/typhoon.c
> @@ -72,9 +72,8 @@ static void cpu_irq_change(AlphaCPU *cpu, uint64_t req)
>
> static uint64_t cchip_read(void *opaque, hwaddr addr, unsigned size)
> {
> - CPUAlphaState *env = cpu_single_env;
> + CPUState *cpu = cpu_single_cpu;
> TyphoonState *s = opaque;
> - CPUState *cpu;
> uint64_t ret = 0;
>
> if (addr & 4) {
> @@ -95,7 +94,6 @@ static uint64_t cchip_read(void *opaque, hwaddr addr,
> unsigned size)
>
> case 0x0080:
> /* MISC: Miscellaneous Register. */
> - cpu = ENV_GET_CPU(env);
> ret = s->cchip.misc | (cpu->cpu_index & 3);
> break;
>
> @@ -197,8 +195,7 @@ static uint64_t cchip_read(void *opaque, hwaddr addr,
> unsigned size)
> break;
>
> default:
> - cpu = CPU(alpha_env_get_cpu(cpu_single_env));
> - cpu_unassigned_access(cpu, addr, false, false, 0, size);
> + cpu_unassigned_access(cpu_single_cpu, addr, false, false, 0, size);
Keep using the local "cpu" variable?
r~