Module Name:    src
Committed By:   kre
Date:           Sat Aug  4 13:27:03 UTC 2018

Modified Files:
        src/sys/arch/evbarm/bcm53xx: bcm53xx_machdep.c

Log Message:
Hack workaround to deal with KERN_VTOPHYS and KERN_PHYSTOV now
being defined in arm/arm32/machdep.h ... attempt to fix (some) earm
builds.   Even if builds succeed, resulting kernel might not boot,
and if it boots, could crash.   Someone with a clue, please use it!


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c
diff -u src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.11 src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.12
--- src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c:1.11	Tue Jul 31 06:46:26 2018
+++ src/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c	Sat Aug  4 13:27:03 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm53xx_machdep.c,v 1.11 2018/07/31 06:46:26 skrll Exp $	*/
+/*	$NetBSD: bcm53xx_machdep.c,v 1.12 2018/08/04 13:27:03 kre Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #define IDM_PRIVATE
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm53xx_machdep.c,v 1.11 2018/07/31 06:46:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm53xx_machdep.c,v 1.12 2018/08/04 13:27:03 kre Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_evbarm_boardtype.h"
@@ -93,9 +93,15 @@ static void bcm53xx_system_reset(void);
  * Macros to translate between physical and virtual for a subset of the
  * kernel address space.  *Not* for general use.
  */
+#if !defined(KERN_VTOPHYS) || !defined(KERN_PHYSTOV)
 #define	KERN_VTOPDIFF	((vaddr_t)KERNEL_BASE_phys - (vaddr_t)KERNEL_BASE_virt)
+#endif
+#ifndef KERN_VTOPHYS
 #define KERN_VTOPHYS(va) ((paddr_t)((vaddr_t)va + KERN_VTOPDIFF))
+#endif
+#ifndef KERN_PHYSTOV
 #define KERN_PHYSTOV(pa) ((vaddr_t)((paddr_t)pa - KERN_VTOPDIFF))
+#endif
 
 #ifndef CONADDR
 #define CONADDR		(BCM53XX_IOREG_PBASE + CCA_UART0_BASE)

Reply via email to