aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2008-05-12 09:44:41 -0400
committerThomas Gleixner <tglx@linutronix.de>2008-05-25 01:09:47 -0400
commit63687a528c39a67c1a213cdffa09feb0e6af9dbe (patch)
tree0a21067f84d2495d37cc6fe864675db53ca56630 /include
parent75d3bce2fc0a80f435fe12f2c9ed2632c8ac29e4 (diff)
x86: move tracedata to RODATA
.. allowing it to be write-protected just as other read-only data under CONFIG_DEBUG_RODATA. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/vmlinux.lds.h14
-rw-r--r--include/asm-x86/resume-trace.h2
-rw-r--r--include/linux/resume-trace.h2
3 files changed, 16 insertions, 2 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index f054778e916c..f1992dc5c424 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -93,6 +93,8 @@
93 VMLINUX_SYMBOL(__end_rio_route_ops) = .; \ 93 VMLINUX_SYMBOL(__end_rio_route_ops) = .; \
94 } \ 94 } \
95 \ 95 \
96 TRACEDATA \
97 \
96 /* Kernel symbol table: Normal symbols */ \ 98 /* Kernel symbol table: Normal symbols */ \
97 __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \ 99 __ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
98 VMLINUX_SYMBOL(__start___ksymtab) = .; \ 100 VMLINUX_SYMBOL(__start___ksymtab) = .; \
@@ -318,6 +320,18 @@
318 __stop___bug_table = .; \ 320 __stop___bug_table = .; \
319 } 321 }
320 322
323#ifdef CONFIG_PM_TRACE
324#define TRACEDATA \
325 . = ALIGN(4); \
326 .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) { \
327 __tracedata_start = .; \
328 *(.tracedata) \
329 __tracedata_end = .; \
330 }
331#else
332#define TRACEDATA
333#endif
334
321#define NOTES \ 335#define NOTES \
322 .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \ 336 .notes : AT(ADDR(.notes) - LOAD_OFFSET) { \
323 VMLINUX_SYMBOL(__start_notes) = .; \ 337 VMLINUX_SYMBOL(__start_notes) = .; \
diff --git a/include/asm-x86/resume-trace.h b/include/asm-x86/resume-trace.h
index 2557514d7ef6..8d9f0b41ee86 100644
--- a/include/asm-x86/resume-trace.h
+++ b/include/asm-x86/resume-trace.h
@@ -6,7 +6,7 @@
6#define TRACE_RESUME(user) \ 6#define TRACE_RESUME(user) \
7do { \ 7do { \
8 if (pm_trace_enabled) { \ 8 if (pm_trace_enabled) { \
9 void *tracedata; \ 9 const void *tracedata; \
10 asm volatile(_ASM_MOV_UL " $1f,%0\n" \ 10 asm volatile(_ASM_MOV_UL " $1f,%0\n" \
11 ".section .tracedata,\"a\"\n" \ 11 ".section .tracedata,\"a\"\n" \
12 "1:\t.word %c1\n\t" \ 12 "1:\t.word %c1\n\t" \
diff --git a/include/linux/resume-trace.h b/include/linux/resume-trace.h
index f3f4f28c6960..c9ba2fdf807d 100644
--- a/include/linux/resume-trace.h
+++ b/include/linux/resume-trace.h
@@ -8,7 +8,7 @@ extern int pm_trace_enabled;
8 8
9struct device; 9struct device;
10extern void set_trace_device(struct device *); 10extern void set_trace_device(struct device *);
11extern void generate_resume_trace(void *tracedata, unsigned int user); 11extern void generate_resume_trace(const void *tracedata, unsigned int user);
12 12
13#define TRACE_DEVICE(dev) do { \ 13#define TRACE_DEVICE(dev) do { \
14 if (pm_trace_enabled) \ 14 if (pm_trace_enabled) \