diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-05-17 07:58:08 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-17 07:58:08 +0200 |
commit | cffc32975da7df2ef909299c47ff644e1357e0ac (patch) | |
tree | 04cfa6276b890f49f686d65be7397c4232ac44af /arch/x86/include | |
parent | 6dc178760553605c58d78bd403dfcb4e042c5b72 (diff) | |
parent | adeb5537849d9db428fe0ddc3562e5a765a347e2 (diff) | |
download | talos-obmc-linux-cffc32975da7df2ef909299c47ff644e1357e0ac.tar.gz talos-obmc-linux-cffc32975da7df2ef909299c47ff644e1357e0ac.zip |
Merge branch 'x86/asm' into x86/apic, to resolve conflicts
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/asm.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/x86/include/asm/asm.h b/arch/x86/include/asm/asm.h index 7730c1c5c83a..189679aba703 100644 --- a/arch/x86/include/asm/asm.h +++ b/arch/x86/include/asm/asm.h @@ -63,6 +63,31 @@ _ASM_ALIGN ; \ _ASM_PTR (entry); \ .popsection + +.macro ALIGN_DESTINATION + /* check for bad alignment of destination */ + movl %edi,%ecx + andl $7,%ecx + jz 102f /* already aligned */ + subl $8,%ecx + negl %ecx + subl %ecx,%edx +100: movb (%rsi),%al +101: movb %al,(%rdi) + incq %rsi + incq %rdi + decl %ecx + jnz 100b +102: + .section .fixup,"ax" +103: addl %ecx,%edx /* ecx is zerorest also */ + jmp copy_user_handle_tail + .previous + + _ASM_EXTABLE(100b,103b) + _ASM_EXTABLE(101b,103b) + .endm + #else # define _ASM_EXTABLE(from,to) \ " .pushsection \"__ex_table\",\"a\"\n" \ |