From owner-p4-projects@FreeBSD.ORG Sun May 11 14:59:15 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A392137B401; Sun, 11 May 2003 14:59:14 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51F0437B404 for ; Sun, 11 May 2003 14:59:14 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBFCF43F85 for ; Sun, 11 May 2003 14:59:13 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4BLxD0U018125 for ; Sun, 11 May 2003 14:59:13 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4BLxDsm018122 for perforce@freebsd.org; Sun, 11 May 2003 14:59:13 -0700 (PDT) Date: Sun, 11 May 2003 14:59:13 -0700 (PDT) Message-Id: <200305112159.h4BLxDsm018122@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 30962 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 May 2003 21:59:15 -0000 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