Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144607486
D26132.1775722544.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
917 B
Referenced Files
None
Subscribers
None
D26132.1775722544.diff
View Options
Index: sys/arm64/arm64/pmap.c
===================================================================
--- sys/arm64/arm64/pmap.c
+++ sys/arm64/arm64/pmap.c
@@ -178,7 +178,7 @@
#endif
#define pmap_l2_pindex(v) ((v) >> L2_SHIFT)
-#define pa_to_pvh(pa) (&pv_table[pmap_l2_pindex(pa)])
+#define pa_to_pvh(pa) (&pv_table[vm_phys_paddr_to_superpage_index(pa)])
#define NPV_LIST_LOCKS MAXCPU
@@ -1024,6 +1024,7 @@
void
pmap_init(void)
{
+ struct vm_phys_seg *seg;
vm_size_t s;
uint64_t mmfr1;
int i, pv_npg, vmid_bits;
@@ -1068,7 +1069,10 @@
/*
* Calculate the size of the pv head table for superpages.
*/
- pv_npg = howmany(vm_phys_segs[vm_phys_nsegs - 1].end, L2_SIZE);
+ seg = &vm_phys_segs[vm_phys_nsegs - 1];
+ pv_npg = seg->first_superpage +
+ pmap_l2_pindex(roundup2(seg->end, L2_SIZE)) -
+ pmap_l2_pindex(seg->start);
/*
* Allocate memory for the pv head table for superpages.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 9, 8:15 AM (8 m, 1 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28307680
Default Alt Text
D26132.1775722544.diff (917 B)
Attached To
Mode
D26132: arm64/pmap: Sparsify pv_table
Attached
Detach File
Event Timeline
Log In to Comment