refer to x86/cstart64.S:online_cpus:.fill (max_cpus + 7) / 8, 1, 0 Signed-off-by: Xinpeng Liu <liuxp11@xxxxxxxxxxxxxxx> --- lib/x86/apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/x86/apic.c b/lib/x86/apic.c index f43e9ef..da8f301 100644 --- a/lib/x86/apic.c +++ b/lib/x86/apic.c @@ -232,7 +232,7 @@ void mask_pic_interrupts(void) outb(0xff, 0xa1); } -extern unsigned char online_cpus[MAX_TEST_CPUS / 8]; +extern unsigned char online_cpus[(MAX_TEST_CPUS + 7) / 8]; void init_apic_map(void) { -- 1.8.3.1