diff options
author | Damien Zammit <damien@zamaudio.com> | 2023-08-05 07:49:54 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-08-05 10:43:07 +0200 |
commit | 22f2a7160fa0795894b0d50de4c216add33e5f2b (patch) | |
tree | ea393725efea61e66d8ad98417f4bd7099096252 /i386/i386at | |
parent | 5e25bd3cbd2be0e510d53e2b35ddb2c54a8e0ac5 (diff) | |
download | gnumach-22f2a7160fa0795894b0d50de4c216add33e5f2b.tar.gz gnumach-22f2a7160fa0795894b0d50de4c216add33e5f2b.tar.bz2 gnumach-22f2a7160fa0795894b0d50de4c216add33e5f2b.zip |
cpu_number: Look up cpu kernel_id via lookup table
This speeds up smp slightly by reducing the cpu_number()
complexity to have no branching, just a look up table.
It also addresses the problem that CPU_NUMBER was only using
raw apic_id as an approximation of the kernel_id.
Other improvements were to remove unnecessary checks now that
the lookup table always resolves to a valid value.
Message-Id: <20230805074945.1983707-1-damien@zamaudio.com>
Diffstat (limited to 'i386/i386at')
-rw-r--r-- | i386/i386at/acpi_parse_apic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/i386/i386at/acpi_parse_apic.c b/i386/i386at/acpi_parse_apic.c index 27e3410d..9cd861ed 100644 --- a/i386/i386at/acpi_parse_apic.c +++ b/i386/i386at/acpi_parse_apic.c @@ -483,6 +483,8 @@ acpi_apic_setup(struct acpi_apic *apic) return ACPI_FIT_FAILURE; } + apic_generate_cpu_id_lut(); + return ACPI_SUCCESS; } |