powerpc/pseries: hcall functions are exported to modules, need _GLOBAL_TOC()
authorAnton Blanchard <anton@samba.org>
Tue, 13 May 2014 10:48:57 +0000 (20:48 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 5 Jun 2014 03:21:28 +0000 (13:21 +1000)
The hcall macros may call out to c code for tracing, so we need
to set up a valid r2. This fixes an oops found when testing
ibmvscsi as a module.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/hvCall.S

index 7891a86066e82dadeb0a66c56b75e233ca83c488..99ecf0a5a92904de67d073c82d0d83be45dbf26a 100644 (file)
@@ -106,7 +106,7 @@ END_FTR_SECTION(0, 1);                                              \
 
        .text
 
-_GLOBAL(plpar_hcall_norets)
+_GLOBAL_TOC(plpar_hcall_norets)
        HMT_MEDIUM
 
        mfcr    r0
@@ -122,7 +122,7 @@ _GLOBAL(plpar_hcall_norets)
        mtcrf   0xff,r0
        blr                             /* return r3 = status */
 
-_GLOBAL(plpar_hcall)
+_GLOBAL_TOC(plpar_hcall)
        HMT_MEDIUM
 
        mfcr    r0
@@ -188,7 +188,7 @@ _GLOBAL(plpar_hcall_raw)
 
        blr                             /* return r3 = status */
 
-_GLOBAL(plpar_hcall9)
+_GLOBAL_TOC(plpar_hcall9)
        HMT_MEDIUM
 
        mfcr    r0