]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-arm/system.h
[ARM] 4720/1: S3C2412: Add power configuration registers for battery flat behaviour.
[linux-2.6-omap-h63xx.git] / include / asm-arm / system.h
index 94ea8c6dc1a4485014fd9bb8fbd7c29078e69696..28425c473e71c72c7a959f6650fc6707a89d6b0e 100644 (file)
 #ifndef __ASSEMBLY__
 
 #include <linux/linkage.h>
+#include <linux/stringify.h>
 #include <linux/irqflags.h>
 
+/*
+ * The CPU ID never changes at run time, so we might as well tell the
+ * compiler that it's constant.  Use this function to read the CPU ID
+ * rather than directly reading processor_id or read_cpuid() directly.
+ */
+static inline unsigned int read_cpuid_id(void) __attribute_const__;
+
+static inline unsigned int read_cpuid_id(void)
+{
+       return read_cpuid(CPUID_ID);
+}
+
 #define __exception    __attribute__((section(".exception.text")))
 
 struct thread_info;