summaryrefslogtreecommitdiffstats
path: root/include/asm-ppc64/abs_addr.h
diff options
context:
space:
mode:
authorMichael Ellerman2005-08-03 12:21:23 +0200
committerPaul Mackerras2005-08-29 02:53:35 +0200
commit38e85dc18036804ada8698951cfad4e6114fec1b (patch)
treee1c503d81ce23d1ac7d50897bb2b190db09ace5d /include/asm-ppc64/abs_addr.h
parent[PATCH] ppc64: introduce FW_FEATURE_ISERIES (diff)
downloadkernel-qcow2-linux-38e85dc18036804ada8698951cfad4e6114fec1b.tar.gz
kernel-qcow2-linux-38e85dc18036804ada8698951cfad4e6114fec1b.tar.xz
kernel-qcow2-linux-38e85dc18036804ada8698951cfad4e6114fec1b.zip
[PATCH] ppc64: Remove PTRRELOC() from msChunks code
The msChunks code was written to work on pSeries, but now it's only used on iSeries. This means there's no need to do PTRRELOC anymore, so remove it all. A few places were getting "extern reloc_offset()" from abs_addr.h, move it into system.h instead. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-ppc64/abs_addr.h')
-rw-r--r--include/asm-ppc64/abs_addr.h36
1 files changed, 10 insertions, 26 deletions
diff --git a/include/asm-ppc64/abs_addr.h b/include/asm-ppc64/abs_addr.h
index 6d4e8e787058..93dc63ed4f2f 100644
--- a/include/asm-ppc64/abs_addr.h
+++ b/include/asm-ppc64/abs_addr.h
@@ -29,46 +29,30 @@ struct msChunks {
extern struct msChunks msChunks;
extern unsigned long msChunks_alloc(unsigned long, unsigned long, unsigned long);
-extern unsigned long reloc_offset(void);
#ifdef CONFIG_MSCHUNKS
-static inline unsigned long
-chunk_to_addr(unsigned long chunk)
+static inline unsigned long chunk_to_addr(unsigned long chunk)
{
- unsigned long offset = reloc_offset();
- struct msChunks *_msChunks = PTRRELOC(&msChunks);
-
- return chunk << _msChunks->chunk_shift;
+ return chunk << msChunks.chunk_shift;
}
-static inline unsigned long
-addr_to_chunk(unsigned long addr)
+static inline unsigned long addr_to_chunk(unsigned long addr)
{
- unsigned long offset = reloc_offset();
- struct msChunks *_msChunks = PTRRELOC(&msChunks);
-
- return addr >> _msChunks->chunk_shift;
+ return addr >> msChunks.chunk_shift;
}
-static inline unsigned long
-chunk_offset(unsigned long addr)
+static inline unsigned long chunk_offset(unsigned long addr)
{
- unsigned long offset = reloc_offset();
- struct msChunks *_msChunks = PTRRELOC(&msChunks);
-
- return addr & _msChunks->chunk_mask;
+ return addr & msChunks.chunk_mask;
}
-static inline unsigned long
-abs_chunk(unsigned long pchunk)
+static inline unsigned long abs_chunk(unsigned long pchunk)
{
- unsigned long offset = reloc_offset();
- struct msChunks *_msChunks = PTRRELOC(&msChunks);
- if ( pchunk >= _msChunks->num_chunks ) {
+ if (pchunk >= msChunks.num_chunks)
return pchunk;
- }
- return PTRRELOC(_msChunks->abs)[pchunk];
+
+ return msChunks.abs[pchunk];
}
/* A macro so it can take pointers or unsigned long. */