rpms/kernel/F-7 linux-2.6-x86-64_pmtrace.patch, NONE, 1.1 kernel-2.6.spec, 1.3201, 1.3202

Dave Jones (davej) fedora-extras-commits at redhat.com
Fri May 25 14:58:24 UTC 2007


Author: davej

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24280

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-x86-64_pmtrace.patch 
Log Message:
* Fri May 25 2007 Dave Jones <davej at redhat.com>
- Add x86-64 PM_TRACE support.


linux-2.6-x86-64_pmtrace.patch:

--- NEW FILE linux-2.6-x86-64_pmtrace.patch ---
 arch/x86_64/kernel/vmlinux.lds.S  |    7 +++++++
 drivers/base/power/trace.c        |    4 +++-
 include/asm-i386/resume-trace.h   |   21 +++++++++++++++++++++
 include/asm-x86_64/resume-trace.h |   21 +++++++++++++++++++++
 include/linux/resume-trace.h      |   24 ++++++------------------
 kernel/power/Kconfig              |    2 +-
 6 files changed, 59 insertions(+), 20 deletions(-)
diff -ruNp 930-PM_TRACE.patch-old/arch/x86_64/kernel/vmlinux.lds.S 930-PM_TRACE.patch-new/arch/x86_64/kernel/vmlinux.lds.S
--- 930-PM_TRACE.patch-old/arch/x86_64/kernel/vmlinux.lds.S	2007-01-19 10:47:25.000000000 +1100
+++ 930-PM_TRACE.patch-new/arch/x86_64/kernel/vmlinux.lds.S	2007-01-15 00:00:08.000000000 +1100
@@ -54,6 +54,13 @@ SECTIONS
 
   BUG_TABLE
 
+  . = ALIGN(4);
+  .tracedata : AT(ADDR(.tracedata) - LOAD_OFFSET) {
+  	__tracedata_start = .;
+	*(.tracedata)
+  	__tracedata_end = .;
+  }
+
   . = ALIGN(PAGE_SIZE);        /* Align data segment to page size boundary */
 				/* Data */
   .data : AT(ADDR(.data) - LOAD_OFFSET) {
diff -ruNp 930-PM_TRACE.patch-old/drivers/base/power/trace.c 930-PM_TRACE.patch-new/drivers/base/power/trace.c
--- 930-PM_TRACE.patch-old/drivers/base/power/trace.c	2007-01-11 18:25:02.000000000 +1100
+++ 930-PM_TRACE.patch-new/drivers/base/power/trace.c	2007-01-15 00:00:08.000000000 +1100
@@ -142,6 +142,7 @@ void set_trace_device(struct device *dev
 {
 	dev_hash_value = hash_string(DEVSEED, dev->bus_id, DEVHASH);
 }
+EXPORT_SYMBOL(set_trace_device);
 
 /*
  * We could just take the "tracedata" index into the .tracedata
@@ -162,6 +163,7 @@ void generate_resume_trace(void *traceda
 	file_hash_value = hash_string(lineno, file, FILEHASH);
 	set_magic_time(user_hash_value, file_hash_value, dev_hash_value);
 }
+EXPORT_SYMBOL(generate_resume_trace);
 
 extern char __tracedata_start, __tracedata_end;
 static int show_file_hash(unsigned int value)
@@ -170,7 +172,7 @@ static int show_file_hash(unsigned int v
 	char *tracedata;
 
 	match = 0;
-	for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; tracedata += 6) {
+	for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; tracedata += 2 + sizeof(unsigned long)) {
 		unsigned short lineno = *(unsigned short *)tracedata;
 		const char *file = *(const char **)(tracedata + 2);
 		unsigned int hash = hash_string(lineno, file, FILEHASH);
diff -ruNp 930-PM_TRACE.patch-old/include/asm-i386/resume-trace.h 930-PM_TRACE.patch-new/include/asm-i386/resume-trace.h
--- 930-PM_TRACE.patch-old/include/asm-i386/resume-trace.h	1970-01-01 10:00:00.000000000 +1000
+++ 930-PM_TRACE.patch-new/include/asm-i386/resume-trace.h	2007-01-15 22:00:33.000000000 +1100
@@ -0,0 +1,21 @@
+#ifndef ARCH_RESUME_TRACE_H
+#define ARCH_RESUME_TRACE_H
+
+#ifdef CONFIG_PM_TRACE
+#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)
+#else
+#define TRACE_RESUME(user) do { } while (0)
+#endif
+#endif
diff -ruNp 930-PM_TRACE.patch-old/include/asm-x86_64/resume-trace.h 930-PM_TRACE.patch-new/include/asm-x86_64/resume-trace.h
--- 930-PM_TRACE.patch-old/include/asm-x86_64/resume-trace.h	1970-01-01 10:00:00.000000000 +1000
+++ 930-PM_TRACE.patch-new/include/asm-x86_64/resume-trace.h	2007-01-15 22:00:16.000000000 +1100
@@ -0,0 +1,21 @@
+#ifndef ARCH_RESUME_TRACE_H
+#define ARCH_RESUME_TRACE_H
+
+#ifdef CONFIG_PM_TRACE
+#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)
+#else
+#define TRACE_RESUME(user) do { } while (0)
+#endif
+#endif
diff -ruNp 930-PM_TRACE.patch-old/include/linux/resume-trace.h 930-PM_TRACE.patch-new/include/linux/resume-trace.h
--- 930-PM_TRACE.patch-old/include/linux/resume-trace.h	2007-01-11 18:25:16.000000000 +1100
+++ 930-PM_TRACE.patch-new/include/linux/resume-trace.h	2007-01-17 21:06:14.000000000 +1100
@@ -1,6 +1,8 @@
 #ifndef RESUME_TRACE_H
 #define RESUME_TRACE_H
 
+#include <asm/resume-trace.h>
+
 #ifdef CONFIG_PM_TRACE
 
 extern int pm_trace_enabled;
@@ -9,26 +11,12 @@ struct device;
 extern void set_trace_device(struct device *);
 extern void generate_resume_trace(void *tracedata, unsigned int user);
 
-#define TRACE_DEVICE(dev) set_trace_device(dev)
-#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)
-
+#define TRACE_DEVICE(dev) do { \
+	if (pm_trace_enabled) \
+		set_trace_device(dev); \
+	} while(0)
 #else
-
 #define TRACE_DEVICE(dev) do { } while (0)
-#define TRACE_RESUME(dev) do { } while (0)
-
 #endif
 
 #endif
diff -ruNp 930-PM_TRACE.patch-old/kernel/power/Kconfig 930-PM_TRACE.patch-new/kernel/power/Kconfig
--- 930-PM_TRACE.patch-old/kernel/power/Kconfig	2007-01-19 10:47:26.000000000 +1100
+++ 930-PM_TRACE.patch-new/kernel/power/Kconfig	2007-01-19 10:43:53.000000000 +1100
@@ -50,7 +50,7 @@ config DISABLE_CONSOLE_SUSPEND
 
 config PM_TRACE
 	bool "Suspend/resume event tracing"
-	depends on PM && PM_DEBUG && X86_32 && EXPERIMENTAL
+	depends on PM && PM_DEBUG && X86 && EXPERIMENTAL
 	default n
 	---help---
 	This enables some cheesy code to save the last PM event point in the



Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3201
retrieving revision 1.3202
diff -u -r1.3201 -r1.3202
--- kernel-2.6.spec	24 May 2007 22:44:05 -0000	1.3201
+++ kernel-2.6.spec	25 May 2007 14:57:49 -0000	1.3202
@@ -424,6 +424,7 @@
 Patch206: linux-2.6-x86-fsc-interrupt-controller-quirk.patch
 Patch207: linux-2.6-x86-dell-hpet.patch
 Patch208: linux-2.6-x86-dell-e520-shutdown.patch
+Patch209: linux-2.6-x86-64_pmtrace.patch
 
 # 300 - 399   ppc(64)
 Patch300: linux-2.6-g5-therm-shutdown.patch
@@ -1101,6 +1102,8 @@
 %patch207 -p1
 # Add Dell e520 to shutdown DMI blacklist.
 %patch208 -p1
+# Add x86-64 PM_TRACE support.
+%patch209 -p1
 
 #
 # PowerPC
@@ -2423,6 +2426,9 @@
 %endif
 
 %changelog
+* Fri May 25 2007 Dave Jones <davej at redhat.com>
+- Add x86-64 PM_TRACE support.
+
 * Thu May 24 2007 Chuck Ebbert <cebbert at redhat.com>
 - 2.6.21.3 incremental patch from mailing list
 




More information about the fedora-extras-commits mailing list