On 22/12/2020 14.00, Xinpeng Liu wrote:
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];
According to apic-defs.h, MAX_TEST_CPUS is set to 255, so this makes sense,
indeed!
Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>