From owner-p4-projects@FreeBSD.ORG Fri Feb 24 18:17:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C39D216A425; Fri, 24 Feb 2006 18:17:14 +0000 (GMT) X-Original-To: perforce@freebsd.org 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 6841216A422 for ; Fri, 24 Feb 2006 18:17:14 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 127A543D46 for ; Fri, 24 Feb 2006 18:17:14 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k1OIHDvg013861 for ; Fri, 24 Feb 2006 18:17:13 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k1OIHDU5013858 for perforce@freebsd.org; Fri, 24 Feb 2006 18:17:13 GMT (envelope-from kmacy@freebsd.org) Date: Fri, 24 Feb 2006 18:17:13 GMT Message-Id: <200602241817.k1OIHDU5013858@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 92354 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Feb 2006 18:17:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=92354 Change 92354 by kmacy@kmacy_storage:sun4v_work on 2006/02/24 18:16:38 remove duplicated tsb_info structure Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/tsb.h#5 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/pmap.c#11 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/tsb.h#5 (text+ko) ==== @@ -64,17 +64,6 @@ #define TSB32M (1 << TTE32M) #define TSB256M (1 << TTE256M) - -typedef struct tsb_info { - vm_offset_t tsb_va; - vm_paddr_t tsb_pa; /* tsb physical address */ - uint16_t tsb_szc; /* tsb size code */ - uint16_t tsb_flags; - uint32_t tsb_ttesz_mask; /* page size masks */ -} *tsb_info_t; - - - struct hv_tsb_info; void tsb_set_tte(struct hv_tsb_info *tsb, vm_offset_t va, vm_paddr_t pa, uint64_t flags, uint64_t ctx); ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/pmap.c#11 (text+ko) ==== @@ -106,7 +106,6 @@ #define TSB8K_INDEX 0 #define TSB4M_INDEX 1 -static struct tsb_info kernel_tsbs[MAX_TSB_INFO]; static hv_tsb_info_t kernel_td[MAX_TSB_INFO]; @@ -298,41 +297,36 @@ pa = pmap_bootstrap_alloc(tsb_8k_size); if (pa & PAGE_MASK_4M) panic("pmap_bootstrap: tsb unaligned\n"); - kernel_tsbs[TSB8K_INDEX].tsb_pa = pa; - kernel_tsbs[TSB8K_INDEX].tsb_szc = (tsb_8k_size >> (PAGE_SHIFT - TTE_SHIFT)); - kernel_tsbs[TSB8K_INDEX].tsb_ttesz_mask = TSB8K; + kernel_td[TSB8K_INDEX].hvtsb_idxpgsz = TTE8K; + kernel_td[TSB8K_INDEX].hvtsb_assoc = 1; + kernel_td[TSB8K_INDEX].hvtsb_ntte = (tsb_8k_size >> TTE_SHIFT); + kernel_td[TSB8K_INDEX].hvtsb_ctx_index = 0; + kernel_td[TSB8K_INDEX].hvtsb_pgszs = TSB8K; + kernel_td[TSB8K_INDEX].hvtsb_rsvd = 0; + kernel_td[TSB8K_INDEX].hvtsb_pa = pa; tsb_4m_size = virtsz >> (PAGE_SHIFT_4M - TTE_SHIFT); pa = pmap_bootstrap_alloc(tsb_4m_size); - kernel_tsbs[TSB4M_INDEX].tsb_pa = pa; - kernel_tsbs[TSB4M_INDEX].tsb_szc = (tsb_4m_size >> (PAGE_SHIFT - TTE_SHIFT)); - kernel_tsbs[TSB4M_INDEX].tsb_ttesz_mask = TSB4M; + kernel_td[TSB4M_INDEX].hvtsb_idxpgsz = TTE4M; + kernel_td[TSB4M_INDEX].hvtsb_assoc = 1; + kernel_td[TSB4M_INDEX].hvtsb_ntte = (tsb_4m_size >> TTE_SHIFT); + kernel_td[TSB4M_INDEX].hvtsb_ctx_index = 0; + kernel_td[TSB4M_INDEX].hvtsb_pgszs = TSB4M; + kernel_td[TSB4M_INDEX].hvtsb_rsvd = 0; + kernel_td[TSB4M_INDEX].hvtsb_pa = pa; - pmap_scrub_pages(kernel_tsbs[TSB8K_INDEX].tsb_pa, tsb_8k_size); + pmap_scrub_pages(kernel_td[TSB8K_INDEX].hvtsb_pa, tsb_8k_size); - pmap_scrub_pages(kernel_tsbs[TSB4M_INDEX].tsb_pa, tsb_4m_size); + pmap_scrub_pages(kernel_td[TSB4M_INDEX].hvtsb_pa, tsb_4m_size); /* * Set up TSB descriptors for the hypervisor * */ - kernel_td[TSB8K_INDEX].hvtsb_idxpgsz = TTE8K; - kernel_td[TSB8K_INDEX].hvtsb_assoc = 1; - kernel_td[TSB8K_INDEX].hvtsb_ntte = TSB_ENTRIES(kernel_tsbs[TSB8K_INDEX].tsb_szc); - kernel_td[TSB8K_INDEX].hvtsb_ctx_index = 0; - kernel_td[TSB8K_INDEX].hvtsb_pgszs = kernel_tsbs[TSB8K_INDEX].tsb_ttesz_mask; - kernel_td[TSB8K_INDEX].hvtsb_rsvd = 0; - kernel_td[TSB8K_INDEX].hvtsb_pa = kernel_tsbs[TSB8K_INDEX].tsb_pa; + - kernel_td[TSB4M_INDEX].hvtsb_idxpgsz = TTE4M; - kernel_td[TSB4M_INDEX].hvtsb_assoc = 1; - kernel_td[TSB4M_INDEX].hvtsb_ntte = TSB_ENTRIES(kernel_tsbs[TSB4M_INDEX].tsb_szc); - kernel_td[TSB4M_INDEX].hvtsb_ctx_index = 0; - kernel_td[TSB4M_INDEX].hvtsb_pgszs = kernel_tsbs[TSB4M_INDEX].tsb_ttesz_mask; - kernel_td[TSB4M_INDEX].hvtsb_rsvd = 0; - kernel_td[TSB4M_INDEX].hvtsb_pa = kernel_tsbs[TSB4M_INDEX].tsb_pa; /*