File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 14
14
#include <asm/mmu.h>
15
15
#include <asm/mpspec.h>
16
16
#include <asm/x86_init.h>
17
+ #include <asm/cpufeature.h>
17
18
18
19
#ifdef CONFIG_ACPI_APEI
19
20
# include <asm/pgtable_types.h>
@@ -63,6 +64,13 @@ extern int (*acpi_suspend_lowlevel)(void);
63
64
/* Physical address to resume after wakeup */
64
65
unsigned long acpi_get_wakeup_address (void );
65
66
67
+ static inline bool acpi_skip_set_wakeup_address (void )
68
+ {
69
+ return cpu_feature_enabled (X86_FEATURE_XENPV );
70
+ }
71
+
72
+ #define acpi_skip_set_wakeup_address acpi_skip_set_wakeup_address
73
+
66
74
/*
67
75
* Check if the CPU can handle C2 and deeper
68
76
*/
Original file line number Diff line number Diff line change @@ -60,13 +60,17 @@ static struct notifier_block tts_notifier = {
60
60
.priority = 0 ,
61
61
};
62
62
63
+ #ifndef acpi_skip_set_wakeup_address
64
+ #define acpi_skip_set_wakeup_address () false
65
+ #endif
66
+
63
67
static int acpi_sleep_prepare (u32 acpi_state )
64
68
{
65
69
#ifdef CONFIG_ACPI_SLEEP
66
70
unsigned long acpi_wakeup_address ;
67
71
68
72
/* do we have a wakeup address for S2 and S3? */
69
- if (acpi_state == ACPI_STATE_S3 ) {
73
+ if (acpi_state == ACPI_STATE_S3 && ! acpi_skip_set_wakeup_address () ) {
70
74
acpi_wakeup_address = acpi_get_wakeup_address ();
71
75
if (!acpi_wakeup_address )
72
76
return - EFAULT ;
You can’t perform that action at this time.
0 commit comments