1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _I386_ALTERNATIVE_H
13#define _I386_ALTERNATIVE_H
14
15#include <asm/types.h>
16#include <linux/stddef.h>
17#include <linux/types.h>
18
19struct alt_instr {
20 u8 *instr;
21 u8 *replacement;
22 u8 cpuid;
23 u8 instrlen;
24 u8 replacementlen;
25 u8 pad;
26};
27
28struct module;
29#define alternative(oldinstr, newinstr, feature)   asm volatile ("661:\n\t" oldinstr "\n662:\n"   ".section .altinstructions,\"a\"\n"   "  .align 4\n"   "  .long 661b\n"     "  .long 663f\n"     "  .byte %c0\n"     "  .byte 662b-661b\n"     "  .byte 664f-663f\n"     ".previous\n"   ".section .altinstr_replacement,\"ax\"\n"   "663:\n\t" newinstr "\n664:\n"    ".previous" :: "i" (feature) : "memory")
30#define alternative_input(oldinstr, newinstr, feature, input...)   asm volatile ("661:\n\t" oldinstr "\n662:\n"   ".section .altinstructions,\"a\"\n"   "  .align 4\n"   "  .long 661b\n"     "  .long 663f\n"     "  .byte %c0\n"     "  .byte 662b-661b\n"     "  .byte 664f-663f\n"     ".previous\n"   ".section .altinstr_replacement,\"ax\"\n"   "663:\n\t" newinstr "\n664:\n"    ".previous" :: "i" (feature), ##input)
31#define alternative_io(oldinstr, newinstr, feature, output, input...)   asm volatile ("661:\n\t" oldinstr "\n662:\n"   ".section .altinstructions,\"a\"\n"   "  .align 4\n"   "  .long 661b\n"     "  .long 663f\n"     "  .byte %c[feat]\n"     "  .byte 662b-661b\n"     "  .byte 664f-663f\n"     ".previous\n"   ".section .altinstr_replacement,\"ax\"\n"   "663:\n\t" newinstr "\n664:\n"     ".previous" : output : [feat] "i" (feature), ##input)
32#define ASM_OUTPUT2(a, b) a, b
33#define LOCK_PREFIX ""
34
35#define __parainstructions NULL
36#define __parainstructions_end NULL
37
38#endif
39