[PATCH 03/24] x86/traps: Move declaration of native_irq_return_iret up

From: Lai Jiangshan
Date: Tue Aug 31 2021 - 13:50:55 EST


From: Lai Jiangshan <laijs@xxxxxxxxxxxxxxxxx>

The declaration of native_irq_return_iret is used in exc_double_fault()
only by now. But it will be used in other place later, so the declaration
is moved up for preparation.

Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxxxxx>
---
arch/x86/entry/traps.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/entry/traps.c b/arch/x86/entry/traps.c
index a58800973aed..7869343473b7 100644
--- a/arch/x86/entry/traps.c
+++ b/arch/x86/entry/traps.c
@@ -65,6 +65,9 @@
#ifdef CONFIG_X86_64
#include <asm/x86_init.h>
#include <asm/proto.h>
+
+extern unsigned char native_irq_return_iret[];
+
#else
#include <asm/processor-flags.h>
#include <asm/setup.h>
@@ -356,8 +359,6 @@ DEFINE_IDTENTRY_DF(exc_double_fault)
#endif

#ifdef CONFIG_X86_ESPFIX64
- extern unsigned char native_irq_return_iret[];
-
/*
* If IRET takes a non-IST fault on the espfix64 stack, then we
* end up promoting it to a doublefault. In that case, take
--
2.19.1.6.gb485710b