[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>
This commit is contained in:
parent
71e1f55ad4
commit
bef5686229
3 changed files with 5 additions and 21 deletions
|
@ -302,12 +302,6 @@ config GENERIC_HARDIRQS
|
||||||
bool
|
bool
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config MSCHUNKS
|
|
||||||
bool
|
|
||||||
depends on PPC_ISERIES
|
|
||||||
default y
|
|
||||||
|
|
||||||
|
|
||||||
config PPC_RTAS
|
config PPC_RTAS
|
||||||
bool
|
bool
|
||||||
depends on PPC_PSERIES || PPC_BPA
|
depends on PPC_PSERIES || PPC_BPA
|
||||||
|
|
|
@ -99,7 +99,6 @@ CONFIG_HZ_100=y
|
||||||
# CONFIG_HZ_1000 is not set
|
# CONFIG_HZ_1000 is not set
|
||||||
CONFIG_HZ=100
|
CONFIG_HZ=100
|
||||||
CONFIG_GENERIC_HARDIRQS=y
|
CONFIG_GENERIC_HARDIRQS=y
|
||||||
CONFIG_MSCHUNKS=y
|
|
||||||
CONFIG_LPARCFG=y
|
CONFIG_LPARCFG=y
|
||||||
CONFIG_SECCOMP=y
|
CONFIG_SECCOMP=y
|
||||||
CONFIG_ISA_DMA_API=y
|
CONFIG_ISA_DMA_API=y
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
#include <asm/prom.h>
|
#include <asm/prom.h>
|
||||||
#include <asm/lmb.h>
|
#include <asm/lmb.h>
|
||||||
|
#include <asm/firmware.h>
|
||||||
#ifdef CONFIG_MSCHUNKS
|
|
||||||
|
|
||||||
struct mschunks_map {
|
struct mschunks_map {
|
||||||
unsigned long num_chunks;
|
unsigned long num_chunks;
|
||||||
|
@ -48,6 +47,10 @@ static inline unsigned long phys_to_abs(unsigned long pa)
|
||||||
{
|
{
|
||||||
unsigned long chunk;
|
unsigned long chunk;
|
||||||
|
|
||||||
|
/* This is a no-op on non-iSeries */
|
||||||
|
if (!firmware_has_feature(FW_FEATURE_ISERIES))
|
||||||
|
return pa;
|
||||||
|
|
||||||
chunk = addr_to_chunk(pa);
|
chunk = addr_to_chunk(pa);
|
||||||
|
|
||||||
if (chunk < mschunks_map.num_chunks)
|
if (chunk < mschunks_map.num_chunks)
|
||||||
|
@ -56,18 +59,6 @@ static inline unsigned long phys_to_abs(unsigned long pa)
|
||||||
return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK);
|
return chunk_to_addr(chunk) + (pa & MSCHUNKS_OFFSET_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !CONFIG_MSCHUNKS */
|
|
||||||
|
|
||||||
#define chunk_to_addr(chunk) ((unsigned long)(chunk))
|
|
||||||
#define addr_to_chunk(addr) (addr)
|
|
||||||
#define chunk_offset(addr) (0)
|
|
||||||
#define abs_chunk(pchunk) (pchunk)
|
|
||||||
|
|
||||||
#define phys_to_abs(pa) (pa)
|
|
||||||
#define physRpn_to_absRpn(rpn) (rpn)
|
|
||||||
|
|
||||||
#endif /* !CONFIG_MSCHUNKS */
|
|
||||||
|
|
||||||
/* Convenience macros */
|
/* Convenience macros */
|
||||||
#define virt_to_abs(va) phys_to_abs(__pa(va))
|
#define virt_to_abs(va) phys_to_abs(__pa(va))
|
||||||
#define abs_to_virt(aa) __va(aa)
|
#define abs_to_virt(aa) __va(aa)
|
||||||
|
|
Loading…
Add table
Reference in a new issue