From 44bf4cea43816d43deab73c1c16361e899996eaa Mon Sep 17 00:00:00 2001 From: Nigel Cunningham Date: Sat, 21 Jul 2007 17:10:41 +0200 Subject: x86: PM_TRACE support Signed-off-by: Nigel Cunningham Cc: Randy Dunlap Cc: "Rafael J. Wysocki" Cc: Pavel Machek Acked-by: Linus Torvalds Signed-off-by: Andrew Morton Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- include/linux/resume-trace.h | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'include/linux/resume-trace.h') diff --git a/include/linux/resume-trace.h b/include/linux/resume-trace.h index 81e9299ca14..f3f4f28c696 100644 --- a/include/linux/resume-trace.h +++ b/include/linux/resume-trace.h @@ -2,6 +2,7 @@ #define RESUME_TRACE_H #ifdef CONFIG_PM_TRACE +#include extern int pm_trace_enabled; @@ -9,20 +10,10 @@ struct device; extern void set_trace_device(struct device *); extern void generate_resume_trace(void *tracedata, unsigned int user); -#define TRACE_DEVICE(dev) set_trace_device(dev) -#define TRACE_RESUME(user) do { \ - if (pm_trace_enabled) { \ - void *tracedata; \ - asm volatile("movl $1f,%0\n" \ - ".section .tracedata,\"a\"\n" \ - "1:\t.word %c1\n" \ - "\t.long %c2\n" \ - ".previous" \ - :"=r" (tracedata) \ - : "i" (__LINE__), "i" (__FILE__)); \ - generate_resume_trace(tracedata, user); \ - } \ -} while (0) +#define TRACE_DEVICE(dev) do { \ + if (pm_trace_enabled) \ + set_trace_device(dev); \ + } while(0) #else -- cgit v1.2.3