[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/7] m68k: add an interrupt controller
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 4/7] m68k: add an interrupt controller |
Date: |
Fri, 12 Feb 2021 19:44:25 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 12/20/20 12:26 PM, Laurent Vivier wrote:
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> ---
> include/hw/intc/m68k_irqc.h | 28 +++++++++
> hw/intc/m68k_irqc.c | 120 ++++++++++++++++++++++++++++++++++++
> hw/intc/Kconfig | 3 +
> hw/intc/meson.build | 1 +
> 4 files changed, 152 insertions(+)
> create mode 100644 include/hw/intc/m68k_irqc.h
> create mode 100644 hw/intc/m68k_irqc.c
>
> diff --git a/include/hw/intc/m68k_irqc.h b/include/hw/intc/m68k_irqc.h
> new file mode 100644
> index 000000000000..c40b1b4df8fa
> --- /dev/null
> +++ b/include/hw/intc/m68k_irqc.h
> @@ -0,0 +1,28 @@
> +/*
> + * SPDX-License-Identifer: GPL-2.0-or-later
> + *
> + * QEMU Motorla 680x0 IRQ Controller
> + *
> + * (c) 2020 Laurent Vivier <laurent@vivier.eu>
> + *
> + */
> +
> +#ifndef M68K_IRQC_H
> +#define M68K_IRQC_H
> +
> +#include "hw/sysbus.h"
> +
> +#define TYPE_M68K_IRQC "m68k-irq-controller"
> +#define M68K_IRQC(obj) OBJECT_CHECK(M68KIRQCState, (obj), \
> + TYPE_M68K_IRQC)
> +
> +typedef struct M68KIRQCState {
> + SysBusDevice parent_obj;
> +
> + uint8_t ipr;
> +
> + /* statistics */
> + uint64_t stats_irq_count[7];
So we have 8 IRQs, one is NMI. Is that correct?
Could you add #definitions? Patch LGTM but I'll wait for
definitions to give a R-b ;)
> +} M68KIRQCState;
> +
> +#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v2 4/7] m68k: add an interrupt controller,
Philippe Mathieu-Daudé <=