diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-13 08:00:25 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-09-03 19:36:05 -0400 |
commit | feb70af0e3ac6817327be70b47731039ea135dbc (patch) | |
tree | 7df6ab174688d8bcc637af0d7a8fc7beb6a1e2aa /include/linux/pm.h | |
parent | 3cb6f10a4d925ec21f414bc30a8aded2830963e5 (diff) |
PM: Do not use the syscore flag for runtime PM
The syscore device PM flag used to mark the devices (belonging to
PM domains) that should never be turned off, except for the system
core (syscore) suspend/hibernation and resume stages, need not be
accessed by the runtime PM core functions, because all of the devices
it is set for need to be marked as "irq safe" anyway and are
protected from being turned off by runtime PM by ensuring that their
usage counters are always set.
For this reason, make the syscore flag system-wide PM-specific
and simplify the code used for manipulating it, because it need not
acquire the device's power.lock any more.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/pm.h')
-rw-r--r-- | include/linux/pm.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/include/linux/pm.h b/include/linux/pm.h index b79a0dd3bc6d..44d1f2307dbc 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -43,12 +43,8 @@ struct device; | |||
43 | 43 | ||
44 | #ifdef CONFIG_PM | 44 | #ifdef CONFIG_PM |
45 | extern const char power_group_name[]; /* = "power" */ | 45 | extern const char power_group_name[]; /* = "power" */ |
46 | |||
47 | extern void dev_pm_syscore_device(struct device *dev, bool val); | ||
48 | #else | 46 | #else |
49 | #define power_group_name NULL | 47 | #define power_group_name NULL |
50 | |||
51 | static inline void dev_pm_syscore_device(struct device *dev, bool val) {} | ||
52 | #endif | 48 | #endif |
53 | 49 | ||
54 | typedef struct pm_message { | 50 | typedef struct pm_message { |
@@ -515,13 +511,13 @@ struct dev_pm_info { | |||
515 | bool is_suspended:1; /* Ditto */ | 511 | bool is_suspended:1; /* Ditto */ |
516 | bool ignore_children:1; | 512 | bool ignore_children:1; |
517 | bool early_init:1; /* Owned by the PM core */ | 513 | bool early_init:1; /* Owned by the PM core */ |
518 | bool syscore:1; | ||
519 | spinlock_t lock; | 514 | spinlock_t lock; |
520 | #ifdef CONFIG_PM_SLEEP | 515 | #ifdef CONFIG_PM_SLEEP |
521 | struct list_head entry; | 516 | struct list_head entry; |
522 | struct completion completion; | 517 | struct completion completion; |
523 | struct wakeup_source *wakeup; | 518 | struct wakeup_source *wakeup; |
524 | bool wakeup_path:1; | 519 | bool wakeup_path:1; |
520 | bool syscore:1; | ||
525 | #else | 521 | #else |
526 | unsigned int should_wakeup:1; | 522 | unsigned int should_wakeup:1; |
527 | #endif | 523 | #endif |