diff options
author | Kyle McMartin <kyle@parisc-linux.org> | 2006-05-20 00:18:17 +0400 |
---|---|---|
committer | Kyle McMartin <kyle@hera.kernel.org> | 2006-06-28 03:28:36 +0400 |
commit | 1b6d1b5e073ad9313ad64da49dff649f5c06e546 (patch) | |
tree | 2f459aedd9ef3b11f8c54816ddc172828b5bbb7a /include/asm-parisc | |
parent | 7514b7a500411faa1c2ff1d5dc3198b855f5cdcc (diff) | |
download | linux-1b6d1b5e073ad9313ad64da49dff649f5c06e546.tar.xz |
[PARISC] Use MFIA in current_text_addr on pa2.0 processors
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'include/asm-parisc')
-rw-r--r-- | include/asm-parisc/processor.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/include/asm-parisc/processor.h b/include/asm-parisc/processor.h index ca49dc91f4fc..b73626f040da 100644 --- a/include/asm-parisc/processor.h +++ b/include/asm-parisc/processor.h @@ -26,14 +26,12 @@ * 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) |