[patch] Compilation problems in sys/arm/arm/pmap.c when PMAP_DEBUG
is defined.
Tom Judge
tom at tomjudge.com
Fri Oct 2 06:13:57 UTC 2009
Hi,
I ran into some issues this evening while I was building some kernels
with PMAP_DEBUG defined.
I have attached a patch that addresses the problems with the DPRINTF
sections. (The first 2 hunks should probably be ignored).
However there are 2 warnings about unused functions when PMAP_INLINE is
defined as "". I did not know what the correct fix for this was so I
defined PMAP_INLINE to __inline even when PMAP_DEBUG was set, which
seemed to hide the problem again.
Tom
-------------- next part --------------
Index: sys/arm/arm/pmap.c
===================================================================
--- sys/arm/arm/pmap.c (revision 197472)
+++ sys/arm/arm/pmap.c (working copy)
@@ -142,6 +142,7 @@
* Special compilation symbols
* PMAP_DEBUG - Build in pmap_debug_level code
*/
+#define PMAP_DEBUG
/* Include header files */
#include "opt_vm.h"
@@ -183,8 +184,9 @@
((_stat_))
#define dprintf printf
-int pmap_debug_level = 0;
-#define PMAP_INLINE
+int pmap_debug_level = 1;
+#define PMAP_INLINE __inline
+//#define PMAP_INLINE
#else /* PMAP_DEBUG */
#define PDEBUG(_lev_,_stat_) /* Nothing */
#define dprintf(x, arg...)
@@ -1914,7 +1916,7 @@
{
int shpgperproc = PMAP_SHPGPERPROC;
- PDEBUG(1, printf("pmap_init: phys_start = %08x\n"));
+ PDEBUG(1, printf("pmap_init: phys_start = %08x\n",PHYSADDR ));
/*
* init the pv free list
@@ -2373,8 +2375,8 @@
vm_size_t size;
int l1idx, l2idx, l2next = 0;
- PDEBUG(1, printf("firstaddr = %08x, loadaddr = %08x\n",
- firstaddr, loadaddr));
+ PDEBUG(1, printf("firstaddr = %08x, lastaddr = %08x\n",
+ firstaddr, lastaddr));
virtual_avail = firstaddr;
kernel_pmap->pm_l1 = l1;
More information about the freebsd-arm
mailing list