From owner-svn-src-all@FreeBSD.ORG Tue Apr 13 15:55:19 2010 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 1F74710656A5; Tue, 13 Apr 2010 15:55:19 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F7C58FC24; Tue, 13 Apr 2010 15:55:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3DFtIbl095493; Tue, 13 Apr 2010 15:55:18 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3DFtIwF095491; Tue, 13 Apr 2010 15:55:18 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201004131555.o3DFtIwF095491@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 13 Apr 2010 15:55:18 +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: r206558 - head/sys/ia64/ia64 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: Tue, 13 Apr 2010 15:55:19 -0000 Author: marcel Date: Tue Apr 13 15:55:18 2010 New Revision: 206558 URL: http://svn.freebsd.org/changeset/base/206558 Log: Change the (generic) argument to ia64_store_mca_state() from the cpuid to the struct pcpu of the CPU. We casting between pointer types only then. Modified: head/sys/ia64/ia64/mp_machdep.c Modified: head/sys/ia64/ia64/mp_machdep.c ============================================================================== --- head/sys/ia64/ia64/mp_machdep.c Tue Apr 13 15:53:04 2010 (r206557) +++ head/sys/ia64/ia64/mp_machdep.c Tue Apr 13 15:55:18 2010 (r206558) @@ -152,13 +152,15 @@ cpu_topo(void) static void ia64_store_mca_state(void* arg) { - unsigned int ncpu = (unsigned int)(uintptr_t)arg; - struct thread* td; + struct pcpu *pc = arg; + struct thread *td = curthread; - /* ia64_mca_save_state() is CPU-sensitive, so bind ourself to our target CPU */ - td = curthread; + /* + * ia64_mca_save_state() is CPU-sensitive, so bind ourself to our + * target CPU. + */ thread_lock(td); - sched_bind(td, ncpu); + sched_bind(td, pc->pc_cpuid); thread_unlock(td); /* @@ -362,8 +364,7 @@ cpu_mp_unleash(void *dummy) SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { cpus++; if (pc->pc_md.awake) { - kproc_create(ia64_store_mca_state, - (void*)((uintptr_t)pc->pc_cpuid), NULL, 0, 0, + kproc_create(ia64_store_mca_state, pc, NULL, 0, 0, "mca %u", pc->pc_cpuid); smp_cpus++; }