From owner-p4-projects@FreeBSD.ORG Thu Nov 10 01:38:18 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E609816A421; Thu, 10 Nov 2005 01:38:17 +0000 (GMT) X-Original-To: perforce@freebsd.org 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 B7ABF16A41F for ; Thu, 10 Nov 2005 01:38:17 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F9D743D45 for ; Thu, 10 Nov 2005 01:38:17 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jAA1cHGF029129 for ; Thu, 10 Nov 2005 01:38:17 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jAA1cBaw029117 for perforce@freebsd.org; Thu, 10 Nov 2005 01:38:11 GMT (envelope-from peter@freebsd.org) Date: Thu, 10 Nov 2005 01:38:11 GMT Message-Id: <200511100138.jAA1cBaw029117@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Cc: Subject: PERFORCE change 86564 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2005 01:38:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=86564 Change 86564 by peter@peter_daintree on 2005/11/10 01:37:55 IFC @86561 Affected files ... .. //depot/projects/hammer/bin/ls/ls.1#22 integrate .. //depot/projects/hammer/bin/ls/ls.c#15 integrate .. //depot/projects/hammer/release/doc/share/misc/dev.archlist.txt#33 integrate .. //depot/projects/hammer/share/examples/cvsup/ports-supfile#9 integrate .. //depot/projects/hammer/share/man/man4/twa.4#4 integrate .. //depot/projects/hammer/sys/alpha/alpha/pmap.c#46 integrate .. //depot/projects/hammer/sys/amd64/amd64/pmap.c#128 integrate .. //depot/projects/hammer/sys/conf/files#130 integrate .. //depot/projects/hammer/sys/conf/files.i386#65 integrate .. //depot/projects/hammer/sys/conf/options.i386#41 integrate .. //depot/projects/hammer/sys/dev/em/if_em.c#51 integrate .. //depot/projects/hammer/sys/dev/em/if_em.h#25 integrate .. //depot/projects/hammer/sys/dev/em/if_em_hw.h#15 integrate .. //depot/projects/hammer/sys/dev/em/if_em_osdep.h#10 integrate .. //depot/projects/hammer/sys/dev/joy/joy.c#7 integrate .. //depot/projects/hammer/sys/dev/pci/pci.c#50 integrate .. //depot/projects/hammer/sys/dev/twa/tw_cl.h#2 integrate .. //depot/projects/hammer/sys/dev/twa/tw_cl_externs.h#2 integrate .. //depot/projects/hammer/sys/dev/twa/tw_cl_fwif.h#2 integrate .. //depot/projects/hammer/sys/dev/twa/tw_cl_fwimg.c#2 integrate .. //depot/projects/hammer/sys/dev/twa/tw_cl_init.c#2 integrate .. //depot/projects/hammer/sys/dev/twa/tw_cl_intr.c#2 integrate .. //depot/projects/hammer/sys/dev/twa/tw_cl_io.c#2 integrate .. //depot/projects/hammer/sys/dev/twa/tw_cl_ioctl.h#2 integrate .. //depot/projects/hammer/sys/dev/twa/tw_cl_misc.c#2 integrate .. //depot/projects/hammer/sys/dev/twa/tw_cl_share.h#2 integrate .. //depot/projects/hammer/sys/dev/twa/tw_osl.h#2 integrate .. //depot/projects/hammer/sys/dev/twa/tw_osl_cam.c#5 integrate .. //depot/projects/hammer/sys/dev/twa/tw_osl_freebsd.c#4 integrate .. //depot/projects/hammer/sys/dev/twa/tw_osl_includes.h#3 integrate .. //depot/projects/hammer/sys/dev/twa/tw_osl_inline.h#1 branch .. //depot/projects/hammer/sys/dev/twa/tw_osl_share.h#4 integrate .. //depot/projects/hammer/sys/fs/devfs/devfs_vnops.c#41 integrate .. //depot/projects/hammer/sys/i386/conf/NOTES#79 integrate .. //depot/projects/hammer/sys/i386/conf/PAE#17 integrate .. //depot/projects/hammer/sys/i386/conf/XBOX#1 branch .. //depot/projects/hammer/sys/i386/i386/machdep.c#65 integrate .. //depot/projects/hammer/sys/i386/i386/pmap.c#75 integrate .. //depot/projects/hammer/sys/i386/i386/vm_machdep.c#50 integrate .. //depot/projects/hammer/sys/i386/include/xbox.h#1 branch .. //depot/projects/hammer/sys/i386/isa/clock.c#29 integrate .. //depot/projects/hammer/sys/i386/pci/pci_cfgreg.c#24 integrate .. //depot/projects/hammer/sys/i386/xbox/pic16l.s#1 branch .. //depot/projects/hammer/sys/i386/xbox/xbox.c#1 branch .. //depot/projects/hammer/sys/i386/xbox/xboxfb.c#1 branch .. //depot/projects/hammer/sys/ia64/ia64/pmap.c#49 integrate .. //depot/projects/hammer/sys/kern/kern_descrip.c#52 integrate .. //depot/projects/hammer/sys/kern/kern_sig.c#64 integrate .. //depot/projects/hammer/sys/kern/subr_power.c#4 integrate .. //depot/projects/hammer/sys/kern/subr_sleepqueue.c#18 integrate .. //depot/projects/hammer/sys/kern/sys_process.c#34 integrate .. //depot/projects/hammer/sys/kern/uipc_proto.c#4 integrate .. //depot/projects/hammer/sys/kern/vfs_aio.c#37 integrate .. //depot/projects/hammer/sys/kern/vfs_mount.c#59 integrate .. //depot/projects/hammer/sys/kern/vfs_subr.c#96 integrate .. //depot/projects/hammer/sys/modules/Makefile#90 integrate .. //depot/projects/hammer/sys/modules/twa/Makefile#5 integrate .. //depot/projects/hammer/sys/net/if_gre.c#29 integrate .. //depot/projects/hammer/sys/net/if_stf.c#24 integrate .. //depot/projects/hammer/sys/net/rtsock.c#28 integrate .. //depot/projects/hammer/sys/netatalk/at_proto.c#4 integrate .. //depot/projects/hammer/sys/netatm/atm_proto.c#6 integrate .. //depot/projects/hammer/sys/netgraph/bluetooth/socket/ng_btsocket.c#12 integrate .. //depot/projects/hammer/sys/netgraph/ng_ether.c#25 integrate .. //depot/projects/hammer/sys/netgraph/ng_fec.c#18 integrate .. //depot/projects/hammer/sys/netgraph/ng_socket.c#21 integrate .. //depot/projects/hammer/sys/netinet/in_gif.c#13 integrate .. //depot/projects/hammer/sys/netinet/in_proto.c#18 integrate .. //depot/projects/hammer/sys/netinet/ip_divert.c#31 integrate .. //depot/projects/hammer/sys/netinet/ip_mroute.c#29 integrate .. //depot/projects/hammer/sys/netinet6/in6_proto.c#13 integrate .. //depot/projects/hammer/sys/netipsec/keysock.c#9 integrate .. //depot/projects/hammer/sys/netipx/ipx_proto.c#6 integrate .. //depot/projects/hammer/sys/netkey/keysock.c#13 integrate .. //depot/projects/hammer/sys/netnatm/natm_proto.c#11 integrate .. //depot/projects/hammer/sys/pc98/conf/NOTES#53 integrate .. //depot/projects/hammer/sys/powerpc/powerpc/pmap.c#40 delete .. //depot/projects/hammer/sys/powerpc/powerpc/pmap_dispatch.c#2 integrate .. //depot/projects/hammer/sys/sparc64/conf/GENERIC#42 integrate .. //depot/projects/hammer/sys/sparc64/sparc64/pmap.c#37 integrate .. //depot/projects/hammer/sys/vm/pmap.h#22 integrate .. //depot/projects/hammer/sys/vm/vm_pageout.c#35 integrate .. //depot/projects/hammer/tools/regression/sockets/unix_passfd/Makefile#1 branch .. //depot/projects/hammer/tools/regression/sockets/unix_passfd/unix_passfd.c#1 branch .. //depot/projects/hammer/usr.bin/netstat/if.c#12 integrate Differences ... ==== //depot/projects/hammer/bin/ls/ls.1#22 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 -.\" $FreeBSD: src/bin/ls/ls.1,v 1.91 2005/09/06 20:14:39 rse Exp $ +.\" $FreeBSD: src/bin/ls/ls.1,v 1.92 2005/11/10 00:02:32 mux Exp $ .\" .Dd September 6, 2005 .Dt LS 1 @@ -40,7 +40,7 @@ .Nd list directory contents .Sh SYNOPSIS .Nm -.Op Fl ABCFGHLPRSTWZabcdfghiklmnopqrstuwx1 +.Op Fl ABCFGHILPRSTWZabcdfghiklmnopqrstuwx1 .Op Ar .Sh DESCRIPTION For each operand that names a @@ -73,6 +73,8 @@ and .Pa .. . Always set for the super-user. +.Fl I +cancel this option. .It Fl B Force printing of non-printable characters (as defined by .Xr ctype 3 @@ -117,6 +119,12 @@ or .Fl l options are specified. +.It Fl I +This option cancels the +.Fl A +option. Usually used by super-user when +.Fl A +is not necessary. .It Fl L If argument is a symbolic link, list the file or directory the link references rather than the link itself. ==== //depot/projects/hammer/bin/ls/ls.c#15 (text+ko) ==== @@ -42,7 +42,7 @@ #endif /* not lint */ #endif #include -__FBSDID("$FreeBSD: src/bin/ls/ls.c,v 1.80 2005/06/03 11:05:58 dd Exp $"); +__FBSDID("$FreeBSD: src/bin/ls/ls.c,v 1.81 2005/11/10 00:02:32 mux Exp $"); #include #include @@ -110,6 +110,8 @@ static int f_kblocks; /* print size in kilobytes */ static int f_listdir; /* list actual directory, not contents */ static int f_listdot; /* list files beginning with . */ +static int f_nolistdot; /* don't list files beginning with . */ +static int f_forcelistdot; /* force list files beginning with . */ int f_longform; /* long listing format */ int f_nonprint; /* show unprintables as ? */ static int f_nosort; /* don't sort output */ @@ -175,13 +177,9 @@ termwidth = atoi(p); } - /* Root is -A automatically. */ - if (!getuid()) - f_listdot = 1; - fts_options = FTS_PHYSICAL; while ((ch = getopt(argc, argv, - "1ABCFGHLPRSTWZabcdfghiklmnopqrstuwx")) != -1) { + "1ABCFGHILPRSTWZabcdfghiklmnopqrstuwx")) != -1) { switch (ch) { /* * The -1, -C, -x and -l options all override each other so @@ -243,10 +241,14 @@ break; case 'a': fts_options |= FTS_SEEDOT; - /* FALLTHROUGH */ + f_forcelistdot = 1; + break; case 'A': f_listdot = 1; break; + case 'I': + f_nolistdot = 1; + break; /* The -d option turns off the -R option. */ case 'd': f_listdir = 1; @@ -326,6 +328,10 @@ argc -= optind; argv += optind; + /* Root is -A automatically. */ + if (!getuid() && !f_nolistdot) + f_listdot = 1; + /* Enabling of colours is conditional on the environment. */ if (getenv("CLICOLOR") && (isatty(STDOUT_FILENO) || getenv("CLICOLOR_FORCE"))) @@ -490,7 +496,8 @@ break; case FTS_D: if (p->fts_level != FTS_ROOTLEVEL && - p->fts_name[0] == '.' && !f_listdot) + p->fts_name[0] == '.' && ((!f_listdot || + f_nolistdot) && !f_forcelistdot)) break; /* @@ -650,7 +657,8 @@ } } else { /* Only display dot file if -a/-A set. */ - if (cur->fts_name[0] == '.' && !f_listdot) { + if (cur->fts_name[0] == '.' && ((!f_listdot || + f_nolistdot) && !f_forcelistdot)) { cur->fts_number = NO_PRINT; continue; } ==== //depot/projects/hammer/release/doc/share/misc/dev.archlist.txt#33 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.70 2005/10/25 04:32:42 brueffer Exp $ +# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.71 2005/11/09 22:05:41 brueffer Exp $ # # @@ -64,7 +64,6 @@ de i386,pc98,alpha,ia64,amd64 dpt i386,ia64,amd64 ed i386,pc98 -em i386,pc98,alpha,ia64,amd64 ep i386,pc98,amd64 esp sparc64 ex i386,amd64 ==== //depot/projects/hammer/share/examples/cvsup/ports-supfile#9 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/share/examples/cvsup/ports-supfile,v 1.33 2004/12/19 02:31:45 brueffer Exp $ +# $FreeBSD: src/share/examples/cvsup/ports-supfile,v 1.34 2005/11/09 10:14:07 pav Exp $ # # This file contains all of the "CVSup collections" that make up the # FreeBSD-current ports collection. @@ -110,6 +110,7 @@ #ports-misc #ports-multimedia #ports-net +#ports-net-im #ports-net-mgmt #ports-news #ports-palm ==== //depot/projects/hammer/share/man/man4/twa.4#4 (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/share/man/man4/twa.4,v 1.4 2005/02/27 13:14:28 brueffer Exp $ +.\" $FreeBSD: src/share/man/man4/twa.4,v 1.5 2005/11/09 00:23:54 vkashyap Exp $ .\" .Dd August 15, 2004 .Dt TWA 4 @@ -68,6 +68,16 @@ AMCC's 3ware 9500S-12 .It AMCC's 3ware 9500S-12MI +.It +AMCC's 3ware 9500SX-4LP +.It +AMCC's 3ware 9500SX-8LP +.It +AMCC's 3ware 9500SX-12 +.It +AMCC's 3ware 9500SX-12MI +.It +AMCC's 3ware 9500SX-16ML .El .Sh DIAGNOSTICS Whenever the driver encounters a command failure, it prints out an error code in ==== //depot/projects/hammer/sys/alpha/alpha/pmap.c#46 (text+ko) ==== @@ -148,7 +148,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.183 2005/11/04 18:03:23 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.184 2005/11/09 08:19:19 alc Exp $"); #include #include @@ -317,11 +317,9 @@ */ static uma_zone_t pvzone; static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; -int pmap_pagedaemon_waken; static PMAP_INLINE void free_pv_entry(pv_entry_t pv); -static pv_entry_t get_pv_entry(void); -static pv_entry_t pv_entry_reclaim(pmap_t locked_pmap); +static pv_entry_t get_pv_entry(pmap_t locked_pmap); static void alpha_protection_init(void); static void pmap_changebit(vm_page_t m, int bit, boolean_t setem); @@ -1300,39 +1298,44 @@ /* * get a new pv_entry, allocating a block from the system * when needed. - * the memory allocation is performed bypassing the malloc code - * because of the possibility of allocations at interrupt time. */ static pv_entry_t -get_pv_entry(void) +get_pv_entry(pmap_t locked_pmap) { - pv_entry_count++; - if ((pv_entry_count > pv_entry_high_water) && - (pmap_pagedaemon_waken == 0)) { - pmap_pagedaemon_waken = 1; - wakeup (&vm_pages_needed); - } - return uma_zalloc(pvzone, M_NOWAIT); -} - -/* - * Reclaim a pv entry by removing a mapping to an inactive page. - */ -static pv_entry_t -pv_entry_reclaim(pmap_t locked_pmap) -{ + static const struct timeval printinterval = { 60, 0 }; + static struct timeval lastprint; + struct vpgqueues *vpq; pmap_t pmap; pt_entry_t *pte, tpte; - pv_entry_t pv; + pv_entry_t allocated_pv, next_pv, pv; vm_offset_t va; vm_page_t m; PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); - TAILQ_FOREACH(m, &vm_page_queues[PQ_INACTIVE].pl, pageq) { + allocated_pv = uma_zalloc(pvzone, M_NOWAIT); + if (allocated_pv != NULL) { + pv_entry_count++; + if (pv_entry_count > pv_entry_high_water) + pagedaemon_wakeup(); + else + return (allocated_pv); + } + + /* + * Reclaim pv entries: At first, destroy mappings to inactive + * pages. After that, if a pv entry is still needed, destroy + * mappings to active pages. + */ + if (ratecheck(&lastprint, &printinterval)) + printf("Approaching the limit on PV entries, " + "increase the vm.pmap.shpgperproc tunable.\n"); + vpq = &vm_page_queues[PQ_INACTIVE]; +retry: + TAILQ_FOREACH(m, &vpq->pl, pageq) { if (m->hold_count || m->busy || (m->flags & PG_BUSY)) continue; - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { va = pv->pv_va; pmap = pv->pv_pmap; if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) @@ -1342,7 +1345,7 @@ tpte = *pte; *pte = 0; KASSERT((tpte & PG_W) == 0, - ("pv_entry_reclaim: wired pte %#lx", tpte)); + ("get_pv_entry: wired pte %#lx", tpte)); if ((tpte & PG_FOR) == 0) vm_page_flag_set(m, PG_REFERENCED); if ((tpte & PG_FOW) == 0) { @@ -1358,10 +1361,20 @@ pmap_unuse_pt(pmap, va, pv->pv_ptem); if (pmap != locked_pmap) PMAP_UNLOCK(pmap); - return (pv); + if (allocated_pv == NULL) + allocated_pv = pv; + else + free_pv_entry(pv); + } + } + if (allocated_pv == NULL) { + if (vpq == &vm_page_queues[PQ_INACTIVE]) { + vpq = &vm_page_queues[PQ_ACTIVE]; + goto retry; } + panic("get_pv_entry: increase the vm.pmap.shpgperproc tunable"); } - panic("pv_entry_reclaim: increase vm.pmap.shpgperproc"); + return (allocated_pv); } static int @@ -1408,9 +1421,7 @@ { pv_entry_t pv; - pv = get_pv_entry(); - if (pv == NULL) - pv = pv_entry_reclaim(pmap); + pv = get_pv_entry(pmap); pv->pv_va = va; pv->pv_pmap = pmap; pv->pv_ptem = mpte; ==== //depot/projects/hammer/sys/amd64/amd64/pmap.c#128 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.532 2005/11/04 18:03:23 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.533 2005/11/09 08:19:19 alc Exp $"); /* * Manages physical address maps. @@ -185,7 +185,6 @@ static uma_zone_t pvzone; static struct vm_object pvzone_obj; static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; -int pmap_pagedaemon_waken; /* * All those kernel PT submaps that BSD is so fond of @@ -200,8 +199,7 @@ static caddr_t crashdumpmap; static PMAP_INLINE void free_pv_entry(pv_entry_t pv); -static pv_entry_t get_pv_entry(void); -static pv_entry_t pv_entry_reclaim(pmap_t locked_pmap); +static pv_entry_t get_pv_entry(pmap_t locked_pmap); static void pmap_clear_ptes(vm_page_t m, long bit); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, @@ -1428,40 +1426,45 @@ /* * get a new pv_entry, allocating a block from the system * when needed. - * the memory allocation is performed bypassing the malloc code - * because of the possibility of allocations at interrupt time. */ static pv_entry_t -get_pv_entry(void) +get_pv_entry(pmap_t locked_pmap) { - pv_entry_count++; - if ((pv_entry_count > pv_entry_high_water) && - (pmap_pagedaemon_waken == 0)) { - pmap_pagedaemon_waken = 1; - wakeup (&vm_pages_needed); - } - return uma_zalloc(pvzone, M_NOWAIT); -} - -/* - * Reclaim a pv entry by removing a mapping to an inactive page. - */ -static pv_entry_t -pv_entry_reclaim(pmap_t locked_pmap) -{ + static const struct timeval printinterval = { 60, 0 }; + static struct timeval lastprint; + struct vpgqueues *vpq; pd_entry_t ptepde; pmap_t pmap; pt_entry_t *pte, tpte; - pv_entry_t pv; + pv_entry_t allocated_pv, next_pv, pv; vm_offset_t va; vm_page_t m; PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); - TAILQ_FOREACH(m, &vm_page_queues[PQ_INACTIVE].pl, pageq) { + allocated_pv = uma_zalloc(pvzone, M_NOWAIT); + if (allocated_pv != NULL) { + pv_entry_count++; + if (pv_entry_count > pv_entry_high_water) + pagedaemon_wakeup(); + else + return (allocated_pv); + } + + /* + * Reclaim pv entries: At first, destroy mappings to inactive + * pages. After that, if a pv entry is still needed, destroy + * mappings to active pages. + */ + if (ratecheck(&lastprint, &printinterval)) + printf("Approaching the limit on PV entries, " + "increase the vm.pmap.shpgperproc tunable.\n"); + vpq = &vm_page_queues[PQ_INACTIVE]; +retry: + TAILQ_FOREACH(m, &vpq->pl, pageq) { if (m->hold_count || m->busy || (m->flags & PG_BUSY)) continue; - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { va = pv->pv_va; pmap = pv->pv_pmap; if (pmap != locked_pmap && !PMAP_TRYLOCK(pmap)) @@ -1470,12 +1473,12 @@ pte = pmap_pte_pde(pmap, va, &ptepde); tpte = pte_load_clear(pte); KASSERT((tpte & PG_W) == 0, - ("pv_entry_reclaim: wired pte %#lx", tpte)); + ("get_pv_entry: wired pte %#lx", tpte)); if (tpte & PG_A) vm_page_flag_set(m, PG_REFERENCED); if (tpte & PG_M) { KASSERT((tpte & PG_RW), - ("pv_entry_reclaim: modified page not writable: va: %#lx, pte: %#lx", + ("get_pv_entry: modified page not writable: va: %#lx, pte: %#lx", va, tpte)); if (pmap_track_modified(va)) vm_page_dirty(m); @@ -1489,10 +1492,20 @@ pmap_unuse_pt(pmap, va, ptepde); if (pmap != locked_pmap) PMAP_UNLOCK(pmap); - return (pv); + if (allocated_pv == NULL) + allocated_pv = pv; + else + free_pv_entry(pv); } } - panic("pv_entry_reclaim: increase vm.pmap.shpgperproc"); + if (allocated_pv == NULL) { + if (vpq == &vm_page_queues[PQ_INACTIVE]) { + vpq = &vm_page_queues[PQ_ACTIVE]; + goto retry; + } + panic("get_pv_entry: increase the vm.pmap.shpgperproc tunable"); + } + return (allocated_pv); } static void @@ -1531,11 +1544,7 @@ { pv_entry_t pv; - pv = get_pv_entry(); - if (pv == NULL) { - pv_entry_count--; - pv = pv_entry_reclaim(pmap); - } + pv = get_pv_entry(pmap); pv->pv_va = va; pv->pv_pmap = pmap; ==== //depot/projects/hammer/sys/conf/files#130 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1063 2005/11/01 22:44:07 jkim Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1064 2005/11/08 22:51:42 vkashyap Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -937,8 +937,10 @@ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_cl_misc.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" -dev/twa/tw_osl_cam.c optional twa -dev/twa/tw_osl_freebsd.c optional twa +dev/twa/tw_osl_cam.c optional twa \ + compile-with "${NORMAL_C} -I$S/dev/twa" +dev/twa/tw_osl_freebsd.c optional twa \ + compile-with "${NORMAL_C} -I$S/dev/twa" dev/twe/twe.c optional twe dev/twe/twe_freebsd.c optional twe dev/tx/if_tx.c optional tx ==== //depot/projects/hammer/sys/conf/files.i386#65 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.542 2005/10/28 15:58:18 joerg Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.543 2005/11/09 03:55:39 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -462,3 +462,7 @@ pci/agp_nvidia.c optional agp pci/agp_sis.c optional agp pci/agp_via.c optional agp +i386/xbox/xbox.c optional xbox +i386/xbox/xboxfb.c optional xboxfb +dev/fb/boot_font.c optional xboxfb +i386/xbox/pic16l.s optional xbox ==== //depot/projects/hammer/sys/conf/options.i386#41 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options.i386,v 1.226 2005/10/24 21:04:18 jhb Exp $ +# $FreeBSD: src/sys/conf/options.i386,v 1.227 2005/11/09 03:55:39 imp Exp $ # Options specific to the i386 platform kernels AUTO_EOI_1 opt_auto_eoi.h @@ -163,3 +163,6 @@ # Debugging STOP_NMI opt_cpu.h NPX_DEBUG opt_npx.h + +# XBOX support in the kernel +XBOX opt_xbox.h ==== //depot/projects/hammer/sys/dev/em/if_em.c#51 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.82 2005/10/31 19:59:40 rwatson Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.84 2005/11/09 15:23:54 glebius Exp $*/ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" @@ -187,7 +187,7 @@ static int em_is_valid_ether_addr(u_int8_t *); static int em_sysctl_stats(SYSCTL_HANDLER_ARGS); static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS); -static u_int32_t em_fill_descriptors (u_int64_t address, +static u_int32_t em_fill_descriptors (bus_addr_t address, u_int32_t length, PDESC_ARRAY desc_array); static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS); @@ -663,6 +663,17 @@ break; case SIOCSIFMTU: IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); +#ifndef __NO_STRICT_ALIGNMENT + if (ifr->ifr_mtu > ETHERMTU) { + /* + * XXX + * Due to the limitation of DMA engine, it needs fix-up + * code for strict alignment architectures. Disable + * jumbo frame until we have better solutions. + */ + error = EINVAL; + } else +#endif if (ifr->ifr_mtu > MAX_JUMBO_FRAME_SIZE - ETHER_HDR_LEN || \ /* 82573 does not support jumbo frames */ (adapter->hw.mac_type == em_82573 && ifr->ifr_mtu > ETHERMTU) ) { @@ -785,7 +796,7 @@ printf("em%d: watchdog timeout -- resetting\n", adapter->unit); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - ifp->if_oerrors++; + adapter->watchdog_events++; em_init_locked(adapter); EM_UNLOCK(adapter); @@ -1008,7 +1019,7 @@ } if (reg_icr & E1000_ICR_RXO) { - log(LOG_WARNING, "%s: RX overrun\n", ifp->if_xname); + adapter->rx_overruns++; wantinit = 1; } } @@ -1158,7 +1169,6 @@ u_int32_t txd_upper; u_int32_t txd_lower, txd_used = 0, txd_saved = 0; int i, j, error; - u_int64_t address; struct mbuf *m_head; @@ -1268,15 +1278,12 @@ for (j = 0; j < nsegs; j++) { /* If adapter is 82544 and on PCIX bus */ if(adapter->pcix_82544) { - array_elements = 0; - address = htole64(segs[j].ds_addr); /* * Check the Address and Length combination and * split the data accordingly */ - array_elements = em_fill_descriptors(address, - htole32(segs[j].ds_len), - &desc_array); + array_elements = em_fill_descriptors(segs[j].ds_addr, + segs[j].ds_len, &desc_array); for (counter = 0; counter < array_elements; counter++) { if (txd_used == adapter->num_tx_desc_avail) { adapter->next_avail_tx_desc = txd_saved; @@ -1740,10 +1747,10 @@ static int em_allocate_pci_resources(struct adapter * adapter) { - int i, val, rid; + int val, rid; device_t dev = adapter->dev; - rid = EM_MMBA; + rid = PCIR_BAR(0); adapter->res_memory = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (!(adapter->res_memory)) { @@ -1760,16 +1767,21 @@ if (adapter->hw.mac_type > em_82543) { /* Figure our where our IO BAR is ? */ - rid = EM_MMBA; - for (i = 0; i < 5; i++) { + for (rid = PCIR_BAR(0); rid < PCIR_CIS;) { val = pci_read_config(dev, rid, 4); - if (val & 0x00000001) { + if (E1000_BAR_TYPE(val) == E1000_BAR_TYPE_IO) { adapter->io_rid = rid; break; } rid += 4; + /* check for 64bit BAR */ + if (E1000_BAR_MEM_TYPE(val) == E1000_BAR_MEM_TYPE_64BIT) + rid += 4; } - + if (rid >= PCIR_CIS) { + printf("em%d: Unable to locate IO BAR\n", adapter->unit); + return (ENXIO); + } adapter->res_ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &adapter->io_rid, @@ -1779,9 +1791,11 @@ adapter->unit); return(ENXIO); } - - adapter->hw.io_base = - rman_get_start(adapter->res_ioport); + adapter->hw.io_base = 0; + adapter->osdep.io_bus_space_tag = + rman_get_bustag(adapter->res_ioport); + adapter->osdep.io_bus_space_handle = + rman_get_bushandle(adapter->res_ioport); } rid = 0x0; @@ -1819,7 +1833,7 @@ adapter->res_interrupt); } if (adapter->res_memory != NULL) { - bus_release_resource(dev, SYS_RES_MEMORY, EM_MMBA, + bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(0), adapter->res_memory); } @@ -2068,12 +2082,13 @@ goto fail_2; } + dma->dma_paddr = 0; r = bus_dmamap_load(dma->dma_tag, dma->dma_map, dma->dma_vaddr, size, em_dmamap_cb, &dma->dma_paddr, mapflags | BUS_DMA_NOWAIT); - if (r != 0) { + if (r != 0 || dma->dma_paddr == 0) { printf("em%d: em_dma_malloc: bus_dmamap_load failed; " "error %u\n", adapter->unit, r); goto fail_3; @@ -2475,10 +2490,11 @@ * Using memory from the mbuf cluster pool, invoke the * bus_dma machinery to arrange the memory mapping. */ + paddr = 0; error = bus_dmamap_load(adapter->rxtag, rx_buffer->map, mtod(mp, void *), mp->m_len, em_dmamap_cb, &paddr, 0); - if (error) { + if (error || paddr == 0) { m_free(mp); return(error); } @@ -2750,7 +2766,7 @@ (count != 0) && (ifp->if_drv_flags & IFF_DRV_RUNNING)) { struct mbuf *m = NULL; - + mp = adapter->rx_buffer_area[i].m_head; bus_dmamap_sync(adapter->rxtag, adapter->rx_buffer_area[i].map, BUS_DMASYNC_POSTREAD); @@ -2837,10 +2853,10 @@ em_receive_checksum(adapter, current_desc, adapter->fmp); if (current_desc->status & E1000_RXD_STAT_VP) - VLAN_INPUT_TAG(ifp, adapter->fmp, - (current_desc->special & - E1000_RXD_SPC_VLAN_MASK), - adapter->fmp = NULL); + VLAN_INPUT_TAG(ifp, adapter->fmp, + (le16toh(current_desc->special) & + E1000_RXD_SPC_VLAN_MASK), + adapter->fmp = NULL); m = adapter->fmp; adapter->fmp = NULL; @@ -3025,19 +3041,6 @@ return; } -uint32_t -em_io_read(struct em_hw *hw, unsigned long port) -{ - return(inl(port)); -} - -void -em_io_write(struct em_hw *hw, unsigned long port, uint32_t value) -{ - outl(port, value); - return; -} - /********************************************************************* * 82544 Coexistence issue workaround. * There are 2 issues. @@ -3057,7 +3060,7 @@ * *** *********************************************************************/ static u_int32_t -em_fill_descriptors (u_int64_t address, +em_fill_descriptors (bus_addr_t address, u_int32_t length, PDESC_ARRAY desc_array) { @@ -3190,7 +3193,8 @@ adapter->stats.mpc + adapter->stats.cexterr; /* Tx Errors */ - ifp->if_oerrors = adapter->stats.ecol + adapter->stats.latecol; + ifp->if_oerrors = adapter->stats.ecol + adapter->stats.latecol + + adapter->watchdog_events; } @@ -3269,6 +3273,9 @@ (long long)adapter->stats.algnerrc); printf("em%d: Carrier extension errors = %lld\n", unit, (long long)adapter->stats.cexterr); + printf("em%d: RX overruns = %ld\n", unit, adapter->rx_overruns); + printf("em%d: watchdog timeouts = %ld\n", unit, + adapter->watchdog_events); printf("em%d: XON Rcvd = %lld\n", unit, (long long)adapter->stats.xonrxc); ==== //depot/projects/hammer/sys/dev/em/if_em.h#25 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.35 2005/10/20 09:55:49 glebius Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.37 2005/11/09 15:23:54 glebius Exp $*/ #ifndef _EM_H_DEFINED_ #define _EM_H_DEFINED_ @@ -39,23 +39,27 @@ #include #include +#include +#include +#include #include -#include -#include #include -#include #include +#include #include #include -#include + +#include +#include +#include +#include +#include #include #include -#include #include #include -#include #include #include @@ -65,17 +69,8 @@ #include #include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include #include @@ -391,6 +386,8 @@ unsigned long no_tx_desc_avail2; unsigned long no_tx_map_avail; unsigned long no_tx_dma_setup; + unsigned long watchdog_events; + unsigned long rx_overruns; /* Used in for 82547 10Mb Half workaround */ #define EM_PBA_BYTES_SHIFT 0xA ==== //depot/projects/hammer/sys/dev/em/if_em_hw.h#15 (text+ko) ==== @@ -31,7 +31,7 @@ *******************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em_hw.h,v 1.16 2005/10/20 08:46:43 glebius Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em_hw.h,v 1.17 2005/11/09 08:43:18 yongari Exp $*/ /* if_em_hw.h * Structures, enums, and macros for the MAC */ @@ -425,9 +425,7 @@ void em_read_pci_cfg(struct em_hw *hw, uint32_t reg, uint16_t * value); void em_write_pci_cfg(struct em_hw *hw, uint32_t reg, uint16_t * value); /* Port I/O is only supported on 82544 and newer */ -uint32_t em_io_read(struct em_hw *hw, unsigned long port); uint32_t em_read_reg_io(struct em_hw *hw, uint32_t offset); -void em_io_write(struct em_hw *hw, unsigned long port, uint32_t value); void em_write_reg_io(struct em_hw *hw, uint32_t offset, uint32_t value); int32_t em_config_dsp_after_link_change(struct em_hw *hw, boolean_t link_up); int32_t em_set_d3_lplu_state(struct em_hw *hw, boolean_t active); @@ -445,6 +443,15 @@ int32_t em_commit_shadow_ram(struct em_hw *hw); uint8_t em_arc_subsystem_valid(struct em_hw *hw); +#define E1000_BAR_TYPE(v) ((v) & E1000_BAR_TYPE_MASK) +#define E1000_BAR_TYPE_MASK 0x00000001 +#define E1000_BAR_TYPE_MEM 0x00000000 +#define E1000_BAR_TYPE_IO 0x00000001 +#define E1000_BAR_MEM_TYPE(v) ((v) & E1000_BAR_MEM_TYPE_MASK) +#define E1000_BAR_MEM_TYPE_MASK 0x00000006 +#define E1000_BAR_MEM_TYPE_32BIT 0x00000000 +#define E1000_BAR_MEM_TYPE_64BIT 0x00000004 + #define E1000_READ_REG_IO(a, reg) \ em_read_reg_io((a), E1000_##reg) #define E1000_WRITE_REG_IO(a, reg, val) \ ==== //depot/projects/hammer/sys/dev/em/if_em_osdep.h#10 (text+ko) ==== @@ -31,33 +31,25 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em_osdep.h,v 1.14 2005/05/26 23:32:02 tackerman Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em_osdep.h,v 1.15 2005/11/09 08:43:18 yongari Exp $*/ #ifndef _FREEBSD_OS_H_ #define _FREEBSD_OS_H_ #include -#include #include +#include >>> TRUNCATED FOR MAIL (1000 lines) <<<