]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[PARISC] Use MFIA in current_text_addr on pa2.0 processors
authorKyle McMartin <kyle@parisc-linux.org>
Fri, 19 May 2006 20:18:17 +0000 (20:18 +0000)
committerKyle McMartin <kyle@hera.kernel.org>
Tue, 27 Jun 2006 23:28:36 +0000 (23:28 +0000)
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
include/asm-parisc/processor.h

index ca49dc91f4fca86bff592f5336ab4265a80ca497..b73626f040dace5eb8d091636be645ed564864a0 100644 (file)
  * Default implementation of macro that returns current
  * instruction pointer ("program counter").
  */
-
-/* We cannot use MFIA as it was added for PA2.0 - prumpf
-
-   At one point there were no "0f/0b" type local symbols in gas for
-   PA-RISC.  This is no longer true, but this still seems like the
-   nicest way to implement this. */
-
-#define current_text_addr() ({ void *pc; __asm__("\n\tblr 0,%0\n\tnop":"=r" (pc)); pc; })
+#ifdef CONFIG_PA20
+#define current_ia(x)  __asm__("mfia %0" : "=r"(x))
+#else /* mfia added in pa2.0 */
+#define current_ia(x)  __asm__("blr 0,%0\n\tnop" : "=r"(x))
+#endif
+#define current_text_addr() ({ void *pc; current_ia(pc); pc; })
 
 #define TASK_SIZE               (current->thread.task_size)
 #define TASK_UNMAPPED_BASE      (current->thread.map_base)