Commit 4dc1d28c authored by Thomas Gleixner's avatar Thomas Gleixner
Browse files

Merge branch 'objtool/core' into x86/entry

to base the irq stack modifications on.
parents 0bab9cb2 aafeb14e
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
@@ -7,9 +7,12 @@
 * Copyright (C) IBM Corporation, 2009
 */

#include <asm/byteorder.h>
/* insn_attr_t is defined in inat.h */
#include <asm/inat.h>

#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)

struct insn_field {
	union {
		insn_value_t value;
@@ -20,6 +23,48 @@ struct insn_field {
	unsigned char nbytes;
};

static inline void insn_field_set(struct insn_field *p, insn_value_t v,
				  unsigned char n)
{
	p->value = v;
	p->nbytes = n;
}

static inline void insn_set_byte(struct insn_field *p, unsigned char n,
				 insn_byte_t v)
{
	p->bytes[n] = v;
}

#else

struct insn_field {
	insn_value_t value;
	union {
		insn_value_t little;
		insn_byte_t bytes[4];
	};
	/* !0 if we've run insn_get_xxx() for this field */
	unsigned char got;
	unsigned char nbytes;
};

static inline void insn_field_set(struct insn_field *p, insn_value_t v,
				  unsigned char n)
{
	p->value = v;
	p->little = __cpu_to_le32(v);
	p->nbytes = n;
}

static inline void insn_set_byte(struct insn_field *p, unsigned char n,
				 insn_byte_t v)
{
	p->bytes[n] = v;
	p->value = __le32_to_cpu(p->little);
}
#endif

struct insn {
	struct insn_field prefixes;	/*
					 * Prefixes
+10 −0
Original line number Diff line number Diff line
@@ -40,6 +40,8 @@
#define ORC_REG_MAX			15

#ifndef __ASSEMBLY__
#include <asm/byteorder.h>

/*
 * This struct is more or less a vastly simplified version of the DWARF Call
 * Frame Information standard.  It contains only the necessary parts of DWARF
@@ -51,10 +53,18 @@
struct orc_entry {
	s16		sp_offset;
	s16		bp_offset;
#if defined(__LITTLE_ENDIAN_BITFIELD)
	unsigned	sp_reg:4;
	unsigned	bp_reg:4;
	unsigned	type:2;
	unsigned	end:1;
#elif defined(__BIG_ENDIAN_BITFIELD)
	unsigned	bp_reg:4;
	unsigned	sp_reg:4;
	unsigned	unused:5;
	unsigned	end:1;
	unsigned	type:2;
#endif
} __packed;

#endif /* __ASSEMBLY__ */
+2 −11
Original line number Diff line number Diff line
@@ -48,17 +48,8 @@
	UNWIND_HINT_REGS base=\base offset=\offset partial=1
.endm

.macro UNWIND_HINT_FUNC sp_offset=8
	UNWIND_HINT sp_reg=ORC_REG_SP sp_offset=\sp_offset type=UNWIND_HINT_TYPE_CALL
.endm

/*
 * RET_OFFSET: Used on instructions that terminate a function; mostly RETURN
 * and sibling calls. On these, sp_offset denotes the expected offset from
 * initial_func_cfi.
 */
.macro UNWIND_HINT_RET_OFFSET sp_offset=8
	UNWIND_HINT sp_reg=ORC_REG_SP type=UNWIND_HINT_TYPE_RET_OFFSET sp_offset=\sp_offset
.macro UNWIND_HINT_FUNC
	UNWIND_HINT sp_reg=ORC_REG_SP sp_offset=8 type=UNWIND_HINT_TYPE_FUNC
.endm

#endif /* __ASSEMBLY__ */
+0 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
OBJECT_FILES_NON_STANDARD_wakeup_$(BITS).o := y

obj-$(CONFIG_ACPI)		+= boot.o
obj-$(CONFIG_ACPI_SLEEP)	+= sleep.o wakeup_$(BITS).o
+4 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
.text
#include <linux/linkage.h>
#include <linux/objtool.h>
#include <asm/segment.h>
#include <asm/pgtable_types.h>
#include <asm/page_types.h>
#include <asm/msr.h>
#include <asm/asm-offsets.h>
#include <asm/frame.h>
#include <asm/nospec-branch.h>

# Copyright 2003 Pavel Machek <pavel@suse.cz

@@ -39,6 +41,7 @@ SYM_FUNC_START(wakeup_long64)
	movq	saved_rbp, %rbp

	movq	saved_rip, %rax
	ANNOTATE_RETPOLINE_SAFE
	jmp	*%rax
SYM_FUNC_END(wakeup_long64)

@@ -126,6 +129,7 @@ SYM_FUNC_START(do_suspend_lowlevel)
	FRAME_END
	jmp	restore_processor_state
SYM_FUNC_END(do_suspend_lowlevel)
STACK_FRAME_NON_STANDARD do_suspend_lowlevel

.data
saved_rbp:		.quad	0
Loading