Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 228ffba2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull misc fixes from Thomas Gleixner:
 "This update contains:

   - a fix for stomp-machine so the nmi_watchdog wont trigger on the cpu
     waiting for the others to execute the callback

   - various fixes and updates to objtool including an resync of the
     instruction decoder to match the kernel's decoder"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  objtool: Un-capitalize "Warning" for out-of-sync instruction decoder
  objtool: Resync x86 instruction decoder with the kernel's
  objtool: Support new GCC 6 switch jump table pattern
  stop_machine: Touch_nmi_watchdog() after MULTI_STOP_PREPARE
  objtool: Add 'fixdep' to objtool/.gitignore
parents f64d6e2a 2af04ea5
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/smpboot.h>
#include <linux/smpboot.h>
#include <linux/atomic.h>
#include <linux/atomic.h>
#include <linux/lglock.h>
#include <linux/lglock.h>
#include <linux/nmi.h>


/*
/*
 * Structure to determine completion condition and record errors.  May
 * Structure to determine completion condition and record errors.  May
@@ -209,6 +210,13 @@ static int multi_cpu_stop(void *data)
				break;
				break;
			}
			}
			ack_state(msdata);
			ack_state(msdata);
		} else if (curstate > MULTI_STOP_PREPARE) {
			/*
			 * At this stage all other CPUs we depend on must spin
			 * in the same loop. Any reason for hard-lockup should
			 * be detected and reported on their side.
			 */
			touch_nmi_watchdog();
		}
		}
	} while (curstate != MULTI_STOP_EXIT);
	} while (curstate != MULTI_STOP_EXIT);


+1 −0
Original line number Original line Diff line number Diff line
arch/x86/insn/inat-tables.c
arch/x86/insn/inat-tables.c
objtool
objtool
fixdep
+1 −1
Original line number Original line Diff line number Diff line
@@ -51,7 +51,7 @@ $(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN)
	diff -I'^#include' arch/x86/insn/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \
	diff -I'^#include' arch/x86/insn/insn.h ../../arch/x86/include/asm/insn.h >/dev/null && \
	diff -I'^#include' arch/x86/insn/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \
	diff -I'^#include' arch/x86/insn/inat.h ../../arch/x86/include/asm/inat.h >/dev/null && \
	diff -I'^#include' arch/x86/insn/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \
	diff -I'^#include' arch/x86/insn/inat_types.h ../../arch/x86/include/asm/inat_types.h >/dev/null) \
	|| echo "Warning: objtool: x86 instruction decoder differs from kernel" >&2 )) || true
	|| echo "warning: objtool: x86 instruction decoder differs from kernel" >&2 )) || true
	$(QUIET_LINK)$(CC) $(OBJTOOL_IN) $(LDFLAGS) -o $@
	$(QUIET_LINK)$(CC) $(OBJTOOL_IN) $(LDFLAGS) -o $@




+8 −3
Original line number Original line Diff line number Diff line
@@ -72,12 +72,14 @@ BEGIN {
	lprefix_expr = "\\((66|F2|F3)\\)"
	lprefix_expr = "\\((66|F2|F3)\\)"
	max_lprefix = 4
	max_lprefix = 4


	# All opcodes starting with lower-case 'v' or with (v1) superscript
	# All opcodes starting with lower-case 'v', 'k' or with (v1) superscript
	# accepts VEX prefix
	# accepts VEX prefix
	vexok_opcode_expr = "^v.*"
	vexok_opcode_expr = "^[vk].*"
	vexok_expr = "\\(v1\\)"
	vexok_expr = "\\(v1\\)"
	# All opcodes with (v) superscript supports *only* VEX prefix
	# All opcodes with (v) superscript supports *only* VEX prefix
	vexonly_expr = "\\(v\\)"
	vexonly_expr = "\\(v\\)"
	# All opcodes with (ev) superscript supports *only* EVEX prefix
	evexonly_expr = "\\(ev\\)"


	prefix_expr = "\\(Prefix\\)"
	prefix_expr = "\\(Prefix\\)"
	prefix_num["Operand-Size"] = "INAT_PFX_OPNDSZ"
	prefix_num["Operand-Size"] = "INAT_PFX_OPNDSZ"
@@ -95,6 +97,7 @@ BEGIN {
	prefix_num["Address-Size"] = "INAT_PFX_ADDRSZ"
	prefix_num["Address-Size"] = "INAT_PFX_ADDRSZ"
	prefix_num["VEX+1byte"] = "INAT_PFX_VEX2"
	prefix_num["VEX+1byte"] = "INAT_PFX_VEX2"
	prefix_num["VEX+2byte"] = "INAT_PFX_VEX3"
	prefix_num["VEX+2byte"] = "INAT_PFX_VEX3"
	prefix_num["EVEX"] = "INAT_PFX_EVEX"


	clear_vars()
	clear_vars()
}
}
@@ -319,7 +322,9 @@ function convert_operands(count,opnd, i,j,imm,mod)
			flags = add_flags(flags, "INAT_MODRM")
			flags = add_flags(flags, "INAT_MODRM")


		# check VEX codes
		# check VEX codes
		if (match(ext, vexonly_expr))
		if (match(ext, evexonly_expr))
			flags = add_flags(flags, "INAT_VEXOK | INAT_EVEXONLY")
		else if (match(ext, vexonly_expr))
			flags = add_flags(flags, "INAT_VEXOK | INAT_VEXONLY")
			flags = add_flags(flags, "INAT_VEXOK | INAT_VEXONLY")
		else if (match(ext, vexok_expr) || match(opcode, vexok_opcode_expr))
		else if (match(ext, vexok_expr) || match(opcode, vexok_opcode_expr))
			flags = add_flags(flags, "INAT_VEXOK")
			flags = add_flags(flags, "INAT_VEXOK")
+15 −2
Original line number Original line Diff line number Diff line
@@ -48,6 +48,7 @@
/* AVX VEX prefixes */
/* AVX VEX prefixes */
#define INAT_PFX_VEX2	13	/* 2-bytes VEX prefix */
#define INAT_PFX_VEX2	13	/* 2-bytes VEX prefix */
#define INAT_PFX_VEX3	14	/* 3-bytes VEX prefix */
#define INAT_PFX_VEX3	14	/* 3-bytes VEX prefix */
#define INAT_PFX_EVEX	15	/* EVEX prefix */


#define INAT_LSTPFX_MAX	3
#define INAT_LSTPFX_MAX	3
#define INAT_LGCPFX_MAX	11
#define INAT_LGCPFX_MAX	11
@@ -89,6 +90,7 @@
#define INAT_VARIANT	(1 << (INAT_FLAG_OFFS + 4))
#define INAT_VARIANT	(1 << (INAT_FLAG_OFFS + 4))
#define INAT_VEXOK	(1 << (INAT_FLAG_OFFS + 5))
#define INAT_VEXOK	(1 << (INAT_FLAG_OFFS + 5))
#define INAT_VEXONLY	(1 << (INAT_FLAG_OFFS + 6))
#define INAT_VEXONLY	(1 << (INAT_FLAG_OFFS + 6))
#define INAT_EVEXONLY	(1 << (INAT_FLAG_OFFS + 7))
/* Attribute making macros for attribute tables */
/* Attribute making macros for attribute tables */
#define INAT_MAKE_PREFIX(pfx)	(pfx << INAT_PFX_OFFS)
#define INAT_MAKE_PREFIX(pfx)	(pfx << INAT_PFX_OFFS)
#define INAT_MAKE_ESCAPE(esc)	(esc << INAT_ESC_OFFS)
#define INAT_MAKE_ESCAPE(esc)	(esc << INAT_ESC_OFFS)
@@ -141,7 +143,13 @@ static inline int inat_last_prefix_id(insn_attr_t attr)
static inline int inat_is_vex_prefix(insn_attr_t attr)
static inline int inat_is_vex_prefix(insn_attr_t attr)
{
{
	attr &= INAT_PFX_MASK;
	attr &= INAT_PFX_MASK;
	return attr == INAT_PFX_VEX2 || attr == INAT_PFX_VEX3;
	return attr == INAT_PFX_VEX2 || attr == INAT_PFX_VEX3 ||
	       attr == INAT_PFX_EVEX;
}

static inline int inat_is_evex_prefix(insn_attr_t attr)
{
	return (attr & INAT_PFX_MASK) == INAT_PFX_EVEX;
}
}


static inline int inat_is_vex3_prefix(insn_attr_t attr)
static inline int inat_is_vex3_prefix(insn_attr_t attr)
@@ -216,6 +224,11 @@ static inline int inat_accept_vex(insn_attr_t attr)


static inline int inat_must_vex(insn_attr_t attr)
static inline int inat_must_vex(insn_attr_t attr)
{
{
	return attr & INAT_VEXONLY;
	return attr & (INAT_VEXONLY | INAT_EVEXONLY);
}

static inline int inat_must_evex(insn_attr_t attr)
{
	return attr & INAT_EVEXONLY;
}
}
#endif
#endif
Loading