x86_64/irq.h: use 32bit operations in up_cpu_index()

Use 32bit operations for id field in intel64_cpu_s which is int type.

This fixes an error that appears when enabling some debug options:
  `Error: operand size mismatch for `movq'``

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This commit is contained in:
p-szafonimateusz 2024-06-29 21:01:10 +02:00 committed by Xiang Xiao
parent f857004227
commit 66516918ce
1 changed files with 3 additions and 3 deletions

View File

@ -98,11 +98,11 @@ extern "C"
#ifdef CONFIG_SMP
static inline_function int up_cpu_index(void)
{
unsigned long cpu;
int cpu;
asm volatile(
"\tmovq %%gs:(%c1), %0\n"
: "=rm" (cpu)
"\tmovl %%gs:(%c1), %0\n"
: "=r" (cpu)
: "i" (offsetof(struct intel64_cpu_s, id))
:);