[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>

authored by

Michael Ellerman and committed by
Paul Mackerras
bef56862 71e1f55a

+5 -21
-6
arch/ppc64/Kconfig
··· 302 302 bool 303 303 default y 304 304 305 - config MSCHUNKS 306 - bool 307 - depends on PPC_ISERIES 308 - default y 309 - 310 - 311 305 config PPC_RTAS 312 306 bool 313 307 depends on PPC_PSERIES || PPC_BPA
-1
arch/ppc64/configs/iSeries_defconfig
··· 99 99 # CONFIG_HZ_1000 is not set 100 100 CONFIG_HZ=100 101 101 CONFIG_GENERIC_HARDIRQS=y 102 - CONFIG_MSCHUNKS=y 103 102 CONFIG_LPARCFG=y 104 103 CONFIG_SECCOMP=y 105 104 CONFIG_ISA_DMA_API=y
+5 -14
include/asm-ppc64/abs_addr.h
··· 16 16 #include <asm/page.h> 17 17 #include <asm/prom.h> 18 18 #include <asm/lmb.h> 19 - 20 - #ifdef CONFIG_MSCHUNKS 19 + #include <asm/firmware.h> 21 20 22 21 struct mschunks_map { 23 22 unsigned long num_chunks; ··· 47 48 { 48 49 unsigned long chunk; 49 50 51 + /* This is a no-op on non-iSeries */ 52 + if (!firmware_has_feature(FW_FEATURE_ISERIES)) 53 + return pa; 54 + 50 55 chunk = addr_to_chunk(pa); 51 56 52 57 if (chunk < mschunks_map.num_chunks) ··· 58 55 59 56 return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK); 60 57 } 61 - 62 - #else /* !CONFIG_MSCHUNKS */ 63 - 64 - #define chunk_to_addr(chunk) ((unsigned long)(chunk)) 65 - #define addr_to_chunk(addr) (addr) 66 - #define chunk_offset(addr) (0) 67 - #define abs_chunk(pchunk) (pchunk) 68 - 69 - #define phys_to_abs(pa) (pa) 70 - #define physRpn_to_absRpn(rpn) (rpn) 71 - 72 - #endif /* !CONFIG_MSCHUNKS */ 73 58 74 59 /* Convenience macros */ 75 60 #define virt_to_abs(va) phys_to_abs(__pa(va))