Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/hyperv: Use current_stack_pointer to avoid asm() in hv_hvcrash_ctxt_save()

Use current_stack_pointer to avoid asm() when saving %rsp to the
crash context memory in hv_hvcrash_ctxt_save(). The new code is
more readable and results in exactly the same object file.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Wei Liu <wei.liu@kernel.org>
Cc: Dexuan Cui <decui@microsoft.com>
Cc: Long Li <longli@microsoft.com>
Cc: Thomas Gleixner <tglx@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Wei Liu <wei.liu@kernel.org>

authored by

Uros Bizjak and committed by
Wei Liu
2536091d 3484127c

+1 -1
+1 -1
arch/x86/hyperv/hv_crash.c
··· 199 199 { 200 200 struct hv_crash_ctxt *ctxt = &hv_crash_ctxt; 201 201 202 - asm volatile("movq %%rsp,%0" : "=m"(ctxt->rsp)); 202 + ctxt->rsp = current_stack_pointer; 203 203 204 204 ctxt->cr0 = native_read_cr0(); 205 205 ctxt->cr4 = native_read_cr4();