From owner-freebsd-arm@FreeBSD.ORG Fri Oct 2 06:13:57 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 157F01065672 for ; Fri, 2 Oct 2009 06:13:57 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from tomjudge.vm.bytemark.co.uk (tomjudge.vm.bytemark.co.uk [80.68.91.100]) by mx1.freebsd.org (Postfix) with ESMTP id C96648FC12 for ; Fri, 2 Oct 2009 06:13:56 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 531474899E for ; Fri, 2 Oct 2009 07:13:55 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at tomjudge.vm.bytemark.co.uk Received: from tomjudge.vm.bytemark.co.uk ([127.0.0.1]) by localhost (tomjudge.vm.bytemark.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eRA2XaNPD8q0 for ; Fri, 2 Oct 2009 07:13:45 +0100 (BST) Received: from rita.nodomain (unknown [192.168.205.6]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 9993948881 for ; Fri, 2 Oct 2009 07:13:44 +0100 (BST) Message-ID: <4AC599FC.1070304@tomjudge.com> Date: Fri, 02 Oct 2009 06:13:16 +0000 From: Tom Judge User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: freebsd-arm@freebsd.org Content-Type: multipart/mixed; boundary="------------040000000209090109080707" Subject: [patch] Compilation problems in sys/arm/arm/pmap.c when PMAP_DEBUG is defined. X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2009 06:13:57 -0000 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--