summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-02-04 14:43:30 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-02-04 14:43:30 -0500
commit0a646e9c992e4846665dc995c86f30c599cda64c (patch)
treec403485e5093b1016e5c70ce04a555201e7056f3 /arch/x86
parentf74a127f667faa9691ed3c4d584134a7a21a8647 (diff)
parent328008a72d38b5bde6491e463405c34a81a65d3e (diff)
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner: "A small set of changes: - a fixup for kexec related to 5-level paging mode. That covers most of the cases except kexec from a 5-level kernel to a 4-level kernel. The latter needs more work and is going to come in 4.17 - two trivial fixes for build warnings triggered by LTO and gcc-8" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/power: Fix swsusp_arch_resume prototype x86/dumpstack: Avoid uninitlized variable x86/kexec: Make kexec (mostly) work in 5-level paging mode
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/dumpstack.c2
-rw-r--r--arch/x86/kernel/relocate_kernel_64.S8
-rw-r--r--arch/x86/power/hibernate_32.c2
-rw-r--r--arch/x86/power/hibernate_64.c2
4 files changed, 11 insertions, 3 deletions
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
index afbecff161d1..a2d8a3908670 100644
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -109,7 +109,7 @@ void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
109 struct stack_info stack_info = {0}; 109 struct stack_info stack_info = {0};
110 unsigned long visit_mask = 0; 110 unsigned long visit_mask = 0;
111 int graph_idx = 0; 111 int graph_idx = 0;
112 bool partial; 112 bool partial = false;
113 113
114 printk("%sCall Trace:\n", log_lvl); 114 printk("%sCall Trace:\n", log_lvl);
115 115
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S
index 307d3bac5f04..11eda21eb697 100644
--- a/arch/x86/kernel/relocate_kernel_64.S
+++ b/arch/x86/kernel/relocate_kernel_64.S
@@ -68,6 +68,9 @@ relocate_kernel:
68 movq %cr4, %rax 68 movq %cr4, %rax
69 movq %rax, CR4(%r11) 69 movq %rax, CR4(%r11)
70 70
71 /* Save CR4. Required to enable the right paging mode later. */
72 movq %rax, %r13
73
71 /* zero out flags, and disable interrupts */ 74 /* zero out flags, and disable interrupts */
72 pushq $0 75 pushq $0
73 popfq 76 popfq
@@ -126,8 +129,13 @@ identity_mapped:
126 /* 129 /*
127 * Set cr4 to a known state: 130 * Set cr4 to a known state:
128 * - physical address extension enabled 131 * - physical address extension enabled
132 * - 5-level paging, if it was enabled before
129 */ 133 */
130 movl $X86_CR4_PAE, %eax 134 movl $X86_CR4_PAE, %eax
135 testq $X86_CR4_LA57, %r13
136 jz 1f
137 orl $X86_CR4_LA57, %eax
1381:
131 movq %rax, %cr4 139 movq %rax, %cr4
132 140
133 jmp 1f 141 jmp 1f
diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c
index c35fdb585c68..afc4ed7b1578 100644
--- a/arch/x86/power/hibernate_32.c
+++ b/arch/x86/power/hibernate_32.c
@@ -145,7 +145,7 @@ static inline void resume_init_first_level_page_table(pgd_t *pg_dir)
145#endif 145#endif
146} 146}
147 147
148int swsusp_arch_resume(void) 148asmlinkage int swsusp_arch_resume(void)
149{ 149{
150 int error; 150 int error;
151 151
diff --git a/arch/x86/power/hibernate_64.c b/arch/x86/power/hibernate_64.c
index f910c514438f..0ef5e5204968 100644
--- a/arch/x86/power/hibernate_64.c
+++ b/arch/x86/power/hibernate_64.c
@@ -174,7 +174,7 @@ out:
174 return 0; 174 return 0;
175} 175}
176 176
177int swsusp_arch_resume(void) 177asmlinkage int swsusp_arch_resume(void)
178{ 178{
179 int error; 179 int error;
180 180