linux/arch/powerpc/lib
Li Zhong 6f5405bc2e powerpc: use _GLOBAL_TOC for memmove
memmove may be called from module code copy_pages(btrfs), and it may
call memcpy, which may call back to C code, so it needs to use
_GLOBAL_TOC to set up r2 correctly.

This fixes following error when I tried to boot an le guest:

Vector: 300 (Data Access) at [c000000073f97210]
    pc: c000000000015004: enable_kernel_altivec+0x24/0x80
    lr: c000000000058fbc: enter_vmx_copy+0x3c/0x60
    sp: c000000073f97490
   msr: 8000000002009033
   dar: d000000001d50170
 dsisr: 40000000
  current = 0xc0000000734c0000
  paca    = 0xc00000000fff0000	 softe: 0	 irq_happened: 0x01
    pid   = 815, comm = mktemp
enter ? for help
[c000000073f974f0] c000000000058fbc enter_vmx_copy+0x3c/0x60
[c000000073f97510] c000000000057d34 memcpy_power7+0x274/0x840
[c000000073f97610] d000000001c3179c copy_pages+0xfc/0x110 [btrfs]
[c000000073f97660] d000000001c3c248 memcpy_extent_buffer+0xe8/0x160 [btrfs]
[c000000073f97700] d000000001be4be8 setup_items_for_insert+0x208/0x4a0 [btrfs]
[c000000073f97820] d000000001be50b4 btrfs_insert_empty_items+0xf4/0x140 [btrfs]
[c000000073f97890] d000000001bfed30 insert_with_overflow+0x70/0x180 [btrfs]
[c000000073f97900] d000000001bff174 btrfs_insert_dir_item+0x114/0x2f0 [btrfs]
[c000000073f979a0] d000000001c1f92c btrfs_add_link+0x10c/0x370 [btrfs]
[c000000073f97a40] d000000001c20e94 btrfs_create+0x204/0x270 [btrfs]
[c000000073f97b00] c00000000026d438 vfs_create+0x178/0x210
[c000000073f97b50] c000000000270a70 do_last+0x9f0/0xe90
[c000000073f97c20] c000000000271010 path_openat+0x100/0x810
[c000000073f97ce0] c000000000272ea8 do_filp_open+0x58/0xd0
[c000000073f97dc0] c00000000025ade8 do_sys_open+0x1b8/0x300
[c000000073f97e30] c00000000000a008 syscall_exit+0x0/0x7c

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2014-07-22 15:56:04 +10:00
..
alloc.c
checksum_32.S
checksum_64.S powerpc: Restore registers on error exit from csum_partial_copy_generic() 2013-10-03 17:22:42 +10:00
checksum_wrappers_64.c
code-patching.c powerpc: Move the patch_exception to a common place 2013-12-02 14:06:54 +11:00
copy_32.S
copypage_64.S powerpc: Exported functions __clear_user and copy_page use r2 so need _GLOBAL_TOC() 2014-06-05 13:20:41 +10:00
copypage_power7.S powerpc: Fix unsafe accesses to parameter area in ELFv2 2014-04-23 10:05:24 +10:00
copyuser_64.S powerpc: Add _GLOBAL_TOC for ABIv2 assembly functions exported to modules 2014-04-23 10:05:32 +10:00
copyuser_power7.S powerpc: Fix unsafe accesses to parameter area in ELFv2 2014-04-23 10:05:24 +10:00
crtsavres.S powerpc: Add vr save/restore functions 2014-01-15 13:46:43 +11:00
devres.c
div64.S
feature-fixups-test.S
feature-fixups.c
hweight_64.S powerpc: No need to use dot symbols when branching to a function 2014-04-23 10:05:16 +10:00
ldstfp.S
locks.c
Makefile powerpc: memcpy optimization for 64bit LE 2014-04-30 15:26:18 +10:00
mem_64.S powerpc: use _GLOBAL_TOC for memmove 2014-07-22 15:56:04 +10:00
memcpy_64.S Merge remote-tracking branch 'anton/abiv2' into next 2014-05-05 20:57:12 +10:00
memcpy_power7.S powerpc: Fix unsafe accesses to parameter area in ELFv2 2014-04-23 10:05:24 +10:00
rheap.c
sstep.c powerpc: Fix bugs in emulate_step() 2014-07-22 15:55:51 +10:00
string_64.S powerpc: Exported functions __clear_user and copy_page use r2 so need _GLOBAL_TOC() 2014-06-05 13:20:41 +10:00
string.S
usercopy_64.c
vmx-helper.c
xor_vmx.c powerpc: Add VMX optimised xor for RAID5 2013-10-30 16:02:28 +11:00