svn commit: r219633 - in stable/8: share/man/man4 sys/conf sys/dev/cxgbe sys/dev/cxgbe/common sys/modules sys/modules/cxgbe usr.sbin/sysinstall
Author: np Date: Mon Mar 14 09:50:14 2011 New Revision: 219633 URL: http://svn.freebsd.org/changeset/base/219633 Log: MFC cxgbe(4) and fixes. r218792: cxgbe(4) - NIC driver for Chelsio T4 (Terminator 4) based 10Gb/1Gb adapters. r219285: Fix incorrect assertion. r219286: Resume tx immediately in response to an SGE egress update from the hardware. r219287: Upgrade the firmware on the card automatically if a better version is available. Downgrade only for a major version mismatch. r219288: A txpkts work request should have a valid FID. r219289: Store the ifnet rather than the port_info in each txq and rxq struct. r219290: Tweaks for rx: - everything related to LRO should be in #ifdef INET blocks - reorder sge_iq's fields so that the most frequently used are all together - pull all rx code into t4_intr_data directly - let go of the ingress queue lock when passing up data - refill the freelist only if it is short of at least 32 buffers r219292: Calculate how many descriptors can be reclaimed before calling reclaim_tx_descs r219293: There is no need to hold an ingress queue's lock while processing its descriptors r219299: Be sure to stay within the bounds of the mod_str array when displaying the transceiver type. r219392: cxgbe shouldn't directly know of the UMA zones where network buffers come from. r219436: Display holdoff timers and packet counts as a list of numbers. Added: stable/8/share/man/man4/cxgbe.4 - copied unchanged from r218792, head/share/man/man4/cxgbe.4 stable/8/sys/dev/cxgbe/ - copied from r218792, head/sys/dev/cxgbe/ stable/8/sys/modules/cxgbe/ - copied from r218792, head/sys/modules/cxgbe/ Modified: stable/8/share/man/man4/Makefile stable/8/share/man/man4/altq.4 stable/8/share/man/man4/vlan.4 stable/8/sys/conf/NOTES stable/8/sys/conf/files stable/8/sys/conf/kern.pre.mk stable/8/sys/dev/cxgbe/adapter.h stable/8/sys/dev/cxgbe/common/common.h stable/8/sys/dev/cxgbe/t4_main.c stable/8/sys/dev/cxgbe/t4_sge.c stable/8/sys/modules/Makefile stable/8/usr.sbin/sysinstall/devices.c Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/share/man/man4/Makefile == --- stable/8/share/man/man4/MakefileMon Mar 14 05:29:45 2011 (r219632) +++ stable/8/share/man/man4/MakefileMon Mar 14 09:50:14 2011 (r219633) @@ -81,6 +81,7 @@ MAN= aac.4 \ crypto.4 \ cue.4 \ cxgb.4 \ + cxgbe.4 \ cy.4 \ da.4 \ dc.4 \ Modified: stable/8/share/man/man4/altq.4 == --- stable/8/share/man/man4/altq.4 Mon Mar 14 05:29:45 2011 (r219632) +++ stable/8/share/man/man4/altq.4 Mon Mar 14 09:50:14 2011 (r219633) @@ -127,6 +127,7 @@ They have been applied to the following .Xr bfe 4 , .Xr bge 4 , .Xr cas 4 , +.Xr cxgbe 4 , .Xr dc 4 , .Xr de 4 , .Xr ed 4 , Copied: stable/8/share/man/man4/cxgbe.4 (from r218792, head/share/man/man4/cxgbe.4) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man4/cxgbe.4 Mon Mar 14 09:50:14 2011 (r219633, copy of r218792, head/share/man/man4/cxgbe.4) @@ -0,0 +1,167 @@ +.\" Copyright (c) 2011, Chelsio Inc +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions are met: +.\" +.\" 1. Redistributions of source code must retain the above copyright notice, +.\"this list of conditions and the following disclaimer. +.\" +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" 3. Neither the name of the Chelsio Inc nor the names of its +.\"contributors may be used to endorse or promote products derived from +.\"this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\"
svn commit: r219636 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: pjd Date: Mon Mar 14 11:07:12 2011 New Revision: 219636 URL: http://svn.freebsd.org/changeset/base/219636 Log: Fix potential panic in dbuf_sync_list() relate to spill blocks handling. Obtained from:IllumOS MFC after:1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Mar 14 10:51:24 2011(r219635) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Mon Mar 14 11:07:12 2011(r219636) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. */ #include @@ -1300,13 +1301,17 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ * it, since one of the current holders may be in the * middle of an update. Note that users of dbuf_undirty() * should not place a hold on the dbuf before the call. +* Also note: we can get here with a spill block, so +* test for that similar to how dbuf_dirty does. */ if (refcount_count(&db->db_holds) > db->db_dirtycnt) { mutex_exit(&db->db_mtx); /* Make sure we don't toss this buffer at sync phase */ - mutex_enter(&dn->dn_mtx); - dnode_clear_range(dn, db->db_blkid, 1, tx); - mutex_exit(&dn->dn_mtx); + if (db->db_blkid != DMU_SPILL_BLKID) { + mutex_enter(&dn->dn_mtx); + dnode_clear_range(dn, db->db_blkid, 1, tx); + mutex_exit(&dn->dn_mtx); + } DB_DNODE_EXIT(db); return (0); } @@ -1319,11 +1324,18 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ *drp = dr->dr_next; + /* +* Note that there are three places in dbuf_dirty() +* where this dirty record may be put on a list. +* Make sure to do a list_remove corresponding to +* every one of those list_insert calls. +*/ if (dr->dr_parent) { mutex_enter(&dr->dr_parent->dt.di.dr_mtx); list_remove(&dr->dr_parent->dt.di.dr_children, dr); mutex_exit(&dr->dr_parent->dt.di.dr_mtx); - } else if (db->db_level+1 == dn->dn_nlevels) { + } else if (db->db_blkid == DMU_SPILL_BLKID || + db->db_level+1 == dn->dn_nlevels) { ASSERT(db->db_blkptr == NULL || db->db_parent == dn->dn_dbuf); mutex_enter(&dn->dn_mtx); list_remove(&dn->dn_dirty_records[txg & TXG_MASK], dr); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r219637 - stable/8/sys/ufs/ufs
Author: kib Date: Mon Mar 14 11:20:26 2011 New Revision: 219637 URL: http://svn.freebsd.org/changeset/base/219637 Log: MFC r219388: Simplify uses of the web of pointers. Modified: stable/8/sys/ufs/ufs/ufs_dirhash.c stable/8/sys/ufs/ufs/ufs_quota.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/ufs/ufs/ufs_dirhash.c == --- stable/8/sys/ufs/ufs/ufs_dirhash.c Mon Mar 14 11:07:12 2011 (r219636) +++ stable/8/sys/ufs/ufs/ufs_dirhash.c Mon Mar 14 11:20:26 2011 (r219637) @@ -428,7 +428,7 @@ ufsdirhash_build(struct inode *ip) } for (i = 0; i < dirblocks; i++) dh->dh_blkfree[i] = DIRBLKSIZ / DIRALIGN; - bmask = VFSTOUFS(vp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; + bmask = vp->v_mount->mnt_stat.f_iosize - 1; pos = 0; while (pos < ip->i_size) { /* If necessary, get the next directory block. */ @@ -589,7 +589,7 @@ ufsdirhash_lookup(struct inode *ip, char DIRHASHLIST_UNLOCK(); vp = ip->i_vnode; - bmask = VFSTOUFS(vp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; + bmask = vp->v_mount->mnt_stat.f_iosize - 1; blkoff = -1; bp = NULL; restart: Modified: stable/8/sys/ufs/ufs/ufs_quota.c == --- stable/8/sys/ufs/ufs/ufs_quota.cMon Mar 14 11:07:12 2011 (r219636) +++ stable/8/sys/ufs/ufs/ufs_quota.cMon Mar 14 11:20:26 2011 (r219637) @@ -220,8 +220,7 @@ chkdq(struct inode *ip, ufs2_daddr_t cha /* Reset timer when crossing soft limit */ if (dq->dq_curblocks + change >= dq->dq_bsoftlimit && dq->dq_curblocks < dq->dq_bsoftlimit) - dq->dq_btime = time_second + - VFSTOUFS(ITOV(ip)->v_mount)->um_btime[i]; + dq->dq_btime = time_second + ip->i_ump->um_btime[i]; dq->dq_curblocks += change; dq->dq_flags |= DQ_MOD; DQI_UNLOCK(dq); @@ -266,8 +265,7 @@ chkdqchg(struct inode *ip, ufs2_daddr_t */ if (ncurblocks >= dq->dq_bsoftlimit && dq->dq_bsoftlimit) { if (dq->dq_curblocks < dq->dq_bsoftlimit) { - dq->dq_btime = time_second + - VFSTOUFS(ITOV(ip)->v_mount)->um_btime[type]; + dq->dq_btime = time_second + ip->i_ump->um_btime[type]; if (ip->i_uid == cred->cr_uid) *warn = 1; return (0); @@ -366,8 +364,7 @@ chkiq(struct inode *ip, int change, stru /* Reset timer when crossing soft limit */ if (dq->dq_curinodes + change >= dq->dq_isoftlimit && dq->dq_curinodes < dq->dq_isoftlimit) - dq->dq_itime = time_second + - VFSTOUFS(ITOV(ip)->v_mount)->um_itime[i]; + dq->dq_itime = time_second + ip->i_ump->um_itime[i]; dq->dq_curinodes += change; dq->dq_flags |= DQ_MOD; DQI_UNLOCK(dq); @@ -411,8 +408,7 @@ chkiqchg(struct inode *ip, int change, s */ if (ncurinodes >= dq->dq_isoftlimit && dq->dq_isoftlimit) { if (dq->dq_curinodes < dq->dq_isoftlimit) { - dq->dq_itime = time_second + - VFSTOUFS(ITOV(ip)->v_mount)->um_itime[type]; + dq->dq_itime = time_second + ip->i_ump->um_itime[type]; if (ip->i_uid == cred->cr_uid) *warn = 1; return (0); @@ -443,7 +439,7 @@ chkiqchg(struct inode *ip, int change, s static void chkdquot(struct inode *ip) { - struct ufsmount *ump = VFSTOUFS(ITOV(ip)->v_mount); + struct ufsmount *ump = ip->i_ump; struct vnode *vp = ITOV(ip); int i; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r219561 - in head/sys: cddl/dev/systrace modules/dtrace modules/dtrace/dtraceall modules/dtrace/systrace_freebsd32 modules/dtrace/systrace_linux32
On Sunday, March 13, 2011 3:10:52 am Andriy Gapon wrote: > on 13/03/2011 08:35 Artem Belevich said the following: > > On Sat, Mar 12, 2011 at 12:14 PM, Alexander Leidinger > > wrote: > >> But this looks like it will be named linux32 in any case. In the short > >> term I would prefer: > >> ---snip--- > >> #if defined(__amd64__) > >> #define MODNAME "linux32" > >> #elif defined(__i386__) > >> #define MODNAME "linux" > >> #endif > >> ---snip--- > > > > Makes sense. It's what's done with freebsd syscalls -- 'freebsd' for > > native syscalls, freebsd32 for 32-bit compat. > > BTW, in my opinion, it might not make a lot of sense. > That is, we can have native and compat FreeBSD system calls, but Linux system > calls are always compat and never native, whether the emulation is for the > same > arch or not. Explicit suffix makes things clearer. But that's just my > opinion. However, if we were to go that route, you would need to have 'linux-i386', 'linux-x86-64', 'linux-alpha', etc. Recall that our Alpha port had Linux compat as well, so for it 'linux.ko' was a 64-bit ABI. I think it makes sense to assume that 'linux' maps to Linux compat for whatever the native platform of the running kernel is and to then use suffixes for other platform modes (such as 32-bit compat mode in amd64). -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r219578 - head/etc
On Sunday, March 13, 2011 10:46:09 am Jilles Tjoelker wrote: > On Sun, Mar 13, 2011 at 12:14:01AM -0800, Doug Barton wrote: > > On 03/12/2011 15:08, Jilles Tjoelker wrote: > > > I wonder if it is a good idea to pollute the environment of many daemons > > > with this. Although sshd and cron clean it up, there is at least one > > > daemon that passes the environment on. One of those is devd. > > > I think the argument could be made that this is bad behavior on their > > part, but if it turns out that it starts affecting things negatively we > > can take another look at it. > > Cleaning the environment requires special care to preserve environment > variables that may still be needed. This is a problem particularly for > code intended to be portable. Perhaps someone wants to apply a hack > using LD_PRELOAD or other LD_* variables, or an environment variable is > needed to force standards-compliant behaviour that the program depends > on. > > The service(8) utility should clear the environment so it matches the > boot environment as much as possible. If someone wants to set special > environment variables, they should configure that in such a way that it > also works at boot or call the rc.d script directly. > > > > While that > > > saves four /etc/rc.conf reads on my minimalistic 9-current VM, it > > > implies that devd must be restarted to pick up changes to /etc/rc.conf. > > > That seems a POLA violation. > > > I'm not sure what you mean by this. We've always required services to be > > restarted to pick up rc.conf changes. > > For options for devd itself, yes. However, as configured in the default > /etc/devd.conf, devd may invoke commands like > /etc/pccard_ether $subsystem start > or > /etc/rc.d/dhclient quietstart $subsystem > > The natural expectation is that these reread /etc/rc.conf every time, so > that it is possible to set up network settings for a network interface > and then plug it in, without restarting devd. And so it worked before > r219578. I agree that this is the behavior that I certainly expect. I also agree that it is hard to safely purge environment variables in all of the system daemons. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r219638 - head/usr.bin/calendar/calendars
Author: dchagin Date: Mon Mar 14 13:02:12 2011 New Revision: 219638 URL: http://svn.freebsd.org/changeset/base/219638 Log: Add my birthday to the freebsd calendar. Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdMon Mar 14 11:20:26 2011(r219637) +++ head/usr.bin/calendar/calendars/calendar.freebsdMon Mar 14 13:02:12 2011(r219638) @@ -46,6 +46,7 @@ 02/02 Diomidis D. Spinellis born in Athens, Greece, 1967 02/02 Michael W Lucas born in Detroit, Michigan, United States, 1967 02/02 Yoichi Nakayama born in Tsu, Mie, Japan, 1976 +02/02 Dmitry Chagin born in Stalingrad, USSR, 1976 02/05 Frank Laszlo born in Howell, Michigan, United States, 1983 02/10 David Greenman born in Portland, Oregon, United States, 1968 02/10 Paul Richards born in Ammanford, Carmarthenshire, United Kingdom, 1968 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r219639 - in head/contrib/gcc: . config/i386 doc
Author: mm Date: Mon Mar 14 13:31:34 2011 New Revision: 219639 URL: http://svn.freebsd.org/changeset/base/219639 Log: Backport SSSE3 instruction set support to base gcc. Enabled by default for -march=core2 Obtained from:gcc 4.3 (rev. 117958, 121687, 121726, 123639; GPLv2) MFC after:2 weeks Added: head/contrib/gcc/config/i386/tmmintrin.h (contents, props changed) Modified: head/contrib/gcc/config.gcc head/contrib/gcc/config/i386/i386.c head/contrib/gcc/config/i386/i386.h head/contrib/gcc/config/i386/i386.md head/contrib/gcc/config/i386/i386.opt head/contrib/gcc/config/i386/sse.md head/contrib/gcc/config/i386/xmmintrin.h head/contrib/gcc/doc/extend.texi head/contrib/gcc/doc/gcc.1 head/contrib/gcc/doc/invoke.texi Modified: head/contrib/gcc/config.gcc == --- head/contrib/gcc/config.gcc Mon Mar 14 13:02:12 2011(r219638) +++ head/contrib/gcc/config.gcc Mon Mar 14 13:31:34 2011(r219639) @@ -268,11 +268,13 @@ xscale-*-*) ;; i[34567]86-*-*) cpu_type=i386 - extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h pmmintrin.h" + extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h + pmmintrin.h tmmintrin.h" ;; x86_64-*-*) cpu_type=i386 - extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h pmmintrin.h" + extra_headers="mmintrin.h mm3dnow.h xmmintrin.h emmintrin.h + pmmintrin.h tmmintrin.h" need_64bit_hwint=yes ;; ia64-*-*) Modified: head/contrib/gcc/config/i386/i386.c == --- head/contrib/gcc/config/i386/i386.c Mon Mar 14 13:02:12 2011 (r219638) +++ head/contrib/gcc/config/i386/i386.c Mon Mar 14 13:31:34 2011 (r219639) @@ -1511,16 +1511,24 @@ ix86_handle_option (size_t code, const c case OPT_msse: if (!value) { - target_flags &= ~(MASK_SSE2 | MASK_SSE3); - target_flags_explicit |= MASK_SSE2 | MASK_SSE3; + target_flags &= ~(MASK_SSE2 | MASK_SSE3 | MASK_SSSE3); + target_flags_explicit |= MASK_SSE2 | MASK_SSE3 | MASK_SSSE3; } return true; case OPT_msse2: if (!value) { - target_flags &= ~MASK_SSE3; - target_flags_explicit |= MASK_SSE3; + target_flags &= ~(MASK_SSE3 | MASK_SSSE3); + target_flags_explicit |= MASK_SSE3 | MASK_SSSE3; + } + return true; + +case OPT_msse3: + if (!value) + { + target_flags &= ~MASK_SSSE3; + target_flags_explicit |= MASK_SSSE3; } return true; @@ -1589,7 +1597,8 @@ override_options (void) PTA_PREFETCH_SSE = 16, PTA_3DNOW = 32, PTA_3DNOW_A = 64, - PTA_64BIT = 128 + PTA_64BIT = 128, + PTA_SSSE3 = 256 } flags; } const processor_alias_table[] = @@ -1617,7 +1626,7 @@ override_options (void) | PTA_MMX | PTA_PREFETCH_SSE}, {"nocona", PROCESSOR_NOCONA, PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_64BIT | PTA_MMX | PTA_PREFETCH_SSE}, - {"core2", PROCESSOR_CORE2, PTA_SSE | PTA_SSE2 | PTA_SSE3 + {"core2", PROCESSOR_CORE2, PTA_SSE | PTA_SSE2 | PTA_SSE3 | PTA_SSSE3 | PTA_64BIT | PTA_MMX | PTA_PREFETCH_SSE}, {"geode", PROCESSOR_GEODE, PTA_MMX | PTA_PREFETCH_SSE | PTA_3DNOW @@ -1811,6 +1820,9 @@ override_options (void) if (processor_alias_table[i].flags & PTA_SSE3 && !(target_flags_explicit & MASK_SSE3)) target_flags |= MASK_SSE3; + if (processor_alias_table[i].flags & PTA_SSSE3 + && !(target_flags_explicit & MASK_SSSE3)) + target_flags |= MASK_SSSE3; if (processor_alias_table[i].flags & PTA_PREFETCH_SSE) x86_prefetch_sse = true; if (TARGET_64BIT && !(processor_alias_table[i].flags & PTA_64BIT)) @@ -1987,6 +1999,10 @@ override_options (void) if (!TARGET_80387) target_flags |= MASK_NO_FANCY_MATH_387; + /* Turn on SSE3 builtins for -mssse3. */ + if (TARGET_SSSE3) +target_flags |= MASK_SSE3; + /* Turn on SSE2 builtins for -msse3. */ if (TARGET_SSE3) target_flags |= MASK_SSE2; @@ -14693,6 +14709,41 @@ enum ix86_builtins IX86_BUILTIN_MONITOR, IX86_BUILTIN_MWAIT, + /* SSSE3. */ + IX86_BUILTIN_PHADDW, + IX86_BUILTIN_PHADDD, + IX86_BUILTIN_PHADDSW, + IX86_BUILTIN_PHSUBW, + IX86_BUILTIN_PHSUBD, + IX86_BUILTIN_PHSUBSW, + IX86_BUILTIN_PMADDUBSW, + IX86_BUILTIN_PMULHRSW, + IX86_BUILTIN_PSHUFB, + IX86_BUILTIN_PSIGNB, + IX86_BUILTIN_PSIGNW, + IX86_BUILTIN_PSIGND, + IX86_BUILTIN_PALIGNR, + IX86_BUILTIN_PABSB, + IX86_BUILTIN_PABSW, + IX86_BUILTIN_PABSD, + + IX86_BUILTIN_PHADDW128, + IX86_BUILTIN_PHADDD128, + IX8
svn commit: r219640 - head/share/mk
Author: mm Date: Mon Mar 14 13:36:51 2011 New Revision: 219640 URL: http://svn.freebsd.org/changeset/base/219640 Log: Add ssse3 capability for CPUTYPE=core2 to MACHINE_CPU in bsd.cpu.mk MFC after:2 weeks Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk == --- head/share/mk/bsd.cpu.mkMon Mar 14 13:31:34 2011(r219639) +++ head/share/mk/bsd.cpu.mkMon Mar 14 13:36:51 2011(r219640) @@ -29,7 +29,7 @@ MACHINE_CPU = mips . if ${MACHINE_CPUARCH} == "i386" . if ${CPUTYPE} == "nocona" CPUTYPE = prescott -. elif ${CPUTYPE} == "core" || ${CPUTYPE} == "core2" +. elif ${CPUTYPE} == "core" CPUTYPE = prescott . elif ${CPUTYPE} == "p4" CPUTYPE = pentium4 @@ -86,6 +86,8 @@ CPUTYPE = ultrasparc3 _CPUCFLAGS = -march=i686 -falign-functions=0 -falign-jumps=0 -falign-loops=0 . elif ${CPUTYPE} == "k5" _CPUCFLAGS = -march=pentium +. elif ${CPUTYPE} == "core2" +_CPUCFLAGS = -march=prescott . else _CPUCFLAGS = -march=${CPUTYPE} . endif # GCC on 'i386' @@ -182,6 +184,8 @@ MACHINE_CPU = 3dnow mmx i586 i486 i386 MACHINE_CPU = sse mmx i586 i486 i386 . elif ${CPUTYPE} == "c7" MACHINE_CPU = sse3 sse2 sse i686 mmx i586 i486 i386 +. elif ${CPUTYPE} == "core2" +MACHINE_CPU = ssse3 sse3 sse2 sse i686 mmx i586 i486 i386 . elif ${CPUTYPE} == "prescott" MACHINE_CPU = sse3 sse2 sse i686 mmx i586 i486 i386 . elif ${CPUTYPE} == "pentium4" || ${CPUTYPE} == "pentium4m" || ${CPUTYPE} == "pentium-m" @@ -206,7 +210,9 @@ MACHINE_CPU = i386 MACHINE_CPU = k8 3dnow sse3 . elif ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || ${CPUTYPE} == "k8" MACHINE_CPU = k8 3dnow -. elif ${CPUTYPE} == "nocona" || ${CPUTYPE} == "core2" +. elif ${CPUTYPE} == "core2" +MACHINE_CPU = ssse3 sse3 +. elif ${CPUTYPE} == "nocona" MACHINE_CPU = sse3 . endif MACHINE_CPU += amd64 sse2 sse mmx ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r219641 - in head: etc release
Author: nwhitehorn Date: Mon Mar 14 13:47:17 2011 New Revision: 219641 URL: http://svn.freebsd.org/changeset/base/219641 Log: Thanks to sysinstall for its 15 years of service. And now to sleep, perchance to dream... Added: head/release/Makefile.sysinstall - copied, changed from r219583, head/release/Makefile Deleted: head/release/Makefile.bsdinstall Modified: head/etc/motd head/release/Makefile head/release/generate-release.sh Modified: head/etc/motd == --- head/etc/motd Mon Mar 14 13:36:51 2011(r219640) +++ head/etc/motd Mon Mar 14 13:47:17 2011(r219641) @@ -19,6 +19,5 @@ as a question to the questions@FreeBSD.o unfamiliar with FreeBSD's directory layout, please refer to the hier(7) manual page. If you are not familiar with manual pages, type `man man'. -You may also use sysinstall(8) to re-enter the installation and -configuration utility. Edit /etc/motd to change this login announcement. +Edit /etc/motd to change this login announcement. Modified: head/release/Makefile == --- head/release/Makefile Mon Mar 14 13:36:51 2011(r219640) +++ head/release/Makefile Mon Mar 14 13:47:17 2011(r219641) @@ -1,1442 +1,157 @@ # $FreeBSD$ # -# make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \ -# [RELEASETAG=tag] [SVNROOT=svn://svn.freebsd.org/base] \ -# [SVNBRANCH=some/branch] +# Makefile for building releases and release media. +# +# User-driven targets: +# cdrom: Builds release CD-ROM media (release.iso) +# ftp: Sets up FTP distribution area (ftp) +# release: Build all media and FTP distribution area +# +# Variables affecting the build process: +# WORLDDIR: location of src tree -- must have built world and default kernel +#(by default, the directory above this one) +# PORTSDIR: location of ports tree to distribute (default: /usr/ports) +# DOCDIR: location of doc tree (default: /usr/doc) +# NOPORTS: if set, do not distribute ports tree +# NOSRC:if set, do not distribute source tree +# NODOC:if set, do not generate release documentation +# TARGET/TARGET_ARCH: architecture of built release # -# Where "/some/dir" is the pathname of a directory on a some filesystem with -# at least 1000MB of free space, "somename" is what you want the release to -# call itself, "/cvs/dir" is where our source repo resides and, optionally, -# which CVS "tag" name should be used when checking out the sources to build -# the release (default is HEAD). -# -# Please note the support for building from SVN is preliminary and there -# are still questions about things like how to handle updates of -# /usr/src on production systems (csup(1) replacement). It is a work -# in progress and may change as the other issues get worked out. -# -# Please note: the md(4) driver must be present in the kernel -# (either by being compiled in or available as a kld(4) module), -# otherwise the target 'release.8' and possibly others will fail. -# -# Note: If you add options to this file, please keep release(7) updated! -# -# Set these, release builder! -# -# Fixed version: -#BUILDNAME=9.0-CURRENT -# -# Automatic SNAP versioning: -DATE != date +%Y%m%d -BASE = 9.0 -BUILDNAME?=${BASE}-${DATE}-SNAP -# -#CHROOTDIR=/junk/release -# If this is a -stable snapshot, then set -#RELEASETAG=RELENG_8 -# -# To test a release with a source tree containing patches and -# other work. This tree will get copied instead of getting the -# src/ tree from a CVS checkout. For "rerelease", this will NOT -# be copied; cvs update will be used instead. -#EXTSRCDIR=/usr/src -# -# To use a checked-out ports collection directory instead of -# checking out from a local CVS repository, set this option. -#EXTPORTSDIR=/usr/ports -# -# To use a checked-out doc/ directory instead of -# checking out from a local CVS repository, set this option. -#EXTDOCDIR=/usr/doc -# -# To add other options to the CVS subcommands (co,up), set -#CVSCMDARGS="-D '01/01/2002 00:00:00 UTC'" -# -# To add other options to the CVS command, set -#CVSARGS="-lfq" -# -# To prefix the CVS command -#CVSPREFIX="/usr/bin/time" -# -# Where the CVS repository is -#CVSROOT="/home/ncvs" -# -# To add other options to the Subversion subcommands (co,up), set -#SVNCMDARGS="-r '{ 01/01/2002 00:00:00 UTC }'" -# -# To prefix the Subversion command -#SVNPREFIX="/usr/bin/time" -# -# Where the Subversion repository is -#SVNROOT=svn://svn.freebsd.org/base -# -# Subversion branch to build for src. If this is not set then it is -# automatically computed from RELEASETAG. -#SVNBRANCH=stable/8 -# -# Non-zero if ${RELEASETAG} is in the form "RELENG_ver_RELEASE"; we -# are building an official release. Otherwise, we are building for -# a branch. -.if defined(RELEASETAG) -ISRELEASE!=expr "${RELEASETAG}" : '^RELENG_.*_RELEASE$$' || true -.if ${ISRELE
Re: svn commit: r219641 - in head: etc release
On Mon, Mar 14, 2011 at 01:47:17PM +, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Mon Mar 14 13:47:17 2011 > New Revision: 219641 > URL: http://svn.freebsd.org/changeset/base/219641 > > Log: > Thanks to sysinstall for its 15 years of service. And now to sleep, > perchance to dream... And yes, I just heard, it is snowing in hell. This is for you, Nathan: http://www.youtube.com/watch?v=4m8ltkjO7Pg -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com pgpUmDN9UFGgm.pgp Description: PGP signature
svn commit: r219642 - in stable/8: share/man/man9 sys/kern sys/sys
Author: jh Date: Mon Mar 14 17:08:30 2011 New Revision: 219642 URL: http://svn.freebsd.org/changeset/base/219642 Log: MFC r209710: Extend the kernel unit number allocator for allocating specific unit numbers. This change adds a new function alloc_unr_specific() which returns the requested unit number if it is free. If the number is already allocated or out of the range, -1 is returned. Update alloc_unr(9) manual page accordingly and add a MLINK for alloc_unr_specific(9). Modified: stable/8/share/man/man9/Makefile stable/8/share/man/man9/alloc_unr.9 stable/8/sys/kern/subr_unit.c stable/8/sys/sys/systm.h Directory Properties: stable/8/share/man/man9/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/share/man/man9/Makefile == --- stable/8/share/man/man9/MakefileMon Mar 14 13:47:17 2011 (r219641) +++ stable/8/share/man/man9/MakefileMon Mar 14 17:08:30 2011 (r219642) @@ -374,6 +374,7 @@ MAN=accept_filter.9 \ zone.9 MLINKS=alloc_unr.9 alloc_unrl.9 \ + alloc_unr.9 alloc_unr_specific.9 \ alloc_unr.9 delete_unrhdr.9 \ alloc_unr.9 free_unr.9 \ alloc_unr.9 new_unrhdr.9 Modified: stable/8/share/man/man9/alloc_unr.9 == --- stable/8/share/man/man9/alloc_unr.9 Mon Mar 14 13:47:17 2011 (r219641) +++ stable/8/share/man/man9/alloc_unr.9 Mon Mar 14 17:08:30 2011 (r219642) @@ -24,13 +24,14 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2010 +.Dd July 5, 2010 .Dt ALLOC_UNR 9 .Os .Sh NAME .Nm new_unrhdr , .Nm delete_unrhdr , .Nm alloc_unr , +.Nm alloc_unr_specific , .Nm free_unr .Nd "kernel unit number allocator" .Sh SYNOPSIS @@ -43,6 +44,8 @@ .Fn alloc_unr "struct unrhdr *uh" .Ft int .Fn alloc_unrl "struct unrhdr *uh" +.Ft int +.Fn alloc_unr_specific "struct unrhdr *uh" "u_int item" .Ft void .Fn free_unr "struct unrhdr *uh" "u_int item" .Sh DESCRIPTION @@ -81,6 +84,13 @@ is returned. Same as .Fn alloc_unr except that mutex is assumed to be already locked and thus is not used. +.It Fn alloc_unr_specific uh item +Allocate a specific unit number. +This function allocates memory and thus may sleep. +The allocated unit number is returned on success. +If the specified number is already allocated or out of the range, +.Li \-1 +is returned. .It Fn free_unr uh item Free a previously allocated unit number. This function may require allocating memory, and thus it can sleep. Modified: stable/8/sys/kern/subr_unit.c == --- stable/8/sys/kern/subr_unit.c Mon Mar 14 13:47:17 2011 (r219641) +++ stable/8/sys/kern/subr_unit.c Mon Mar 14 17:08:30 2011 (r219642) @@ -628,6 +628,132 @@ alloc_unr(struct unrhdr *uh) return (i); } +static int +alloc_unr_specificl(struct unrhdr *uh, u_int item, void **p1, void **p2) +{ + struct unr *up, *upn; + struct unrb *ub; + u_int i, last, tl; + + mtx_assert(uh->mtx, MA_OWNED); + + if (item < uh->low + uh->first || item > uh->high) + return (-1); + + up = TAILQ_FIRST(&uh->head); + /* Ideal split. */ + if (up == NULL && item - uh->low == uh->first) { + uh->first++; + uh->last--; + uh->busy++; + check_unrhdr(uh, __LINE__); + return (item); + } + + i = item - uh->low - uh->first; + + if (up == NULL) { + up = new_unr(uh, p1, p2); + up->ptr = NULL; + up->len = i; + TAILQ_INSERT_TAIL(&uh->head, up, list); + up = new_unr(uh, p1, p2); + up->ptr = uh; + up->len = 1; + TAILQ_INSERT_TAIL(&uh->head, up, list); + uh->last = uh->high - uh->low - i; + uh->busy++; + check_unrhdr(uh, __LINE__); + return (item); + } else { + /* Find the item which contains the unit we want to allocate. */ + TAILQ_FOREACH(up, &uh->head, list) { + if (up->len > i) + break; + i -= up->len; + } + } + + if (up == NULL) { + if (i > 0) { + up = new_unr(uh, p1, p2); + up->ptr = NULL; + up->len = i; + TAILQ_INSERT_TAIL(&uh->head, up, list); + } + up = new_unr(uh, p1, p2); + up->ptr = uh; + up->len = 1; + TAILQ_
Re: svn commit: r219089 - in head: cddl/compat/opensolaris/include cddl/compat/opensolaris/misc cddl/contrib/opensolaris/cmd/stat cddl/contrib/opensolaris/cmd/stat/common cddl/contrib/opensolaris/cmd/
On Sunday, February 27, 2011 2:41:40 pm Pawel Jakub Dawidek wrote: > Author: pjd > Date: Sun Feb 27 19:41:40 2011 > New Revision: 219089 > URL: http://svn.freebsd.org/changeset/base/219089 > > Log: > Finally... Import the latest open-source ZFS version - (SPA) 28. > > Few new things available from now on: > > - Data deduplication. > - Triple parity RAIDZ (RAIDZ3). > - zfs diff. > - zpool split. > - Snapshot holds. > - zpool import -F. Allows to rewind corrupted pool to earlier > transaction group. > - Possibility to import pool in read-only mode. > > MFC after: 1 month Did you test non-GPT booting? You updated BOOT2SIZE in its Makefile but ignored the comment: # We currently allow 32768 bytes for zfsboot - in practice it could be # any size up to 3.5Mb but keeping it fixed size simplifies zfsldr. # BOOT2SIZE= 65536 If you want to use a larger size, you have to change zfsldr.S as it has a hardcoded sector count that it loads off of disk: .set NSECT,0x40 ... main.5: mov %dx,MEM_ARG # Save args movb $NSECT,%dh # Sector count movl $1024,%eax # Offset to boot2 callw nread.1 # Read disk Since 0x40 * 512 = 32k, zfsldr.S is only going to load the first 32k of zfsboot into RAM. If you need to bump this size up, you need to update the comment and NSECT in zfsldr.S. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r217586 - in head: sbin/sysctl share/man/man9 sys/cam/scsi sys/dev/cxgb sys/dev/wi sys/net sys/sys
On Wed, Jan 19, 2011 at 9:04 AM, Matthew D Fleming wrote: > Author: mdf > Date: Wed Jan 19 17:04:07 2011 > New Revision: 217586 > URL: http://svn.freebsd.org/changeset/base/217586 > > Log: > sysctl(8) should use the CTLTYPE to determine the type of data when > reading. (This was already done for writing to a sysctl). This > requires all SYSCTL setups to specify a type. Most of them are now > checked at compile-time. > > Remove SYSCTL_*X* sysctl additions as the print being in hex should be > controlled by the -x flag to sysctl(8). I appreciate the work, but this really should have been followed up by a __FreeBSD_version__ bump, as this unfortunately broke some ports like emulators/*qemu*. I just filed a PR for it as I noticed it when doing portmaster -af for the recent X.org upgrade. FWIW, this can be properly tested with: __FreeBSD_version__ < 900031; kib bumped the version a week after this commit. Thanks, -Garrett ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r219646 - head/sys/x86/isa
Author: jkim Date: Mon Mar 14 22:05:59 2011 New Revision: 219646 URL: http://svn.freebsd.org/changeset/base/219646 Log: When TSC is unavailable, broken or disabled and the current timecounter has better quality than i8254 timer, use it for DELAY(9). Modified: head/sys/x86/isa/clock.c Modified: head/sys/x86/isa/clock.c == --- head/sys/x86/isa/clock.cMon Mar 14 19:31:43 2011(r219645) +++ head/sys/x86/isa/clock.cMon Mar 14 22:05:59 2011(r219646) @@ -245,6 +245,42 @@ getit(void) return ((high << 8) | low); } +static __inline void +delay_tsc(int n) +{ + uint64_t start, end, now; + + sched_pin(); + start = rdtsc(); + end = start + (tsc_freq * n) / 100; + do { + cpu_spinwait(); + now = rdtsc(); + } while (now < end || (now > start && end < start)); + sched_unpin(); +} + +static __inline void +delay_timecounter(struct timecounter *tc, int n) +{ + uint64_t end, now; + u_int last, mask, u; + + mask = tc->tc_counter_mask; + last = tc->tc_get_timecount(tc) & mask; + end = tc->tc_frequency * n / 100; + now = 0; + do { + cpu_spinwait(); + u = tc->tc_get_timecount(tc) & mask; + if (u < last) + now += mask - last + u + 1; + else + now += u - last; + last = u; + } while (now < end); +} + /* * Wait "n" microseconds. * Relies on timer 1 counting down from (i8254_freq / hz) @@ -253,6 +289,7 @@ getit(void) void DELAY(int n) { + struct timecounter *tc; int delta, prev_tick, tick, ticks_left; #ifdef DELAYDEBUG @@ -262,16 +299,12 @@ DELAY(int n) #endif if (tsc_freq != 0) { - uint64_t start, end, now; - - sched_pin(); - start = rdtsc(); - end = start + (tsc_freq * n) / 100; - do { - cpu_spinwait(); - now = rdtsc(); - } while (now < end || (now > start && end < start)); - sched_unpin(); + delay_tsc(n); + return; + } + tc = timecounter; + if (tc->tc_quality > 0) { + delay_timecounter(tc, n); return; } #ifdef DELAYDEBUG ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r219647 - in head: . sys/amd64/conf sys/boot/forth sys/conf sys/dev/bxe sys/i386/conf sys/modules/bxe usr.sbin/sysinstall
Author: davidch Date: Mon Mar 14 22:42:41 2011 New Revision: 219647 URL: http://svn.freebsd.org/changeset/base/219647 Log: - Initial release of bxe(4) to support Broadcom NetXtreme II 10GbE. (BCM57710, BCM57711, BCM57711E) MFC after:One month Added: head/sys/dev/bxe/ head/sys/dev/bxe/bxe_debug.h (contents, props changed) head/sys/dev/bxe/bxe_fw_defs.h (contents, props changed) head/sys/dev/bxe/bxe_hsi.h (contents, props changed) head/sys/dev/bxe/bxe_include.h (contents, props changed) head/sys/dev/bxe/bxe_init.h (contents, props changed) head/sys/dev/bxe/bxe_init_values_e1.h (contents, props changed) head/sys/dev/bxe/bxe_init_values_e1h.h (contents, props changed) head/sys/dev/bxe/bxe_link.c (contents, props changed) head/sys/dev/bxe/bxe_link.h (contents, props changed) head/sys/dev/bxe/bxe_reg.h (contents, props changed) head/sys/dev/bxe/bxe_self_test.h (contents, props changed) head/sys/dev/bxe/dump_e1.h (contents, props changed) head/sys/dev/bxe/dump_e1h.h (contents, props changed) head/sys/dev/bxe/hw_dump_reg_st.h (contents, props changed) head/sys/dev/bxe/if_bxe.c (contents, props changed) head/sys/dev/bxe/if_bxe.h (contents, props changed) head/sys/modules/bxe/ head/sys/modules/bxe/Makefile (contents, props changed) Modified: head/MAINTAINERS head/sys/amd64/conf/GENERIC head/sys/boot/forth/loader.conf head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/i386/conf/GENERIC head/usr.sbin/sysinstall/devices.c Modified: head/MAINTAINERS == --- head/MAINTAINERSMon Mar 14 22:05:59 2011(r219646) +++ head/MAINTAINERSMon Mar 14 22:42:41 2011(r219647) @@ -47,6 +47,7 @@ cd(4) ken Pre-commit review requested. pass(4)ken Pre-commit review requested. ch(4) ken Pre-commit review requested. em(4) jfv Pre-commit review requested. +bxe(4) davidch Pre-commit review requested. tdfx(4)cokane Just keep me informed of changes, try not to break it. sendmail gshapiroPre-commit review requested. etc/mail gshapiroPre-commit review requested. Modified: head/sys/amd64/conf/GENERIC == --- head/sys/amd64/conf/GENERIC Mon Mar 14 22:05:59 2011(r219646) +++ head/sys/amd64/conf/GENERIC Mon Mar 14 22:42:41 2011(r219647) @@ -193,6 +193,7 @@ device ppi # Parallel port interface d #devicepuc # PCI Ethernet NICs. +device bxe # Broadcom BCM57710/BCM57711/BCM57711E 10Gb Ethernet device de # DEC/Intel DC21x4x (``Tulip'') device em # Intel PRO/1000 Gigabit Ethernet Family device igb # Intel PRO/1000 PCIE Server Gigabit Family Modified: head/sys/boot/forth/loader.conf == --- head/sys/boot/forth/loader.conf Mon Mar 14 22:05:59 2011 (r219646) +++ head/sys/boot/forth/loader.conf Mon Mar 14 22:42:41 2011 (r219647) @@ -268,6 +268,7 @@ if_bge_load="NO"# Broadcom BCM570x PCI if_bridge_load="NO"# if_bridge(4) devices if_bwi_load="NO" # Broadcom BCM53xx IEEE 802.11b/g wireness NICs if_bwn_load="NO" # Broadcom BCM43xx IEEE 802.11 wireless NICs +if_bxe_load="NO" # Broadcom NetXtreme II 10Gb Ethernet if_carp_load="NO" # carp(4) devices if_cas_load="NO" # Sun Cassini/Cassini+ and NS DP83065 Saturn if_cm_load="NO"# SMC (90c26, 90c56, 90c66) Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Mon Mar 14 22:05:59 2011(r219646) +++ head/sys/conf/NOTES Mon Mar 14 22:42:41 2011(r219647) @@ -1900,6 +1900,8 @@ devicexmphy # XaQti XMAC II # BCM570x family of controllers, including the 3Com 3c996-T, # the Netgear GA302T, the SysKonnect SK-9D21 and SK-9D41, and # the embedded gigE NICs on Dell PowerEdge 2550 servers. +# bxe: Broadcom NetXtreme II (BCM57710/57711/57711E) PCIe 10b Ethernet +# adapters. # bwi: Broadcom BCM430* and BCM431* family of wireless adapters. # bwn: Broadcom BCM43xx family of wireless adapters. # cas: Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn @@ -2078,6 +2080,7 @@ devicewb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') # PCI Ethernet NICs. +device bxe # Broadcom BCM57710/BCM57711/BCM57711E 10Gb Ethernet device cxgbe # Chelsio T4 10GbE PCIe adapter device de # DEC/Intel DC21
svn commit: r219648 - in stable/8/gnu/usr.bin: binutils/ld cc/cc_tools
Author: dim Date: Mon Mar 14 22:51:51 2011 New Revision: 219648 URL: http://svn.freebsd.org/changeset/base/219648 Log: Partially MFC r209867 and r215439, to provide rudimentary support for linking i386 (32 bit) executables on amd64, using gcc's -m32 option. r209867 introduces the needed multilib options to gcc's multilib.h, but was originally intended just for powerpc64. r215439 teaches the linker to search in /usr/lib32 for elf_i386_fbsd output, and amends r209867 to apply to amd64 too. NOTE: this MFC does NOT provide full support for compiling and linking all existing 32 bit programs on amd64, since /usr/include/machine still contains amd64-specific headers. Though simple "Hello World" type programs work, anything relying on machine-specific types might fail in various interesting ways. You have been warned. :) MFC r209867: Teach our toolchain how to generate 64-bit PowerPC binaries. This fixes a variety of bugs in binutils related to handling of 64-bit PPC ELF, provides a GCC configuration for 64-bit PowerPC on FreeBSD, and associated build systems tweaks. Obtained from:projects/ppc64 MFC r215439: Let gcc and ld know where to find 32 bit libraries on amd64. Reviewed by: arch@ Approved by: kib (mentor) Modified: stable/8/gnu/usr.bin/binutils/ld/Makefile.amd64 stable/8/gnu/usr.bin/cc/cc_tools/Makefile Directory Properties: stable/8/gnu/usr.bin/binutils/ld/ (props changed) stable/8/gnu/usr.bin/cc/cc_tools/ (props changed) Modified: stable/8/gnu/usr.bin/binutils/ld/Makefile.amd64 == --- stable/8/gnu/usr.bin/binutils/ld/Makefile.amd64 Mon Mar 14 22:42:41 2011(r219647) +++ stable/8/gnu/usr.bin/binutils/ld/Makefile.amd64 Mon Mar 14 22:51:51 2011(r219648) @@ -12,7 +12,7 @@ e${NATIVE_EMULATION}.c: emulparams/${NAT ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} X86_EMULATION= elf_i386_fbsd -_i386_path=\"${TOOLS_PREFIX}/usr/lib/i386\" +_i386_path=\"${TOOLS_PREFIX}/usr/lib32\" EMS+= ${X86_EMULATION} .for ext in ${ELF_SCR_EXT} LDSCRIPTS+=${X86_EMULATION}.${ext} Modified: stable/8/gnu/usr.bin/cc/cc_tools/Makefile == --- stable/8/gnu/usr.bin/cc/cc_tools/Makefile Mon Mar 14 22:42:41 2011 (r219647) +++ stable/8/gnu/usr.bin/cc/cc_tools/Makefile Mon Mar 14 22:51:51 2011 (r219648) @@ -303,12 +303,22 @@ GENSRCS+= gcov-iov.h # Multilib config file multilib.h: +.if ${TARGET_ARCH} == "amd64" + echo 'static const char *const multilib_raw[] = { \ + ". !m64 !m32;", \ + "64:../lib m64 !m32;", \ + "32:../lib32 !m64 m32;", NULL };' > ${.TARGET} + echo 'static const char *const multilib_matches_raw[] = { \ + "m64 m64;", "m32 m32;", NULL };'>> ${.TARGET} + echo 'static const char *multilib_options = "m64/m32";' >> ${.TARGET} +.else echo 'static const char *const multilib_raw[] = { \ ". ;", NULL };' > ${.TARGET} echo 'static const char *const multilib_matches_raw[] = { \ NULL };'>> ${.TARGET} - echo 'static const char *multilib_extra = "";' >> ${.TARGET} echo 'static const char *multilib_options = "";'>> ${.TARGET} +.endif + echo 'static const char *multilib_extra = "";' >> ${.TARGET} echo 'static const char *const multilib_exclusions_raw[] = { \ NULL };'>> ${.TARGET} ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r219653 - in head/sys: arm/include i386/include
Author: jkim Date: Mon Mar 14 23:30:14 2011 New Revision: 219653 URL: http://svn.freebsd.org/changeset/base/219653 Log: Make get_cyclecount(9) little bit more useful where binuptime(9) is used. Modified: head/sys/arm/include/cpu.h head/sys/i386/include/cpu.h Modified: head/sys/arm/include/cpu.h == --- head/sys/arm/include/cpu.h Mon Mar 14 23:19:04 2011(r219652) +++ head/sys/arm/include/cpu.h Mon Mar 14 23:30:14 2011(r219653) @@ -16,7 +16,7 @@ get_cyclecount(void) struct bintime bt; binuptime(&bt); - return (bt.frac ^ bt.sec); + return ((uint64_t)bt.sec << 56 | bt.frac >> 8); } #endif Modified: head/sys/i386/include/cpu.h == --- head/sys/i386/include/cpu.h Mon Mar 14 23:19:04 2011(r219652) +++ head/sys/i386/include/cpu.h Mon Mar 14 23:30:14 2011(r219653) @@ -67,7 +67,7 @@ void swi_vm(void *); * Return contents of in-cpu fast counter as a sort of "bogo-time" * for random-harvesting purposes. */ -static __inline u_int64_t +static __inline uint64_t get_cyclecount(void) { #if defined(I486_CPU) || defined(KLD_MODULE) @@ -75,7 +75,7 @@ get_cyclecount(void) if (!tsc_present) { binuptime(&bt); - return (bt.frac ^ bt.sec); + return ((uint64_t)bt.sec << 56 | bt.frac >> 8); } #endif return (rdtsc()); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r219656 - in head/sys: dev/bxe modules/bxe
Author: davidch Date: Tue Mar 15 01:06:27 2011 New Revision: 219656 URL: http://svn.freebsd.org/changeset/base/219656 Log: - Inadvertently committed files with +x attribute, fixed. - Minor change to info output string. Modified: head/sys/dev/bxe/if_bxe.c (contents, props changed) Directory Properties: head/sys/dev/bxe/bxe_debug.h (props changed) head/sys/dev/bxe/bxe_fw_defs.h (props changed) head/sys/dev/bxe/bxe_hsi.h (props changed) head/sys/dev/bxe/bxe_include.h (props changed) head/sys/dev/bxe/bxe_init.h (props changed) head/sys/dev/bxe/bxe_init_values_e1.h (props changed) head/sys/dev/bxe/bxe_init_values_e1h.h (props changed) head/sys/dev/bxe/bxe_link.c (props changed) head/sys/dev/bxe/bxe_link.h (props changed) head/sys/dev/bxe/bxe_reg.h (props changed) head/sys/dev/bxe/bxe_self_test.h (props changed) head/sys/dev/bxe/dump_e1.h (props changed) head/sys/dev/bxe/dump_e1h.h (props changed) head/sys/dev/bxe/hw_dump_reg_st.h (props changed) head/sys/dev/bxe/if_bxe.h (props changed) head/sys/modules/bxe/Makefile (props changed) Modified: head/sys/dev/bxe/if_bxe.c == --- head/sys/dev/bxe/if_bxe.c Mon Mar 14 23:54:19 2011(r219655) +++ head/sys/dev/bxe/if_bxe.c Tue Mar 15 01:06:27 2011(r219656) @@ -986,6 +986,7 @@ bxe_probe(device_t dev) static void bxe_print_adapter_info(struct bxe_softc *sc) { + int i = 0; DBENTER(BXE_EXTREME_LOAD); @@ -1008,17 +1009,26 @@ bxe_print_adapter_info(struct bxe_softc } /* Device features. */ - printf("); Flags ( "); + printf("); Flags ("); /* Miscellaneous flags. */ if (sc->bxe_flags & BXE_USING_MSI_FLAG) - printf("MSI "); - if (sc->bxe_flags & BXE_USING_MSIX_FLAG) - printf("MSI-X "); - if (sc->bxe_flags & BXE_SAFC_TX_FLAG) - printf("SAFC "); - if (TPA_ENABLED(sc)) - printf("TPA "); + printf("MSI"); + + if (sc->bxe_flags & BXE_USING_MSIX_FLAG) { + if (i > 0) printf("|"); + printf("MSI-X"); i++; + } + + if (sc->bxe_flags & BXE_SAFC_TX_FLAG) { + if (i > 0) printf("|"); + printf("SAFC"); i++; + } + + if (TPA_ENABLED(sc)) { + if (i > 0) printf("|"); + printf("TPA"); i++; + } printf(") Queues ("); switch (sc->multi_mode) { @@ -1032,8 +1042,9 @@ bxe_print_adapter_info(struct bxe_softc printf("Unknown"); break; } + /* Firmware versions and device features. */ - BXE_PRINTF("Firmware (%d.%d.%d); Bootcode (%d.%d.%d)\n", + printf("); Firmware (%d.%d.%d); Bootcode (%d.%d.%d)\n", BCM_5710_FW_MAJOR_VERSION, BCM_5710_FW_MINOR_VERSION, BCM_5710_FW_REVISION_VERSION, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r219646 - head/sys/x86/isa
On Mon, 14 Mar 2011, Jung-uk Kim wrote: Log: When TSC is unavailable, broken or disabled and the current timecounter has better quality than i8254 timer, use it for DELAY(9). You cannot use a random timecounter for DELAY(). DELAY() is carefully written to not use any locks, so that it doesn't deadlock when called in the "any" context from a bad console driver like syscons when syscons is called from ddb. (Bad console drivers may have their own locks which deadlock in ddb, but that is another problem.) Even the i8254 timer, which is the only timer that should be used by DELAY(), normally use locks that used to cause deadlock, but DELAY() was unbroken to bypass the locks when it is called from ddb. Cpufreq and other calibration code should use a normal timecounter via nanouptime() in all cases and never go near low level timecounters or DELAY(). There are (hopefully minor) problems getting the nanotime() initialized before it used. The dummy timecounter is just what you don't want to use. Even in this patch, it isn't clear that the low level timecounters are initialized before they are used. Modified: head/sys/x86/isa/clock.c == --- head/sys/x86/isa/clock.cMon Mar 14 19:31:43 2011(r219645) +++ head/sys/x86/isa/clock.cMon Mar 14 22:05:59 2011(r219646) @@ -245,6 +245,42 @@ getit(void) return ((high << 8) | low); } +static __inline void +delay_tsc(int n) +{ + uint64_t start, end, now; + + sched_pin(); + start = rdtsc(); + end = start + (tsc_freq * n) / 100; + do { + cpu_spinwait(); + now = rdtsc(); + } while (now < end || (now > start && end < start)); + sched_unpin(); +} You cannot call random scheduling code from DELAY(), since the scheduling code is not designed to be called in the "any" context. As it happens, sched_pin() and sched_unpin() are safe, and were already used in the TSC case. + +static __inline void +delay_timecounter(struct timecounter *tc, int n) +{ + uint64_t end, now; + u_int last, mask, u; + + mask = tc->tc_counter_mask; + last = tc->tc_get_timecount(tc) & mask; + end = tc->tc_frequency * n / 100; This depends on the delicate timecounter locking to be safe. I think it it is safe except possibly in tc_get_timecount(), for the same reasons that nanouptime() can run safely with no visible locking. tc must be the current timecounter/timehands, which is guaranteed to not be in an in-between state or become so while we are using it, despite there being no visible locking. Actually there are some minor races: - in nanouptime(), the timecounter generation is checked to avoid using a new generation if necessary, but updates of the generation count and the fileds that it protects are not properly atomic. - here, the check of the generation is missing. So this works without races when called from ddb (since ddb stops other CPUs), but has minor races in general. + now = 0; + do { + cpu_spinwait(); + u = tc->tc_get_timecount(tc) & mask; + if (u < last) + now += mask - last + u + 1; + else + now += u - last; + last = u; + } while (now < end); +} + /* * Wait "n" microseconds. * Relies on timer 1 counting down from (i8254_freq / hz) @@ -253,6 +289,7 @@ getit(void) void DELAY(int n) { + struct timecounter *tc; int delta, prev_tick, tick, ticks_left; #ifdef DELAYDEBUG @@ -262,16 +299,12 @@ DELAY(int n) #endif if (tsc_freq != 0) { - uint64_t start, end, now; - - sched_pin(); - start = rdtsc(); - end = start + (tsc_freq * n) / 100; - do { - cpu_spinwait(); - now = rdtsc(); - } while (now < end || (now > start && end < start)); - sched_unpin(); + delay_tsc(n); + return; + } + tc = timecounter; + if (tc->tc_quality > 0) { + delay_timecounter(tc, n); return; } Optimizing DELAY() was bogus. Now the loop for this is duplicatied. #ifdef DELAYDEBUG Stuff keeps accumulating or mutating above the code for testing it. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r219653 - in head/sys: arm/include i386/include
Hello! On Mon, Mar 14, 2011 at 11:30:14PM +, Jung-uk Kim wrote: > Author: jkim > Date: Mon Mar 14 23:30:14 2011 > New Revision: 219653 > URL: http://svn.freebsd.org/changeset/base/219653 > > Log: > Make get_cyclecount(9) little bit more useful where binuptime(9) is used. get_cyclecount(9) is for random harvesting, and dropping half of it's entropy in binuptime() case may not be a good idea. It's probably better to fix manpage instead, to clarify it's intended usage. Maxim Dounin > > Modified: > head/sys/arm/include/cpu.h > head/sys/i386/include/cpu.h > > Modified: head/sys/arm/include/cpu.h > == > --- head/sys/arm/include/cpu.hMon Mar 14 23:19:04 2011 > (r219652) > +++ head/sys/arm/include/cpu.hMon Mar 14 23:30:14 2011 > (r219653) > @@ -16,7 +16,7 @@ get_cyclecount(void) > struct bintime bt; > > binuptime(&bt); > - return (bt.frac ^ bt.sec); > + return ((uint64_t)bt.sec << 56 | bt.frac >> 8); > > } > #endif > > Modified: head/sys/i386/include/cpu.h > == > --- head/sys/i386/include/cpu.h Mon Mar 14 23:19:04 2011 > (r219652) > +++ head/sys/i386/include/cpu.h Mon Mar 14 23:30:14 2011 > (r219653) > @@ -67,7 +67,7 @@ voidswi_vm(void *); > * Return contents of in-cpu fast counter as a sort of "bogo-time" > * for random-harvesting purposes. > */ > -static __inline u_int64_t > +static __inline uint64_t > get_cyclecount(void) > { > #if defined(I486_CPU) || defined(KLD_MODULE) > @@ -75,7 +75,7 @@ get_cyclecount(void) > > if (!tsc_present) { > binuptime(&bt); > - return (bt.frac ^ bt.sec); > + return ((uint64_t)bt.sec << 56 | bt.frac >> 8); > } > #endif > return (rdtsc()); > ___ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org" ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r219609 - in head/sys: amd64/linux32 i386/linux
On Sun, Mar 13, 2011 at 02:58:02PM +, Dmitry Chagin wrote: > Author: dchagin > Date: Sun Mar 13 14:58:02 2011 > New Revision: 219609 > URL: http://svn.freebsd.org/changeset/base/219609 > > Log: > Enable shared page use for amd64/linux32 and i386/linux binaries. > Move signal trampoline code from the top of the stack to the shared page. > > MFC after: 2 Weeks Describe the reasons for this change in more detail: Instead of installing the signal trampoline at every exec() time copy it only once when the module loads. Requested by: netchild@ > > Modified: > head/sys/amd64/linux32/linux.h > head/sys/amd64/linux32/linux32_sysvec.c > head/sys/i386/linux/linux.h > head/sys/i386/linux/linux_sysvec.c > > Modified: head/sys/amd64/linux32/linux.h > == > --- head/sys/amd64/linux32/linux.hSun Mar 13 13:42:43 2011 > (r219608) > +++ head/sys/amd64/linux32/linux.hSun Mar 13 14:58:02 2011 > (r219609) > @@ -47,7 +47,10 @@ extern u_char linux_debug_map[]; > MALLOC_DECLARE(M_LINUX); > #endif > > -#define LINUX32_USRSTACK((1ul << 32) - PAGE_SIZE) > +#define LINUX32_MAXUSER ((1ul << 32) - PAGE_SIZE) > +#define LINUX32_SHAREDPAGE (LINUX32_MAXUSER - PAGE_SIZE) > +#define LINUX32_USRSTACKLINUX32_SHAREDPAGE > + > /* XXX 16 = sizeof(linux32_ps_strings) */ > #define LINUX32_PS_STRINGS (LINUX32_USRSTACK - 16) > #define LINUX32_MAXDSIZ (512 * 1024 * 1024) /* 512MB */ > > Modified: head/sys/amd64/linux32/linux32_sysvec.c > == > --- head/sys/amd64/linux32/linux32_sysvec.c Sun Mar 13 13:42:43 2011 > (r219608) > +++ head/sys/amd64/linux32/linux32_sysvec.c Sun Mar 13 14:58:02 2011 > (r219609) > @@ -411,8 +411,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo >* Build context to run handler in. >*/ > regs->tf_rsp = PTROUT(fp); > - regs->tf_rip = LINUX32_PS_STRINGS - *(p->p_sysent->sv_szsigcode) + > - linux_sznonrtsigcode; > + regs->tf_rip = p->p_sysent->sv_sigcode_base + linux_sznonrtsigcode; > regs->tf_rflags &= ~(PSL_T | PSL_D); > regs->tf_cs = _ucode32sel; > regs->tf_ss = _udatasel; > @@ -535,7 +534,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t >* Build context to run handler in. >*/ > regs->tf_rsp = PTROUT(fp); > - regs->tf_rip = LINUX32_PS_STRINGS - *(p->p_sysent->sv_szsigcode); > + regs->tf_rip = p->p_sysent->sv_sigcode_base; > regs->tf_rflags &= ~(PSL_T | PSL_D); > regs->tf_cs = _ucode32sel; > regs->tf_ss = _udatasel; > @@ -890,21 +889,15 @@ linux_copyout_strings(struct image_param >* Also deal with signal trampoline code for this exec type. >*/ > arginfo = (struct linux32_ps_strings *)LINUX32_PS_STRINGS; > - destp = (caddr_t)arginfo - linux_szsigcode - SPARE_USRSPACE - > - linux_szplatform - roundup((ARG_MAX - imgp->args->stringspace), > + destp = (caddr_t)arginfo - SPARE_USRSPACE - linux_szplatform - > + roundup((ARG_MAX - imgp->args->stringspace), > sizeof(char *)); > > /* > - * install sigcode > - */ > - copyout(imgp->proc->p_sysent->sv_sigcode, > - ((caddr_t)arginfo - linux_szsigcode), linux_szsigcode); > - > - /* >* Install LINUX_PLATFORM >*/ > - copyout(linux_platform, ((caddr_t)arginfo - linux_szsigcode - > - linux_szplatform), linux_szplatform); > + copyout(linux_platform, ((caddr_t)arginfo - linux_szplatform), > + linux_szplatform); > > /* >* If we have a valid auxargs ptr, prepare some room > @@ -1050,7 +1043,7 @@ struct sysentvec elf_linux_sysvec = { > .sv_minsigstksz = LINUX_MINSIGSTKSZ, > .sv_pagesize= PAGE_SIZE, > .sv_minuser = VM_MIN_ADDRESS, > - .sv_maxuser = LINUX32_USRSTACK, > + .sv_maxuser = LINUX32_MAXUSER, > .sv_usrstack= LINUX32_USRSTACK, > .sv_psstrings = LINUX32_PS_STRINGS, > .sv_stackprot = VM_PROT_ALL, > @@ -1058,12 +1051,15 @@ struct sysentvec elf_linux_sysvec = { > .sv_setregs = exec_linux_setregs, > .sv_fixlimit= linux32_fixlimit, > .sv_maxssiz = &linux32_maxssiz, > - .sv_flags = SV_ABI_LINUX | SV_ILP32 | SV_IA32, > + .sv_flags = SV_ABI_LINUX | SV_ILP32 | SV_IA32 | SV_SHP, > .sv_set_syscall_retval = cpu_set_syscall_retval, > .sv_fetch_syscall_args = linux32_fetch_syscall_args, > .sv_syscallnames = NULL, > + .sv_shared_page_base = LINUX32_SHAREDPAGE, > + .sv_shared_page_len = PAGE_SIZE, > .sv_schedtail = linux_schedtail, > }; > +INIT_SYSENTVEC(elf_sysvec, &elf_linux_sysvec); > > static char GNU_ABI_VENDOR[] = "GNU"; > static int GNULINUX_ABI_DESC = 0; > > Modified: head/sys/i386/linux/linux.h > ===