From 2db3b277214a5d1accdcfe1427f7adeb0b1f3ecb Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 12 Feb 2004 06:57:49 +0000 Subject: [PATCH] Change lwkt_send_ipiq() and lwkt_wait_ipiq() to take a globaldata_t instead of a cpuid. This is part of an ongoing cleanup to use globaldata_t's to reference other cpus rather then their cpu numbers, reducing the number of serialized memory indirections required in a number of code paths and making more context available to the target code. --- sys/i386/apic/apic_vector.s | 6 ++-- sys/i386/isa/apic_vector.s | 6 ++-- sys/i386/isa/clock.c | 4 +-- sys/kern/kern_intr.c | 4 +-- sys/kern/kern_sig.c | 4 +-- sys/kern/kern_slaballoc.c | 7 +++-- sys/kern/kern_switch.c | 6 ++-- sys/kern/kern_systimer.c | 4 +-- sys/kern/kern_upcall.c | 4 +-- sys/kern/lwkt_msgport.c | 6 ++-- sys/kern/lwkt_thread.c | 47 ++++++++++++++++------------ sys/kern/lwkt_token.c | 10 +++--- sys/platform/pc32/apic/apic_vector.s | 6 ++-- sys/platform/pc32/isa/apic_vector.s | 6 ++-- sys/platform/pc32/isa/clock.c | 4 +-- sys/sys/slaballoc.h | 3 +- 16 files changed, 68 insertions(+), 59 deletions(-) diff --git a/sys/i386/apic/apic_vector.s b/sys/i386/apic/apic_vector.s index 9e42b5d026..27a45b3966 100644 --- a/sys/i386/apic/apic_vector.s +++ b/sys/i386/apic/apic_vector.s @@ -1,7 +1,7 @@ /* * from: vector.s, 386BSD 0.1 unknown origin * $FreeBSD: src/sys/i386/isa/apic_vector.s,v 1.47.2.5 2001/09/01 22:33:38 tegge Exp $ - * $DragonFly: src/sys/i386/apic/Attic/apic_vector.s,v 1.15 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/i386/apic/Attic/apic_vector.s,v 1.16 2004/02/12 06:57:46 dillon Exp $ */ @@ -188,7 +188,7 @@ IDTVEC(vec_name) ; \ MEXITCOUNT ; \ jmp doreti ; \ 6: ; \ - /* could not get MP lock, forward the interrupt */ \ + /* could not get the MP lock, forward the interrupt */ \ movl mp_lock, %eax ; /* check race */ \ cmpl $MP_FREE_LOCK,%eax ; \ je 2b ; \ @@ -197,7 +197,7 @@ IDTVEC(vec_name) ; \ movl $irq_num,8(%esp) ; \ movl $forward_fastint_remote,4(%esp) ; \ movl %eax,(%esp) ; \ - call lwkt_send_ipiq ; \ + call lwkt_send_ipiq_bycpu ; \ addl $12,%esp ; \ jmp 5f ; \ diff --git a/sys/i386/isa/apic_vector.s b/sys/i386/isa/apic_vector.s index e9ff512067..59264d3f74 100644 --- a/sys/i386/isa/apic_vector.s +++ b/sys/i386/isa/apic_vector.s @@ -1,7 +1,7 @@ /* * from: vector.s, 386BSD 0.1 unknown origin * $FreeBSD: src/sys/i386/isa/apic_vector.s,v 1.47.2.5 2001/09/01 22:33:38 tegge Exp $ - * $DragonFly: src/sys/i386/isa/Attic/apic_vector.s,v 1.15 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/i386/isa/Attic/apic_vector.s,v 1.16 2004/02/12 06:57:46 dillon Exp $ */ @@ -188,7 +188,7 @@ IDTVEC(vec_name) ; \ MEXITCOUNT ; \ jmp doreti ; \ 6: ; \ - /* could not get MP lock, forward the interrupt */ \ + /* could not get the MP lock, forward the interrupt */ \ movl mp_lock, %eax ; /* check race */ \ cmpl $MP_FREE_LOCK,%eax ; \ je 2b ; \ @@ -197,7 +197,7 @@ IDTVEC(vec_name) ; \ movl $irq_num,8(%esp) ; \ movl $forward_fastint_remote,4(%esp) ; \ movl %eax,(%esp) ; \ - call lwkt_send_ipiq ; \ + call lwkt_send_ipiq_bycpu ; \ addl $12,%esp ; \ jmp 5f ; \ diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index dc56164c67..450ae7fff7 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -35,7 +35,7 @@ * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/isa/clock.c,v 1.149.2.6 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/i386/isa/Attic/clock.c,v 1.11 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/i386/isa/Attic/clock.c,v 1.12 2004/02/12 06:57:46 dillon Exp $ */ /* @@ -174,7 +174,7 @@ clkintr(struct intrframe frame) if (gscan->gd_nextclock == 0) continue; if (gscan != gd) { - lwkt_send_ipiq(gscan->gd_cpuid, (ipifunc_t)systimer_intr, &timer1_count); + lwkt_send_ipiq(gscan, (ipifunc_t)systimer_intr, &timer1_count); } else { systimer_intr(&timer1_count, &frame); } diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c index 254ea9443b..45b7565206 100644 --- a/sys/kern/kern_intr.c +++ b/sys/kern/kern_intr.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/kern/kern_intr.c,v 1.24.2.1 2001/10/14 20:05:50 luigi Exp $ - * $DragonFly: src/sys/kern/kern_intr.c,v 1.13 2003/11/03 02:08:35 dillon Exp $ + * $DragonFly: src/sys/kern/kern_intr.c,v 1.14 2004/02/12 06:57:48 dillon Exp $ * */ @@ -206,7 +206,7 @@ sched_ithd(int intr) irunning[intr] = 1; lwkt_schedule(td); /* preemption handled internally */ } else { - lwkt_send_ipiq(td->td_gd->gd_cpuid, sched_ithd_remote, (void *)intr); + lwkt_send_ipiq(td->td_gd, sched_ithd_remote, (void *)intr); } } } else { diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 980ff90da0..433f58edb4 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -37,7 +37,7 @@ * * @(#)kern_sig.c 8.7 (Berkeley) 4/18/94 * $FreeBSD: src/sys/kern/kern_sig.c,v 1.72.2.17 2003/05/16 16:34:34 obrien Exp $ - * $DragonFly: src/sys/kern/kern_sig.c,v 1.25 2004/02/08 05:44:58 hmp Exp $ + * $DragonFly: src/sys/kern/kern_sig.c,v 1.26 2004/02/12 06:57:48 dillon Exp $ */ #include "opt_ktrace.h" @@ -978,7 +978,7 @@ psignal(p, sig) struct thread *td = p->p_thread; if (td->td_gd != mycpu) - lwkt_send_ipiq(td->td_gd->gd_cpuid, signotify_remote, p); + lwkt_send_ipiq(td->td_gd, signotify_remote, p); } #else if (p == lwkt_preempted_proc()) diff --git a/sys/kern/kern_slaballoc.c b/sys/kern/kern_slaballoc.c index 2a750ae010..c3110627c0 100644 --- a/sys/kern/kern_slaballoc.c +++ b/sys/kern/kern_slaballoc.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/kern/kern_slaballoc.c,v 1.15 2004/01/20 05:04:06 dillon Exp $ + * $DragonFly: src/sys/kern/kern_slaballoc.c,v 1.16 2004/02/12 06:57:48 dillon Exp $ * * This module implements a slab allocator drop-in replacement for the * kernel malloc(). @@ -554,6 +554,7 @@ malloc(unsigned long size, struct malloc_type *type, int flags) z->z_UIndex = z->z_UEndIndex = slgd->JunkIndex % z->z_NMax; z->z_ChunkSize = size; z->z_FirstFreePg = ZonePageCount; + z->z_CpuGd = gd; z->z_Cpu = gd->gd_cpuid; chunk = (SLChunk *)(z->z_BasePtr + z->z_UIndex * size); z->z_Next = slgd->ZoneAry[zi]; @@ -735,10 +736,10 @@ free(void *ptr, struct malloc_type *type) * cpu that does. The freeing code does not need the byte count * unless DIAGNOSTIC is set. */ - if (z->z_Cpu != gd->gd_cpuid) { + if (z->z_CpuGd != gd) { *(struct malloc_type **)ptr = type; #ifdef SMP - lwkt_send_ipiq(z->z_Cpu, free_remote, ptr); + lwkt_send_ipiq(z->z_CpuGd, free_remote, ptr); #else panic("Corrupt SLZone"); #endif diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index dbe81a4418..0b6ddd81b7 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/kern_switch.c,v 1.3.2.1 2000/05/16 06:58:12 dillon Exp $ - * $DragonFly: src/sys/kern/Attic/kern_switch.c,v 1.16 2003/12/30 03:19:02 dillon Exp $ + * $DragonFly: src/sys/kern/Attic/kern_switch.c,v 1.17 2004/02/12 06:57:48 dillon Exp $ */ #include @@ -344,7 +344,7 @@ setrunqueue(struct proc *p) } else if (remote_resched) { if (p->p_priority / PPQ < gd->gd_upri / PPQ) { gd->gd_upri = p->p_priority; - lwkt_send_ipiq(cpuid, need_resched_remote, NULL); + lwkt_send_ipiq(gd, need_resched_remote, NULL); --count; ++remote_resched_affinity; } @@ -392,7 +392,7 @@ setrunqueue(struct proc *p) if (p->p_priority / PPQ < gd->gd_upri / PPQ - 2) { gd->gd_upri = p->p_priority; - lwkt_send_ipiq(cpuid, need_resched_remote, NULL); + lwkt_send_ipiq(gd, need_resched_remote, NULL); ++remote_resched_nonaffinity; } } diff --git a/sys/kern/kern_systimer.c b/sys/kern/kern_systimer.c index 47c00956ec..89743ee82d 100644 --- a/sys/kern/kern_systimer.c +++ b/sys/kern/kern_systimer.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/kern/kern_systimer.c,v 1.1 2004/01/30 05:42:17 dillon Exp $ + * $DragonFly: src/sys/kern/kern_systimer.c,v 1.2 2004/02/12 06:57:48 dillon Exp $ */ /* @@ -138,7 +138,7 @@ systimer_add(systimer_t info) info->queue = &gd->gd_systimerq; } else { info->flags |= SYSTF_IPIRUNNING; - lwkt_send_ipiq(info->gd->gd_cpuid, (ipifunc_t)systimer_add, info); + lwkt_send_ipiq(info->gd, (ipifunc_t)systimer_add, info); } crit_exit(); } diff --git a/sys/kern/kern_upcall.c b/sys/kern/kern_upcall.c index 2e1d381f62..f3611020e4 100644 --- a/sys/kern/kern_upcall.c +++ b/sys/kern/kern_upcall.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/kern/kern_upcall.c,v 1.4 2003/12/07 04:20:40 dillon Exp $ + * $DragonFly: src/sys/kern/kern_upcall.c,v 1.5 2004/02/12 06:57:48 dillon Exp $ */ /* @@ -141,7 +141,7 @@ upc_control(struct upc_control_args *uap) wakeup(&targp->p_upcall); #ifdef SMP if (targp->p_thread->td_gd != mycpu) - lwkt_send_ipiq(targp->p_thread->td_gd->gd_cpuid, sigupcall_remote, targp); + lwkt_send_ipiq(targp->p_thread->td_gd, sigupcall_remote, targp); else sigupcall(); #else diff --git a/sys/kern/lwkt_msgport.c b/sys/kern/lwkt_msgport.c index c055cff09f..3299ffb955 100644 --- a/sys/kern/lwkt_msgport.c +++ b/sys/kern/lwkt_msgport.c @@ -26,7 +26,7 @@ * NOTE! This file may be compiled for userland libraries as well as for * the kernel. * - * $DragonFly: src/sys/kern/lwkt_msgport.c,v 1.13 2004/01/01 00:32:34 dillon Exp $ + * $DragonFly: src/sys/kern/lwkt_msgport.c,v 1.14 2004/02/12 06:57:48 dillon Exp $ */ #ifdef _KERNEL @@ -223,7 +223,7 @@ _lwkt_replyport(lwkt_port_t port, lwkt_msg_t msg) if (port->mp_flags & MSGPORTF_WAITING) lwkt_schedule(td); } else { - lwkt_send_ipiq(td->td_gd->gd_cpuid, (ipifunc_t)lwkt_replyport_remote, msg); + lwkt_send_ipiq(td->td_gd, (ipifunc_t)lwkt_replyport_remote, msg); } } @@ -277,7 +277,7 @@ _lwkt_putport(lwkt_port_t port, lwkt_msg_t msg) lwkt_schedule(td); } else { msg->ms_target_port = port; - lwkt_send_ipiq(td->td_gd->gd_cpuid, (ipifunc_t)lwkt_putport_remote, msg); + lwkt_send_ipiq(td->td_gd, (ipifunc_t)lwkt_putport_remote, msg); } } diff --git a/sys/kern/lwkt_thread.c b/sys/kern/lwkt_thread.c index 0fae9ea89d..fd32e3477e 100644 --- a/sys/kern/lwkt_thread.c +++ b/sys/kern/lwkt_thread.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/kern/lwkt_thread.c,v 1.51 2004/02/09 21:13:18 dillon Exp $ + * $DragonFly: src/sys/kern/lwkt_thread.c,v 1.52 2004/02/12 06:57:48 dillon Exp $ */ /* @@ -276,7 +276,7 @@ lwkt_init_thread(thread_t td, void *stack, int flags, struct globaldata *gd) TAILQ_INSERT_TAIL(&gd->gd_tdallq, td, td_allq); crit_exit(); } else { - lwkt_send_ipiq(gd->gd_cpuid, lwkt_init_thread_remote, td); + lwkt_send_ipiq(gd, lwkt_init_thread_remote, td); } } @@ -812,7 +812,7 @@ lwkt_schedule(thread_t td) need_resched(); } } else { - lwkt_send_ipiq(td->td_gd->gd_cpuid, (ipifunc_t)lwkt_schedule, td); + lwkt_send_ipiq(td->td_gd, (ipifunc_t)lwkt_schedule, td); } lwkt_reltoken(&w->wa_token); } else { @@ -833,7 +833,7 @@ lwkt_schedule(thread_t td) need_resched(); } } else { - lwkt_send_ipiq(td->td_gd->gd_cpuid, (ipifunc_t)lwkt_schedule, td); + lwkt_send_ipiq(td->td_gd, (ipifunc_t)lwkt_schedule, td); } } } @@ -900,7 +900,7 @@ lwkt_deschedule(thread_t td) if (td->td_gd == mycpu) { _lwkt_dequeue(td); } else { - lwkt_send_ipiq(td->td_gd->gd_cpuid, (ipifunc_t)lwkt_deschedule, td); + lwkt_send_ipiq(td->td_gd, (ipifunc_t)lwkt_deschedule, td); } } crit_exit(); @@ -1023,7 +1023,7 @@ lwkt_signal(lwkt_wait_t w, int count) if (td->td_gd == mycpu) { _lwkt_enqueue(td); } else { - lwkt_send_ipiq(td->td_gd->gd_cpuid, (ipifunc_t)lwkt_schedule, td); + lwkt_send_ipiq(td->td_gd, (ipifunc_t)lwkt_schedule, td); } lwkt_regettoken(&w->wa_token); } @@ -1179,13 +1179,13 @@ crit_panic(void) * Must be called from a critical section. */ int -lwkt_send_ipiq(int dcpu, ipifunc_t func, void *arg) +lwkt_send_ipiq(globaldata_t target, ipifunc_t func, void *arg) { lwkt_ipiq_t ip; int windex; struct globaldata *gd = mycpu; - if (dcpu == gd->gd_cpuid) { + if (target == gd) { func(arg); return(0); } @@ -1196,9 +1196,8 @@ lwkt_send_ipiq(int dcpu, ipifunc_t func, void *arg) panic("lwkt_send_ipiq: TOO HEAVILY NESTED!"); #endif KKASSERT(curthread->td_pri >= TDPRI_CRIT); - KKASSERT(dcpu >= 0 && dcpu < ncpus); ++ipiq_count; - ip = &gd->gd_ipiq[dcpu]; + ip = &gd->gd_ipiq[target->gd_cpuid]; /* * We always drain before the FIFO becomes full so it should never @@ -1222,11 +1221,20 @@ lwkt_send_ipiq(int dcpu, ipifunc_t func, void *arg) write_eflags(eflags); } --gd->gd_intr_nesting_level; - cpu_send_ipiq(dcpu); /* issues memory barrier if appropriate */ + cpu_send_ipiq(target->gd_cpuid); /* issues mem barrier if appropriate */ crit_exit(); return(ip->ip_windex); } +/* + * deprecated, used only by fast int forwarding. + */ +int +lwkt_send_ipiq_bycpu(int dcpu, ipifunc_t func, void *arg) +{ + return(lwkt_send_ipiq(globaldata_find(dcpu), func, arg)); +} + /* * Send a message to several target cpus. Typically used for scheduling. * The message will not be sent to stopped cpus. @@ -1256,21 +1264,20 @@ lwkt_send_ipiq_mask(u_int32_t mask, ipifunc_t func, void *arg) * up). */ void -lwkt_wait_ipiq(int dcpu, int seq) +lwkt_wait_ipiq(globaldata_t target, int seq) { lwkt_ipiq_t ip; int maxc = 100000000; - if (dcpu != mycpu->gd_cpuid) { - KKASSERT(dcpu >= 0 && dcpu < ncpus); - ip = &mycpu->gd_ipiq[dcpu]; + if (target != mycpu) { + ip = &mycpu->gd_ipiq[target->gd_cpuid]; if ((int)(ip->ip_xindex - seq) < 0) { unsigned int eflags = read_eflags(); cpu_enable_intr(); while ((int)(ip->ip_xindex - seq) < 0) { lwkt_process_ipiq(); if (--maxc == 0) - printf("LWKT_WAIT_IPIQ WARNING! %d wait %d (%d)\n", mycpu->gd_cpuid, dcpu, ip->ip_xindex - seq); + printf("LWKT_WAIT_IPIQ WARNING! %d wait %d (%d)\n", mycpu->gd_cpuid, target->gd_cpuid, ip->ip_xindex - seq); if (maxc < -1000000) panic("LWKT_WAIT_IPIQ"); } @@ -1358,16 +1365,16 @@ lwkt_process_ipiq_frame(struct intrframe frame) #else int -lwkt_send_ipiq(int dcpu, ipifunc_t func, void *arg) +lwkt_send_ipiq(globaldata_t target, ipifunc_t func, void *arg) { - panic("lwkt_send_ipiq: UP box! (%d,%p,%p)", dcpu, func, arg); + panic("lwkt_send_ipiq: UP box! (%d,%p,%p)", target->gd_cpuid, func, arg); return(0); /* NOT REACHED */ } void -lwkt_wait_ipiq(int dcpu, int seq) +lwkt_wait_ipiq(globaldata_t target, int seq) { - panic("lwkt_wait_ipiq: UP box! (%d,%d)", dcpu, seq); + panic("lwkt_wait_ipiq: UP box! (%d,%d)", target->gd_cpuid, seq); } #endif diff --git a/sys/kern/lwkt_token.c b/sys/kern/lwkt_token.c index af55217a3a..a36f28fe27 100644 --- a/sys/kern/lwkt_token.c +++ b/sys/kern/lwkt_token.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/kern/lwkt_token.c,v 1.2 2004/02/10 07:34:42 dillon Exp $ + * $DragonFly: src/sys/kern/lwkt_token.c,v 1.3 2004/02/12 06:57:48 dillon Exp $ */ #ifdef _KERNEL @@ -172,8 +172,8 @@ lwkt_gettoken(lwkt_token_t tok) if (token_debug) printf("REQT%d ", dcpu->gd_cpuid); #endif - seq = lwkt_send_ipiq(dcpu->gd_cpuid, lwkt_gettoken_remote, &req); - lwkt_wait_ipiq(dcpu->gd_cpuid, seq); + seq = lwkt_send_ipiq(dcpu, lwkt_gettoken_remote, &req); + lwkt_wait_ipiq(dcpu, seq); #ifdef INVARIANTS if (token_debug) printf("REQR%d ", tok->t_cpu->gd_cpuid); @@ -275,8 +275,8 @@ lwkt_regettoken(lwkt_token_t tok) if (token_debug) printf("REQT%d ", dcpu->gd_cpuid); #endif - seq = lwkt_send_ipiq(dcpu->gd_cpuid, lwkt_gettoken_remote, &req); - lwkt_wait_ipiq(dcpu->gd_cpuid, seq); + seq = lwkt_send_ipiq(dcpu, lwkt_gettoken_remote, &req); + lwkt_wait_ipiq(dcpu, seq); #ifdef INVARIATNS if (token_debug) printf("REQR%d ", tok->t_cpu->gd_cpuid); diff --git a/sys/platform/pc32/apic/apic_vector.s b/sys/platform/pc32/apic/apic_vector.s index ed2e57b70b..f9f158f19b 100644 --- a/sys/platform/pc32/apic/apic_vector.s +++ b/sys/platform/pc32/apic/apic_vector.s @@ -1,7 +1,7 @@ /* * from: vector.s, 386BSD 0.1 unknown origin * $FreeBSD: src/sys/i386/isa/apic_vector.s,v 1.47.2.5 2001/09/01 22:33:38 tegge Exp $ - * $DragonFly: src/sys/platform/pc32/apic/apic_vector.s,v 1.15 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/apic/apic_vector.s,v 1.16 2004/02/12 06:57:46 dillon Exp $ */ @@ -188,7 +188,7 @@ IDTVEC(vec_name) ; \ MEXITCOUNT ; \ jmp doreti ; \ 6: ; \ - /* could not get MP lock, forward the interrupt */ \ + /* could not get the MP lock, forward the interrupt */ \ movl mp_lock, %eax ; /* check race */ \ cmpl $MP_FREE_LOCK,%eax ; \ je 2b ; \ @@ -197,7 +197,7 @@ IDTVEC(vec_name) ; \ movl $irq_num,8(%esp) ; \ movl $forward_fastint_remote,4(%esp) ; \ movl %eax,(%esp) ; \ - call lwkt_send_ipiq ; \ + call lwkt_send_ipiq_bycpu ; \ addl $12,%esp ; \ jmp 5f ; \ diff --git a/sys/platform/pc32/isa/apic_vector.s b/sys/platform/pc32/isa/apic_vector.s index 91f4c68d6c..af1fdc33fd 100644 --- a/sys/platform/pc32/isa/apic_vector.s +++ b/sys/platform/pc32/isa/apic_vector.s @@ -1,7 +1,7 @@ /* * from: vector.s, 386BSD 0.1 unknown origin * $FreeBSD: src/sys/i386/isa/apic_vector.s,v 1.47.2.5 2001/09/01 22:33:38 tegge Exp $ - * $DragonFly: src/sys/platform/pc32/isa/Attic/apic_vector.s,v 1.15 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/Attic/apic_vector.s,v 1.16 2004/02/12 06:57:46 dillon Exp $ */ @@ -188,7 +188,7 @@ IDTVEC(vec_name) ; \ MEXITCOUNT ; \ jmp doreti ; \ 6: ; \ - /* could not get MP lock, forward the interrupt */ \ + /* could not get the MP lock, forward the interrupt */ \ movl mp_lock, %eax ; /* check race */ \ cmpl $MP_FREE_LOCK,%eax ; \ je 2b ; \ @@ -197,7 +197,7 @@ IDTVEC(vec_name) ; \ movl $irq_num,8(%esp) ; \ movl $forward_fastint_remote,4(%esp) ; \ movl %eax,(%esp) ; \ - call lwkt_send_ipiq ; \ + call lwkt_send_ipiq_bycpu ; \ addl $12,%esp ; \ jmp 5f ; \ diff --git a/sys/platform/pc32/isa/clock.c b/sys/platform/pc32/isa/clock.c index 48c2286ffa..58c50f154a 100644 --- a/sys/platform/pc32/isa/clock.c +++ b/sys/platform/pc32/isa/clock.c @@ -35,7 +35,7 @@ * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 * $FreeBSD: src/sys/i386/isa/clock.c,v 1.149.2.6 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/platform/pc32/isa/clock.c,v 1.11 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/clock.c,v 1.12 2004/02/12 06:57:46 dillon Exp $ */ /* @@ -174,7 +174,7 @@ clkintr(struct intrframe frame) if (gscan->gd_nextclock == 0) continue; if (gscan != gd) { - lwkt_send_ipiq(gscan->gd_cpuid, (ipifunc_t)systimer_intr, &timer1_count); + lwkt_send_ipiq(gscan, (ipifunc_t)systimer_intr, &timer1_count); } else { systimer_intr(&timer1_count, &frame); } diff --git a/sys/sys/slaballoc.h b/sys/sys/slaballoc.h index c56de23f8e..da7566285e 100644 --- a/sys/sys/slaballoc.h +++ b/sys/sys/slaballoc.h @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/slaballoc.h,v 1.5 2003/11/21 22:46:13 dillon Exp $ + * $DragonFly: src/sys/sys/slaballoc.h,v 1.6 2004/02/12 06:57:49 dillon Exp $ */ #ifndef _SYS_SLABALLOC_H_ @@ -73,6 +73,7 @@ typedef struct SLChunk { typedef struct SLZone { __int32_t z_Magic; /* magic number for sanity check */ int z_Cpu; /* which cpu owns this zone? */ + struct globaldata *z_CpuGd; /* which cpu owns this zone? */ int z_NFree; /* total free chunks / ualloc space in zone */ struct SLZone *z_Next; /* ZoneAry[] link if z_NFree non-zero */ int z_NMax; /* maximum free chunks */ -- 2.41.0