Linus Torvalds | eb71c87 | 2006-06-24 14:27:42 -0700 | [diff] [blame] | 1 | #ifndef RESUME_TRACE_H |
| 2 | #define RESUME_TRACE_H |
| 3 | |
| 4 | #ifdef CONFIG_PM_TRACE |
| 5 | |
| 6 | struct device; |
| 7 | extern void set_trace_device(struct device *); |
| 8 | extern void generate_resume_trace(void *tracedata, unsigned int user); |
| 9 | |
| 10 | #define TRACE_DEVICE(dev) set_trace_device(dev) |
| 11 | #define TRACE_RESUME(user) do { \ |
| 12 | void *tracedata; \ |
| 13 | asm volatile("movl $1f,%0\n" \ |
| 14 | ".section .tracedata,\"a\"\n" \ |
| 15 | "1:\t.word %c1\n" \ |
| 16 | "\t.long %c2\n" \ |
| 17 | ".previous" \ |
| 18 | :"=r" (tracedata) \ |
| 19 | : "i" (__LINE__), "i" (__FILE__)); \ |
| 20 | generate_resume_trace(tracedata, user); \ |
| 21 | } while (0) |
| 22 | |
| 23 | #else |
| 24 | |
| 25 | #define TRACE_DEVICE(dev) do { } while (0) |
| 26 | #define TRACE_RESUME(dev) do { } while (0) |
| 27 | |
| 28 | #endif |
| 29 | |
| 30 | #endif |