diff options
Diffstat (limited to 'include/asm-s390/percpu.h')
-rw-r--r-- | include/asm-s390/percpu.h | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/include/asm-s390/percpu.h b/include/asm-s390/percpu.h index 28b3517e787c..495ad99c7635 100644 --- a/include/asm-s390/percpu.h +++ b/include/asm-s390/percpu.h | |||
@@ -15,18 +15,20 @@ | |||
15 | */ | 15 | */ |
16 | #if defined(__s390x__) && defined(MODULE) | 16 | #if defined(__s390x__) && defined(MODULE) |
17 | 17 | ||
18 | #define __reloc_hide(var,offset) \ | 18 | #define __reloc_hide(var,offset) (*({ \ |
19 | (*({ unsigned long *__ptr; \ | 19 | extern int simple_indentifier_##var(void); \ |
20 | asm ( "larl %0,per_cpu__"#var"@GOTENT" \ | 20 | unsigned long *__ptr; \ |
21 | : "=a" (__ptr) : "X" (per_cpu__##var) ); \ | 21 | asm ( "larl %0,per_cpu__"#var"@GOTENT" \ |
22 | (typeof(&per_cpu__##var))((*__ptr) + (offset)); })) | 22 | : "=a" (__ptr) : "X" (per_cpu__##var) ); \ |
23 | (typeof(&per_cpu__##var))((*__ptr) + (offset)); })) | ||
23 | 24 | ||
24 | #else | 25 | #else |
25 | 26 | ||
26 | #define __reloc_hide(var, offset) \ | 27 | #define __reloc_hide(var, offset) (*({ \ |
27 | (*({ unsigned long __ptr; \ | 28 | extern int simple_indentifier_##var(void); \ |
28 | asm ( "" : "=a" (__ptr) : "0" (&per_cpu__##var) ); \ | 29 | unsigned long __ptr; \ |
29 | (typeof(&per_cpu__##var)) (__ptr + (offset)); })) | 30 | asm ( "" : "=a" (__ptr) : "0" (&per_cpu__##var) ); \ |
31 | (typeof(&per_cpu__##var)) (__ptr + (offset)); })) | ||
30 | 32 | ||
31 | #endif | 33 | #endif |
32 | 34 | ||