All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: Igor Mitsyanko <i.mitsyanko@gmail.com>,
	Zongyuan Li <zongyuan.li@smartx.com>
Subject: Re: [PATCH for-7.1 16/18] hw/arm/exynos4210: Fold combiner splits into exynos4210_init_board_irqs()
Date: Wed, 6 Apr 2022 09:04:31 -0500	[thread overview]
Message-ID: <6cdaeef1-1f4c-2f0c-23a9-ad3203fa9c75@linaro.org> (raw)
In-Reply-To: <20220404154658.565020-17-peter.maydell@linaro.org>

On 4/4/22 10:46, Peter Maydell wrote:
> At this point, the function exynos4210_init_board_irqs() splits input
> IRQ lines to connect them to the input combiner, output combiner and
> external GIC.  The function exynos4210_combiner_get_gpioin() splits
> some of the combiner input lines further to connect them to multiple
> different inputs on the combiner.
> 
> Because (unlike qemu_irq_split()) the TYPE_SPLIT_IRQ device has a
> configurable number of outputs, we can do all this in one place, by
> making exynos4210_init_board_irqs() add extra outputs to the splitter
> device when it must be connected to more than one input on each
> combiner.
> 
> We do this with a new data structure, the combinermap, which is an
> array each of whose elements is a list of the interrupt IDs on the
> combiner which must be tied together.  As we loop through each
> interrupt ID, if we find that it is the first one in one of these
> lists, we configure the splitter device with eonugh extra outputs and
> wire them up to the other interrupt IDs in the list.
> 
> Conveniently, for all the cases where this is necessary, the
> lowest-numbered interrupt ID in each group is in the range of the
> external combiner, so we only need to code for this in the first of
> the two loops in exynos4210_init_board_irqs().
> 
> The old code in exynos4210_combiner_get_gpioin() which is being
> deleted here had several problems which don't exist in the new code
> in its handling of the multi-core timer interrupts:
>   (1) the case labels specified bits 4 ... 8, but bit '8' doesn't
>       exist; these should have been 4 ... 7
>   (2) it used the input irq[EXYNOS4210_COMBINER_GET_IRQ_NUM(1, bit + 4)]
>       multiple times as the input of several different splitters,
>       which isn't allowed
>   (3) in an apparent cut-and-paste error, the cases for all the
>       multi-core timer inputs used "bit + 4" even though the
>       bit range for the case was (intended to be) 4 ... 7, which
>       meant it was looking at non-existent bits 8 ... 11.
> None of these exist in the new code.
> 
> Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
> ---
>   include/hw/arm/exynos4210.h |   6 +-
>   hw/arm/exynos4210.c         | 178 +++++++++++++++++++++++-------------
>   2 files changed, 119 insertions(+), 65 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


  reply	other threads:[~2022-04-06 14:06 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 15:46 [PATCH for-7.1 00/18] hw/arm: Make exynos4210 use TYPE_SPLIT_IRQ Peter Maydell
2022-04-04 15:46 ` [PATCH for-7.1 01/18] hw/arm/exynos4210: Use TYPE_OR_IRQ instead of custom OR-gate device Peter Maydell
2022-04-06 13:37   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 02/18] hw/intc/exynos4210_gic: Remove unused TYPE_EXYNOS4210_IRQ_GATE Peter Maydell
2022-04-07 12:04   ` Francisco Iglesias
2022-04-04 15:46 ` [PATCH for-7.1 03/18] hw/arm/exynos4210: Put a9mpcore device into state struct Peter Maydell
2022-04-06 13:39   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 04/18] hw/arm/exynos4210: Drop int_gic_irq[] from Exynos4210Irq struct Peter Maydell
2022-04-06 13:43   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 05/18] hw/arm/exynos4210: Coalesce board_irqs and irq_table Peter Maydell
2022-04-06 13:45   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 06/18] hw/arm/exynos4210: Fix code style nit in combiner_grp_to_gic_id[] Peter Maydell
2022-04-06 13:47   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 07/18] hw/arm/exynos4210: Move exynos4210_init_board_irqs() into exynos4210.c Peter Maydell
2022-04-06 13:48   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 08/18] hw/arm/exynos4210: Put external GIC into state struct Peter Maydell
2022-04-06 13:50   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 09/18] hw/arm/exynos4210: Drop ext_gic_irq[] from Exynos4210Irq struct Peter Maydell
2022-04-06 13:51   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 10/18] hw/arm/exynos4210: Move exynos4210_combiner_get_gpioin() into exynos4210.c Peter Maydell
2022-04-06 13:52   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 11/18] hw/arm/exynos4210: Delete unused macro definitions Peter Maydell
2022-04-06 13:52   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 12/18] hw/arm/exynos4210: Use TYPE_SPLIT_IRQ in exynos4210_init_board_irqs() Peter Maydell
2022-04-06 13:55   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 13/18] hw/arm/exynos4210: Fill in irq_table[] for internal-combiner-only IRQ lines Peter Maydell
2022-04-06 13:56   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 14/18] hw/arm/exynos4210: Connect MCT_G0 and MCT_G1 to both combiners Peter Maydell
2022-04-06 13:58   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 15/18] hw/arm/exynos4210: Don't connect multiple lines to external GIC inputs Peter Maydell
2022-04-06 14:00   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 16/18] hw/arm/exynos4210: Fold combiner splits into exynos4210_init_board_irqs() Peter Maydell
2022-04-06 14:04   ` Richard Henderson [this message]
2022-04-04 15:46 ` [PATCH for-7.1 17/18] hw/arm/exynos4210: Put combiners into state struct Peter Maydell
2022-04-06 14:05   ` Richard Henderson
2022-04-04 15:46 ` [PATCH for-7.1 18/18] hw/arm/exynos4210: Drop Exynos4210Irq struct Peter Maydell
2022-04-06 14:06   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6cdaeef1-1f4c-2f0c-23a9-ad3203fa9c75@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=i.mitsyanko@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=zongyuan.li@smartx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.