Page MenuHomeFreeBSD

MALTA: Query MVPConf0.PVPE for number of CPUs
ClosedPublic

Authored by jrtc27 on Aug 9 2018, 1:26 PM.

Details

Reviewers
br
Group Reviewers
MIPS
Commits
rS337771: Query MVPConf0.PVPE for number of CPUs.
Summary

Rather than hard-coding the number of CPUs to 2, look up the PVPE field
in MVPConf0, as the valid VPE numbers are from 0 to PVPE inclusive.

Test Plan

Boot on QEMU with -smp 4 and verify all 4 CPUs are brought up.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jrtc27 created this revision.Aug 9 2018, 1:26 PM
arichardson added a subscriber: arichardson.
br added a comment.Aug 9 2018, 1:51 PM

what is test plan ?

br added inline comments.Aug 9 2018, 1:54 PM
sys/mips/malta/malta_mp.c
218 ↗(On Diff #46464)

what m is doing here?

jrtc27 added a comment.Aug 9 2018, 2:02 PM
In D16644#353674, @br wrote:

what is test plan ?

Is booting on QEMU with more than 2 cores (or exactly one, which is also not equal to 2!) and observing them all being brought up sufficient? If so I will update the revision's description.

sys/mips/malta/malta_mp.c
218 ↗(On Diff #46464)

Nothing it would seem; it's been there and unused since the file was created in r305664. I'll remove it.

jrtc27 updated this revision to Diff 46474.Aug 9 2018, 4:34 PM

Removed unused m variable.

jrtc27 edited the test plan for this revision. (Show Details)EditedAug 9 2018, 4:34 PM
jrtc27 marked 2 inline comments as done.

Boots to userspace with -smp 4 on QEMU:

...
Preloaded elf kernel "kernel" at 0xffffffff808c00f8.
real memory  = 2147483648 (2097152K bytes)
Physical memory chunk(s):
0x00a06000 - 0x0fffffff, 257925120 bytes (62970 pages)
0x90000000 - 0xfcd64fff, 1825984512 bytes (445797 pages)
avail memory = 2074578944 (1978MB)
Waiting for cpu1 to start
CPU 1 started
AP #1 started!
Waiting for cpu2 to start
CPU 2 started
AP #2 started!
Waiting for cpu3 to start
CPU 3 started
AP #3 started!
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
...
br added inline comments.Aug 9 2018, 7:09 PM
sys/mips/malta/malta_mp.c
54 ↗(On Diff #46474)

#define MVPCONF0_PVPE_MASK

jrtc27 updated this revision to Diff 46496.Aug 10 2018, 9:14 AM

Renamed MVPCONF0_PVPE to MVPCONF0_PVPE_MASK.

jrtc27 marked an inline comment as done.Aug 10 2018, 9:14 AM
br accepted this revision.Aug 10 2018, 9:16 AM
This revision is now accepted and ready to land.Aug 10 2018, 9:16 AM
This revision was automatically updated to reflect the committed changes.