PERFORCE change 97535 for review
Kip Macy
kmacy at FreeBSD.org
Sat May 20 20:51:32 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=97535
Change 97535 by kmacy at kmacy_storage:sun4v_work on 2006/05/20 20:49:54
fix comments and turn off debugging by default
Affected files ...
.. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/pmap.c#51 edit
.. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#34 edit
Differences ...
==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/pmap.c#51 (text+ko) ====
@@ -74,7 +74,7 @@
#include <machine/hypervisor_api.h>
-#if 1
+#if 0
#define PMAP_DEBUG
#endif
#ifndef PMAP_SHPGPERPROC
@@ -187,6 +187,7 @@
#else
#define DPRINTF(...)
+#define KDPRINTF(...)
#endif
==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/tte_hash.c#34 (text+ko) ====
@@ -27,8 +27,6 @@
* $ Exp $
*/
-#define DEBUG
-
#include <sys/param.h>
#include <sys/queue.h>
#include <sys/ktr.h>
@@ -298,7 +296,9 @@
fh->thf_head.fh_next = (void *)TLB_PHYS_TO_DIRECT(VM_PAGE_TO_PHYS(m));
fh = th->th_fhtail = (void *)TLB_PHYS_TO_DIRECT(VM_PAGE_TO_PHYS(m));
fh->thf_head.fh_free_head = 1;
+#ifdef DEBUG
printf("new fh=%p \n", fh);
+#endif
}
newentry = &fh->thf_entries[fh->thf_head.fh_free_head];
@@ -497,8 +497,7 @@
{
uint64_t hash_scratch;
- /* This will break if a hash table ever grows above 32MB
- * 2^(13+13)
+ /* This breaks if a hash table grows above 32MB
*/
hash_scratch = ((vm_offset_t)th->th_hashtable) | ((vm_offset_t)th->th_size);
set_hash_kernel_scratchpad(hash_scratch);
@@ -511,8 +510,7 @@
{
uint64_t hash_scratch;
- /* This will break if a hash table ever grows above 32MB
- * 2^(13+13)
+ /* This breaks if a hash table grows above 32MB
*/
th->th_context = (uint16_t)context;
hash_scratch = ((vm_offset_t)th->th_hashtable) | ((vm_offset_t)th->th_size);
@@ -544,10 +542,7 @@
tte_tag, tte_data);
hash_bucket_unlock(entry->the_fields, s);
}
-#ifdef DEBUG
- if (tte_hash_lookup(th, va) == 0)
- panic("va=0x%lx not found", va);
-#endif
+
return (otte_data);
}
More information about the p4-projects
mailing list