diff options
Diffstat (limited to 'arch/powerpc/include/asm/abs_addr.h')
-rw-r--r-- | arch/powerpc/include/asm/abs_addr.h | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/arch/powerpc/include/asm/abs_addr.h b/arch/powerpc/include/asm/abs_addr.h index 5ab0b71531be..9d92ba04b033 100644 --- a/arch/powerpc/include/asm/abs_addr.h +++ b/arch/powerpc/include/asm/abs_addr.h | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <asm/types.h> | 17 | #include <asm/types.h> |
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | #include <asm/prom.h> | 19 | #include <asm/prom.h> |
20 | #include <asm/firmware.h> | ||
21 | 20 | ||
22 | struct mschunks_map { | 21 | struct mschunks_map { |
23 | unsigned long num_chunks; | 22 | unsigned long num_chunks; |
@@ -46,30 +45,12 @@ static inline unsigned long addr_to_chunk(unsigned long addr) | |||
46 | 45 | ||
47 | static inline unsigned long phys_to_abs(unsigned long pa) | 46 | static inline unsigned long phys_to_abs(unsigned long pa) |
48 | { | 47 | { |
49 | unsigned long chunk; | 48 | return pa; |
50 | |||
51 | /* This is a no-op on non-iSeries */ | ||
52 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | ||
53 | return pa; | ||
54 | |||
55 | chunk = addr_to_chunk(pa); | ||
56 | |||
57 | if (chunk < mschunks_map.num_chunks) | ||
58 | chunk = mschunks_map.mapping[chunk]; | ||
59 | |||
60 | return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK); | ||
61 | } | 49 | } |
62 | 50 | ||
63 | /* Convenience macros */ | 51 | /* Convenience macros */ |
64 | #define virt_to_abs(va) phys_to_abs(__pa(va)) | 52 | #define virt_to_abs(va) phys_to_abs(__pa(va)) |
65 | #define abs_to_virt(aa) __va(aa) | 53 | #define abs_to_virt(aa) __va(aa) |
66 | 54 | ||
67 | /* | ||
68 | * Converts Virtual Address to Real Address for | ||
69 | * Legacy iSeries Hypervisor calls | ||
70 | */ | ||
71 | #define iseries_hv_addr(virtaddr) \ | ||
72 | (0x8000000000000000UL | virt_to_abs(virtaddr)) | ||
73 | |||
74 | #endif /* __KERNEL__ */ | 55 | #endif /* __KERNEL__ */ |
75 | #endif /* _ASM_POWERPC_ABS_ADDR_H */ | 56 | #endif /* _ASM_POWERPC_ABS_ADDR_H */ |