@@ -8,10 +8,10 @@
do { \
if (pm_trace_enabled) { \
const void *tracedata; \
- asm volatile(_ASM_MOV " $1f,%0\n" \
+ asm volatile("lea " _ASM_RIP(1f) ", %0\n" \
".section .tracedata,\"a\"\n" \
"1:\t.word %c1\n\t" \
- _ASM_PTR " %c2\n" \
+ ".long %c2 - .\n" \
".previous" \
:"=r" (tracedata) \
: "i" (__LINE__), "i" (__FILE__)); \
@@ -167,7 +167,7 @@ EXPORT_SYMBOL(set_trace_device);
void generate_pm_trace(const void *tracedata, unsigned int user)
{
unsigned short lineno = *(unsigned short *)tracedata;
- const char *file = *(const char **)(tracedata + 2);
+ const char *file = offset_to_ptr((int *)(tracedata + 2));
unsigned int user_hash_value, file_hash_value;
if (!x86_platform.legacy.rtc)
@@ -187,9 +187,9 @@ static int show_file_hash(unsigned int value)
match = 0;
for (tracedata = __tracedata_start ; tracedata < __tracedata_end ;
- tracedata += 2 + sizeof(unsigned long)) {
+ tracedata += 2 + sizeof(int)) {
unsigned short lineno = *(unsigned short *)tracedata;
- const char *file = *(const char **)(tracedata + 2);
+ const char *file = offset_to_ptr((int *)(tracedata + 2));
unsigned int hash = hash_string(lineno, file, FILEHASH);
if (hash != value)
continue;