mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 12:40:53 +07:00
Merge branches 'pm-sleep' and 'powercap'
* pm-sleep: PM / hibernate: Declare variables as static RTC: rtc-cmos: Fix wakeup from suspend-to-idle PM / wakeup: Fix up wakeup_source_report_event() * powercap: PowerCap: Fix an error code in powercap_register_zone()
This commit is contained in:
commit
bb47e96417
@ -512,13 +512,12 @@ static bool wakeup_source_not_registered(struct wakeup_source *ws)
|
|||||||
/**
|
/**
|
||||||
* wakup_source_activate - Mark given wakeup source as active.
|
* wakup_source_activate - Mark given wakeup source as active.
|
||||||
* @ws: Wakeup source to handle.
|
* @ws: Wakeup source to handle.
|
||||||
* @hard: If set, abort suspends in progress and wake up from suspend-to-idle.
|
|
||||||
*
|
*
|
||||||
* Update the @ws' statistics and, if @ws has just been activated, notify the PM
|
* Update the @ws' statistics and, if @ws has just been activated, notify the PM
|
||||||
* core of the event by incrementing the counter of of wakeup events being
|
* core of the event by incrementing the counter of of wakeup events being
|
||||||
* processed.
|
* processed.
|
||||||
*/
|
*/
|
||||||
static void wakeup_source_activate(struct wakeup_source *ws, bool hard)
|
static void wakeup_source_activate(struct wakeup_source *ws)
|
||||||
{
|
{
|
||||||
unsigned int cec;
|
unsigned int cec;
|
||||||
|
|
||||||
@ -526,9 +525,6 @@ static void wakeup_source_activate(struct wakeup_source *ws, bool hard)
|
|||||||
"unregistered wakeup source\n"))
|
"unregistered wakeup source\n"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (hard)
|
|
||||||
pm_system_wakeup();
|
|
||||||
|
|
||||||
ws->active = true;
|
ws->active = true;
|
||||||
ws->active_count++;
|
ws->active_count++;
|
||||||
ws->last_time = ktime_get();
|
ws->last_time = ktime_get();
|
||||||
@ -554,7 +550,10 @@ static void wakeup_source_report_event(struct wakeup_source *ws, bool hard)
|
|||||||
ws->wakeup_count++;
|
ws->wakeup_count++;
|
||||||
|
|
||||||
if (!ws->active)
|
if (!ws->active)
|
||||||
wakeup_source_activate(ws, hard);
|
wakeup_source_activate(ws);
|
||||||
|
|
||||||
|
if (hard)
|
||||||
|
pm_system_wakeup();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -538,6 +538,7 @@ struct powercap_zone *powercap_register_zone(
|
|||||||
|
|
||||||
power_zone->id = result;
|
power_zone->id = result;
|
||||||
idr_init(&power_zone->idr);
|
idr_init(&power_zone->idr);
|
||||||
|
result = -ENOMEM;
|
||||||
power_zone->name = kstrdup(name, GFP_KERNEL);
|
power_zone->name = kstrdup(name, GFP_KERNEL);
|
||||||
if (!power_zone->name)
|
if (!power_zone->name)
|
||||||
goto err_name_alloc;
|
goto err_name_alloc;
|
||||||
|
@ -1088,7 +1088,7 @@ static u32 rtc_handler(void *context)
|
|||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&rtc_lock, flags);
|
spin_unlock_irqrestore(&rtc_lock, flags);
|
||||||
|
|
||||||
pm_wakeup_event(dev, 0);
|
pm_wakeup_hard_event(dev);
|
||||||
acpi_clear_event(ACPI_EVENT_RTC);
|
acpi_clear_event(ACPI_EVENT_RTC);
|
||||||
acpi_disable_event(ACPI_EVENT_RTC, 0);
|
acpi_disable_event(ACPI_EVENT_RTC, 0);
|
||||||
return ACPI_INTERRUPT_HANDLED;
|
return ACPI_INTERRUPT_HANDLED;
|
||||||
|
@ -1425,7 +1425,7 @@ static unsigned int nr_meta_pages;
|
|||||||
* Numbers of normal and highmem page frames allocated for hibernation image
|
* Numbers of normal and highmem page frames allocated for hibernation image
|
||||||
* before suspending devices.
|
* before suspending devices.
|
||||||
*/
|
*/
|
||||||
unsigned int alloc_normal, alloc_highmem;
|
static unsigned int alloc_normal, alloc_highmem;
|
||||||
/*
|
/*
|
||||||
* Memory bitmap used for marking saveable pages (during hibernation) or
|
* Memory bitmap used for marking saveable pages (during hibernation) or
|
||||||
* hibernation image pages (during restore)
|
* hibernation image pages (during restore)
|
||||||
|
Loading…
Reference in New Issue
Block a user