Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142650127
D16644.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
820 B
Referenced Files
None
Subscribers
None
D16644.diff
View Options
Index: head/sys/mips/malta/malta_mp.c
===================================================================
--- head/sys/mips/malta/malta_mp.c
+++ head/sys/mips/malta/malta_mp.c
@@ -48,9 +48,10 @@
#include <machine/md_var.h>
#include <machine/smp.h>
-#define MALTA_MAXCPU 2
#define VPECONF0_VPA (1 << 0)
#define MVPCONTROL_VPC (1 << 1)
+#define MVPCONF0_PVPE_SHIFT 10
+#define MVPCONF0_PVPE_MASK (0xf << MVPCONF0_PVPE_SHIFT)
#define TCSTATUS_A (1 << 13)
unsigned malta_ap_boot = ~0;
@@ -208,10 +209,13 @@
void
platform_cpu_mask(cpuset_t *mask)
{
- uint32_t i, m;
+ uint32_t i, ncpus, reg;
+ reg = mftc0(0, 2);
+ ncpus = ((reg & MVPCONF0_PVPE_MASK) >> MVPCONF0_PVPE_SHIFT) + 1;
+
CPU_ZERO(mask);
- for (i = 0, m = 1 ; i < MALTA_MAXCPU; i++, m <<= 1)
+ for (i = 0; i < ncpus; i++)
CPU_SET(i, mask);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 22, 9:02 PM (5 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27862990
Default Alt Text
D16644.diff (820 B)
Attached To
Mode
D16644: MALTA: Query MVPConf0.PVPE for number of CPUs
Attached
Detach File
Event Timeline
Log In to Comment