diff options
author | alc <alc@FreeBSD.org> | 2003-05-15 05:12:24 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-05-15 05:12:24 +0000 |
commit | efcc32885e4d7671f700b94536886860e7e4c029 (patch) | |
tree | eb62e2fd9f6e754fcf60829a2fc5bb2cd5866d96 | |
parent | 54ea024a387cfbfd748ad1d2b2ccf18959a4f9da (diff) | |
download | FreeBSD-src-efcc32885e4d7671f700b94536886860e7e4c029.zip FreeBSD-src-efcc32885e4d7671f700b94536886860e7e4c029.tar.gz |
Initialize logical_cpus_mask when the logical CPUs are enumerated in
the mptable. (Previously, logical_cpus_mask was only initialized if
the hyperthreading fixup was executed.)
Approved by: re (jhb)
Reviewed by: ps
-rw-r--r-- | sys/amd64/amd64/mp_machdep.c | 7 | ||||
-rw-r--r-- | sys/amd64/amd64/mptable.c | 7 | ||||
-rw-r--r-- | sys/amd64/include/mptable.h | 7 | ||||
-rw-r--r-- | sys/i386/i386/mp_machdep.c | 7 | ||||
-rw-r--r-- | sys/i386/i386/mptable.c | 7 | ||||
-rw-r--r-- | sys/i386/include/mptable.h | 7 |
6 files changed, 30 insertions, 12 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 4cc8bf5..d630bd5 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -999,9 +999,12 @@ mptable_pass2(void) while (count--) { switch (type = *(u_char *) position) { case 0: - if (processor_entry(position, cpu)) + if (processor_entry(position, cpu)) { + if (logical_cpus != 0 && + cpu % logical_cpus != 0) + logical_cpus_mask |= (1 << cpu); ++cpu; - + } if (need_hyperthreading_fixup) { /* * Create fake mptable processor entries diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c index 4cc8bf5..d630bd5 100644 --- a/sys/amd64/amd64/mptable.c +++ b/sys/amd64/amd64/mptable.c @@ -999,9 +999,12 @@ mptable_pass2(void) while (count--) { switch (type = *(u_char *) position) { case 0: - if (processor_entry(position, cpu)) + if (processor_entry(position, cpu)) { + if (logical_cpus != 0 && + cpu % logical_cpus != 0) + logical_cpus_mask |= (1 << cpu); ++cpu; - + } if (need_hyperthreading_fixup) { /* * Create fake mptable processor entries diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index 4cc8bf5..d630bd5 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -999,9 +999,12 @@ mptable_pass2(void) while (count--) { switch (type = *(u_char *) position) { case 0: - if (processor_entry(position, cpu)) + if (processor_entry(position, cpu)) { + if (logical_cpus != 0 && + cpu % logical_cpus != 0) + logical_cpus_mask |= (1 << cpu); ++cpu; - + } if (need_hyperthreading_fixup) { /* * Create fake mptable processor entries diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index 4cc8bf5..d630bd5 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -999,9 +999,12 @@ mptable_pass2(void) while (count--) { switch (type = *(u_char *) position) { case 0: - if (processor_entry(position, cpu)) + if (processor_entry(position, cpu)) { + if (logical_cpus != 0 && + cpu % logical_cpus != 0) + logical_cpus_mask |= (1 << cpu); ++cpu; - + } if (need_hyperthreading_fixup) { /* * Create fake mptable processor entries diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c index 4cc8bf5..d630bd5 100644 --- a/sys/i386/i386/mptable.c +++ b/sys/i386/i386/mptable.c @@ -999,9 +999,12 @@ mptable_pass2(void) while (count--) { switch (type = *(u_char *) position) { case 0: - if (processor_entry(position, cpu)) + if (processor_entry(position, cpu)) { + if (logical_cpus != 0 && + cpu % logical_cpus != 0) + logical_cpus_mask |= (1 << cpu); ++cpu; - + } if (need_hyperthreading_fixup) { /* * Create fake mptable processor entries diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h index 4cc8bf5..d630bd5 100644 --- a/sys/i386/include/mptable.h +++ b/sys/i386/include/mptable.h @@ -999,9 +999,12 @@ mptable_pass2(void) while (count--) { switch (type = *(u_char *) position) { case 0: - if (processor_entry(position, cpu)) + if (processor_entry(position, cpu)) { + if (logical_cpus != 0 && + cpu % logical_cpus != 0) + logical_cpus_mask |= (1 << cpu); ++cpu; - + } if (need_hyperthreading_fixup) { /* * Create fake mptable processor entries |