From owner-svn-src-head@FreeBSD.ORG Wed May 18 16:50:14 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 036A71065672; Wed, 18 May 2011 16:50:14 +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 9627D8FC2C; Wed, 18 May 2011 16:50:13 +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 p4IGoDqR000466; Wed, 18 May 2011 16:50:13 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4IGoDvd000463; Wed, 18 May 2011 16:50:13 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201105181650.p4IGoDvd000463@svn.freebsd.org> From: Attilio Rao Date: Wed, 18 May 2011 16:50:13 +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: r222070 - head/sys/powerpc/booke X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2011 16:50:14 -0000 Author: attilio Date: Wed May 18 16:50:13 2011 New Revision: 222070 URL: http://svn.freebsd.org/changeset/base/222070 Log: Revert r222069,222068 as they were intended to be committed to the largeSMP branch. Reported by: pluknet Modified: head/sys/powerpc/booke/platform_bare.c head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/platform_bare.c ============================================================================== --- head/sys/powerpc/booke/platform_bare.c Wed May 18 16:42:01 2011 (r222069) +++ head/sys/powerpc/booke/platform_bare.c Wed May 18 16:50:13 2011 (r222070) @@ -241,7 +241,7 @@ bare_smp_start_cpu(platform_t plat, stru int timeout; eebpcr = ccsr_read4(OCP85XX_EEBPCR); - if ((eebpcr & (1 << (pc->pc_cpuid + 24))) != 0) { + if ((eebpcr & (pc->pc_cpumask << 24)) != 0) { printf("%s: CPU=%d already out of hold-off state!\n", __func__, pc->pc_cpuid); return (ENXIO); @@ -259,8 +259,7 @@ bare_smp_start_cpu(platform_t plat, stru /* * Release AP from hold-off state */ - - eebpcr |= (1 << (pc->pc_cpuid + 24)); + eebpcr |= (pc->pc_cpumask << 24); ccsr_write4(OCP85XX_EEBPCR, eebpcr); __asm __volatile("isync; msync"); Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Wed May 18 16:42:01 2011 (r222069) +++ head/sys/powerpc/booke/pmap.c Wed May 18 16:50:13 2011 (r222070) @@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -1229,7 +1228,7 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset PTE_VALID; } /* Mark kernel_pmap active on all CPUs */ - CPU_FILL(&kernel_pmap->pm_active); + kernel_pmap->pm_active = ~0; /*******************************************************/ /* Final setup */ @@ -1484,7 +1483,7 @@ mmu_booke_pinit(mmu_t mmu, pmap_t pmap) PMAP_LOCK_INIT(pmap); for (i = 0; i < MAXCPU; i++) pmap->pm_tid[i] = TID_NONE; - CPU_ZERO(&kernel_pmap->pm_active); + pmap->pm_active = 0; bzero(&pmap->pm_stats, sizeof(pmap->pm_stats)); bzero(&pmap->pm_pdir, sizeof(pte_t *) * PDIR_NENTRIES); TAILQ_INIT(&pmap->pm_ptbl_list); @@ -1839,7 +1838,7 @@ mmu_booke_activate(mmu_t mmu, struct thr mtx_lock_spin(&sched_lock); - CPU_OR_ATOMIC(&pmap->pm_active, PCPU_PTR(cpumask)); + atomic_set_int(&pmap->pm_active, PCPU_GET(cpumask)); PCPU_SET(curpmap, pmap); if (pmap->pm_tid[PCPU_GET(cpuid)] == TID_NONE) @@ -1868,9 +1867,7 @@ mmu_booke_deactivate(mmu_t mmu, struct t CTR5(KTR_PMAP, "%s: td=%p, proc = '%s', id = %d, pmap = 0x%08x", __func__, td, td->td_proc->p_comm, td->td_proc->p_pid, pmap); - sched_pin(); - CPU_NAND_ATOMIC(&pmap->pm_active, PCPU_PTR(cpumask)); - sched_unpin(); + atomic_clear_int(&pmap->pm_active, PCPU_GET(cpumask)); PCPU_SET(curpmap, NULL); }