Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Oct 2009 06:13:16 +0000
From:      Tom Judge <tom@tomjudge.com>
To:        freebsd-arm@freebsd.org
Subject:   [patch] Compilation problems in sys/arm/arm/pmap.c when PMAP_DEBUG is defined.
Message-ID:  <4AC599FC.1070304@tomjudge.com>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------040000000209090109080707
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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



--------------040000000209090109080707
Content-Type: text/plain;
 name="pmap.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="pmap.patch"

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;

--------------040000000209090109080707--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AC599FC.1070304>