PERFORCE change 30962 for review
Peter Wemm
peter at FreeBSD.org
Sun May 11 14:59:15 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=30962
Change 30962 by peter at peter_daintree on 2003/05/11 14:59:05
remove unnecessary casts.
Affected files ...
.. //depot/projects/hammer/sys/amd64/amd64/machdep.c#17 edit
Differences ...
==== //depot/projects/hammer/sys/amd64/amd64/machdep.c#17 (text+ko) ====
@@ -1085,44 +1085,44 @@
/* Read-only from zero to physfree */
/* XXX not fully used, underneath 2M pages */
for (i = 0; (i << PAGE_SHIFT) < physfree; i++) {
- ((pt_entry_t *)KPTphys)[i] = i << PAGE_SHIFT;
- ((pt_entry_t *)KPTphys)[i] |= PG_RW | PG_V;
+ KPTphys[i] = i << PAGE_SHIFT;
+ KPTphys[i] |= PG_RW | PG_V;
}
/* Now map the page tables at their location within PTmap */
for (i = 0; i < NKPT; i++) {
- ((pd_entry_t *)IdlePTD)[i + KPTDI] = KPTphys + (i << PAGE_SHIFT);
- ((pd_entry_t *)IdlePTD)[i + KPTDI] |= PG_RW | PG_V;
+ IdlePTD[i + KPTDI] = KPTphys + (i << PAGE_SHIFT);
+ IdlePTD[i + KPTDI] |= PG_RW | PG_V;
}
/* Map from zero to end of allocations under 2M pages */
/* This replaces some of the PTD entries above */
for (i = 0; (i << PDRSHIFT) < physfree; i++) {
- ((pd_entry_t *)IdlePTD)[i] = i << PDRSHIFT;
- ((pd_entry_t *)IdlePTD)[i] |= PG_RW | PG_V | PG_PS;
+ IdlePTD[i] = i << PDRSHIFT;
+ IdlePTD[i] |= PG_RW | PG_V | PG_PS;
}
/* Now map the page tables at their location within PTmap */
for (i = 0; i < NKPT; i++) {
- ((pd_entry_t *)IdlePTD)[i] = KPTphys + (i << PAGE_SHIFT);
- ((pd_entry_t *)IdlePTD)[i] |= PG_RW | PG_V;
+ IdlePTD[i] = KPTphys + (i << PAGE_SHIFT);
+ IdlePTD[i] |= PG_RW | PG_V;
}
/* Now map the PTD at the top of the PTmap (ie: PTD[]) */
for (i = 0; i < NPGPTD; i++) {
- ((pd_entry_t *)IdlePTD)[i + PTDPTDI] = IdlePTD + (i << PAGE_SHIFT);
- ((pd_entry_t *)IdlePTD)[i + PTDPTDI] |= PG_RW | PG_V;
+ IdlePTD[i + PTDPTDI] = IdlePTD + (i << PAGE_SHIFT);
+ IdlePTD[i + PTDPTDI] |= PG_RW | PG_V;
}
/* And connect up the PTD to the PDP */
for (i = 0; i < NPGPTD; i++) {
- ((pdp_entry_t *)IdlePDP)[i] = IdlePTD + (i << PAGE_SHIFT);
- ((pdp_entry_t *)IdlePDP)[i] |= PG_RW | PG_V | PG_U;
+ IdlePDP[i] = IdlePTD + (i << PAGE_SHIFT);
+ IdlePDP[i] |= PG_RW | PG_V | PG_U;
}
/* And connect up the PDP to the PML4 */
- ((pdp_entry_t *)IdlePML4)[0] = IdlePDP;
- ((pdp_entry_t *)IdlePML4)[0] |= PG_RW | PG_V | PG_U;
+ IdlePML4[0] = IdlePDP;
+ IdlePML4[0] |= PG_RW | PG_V | PG_U;
}
void
More information about the p4-projects
mailing list