PERFORCE change 93798 for review
Kip Macy
kmacy at FreeBSD.org
Wed Mar 22 17:07:45 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=93798
Change 93798 by kmacy at 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;
More information about the p4-projects
mailing list