From owner-p4-projects@FreeBSD.ORG Mon Sep 6 17:15:05 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9B07316A4D0; Mon, 6 Sep 2004 17:15:05 +0000 (GMT) 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 5636A16A4CE for ; Mon, 6 Sep 2004 17:15:05 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1966E43D53 for ; Mon, 6 Sep 2004 17:15:05 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i86HF4D5086641 for ; Mon, 6 Sep 2004 17:15:04 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i86HF4Sv086638 for perforce@freebsd.org; Mon, 6 Sep 2004 17:15:04 GMT (envelope-from julian@freebsd.org) Date: Mon, 6 Sep 2004 17:15:04 GMT Message-Id: <200409061715.i86HF4Sv086638@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 61098 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2004 17:15:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=61098 Change 61098 by julian@julian_ref on 2004/09/06 17:14:16 IFC@61096 Affected files ... .. //depot/projects/nsched/sys/i386/linux/linux_machdep.c#4 integrate .. //depot/projects/nsched/sys/i386/linux/linux_proto.h#3 integrate .. //depot/projects/nsched/sys/i386/linux/linux_syscall.h#3 integrate .. //depot/projects/nsched/sys/i386/linux/linux_sysent.c#3 integrate .. //depot/projects/nsched/sys/i386/linux/syscalls.master#3 integrate .. //depot/projects/nsched/sys/kern/kern_switch.c#12 integrate .. //depot/projects/nsched/sys/kern/sched_4bsd.c#41 edit .. //depot/projects/nsched/sys/netinet/ip_output.c#10 integrate .. //depot/projects/nsched/sys/pci/if_pcn.c#6 integrate Differences ... ==== //depot/projects/nsched/sys/i386/linux/linux_machdep.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/linux/linux_machdep.c,v 1.43 2004/09/01 02:11:27 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/linux/linux_machdep.c,v 1.44 2004/09/06 09:32:59 dfr Exp $"); #include #include @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -828,3 +829,29 @@ sa.length = args->length; return ftruncate(td, &sa); } + +int +linux_set_thread_area(struct thread *td, struct linux_set_thread_area_args *args) +{ + /* + * Return an error code instead of raising a SIGSYS so that + * the caller will fall back to simpler LDT methods. + */ + return (ENOSYS); +} + +int +linux_gettid(struct thread *td, struct linux_gettid_args *args) +{ + + td->td_retval[0] = td->td_proc->p_pid; + return (0); +} + +int +linux_tkill(struct thread *td, struct linux_tkill_args *args) +{ + + return (linux_kill(td, (struct linux_kill_args *) args)); +} + ==== //depot/projects/nsched/sys/i386/linux/linux_proto.h#3 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/i386/linux/linux_proto.h,v 1.60 2004/08/24 20:24:34 jhb Exp $ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.57 2004/08/24 20:21:21 jhb Exp + * $FreeBSD: src/sys/i386/linux/linux_proto.h,v 1.61 2004/09/06 09:33:30 dfr Exp $ + * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.58 2004/09/06 09:32:59 dfr Exp */ #ifndef _LINUX_SYSPROTO_H_ @@ -641,6 +641,9 @@ char cmd_l_[PADL_(l_uint)]; l_uint cmd; char cmd_r_[PADR_(l_uint)]; char arg_l_[PADL_(l_ulong)]; l_ulong arg; char arg_r_[PADR_(l_ulong)]; }; +struct linux_gettid_args { + register_t dummy; +}; struct linux_setxattr_args { register_t dummy; }; @@ -677,6 +680,13 @@ struct linux_fremovexattr_args { register_t dummy; }; +struct linux_tkill_args { + char tid_l_[PADL_(int)]; int tid; char tid_r_[PADR_(int)]; + char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; +}; +struct linux_set_thread_area_args { + char entry_l_[PADL_(void *)]; void * entry; char entry_r_[PADR_(void *)]; +}; struct linux_fadvise64_args { register_t dummy; }; @@ -832,6 +842,7 @@ int linux_mincore(struct thread *, struct linux_mincore_args *); int linux_getdents64(struct thread *, struct linux_getdents64_args *); int linux_fcntl64(struct thread *, struct linux_fcntl64_args *); +int linux_gettid(struct thread *, struct linux_gettid_args *); int linux_setxattr(struct thread *, struct linux_setxattr_args *); int linux_lsetxattr(struct thread *, struct linux_lsetxattr_args *); int linux_fsetxattr(struct thread *, struct linux_fsetxattr_args *); @@ -844,6 +855,8 @@ int linux_removexattr(struct thread *, struct linux_removexattr_args *); int linux_lremovexattr(struct thread *, struct linux_lremovexattr_args *); int linux_fremovexattr(struct thread *, struct linux_fremovexattr_args *); +int linux_tkill(struct thread *, struct linux_tkill_args *); +int linux_set_thread_area(struct thread *, struct linux_set_thread_area_args *); int linux_fadvise64(struct thread *, struct linux_fadvise64_args *); #ifdef COMPAT_43 ==== //depot/projects/nsched/sys/i386/linux/linux_syscall.h#3 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/i386/linux/linux_syscall.h,v 1.54 2004/08/24 20:24:34 jhb Exp $ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.57 2004/08/24 20:21:21 jhb Exp + * $FreeBSD: src/sys/i386/linux/linux_syscall.h,v 1.55 2004/09/06 09:33:30 dfr Exp $ + * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.58 2004/09/06 09:32:59 dfr Exp */ #define LINUX_SYS_exit 1 @@ -213,6 +213,7 @@ #define LINUX_SYS_madvise 219 #define LINUX_SYS_linux_getdents64 220 #define LINUX_SYS_linux_fcntl64 221 +#define LINUX_SYS_linux_gettid 224 #define LINUX_SYS_linux_setxattr 226 #define LINUX_SYS_linux_lsetxattr 227 #define LINUX_SYS_linux_fsetxattr 228 @@ -225,6 +226,8 @@ #define LINUX_SYS_linux_removexattr 235 #define LINUX_SYS_linux_lremovexattr 236 #define LINUX_SYS_linux_fremovexattr 237 +#define LINUX_SYS_linux_tkill 238 +#define LINUX_SYS_linux_set_thread_area 243 #define LINUX_SYS_linux_fadvise64 250 #define LINUX_SYS_exit_group 252 #define LINUX_SYS_MAXSYSCALL 268 ==== //depot/projects/nsched/sys/i386/linux/linux_sysent.c#3 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/i386/linux/linux_sysent.c,v 1.61 2004/08/24 20:24:34 jhb Exp $ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.57 2004/08/24 20:21:21 jhb Exp + * $FreeBSD: src/sys/i386/linux/linux_sysent.c,v 1.62 2004/09/06 09:33:30 dfr Exp $ + * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.58 2004/09/06 09:32:59 dfr Exp */ #include "opt_compat.h" @@ -241,7 +241,7 @@ { SYF_MPSAFE | AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64 }, /* 221 = linux_fcntl64 */ { 0, (sy_call_t *)nosys }, /* 222 = */ { 0, (sy_call_t *)nosys }, /* 223 = */ - { 0, (sy_call_t *)nosys }, /* 224 = linux_gettid */ + { 0, (sy_call_t *)linux_gettid }, /* 224 = linux_gettid */ { 0, (sy_call_t *)nosys }, /* 225 = linux_readahead */ { 0, (sy_call_t *)linux_setxattr }, /* 226 = linux_setxattr */ { 0, (sy_call_t *)linux_lsetxattr }, /* 227 = linux_lsetxattr */ @@ -255,12 +255,12 @@ { 0, (sy_call_t *)linux_removexattr }, /* 235 = linux_removexattr */ { 0, (sy_call_t *)linux_lremovexattr }, /* 236 = linux_lremovexattr */ { 0, (sy_call_t *)linux_fremovexattr }, /* 237 = linux_fremovexattr */ - { 0, (sy_call_t *)nosys }, /* 238 = linux_tkill */ + { AS(linux_tkill_args), (sy_call_t *)linux_tkill }, /* 238 = linux_tkill */ { 0, (sy_call_t *)nosys }, /* 239 = linux_sendfile64 */ { 0, (sy_call_t *)nosys }, /* 240 = linux_futex */ { 0, (sy_call_t *)nosys }, /* 241 = linux_sched_setaffinity */ { 0, (sy_call_t *)nosys }, /* 242 = linux_sched_getaffinity */ - { 0, (sy_call_t *)nosys }, /* 243 = linux_set_thread_area */ + { AS(linux_set_thread_area_args), (sy_call_t *)linux_set_thread_area }, /* 243 = linux_set_thread_area */ { 0, (sy_call_t *)nosys }, /* 244 = linux_get_thread_area */ { 0, (sy_call_t *)nosys }, /* 245 = linux_io_setup */ { 0, (sy_call_t *)nosys }, /* 246 = linux_io_destroy */ ==== //depot/projects/nsched/sys/i386/linux/syscalls.master#3 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/i386/linux/syscalls.master,v 1.57 2004/08/24 20:21:21 jhb Exp $ + $FreeBSD: src/sys/i386/linux/syscalls.master,v 1.58 2004/09/06 09:32:59 dfr Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from LINUX). @@ -297,7 +297,7 @@ 221 MSTD { int linux_fcntl64(l_uint fd, l_uint cmd, l_ulong arg); } 222 UNIMPL 223 UNIMPL -224 UNIMPL linux_gettid +224 STD { long linux_gettid(void); } 225 UNIMPL linux_readahead 226 STD { int linux_setxattr(void); } 227 STD { int linux_lsetxattr(void); } @@ -311,12 +311,12 @@ 235 STD { int linux_removexattr(void); } 236 STD { int linux_lremovexattr(void); } 237 STD { int linux_fremovexattr(void); } -238 UNIMPL linux_tkill +238 STD { int linux_tkill(int tid, int sig); } 239 UNIMPL linux_sendfile64 240 UNIMPL linux_futex 241 UNIMPL linux_sched_setaffinity 242 UNIMPL linux_sched_getaffinity -243 UNIMPL linux_set_thread_area +243 STD { int linux_set_thread_area(void *entry); } 244 UNIMPL linux_get_thread_area 245 UNIMPL linux_io_setup 246 UNIMPL linux_io_destroy ==== //depot/projects/nsched/sys/kern/kern_switch.c#12 (text+ko) ==== @@ -86,7 +86,7 @@ ***/ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.86 2004/09/05 02:09:53 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_switch.c,v 1.87 2004/09/06 07:23:14 julian Exp $"); #include "opt_sched.h" @@ -502,8 +502,8 @@ * to the new thread. */ ctd = curthread; - if (ctd->td_kse == NULL || ctd->td_kse->ke_thread != ctd) - return (0); + KASSERT ((ctd->td_kse != NULL && ctd->td_kse->ke_thread == ctd), + ("thread has no (or wrong) sched-private part.")); pri = td->td_priority; cpri = ctd->td_priority; if (pri >= cpri || cold /* || dumping */ || TD_IS_INHIBITED(ctd) || ==== //depot/projects/nsched/sys/kern/sched_4bsd.c#41 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.58 2004/09/05 02:19:53 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/sched_4bsd.c,v 1.60 2004/09/06 07:23:14 julian Exp $"); #define kse td_sched @@ -801,8 +801,8 @@ TD_SET_RUNNING(newtd); if ((newtd->td_proc->p_flag & P_NOLOAD) == 0) sched_tdcnt++; + } - } td->td_lastcpu = td->td_oncpu; td->td_flags &= ~TDF_NEEDRESCHED; td->td_pflags &= ~TDP_OWEPREEMPT; @@ -995,9 +995,10 @@ * the thread is unpinned * or pinned to another cpu, * and there are other available and idle CPUs. - * if we are idle, then skip straight to preemption. + * if we are idle, or it's an interrupt, + * then skip straight to preemption. */ - if ( (! idle) && + if ( (! idle) && ((flags & SRQ_INTR) == 0) && (idle_cpus_mask & ~(hlt_cpus_mask | me)) && ( KSE_CAN_MIGRATE(ke) || ke->ke_runq != &runq_pcpu[PCPU_GET(cpuid)])) { ==== //depot/projects/nsched/sys/netinet/ip_output.c#10 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)ip_output.c 8.3 (Berkeley) 1/21/94 - * $FreeBSD: src/sys/netinet/ip_output.c,v 1.229 2004/08/27 15:39:34 andre Exp $ + * $FreeBSD: src/sys/netinet/ip_output.c,v 1.230 2004/09/06 15:48:38 jmg Exp $ */ #include "opt_ipfw.h" @@ -352,9 +352,7 @@ #ifndef notdef /* * If the source address is not specified yet, use the address - * of the outoing interface. In case, keep note we did that, so - * if the the firewall changes the next-hop causing the output - * interface to change, we can fix that. + * of the outoing interface. */ if (ip->ip_src.s_addr == INADDR_ANY) { /* Interface may have no addresses. */ ==== //depot/projects/nsched/sys/pci/if_pcn.c#6 (text+ko) ==== @@ -32,10 +32,10 @@ */ #include -__FBSDID("$FreeBSD: src/sys/pci/if_pcn.c,v 1.60 2004/08/28 15:10:35 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/pci/if_pcn.c,v 1.61 2004/09/06 13:42:38 brueffer Exp $"); /* - * AMD Am79c972 fast ethernet PCI NIC driver. Datatheets are available + * AMD Am79c972 fast ethernet PCI NIC driver. Datasheets are available * from http://www.amd.com. * * The AMD PCnet/PCI controllers are more advanced and functional @@ -436,8 +436,8 @@ * Note III: the test for 0x10001000 is a hack to * pacify VMware, who's pseudo-PCnet interface is * broken. Reading the subsystem register from PCI - * config space yeilds 0x00000000 while reading the - * same value from I/O space yeilds 0x10001000. It's + * config space yields 0x00000000 while reading the + * same value from I/O space yields 0x10001000. It's * not supposed to be that way. */ if (chip_id == pci_read_config(dev, @@ -902,7 +902,7 @@ sc = arg; ifp = &sc->arpcom.ac_if; - /* Supress unwanted interrupts */ + /* Suppress unwanted interrupts */ if (!(ifp->if_flags & IFF_UP)) { pcn_stop(sc); return;