Thanks David and Mark!
I merged the pan 4.1 branch into lsk. the following is conflict solution. Could you like review it?
commit 8fe55b915599dc7ad78f63a3b93dc1753f178dca Merge: 6844488 4cf4454 Author: Alex Shi alex.shi@linaro.org Date: Tue Dec 8 14:33:14 2015 +0800
Merge branch 'davidb/pan-4.1' of https://git.linaro.org/people/david.brown/linux-lsk into linux-linaro-lsk-v4.1
Conflicts solution: /* compatible with 589cb22 arm64: compat: fix stxr failure case in SWP emulation */ arch/arm64/kernel/armv8_deprecated.c
diff --cc arch/arm64/kernel/armv8_deprecated.c index 7ac3920,bcee7ab..937f5e5 --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c @@@ -279,24 -282,26 +282,28 @@@ static void register_insn_emulation_sys */ #define __user_swpX_asm(data, addr, res, temp, B) \ __asm__ __volatile__( \ + ALTERNATIVE("nop", SET_PSTATE_PAN(0), ARM64_HAS_PAN, \ + CONFIG_ARM64_PAN) \ - " mov %w2, %w1\n" \ - "0: ldxr"B" %w1, [%3]\n" \ - "1: stxr"B" %w0, %w2, [%3]\n" \ + "0: ldxr"B" %w2, [%3]\n" \ + "1: stxr"B" %w0, %w1, [%3]\n" \ " cbz %w0, 2f\n" \ " mov %w0, %w4\n" \ + " b 3f\n" \ "2:\n" \ + " mov %w1, %w2\n" \ + "3:\n" \ " .pushsection .fixup,"ax"\n" \ " .align 2\n" \ - "3: mov %w0, %w5\n" \ - " b 2b\n" \ + "4: mov %w0, %w5\n" \ + " b 3b\n" \ " .popsection" \ " .pushsection __ex_table,"a"\n" \ " .align 3\n" \ - " .quad 0b, 3b\n" \ - " .quad 1b, 3b\n" \ + " .quad 0b, 4b\n" \ + " .quad 1b, 4b\n" \ " .popsection\n" \ + ALTERNATIVE("nop", SET_PSTATE_PAN(1), ARM64_HAS_PAN, \ + CONFIG_ARM64_PAN) \ : "=&r" (res), "+r" (data), "=&r" (temp) \ : "r" (addr), "i" (-EAGAIN), "i" (-EFAULT) \ : "memory")