Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3578facf authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar
Browse files

x86: merge resume-trace.h variants



Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 3367e56f
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -6,12 +6,14 @@


# define _ASM_PTR	" .long "
# define _ASM_PTR	" .long "
# define _ASM_ALIGN	" .balign 4 "
# define _ASM_ALIGN	" .balign 4 "
# define _ASM_MOV_UL	" movl "


#else
#else
/* 64 bits */
/* 64 bits */


# define _ASM_PTR	" .quad "
# define _ASM_PTR	" .quad "
# define _ASM_ALIGN	" .balign 8 "
# define _ASM_ALIGN	" .balign 8 "
# define _ASM_MOV_UL	" movq "


#endif /* CONFIG_X86_32 */
#endif /* CONFIG_X86_32 */


+19 −4
Original line number Original line Diff line number Diff line
#ifdef CONFIG_X86_32
#ifndef _ASM_X86_RESUME_TRACE_H
# include "resume-trace_32.h"
#define _ASM_X86_RESUME_TRACE_H
#else

# include "resume-trace_64.h"
#include <asm/asm.h>

#define TRACE_RESUME(user) do {					\
	if (pm_trace_enabled) {					\
		void *tracedata;				\
		asm volatile(_ASM_MOV_UL " $1f,%0\n"		\
			".section .tracedata,\"a\"\n"		\
			"1:\t.word %c1\n\t"			\
			_ASM_PTR " %c2\n"			\
			".previous"				\
			:"=r" (tracedata)			\
			: "i" (__LINE__), "i" (__FILE__));	\
		generate_resume_trace(tracedata, user);		\
	}							\
} while (0)

#endif
#endif

include/asm-x86/resume-trace_32.h

deleted100644 → 0
+0 −13
Original line number Original line Diff line number Diff line
#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)

include/asm-x86/resume-trace_64.h

deleted100644 → 0
+0 −13
Original line number Original line Diff line number Diff line
#define TRACE_RESUME(user) do {					\
	if (pm_trace_enabled) {					\
		void *tracedata;				\
		asm volatile("movq $1f,%0\n"			\
			".section .tracedata,\"a\"\n"		\
			"1:\t.word %c1\n"			\
			"\t.quad %c2\n"				\
			".previous"				\
			:"=r" (tracedata)			\
			: "i" (__LINE__), "i" (__FILE__));	\
		generate_resume_trace(tracedata, user);		\
	}							\
} while (0)