Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
#include <acpi/cpufreq/cpufreq.h>
+uint32_t system_reset_counter = 1;
+
static char opt_acpi_sleep[20];
string_param("acpi_sleep", opt_acpi_sleep);
{
case ACPI_STATE_S3:
do_suspend_lowlevel();
+ system_reset_counter++;
break;
case ACPI_STATE_S5:
acpi_enter_sleep_state(ACPI_STATE_S5);
u64 hpet_setup(void)
{
- u64 hpet_rate;
+ static u64 hpet_rate;
+ static u32 system_reset_latch;
u32 hpet_id, hpet_period, cfg;
int i;
- if ( hpet_address == 0 )
- return 0;
+ if ( system_reset_latch == system_reset_counter )
+ return hpet_rate;
+ system_reset_latch = system_reset_counter;
set_fixmap_nocache(FIX_HPET_BASE, hpet_address);
extern int acpi_dmar_init(void);
+/* Incremented whenever we transition through S3. Value is 1 during boot. */
+extern uint32_t system_reset_counter;
+
#endif /*__X86_ASM_ACPI_H*/