linuxkpi: Define boot_cpu_data.x86_max_cores

Reviewed by:	manu
Approved by:	manu
Differential Revision:	https://reviews.freebsd.org/D36971
This commit is contained in:
Jean-Sébastien Pédron
2022-11-11 18:43:07 +01:00
parent c4163160e4
commit 58cf3a69a5
2 changed files with 2 additions and 0 deletions
@@ -36,6 +36,7 @@
struct cpuinfo_x86 {
uint8_t x86;
uint16_t x86_clflush_size;
uint16_t x86_max_cores;
};
extern struct cpuinfo_x86 boot_cpu_data;
@@ -2766,6 +2766,7 @@ linux_compat_init(void *arg)
#if defined(__i386__) || defined(__amd64__)
linux_cpu_has_clflush = (cpu_feature & CPUID_CLFSH);
boot_cpu_data.x86_clflush_size = cpu_clflush_line_size;
boot_cpu_data.x86_max_cores = mp_ncpus;
boot_cpu_data.x86 = ((cpu_id & 0xf0000) >> 12) | ((cpu_id & 0xf0) >> 4);
#endif
rw_init(&linux_vma_lock, "lkpi-vma-lock");