1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 2431d452aSZhonghui Fu #ifndef _ASM_X86_PM_TRACE_H 3431d452aSZhonghui Fu #define _ASM_X86_PM_TRACE_H 4431d452aSZhonghui Fu 5431d452aSZhonghui Fu #include <asm/asm.h> 6431d452aSZhonghui Fu 7431d452aSZhonghui Fu #define TRACE_RESUME(user) \ 8431d452aSZhonghui Fu do { \ 9431d452aSZhonghui Fu if (pm_trace_enabled) { \ 10431d452aSZhonghui Fu const void *tracedata; \ 11431d452aSZhonghui Fu asm volatile(_ASM_MOV " $1f,%0\n" \ 12431d452aSZhonghui Fu ".section .tracedata,\"a\"\n" \ 13431d452aSZhonghui Fu "1:\t.word %c1\n\t" \ 14431d452aSZhonghui Fu _ASM_PTR " %c2\n" \ 15431d452aSZhonghui Fu ".previous" \ 16431d452aSZhonghui Fu :"=r" (tracedata) \ 17431d452aSZhonghui Fu : "i" (__LINE__), "i" (__FILE__)); \ 18431d452aSZhonghui Fu generate_pm_trace(tracedata, user); \ 19431d452aSZhonghui Fu } \ 20431d452aSZhonghui Fu } while (0) 21431d452aSZhonghui Fu 22431d452aSZhonghui Fu #define TRACE_SUSPEND(user) TRACE_RESUME(user) 23431d452aSZhonghui Fu 24431d452aSZhonghui Fu #endif /* _ASM_X86_PM_TRACE_H */ 25