From owner-p4-projects Thu Oct 17 17: 5: 1 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CA5C237B404; Thu, 17 Oct 2002 17:04:49 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EB06237B401 for ; Thu, 17 Oct 2002 17:04:48 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64AC643E77 for ; Thu, 17 Oct 2002 17:04:48 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id g9I04cmV098748 for ; Thu, 17 Oct 2002 17:04:38 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id g9I04bCn098745 for perforce@freebsd.org; Thu, 17 Oct 2002 17:04:37 -0700 (PDT) Date: Thu, 17 Oct 2002 17:04:37 -0700 (PDT) Message-Id: <200210180004.g9I04bCn098745@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 19514 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=19514 Change 19514 by peter@peter_daintree on 2002/10/17 17:03:36 integrate i386_hammer branch Affected files ... .. //depot/projects/hammer/sys/x86_64/acpica/acpi_machdep.c#5 integrate .. //depot/projects/hammer/sys/x86_64/acpica/acpi_wakeup.c#4 integrate .. //depot/projects/hammer/sys/x86_64/conf/GENERIC.hints#3 integrate .. //depot/projects/hammer/sys/x86_64/include/atomic.h#4 integrate .. //depot/projects/hammer/sys/x86_64/include/pcb.h#4 integrate .. //depot/projects/hammer/sys/x86_64/include/setjmp.h#3 integrate .. //depot/projects/hammer/sys/x86_64/include/signal.h#4 integrate .. //depot/projects/hammer/sys/x86_64/include/varargs.h#2 integrate .. //depot/projects/hammer/sys/x86_64/isa/clock.c#6 integrate .. //depot/projects/hammer/sys/x86_64/pci/pci_bus.c#5 integrate .. //depot/projects/hammer/sys/x86_64/pci/pci_cfgreg.c#6 integrate .. //depot/projects/hammer/sys/x86_64/x86_64/machdep.c#25 integrate .. //depot/projects/hammer/sys/x86_64/x86_64/mem.c#4 integrate .. //depot/projects/hammer/sys/x86_64/x86_64/trap.c#12 integrate .. //depot/projects/hammer/sys/x86_64/x86_64/vm_machdep.c#7 integrate Differences ... ==== //depot/projects/hammer/sys/x86_64/acpica/acpi_machdep.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.3 2002/09/30 18:45:20 jhb Exp $ + * $FreeBSD: src/sys/i386/acpica/acpi_machdep.c,v 1.5 2002/10/16 17:20:43 jhb Exp $ */ #include ==== //depot/projects/hammer/sys/x86_64/acpica/acpi_wakeup.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.13 2002/08/22 21:24:00 archie Exp $ + * $FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.15 2002/10/16 17:22:03 jhb Exp $ */ #include #include ==== //depot/projects/hammer/sys/x86_64/conf/GENERIC.hints#3 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/i386/conf/GENERIC.hints,v 1.8 2001/05/26 08:04:34 jkh Exp $ +# $FreeBSD: src/sys/i386/conf/GENERIC.hints,v 1.9 2002/10/09 17:00:46 jhb Exp $ hint.fdc.0.at="isa" hint.fdc.0.port="0x3F0" hint.fdc.0.irq="6" @@ -28,9 +28,6 @@ hint.sc.0.at="isa" hint.sc.0.flags="0x100" hint.vt.0.at="isa" -hint.npx.0.at="nexus" -hint.npx.0.port="0x0F0" -hint.npx.0.irq="13" hint.pmtimer.0.at="isa" hint.pcic.0.at="isa" # hint.pcic.0.irq="10" # Default to polling ==== //depot/projects/hammer/sys/x86_64/include/atomic.h#4 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/include/atomic.h,v 1.28 2002/07/18 15:56:46 markm Exp $ + * $FreeBSD: src/sys/i386/include/atomic.h,v 1.29 2002/10/14 19:33:12 pirzyk Exp $ */ #ifndef _MACHINE_ATOMIC_H_ #define _MACHINE_ATOMIC_H_ ==== //depot/projects/hammer/sys/x86_64/include/pcb.h#4 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)pcb.h 5.10 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/i386/include/pcb.h,v 1.47 2002/10/01 14:08:07 phk Exp $ + * $FreeBSD: src/sys/i386/include/pcb.h,v 1.48 2002/10/15 00:02:50 peter Exp $ */ #ifndef _I386_PCB_H_ @@ -74,16 +74,6 @@ u_long __pcb_spare[2]; /* adjust to avoid core dump size changes */ }; -/* - * The pcb is augmented with machine-dependent additional data for - * core dumps. For the i386: ??? - */ -struct md_coredump { -#ifdef lint - int dummy; -#endif -}; - #ifdef _KERNEL void savectx(struct pcb *); #endif ==== //depot/projects/hammer/sys/x86_64/include/setjmp.h#3 (text+ko) ==== @@ -29,12 +29,14 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/include/setjmp.h,v 1.6 2002/10/04 22:10:06 mike Exp $ + * $FreeBSD: src/sys/i386/include/setjmp.h,v 1.7 2002/10/05 05:47:55 mike Exp $ */ #ifndef _MACHINE_SETJMP_H_ #define _MACHINE_SETJMP_H_ +#include + #define _JBLEN 11 /* Size of the jmp_buf on x86. */ /* @@ -42,7 +44,7 @@ * compile-time diagnostics for mismatches. The structs are the same * internally to avoid some run-time errors for mismatches. */ -#ifndef _ANSI_SOURCE +#if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE typedef struct _sigjmp_buf { int _sjb[_JBLEN + 1]; } sigjmp_buf[1]; #endif ==== //depot/projects/hammer/sys/x86_64/include/signal.h#4 (text+ko) ==== @@ -31,26 +31,30 @@ * SUCH DAMAGE. * * @(#)signal.h 8.1 (Berkeley) 6/11/93 - * $FreeBSD: src/sys/i386/include/signal.h,v 1.16 2002/09/16 19:25:41 mini Exp $ + * $FreeBSD: src/sys/i386/include/signal.h,v 1.17 2002/10/13 00:31:46 mike Exp $ */ #ifndef _MACHINE_SIGNAL_H_ #define _MACHINE_SIGNAL_H_ +#include +#include + /* * Machine-dependent signal definitions */ typedef int sig_atomic_t; -#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) - +#if __XSI_VISIBLE /* * Minimum signal stack size. The current signal frame * for i386 is 408 bytes large. */ #define MINSIGSTKSZ (512 * 4) +#endif +#if __BSD_VISIBLE #include /* codes for SIGILL, SIGFPE */ /* @@ -68,7 +72,7 @@ * those in mcontext_t. */ struct sigcontext { - sigset_t sc_mask; /* signal mask to restore */ + struct __sigset sc_mask; /* signal mask to restore */ int sc_onstack; /* sigstack state to restore */ int sc_gs; /* machine state (struct trapframe): */ int sc_fs; @@ -106,6 +110,6 @@ #define sc_ps sc_efl #define sc_eflags sc_efl -#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ +#endif /* __BSD_VISIBLE */ #endif /* !_MACHINE_SIGNAL_H_ */ ==== //depot/projects/hammer/sys/x86_64/include/varargs.h#2 (text+ko) ==== @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)varargs.h 8.2 (Berkeley) 3/22/94 - * $FreeBSD: src/sys/i386/include/varargs.h,v 1.10 2002/08/21 16:19:58 mike Exp $ + * $FreeBSD: src/sys/i386/include/varargs.h,v 1.11 2002/10/06 22:02:06 mike Exp $ */ #ifndef _VARARGS_H_ @@ -47,7 +47,11 @@ #include +#ifndef _VA_LIST_DECLARED +#define _VA_LIST_DECLARED typedef __va_list va_list; +#endif + typedef int __builtin_va_alist_t __attribute__((__mode__(__word__))); #define va_alist __builtin_va_alist ==== //depot/projects/hammer/sys/x86_64/isa/clock.c#6 (text+ko) ==== @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)clock.c 7.2 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/i386/isa/clock.c,v 1.189 2002/09/21 07:59:06 phk Exp $ + * $FreeBSD: src/sys/i386/isa/clock.c,v 1.190 2002/10/17 13:55:39 iwasaki Exp $ */ /* ==== //depot/projects/hammer/sys/x86_64/pci/pci_bus.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/pci/pci_bus.c,v 1.92 2002/10/02 17:50:38 iwasaki Exp $ + * $FreeBSD: src/sys/i386/pci/pci_bus.c,v 1.93 2002/10/16 18:38:35 jhb Exp $ * */ @@ -82,8 +82,6 @@ return (PCI_INVALID_IRQ); } -static devclass_t pcib_devclass; - static const char * nexus_pcib_is_host_bridge(int bus, int slot, int func, u_int32_t id, u_int8_t class, u_int8_t subclass, ==== //depot/projects/hammer/sys/x86_64/pci/pci_cfgreg.c#6 (text+ko) ==== @@ -25,7 +25,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/pci/pci_cfgreg.c,v 1.96 2002/09/28 17:36:29 phk Exp $ + * $FreeBSD: src/sys/i386/pci/pci_cfgreg.c,v 1.97 2002/10/07 05:15:05 imp Exp $ + * */ #include /* XXX trim includes */ @@ -106,7 +107,7 @@ pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes) { - return (pcireg_cfgwrite(bus, slot, func, reg, data, bytes)); + pcireg_cfgwrite(bus, slot, func, reg, data, bytes)); } /* ==== //depot/projects/hammer/sys/x86_64/x86_64/machdep.c#25 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.540 2002/10/04 14:50:50 deischen Exp $ + * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.542 2002/10/12 05:32:23 jeff Exp $ */ #include "opt_atalk.h" @@ -68,6 +68,7 @@ #include #include #include +#include #include #include #include @@ -473,7 +474,7 @@ /* * Note that we have to be careful here to avoid a race between checking - * kserunnable() and actually halting. If we don't do this, we may waste + * sched_runnable() and actually halting. If we don't do this, we may waste * the time between calling hlt and the next interrupt even though there * is a runnable process. */ @@ -482,7 +483,7 @@ { if (cpu_idle_hlt) { disable_intr(); - if (kserunnable()) { + if (sched_runnable()) { enable_intr(); } else { /* @@ -1505,15 +1506,14 @@ /* * Set machine context. * - * However, we don't set any but the user modifyable flags, and - * we we won't touch the cs selector. + * However, we don't set any but the user modifiable flags, and we won't + * touch the cs selector. */ int set_mcontext(struct thread *td, const mcontext_t *mcp) { struct trapframe *tp; - int ret; - int eflags; + int eflags, ret; tp = td->td_frame; if (mcp->mc_len != sizeof(*mcp)) ==== //depot/projects/hammer/sys/x86_64/x86_64/mem.c#4 (text+ko) ==== @@ -38,7 +38,7 @@ * * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/i386/i386/mem.c,v 1.98 2002/09/21 19:02:17 markm Exp $ + * $FreeBSD: src/sys/i386/i386/mem.c,v 1.99 2002/10/11 14:58:28 mike Exp $ */ /* @@ -199,7 +199,7 @@ if (error) break; - iov->iov_base += c; + iov->iov_base = (char *)iov->iov_base + c; iov->iov_len -= c; uio->uio_offset += c; uio->uio_resid -= c; ==== //depot/projects/hammer/sys/x86_64/x86_64/trap.c#12 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $FreeBSD: src/sys/i386/i386/trap.c,v 1.234 2002/09/28 17:14:46 phk Exp $ + * $FreeBSD: src/sys/i386/i386/trap.c,v 1.235 2002/10/09 02:33:35 julian Exp $ */ /* @@ -250,7 +250,7 @@ * XXX p_singlethread not locked, but should be safe. */ if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { - PROC_LOCK(p); /* check if thisis really needed */ + PROC_LOCK(p); mtx_lock_spin(&sched_lock); thread_exit(); /* NOTREACHED */ @@ -801,18 +801,39 @@ cred_update_thread(td); if (p->p_flag & P_KSES) { /* + * First check that we shouldn't just abort. + * But check if we are the single thread first! + * XXX p_singlethread not locked, but should be safe. + */ + if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { + PROC_LOCK(p); + mtx_lock_spin(&sched_lock); + thread_exit(); + /* NOTREACHED */ + } + + /* * If we are doing a syscall in a KSE environment, * note where our mailbox is. There is always the * possibility that we could do this lazily (in sleep()), * but for now do it every time. */ +#if 0 td->td_mailbox = (void *)fuword((caddr_t)td->td_kse->ke_mailbox + offsetof(struct kse_mailbox, km_curthread)); +#else /* if user pointer arithmetic is ok in the kernel */ + td->td_mailbox = + (void *)fuword( + (void *)&td->td_kse->ke_mailbox->km_curthread); +#endif if ((td->td_mailbox == NULL) || (td->td_mailbox == (void *)-1)) { td->td_mailbox = NULL; /* single thread it.. */ td->td_flags &= ~TDF_UNBOUND; } else { + if (td->td_standin == NULL) { + td->td_standin = thread_alloc(); + } td->td_flags |= TDF_UNBOUND; } } ==== //depot/projects/hammer/sys/x86_64/x86_64/vm_machdep.c#7 (text+ko) ==== @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.192 2002/09/16 19:25:08 mini Exp $ + * $FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.193 2002/10/09 02:33:35 julian Exp $ */ #include "opt_reset.h" @@ -289,7 +289,10 @@ /* * Initialize machine state (pcb and trap frame) for a new thread about to - * upcall. + * upcall. Pu t enough state in the new thread's PCB to get it to go back + * userret(), where we can intercept it again to set the return (upcall) + * Address and stack, along with those from upcals that are from other sources + * such as those generated in thread_userret() itself. */ void cpu_set_upcall(struct thread *td, void *pcb) @@ -348,8 +351,9 @@ } /* - * Set the machine state for performing an upcall that had to - * wait until we selected a KSE to perform the upcall on. + * Set that machine state for performing an upcall that has to + * be done in thread_userret() so that those upcalls generated + * in thread_userret() itself can be done as well. */ void cpu_set_upcall_kse(struct thread *td, struct kse *ke) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message