Merge branches 'pm-sleep' and 'pm-runtime'
* pm-sleep: PM / hibernate: exclude freed pages from allocated pages printout PM / sleep: export suspend_resume trace event PM / sleep: Mention async suspend in PM_TRACE documentation PM / hibernate: Remove unused function * pm-runtime: ACPI / PM: Remove unneeded nested #ifdef USB / PM: Remove unneeded #ifdef and associated dead code
This commit is contained in:
commit
f52386892f
@ -69,6 +69,10 @@ Reason for this is that the RTC is the only reliably available piece of
|
|||||||
hardware during resume operations where a value can be set that will
|
hardware during resume operations where a value can be set that will
|
||||||
survive a reboot.
|
survive a reboot.
|
||||||
|
|
||||||
|
pm_trace is not compatible with asynchronous suspend, so it turns
|
||||||
|
asynchronous suspend off (which may work around timing or
|
||||||
|
ordering-sensitive bugs).
|
||||||
|
|
||||||
Consequence is that after a resume (even if it is successful) your system
|
Consequence is that after a resume (even if it is successful) your system
|
||||||
clock will have a value corresponding to the magic number instead of the
|
clock will have a value corresponding to the magic number instead of the
|
||||||
correct date/time! It is therefore advisable to use a program like ntp-date
|
correct date/time! It is therefore advisable to use a program like ntp-date
|
||||||
|
@ -1027,7 +1027,6 @@ EXPORT_SYMBOL_GPL(acpi_subsys_freeze);
|
|||||||
|
|
||||||
static struct dev_pm_domain acpi_general_pm_domain = {
|
static struct dev_pm_domain acpi_general_pm_domain = {
|
||||||
.ops = {
|
.ops = {
|
||||||
#ifdef CONFIG_PM
|
|
||||||
.runtime_suspend = acpi_subsys_runtime_suspend,
|
.runtime_suspend = acpi_subsys_runtime_suspend,
|
||||||
.runtime_resume = acpi_subsys_runtime_resume,
|
.runtime_resume = acpi_subsys_runtime_resume,
|
||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
@ -1040,7 +1039,6 @@ static struct dev_pm_domain acpi_general_pm_domain = {
|
|||||||
.poweroff = acpi_subsys_suspend,
|
.poweroff = acpi_subsys_suspend,
|
||||||
.poweroff_late = acpi_subsys_suspend_late,
|
.poweroff_late = acpi_subsys_suspend_late,
|
||||||
.restore_early = acpi_subsys_resume_early,
|
.restore_early = acpi_subsys_resume_early,
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -3452,8 +3452,6 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
|
|
||||||
int usb_remote_wakeup(struct usb_device *udev)
|
int usb_remote_wakeup(struct usb_device *udev)
|
||||||
{
|
{
|
||||||
int status = 0;
|
int status = 0;
|
||||||
@ -3512,16 +3510,6 @@ static int hub_handle_remote_wakeup(struct usb_hub *hub, unsigned int port,
|
|||||||
return connect_change;
|
return connect_change;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
static int hub_handle_remote_wakeup(struct usb_hub *hub, unsigned int port,
|
|
||||||
u16 portstatus, u16 portchange)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int check_ports_changed(struct usb_hub *hub)
|
static int check_ports_changed(struct usb_hub *hub)
|
||||||
{
|
{
|
||||||
int port1;
|
int port1;
|
||||||
|
@ -1472,9 +1472,9 @@ static inline unsigned long preallocate_highmem_fraction(unsigned long nr_pages,
|
|||||||
/**
|
/**
|
||||||
* free_unnecessary_pages - Release preallocated pages not needed for the image
|
* free_unnecessary_pages - Release preallocated pages not needed for the image
|
||||||
*/
|
*/
|
||||||
static void free_unnecessary_pages(void)
|
static unsigned long free_unnecessary_pages(void)
|
||||||
{
|
{
|
||||||
unsigned long save, to_free_normal, to_free_highmem;
|
unsigned long save, to_free_normal, to_free_highmem, free;
|
||||||
|
|
||||||
save = count_data_pages();
|
save = count_data_pages();
|
||||||
if (alloc_normal >= save) {
|
if (alloc_normal >= save) {
|
||||||
@ -1495,6 +1495,7 @@ static void free_unnecessary_pages(void)
|
|||||||
else
|
else
|
||||||
to_free_normal = 0;
|
to_free_normal = 0;
|
||||||
}
|
}
|
||||||
|
free = to_free_normal + to_free_highmem;
|
||||||
|
|
||||||
memory_bm_position_reset(©_bm);
|
memory_bm_position_reset(©_bm);
|
||||||
|
|
||||||
@ -1518,6 +1519,8 @@ static void free_unnecessary_pages(void)
|
|||||||
swsusp_unset_page_free(page);
|
swsusp_unset_page_free(page);
|
||||||
__free_page(page);
|
__free_page(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return free;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1707,7 +1710,7 @@ int hibernate_preallocate_memory(void)
|
|||||||
* pages in memory, but we have allocated more. Release the excessive
|
* pages in memory, but we have allocated more. Release the excessive
|
||||||
* ones now.
|
* ones now.
|
||||||
*/
|
*/
|
||||||
free_unnecessary_pages();
|
pages -= free_unnecessary_pages();
|
||||||
|
|
||||||
out:
|
out:
|
||||||
stop = ktime_get();
|
stop = ktime_get();
|
||||||
@ -2310,8 +2313,6 @@ static inline void free_highmem_data(void)
|
|||||||
free_image_page(buffer, PG_UNSAFE_CLEAR);
|
free_image_page(buffer, PG_UNSAFE_CLEAR);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline int get_safe_write_buffer(void) { return 0; }
|
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
count_highmem_image_pages(struct memory_bitmap *bm) { return 0; }
|
count_highmem_image_pages(struct memory_bitmap *bm) { return 0; }
|
||||||
|
|
||||||
|
@ -13,5 +13,6 @@
|
|||||||
#define CREATE_TRACE_POINTS
|
#define CREATE_TRACE_POINTS
|
||||||
#include <trace/events/power.h>
|
#include <trace/events/power.h>
|
||||||
|
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(suspend_resume);
|
||||||
EXPORT_TRACEPOINT_SYMBOL_GPL(cpu_idle);
|
EXPORT_TRACEPOINT_SYMBOL_GPL(cpu_idle);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user