[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 15/16] hw/intc/arm_gic: Break out gic_update(
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 15/16] hw/intc/arm_gic: Break out gic_update() function |
Date: |
Tue, 14 Apr 2015 20:36:25 +0100 |
On 30 October 2014 at 22:12, Greg Bellows <address@hidden> wrote:
> From: Fabian Aggeler <address@hidden>
>
> Prepare to split gic_update() in two functions, one for GICs with
> interrupt grouping and one without grouping (existing).
>
> Signed-off-by: Fabian Aggeler <address@hidden>
> ---
> hw/intc/arm_gic.c | 11 ++++++++---
> hw/intc/gic_internal.h | 1 +
> 2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
> index e01cfdc..808aa18 100644
> --- a/hw/intc/arm_gic.c
> +++ b/hw/intc/arm_gic.c
> @@ -52,9 +52,7 @@ static inline bool ns_access(void)
> return true;
> }
>
> -/* TODO: Many places that call this routine could be optimized. */
> -/* Update interrupt status after enabled or pending bits have been changed.
> */
> -void gic_update(GICState *s)
> +inline void gic_update_no_grouping(GICState *s)
> {
> int best_irq;
> int best_prio;
> @@ -93,6 +91,13 @@ void gic_update(GICState *s)
> }
> }
>
> +/* TODO: Many places that call this routine could be optimized. */
> +/* Update interrupt status after enabled or pending bits have been changed.
> */
> +void gic_update(GICState *s)
> +{
> + gic_update_no_grouping(s);
> +}
> +
> void gic_set_pending_private(GICState *s, int cpu, int irq)
> {
> int cm = 1 << cpu;
> diff --git a/hw/intc/gic_internal.h b/hw/intc/gic_internal.h
> index 13fe5a6..e16a7e5 100644
> --- a/hw/intc/gic_internal.h
> +++ b/hw/intc/gic_internal.h
> @@ -73,6 +73,7 @@
> void gic_set_pending_private(GICState *s, int cpu, int irq);
> uint32_t gic_acknowledge_irq(GICState *s, int cpu);
> void gic_complete_irq(GICState *s, int cpu, int irq);
> +inline void gic_update_no_grouping(GICState *s);
This should probably be 'static inline' and doesn't need
a prototype in the header file.
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v2 15/16] hw/intc/arm_gic: Break out gic_update() function,
Peter Maydell <=