Commit 82584817 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: Make PMC6 spin

From: Anton Blanchard <anton@samba.org>

Make PMC6 spin on POWER5 boxes.
parent 56078e53
...@@ -114,6 +114,7 @@ void ppc64_enable_pmcs(void) ...@@ -114,6 +114,7 @@ void ppc64_enable_pmcs(void)
unsigned long hid0; unsigned long hid0;
unsigned long set, reset; unsigned long set, reset;
int ret; int ret;
unsigned int ctrl;
/* Only need to enable them once */ /* Only need to enable them once */
if (__get_cpu_var(pmcs_enabled)) if (__get_cpu_var(pmcs_enabled))
...@@ -158,6 +159,16 @@ void ppc64_enable_pmcs(void) ...@@ -158,6 +159,16 @@ void ppc64_enable_pmcs(void)
char *ptr = (char *)&paca[smp_processor_id()].xLpPaca; char *ptr = (char *)&paca[smp_processor_id()].xLpPaca;
ptr[0xBB] = 1; ptr[0xBB] = 1;
} }
/*
* On SMT machines we have to set the run latch in the ctrl register
* in order to make PMC6 spin.
*/
if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) {
ctrl = mfspr(CTRLF);
ctrl |= RUNLATCH;
mtspr(CTRLT, ctrl);
}
} }
#endif #endif
......
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