Fix newly introduced code.

Reported by:	sbruno
This commit is contained in:
Attilio Rao 2011-05-18 16:41:38 +00:00
parent 3a0318e055
commit db4b2ef5a2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=222068

View file

@ -241,7 +241,7 @@ bare_smp_start_cpu(platform_t plat, struct pcpu *pc)
int timeout;
eebpcr = ccsr_read4(OCP85XX_EEBPCR);
if ((eebpcr & (pc->pc_cpumask << 24)) != 0) {
if ((eebpcr & (1 << (pc->pc_cpuid + 24))) != 0) {
printf("%s: CPU=%d already out of hold-off state!\n",
__func__, pc->pc_cpuid);
return (ENXIO);
@ -259,7 +259,8 @@ bare_smp_start_cpu(platform_t plat, struct pcpu *pc)
/*
* Release AP from hold-off state
*/
eebpcr |= (pc->pc_cpumask << 24);
eebpcr |= (1 << (pc->pc_cpuid + 24));
ccsr_write4(OCP85XX_EEBPCR, eebpcr);
__asm __volatile("isync; msync");