Date: Tue, 13 Apr 2010 15:55:18 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r206558 - head/sys/ia64/ia64 Message-ID: <201004131555.o3DFtIwF095491@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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++; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004131555.o3DFtIwF095491>