diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2008-01-30 07:30:38 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:30:38 -0500 |
commit | 3578facf737dc9a60ed19a83458bd9cfdc2af233 (patch) | |
tree | 7e025ccef144287fff8aaf538c7f944ca60fe6c0 /include | |
parent | 3367e56f26a3a8647784328ffa846fe8021a5b79 (diff) |
x86: merge resume-trace.h variants
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/asm.h | 2 | ||||
-rw-r--r-- | include/asm-x86/resume-trace.h | 23 | ||||
-rw-r--r-- | include/asm-x86/resume-trace_32.h | 13 | ||||
-rw-r--r-- | include/asm-x86/resume-trace_64.h | 13 |
4 files changed, 21 insertions, 30 deletions
diff --git a/include/asm-x86/asm.h b/include/asm-x86/asm.h index b5006eb9acba..8661ae75488a 100644 --- a/include/asm-x86/asm.h +++ b/include/asm-x86/asm.h | |||
@@ -6,12 +6,14 @@ | |||
6 | 6 | ||
7 | # define _ASM_PTR " .long " | 7 | # define _ASM_PTR " .long " |
8 | # define _ASM_ALIGN " .balign 4 " | 8 | # define _ASM_ALIGN " .balign 4 " |
9 | # define _ASM_MOV_UL " movl " | ||
9 | 10 | ||
10 | #else | 11 | #else |
11 | /* 64 bits */ | 12 | /* 64 bits */ |
12 | 13 | ||
13 | # define _ASM_PTR " .quad " | 14 | # define _ASM_PTR " .quad " |
14 | # define _ASM_ALIGN " .balign 8 " | 15 | # define _ASM_ALIGN " .balign 8 " |
16 | # define _ASM_MOV_UL " movq " | ||
15 | 17 | ||
16 | #endif /* CONFIG_X86_32 */ | 18 | #endif /* CONFIG_X86_32 */ |
17 | 19 | ||
diff --git a/include/asm-x86/resume-trace.h b/include/asm-x86/resume-trace.h index 9b6dd093a9f7..46f725b0bc82 100644 --- a/include/asm-x86/resume-trace.h +++ b/include/asm-x86/resume-trace.h | |||
@@ -1,5 +1,20 @@ | |||
1 | #ifdef CONFIG_X86_32 | 1 | #ifndef _ASM_X86_RESUME_TRACE_H |
2 | # include "resume-trace_32.h" | 2 | #define _ASM_X86_RESUME_TRACE_H |
3 | #else | 3 | |
4 | # include "resume-trace_64.h" | 4 | #include <asm/asm.h> |
5 | |||
6 | #define TRACE_RESUME(user) do { \ | ||
7 | if (pm_trace_enabled) { \ | ||
8 | void *tracedata; \ | ||
9 | asm volatile(_ASM_MOV_UL " $1f,%0\n" \ | ||
10 | ".section .tracedata,\"a\"\n" \ | ||
11 | "1:\t.word %c1\n\t" \ | ||
12 | _ASM_PTR " %c2\n" \ | ||
13 | ".previous" \ | ||
14 | :"=r" (tracedata) \ | ||
15 | : "i" (__LINE__), "i" (__FILE__)); \ | ||
16 | generate_resume_trace(tracedata, user); \ | ||
17 | } \ | ||
18 | } while (0) | ||
19 | |||
5 | #endif | 20 | #endif |
diff --git a/include/asm-x86/resume-trace_32.h b/include/asm-x86/resume-trace_32.h deleted file mode 100644 index ec9cfd656230..000000000000 --- a/include/asm-x86/resume-trace_32.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #define TRACE_RESUME(user) do { \ | ||
2 | if (pm_trace_enabled) { \ | ||
3 | void *tracedata; \ | ||
4 | asm volatile("movl $1f,%0\n" \ | ||
5 | ".section .tracedata,\"a\"\n" \ | ||
6 | "1:\t.word %c1\n" \ | ||
7 | "\t.long %c2\n" \ | ||
8 | ".previous" \ | ||
9 | :"=r" (tracedata) \ | ||
10 | : "i" (__LINE__), "i" (__FILE__)); \ | ||
11 | generate_resume_trace(tracedata, user); \ | ||
12 | } \ | ||
13 | } while (0) | ||
diff --git a/include/asm-x86/resume-trace_64.h b/include/asm-x86/resume-trace_64.h deleted file mode 100644 index 34bf998fdf62..000000000000 --- a/include/asm-x86/resume-trace_64.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #define TRACE_RESUME(user) do { \ | ||
2 | if (pm_trace_enabled) { \ | ||
3 | void *tracedata; \ | ||
4 | asm volatile("movq $1f,%0\n" \ | ||
5 | ".section .tracedata,\"a\"\n" \ | ||
6 | "1:\t.word %c1\n" \ | ||
7 | "\t.quad %c2\n" \ | ||
8 | ".previous" \ | ||
9 | :"=r" (tracedata) \ | ||
10 | : "i" (__LINE__), "i" (__FILE__)); \ | ||
11 | generate_resume_trace(tracedata, user); \ | ||
12 | } \ | ||
13 | } while (0) | ||