Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
[deliverable/linux.git] / arch / sparc / include / asm / leon.h
index 3ea5964c43b423c6180090cb44afa61b7d945ca2..8580d1764f90e2a22da538c37191ac038c3e6ab2 100644 (file)
@@ -224,6 +224,18 @@ static inline void sparc_leon3_disable_cache(void)
                          "sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2");
 };
 
+static inline unsigned long sparc_leon3_asr17(void)
+{
+       u32 asr17;
+       __asm__ __volatile__ ("rd %%asr17, %0\n\t" : "=r"(asr17));
+       return asr17;
+};
+
+static inline int sparc_leon3_cpuid(void)
+{
+       return sparc_leon3_asr17() >> 28;
+}
+
 #endif /*!__ASSEMBLY__*/
 
 #ifdef CONFIG_SMP
This page took 0.02451 seconds and 5 git commands to generate.