diff options
author | Nigel Cunningham <nigel@nigel.suspend2.net> | 2007-07-21 11:10:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-21 21:37:10 -0400 |
commit | 44bf4cea43816d43deab73c1c16361e899996eaa (patch) | |
tree | 7ed3e6672f6abe3a68a79c77a7af125d0e0dab21 /drivers | |
parent | 9ef231a436fddb34d806f599c97b479691b3c38b (diff) |
x86: PM_TRACE support
Signed-off-by: Nigel Cunningham <nigel@nigel.suspend2.net>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Machek <pavel@ucw.cz>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/power/trace.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/power/trace.c b/drivers/base/power/trace.c index a9ab30fefffc..2b0c601e422e 100644 --- a/drivers/base/power/trace.c +++ b/drivers/base/power/trace.c | |||
@@ -142,6 +142,7 @@ void set_trace_device(struct device *dev) | |||
142 | { | 142 | { |
143 | dev_hash_value = hash_string(DEVSEED, dev->bus_id, DEVHASH); | 143 | dev_hash_value = hash_string(DEVSEED, dev->bus_id, DEVHASH); |
144 | } | 144 | } |
145 | EXPORT_SYMBOL(set_trace_device); | ||
145 | 146 | ||
146 | /* | 147 | /* |
147 | * We could just take the "tracedata" index into the .tracedata | 148 | * We could just take the "tracedata" index into the .tracedata |
@@ -162,6 +163,7 @@ void generate_resume_trace(void *tracedata, unsigned int user) | |||
162 | file_hash_value = hash_string(lineno, file, FILEHASH); | 163 | file_hash_value = hash_string(lineno, file, FILEHASH); |
163 | set_magic_time(user_hash_value, file_hash_value, dev_hash_value); | 164 | set_magic_time(user_hash_value, file_hash_value, dev_hash_value); |
164 | } | 165 | } |
166 | EXPORT_SYMBOL(generate_resume_trace); | ||
165 | 167 | ||
166 | extern char __tracedata_start, __tracedata_end; | 168 | extern char __tracedata_start, __tracedata_end; |
167 | static int show_file_hash(unsigned int value) | 169 | static int show_file_hash(unsigned int value) |
@@ -170,7 +172,8 @@ static int show_file_hash(unsigned int value) | |||
170 | char *tracedata; | 172 | char *tracedata; |
171 | 173 | ||
172 | match = 0; | 174 | match = 0; |
173 | for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; tracedata += 6) { | 175 | for (tracedata = &__tracedata_start ; tracedata < &__tracedata_end ; |
176 | tracedata += 2 + sizeof(unsigned long)) { | ||
174 | unsigned short lineno = *(unsigned short *)tracedata; | 177 | unsigned short lineno = *(unsigned short *)tracedata; |
175 | const char *file = *(const char **)(tracedata + 2); | 178 | const char *file = *(const char **)(tracedata + 2); |
176 | unsigned int hash = hash_string(lineno, file, FILEHASH); | 179 | unsigned int hash = hash_string(lineno, file, FILEHASH); |