Page MenuHomeFreeBSD

MALTA: Query MVPConf0.PVPE for number of CPUs
ClosedPublic

Authored by jrtc27 on Aug 9 2018, 1:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Mar 21, 5:05 AM
Unknown Object (File)
Dec 28 2023, 9:05 PM
Unknown Object (File)
Dec 20 2023, 1:58 AM
Unknown Object (File)
Dec 20 2023, 1:58 AM
Unknown Object (File)
Dec 12 2023, 8:52 PM
Unknown Object (File)
Nov 30 2023, 11:51 PM
Unknown Object (File)
Nov 30 2023, 11:51 PM
Unknown Object (File)
Nov 7 2023, 1:30 AM
Subscribers

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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 18668
Build 18352: arc lint + arc unit

Event Timeline

sys/mips/malta/malta_mp.c
218

what m is doing here?

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

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

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
...
sys/mips/malta/malta_mp.c
54

#define MVPCONF0_PVPE_MASK

Renamed MVPCONF0_PVPE to MVPCONF0_PVPE_MASK.

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.