virt/lx_emul: init boot_cpu_data on x86

Values are used by arch/x86/lib/delay.c and slub allocator.

Issue #5236
This commit is contained in:
Christian Helmuth 2024-06-18 08:19:13 +02:00 committed by Norman Feske
parent 14d3c4cb5e
commit 258c06df03
2 changed files with 13 additions and 4 deletions

View File

@ -23,5 +23,14 @@ void clocksource_arch_init(struct clocksource * cs)
}
struct cpuinfo_x86 boot_cpu_data __read_mostly;
/*
* Early_identify_cpu() in linux sets this up normally, used by drm_cache,
* arch/x86/lib/delay.c, and slub allocator.
*/
struct cpuinfo_x86 boot_cpu_data =
{
.x86_clflush_size = (sizeof(void*) == 8) ? 64 : 32,
.x86_cache_alignment = (sizeof(void*) == 8) ? 64 : 32,
.x86_phys_bits = (sizeof(void*) == 8) ? 36 : 32,
.x86_virt_bits = (sizeof(void*) == 8) ? 48 : 32
};

View File

@ -50,8 +50,8 @@ const struct trace_print_flags pageflag_names[] = { {0,NULL}};
#include <asm/processor.h>
/*
* Early_identify_cpu() in linux sets this up normally, used by drm_cache
* as well as arch/x86/lib/delay.c.
* Early_identify_cpu() in linux sets this up normally, used by drm_cache,
* arch/x86/lib/delay.c, and slub allocator.
*/
struct cpuinfo_x86 boot_cpu_data =
{