summaryrefslogtreecommitdiff
path: root/kern
diff options
context:
space:
mode:
authorAlmuHS <almuhs@github.com>2019-04-17 21:14:40 +0200
committerAlmuHS <almuhs@github.com>2019-04-17 21:14:40 +0200
commit93a73ecd80568d8d139d9d8783305105c2e66357 (patch)
treec2801bfaf63a0f8f8863de74f27af05d779e665a /kern
parenta4a820f3cb1008bc4b3ecb35e2d5187285467b3d (diff)
recovered lapic check in cpu_number()
Diffstat (limited to 'kern')
-rw-r--r--kern/cpu_number.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/cpu_number.c b/kern/cpu_number.c
index 448de2b1..4101e73c 100644
--- a/kern/cpu_number.c
+++ b/kern/cpu_number.c
@@ -8,7 +8,7 @@ unsigned int master_cpu = 0; /* 'master' processor - keeps time */
int
cpu_number()
{
- if(ncpu == 1) return 0;
+ if(lapic == 0 | ncpu == 1) return 0;
else{
unsigned apic_id = lapic->apic_id.r >>24;