Index: /trunk/include/VBox/sup.h
===================================================================
--- /trunk/include/VBox/sup.h	(revision 53434)
+++ /trunk/include/VBox/sup.h	(revision 53435)
@@ -33,5 +33,7 @@
 #include <iprt/stdarg.h>
 #include <iprt/cpuset.h>
-#include <iprt/asm-amd64-x86.h>
+#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
+# include <iprt/asm-amd64-x86.h>
+#endif
 
 RT_C_DECLS_BEGIN
@@ -427,5 +429,5 @@
 SUPDECL(PSUPGLOBALINFOPAGE)             SUPGetGIP(void);
 
-
+#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
 /**
  * Gets the TSC frequency of the calling CPU.
@@ -448,5 +450,5 @@
         Assert(pGip->u32Mode == SUPGIPMODE_ASYNC_TSC);
         iCpu = pGip->aiCpuFromApicId[ASMGetApicId()];
-        if (iCpu >= pGip->cCpus)
+        if (RT_UNLIKELY(iCpu >= pGip->cCpus))
             return UINT64_MAX;
     }
@@ -454,5 +456,5 @@
     return pGip->aCPUs[iCpu].u64CpuHz;
 }
-
+#endif /* X86 || AMD64 */
 
 /**
@@ -1483,9 +1485,9 @@
     switch (pGip->u32Mode)
     {
-        case SUPGIPMODE_INVARIANT_TSC: return "Invariant";
-        case SUPGIPMODE_SYNC_TSC:      return "Synchronous";
-        case SUPGIPMODE_ASYNC_TSC:     return "Asynchronous";
-        case SUPGIPMODE_INVALID:       return "Invalid";
-        default:                       return "???";
+        case SUPGIPMODE_INVARIANT_TSC:  return "Invariant";
+        case SUPGIPMODE_SYNC_TSC:       return "Synchronous";
+        case SUPGIPMODE_ASYNC_TSC:      return "Asynchronous";
+        case SUPGIPMODE_INVALID:        return "Invalid";
+        default:                        return "???";
     }
 }
@@ -1504,17 +1506,14 @@
         && pGip->u32Mode == SUPGIPMODE_INVARIANT_TSC)
     {
-        uint64_t uLo;
-        uint64_t uHi;
-
-        if (pGip->u64CpuHz == u64CpuHz)
-            return true;
-
-        /* Arbitrary tolerance threshold, tweak later if required, perhaps
-           more tolerance on lower frequencies and less tolerance on higher. */
-        uLo = (pGip->u64CpuHz << 10) / 1025;
-        uHi = pGip->u64CpuHz + (pGip->u64CpuHz - uLo);
-        if (   u64CpuHz < uLo
-            || u64CpuHz > uHi)
-            return false;
+        if (pGip->u64CpuHz != u64CpuHz)
+        {
+            /* Arbitrary tolerance threshold, tweak later if required, perhaps
+               more tolerance on lower frequencies and less tolerance on higher. */
+            uint64_t uLo = (pGip->u64CpuHz << 10) / 1025;
+            uint64_t uHi = pGip->u64CpuHz + (pGip->u64CpuHz - uLo);
+            if (   u64CpuHz < uLo
+                || u64CpuHz > uHi)
+                return false;
+        }
         return true;
     }
@@ -1522,4 +1521,5 @@
 }
 
+#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
 
 /**
@@ -1533,8 +1533,9 @@
  *                          applied or not (optional, can be NULL).
  *
- * @note If you change the delta calculation made here, make sure to update the
- *       assembly version in sup.mac! Also update supdrvGipMpEvent() while
- *       re-adjusting deltas while choosing a new GIP master.
  * @remarks Maybe called with interrupts disabled in ring-0!
+ *
+ * @note    If you change the delta calculation made here, make sure to update
+ *          the assembly version in sup.mac! Also update supdrvGipMpEvent()
+ *          while re-adjusting deltas while choosing a new GIP master.
  */
 DECLINLINE(int) SUPTscDeltaApply(PSUPGLOBALINFOPAGE pGip, uint64_t *puTsc, uint16_t idApic, bool *pfDeltaApplied)
@@ -1567,9 +1568,10 @@
 
 /**
- * Gets the delta-adjusted TSC, must only be called when GIP mode is invariant
- * (i.e. when TSC deltas are likely to be computed and available).
- *
- * In other GIP modes, like async, we don't bother with computing TSC deltas and
- * therefore it is meaningless to call this function, use SUPReadTSC() instead.
+ * Gets the delta-adjusted TSC.
+ *
+ * Must only be called when GIP mode is invariant (i.e. when TSC deltas are
+ * likely to be computed and available).  In other GIP modes, like async, we
+ * don't bother with computing TSC deltas and therefore it is meaningless to
+ * call this function, use SUPReadTSC() instead.
  *
  * @returns VBox status code.
@@ -1585,7 +1587,7 @@
 DECLINLINE(int) SUPGetTsc(uint64_t *puTsc, uint16_t *pidApic)
 {
-#ifdef IN_RING3
+# ifdef IN_RING3
     return SUPR3ReadTsc(puTsc, pidApic);
-#else
+# else
     RTCCUINTREG uFlags;
     uint16_t    idApic;
@@ -1607,5 +1609,5 @@
     AssertRCReturn(rc, rc);
     return fDeltaApplied ? VINF_SUCCESS : VERR_SUPDRV_TSC_READ_FAILED;
-#endif
+# endif
 }
 
@@ -1613,4 +1615,5 @@
 /**
  * Reads the host TSC value.
+ *
  * If applicable, normalizes the host TSC value with intercpu TSC deltas.
  *
@@ -1628,7 +1631,8 @@
         return u64Tsc;
     }
-    else
-        return ASMReadTSC();
+    return ASMReadTSC();
 }
+
+#endif /* X86 || AMD64 */
 
 
