Date: Fri, 24 Feb 2006 18:17:13 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 92354 for review Message-ID: <200602241817.k1OIHDU5013858@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602241817.k1OIHDU5013858>