1 /*
   2  * This file and its contents are supplied under the terms of the
   3  * Common Development and Distribution License ("CDDL"), version 1.0.
   4  * You may only use this file in accordance with the terms of version
   5  * 1.0 of the CDDL.
   6  *
   7  * A full copy of the text of the CDDL should have accompanied this
   8  * source.  A copy of the CDDL is also available via the Internet at
   9  * http://www.illumos.org/license/CDDL.
  10  */
  11 
  12 /*
  13  * Copyright 2013 (c) Joyent, Inc. All rights reserved.
  14  */
  15 
  16 /*
  17  * This file contains various ARM subroutines that are generic across all ARM
  18  * platforms.
  19  */
  20 
  21 #include <sys/asm_linkage.h>
  22 
  23 #if defined(__lint)
  24 #include <sys/thread.h>
  25 #endif /* __lint */
  26 
  27 #if defined(__lint)
  28 
  29 /*
  30  * Return the current kernel thread that's running. Note that this is also
  31  * available as an inline function.
  32  */
  33 kthread_id_t
  34 threadp(void)
  35 { return ((kthread_id_t)0); }
  36 
  37 #else   /* __lint */
  38 
  39         ENTRY(threadp)
  40         mrc     p15, 0, r0, c13, c0, 4
  41         bx      lr
  42         SET_SIZE(threadp)
  43 
  44 #endif  /* __lint */
  45 
  46 #if defined(__lint)
  47 
  48 /*
  49  * Subroutine used to spin for a little bit
  50  */
  51 
  52 void
  53 arm_smt_pause(void)
  54 {}
  55 
  56 #else   /* __lint */
  57 
  58         ENTRY(arm_smt_pause)
  59         yield
  60         bx      lr
  61         SET_SIZE(arm_smt_pause)
  62 
  63 #endif  /* __lint */