Skip to content

Commit aa47f90

Browse files
ubizjakIngo Molnar
authored andcommitted
x86/percpu, xen: Correct PER_CPU_VAR() usage to include symbol and its addend
The PER_CPU_VAR() macro should be applied to a symbol and its addend. Inconsistent usage is currently harmless, but needs to be corrected before %rip-relative addressing is introduced to the PER_CPU_VAR() macro. No functional changes intended. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: linux-kernel@vger.kernel.org Cc: Brian Gerst <brgerst@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Sean Christopherson <seanjc@google.com>
1 parent 39d64ee commit aa47f90

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arch/x86/xen/xen-asm.S

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* non-zero.
2929
*/
3030
SYM_FUNC_START(xen_irq_disable_direct)
31-
movb $1, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
31+
movb $1, PER_CPU_VAR(xen_vcpu_info + XEN_vcpu_info_mask)
3232
RET
3333
SYM_FUNC_END(xen_irq_disable_direct)
3434

@@ -69,7 +69,7 @@ SYM_FUNC_END(check_events)
6969
SYM_FUNC_START(xen_irq_enable_direct)
7070
FRAME_BEGIN
7171
/* Unmask events */
72-
movb $0, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
72+
movb $0, PER_CPU_VAR(xen_vcpu_info + XEN_vcpu_info_mask)
7373

7474
/*
7575
* Preempt here doesn't matter because that will deal with any
@@ -78,7 +78,7 @@ SYM_FUNC_START(xen_irq_enable_direct)
7878
*/
7979

8080
/* Test for pending */
81-
testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_pending
81+
testb $0xff, PER_CPU_VAR(xen_vcpu_info + XEN_vcpu_info_pending)
8282
jz 1f
8383

8484
call check_events
@@ -97,7 +97,7 @@ SYM_FUNC_END(xen_irq_enable_direct)
9797
* x86 use opposite senses (mask vs enable).
9898
*/
9999
SYM_FUNC_START(xen_save_fl_direct)
100-
testb $0xff, PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_mask
100+
testb $0xff, PER_CPU_VAR(xen_vcpu_info + XEN_vcpu_info_mask)
101101
setz %ah
102102
addb %ah, %ah
103103
RET
@@ -113,7 +113,7 @@ SYM_FUNC_END(xen_read_cr2);
113113

114114
SYM_FUNC_START(xen_read_cr2_direct)
115115
FRAME_BEGIN
116-
_ASM_MOV PER_CPU_VAR(xen_vcpu_info) + XEN_vcpu_info_arch_cr2, %_ASM_AX
116+
_ASM_MOV PER_CPU_VAR(xen_vcpu_info + XEN_vcpu_info_arch_cr2), %_ASM_AX
117117
FRAME_END
118118
RET
119119
SYM_FUNC_END(xen_read_cr2_direct);

0 commit comments

Comments
 (0)