From owner-p4-projects@FreeBSD.ORG Wed Mar 22 17:07:45 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 9F3FE16A423; Wed, 22 Mar 2006 17:07:45 +0000 (UTC) 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 7C85316A420 for ; Wed, 22 Mar 2006 17:07:45 +0000 (UTC) (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 5F0A343D86 for ; Wed, 22 Mar 2006 17:03:40 +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 k2MH1qQQ078596 for ; Wed, 22 Mar 2006 17:01:52 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k2MH1qat078593 for perforce@freebsd.org; Wed, 22 Mar 2006 17:01:52 GMT (envelope-from kmacy@freebsd.org) Date: Wed, 22 Mar 2006 17:01:52 GMT Message-Id: <200603221701.k2MH1qat078593@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 93798 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: Wed, 22 Mar 2006 17:07:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=93798 Change 93798 by kmacy@kmacy_storage:sun4vtmp on 2006/03/22 17:01:36 dependencies for previous pmap_activate fix Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/tte_hash.h#7 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#11 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/tte_hash.h#7 (text+ko) ==== @@ -8,6 +8,8 @@ void tte_hash_init(vm_paddr_t); +void tte_hash_clear(tte_hash_t hash); + tte_hash_t tte_hash_kernel_create(vm_offset_t, uint64_t); tte_hash_t tte_hash_create(uint64_t context, uint64_t *scratchval); @@ -22,7 +24,7 @@ uint64_t tte_hash_set_scratchpad_kernel(tte_hash_t th); -uint64_t tte_hash_set_scratchpad_user(tte_hash_t th); +uint64_t tte_hash_set_scratchpad_user(tte_hash_t th, uint64_t context); ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#11 (text+ko) ==== @@ -189,6 +189,12 @@ } void +tte_hash_clear(tte_hash_t th) +{ + bzero(th->th_hashtable, th->th_size*PAGE_SIZE); +} + +void tte_hash_destroy(tte_hash_t th) { vm_page_t m, hash_pages[MAX_HASH_SIZE]; @@ -322,16 +328,15 @@ } uint64_t -tte_hash_set_scratchpad_user(tte_hash_t th) +tte_hash_set_scratchpad_user(tte_hash_t th, uint64_t context) { uint64_t hash_scratch; /* This will break if a hash table ever grows above 64MB * 2^(13+13) */ - + th->th_context = (uint16_t)context; hash_scratch = ((vm_offset_t)th->th_hashtable) | ((vm_offset_t)th->th_size); - printf("hash_scratch=0x%lx\n", hash_scratch); set_hash_user_scratchpad(hash_scratch); return hash_scratch;