Commit 1348305a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[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: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bfbc3b5f
......@@ -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 */
......
......@@ -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
......
......@@ -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;
}
/*
......
......@@ -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;
......
......@@ -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 &&
......
......@@ -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);
......
......@@ -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 */
......
......@@ -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 */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment