1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _ASM_X86_PM_TRACE_H 3 #define _ASM_X86_PM_TRACE_H 4 5 #include <asm/asm.h> 6 7 #define TRACE_RESUME(user) \ 8 do { \ 9 if (pm_trace_enabled) { \ 10 const void *tracedata; \ 11 asm volatile(_ASM_MOV " $1f,%0\n" \ 12 ".section .tracedata,\"a\"\n" \ 13 "1:\t.word %c1\n\t" \ 14 _ASM_PTR " %c2\n" \ 15 ".previous" \ 16 :"=r" (tracedata) \ 17 : "i" (__LINE__), "i" (__FILE__)); \ 18 generate_pm_trace(tracedata, user); \ 19 } \ 20 } while (0) 21 22 #define TRACE_SUSPEND(user) TRACE_RESUME(user) 23 24 #endif /* _ASM_X86_PM_TRACE_H */ 25