[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 24/33] leon3: use qemu_irq framework instead of callback a
From: |
Peter Maydell |
Subject: |
Re: [PATCH v3 24/33] leon3: use qemu_irq framework instead of callback as property |
Date: |
Mon, 18 Nov 2019 15:34:43 +0000 |
On Wed, 23 Oct 2019 at 18:34, Marc-André Lureau
<address@hidden> wrote:
>
> "set_pin_in" property is used to define a callback mechanism where the
> device says "call the callback function, passing it an opaque cookie
> and a 32-bit value". We already have a generic mechanism for doing
> that, which is the qemu_irq. So we should just use that.
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
This is probably a good place to put a comment:
/*
* This device assumes that the incoming 'level' value on the
* qemu_irq is the interrupt number, not just a simple 0/1 level.
*/
> -static void leon3_set_pil_in(void *opaque, uint32_t pil_in)
> +static void leon3_set_pil_in(void *opaque, int n, int level)
> {
> - CPUSPARCState *env = (CPUSPARCState *)opaque;
> + CPUSPARCState *env = opaque;
> + uint32_t pil_in = level;
> CPUState *cs;
>
> assert(env != NULL);
Otherwise
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM