[SPARC64]: Add boot option to force UltraSPARC-III P-Cache on.
Older UltraSPARC-III chips have a P-Cache bug that makes us disable it by default at boot time. However, this does hurt performance substantially, particularly with memcpy(), and the bug is _incredibly_ obscure. I have never seen it triggered in practice, ever. So provide a "-P" boot option that forces the P-Cache on. It taints the kernel, so if it does trigger and cause some data corruption or OOPS, we will find out in the logs that this option was on when it happened. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -421,6 +421,25 @@ asmlinkage void cee_log(unsigned long ce_status,
|
||||
}
|
||||
}
|
||||
|
||||
int cheetah_pcache_forced_on;
|
||||
|
||||
void cheetah_enable_pcache(void)
|
||||
{
|
||||
unsigned long dcr;
|
||||
|
||||
printk("CHEETAH: Enabling P-Cache on cpu %d.\n",
|
||||
smp_processor_id());
|
||||
|
||||
__asm__ __volatile__("ldxa [%%g0] %1, %0"
|
||||
: "=r" (dcr)
|
||||
: "i" (ASI_DCU_CONTROL_REG));
|
||||
dcr |= (DCU_PE | DCU_HPE | DCU_SPE | DCU_SL);
|
||||
__asm__ __volatile__("stxa %0, [%%g0] %1\n\t"
|
||||
"membar #Sync"
|
||||
: /* no outputs */
|
||||
: "r" (dcr), "i" (ASI_DCU_CONTROL_REG));
|
||||
}
|
||||
|
||||
/* Cheetah error trap handling. */
|
||||
static unsigned long ecache_flush_physbase;
|
||||
static unsigned long ecache_flush_linesize;
|
||||
|
Reference in New Issue
Block a user