summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-31 18:48:14 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-31 18:48:14 -0700
commit1348305a129afe22389811e9ac28c4103cc3e7e7 (patch)
treec34f6dbad5d4fbe7bce95497cac2d3dfd685d662
parentbfbc3b5f996db1b88c52faec33f33bfa16ac0273 (diff)
[PATCH] ppc64: SLB accounting fix
From: Anton Blanchard <anton@samba.org> Even though we have a variable containing the number of entries in the SLB, we hardwire the value at boot. We also dont use the variable in the head.S fastpath handler. This patch removes it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/ppc64/kernel/asm-offsets.c1
-rw-r--r--arch/ppc64/kernel/head.S2
-rw-r--r--arch/ppc64/kernel/iSeries_setup.c5
-rw-r--r--arch/ppc64/kernel/prom.c7
-rw-r--r--arch/ppc64/kernel/stab.c2
-rw-r--r--arch/ppc64/xmon/xmon.c2
-rw-r--r--include/asm-ppc64/naca.h2
-rw-r--r--include/asm-ppc64/processor.h6
8 files changed, 9 insertions, 18 deletions
diff --git a/arch/ppc64/kernel/asm-offsets.c b/arch/ppc64/kernel/asm-offsets.c
index 98e8d373b1a5..9368fb0ff470 100644
--- a/arch/ppc64/kernel/asm-offsets.c
+++ b/arch/ppc64/kernel/asm-offsets.c
@@ -73,7 +73,6 @@ int main(void)
DEFINE(ICACHEL1LINESIZE, offsetof(struct systemcfg, iCacheL1LineSize));
DEFINE(ICACHEL1LOGLINESIZE, offsetof(struct naca_struct, iCacheL1LogLineSize));
DEFINE(ICACHEL1LINESPERPAGE, offsetof(struct naca_struct, iCacheL1LinesPerPage));
- DEFINE(SLBSIZE, offsetof(struct naca_struct, slb_size));
DEFINE(PLATFORM, offsetof(struct systemcfg, platform));
/* paca */
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S
index 54b053c6851b..6b22a87d9e40 100644
--- a/arch/ppc64/kernel/head.S
+++ b/arch/ppc64/kernel/head.S
@@ -1123,8 +1123,6 @@ _GLOBAL(do_slb_bolted)
*/
/* r20 = paca */
- /* use a cpu feature mask if we ever change our slb size */
-SLB_NUM_ENTRIES = 64
1: ld r22,PACASTABRR(r20)
addi r21,r22,1
cmpdi r21,SLB_NUM_ENTRIES
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c
index 96560cdc57a0..3f17d5e25342 100644
--- a/arch/ppc64/kernel/iSeries_setup.c
+++ b/arch/ppc64/kernel/iSeries_setup.c
@@ -563,11 +563,6 @@ static void __init build_iSeries_Memory_Map(void)
lmb_add(0, systemcfg->physicalMemorySize);
lmb_analyze(); /* ?? */
lmb_reserve(0, __pa(klimit));
-
- /*
- * Hardcode to GP size. I am not sure where to get this info. DRENG
- */
- naca->slb_size = 64;
}
/*
diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c
index 7d28ef6d88a6..a5f8f241895a 100644
--- a/arch/ppc64/kernel/prom.c
+++ b/arch/ppc64/kernel/prom.c
@@ -458,13 +458,6 @@ static void __init prom_initialize_naca(void)
PROM_BUG();
}
- /*
- * Hardcode to GP size. I am not sure where to get this info
- * in general, as there does not appear to be a slb-size OF
- * entry. At least in Condor and earlier. DRENG
- */
- _naca->slb_size = 64;
-
/* Add an eye catcher and the systemcfg layout version number */
strcpy(_systemcfg->eye_catcher, RELOC("SYSTEMCFG:PPC64"));
_systemcfg->version.major = SYSTEMCFG_MAJOR;
diff --git a/arch/ppc64/kernel/stab.c b/arch/ppc64/kernel/stab.c
index 6261cc12dc40..2a0873928228 100644
--- a/arch/ppc64/kernel/stab.c
+++ b/arch/ppc64/kernel/stab.c
@@ -356,7 +356,7 @@ static void make_slbe(unsigned long esid, unsigned long vsid, int large,
* We bolt in the first kernel segment and the first
* vmalloc segment.
*/
- if (castout_entry >= naca->slb_size)
+ if (castout_entry >= SLB_NUM_ENTRIES)
castout_entry = 2;
asm volatile("slbmfee %0,%1" : "=r" (esid_data) : "r" (entry));
} while (esid_data.data.v &&
diff --git a/arch/ppc64/xmon/xmon.c b/arch/ppc64/xmon/xmon.c
index cbb26f6b0084..97b1509acfa9 100644
--- a/arch/ppc64/xmon/xmon.c
+++ b/arch/ppc64/xmon/xmon.c
@@ -2512,7 +2512,7 @@ static void dump_slb(void)
printf("SLB contents of cpu %x\n", smp_processor_id());
- for (i = 0; i < naca->slb_size; i++) {
+ for (i = 0; i < SLB_NUM_ENTRIES; i++) {
asm volatile("slbmfee %0,%1" : "=r" (tmp) : "r" (i));
printf("%02d %016lx ", i, tmp);
diff --git a/include/asm-ppc64/naca.h b/include/asm-ppc64/naca.h
index a50189402420..3c0b8d3a5262 100644
--- a/include/asm-ppc64/naca.h
+++ b/include/asm-ppc64/naca.h
@@ -30,7 +30,7 @@ struct naca_struct {
u64 log; /* Ptr to log buffer 0x30 */
u64 serialPortAddr; /* Phy addr of serial port 0x38 */
u64 interrupt_controller; /* Type of int controller 0x40 */
- u64 slb_size; /* SLB size in entries 0x48 */
+ u64 unused1; /* was SLB size in entries 0x48 */
u64 pftSize; /* Log 2 of page table size 0x50 */
void *systemcfg; /* Pointer to systemcfg data 0x58 */
u32 dCacheL1LogLineSize; /* L1 d-cache line size Log2 0x60 */
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h
index 64b606aaedbe..4280809191a5 100644
--- a/include/asm-ppc64/processor.h
+++ b/include/asm-ppc64/processor.h
@@ -634,4 +634,10 @@ static inline void prefetchw(const void *x)
#endif /* ASSEMBLY */
+/*
+ * Number of entries in the SLB. If this ever changes we should handle
+ * it with a use a cpu feature fixup.
+ */
+#define SLB_NUM_ENTRIES 64
+
#endif /* __ASM_PPC64_PROCESSOR_H */