summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/common.h')
-rw-r--r--arch/powerpc/include/asm/common.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/common.h b/arch/powerpc/include/asm/common.h
new file mode 100644
index 0000000000..b91f51e462
--- /dev/null
+++ b/arch/powerpc/include/asm/common.h
@@ -0,0 +1,33 @@
+#ifndef __ASM_COMMON_H
+#define __ASM_COMMON_H
+
+extern unsigned long _text_base;
+
+unsigned long long get_ticks(void);
+
+int cpu_init (void);
+
+uint get_pvr (void);
+uint get_svr (void);
+
+void trap_init (ulong);
+
+static inline unsigned long get_pc(void)
+{
+ unsigned long pc;
+
+ __asm__ __volatile__(
+ " mflr 0\n"
+ " bl 1f\n"
+ "1:\n"
+ " mflr %0\n"
+ " mtlr 0\n"
+ : "=r" (pc)
+ :
+ : "0", "memory");
+
+ return pc;
+}
+
+extern unsigned long search_exception_table(unsigned long);
+#endif /* __ASM_COMMON_H */