From owner-svn-src-all@FreeBSD.ORG Wed May 18 16:41:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CFE4106566B; Wed, 18 May 2011 16:41:38 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D94C8FC13; Wed, 18 May 2011 16:41:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4IGfcfn000125; Wed, 18 May 2011 16:41:38 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4IGfcIC000123; Wed, 18 May 2011 16:41:38 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201105181641.p4IGfcIC000123@svn.freebsd.org> From: Attilio Rao Date: Wed, 18 May 2011 16:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222068 - head/sys/powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2011 16:41:38 -0000 Author: attilio Date: Wed May 18 16:41:38 2011 New Revision: 222068 URL: http://svn.freebsd.org/changeset/base/222068 Log: Fix newly introduced code. Reported by: sbruno Modified: head/sys/powerpc/booke/platform_bare.c Modified: head/sys/powerpc/booke/platform_bare.c ============================================================================== --- head/sys/powerpc/booke/platform_bare.c Wed May 18 16:28:28 2011 (r222067) +++ head/sys/powerpc/booke/platform_bare.c Wed May 18 16:41:38 2011 (r222068) @@ -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,8 @@ 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");