Index: kernel/arch/sparc64/include/asm.h
===================================================================
--- kernel/arch/sparc64/include/asm.h	(revision b97b348a7bdc9e9697abe5dcd02f197f8ff5053f)
+++ kernel/arch/sparc64/include/asm.h	(revision 7de7cdecfd35be40f3afd79cf10c784b47fad3e9)
@@ -308,4 +308,17 @@
 }
 
+/** Check interrupts state.
+ *
+ * @return True if interrupts are disabled.
+ *
+ */
+static inline bool interrupts_disabled(void)
+{
+	pstate_reg_t pstate;
+
+	pstate.value = pstate_read();
+	return !pstate.ie;
+}
+
 /** Return base address of current stack.
  *
