All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/4] Confine use of global rtc_state to PC CMOS functions
Date: Mon, 04 May 2009 15:54:58 +0200	[thread overview]
Message-ID: <87zldtotvx.fsf@pike.pond.sub.org> (raw)
In-Reply-To: <f43fc5580905011027t5541d70el5d24e2a109cc91f3@mail.gmail.com> (Blue Swirl's message of "Fri\, 1 May 2009 20\:27\:28 +0300")

Blue Swirl <blauwirbel@gmail.com> writes:

> On 4/30/09, Markus Armbruster <armbru@redhat.com> wrote:
>> Pass the state as argument to cmos_init() and cmos_init_hd().
>>  cmos_init() still needs to save it in rtc_state for use by
>>  cmos_set_s3_resume().
>
> pc.c could pass acpi an opaque handle (former rtc_state) at init or
> acpi could export a function to set the handle, called by pc.c. Then
> cmos_set_s3_resume could take a state parameter.

We'd just move a global variable from pc.c to acpi.c, wouldn't we?
Could you explain why that's a better place?

Passing rtc_state to piix4_pm_init() doesn't work well for pcdt.c,
because we'd have to pass it from RTC device to PIIX3 ACPI device
somehow, creating one of those ugly "non-tree" device dependencies,
i.e. one that doesn't follow device tree or interrupt tree edges.  Your
other idea (a function to set the handle) allows me to keep the two
devices decoupled, provided I can set the handle even before
piix4_pm_init().

  reply	other threads:[~2009-05-04 13:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1241106809.git.armbru@redhat.com>
2009-04-30 16:03 ` [Qemu-devel] [PATCH 1/4] Confine use of global rtc_state to PC CMOS functions Markus Armbruster
2009-05-01 17:27   ` Blue Swirl
2009-05-04 13:54     ` Markus Armbruster [this message]
2009-05-05 16:22       ` Blue Swirl
2009-05-19  6:56         ` Markus Armbruster
2009-05-19 16:51           ` Blue Swirl
2009-05-19 16:57           ` Avi Kivity
2009-04-30 16:03 ` [Qemu-devel] [PATCH 2/4] Remove global floppy_controller Markus Armbruster
2009-05-01 17:31   ` Blue Swirl
2009-04-30 16:03 ` [Qemu-devel] [PATCH 3/4] Give parse_macaddr() external linkage Markus Armbruster
2009-04-30 16:03 ` [Qemu-devel] [PATCH 4/4] Machine description as data Markus Armbruster

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=87zldtotvx.fsf@pike.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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.