Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/evbarm/bcm53xx Fix KERN_{VTOPHYS, PHYSTOV) fallout d...



details:   https://anonhg.NetBSD.org/src/rev/bad976920df1
branches:  trunk
changeset: 365186:bad976920df1
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sat Aug 04 21:59:28 2018 +0000

description:
Fix KERN_{VTOPHYS,PHYSTOV) fallout differently

diffstat:

 sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c |  14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diffs (43 lines):

diff -r a189882882c5 -r bad976920df1 sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c
--- a/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c Sat Aug 04 17:53:29 2018 +0000
+++ b/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c Sat Aug 04 21:59:28 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bcm53xx_machdep.c,v 1.12 2018/08/04 13:27:03 kre Exp $ */
+/*     $NetBSD: bcm53xx_machdep.c,v 1.13 2018/08/04 21:59:28 skrll 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.12 2018/08/04 13:27:03 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm53xx_machdep.c,v 1.13 2018/08/04 21:59:28 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_evbarm_boardtype.h"
@@ -93,15 +93,7 @@
  * 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)
@@ -202,6 +194,8 @@
 u_int
 initarm(void *arg)
 {
+       kern_vtopdiff = KERN_VTOPDIFF;
+
        pmap_devmap_register(devmap);
        bcm53xx_bootstrap(KERNEL_IO_IOREG_VBASE);
 



Home | Main Index | Thread Index | Old Index