Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[cascardo/linux.git] / arch / powerpc / kernel / misc_64.S
index 3d02495..4e314b9 100644 (file)
@@ -34,7 +34,7 @@ _GLOBAL(call_do_softirq)
        std     r0,16(r1)
        stdu    r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r3)
        mr      r1,r3
-       bl      .__do_softirq
+       bl      __do_softirq
        ld      r1,0(r1)
        ld      r0,16(r1)
        mtlr    r0
@@ -45,7 +45,7 @@ _GLOBAL(call_do_irq)
        std     r0,16(r1)
        stdu    r1,THREAD_SIZE-STACK_FRAME_OVERHEAD(r4)
        mr      r1,r4
-       bl      .__do_irq
+       bl      __do_irq
        ld      r1,0(r1)
        ld      r0,16(r1)
        mtlr    r0
@@ -506,7 +506,7 @@ _GLOBAL(kexec_smp_wait)
        stb     r4,PACAKEXECSTATE(r13)
        SYNC
 
-       b       .kexec_wait
+       b       kexec_wait
 
 /*
  * switch to real mode (turn mmu off)
@@ -576,7 +576,7 @@ _GLOBAL(kexec_sequence)
 
        /* copy dest pages, flush whole dest image */
        mr      r3,r29
-       bl      .kexec_copy_flush       /* (image) */
+       bl      kexec_copy_flush        /* (image) */
 
        /* turn off mmu */
        bl      real_mode
@@ -586,7 +586,7 @@ _GLOBAL(kexec_sequence)
        mr      r4,r30          /* start, aka phys mem offset */
        li      r5,0x100
        li      r6,0
-       bl      .copy_and_flush /* (dest, src, copy limit, start offset) */
+       bl      copy_and_flush  /* (dest, src, copy limit, start offset) */
 1:     /* assume normal blr return */
 
        /* release other cpus to the new kernel secondary start at 0x60 */
@@ -595,8 +595,12 @@ _GLOBAL(kexec_sequence)
        stw     r6,kexec_flag-1b(5)
 
        /* clear out hardware hash page table and tlb */
-       ld      r5,0(r27)               /* deref function descriptor */
-       mtctr   r5
+#if !defined(_CALL_ELF) || _CALL_ELF != 2
+       ld      r12,0(r27)              /* deref function descriptor */
+#else
+       mr      r12,r27
+#endif
+       mtctr   r12
        bctrl                           /* ppc_md.hpte_clear_all(void); */
 
 /*
@@ -630,3 +634,31 @@ _GLOBAL(kexec_sequence)
        li      r5,0
        blr     /* image->start(physid, image->start, 0); */
 #endif /* CONFIG_KEXEC */
+
+#ifdef CONFIG_MODULES
+#if defined(_CALL_ELF) && _CALL_ELF == 2
+
+#ifdef CONFIG_MODVERSIONS
+.weak __crc_TOC.
+.section "___kcrctab+TOC.","a"
+.globl __kcrctab_TOC.
+__kcrctab_TOC.:
+       .llong  __crc_TOC.
+#endif
+
+/*
+ * Export a fake .TOC. since both modpost and depmod will complain otherwise.
+ * Both modpost and depmod strip the leading . so we do the same here.
+ */
+.section "__ksymtab_strings","a"
+__kstrtab_TOC.:
+       .asciz "TOC."
+
+.section "___ksymtab+TOC.","a"
+/* This symbol name is important: it's used by modpost to find exported syms */
+.globl __ksymtab_TOC.
+__ksymtab_TOC.:
+       .llong 0 /* .value */
+       .llong __kstrtab_TOC.
+#endif /* ELFv2 */
+#endif /* MODULES */