Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 May 2011 16:56:36 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r222071 - projects/largeSMP/sys/powerpc/booke
Message-ID:  <201105181656.p4IGuauQ000688@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Wed May 18 16:56:36 2011
New Revision: 222071
URL: http://svn.freebsd.org/changeset/base/222071

Log:
  Fix usage of cpumask that cannot be used like that anymore.
  
  Reported by:	pluknet

Modified:
  projects/largeSMP/sys/powerpc/booke/platform_bare.c

Modified: projects/largeSMP/sys/powerpc/booke/platform_bare.c
==============================================================================
--- projects/largeSMP/sys/powerpc/booke/platform_bare.c	Wed May 18 16:50:13 2011	(r222070)
+++ projects/largeSMP/sys/powerpc/booke/platform_bare.c	Wed May 18 16:56:36 2011	(r222071)
@@ -241,7 +241,7 @@ bare_smp_start_cpu(platform_t plat, stru
 	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,7 @@ bare_smp_start_cpu(platform_t plat, stru
 	/*
 	 * 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");
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105181656.p4IGuauQ000688>