[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH gnumach] cpu_number: Look up cpu kernel_id via lookup table
From: |
Samuel Thibault |
Subject: |
Re: [PATCH gnumach] cpu_number: Look up cpu kernel_id via lookup table |
Date: |
Sun, 6 Aug 2023 15:27:53 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Almudena Garcia, le sam. 05 août 2023 12:31:53 +0000, a ecrit:
> With this change we can update CPU_NUMBER assembly routine to a simpler
> version.
Simpler? How so?
> El sábado 5 de agosto de 2023, Damien Zammit escribió:
> > diff --git a/i386/i386/cpu_number.h b/i386/i386/cpu_number.h
> > index a5658471..c00896e8 100644
> > --- a/i386/i386/cpu_number.h
> > +++ b/i386/i386/cpu_number.h
> > @@ -43,6 +43,7 @@
> > movl %cs:lapic, reg ;\
> > movl %cs:APIC_ID(reg), reg ;\
> > shrl $24, reg ;\
> > + movl %cs:CX(cpu_id_lut, reg), reg ;\
AIUI we still need to get the lapic address to read the apic id of the
current processor, and then translate. I don't see how we could make
this simpler?
Samuel