Author: andrew
Date: Wed Jul  5 09:27:18 2017
New Revision: 320668
URL: https://svnweb.freebsd.org/changeset/base/320668

Log:
  Require the ARM Generic Timer driver is built for MULTIDELAY on 32bit arm.
  As this driver is also used for DELAY on arm64 we need to keep the existing
  DELAY code for it to use.

Modified:
  head/sys/arm/arm/generic_timer.c
  head/sys/arm/conf/EXYNOS5.common

Modified: head/sys/arm/arm/generic_timer.c
==============================================================================
--- head/sys/arm/arm/generic_timer.c    Wed Jul  5 06:32:53 2017        
(r320667)
+++ head/sys/arm/arm/generic_timer.c    Wed Jul  5 09:27:18 2017        
(r320668)
@@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$");
 #include <machine/intr.h>
 #include <machine/md_var.h>
 
-#ifdef MULTIDELAY
+#if defined(__arm__)
 #include <machine/machdep.h> /* For arm_set_delay */
 #endif
 
@@ -72,6 +72,10 @@ __FBSDID("$FreeBSD$");
 #include <dev/acpica/acpivar.h>
 #endif
 
+#if defined(__arm__) && !defined(MULTIDELAY)
+#error The generic timer requires MULTIDELAY on 32bit arm
+#endif
+
 #define        GT_CTRL_ENABLE          (1 << 0)
 #define        GT_CTRL_INT_MASK        (1 << 1)
 #define        GT_CTRL_INT_STAT        (1 << 2)
@@ -427,7 +431,7 @@ arm_tmr_attach(device_t dev)
        sc->et.et_priv = sc;
        et_register(&sc->et);
 
-#ifdef MULTIDELAY
+#if defined(__arm__)
        arm_set_delay(arm_tmr_do_delay, sc);
 #endif
 
@@ -505,7 +509,7 @@ arm_tmr_do_delay(int usec, void *arg)
        }
 }
 
-#ifndef MULTIDELAY
+#if defined(__aarch64__)
 void
 DELAY(int usec)
 {

Modified: head/sys/arm/conf/EXYNOS5.common
==============================================================================
--- head/sys/arm/conf/EXYNOS5.common    Wed Jul  5 06:32:53 2017        
(r320667)
+++ head/sys/arm/conf/EXYNOS5.common    Wed Jul  5 09:27:18 2017        
(r320668)
@@ -23,6 +23,7 @@ makeoptions   WERROR="-Werror"
 include        "std.armv6"
 options        SCHED_ULE               # ULE scheduler
 options        PLATFORM                # Platform based SoC
+options        MULTIDELAY
 options        PREEMPTION              # Enable kernel thread preemption
 options        INET                    # InterNETworking
 options        INET6                   # IPv6 communications protocols
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to