Date: Sun, 11 May 2003 14:59:13 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 30962 for review Message-ID: <200305112159.h4BLxDsm018122@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=30962 Change 30962 by peter@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305112159.h4BLxDsm018122>