qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, Thomas Huth <thuth@redhat.com>,
	qemu-arm@nongnu.org, Sergey Kambalin <serg.oker@gmail.com>
Subject: Re: [PATCH 12/15] hw/timer/arm_timer: Pass timer output IRQ as parameter to arm_timer_new
Date: Tue, 4 Jul 2023 16:29:55 +0200	[thread overview]
Message-ID: <ab63c24a-db11-9e2b-1f26-29ea7bac2b60@linaro.org> (raw)
In-Reply-To: <CAFEAcA_BSA8s6_8BbMZG9wGWMg78u-k-GQ8ZG8n-MUCRNeEUDA@mail.gmail.com>

On 8/6/23 17:00, Peter Maydell wrote:
> On Wed, 31 May 2023 at 21:37, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> Both SP804State/IcpPitState peek at ArmTimerState internal state.
>> This is fine so far but we want to convert ArmTimerState to QOM
>> where peeking at QOM state internal should be avoided.
>> ArmTimerState's IRQ is just a pointer, so we can pass/set it via
>> argument, avoiding accessing ArmTimerState internal state except
>> from the arm_timer_*() methods.
> 
> If we convert ArmTimerState to QOM then shouldn't the
> irq become a sysbus IRQ on the ArmTimerState object,
> and the looking at the internals go away automatically?

This is what happen two patches later in "hw/timer/arm_timer:
QOM'ify ARM_TIMER" (which is hard to split).

At this step ArmTimerState is not yet a QOM object (neither
SysBus), so we can not create a SysBus IRQ.


  reply	other threads:[~2023-07-04 14:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230531203559.29140-1-philmd@linaro.org>
     [not found] ` <20230531203559.29140-16-philmd@linaro.org>
2023-06-03 18:07   ` [PATCH 15/15] hw/timer/arm_timer: QOM'ify ARM_TIMER Mark Cave-Ayland
2023-06-03 18:12     ` Mark Cave-Ayland
2023-06-05 10:16       ` Philippe Mathieu-Daudé
2023-06-05 10:20     ` Philippe Mathieu-Daudé
2023-06-05 10:28       ` Peter Maydell
     [not found] ` <20230531203559.29140-2-philmd@linaro.org>
2023-06-08 14:35   ` [PATCH 01/15] hw/timer/arm_timer: Declare QOM types using DEFINE_TYPES() macro Peter Maydell
     [not found] ` <20230531203559.29140-3-philmd@linaro.org>
2023-06-08 14:36   ` [PATCH 02/15] hw/timer/arm_timer: Move SP804 code around Peter Maydell
     [not found] ` <20230531203559.29140-4-philmd@linaro.org>
2023-06-08 14:41   ` [PATCH 03/15] hw/timer/arm_timer: Add missing sp804_unrealize() handler Peter Maydell
2023-07-04 14:43     ` Philippe Mathieu-Daudé
     [not found] ` <20230531203559.29140-5-philmd@linaro.org>
2023-06-08 14:41   ` [PATCH 04/15] hw/timer/arm_timer: Remove pointless cast from void * Peter Maydell
     [not found] ` <20230531203559.29140-6-philmd@linaro.org>
2023-06-08 14:42   ` [PATCH 05/15] hw/timer/arm_timer: CamelCase rename icp_pit_state -> IntegratorPitState Peter Maydell
     [not found] ` <20230531203559.29140-7-philmd@linaro.org>
2023-06-08 14:44   ` [PATCH 06/15] hw/timer/arm_timer: CamelCase rename arm_timer_state -> ArmTimerState Peter Maydell
     [not found] ` <20230531203559.29140-8-philmd@linaro.org>
2023-06-08 14:46   ` [PATCH 07/15] hw/timer/arm_timer: Extract arm_timer_reset() Peter Maydell
2023-07-04 10:01     ` Philippe Mathieu-Daudé
     [not found] ` <20230531203559.29140-9-philmd@linaro.org>
2023-06-08 14:49   ` [PATCH 08/15] hw/timer/arm_timer: Rename arm_timer_init() -> arm_timer_new() Peter Maydell
     [not found] ` <20230531203559.29140-10-philmd@linaro.org>
2023-06-08 14:50   ` [PATCH 09/15] hw/timer/arm_timer: Convert ArmTimerState::freq to uint32_t type Peter Maydell
     [not found] ` <20230531203559.29140-11-philmd@linaro.org>
2023-06-08 14:50   ` [PATCH 10/15] hw/timer/arm_timer: Use array of frequency in SP804State Peter Maydell
     [not found] ` <20230531203559.29140-12-philmd@linaro.org>
2023-06-08 14:51   ` [PATCH 11/15] hw/timer/arm_timer: Iterate on timers using for() loop statement Peter Maydell
     [not found] ` <20230531203559.29140-13-philmd@linaro.org>
2023-06-08 15:00   ` [PATCH 12/15] hw/timer/arm_timer: Pass timer output IRQ as parameter to arm_timer_new Peter Maydell
2023-07-04 14:29     ` Philippe Mathieu-Daudé [this message]
     [not found] ` <20230531203559.29140-14-philmd@linaro.org>
2023-06-08 15:09   ` [PATCH 13/15] hw/timer/arm_timer: Fix misuse of SysBus IRQ in IcpPitState Peter Maydell
2023-07-04 14:25     ` Philippe Mathieu-Daudé

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=ab63c24a-db11-9e2b-1f26-29ea7bac2b60@linaro.org \
    --to=philmd@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=serg.oker@gmail.com \
    --cc=thuth@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).