History log of /freebsd-current/sys/compat/linuxkpi/common/include/asm/processor.h
Revision Date Author Comments
# b8c88a61 24-Dec-2023 Vladimir Kondratyev <wulf@FreeBSD.org>

LinuxKPI: Add x86_vendor field to struct cpuinfo_x86

and initialize it at linuxkpi module load.

Sponsored by: Serenity Cyber Security, LLC
Reviewed by: manu
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D42820


# 488e8a7f 23-Oct-2023 Bjoern A. Zeeb <bz@FreeBSD.org>

LinuxKPI: reduce impact of large MAXCPU

Start scaling arrays dynamically instead of using MAXCPU, resulting in
extra allocations on startup but reducing the overall memory footprint.
For the static single CPU mask we provide two versions to further save
memory depending on a low or high CPU count system. The threshold to
switch is currently at 128 CPUs on 64bit platforms.
More detailed comments on the implementations can be found in the code.

If I am not wrong on a MAXCPU=65536 system the memory footprint should
roughly go down from 512M to 1.5M for the static single CPU mask.

Submitted by: olce (most of this final version)
Sponsored by: The FreeBSD Foundation
PR: 274316
Differential Revision: https://reviews.freebsd.org/D42345


# a27902c1 10-Feb-2023 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Define `cpu_data(cpu)`

`cpu_data(cpu)` evaluates to a `struct cpuinfo_x86` filled with
attributes of the given CPU number. The CPU number is an index in the
`__cpu_data[]` array with MAXCPU entries. On FreeBSD, we simply
initialize all of them like we do with `boot_cpu_data`.

While here, we add the `x86_model` field to the `struct cpuinfo_x86`. We
use `CPUID_TO_MODEL()` to set it.

At the same time, we fix the value of `x86` which should have been set
to the CPU family. It was using the same implementation as
`CPUID_TO_MODEL()` before. It now uses `CPUID_TO_FAMILY()`.

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D38542


# 58cf3a69 11-Nov-2022 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

linuxkpi: Define `boot_cpu_data.x86_max_cores`

Reviewed by: manu
Approved by: manu
Differential Revision: https://reviews.freebsd.org/D36971


# ee247fc1 09-Nov-2022 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Move cpu_relax out of ifdef for x86

It's needed by drm-kmod and this allow building on arm64 and powerpc.

Reported by: jhibbits
Sponsored by: Beckhoff Automation GmbH & Co. KG


# b2c86006 09-Aug-2022 Emmanuel Vadot <manu@FreeBSD.org>

linuxkpi: Add asm/processor.h

Also fill the boot_cpu_data struct as drm needs it.

Reviewed by: bz
Obtained from: drm-kmod
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D36107