-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlpnhEgACgkQONu9yGCS aT6wiBAAszhEwuUQy79/r5C8BTgpQNkt7rGWwZGRMz/nd/FTZSdJjZCI93NdT144 2i9x0ejQXkdpld2Al3Rl5GOlqEw43XTWqgiU3h/fW4nS+l/gpVZu2b9/2jsmsz36 cJGikTqwofs8wMzIlrAvfHIdXKrEAzeIbsp1NuDFq7WTdeUGorzu4ZSw7MfjQN70 tXSctd1IAhr776p6OqihVkasKV4S3D83vowivpvSCRsHR8HmmtS2kIl9QlHwNJo6 KzH3z5DHupJev+qYMsy7AucZjiDuQbXCw+9kPb9jAqFC00fBOng6DwNA63DaAL7N QIx+tGJNUT/OPJTl0oift33Zg2fWALmsoSqHH6eJal7XjcP0sSLEnF91ayWms+BQ m8qURMCYFShguk3om9jO4yZr6C+YbaqXxqGnhjPhnX2TvueUf7zTinXUk6d3JEfX wnaugvqHyzWdPdxCOdBkUJ7YWRoODRKKrCHIB17A9063bZN0PombhimAPOR69NC5 kqd0bzK/lnY7OUGHipK/nfPRVJfSJlR43AFehaloowI/6hUe057v2bc3IQgTBUf1 kqX5wQD/VfhEtVibk5GomsgE/ERBkhIqpKNhm5U+/Qe2szO/XiKYuh3rEKGsTXus 0vx+TqIFpKt+oSY5rhtv9coRJov5kMnw2PYVsO+qr2TQ6TMILyQ= =nlXw -----END PGP SIGNATURE----- Merge 4.4.113 into android-4.4 Changes in 4.4.113 gcov: disable for COMPILE_TEST x86/cpu/AMD: Make LFENCE a serializing instruction x86/cpu/AMD: Use LFENCE_RDTSC in preference to MFENCE_RDTSC x86/mm/32: Move setup_clear_cpu_cap(X86_FEATURE_PCID) earlier x86/asm: Use register variable to get stack pointer value x86/kbuild: enable modversions for symbols exported from asm x86/asm: Make asm/alternative.h safe from assembly EXPORT_SYMBOL() for asm kconfig.h: use __is_defined() to check if MODULE is defined x86/retpoline: Add initial retpoline support x86/spectre: Add boot time option to select Spectre v2 mitigation x86/retpoline/crypto: Convert crypto assembler indirect jumps x86/retpoline/entry: Convert entry assembler indirect jumps x86/retpoline/ftrace: Convert ftrace assembler indirect jumps x86/retpoline/hyperv: Convert assembler indirect jumps x86/retpoline/xen: Convert Xen hypercall indirect jumps x86/retpoline/checksum32: Convert assembler indirect jumps x86/retpoline/irq32: Convert assembler indirect jumps x86/retpoline: Fill return stack buffer on vmexit x86/retpoline: Remove compile time warning scsi: sg: disable SET_FORCE_LOW_DMA futex: Prevent overflow by strengthen input validation ALSA: pcm: Remove yet superfluous WARN_ON() ALSA: hda - Apply headphone noise quirk for another Dell XPS 13 variant ALSA: hda - Apply the existing quirk to iMac 14,1 af_key: fix buffer overread in verify_address_len() af_key: fix buffer overread in parse_exthdrs() scsi: hpsa: fix volume offline state sched/deadline: Zero out positive runtime after throttling constrained tasks x86/retpoline: Add LFENCE to the retpoline/RSB filling RSB macros module: Add retpoline tag to VERMAGIC pipe: avoid round_pipe_size() nr_pages overflow on 32-bit x86/apic/vector: Fix off by one in error path Input: 88pm860x-ts - fix child-node lookup Input: twl6040-vibra - fix DT node memory management Input: twl6040-vibra - fix child-node lookup Input: twl4030-vibra - fix sibling-node lookup tracing: Fix converting enum's from the map in trace_event_eval_update() phy: work around 'phys' references to usb-nop-xceiv devices ARM: dts: kirkwood: fix pin-muxing of MPP7 on OpenBlocks A7 can: peak: fix potential bug in packet fragmentation libata: apply MAX_SEC_1024 to all LITEON EP1 series devices dm btree: fix serious bug in btree_split_beneath() dm thin metadata: THIN_MAX_CONCURRENT_LOCKS should be 6 arm64: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls x86/cpu, x86/pti: Do not enable PTI on AMD processors kbuild: modversions for EXPORT_SYMBOL() for asm x86/mce: Make machine check speculation protected retpoline: Introduce start/end markers of indirect thunk kprobes/x86: Blacklist indirect thunk functions for kprobes kprobes/x86: Disable optimizing on the function jumps to indirect thunk x86/pti: Document fix wrong index x86/retpoline: Optimize inline assembler for vmexit_fill_RSB MIPS: AR7: ensure the port type's FCR value is used Linux 4.4.113 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
120 lines
3 KiB
C
120 lines
3 KiB
C
#ifndef _ASM_X86_ASM_H
|
|
#define _ASM_X86_ASM_H
|
|
|
|
#ifdef __ASSEMBLY__
|
|
# define __ASM_FORM(x) x
|
|
# define __ASM_FORM_RAW(x) x
|
|
# define __ASM_FORM_COMMA(x) x,
|
|
#else
|
|
# define __ASM_FORM(x) " " #x " "
|
|
# define __ASM_FORM_RAW(x) #x
|
|
# define __ASM_FORM_COMMA(x) " " #x ","
|
|
#endif
|
|
|
|
#ifdef CONFIG_X86_32
|
|
# define __ASM_SEL(a,b) __ASM_FORM(a)
|
|
# define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(a)
|
|
#else
|
|
# define __ASM_SEL(a,b) __ASM_FORM(b)
|
|
# define __ASM_SEL_RAW(a,b) __ASM_FORM_RAW(b)
|
|
#endif
|
|
|
|
#define __ASM_SIZE(inst, ...) __ASM_SEL(inst##l##__VA_ARGS__, \
|
|
inst##q##__VA_ARGS__)
|
|
#define __ASM_REG(reg) __ASM_SEL_RAW(e##reg, r##reg)
|
|
|
|
#define _ASM_PTR __ASM_SEL(.long, .quad)
|
|
#define _ASM_ALIGN __ASM_SEL(.balign 4, .balign 8)
|
|
|
|
#define _ASM_MOV __ASM_SIZE(mov)
|
|
#define _ASM_INC __ASM_SIZE(inc)
|
|
#define _ASM_DEC __ASM_SIZE(dec)
|
|
#define _ASM_ADD __ASM_SIZE(add)
|
|
#define _ASM_SUB __ASM_SIZE(sub)
|
|
#define _ASM_XADD __ASM_SIZE(xadd)
|
|
#define _ASM_MUL __ASM_SIZE(mul)
|
|
|
|
#define _ASM_AX __ASM_REG(ax)
|
|
#define _ASM_BX __ASM_REG(bx)
|
|
#define _ASM_CX __ASM_REG(cx)
|
|
#define _ASM_DX __ASM_REG(dx)
|
|
#define _ASM_SP __ASM_REG(sp)
|
|
#define _ASM_BP __ASM_REG(bp)
|
|
#define _ASM_SI __ASM_REG(si)
|
|
#define _ASM_DI __ASM_REG(di)
|
|
|
|
/* Exception table entry */
|
|
#ifdef __ASSEMBLY__
|
|
# define _ASM_EXTABLE(from,to) \
|
|
.pushsection "__ex_table","a" ; \
|
|
.balign 8 ; \
|
|
.long (from) - . ; \
|
|
.long (to) - . ; \
|
|
.popsection
|
|
|
|
# define _ASM_EXTABLE_EX(from,to) \
|
|
.pushsection "__ex_table","a" ; \
|
|
.balign 8 ; \
|
|
.long (from) - . ; \
|
|
.long (to) - . + 0x7ffffff0 ; \
|
|
.popsection
|
|
|
|
# define _ASM_NOKPROBE(entry) \
|
|
.pushsection "_kprobe_blacklist","aw" ; \
|
|
_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" \
|
|
" .balign 8\n" \
|
|
" .long (" #from ") - .\n" \
|
|
" .long (" #to ") - .\n" \
|
|
" .popsection\n"
|
|
|
|
# define _ASM_EXTABLE_EX(from,to) \
|
|
" .pushsection \"__ex_table\",\"a\"\n" \
|
|
" .balign 8\n" \
|
|
" .long (" #from ") - .\n" \
|
|
" .long (" #to ") - . + 0x7ffffff0\n" \
|
|
" .popsection\n"
|
|
/* For C file, we already have NOKPROBE_SYMBOL macro */
|
|
#endif
|
|
|
|
#ifndef __ASSEMBLY__
|
|
/*
|
|
* This output constraint should be used for any inline asm which has a "call"
|
|
* instruction. Otherwise the asm may be inserted before the frame pointer
|
|
* gets set up by the containing function. If you forget to do this, objtool
|
|
* may print a "call without frame pointer save/setup" warning.
|
|
*/
|
|
register unsigned long current_stack_pointer asm(_ASM_SP);
|
|
#define ASM_CALL_CONSTRAINT "+r" (current_stack_pointer)
|
|
#endif
|
|
|
|
#endif /* _ASM_X86_ASM_H */
|