[Top][All Lists]

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

[Qemu-devel] Re: [PATCH 09/17] pc.c: remove a global variable, RTCState

From: Isaku Yamahata
Subject: [Qemu-devel] Re: [PATCH 09/17] pc.c: remove a global variable, RTCState *rtc_state.
Date: Thu, 9 Jul 2009 12:17:55 +0900
User-agent: Mutt/1.5.6i

On Wed, Jul 08, 2009 at 05:30:19PM +0200, Paolo Bonzini wrote:
> > The case you pointed out is handled in pc.h.
> > Or are you suggesting that they should be defined in pc.c even when
> > TARGET_I386 isn't defined?
> Yes, sorry for not being precise.  I also think that
> cmos_set_s3_resume_init should work even if TARGET_I386 isn't defined.
>  Only cmos_set_s3_resume should be a nop.

So is what you want the patch + the following hunks?
If so, I'll squash them into the patch with the next spin.

diff --git a/hw/pc.c b/hw/pc.c
index 74ac4fa..4927079 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1358,7 +1358,6 @@ void pc_pci_device_init(PCIBus *pci_bus)
-#if defined(TARGET_I386)
 /* set CMOS shutdown status register (index 0xF) as S3_resume(0xFE)
    BIOS will read it and start S3 resume at POST Entry */
 static RTCState *rtc_state;
@@ -1369,7 +1368,8 @@ void cmos_set_s3_resume_init(RTCState *s)
 void cmos_set_s3_resume(void)
+#if defined(TARGET_I386)
     if (rtc_state)
         rtc_set_memory(rtc_state, 0xF, 0xFE);
diff --git a/hw/pc.h b/hw/pc.h
index b1bb829..f52b977 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -95,13 +95,8 @@ RTCState *rtc_mm_init(target_phys_addr_t base, int it_shift, 
qemu_irq irq,
                       int base_year);
 void rtc_set_memory(RTCState *s, int addr, int val);
 void rtc_set_date(RTCState *s, const struct tm *tm);
-#if defined(TARGET_I386)
 void cmos_set_s3_resume_init(RTCState *s);
 void cmos_set_s3_resume(void);
-static inline void cmos_set_s3_resume_init(RTCState *s) {}
-static inline void cmos_set_s3_resume(void) {}
 /* pc.c */
 extern int fd_bootchk;


reply via email to

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