[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);
-}
#endif
+}
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);
-#else
-static inline void cmos_set_s3_resume_init(RTCState *s) {}
-static inline void cmos_set_s3_resume(void) {}
-#endif
/* pc.c */
extern int fd_bootchk;
--
yamahata
- [Qemu-devel] [PATCH 00/17] split out piix specific part from pc emulator. v2, Isaku Yamahata, 2009/07/03
- [Qemu-devel] [PATCH 02/17] acpi.c: split out apm register emulation., Isaku Yamahata, 2009/07/03
- [Qemu-devel] [PATCH 07/17] pc.c: remove unnecessary global variables, pit and ioapic.., Isaku Yamahata, 2009/07/03
- [Qemu-devel] [PATCH 09/17] pc.c: remove a global variable, RTCState *rtc_state., Isaku Yamahata, 2009/07/03
- [Qemu-devel] Re: [PATCH 09/17] pc.c: remove a global variable, RTCState *rtc_state., Paolo Bonzini, 2009/07/09
- [Qemu-devel] Re: [PATCH 09/17] pc.c: remove a global variable, RTCState *rtc_state., Isaku Yamahata, 2009/07/08
- [Qemu-devel] Re: [PATCH 09/17] pc.c: remove a global variable, RTCState *rtc_state., Paolo Bonzini, 2009/07/09
- [Qemu-devel] Re: [PATCH 09/17] pc.c: remove a global variable, RTCState *rtc_state.,
Isaku Yamahata <=
- [Qemu-devel] Re: [PATCH 09/17] pc.c: remove a global variable, RTCState *rtc_state., Paolo Bonzini, 2009/07/09
[Qemu-devel] [PATCH 04/17] acpi: add acpi constants from linux header files and use them., Isaku Yamahata, 2009/07/03
[Qemu-devel] [PATCH 12/17] pc.c: split out cpu initialization from pc_init1() into pc_cpus_init()., Isaku Yamahata, 2009/07/03
[Qemu-devel] [PATCH 13/17] pc.c: split out memory allocation from pc_init1() into pc_memory_init(), Isaku Yamahata, 2009/07/03
[Qemu-devel] [PATCH 15/17] pc.c: split out basic device init from pc_init1() into pc_basic_device_init(), Isaku Yamahata, 2009/07/03
[Qemu-devel] [PATCH 17/17] pc.c: split out piix specific part from pc.c into pc_piix.c, Isaku Yamahata, 2009/07/03
[Qemu-devel] [PATCH 16/17] pc.c: split out pci device init from pc_init1() into pc_pci_device_init(), Isaku Yamahata, 2009/07/03
[Qemu-devel] [PATCH 08/17] pc.c: remove a global variable, floppy_controller., Isaku Yamahata, 2009/07/03
[Qemu-devel] [PATCH 06/17] pc.c: Make smm enable/disable function i440fx independent., Isaku Yamahata, 2009/07/03
[Qemu-devel] [PATCH 05/17] acpi.c: split acpi.c into the common part and the piix4 part., Isaku Yamahata, 2009/07/03