qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/4] Confine use of global rtc_state to PC CMOS


From: Markus Armbruster
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
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Blue Swirl <address@hidden> writes:

> On 4/30/09, Markus Armbruster <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]