mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-04 22:59:53 +07:00
Enable minimal per-device resume tracing
This is the minimal resume trace code to find which device resume (if any) results in problems. Usually, you'd use the information this generates as a starting point to adding more fine-grained trace event points. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
eb71c87a49
commit
d02f40e81e
@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
#include <linux/resume-trace.h>
|
||||||
#include "../base.h"
|
#include "../base.h"
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
|
|
||||||
@ -23,6 +24,8 @@ int resume_device(struct device * dev)
|
|||||||
{
|
{
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
|
TRACE_DEVICE(dev);
|
||||||
|
TRACE_RESUME(0);
|
||||||
down(&dev->sem);
|
down(&dev->sem);
|
||||||
if (dev->power.pm_parent
|
if (dev->power.pm_parent
|
||||||
&& dev->power.pm_parent->power.power_state.event) {
|
&& dev->power.pm_parent->power.power_state.event) {
|
||||||
@ -36,6 +39,7 @@ int resume_device(struct device * dev)
|
|||||||
error = dev->bus->resume(dev);
|
error = dev->bus->resume(dev);
|
||||||
}
|
}
|
||||||
up(&dev->sem);
|
up(&dev->sem);
|
||||||
|
TRACE_RESUME(error);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user