diff options
author | marcel <marcel@FreeBSD.org> | 2010-04-13 15:55:18 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2010-04-13 15:55:18 +0000 |
commit | 3ac1019f84ed4d6ff272d87f91eae85fcfd686f8 (patch) | |
tree | 3d4e362f621d83c0f970b12d1a0cc8bda5b610de | |
parent | 7dd9349d5743c27d6ad7126f6d59c06ad1eb8c30 (diff) | |
download | FreeBSD-src-3ac1019f84ed4d6ff272d87f91eae85fcfd686f8.zip FreeBSD-src-3ac1019f84ed4d6ff272d87f91eae85fcfd686f8.tar.gz |
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.
-rw-r--r-- | sys/ia64/ia64/mp_machdep.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c index 600803a..05f352a 100644 --- a/sys/ia64/ia64/mp_machdep.c +++ b/sys/ia64/ia64/mp_machdep.c @@ -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++; } |