diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2005-08-03 06:21:26 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-08-28 20:53:37 -0400 |
commit | bef5686229810709091fb6e505071f4aa41e3760 (patch) | |
tree | 417f40e7ec6a0d593857ebd338794b664c1f4bcc | |
parent | 71e1f55ad4bc4c8bcfe696400a950a34263a750e (diff) |
[PATCH] ppc64: Remove CONFIG_MSCHUNKS
We can now remove CONFIG_MSCHUNKS as it doesn't do anything interesting
anymore.
The only macro in abs_addr.h which is called by non-iSeries code is
phys_to_abs(), so remove the other dummy implementations, and we add a
firmware feature check to phys_to_abs().
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/ppc64/Kconfig | 6 | ||||
-rw-r--r-- | arch/ppc64/configs/iSeries_defconfig | 1 | ||||
-rw-r--r-- | include/asm-ppc64/abs_addr.h | 19 |
3 files changed, 5 insertions, 21 deletions
diff --git a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig index 4d4f81c65012..13b262f10216 100644 --- a/arch/ppc64/Kconfig +++ b/arch/ppc64/Kconfig | |||
@@ -302,12 +302,6 @@ config GENERIC_HARDIRQS | |||
302 | bool | 302 | bool |
303 | default y | 303 | default y |
304 | 304 | ||
305 | config MSCHUNKS | ||
306 | bool | ||
307 | depends on PPC_ISERIES | ||
308 | default y | ||
309 | |||
310 | |||
311 | config PPC_RTAS | 305 | config PPC_RTAS |
312 | bool | 306 | bool |
313 | depends on PPC_PSERIES || PPC_BPA | 307 | depends on PPC_PSERIES || PPC_BPA |
diff --git a/arch/ppc64/configs/iSeries_defconfig b/arch/ppc64/configs/iSeries_defconfig index 394ba18b58c7..219c6677abcc 100644 --- a/arch/ppc64/configs/iSeries_defconfig +++ b/arch/ppc64/configs/iSeries_defconfig | |||
@@ -99,7 +99,6 @@ CONFIG_HZ_100=y | |||
99 | # CONFIG_HZ_1000 is not set | 99 | # CONFIG_HZ_1000 is not set |
100 | CONFIG_HZ=100 | 100 | CONFIG_HZ=100 |
101 | CONFIG_GENERIC_HARDIRQS=y | 101 | CONFIG_GENERIC_HARDIRQS=y |
102 | CONFIG_MSCHUNKS=y | ||
103 | CONFIG_LPARCFG=y | 102 | CONFIG_LPARCFG=y |
104 | CONFIG_SECCOMP=y | 103 | CONFIG_SECCOMP=y |
105 | CONFIG_ISA_DMA_API=y | 104 | CONFIG_ISA_DMA_API=y |
diff --git a/include/asm-ppc64/abs_addr.h b/include/asm-ppc64/abs_addr.h index 200db1c45f29..84c24d4cdb71 100644 --- a/include/asm-ppc64/abs_addr.h +++ b/include/asm-ppc64/abs_addr.h | |||
@@ -16,8 +16,7 @@ | |||
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | #include <asm/prom.h> | 17 | #include <asm/prom.h> |
18 | #include <asm/lmb.h> | 18 | #include <asm/lmb.h> |
19 | 19 | #include <asm/firmware.h> | |
20 | #ifdef CONFIG_MSCHUNKS | ||
21 | 20 | ||
22 | struct mschunks_map { | 21 | struct mschunks_map { |
23 | unsigned long num_chunks; | 22 | unsigned long num_chunks; |
@@ -48,6 +47,10 @@ static inline unsigned long phys_to_abs(unsigned long pa) | |||
48 | { | 47 | { |
49 | unsigned long chunk; | 48 | unsigned long chunk; |
50 | 49 | ||
50 | /* This is a no-op on non-iSeries */ | ||
51 | if (!firmware_has_feature(FW_FEATURE_ISERIES)) | ||
52 | return pa; | ||
53 | |||
51 | chunk = addr_to_chunk(pa); | 54 | chunk = addr_to_chunk(pa); |
52 | 55 | ||
53 | if (chunk < mschunks_map.num_chunks) | 56 | if (chunk < mschunks_map.num_chunks) |
@@ -56,18 +59,6 @@ static inline unsigned long phys_to_abs(unsigned long pa) | |||
56 | return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK); | 59 | return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK); |
57 | } | 60 | } |
58 | 61 | ||
59 | #else /* !CONFIG_MSCHUNKS */ | ||
60 | |||
61 | #define chunk_to_addr(chunk) ((unsigned long)(chunk)) | ||
62 | #define addr_to_chunk(addr) (addr) | ||
63 | #define chunk_offset(addr) (0) | ||
64 | #define abs_chunk(pchunk) (pchunk) | ||
65 | |||
66 | #define phys_to_abs(pa) (pa) | ||
67 | #define physRpn_to_absRpn(rpn) (rpn) | ||
68 | |||
69 | #endif /* !CONFIG_MSCHUNKS */ | ||
70 | |||
71 | /* Convenience macros */ | 62 | /* Convenience macros */ |
72 | #define virt_to_abs(va) phys_to_abs(__pa(va)) | 63 | #define virt_to_abs(va) phys_to_abs(__pa(va)) |
73 | #define abs_to_virt(aa) __va(aa) | 64 | #define abs_to_virt(aa) __va(aa) |