svn commit: r219727 - head/sys/vm
Author: trasz Date: Fri Mar 18 06:47:23 2011 New Revision: 219727 URL: http://svn.freebsd.org/changeset/base/219727 Log: In vm_daemon(), when iterating over all processes in the system, skip those which are not yet fully initialized (i.e. ones with p_state == PRS_NEW). Without it, we could panic in _thread_lock_flags(). Note that there may be other instances of FOREACH_PROC_IN_SYSTEM() that require similar fix. Reported by: pho, keramida Discussed with: kib Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c == --- head/sys/vm/vm_pageout.cThu Mar 17 22:47:52 2011(r219726) +++ head/sys/vm/vm_pageout.cFri Mar 18 06:47:23 2011(r219727) @@ -1281,6 +1281,8 @@ vm_pageout_oom(int shortage) FOREACH_PROC_IN_SYSTEM(p) { int breakout; + if (p-p_state != PRS_NORMAL) + continue; if (PROC_TRYLOCK(p) == 0) continue; /* @@ -1649,6 +1651,8 @@ vm_daemon() FOREACH_PROC_IN_SYSTEM(p) { vm_pindex_t limit, size; + if (p-p_state != PRS_NORMAL) + continue; /* * if this is a system process or if we have already * looked at this process, skip it. ___ 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: r219700 - head/sys/x86/x86
On Thu, 17 Mar 2011, Jung-uk Kim wrote: On Thursday 17 March 2011 04:01 pm, Peter Jeremy wrote: On 2011-Mar-16 16:44:08 +, Jung-uk Kim j...@freebsd.org wrote: Log: Revert r219676. Thanks also. For extra kudos, how about adding a similar function to allow the HPET frequency to be over-ridden. That is currently the only timecounter that does not allow the user to compensate for incorrect hardware frequencies. I really hate the idea of adjusting timecounter frequency from userland. I guess use ntpd(8) is not a good answer for some people. :-( I use ntpd, and also adjust the timecounter frequency so that: - when the timecounter is the TSC, ntpd has less work to do. It syncs faster and its adjustments are smaller, giving less jitter. - there is only 1 place to change when the TSC frequency changes. Instead of changing the driftfile and restarting ntpd to resync after every frequency change, I set the TSC as accurately as possible (normally to within 1 ppm for the current frequency setting), so that ntpd can resync automatically just as easily as it can handle small termperature-related drifts. If you use a sloppy DELAY()-based calibration or a nominal frequency, then you can easily have an error of 50 ppm or more. ntpd will take hours to resync with that. By resync, I mean that the error is usually less than a millisecond and has low variance. - the TSC it is as accurate as possible for other purposes, irrespective of whether it is used for the timecounter. 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: r219727 - head/sys/vm
On 3/17/11 11:47 PM, Edward Tomasz Napierala wrote: Author: trasz Date: Fri Mar 18 06:47:23 2011 New Revision: 219727 URL: http://svn.freebsd.org/changeset/base/219727 Log: In vm_daemon(), when iterating over all processes in the system, skip those which are not yet fully initialized (i.e. ones with p_state == PRS_NEW). Without it, we could panic in _thread_lock_flags(). Note that there may be other instances of FOREACH_PROC_IN_SYSTEM() that require similar fix. In the past each process was only put on the process list after it was fully set up. Did someone change that recently? that would be A Bad Thing (TM). Reported by: pho, keramida Discussed with: kib Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c == --- head/sys/vm/vm_pageout.cThu Mar 17 22:47:52 2011(r219726) +++ head/sys/vm/vm_pageout.cFri Mar 18 06:47:23 2011(r219727) @@ -1281,6 +1281,8 @@ vm_pageout_oom(int shortage) FOREACH_PROC_IN_SYSTEM(p) { int breakout; + if (p-p_state != PRS_NORMAL) + continue; if (PROC_TRYLOCK(p) == 0) continue; /* @@ -1649,6 +1651,8 @@ vm_daemon() FOREACH_PROC_IN_SYSTEM(p) { vm_pindex_t limit, size; + if (p-p_state != PRS_NORMAL) + continue; /* * if this is a system process or if we have already * looked at this process, skip it. ___ 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: r219728 - stable/8/sys/dev/md
Author: jh Date: Fri Mar 18 08:48:06 2011 New Revision: 219728 URL: http://svn.freebsd.org/changeset/base/219728 Log: MFC r210371: Convert md(4) to use alloc_unr(9) and alloc_unr_specific(9) for unit number allocation. The old approach had some problems such as it allowed an overflow to occur in the unit number calculation. PR: kern/122288 Modified: stable/8/sys/dev/md/md.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/dev/md/md.c == --- stable/8/sys/dev/md/md.cFri Mar 18 06:47:23 2011(r219727) +++ stable/8/sys/dev/md/md.cFri Mar 18 08:48:06 2011(r219728) @@ -132,6 +132,7 @@ static void g_md_dumpconf(struct sbuf *s static int mdunits; static struct cdev *status_dev = 0; static struct sx md_sx; +static struct unrhdr *md_uh; static d_ioctl_t mdctlioctl; @@ -757,20 +758,20 @@ mdfind(int unit) static struct md_s * mdnew(int unit, int *errp, enum md_types type) { - struct md_s *sc, *sc2; - int error, max = -1; + struct md_s *sc; + int error; *errp = 0; - LIST_FOREACH(sc2, md_softc_list, list) { - if (unit == sc2-unit) { - *errp = EBUSY; - return (NULL); - } - if (unit == -1 sc2-unit max) - max = sc2-unit; - } if (unit == -1) - unit = max + 1; + unit = alloc_unr(md_uh); + else + unit = alloc_unr_specific(md_uh, unit); + + if (unit == -1) { + *errp = EBUSY; + return (NULL); + } + sc = (struct md_s *)malloc(sizeof *sc, M_MD, M_WAITOK | M_ZERO); sc-type = type; bioq_init(sc-bio_queue); @@ -783,6 +784,7 @@ mdnew(int unit, int *errp, enum md_types return (sc); LIST_REMOVE(sc, list); mtx_destroy(sc-queue_mtx); + free_unr(md_uh, sc-unit); free(sc, M_MD); *errp = error; return (NULL); @@ -1022,6 +1024,7 @@ mddestroy(struct md_s *sc, struct thread uma_zdestroy(sc-uma); LIST_REMOVE(sc, list); + free_unr(md_uh, sc-unit); free(sc, M_MD); return (0); } @@ -1107,8 +1110,11 @@ xmdctlioctl(struct cdev *dev, u_long cmd } if (mdio-md_options MD_AUTOUNIT) sc = mdnew(-1, error, mdio-md_type); - else + else { + if (mdio-md_unit INT_MAX) + return (EINVAL); sc = mdnew(mdio-md_unit, error, mdio-md_type); + } if (sc == NULL) return (error); if (mdio-md_options MD_AUTOUNIT) @@ -1236,6 +1242,7 @@ g_md_init(struct g_class *mp __unused) mod = NULL; sx_init(md_sx, MD config lock); g_topology_unlock(); + md_uh = new_unrhdr(0, INT_MAX, NULL); #ifdef MD_ROOT_SIZE sx_xlock(md_sx); md_preloaded(mfs_root.start, sizeof(mfs_root.start)); @@ -1332,4 +1339,5 @@ g_md_fini(struct g_class *mp __unused) sx_destroy(md_sx); if (status_dev != NULL) destroy_dev(status_dev); + delete_unrhdr(md_uh); } ___ 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: r219729 - stable/8/sys/dev/md
Author: jh Date: Fri Mar 18 08:52:26 2011 New Revision: 219729 URL: http://svn.freebsd.org/changeset/base/219729 Log: MFC r210496: - Remove some extra white space. - Wrap g_md_dumpconf() prototype to 80 columns. Modified: stable/8/sys/dev/md/md.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/dev/md/md.c == --- stable/8/sys/dev/md/md.cFri Mar 18 08:48:06 2011(r219728) +++ stable/8/sys/dev/md/md.cFri Mar 18 08:52:26 2011(r219729) @@ -126,10 +126,10 @@ static g_init_t g_md_init; static g_fini_t g_md_fini; static g_start_t g_md_start; static g_access_t g_md_access; -static void g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, -struct g_consumer *cp __unused, struct g_provider *pp); +static void g_md_dumpconf(struct sbuf *sb, const char *indent, +struct g_geom *gp, struct g_consumer *cp __unused, struct g_provider *pp); -static int mdunits; +static int mdunits; static struct cdev *status_dev = 0; static struct sx md_sx; static struct unrhdr *md_uh; @@ -683,7 +683,7 @@ mdstart_swap(struct md_s *sc, struct bio #if 0 if (bootverbose || bp-bio_offset / PAGE_SIZE 17) printf(wire_count %d busy %d flags %x hold_count %d act_count %d queue %d valid %d dirty %d @ %d\n, -m-wire_count, m-busy, +m-wire_count, m-busy, m-flags, m-hold_count, m-act_count, m-queue, m-valid, m-dirty, i); #endif } @@ -793,7 +793,6 @@ mdnew(int unit, int *errp, enum md_types static void mdinit(struct md_s *sc) { - struct g_geom *gp; struct g_provider *pp; @@ -941,7 +940,7 @@ mdcreate_vnode(struct md_s *sc, struct m if (nd.ni_vp-v_type != VREG) { error = EINVAL; goto bad; - } + } error = VOP_GETATTR(nd.ni_vp, vattr, td-td_ucred); if (error != 0) goto bad; @@ -1196,7 +1195,7 @@ xmdctlioctl(struct cdev *dev, u_long cmd static int mdctlioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td) { - int error; + int error; sx_xlock(md_sx); error = xmdctlioctl(dev, cmd, addr, flags, td); @@ -1228,7 +1227,6 @@ md_preloaded(u_char *image, size_t lengt static void g_md_init(struct g_class *mp __unused) { - caddr_t mod; caddr_t c; u_char *ptr, *name, *type; @@ -1274,7 +1272,7 @@ g_md_init(struct g_class *mp __unused) } static void -g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, +g_md_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, struct g_consumer *cp __unused, struct g_provider *pp) { struct md_s *mp; ___ 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: r219730 - head/share/misc
Author: sbz (ports committer) Date: Fri Mar 18 09:03:14 2011 New Revision: 219730 URL: http://svn.freebsd.org/changeset/base/219730 Log: Add an entry for myself to committers-ports.dot. Approved by: miwi@ (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot == --- head/share/misc/committers-ports.dotFri Mar 18 08:52:26 2011 (r219729) +++ head/share/misc/committers-ports.dotFri Mar 18 09:03:14 2011 (r219730) @@ -154,6 +154,7 @@ rnoland [label=Robert Noland\nrnoland@F romain [label=Romain Tartiere\nrom...@freebsd.org\n2010/01/24] sahil [label=Sahil Tandon\nsa...@freebsd.org\n2010/04/11] sat [label=Andrew Pantyukhin\n...@freebsd.org\n2006/05/06] +sbz [label=Sofian Brabez\n...@freebsd.org\n2011/03/14] sem [label=Sergey Matveychuk\n...@freebsd.org\n2004/07/07] sergei [label=Sergei Kolobov\nser...@freebsd.org\n2003/10/21] shaun [label=Shaun Amott\nsh...@freebsd.org\n2006/06/19] @@ -276,6 +277,7 @@ itetcu - sylvio jadawin - bapt jadawin - flo +jadawin - sbz jadawin - wen joerg - netchild @@ -332,6 +334,7 @@ miwi - mandree miwi - mva miwi - nox miwi - pawel +miwi - sbz miwi - sylvio miwi - tabthorpe miwi - trasz ___ 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: r219731 - head/usr.bin/calendar/calendars
Author: sbz (ports committer) Date: Fri Mar 18 09:06:06 2011 New Revision: 219731 URL: http://svn.freebsd.org/changeset/base/219731 Log: Add myself to calendar.freebsd. Approved by: miwi@ (mentor) Modified: head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdFri Mar 18 09:03:14 2011(r219730) +++ head/usr.bin/calendar/calendars/calendar.freebsdFri Mar 18 09:06:06 2011(r219731) @@ -68,6 +68,7 @@ 02/24 Johan Karlsson jo...@freebsd.org born in Mariannelund, Sweden, 1974 02/24 Colin Percival cperc...@freebsd.org born in Burnaby, Canada, 1981 02/26 Pietro Cerutti g...@freebsd.org born in Faido, Switzerland, 1984 +05/19 Sofian Brabez s...@freebsd.org born in Toulouse, France, 1984 02/28 Daichi GOTO dai...@freebsd.org born in Shimizu Suntou, Shizuoka, Japan, 1980 03/01 Hye-Shik Chang pe...@freebsd.org born in Daejeon, Republic of Korea, 1980 03/02 Cy Schubert c...@freebsd.org born in Edmonton, Alberta, Canada, 1956 ___ 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: r219732 - in vendor/openresolv: . dist
Author: ume Date: Fri Mar 18 10:35:54 2011 New Revision: 219732 URL: http://svn.freebsd.org/changeset/base/219732 Log: Import openresolv-3.4.1. Added: vendor/openresolv/ vendor/openresolv/dist/ vendor/openresolv/dist/Makefile (contents, props changed) vendor/openresolv/dist/README vendor/openresolv/dist/configure vendor/openresolv/dist/dnsmasq.in (contents, props changed) vendor/openresolv/dist/libc.in (contents, props changed) vendor/openresolv/dist/named.in (contents, props changed) vendor/openresolv/dist/pdnsd.in (contents, props changed) vendor/openresolv/dist/resolvconf.8.in (contents, props changed) vendor/openresolv/dist/resolvconf.conf (contents, props changed) vendor/openresolv/dist/resolvconf.conf.5.in (contents, props changed) vendor/openresolv/dist/resolvconf.in (contents, props changed) vendor/openresolv/dist/unbound.in (contents, props changed) Added: vendor/openresolv/dist/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openresolv/dist/Makefile Fri Mar 18 10:35:54 2011 (r219732) @@ -0,0 +1,66 @@ +include config.mk + +NAME= openresolv +VERSION= 3.4.1 +PKG= ${NAME}-${VERSION} + +INSTALL?= install +SED?= sed + +BINMODE?= 0755 +DOCMODE?= 0644 +MANMODE?= 0444 + +RESOLVCONF=resolvconf resolvconf.8 resolvconf.conf.5 +SUBSCRIBERS= libc dnsmasq named pdnsd unbound +TARGET=${RESOLVCONF} ${SUBSCRIBERS} +SRCS= ${TARGET:C,$,.in,} # pmake +SRCS:= ${TARGET:=.in} # gmake + +SED_PREFIX=-e 's:@PREFIX@:${PREFIX}:g' +SED_SYSCONFDIR=-e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' +SED_LIBEXECDIR=-e 's:@LIBEXECDIR@:${LIBEXECDIR}:g' +SED_VARDIR=-e 's:@VARDIR@:${VARDIR}:g' +SED_RCDIR= -e 's:@RCDIR@:${RCDIR}:g' +SED_RESTARTCMD=-e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' + +.SUFFIXES: .in + +all: ${TARGET} + +.in: + ${SED} ${SED_PREFIX} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \ + ${SED_VARDIR} ${SED_RCDIR} ${SED_RESTARTCMD} \ + $ $@ + +clean: + rm -f ${TARGET} openresolv-${VERSION}.tar.bz2 + +distclean: clean + rm -f config.mk + +installdirs: + +install: ${TARGET} + ${INSTALL} -d ${DESTDIR}${SBINDIR} + ${INSTALL} -m ${BINMODE} resolvconf ${DESTDIR}${SBINDIR} + ${INSTALL} -d ${DESTDIR}${SYSCONFDIR} + test -e ${DESTDIR}${SYSCONFDIR}/resolvconf.conf || \ + ${INSTALL} -m ${DOCMODE} resolvconf.conf ${DESTDIR}${SYSCONFDIR} + ${INSTALL} -d ${DESTDIR}${LIBEXECDIR} + ${INSTALL} -m ${DOCMODE} ${SUBSCRIBERS} ${DESTDIR}${LIBEXECDIR} + ${INSTALL} -d ${DESTDIR}${MANDIR}/man8 + ${INSTALL} -m ${MANMODE} resolvconf.8 ${DESTDIR}${MANDIR}/man8 + ${INSTALL} -d ${DESTDIR}${MANDIR}/man5 + ${INSTALL} -m ${MANMODE} resolvconf.conf.5 ${DESTDIR}${MANDIR}/man5 + +import: + rm -rf /tmp/${PKG} + ${INSTALL} -d /tmp/${PKG} + cp README ${SRCS} /tmp/${PKG} + +dist: import + cp configure Makefile resolvconf.conf /tmp/${PKG} + tar cvjpf ${PKG}.tar.bz2 -C /tmp ${PKG} + rm -rf /tmp/${PKG} + ls -l ${PKG}.tar.bz2 Added: vendor/openresolv/dist/README == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openresolv/dist/README Fri Mar 18 10:35:54 2011 (r219732) @@ -0,0 +1,11 @@ +openresolv is a resolvconf implementation which manages resolv.conf +You can find the latest version at http://roy.marples.name/projects/openresolv +It is written and maintained by Roy Marples r...@marples.name + +This resolvconf implementation, along with its subscribers, work with a +POSIX compliant shell and userland utilities. It is designed to work without +tools such as sed as it *has* to work without /usr being available. + +On systems where resolvconf is expected to be used before /var/run is available +for writing, you can configure openresolv to write somewhere else, like say a +ramdisk. Added: vendor/openresolv/dist/configure == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openresolv/dist/configureFri Mar 18 10:35:54 2011 (r219732) @@ -0,0 +1,186 @@ +#!/bin/sh +# Try and be like autotools configure, but without autotools + +# Ensure that we do not inherit these from env +OS= +BUILD= +HOST= +TARGET= +RESTARTCMD= +RCDIR= + +for x; do + opt=${x%%=*} + var=${x#*=} + case $opt in + --os|OS) OS=$var;; + --with-cc|CC) CC=$var;; + --debug) DEBUG=$var;; + --disable-debug) DEBUG=no;; + --enable-debug) DEBUG=yes;; + --prefix) prefix=$var;; + --sysconfdir) SYSCONFDIR=$var;; +
svn commit: r219733 - vendor/openresolv/3.4.1
Author: ume Date: Fri Mar 18 10:39:52 2011 New Revision: 219733 URL: http://svn.freebsd.org/changeset/base/219733 Log: Tag openresolv-3.4.1. Added: vendor/openresolv/3.4.1/ - copied from r219732, vendor/openresolv/dist/ ___ 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: r219734 - head/contrib/openresolv
Author: ume Date: Fri Mar 18 10:52:23 2011 New Revision: 219734 URL: http://svn.freebsd.org/changeset/base/219734 Log: Import openresolv from vendor branch. Added: Directory Properties: head/contrib/openresolv/ (props changed) ___ 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: r219734 - head/contrib/openresolv
On Fri, 18 Mar 2011, Hajimu UMEMOTO wrote: Author: ume Date: Fri Mar 18 10:52:23 2011 New Revision: 219734 URL: http://svn.freebsd.org/changeset/base/219734 Log: Import openresolv from vendor branch. Added: Directory Properties: head/contrib/openresolv/ (props changed) Thanks a lot! -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. ___ 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: r219735 - head/contrib/openresolv
Author: ume Date: Fri Mar 18 12:07:53 2011 New Revision: 219735 URL: http://svn.freebsd.org/changeset/base/219735 Log: Remove contrib/openresolv. Helped by:jhb Deleted: head/contrib/openresolv/ ___ 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: r219736 - head/contrib/openresolv
Author: ume Date: Fri Mar 18 12:09:27 2011 New Revision: 219736 URL: http://svn.freebsd.org/changeset/base/219736 Log: Import openresolv from vendor branch, actually. Helped by:jhb Added: head/contrib/openresolv/ - copied from r219735, vendor/openresolv/dist/ ___ 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: r219737 - head/sys/dev/pci
Author: jhb Date: Fri Mar 18 12:13:04 2011 New Revision: 219737 URL: http://svn.freebsd.org/changeset/base/219737 Log: Fix a few issues with HyperTransport devices and MSI interrupts: - Always enable the HyperTransport MSI mapping window for HyperTransport to PCI bridges (these show up as HyperTransport slave devices). The mapping windows in PCI-PCI bridges are enabled by existing code in the PCI-PCI bridge driver as MSI requests propagate up the device tree, but Host-PCI bridges don't really show up in that tree. - If the PCI device at domain 0 bus 0 slot 0 function 0 is not a HyperTransport device, then blacklist MSI on any other HT devices in the system. Linux has a similar quirk. PR: kern/155442 Tested by:Zack Dannar zdannar of gmail MFC after:1 week Modified: head/sys/dev/pci/pci.c head/sys/dev/pci/pcivar.h Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Fri Mar 18 12:09:27 2011(r219736) +++ head/sys/dev/pci/pci.c Fri Mar 18 12:13:04 2011(r219737) @@ -236,7 +236,7 @@ struct pci_quirk pci_quirks[] = { struct devlist pci_devq; uint32_t pci_generation; uint32_t pci_numdevs = 0; -static int pcie_chipset, pcix_chipset; +static int ht_chipset, pcie_chipset, pcix_chipset; /* sysctl vars */ SYSCTL_NODE(_hw, OID_AUTO, pci, CTLFLAG_RD, 0, PCI bus tuning parameters); @@ -612,10 +612,24 @@ pci_read_extcap(device_t pcib, pcicfgreg cfg-pp.pp_data = ptr + PCIR_POWER_DATA; } break; -#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) case PCIY_HT: /* HyperTransport */ /* Determine HT-specific capability type. */ val = REG(ptr + PCIR_HT_COMMAND, 2); + + if ((val 0xe000) == PCIM_HTCAP_SLAVE) { + cfg-ht.ht_slave = ptr; + + /* +* If device 0:0:0:0 is an HT slave, +* then this is an HT chipset and MSI +* should be enabled for HT devices. +*/ + if (cfg-domain == 0 cfg-bus == 0 + cfg-slot == 0 cfg-func == 0) + ht_chipset = 1; + } + +#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) switch (val PCIM_HTCMD_CAP_MASK) { case PCIM_HTCAP_MSI_MAPPING: if (!(val PCIM_HTCMD_MSI_FIXED)) { @@ -627,7 +641,7 @@ pci_read_extcap(device_t pcib, pcicfgreg 4); if (addr != MSI_INTEL_ADDR_BASE) device_printf(pcib, - HT Bridge at pci%d:%d:%d:%d has non-default MSI window 0x%llx\n, + HT device at pci%d:%d:%d:%d has non-default MSI window 0x%llx\n, cfg-domain, cfg-bus, cfg-slot, cfg-func, (long long)addr); @@ -639,8 +653,8 @@ pci_read_extcap(device_t pcib, pcicfgreg cfg-ht.ht_msiaddr = addr; break; } - break; #endif + break; case PCIY_MSI: /* PCI MSI */ cfg-msi.msi_location = ptr; cfg-msi.msi_ctrl = REG(ptr + PCIR_MSI_CTRL, 2); @@ -696,6 +710,24 @@ pci_read_extcap(device_t pcib, pcicfgreg break; } } + + +#if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) + /* +* Enable the MSI mapping window for all HyperTransport +* slaves. PCI-PCI bridges have their windows enabled via +* PCIB_MAP_MSI(). +*/ + if (cfg-ht.ht_slave != 0 cfg-ht.ht_msimap != 0 + !(cfg-ht.ht_msictrl PCIM_HTCMD_MSI_ENABLE)) { + device_printf(pcib, + Enabling MSI window for HyperTransport slave at pci%d:%d:%d:%d\n, + cfg-domain, cfg-bus, cfg-slot, cfg-func); +cfg-ht.ht_msictrl |= PCIM_HTCMD_MSI_ENABLE; +WREG(cfg-ht.ht_msimap + PCIR_HT_COMMAND, cfg-ht.ht_msictrl, +2); + } +#endif /* REG and WREG use carry through to next functions */ } @@ -1837,6 +1869,13 @@ pci_msi_device_blacklisted(device_t dev) q-type == PCI_QUIRK_DISABLE_MSI) return (1); } + + /* +* Blacklist HyperTransport devices if the
svn commit: r219738 - in head: etc/mtree sbin sbin/resolvconf
Author: ume Date: Fri Mar 18 12:18:52 2011 New Revision: 219738 URL: http://svn.freebsd.org/changeset/base/219738 Log: Add resolvconf(8) which manages resolv.conf. Added: head/sbin/resolvconf/ head/sbin/resolvconf/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.root.dist head/sbin/Makefile Modified: head/etc/mtree/BSD.root.dist == --- head/etc/mtree/BSD.root.distFri Mar 18 12:13:04 2011 (r219737) +++ head/etc/mtree/BSD.root.distFri Mar 18 12:18:52 2011 (r219738) @@ -72,6 +72,8 @@ .. .. libexec +resolvconf +.. .. media .. Modified: head/sbin/Makefile == --- head/sbin/Makefile Fri Mar 18 12:13:04 2011(r219737) +++ head/sbin/Makefile Fri Mar 18 12:18:52 2011(r219738) @@ -62,6 +62,7 @@ SUBDIR=adjkerntz \ rcorder \ reboot \ recoverdisk \ + resolvconf \ restore \ route \ savecore \ Added: head/sbin/resolvconf/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/resolvconf/Makefile Fri Mar 18 12:18:52 2011 (r219738) @@ -0,0 +1,37 @@ +# $FreeBSD$ + +DIST= ${.CURDIR}/../../contrib/openresolv +.PATH: ${DIST} + +SCRIPTS= resolvconf + +FILES= libc dnsmasq named pdnsd unbound +FILESDIR= /libexec/resolvconf + +MAN= resolvconf.conf.5 resolvconf.8 + +CLEANFILES=${SCRIPTS} ${FILES} ${MAN} + +SYSCONFDIR=/etc +RCDIR= ${SYSCONFDIR}/rc.d +VARDIR=/var/run/resolvconf + +# We don't assume to restart the services in /sbin. So, though +# our service(8) is in /usr/sbin, we can use it, here. +CMD1= \1 onestatus /dev/null 2\1 +CMD2= \1 restart +RESTARTCMD=/usr/sbin/service ${CMD1} \\ /usr/sbin/service ${CMD2} + +.for f in ${SCRIPTS} ${FILES} ${MAN} +${f}: ${f}.in + sed -e 's:@PREFIX@::g' \ + -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g' \ + -e 's:@LIBEXECDIR@:${FILESDIR}:g' \ + -e 's:@VARDIR@:${VARDIR}:g' \ + -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g' \ + -e 's:@RCDIR@:${RCDIR}:g' \ + -e 's: vpn : ng[0-9]*:g' \ + ${DIST}/$@.in $@ +.endfor + +.include bsd.prog.mk ___ 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: r219739 - head/sbin/dhclient
Author: ume Date: Fri Mar 18 12:23:20 2011 New Revision: 219739 URL: http://svn.freebsd.org/changeset/base/219739 Log: Use resolvconf(8) to update /etc/resolv.conf. If you don't want to use resolvconf(8) to update /etc/resolv.conf, you can put resolvconf_enable=NO into /etc/dhclient-enter-hooks. Modified: head/sbin/dhclient/dhclient-script Modified: head/sbin/dhclient/dhclient-script == --- head/sbin/dhclient/dhclient-script Fri Mar 18 12:18:52 2011 (r219738) +++ head/sbin/dhclient/dhclient-script Fri Mar 18 12:23:20 2011 (r219739) @@ -216,29 +216,40 @@ add_new_resolv_conf() { cat /etc/resolv.conf.tail $tmpres fi - # When resolv.conf is not changed actually, we don't - # need to update it. - # If /usr is not mounted yet, we cannot use cmp, then - # the following test fails. In such case, we simply - # ignore an error and do update resolv.conf. - if cmp -s $tmpres /etc/resolv.conf; then - rm -f $tmpres - return 0 - fi 2/dev/null - - # In case (e.g. during OpenBSD installs) /etc/resolv.conf - # is a symbolic link, take care to preserve the link and write - # the new data in the correct location. + case $resolvconf_enable in + # no, false, off, or 0 + [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) + # When resolv.conf is not changed actually, we don't + # need to update it. + # If /usr is not mounted yet, we cannot use cmp, then + # the following test fails. In such case, we simply + # ignore an error and do update resolv.conf. + if cmp -s $tmpres /etc/resolv.conf; then + rm -f $tmpres + return 0 + fi 2/dev/null + + # In case (e.g. during OpenBSD installs) + # /etc/resolv.conf is a symbolic link, take + # care to preserve the link and write the new + # data in the correct location. - if [ -f /etc/resolv.conf ]; then - cat /etc/resolv.conf /etc/resolv.conf.save - fi - cat $tmpres /etc/resolv.conf - rm -f $tmpres + if [ -f /etc/resolv.conf ]; then + cat /etc/resolv.conf /etc/resolv.conf.save + fi + cat $tmpres /etc/resolv.conf + + # Try to ensure correct ownership and permissions. + chown -RL root:wheel /etc/resolv.conf + chmod -RL 644 /etc/resolv.conf + ;; - # Try to ensure correct ownership and permissions. - chown -RL root:wheel /etc/resolv.conf - chmod -RL 644 /etc/resolv.conf + *) + /sbin/resolvconf -a ${interface} $tmpres + ;; + esac + + rm -f $tmpres return 0 fi @@ -296,6 +307,8 @@ if [ -f /etc/dhclient-enter-hooks ]; the fi fi +: ${resolvconf_enable=YES} + case $reason in MEDIUM) eval $IFCONFIG $interface $medium @@ -349,9 +362,17 @@ EXPIRE|FAIL) # XXX Why add alias we just deleted above? add_new_alias if is_default_interface; then - if [ -f /etc/resolv.conf.save ]; then - cat /etc/resolv.conf.save /etc/resolv.conf - fi + case $resolvconf_enable in + # no, false, off, or 0 + [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) + if [ -f /etc/resolv.conf.save ]; then + cat /etc/resolv.conf.save /etc/resolv.conf + fi + ;; + *) + /sbin/resolvconf -d ${interface} + ;; + esac fi ;; ___ 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: r219737 - head/sys/dev/pci
On 03/18/11 07:13, John Baldwin wrote: Author: jhb Date: Fri Mar 18 12:13:04 2011 New Revision: 219737 URL: http://svn.freebsd.org/changeset/base/219737 Log: Fix a few issues with HyperTransport devices and MSI interrupts: - Always enable the HyperTransport MSI mapping window for HyperTransport to PCI bridges (these show up as HyperTransport slave devices). The mapping windows in PCI-PCI bridges are enabled by existing code in the PCI-PCI bridge driver as MSI requests propagate up the device tree, but Host-PCI bridges don't really show up in that tree. - If the PCI device at domain 0 bus 0 slot 0 function 0 is not a HyperTransport device, then blacklist MSI on any other HT devices in the system. Linux has a similar quirk. I think this last change only works on x86 systems. My powerpc desktop has hypertransport and MSI, but PCI bus 0 (the PCI-E bus with the graphics card in it) is not connected over hypertransport and has nothing to do with it. Also, the root host-HT bridge doesn't show up in PCI space at all. -Nathan ___ 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: r219737 - head/sys/dev/pci
On Friday, March 18, 2011 8:48:28 am Nathan Whitehorn wrote: On 03/18/11 07:13, John Baldwin wrote: Author: jhb Date: Fri Mar 18 12:13:04 2011 New Revision: 219737 URL: http://svn.freebsd.org/changeset/base/219737 Log: Fix a few issues with HyperTransport devices and MSI interrupts: - Always enable the HyperTransport MSI mapping window for HyperTransport to PCI bridges (these show up as HyperTransport slave devices). The mapping windows in PCI-PCI bridges are enabled by existing code in the PCI-PCI bridge driver as MSI requests propagate up the device tree, but Host-PCI bridges don't really show up in that tree. - If the PCI device at domain 0 bus 0 slot 0 function 0 is not a HyperTransport device, then blacklist MSI on any other HT devices in the system. Linux has a similar quirk. I think this last change only works on x86 systems. My powerpc desktop has hypertransport and MSI, but PCI bus 0 (the PCI-E bus with the graphics card in it) is not connected over hypertransport and has nothing to do with it. Also, the root host-HT bridge doesn't show up in PCI space at all. Hmm, that is likely true. Rereading the Linux code, this last quirk only applies to Nvidia chipsets. Bah, I also botched it, so I'll remove that part for now. Only the first fix was needed for the PR. -- 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: r219740 - head/sys/dev/pci
Author: jhb Date: Fri Mar 18 14:06:12 2011 New Revision: 219740 URL: http://svn.freebsd.org/changeset/base/219740 Log: Partially revert previous change. Drop the quirk to disable MSI for HT chipsets that do not have an HT slave at 0:0:0:0. The Linux quirk is actually specific to Nvidia chipsets and the check I had added was in the wrong place. Prodded by: nathanw Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Fri Mar 18 12:23:20 2011(r219739) +++ head/sys/dev/pci/pci.c Fri Mar 18 14:06:12 2011(r219740) @@ -236,7 +236,7 @@ struct pci_quirk pci_quirks[] = { struct devlist pci_devq; uint32_t pci_generation; uint32_t pci_numdevs = 0; -static int ht_chipset, pcie_chipset, pcix_chipset; +static int pcie_chipset, pcix_chipset; /* sysctl vars */ SYSCTL_NODE(_hw, OID_AUTO, pci, CTLFLAG_RD, 0, PCI bus tuning parameters); @@ -616,19 +616,9 @@ pci_read_extcap(device_t pcib, pcicfgreg /* Determine HT-specific capability type. */ val = REG(ptr + PCIR_HT_COMMAND, 2); - if ((val 0xe000) == PCIM_HTCAP_SLAVE) { + if ((val 0xe000) == PCIM_HTCAP_SLAVE) cfg-ht.ht_slave = ptr; - /* -* If device 0:0:0:0 is an HT slave, -* then this is an HT chipset and MSI -* should be enabled for HT devices. -*/ - if (cfg-domain == 0 cfg-bus == 0 - cfg-slot == 0 cfg-func == 0) - ht_chipset = 1; - } - #if defined(__i386__) || defined(__amd64__) || defined(__powerpc__) switch (val PCIM_HTCMD_CAP_MASK) { case PCIM_HTCAP_MSI_MAPPING: @@ -1869,13 +1859,6 @@ pci_msi_device_blacklisted(device_t dev) q-type == PCI_QUIRK_DISABLE_MSI) return (1); } - - /* -* Blacklist HyperTransport devices if the device at 0:0:0:0 -* is not a HyperTransport slave. -*/ - if (!ht_chipset pci_find_extcap(dev, PCIY_HT, NULL) == 0) - return (1); return (0); } ___ 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: r219712 - head/sys/ufs/ufs
On Fri, Mar 18, 2011 at 12:37:41AM +1100, Bruce Evans wrote: On Thu, 17 Mar 2011, Konstantin Belousov wrote: Log: Remove the #if defined(FFS) || defined(IFS) braces around the calls to ffs_snapgone(). ufs.ko module is not build with FFS define, causing snapshot inode number slots in superblock never be freed, as well as a reference on the snapshot vnode. IFS was removed several years ago, and UFS/FFS separation was not maintained for real. Reported, analyzed and tested by: Yamagi Burmeister lists yamagi org MFC after: 3 days This seems to leave FFS correctly unused. Most options for file systems are put in opt_dontuse.h to inhibit bugs like this (but I never figured out a way to generate a compile time error if an option in there is used). The FFS option is special. It should not be special. It was moved from opt_dontuse.h to opt_ffs_broken_fixme.h in 2001 to avoid a collateral bug: the FFS/UFS split doesn't work, but was used by ext2fs, and it is a layering violation for UFS to call ffs_snapgone() in FFS, and this broke the configuration with EXT2FS (and UFS) but not FFS; this was hacked around by the ifdefs. ext2fs was decoupled from UFS in 2002, so the ifdefs became unnecessary, but they remained to break the module. opt_ffs_broken_fixme.h also became unnecessary in 2002, but remains to generate history lessons :-). The ifdef on IFS was even more bogus, since IFS doesn't exist and has no vestiges in conf/*. I went ahead and implemented UFS_SNAPONE() and removal of opt_ffs_broken_fixme.h. diff --git a/sys/conf/options b/sys/conf/options index 7f92258..8207800 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -200,6 +200,7 @@ CD9660 opt_dontuse.h CODA opt_dontuse.h EXT2FS opt_dontuse.h FDESCFSopt_dontuse.h +FFSopt_dontuse.h HPFS opt_dontuse.h MSDOSFSopt_dontuse.h NTFS opt_dontuse.h @@ -217,9 +218,6 @@ UNIONFS opt_dontuse.h # Pseudofs debugging PSEUDOFS_TRACE opt_pseudofs.h -# Broken - ffs_snapshot() dependency from ufs_lookup() :-( -FFSopt_ffs_broken_fixme.h - # In-kernel GSS-API KGSSAPIopt_kgssapi.h KGSSAPI_DEBUG opt_kgssapi.h diff --git a/sys/modules/ufs/Makefile b/sys/modules/ufs/Makefile index 0fe7b4c..652856c 100644 --- a/sys/modules/ufs/Makefile +++ b/sys/modules/ufs/Makefile @@ -3,8 +3,7 @@ .PATH: ${.CURDIR}/../../ufs/ufs ${.CURDIR}/../../ufs/ffs KMOD= ufs -SRCS= opt_ddb.h opt_directio.h opt_ffs.h opt_ffs_broken_fixme.h \ - opt_quota.h opt_suiddir.h opt_ufs.h \ +SRCS= opt_ddb.h opt_directio.h opt_ffs.h opt_quota.h opt_suiddir.h opt_ufs.h \ vnode_if.h ufs_acl.c ufs_bmap.c ufs_dirhash.c ufs_extattr.c \ ufs_gjournal.c ufs_inode.c ufs_lookup.c ufs_quota.c ufs_vfsops.c \ ufs_vnops.c ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_snapshot.c \ diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index f578382..573c364 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -797,6 +797,7 @@ ffs_mountfs(devvp, mp, td) ump-um_vfree = ffs_vfree; ump-um_ifree = ffs_ifree; ump-um_rdonly = ffs_rdonly; + ump-um_snapgone = ffs_snapgone; mtx_init(UFS_MTX(ump), FFS, FFS Lock, MTX_DEF); bcopy(bp-b_data, ump-um_fs, (u_int)fs-fs_sbsize); if (fs-fs_sbsize SBLOCKSIZE) diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index d819f69..45ebea1 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -37,7 +37,6 @@ #include sys/cdefs.h __FBSDID($FreeBSD$); -#include opt_ffs_broken_fixme.h #include opt_ufs.h #include opt_quota.h @@ -1253,7 +1252,7 @@ out: * when last open reference goes away. */ if (ip != 0 (ip-i_flags SF_SNAPSHOT) != 0 ip-i_effnlink == 0) - ffs_snapgone(ip); + UFS_SNAPGONE(ip); return (error); } @@ -1316,7 +1315,7 @@ ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir) * when last open reference goes away. */ if ((oip-i_flags SF_SNAPSHOT) != 0 oip-i_effnlink == 0) - ffs_snapgone(oip); + UFS_SNAPGONE(oip); return (error); } diff --git a/sys/ufs/ufs/ufsmount.h b/sys/ufs/ufs/ufsmount.h index b13db40..c2cfcfb 100644 --- a/sys/ufs/ufs/ufsmount.h +++ b/sys/ufs/ufs/ufsmount.h @@ -104,6 +104,7 @@ struct ufsmount { int (*um_vfree)(struct vnode *, ino_t, int); void(*um_ifree)(struct ufsmount *, struct inode *); int (*um_rdonly)(struct inode *); + void(*um_snapgone)(struct inode *); }; #define UFS_BALLOC(aa, bb, cc, dd, ee, ff) VFSTOUFS((aa)-v_mount)-um_balloc(aa, bb, cc, dd, ee, ff) @@ -114,6 +115,7 @@ struct ufsmount { #define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)-v_mount)-um_vfree(aa, bb, cc) #define UFS_IFREE(aa, bb) ((aa)-um_ifree(aa, bb)) #defineUFS_RDONLY(aa)
svn commit: r219741 - in head/sys/ia64: ia64 include
Author: marcel Date: Fri Mar 18 15:36:28 2011 New Revision: 219741 URL: http://svn.freebsd.org/changeset/base/219741 Log: Use VM_MAXUSER_ADDRESS rather than VM_MAX_ADDRESS when we talk about the bounds of user space. Redefine VM_MAX_ADDRESS as ~0UL, even though it's not used anywhere in the source tree. Modified: head/sys/ia64/ia64/genassym.c head/sys/ia64/ia64/machdep.c head/sys/ia64/ia64/support.S head/sys/ia64/ia64/trap.c head/sys/ia64/ia64/unaligned.c head/sys/ia64/include/vmparam.h Modified: head/sys/ia64/ia64/genassym.c == --- head/sys/ia64/ia64/genassym.c Fri Mar 18 14:06:12 2011 (r219740) +++ head/sys/ia64/ia64/genassym.c Fri Mar 18 15:36:28 2011 (r219741) @@ -116,4 +116,4 @@ ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); ASSYM(UC_MCONTEXT, offsetof(ucontext_t, uc_mcontext)); -ASSYM(VM_MAX_ADDRESS, VM_MAX_ADDRESS); +ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS); Modified: head/sys/ia64/ia64/machdep.c == --- head/sys/ia64/ia64/machdep.cFri Mar 18 14:06:12 2011 (r219740) +++ head/sys/ia64/ia64/machdep.cFri Mar 18 15:36:28 2011 (r219741) @@ -601,12 +601,12 @@ map_gateway_page(void) pte |= (uint64_t)ia64_gateway_page PTE_PPN_MASK; __asm __volatile(ptr.d %0,%1; ptr.i %0,%1 :: - r(VM_MAX_ADDRESS), r(PAGE_SHIFT 2)); + r(VM_MAXUSER_ADDRESS), r(PAGE_SHIFT 2)); __asm __volatile(mov %0=psr : =r(psr)); __asm __volatile(rsm psr.ic|psr.i); ia64_srlz_i(); - ia64_set_ifa(VM_MAX_ADDRESS); + ia64_set_ifa(VM_MAXUSER_ADDRESS); ia64_set_itir(PAGE_SHIFT 2); ia64_srlz_d(); __asm __volatile(itr.d dtr[%0]=%1 :: r(3), r(pte)); @@ -616,7 +616,7 @@ map_gateway_page(void) ia64_srlz_i(); /* Expose the mapping to userland in ar.k5 */ - ia64_set_k5(VM_MAX_ADDRESS); + ia64_set_k5(VM_MAXUSER_ADDRESS); } static u_int Modified: head/sys/ia64/ia64/support.S == --- head/sys/ia64/ia64/support.SFri Mar 18 14:06:12 2011 (r219740) +++ head/sys/ia64/ia64/support.SFri Mar 18 15:36:28 2011 (r219741) @@ -199,7 +199,7 @@ END(fusufault) ENTRY(casuword, 3) { .mlx add r15=PC_CURTHREAD,r13 - movlr14=VM_MAX_ADDRESS + movlr14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -249,7 +249,7 @@ END(casuword) ENTRY(casuword32, 3) { .mlx add r15=PC_CURTHREAD,r13 - movlr14=VM_MAX_ADDRESS + movlr14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -303,7 +303,7 @@ END(casuword32) ENTRY(subyte, 2) { .mlx add r15=PC_CURTHREAD,r13 - movlr14=VM_MAX_ADDRESS + movlr14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -349,7 +349,7 @@ END(subyte) ENTRY(suword16, 2) { .mlx add r15=PC_CURTHREAD,r13 - movlr14=VM_MAX_ADDRESS + movlr14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -395,7 +395,7 @@ END(suword16) ENTRY(suword32, 2) { .mlx add r15=PC_CURTHREAD,r13 - movlr14=VM_MAX_ADDRESS + movlr14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -442,7 +442,7 @@ ENTRY(suword64, 2) XENTRY(suword) { .mlx add r15=PC_CURTHREAD,r13 - movlr14=VM_MAX_ADDRESS + movlr14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -496,7 +496,7 @@ END(suword64) ENTRY(fubyte, 1) { .mlx add r15=PC_CURTHREAD,r13 - movlr14=VM_MAX_ADDRESS + movlr14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -542,7 +542,7 @@ END(fubyte) ENTRY(fuword16, 2) { .mlx add r15=PC_CURTHREAD,r13 - movlr14=VM_MAX_ADDRESS + movlr14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -588,7 +588,7 @@ END(fuword16) ENTRY(fuword32, 2) { .mlx add r15=PC_CURTHREAD,r13 - movlr14=VM_MAX_ADDRESS + movlr14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -635,7 +635,7 @@ ENTRY(fuword64, 2) XENTRY(fuword) { .mlx add r15=PC_CURTHREAD,r13 - movlr14=VM_MAX_ADDRESS + movlr14=VM_MAXUSER_ADDRESS ;; } { .mib @@ -750,7 +750,7 @@ ENTRY(copyinstr, 4) mov loc1=rp .body - movlloc2=VM_MAX_ADDRESS // make sure that src addr + movlloc2=VM_MAXUSER_ADDRESS // make sure that src addr ;; cmp.geu p6,p0=in0,loc2 // is in user space.
Re: svn commit: r219712 - head/sys/ufs/ufs
On Fri, 18 Mar 2011, Kostik Belousov wrote: On Fri, Mar 18, 2011 at 12:37:41AM +1100, Bruce Evans wrote: On Thu, 17 Mar 2011, Konstantin Belousov wrote: Log: Remove the #if defined(FFS) || defined(IFS) braces around the calls to ffs_snapgone(). ufs.ko module is not build with FFS define, causing snapshot inode number slots in superblock never be freed, as well as a reference on the snapshot vnode. IFS was removed several years ago, and UFS/FFS separation was not maintained for real. Reported, analyzed and tested by: Yamagi Burmeister lists yamagi org MFC after: 3 days This seems to leave FFS correctly unused. Most options for file systems are put in opt_dontuse.h to inhibit bugs like this (but I never figured ... the module. opt_ffs_broken_fixme.h also became unnecessary in 2002, but remains to generate history lessons :-). I went ahead and implemented UFS_SNAPONE() and removal of opt_ffs_broken_fixme.h. Thanks. At first I thought that UFS_SNAPGONE() was pointless, since there are lots of other layering violations and the macros don't make the spit really work. But ffs_snapgone() was the only function named ffs_*() called from ufs. There are just 2 other references to ffs_*() in ufs. Both are in comments in ufs_inode.c. But there are many other layering violations which are not so obvious because the ffs functions are not spelled ffs_*(). Many are spelled softdep_*(). Soft updates are only implemented for ffs and even their stubs were only implemented for ffs, so ufs without ffs cannot compile. The ufs files are actually selected by the ffs option in conf/files, so ufs without ffs is almost impossible anyway. The ffs module is misnamed ufs, and it links all the ffs and ufs files, so if there were a ext2fs, ifs, lfs or otherfs using ufs, especially if these were in modules there would probably be multiple instances ifs ufs. This may even be the best way -- fork ufs by creating separate objects from common sources with a few ifdefs, so that you don't have lots of runtime tests and function pointers and extra source code to initialize the function pointers... 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
svn commit: r219744 - stable/8/sys/ufs/ufs
Author: jhb Date: Fri Mar 18 17:15:10 2011 New Revision: 219744 URL: http://svn.freebsd.org/changeset/base/219744 Log: MFC 219384: The UFS dirhash code was attempting to update shared state in the dirhash from multiple threads while holding a shared lock during a lookup operation. This could result in incorrect ENOENT failures which could then be permanently stored in the name cache. Specifically, the dirhash code optimizes the case that a single thread is walking a directory sequentially opening (or stat'ing) each file. It uses state in the dirhash structure to determine if a given lookup is using the optimization. If the optimization fails, it disables it and restarts the lookup. The problem arises when two threads both attempt the optimization and fail. The first thread will restart the loop, but the second thread will incorrectly think that it did not try the optimization and will only examine a subset of the directory entires in its hash chain. As a result, it may fail to find its directory entry and incorrectly fail with ENOENT. To make this safe for use with shared locks, simplify the state stored in the dirhash and move some of the state (the part that determines if the current thread is trying the optimization) into a local variable. One result is that we will now try the optimization more often. We still update the value under the shared lock, but it is a single atomic store similar to i_diroff that is stored in UFS directory i-nodes for the non-dirhash lookup. Modified: stable/8/sys/ufs/ufs/dirhash.h stable/8/sys/ufs/ufs/ufs_dirhash.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/dirhash.h == --- stable/8/sys/ufs/ufs/dirhash.h Fri Mar 18 16:13:08 2011 (r219743) +++ stable/8/sys/ufs/ufs/dirhash.h Fri Mar 18 17:15:10 2011 (r219744) @@ -98,7 +98,6 @@ struct dirhash { int dh_dirblks; /* number of DIRBLKSIZ blocks in dir */ int dh_firstfree[DH_NFSTATS + 1]; /* first blk with N words free */ - int dh_seqopt; /* sequential access optimisation enabled */ doff_t dh_seqoff; /* sequential access optimisation offset */ int dh_score; /* access count for this dirhash */ Modified: stable/8/sys/ufs/ufs/ufs_dirhash.c == --- stable/8/sys/ufs/ufs/ufs_dirhash.c Fri Mar 18 16:13:08 2011 (r219743) +++ stable/8/sys/ufs/ufs/ufs_dirhash.c Fri Mar 18 17:15:10 2011 (r219744) @@ -403,8 +403,7 @@ ufsdirhash_build(struct inode *ip) dh-dh_firstfree[i] = -1; dh-dh_firstfree[DH_NFSTATS] = 0; dh-dh_hused = 0; - dh-dh_seqopt = 0; - dh-dh_seqoff = 0; + dh-dh_seqoff = -1; dh-dh_score = DH_SCOREINIT; dh-dh_lastused = time_second; @@ -552,7 +551,7 @@ ufsdirhash_lookup(struct inode *ip, char struct direct *dp; struct vnode *vp; struct buf *bp; - doff_t blkoff, bmask, offset, prevoff; + doff_t blkoff, bmask, offset, prevoff, seqoff; int i, slot; int error; @@ -592,29 +591,30 @@ ufsdirhash_lookup(struct inode *ip, char bmask = vp-v_mount-mnt_stat.f_iosize - 1; blkoff = -1; bp = NULL; + seqoff = dh-dh_seqoff; restart: slot = ufsdirhash_hash(dh, name, namelen); - if (dh-dh_seqopt) { + if (seqoff != -1) { /* -* Sequential access optimisation. dh_seqoff contains the +* Sequential access optimisation. seqoff contains the * offset of the directory entry immediately following * the last entry that was looked up. Check if this offset * appears in the hash chain for the name we are looking for. */ for (i = slot; (offset = DH_ENTRY(dh, i)) != DIRHASH_EMPTY; i = WRAPINCR(i, dh-dh_hlen)) - if (offset == dh-dh_seqoff) + if (offset == seqoff) break; - if (offset == dh-dh_seqoff) { + if (offset == seqoff) { /* * We found an entry with the expected offset. This * is probably the entry we want, but if not, the -* code below will turn off seqopt and retry. +* code below will retry. */ slot = i; - } else - dh-dh_seqopt = 0; + } else +
svn commit: r219745 - stable/7/sys/ufs/ufs
Author: jhb Date: Fri Mar 18 17:15:46 2011 New Revision: 219745 URL: http://svn.freebsd.org/changeset/base/219745 Log: MFC 219384: The UFS dirhash code was attempting to update shared state in the dirhash from multiple threads while holding a shared lock during a lookup operation. This could result in incorrect ENOENT failures which could then be permanently stored in the name cache. Specifically, the dirhash code optimizes the case that a single thread is walking a directory sequentially opening (or stat'ing) each file. It uses state in the dirhash structure to determine if a given lookup is using the optimization. If the optimization fails, it disables it and restarts the lookup. The problem arises when two threads both attempt the optimization and fail. The first thread will restart the loop, but the second thread will incorrectly think that it did not try the optimization and will only examine a subset of the directory entires in its hash chain. As a result, it may fail to find its directory entry and incorrectly fail with ENOENT. To make this safe for use with shared locks, simplify the state stored in the dirhash and move some of the state (the part that determines if the current thread is trying the optimization) into a local variable. One result is that we will now try the optimization more often. We still update the value under the shared lock, but it is a single atomic store similar to i_diroff that is stored in UFS directory i-nodes for the non-dirhash lookup. Modified: stable/7/sys/ufs/ufs/dirhash.h stable/7/sys/ufs/ufs/ufs_dirhash.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/ufs/ufs/dirhash.h == --- stable/7/sys/ufs/ufs/dirhash.h Fri Mar 18 17:15:10 2011 (r219744) +++ stable/7/sys/ufs/ufs/dirhash.h Fri Mar 18 17:15:46 2011 (r219745) @@ -98,7 +98,6 @@ struct dirhash { int dh_dirblks; /* number of DIRBLKSIZ blocks in dir */ int dh_firstfree[DH_NFSTATS + 1]; /* first blk with N words free */ - int dh_seqopt; /* sequential access optimisation enabled */ doff_t dh_seqoff; /* sequential access optimisation offset */ int dh_score; /* access count for this dirhash */ Modified: stable/7/sys/ufs/ufs/ufs_dirhash.c == --- stable/7/sys/ufs/ufs/ufs_dirhash.c Fri Mar 18 17:15:10 2011 (r219744) +++ stable/7/sys/ufs/ufs/ufs_dirhash.c Fri Mar 18 17:15:46 2011 (r219745) @@ -394,8 +394,7 @@ ufsdirhash_build(struct inode *ip) dh-dh_firstfree[i] = -1; dh-dh_firstfree[DH_NFSTATS] = 0; dh-dh_hused = 0; - dh-dh_seqopt = 0; - dh-dh_seqoff = 0; + dh-dh_seqoff = -1; dh-dh_score = DH_SCOREINIT; dh-dh_lastused = time_second; @@ -543,7 +542,7 @@ ufsdirhash_lookup(struct inode *ip, char struct direct *dp; struct vnode *vp; struct buf *bp; - doff_t blkoff, bmask, offset, prevoff; + doff_t blkoff, bmask, offset, prevoff, seqoff; int i, slot; int error; @@ -583,29 +582,30 @@ ufsdirhash_lookup(struct inode *ip, char bmask = VFSTOUFS(vp-v_mount)-um_mountp-mnt_stat.f_iosize - 1; blkoff = -1; bp = NULL; + seqoff = dh-dh_seqoff; restart: slot = ufsdirhash_hash(dh, name, namelen); - if (dh-dh_seqopt) { + if (seqoff != -1) { /* -* Sequential access optimisation. dh_seqoff contains the +* Sequential access optimisation. seqoff contains the * offset of the directory entry immediately following * the last entry that was looked up. Check if this offset * appears in the hash chain for the name we are looking for. */ for (i = slot; (offset = DH_ENTRY(dh, i)) != DIRHASH_EMPTY; i = WRAPINCR(i, dh-dh_hlen)) - if (offset == dh-dh_seqoff) + if (offset == seqoff) break; - if (offset == dh-dh_seqoff) { + if (offset == seqoff) { /* * We found an entry with the expected offset. This * is probably the entry we want, but if not, the -* code below will turn off seqopt and retry. +* code below will retry. */ slot = i; - } else - dh-dh_seqopt = 0; + } else + seqoff =
svn commit: r219748 - stable/7/sys/kern
Author: jhb Date: Fri Mar 18 17:18:24 2011 New Revision: 219748 URL: http://svn.freebsd.org/changeset/base/219748 Log: MFC 219399: When constructing a new cpuset, apply the parent cpuset's mask to the new set's mask rather than the root mask. This was causing the root mask to be modified incorrectly. Modified: stable/7/sys/kern/kern_cpuset.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_cpuset.c == --- stable/7/sys/kern/kern_cpuset.c Fri Mar 18 17:18:09 2011 (r219747) +++ stable/7/sys/kern/kern_cpuset.c Fri Mar 18 17:18:24 2011 (r219748) @@ -253,7 +253,7 @@ cpuset_lookup(cpusetid_t setid, struct t * will have no valid cpu based on restrictions from the parent. */ static int -_cpuset_create(struct cpuset *set, struct cpuset *parent, cpuset_t *mask, +_cpuset_create(struct cpuset *set, struct cpuset *parent, const cpuset_t *mask, cpusetid_t id) { @@ -264,7 +264,7 @@ _cpuset_create(struct cpuset *set, struc refcount_init(set-cs_ref, 1); set-cs_flags = 0; mtx_lock_spin(cpuset_lock); - CPU_AND(mask, parent-cs_mask); + CPU_AND(set-cs_mask, parent-cs_mask); set-cs_id = id; set-cs_parent = cpuset_ref(parent); LIST_INSERT_HEAD(parent-cs_children, set, cs_siblings); @@ -281,7 +281,7 @@ _cpuset_create(struct cpuset *set, struc * allocated. */ static int -cpuset_create(struct cpuset **setp, struct cpuset *parent, cpuset_t *mask) +cpuset_create(struct cpuset **setp, struct cpuset *parent, const cpuset_t *mask) { struct cpuset *set; cpusetid_t id; @@ -501,7 +501,7 @@ cpuset_which(cpuwhich_t which, id_t id, * the new set is a child of 'set'. */ static int -cpuset_shadow(struct cpuset *set, struct cpuset *fset, cpuset_t *mask) +cpuset_shadow(struct cpuset *set, struct cpuset *fset, const cpuset_t *mask) { struct cpuset *parent; ___ 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: r219749 - stable/8/sys/compat/linux
Author: jhb Date: Fri Mar 18 17:20:32 2011 New Revision: 219749 URL: http://svn.freebsd.org/changeset/base/219749 Log: MFC 219460: Remove now-obsolete comment. Modified: stable/8/sys/compat/linux/linux_futex.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/compat/linux/linux_futex.c == --- stable/8/sys/compat/linux/linux_futex.c Fri Mar 18 17:18:24 2011 (r219748) +++ stable/8/sys/compat/linux/linux_futex.c Fri Mar 18 17:20:32 2011 (r219749) @@ -412,7 +412,7 @@ futex_atomic_op(struct thread *td, int e cmparg = %x, uaddr = %p\n, op, cmp, oparg, cmparg, uaddr); #endif - /* XXX: linux verifies access here and returns EFAULT */ + /* XXX: Linux verifies access here and returns EFAULT */ switch (op) { case FUTEX_OP_SET: @@ -533,11 +533,6 @@ linux_sys_futex(struct thread *td, struc LINUX_CTR3(sys_futex, WAKE uaddr %p val % d val3 %d, args-uaddr, args-val, args-val3); - /* -* XXX: Linux is able to cope with different addresses -* corresponding to the same mapped memory in the sleeping -* and waker process(es). -*/ #ifdef DEBUG if (ldebug(sys_futex)) printf(ARGS(sys_futex, futex_wake uaddr %p val %d val3 %d), ___ 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: r219750 - stable/7/sys/compat/linux
Author: jhb Date: Fri Mar 18 17:20:45 2011 New Revision: 219750 URL: http://svn.freebsd.org/changeset/base/219750 Log: MFC 219460: Remove now-obsolete comment. Modified: stable/7/sys/compat/linux/linux_futex.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/compat/linux/linux_futex.c == --- stable/7/sys/compat/linux/linux_futex.c Fri Mar 18 17:20:32 2011 (r219749) +++ stable/7/sys/compat/linux/linux_futex.c Fri Mar 18 17:20:45 2011 (r219750) @@ -395,7 +395,7 @@ futex_atomic_op(struct thread *td, int e cmparg = %x, uaddr = %p\n, op, cmp, oparg, cmparg, uaddr); #endif - /* XXX: linux verifies access here and returns EFAULT */ + /* XXX: Linux verifies access here and returns EFAULT */ switch (op) { case FUTEX_OP_SET: @@ -491,11 +491,6 @@ linux_sys_futex(struct thread *td, struc LINUX_CTR2(sys_futex, WAKE val %d uaddr %p, args-val, args-uaddr); - /* -* XXX: Linux is able to cope with different addresses -* corresponding to the same mapped memory in the sleeping -* and waker process(es). -*/ #ifdef DEBUG if (ldebug(sys_futex)) printf(ARGS(sys_futex, futex_wake val %d uaddr %p), ___ 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: r219751 - stable/8/sys/boot/i386/gptboot
Author: jhb Date: Fri Mar 18 17:23:23 2011 New Revision: 219751 URL: http://svn.freebsd.org/changeset/base/219751 Log: MFC 219483: Remove all object files during 'make clean'. Modified: stable/8/sys/boot/i386/gptboot/Makefile 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/boot/i386/gptboot/Makefile == --- stable/8/sys/boot/i386/gptboot/Makefile Fri Mar 18 17:20:45 2011 (r219750) +++ stable/8/sys/boot/i386/gptboot/Makefile Fri Mar 18 17:23:23 2011 (r219751) @@ -60,7 +60,8 @@ gptldr.bin: gptldr.out gptldr.out: gptldr.o ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o -CLEANFILES+= gptboot.bin gptboot.out gptboot.o sio.o ufsread.o +CLEANFILES+= gptboot.bin gptboot.out gptboot.o sio.o gpt.o crc32.o drv.o \ + cons.o util.o gptboot.bin: gptboot.out objcopy -S -O binary gptboot.out ${.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
Re: svn commit: r219679 - head/sys/i386/include
On Friday 18 March 2011 01:19 am, Bruce Evans wrote: On Thu, 17 Mar 2011, Jung-uk Kim wrote: On Thursday 17 March 2011 03:57 pm, Peter Jeremy wrote: On 2011-Mar-16 16:34:04 -0400, Jung-uk Kim j...@freebsd.org wrote: On Wednesday 16 March 2011 01:45 pm, Roman Divacky wrote: if we drop i486 I think it makes sense to require something that has at least SSE2, thus we can have the same expectations as on amd64. I think it's stil a bit early for that - especially the SSE2 requirement. This is a proof-of-concept patch for sys/x86/isa/clock.c: http://people.freebsd.org/~jkim/clock.diff You see the complexity, just because I wanted to load 64-bit value atomically... :-( An alternative approach is to have _fetch_frequency() be uint64_t (*_fetch_frequency)(uint64_t *); if i386 and I486 are defined (otherwise it's just the #define (*(p))) then initialise it to either atomic_fetch_quad_i386 or atomic_fetch_quad_i586 as part of the CPU detection process. This is the way bcopy() is/was handled on Pentium. Another approach would be to always have cmpxchg8b instructions (followed by a suitably large NOP) always inlined in the code and if it traps, patch the code to call a function that emulates it. I think the former makes more sense for atomic read/write because we don't need complete cmpxchg8b support but kind of movq support, actually. Both require a function call. With a function call, patching becomes much easier since there is only 1 place to patch, so patching is almost as easy as changing a function pointer (might need an instruction queue flush and/or prevention of the function being called before or while it is being patched). Patching the code also makes it easier to null out the lock prefix in the !SMP case when it is presumably not needed. The function call to a function without a lock prefix will then be faster than inline code with a lock prefix. With a function pointer, you start getting combinatorial explosion in the number of separate functions needed (1 without cmpxchg8b or a lock prefix (for i486), 1 with cmpxchg8b without a lock prefix (for !SMP i586+), and 1 with both (for SMP i586+). I already implemented the function pointer thing last night. You can see the current work-in-progress patch here: http://people.freebsd.org/~jkim/tsc_cleanup.diff Also, it's attached here as well. I didn't notice any problem so far but I am sure you will find some. ;-) Please note the patch includes get_cyclecount() to cpu_ticks() conversion to give you a complete picture. Jung-uk Kim Index: sys/kern/kern_ktr.c === --- sys/kern/kern_ktr.c (revision 219741) +++ sys/kern/kern_ktr.c (working copy) @@ -73,7 +73,7 @@ __FBSDID($FreeBSD$); #endif #ifndef KTR_TIME -#defineKTR_TIMEget_cyclecount() +#defineKTR_TIMEcpu_ticks() #endif #ifndef KTR_CPU Index: sys/kern/init_main.c === --- sys/kern/init_main.c(revision 219741) +++ sys/kern/init_main.c(working copy) @@ -560,7 +560,7 @@ SYSINIT(p0init, SI_SUB_INTRINSIC, SI_ORDER_FIRST, static void proc0_post(void *dummy __unused) { - struct timespec ts; + struct bintime bt; struct proc *p; struct rusage ru; struct thread *td; @@ -590,8 +590,8 @@ proc0_post(void *dummy __unused) /* * Give the ``random'' number generator a thump. */ - nanotime(ts); - srandom(ts.tv_sec ^ ts.tv_nsec); + bintime(bt); + srandom(bt.sec ^ bt.frac); } SYSINIT(p0post, SI_SUB_INTRINSIC_POST, SI_ORDER_FIRST, proc0_post, NULL); @@ -601,10 +601,10 @@ random_init(void *dummy __unused) /* * After CPU has been started we have some randomness on most -* platforms via get_cyclecount(). For platforms that don't -* we will reseed random(9) in proc0_post() as well. +* platforms via cpu_ticks(). For platforms that don't we will +* reseed random(9) in proc0_post() as well. */ - srandom(get_cyclecount()); + srandom(cpu_ticks()); } SYSINIT(random, SI_SUB_RANDOM, SI_ORDER_FIRST, random_init, NULL); Index: sys/netinet/sctp_os_bsd.h === --- sys/netinet/sctp_os_bsd.h (revision 219741) +++ sys/netinet/sctp_os_bsd.h (working copy) @@ -129,7 +129,7 @@ MALLOC_DECLARE(SCTP_M_MCORE); #if defined(SCTP_LOCAL_TRACE_BUF) -#define SCTP_GET_CYCLECOUNT get_cyclecount() +#define SCTP_GET_CYCLECOUNT cpu_ticks() #define SCTP_CTR6 sctp_log_trace #else Index: sys/dev/acpica/acpi_cpu.c === --- sys/dev/acpica/acpi_cpu.c (revision 219741) +++ sys/dev/acpica/acpi_cpu.c (working copy) @@ -516,7 +516,7 @@ acpi_cpu_read_ivar(device_t dev, device_t child, i #if
svn commit: r219753 - head/sys/dev/e1000
Author: jfv Date: Fri Mar 18 18:54:00 2011 New Revision: 219753 URL: http://svn.freebsd.org/changeset/base/219753 Log: This delta updates the em driver to version 7.2.2 which has been undergoing test for some weeks. This improves the RX mbuf handling to avoid system hang due to depletion. Thanks to all those who have been testing the code, and to Beezar Liu for the design changes. Next the igb driver is updated for similar RX changes, but also to add new features support for our upcoming i350 family of adapters. MFC after a week Modified: head/sys/dev/e1000/e1000_82575.c head/sys/dev/e1000/e1000_82575.h head/sys/dev/e1000/e1000_defines.h head/sys/dev/e1000/e1000_phy.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_em.h head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_igb.h head/sys/dev/e1000/if_lem.h Modified: head/sys/dev/e1000/e1000_82575.c == --- head/sys/dev/e1000/e1000_82575.cFri Mar 18 17:49:11 2011 (r219752) +++ head/sys/dev/e1000/e1000_82575.cFri Mar 18 18:54:00 2011 (r219753) @@ -36,7 +36,6 @@ * 82575EB Gigabit Network Connection * 82575EB Gigabit Backplane Connection * 82575GB Gigabit Network Connection - * 82575GB Gigabit Network Connection * 82576 Gigabit Network Connection * 82576 Quad Port Gigabit Mezzanine Adapter */ @@ -44,7 +43,6 @@ #include e1000_api.h static s32 e1000_init_phy_params_82575(struct e1000_hw *hw); -static s32 e1000_init_nvm_params_82575(struct e1000_hw *hw); static s32 e1000_init_mac_params_82575(struct e1000_hw *hw); static s32 e1000_acquire_phy_82575(struct e1000_hw *hw); static void e1000_release_phy_82575(struct e1000_hw *hw); @@ -197,12 +195,14 @@ static s32 e1000_init_phy_params_82575(s switch (phy-id) { case I347AT4_E_PHY_ID: case M88E1112_E_PHY_ID: + case M88E1340M_E_PHY_ID: case M88E_I_PHY_ID: phy-type = e1000_phy_m88; phy-ops.check_polarity = e1000_check_polarity_m88; phy-ops.get_info = e1000_get_phy_info_m88; if (phy-id == I347AT4_E_PHY_ID || - phy-id == M88E1112_E_PHY_ID) + phy-id == M88E1112_E_PHY_ID || + phy-id == M88E1340M_E_PHY_ID) phy-ops.get_cable_length = e1000_get_cable_length_m88_gen2; else phy-ops.get_cable_length = e1000_get_cable_length_m88; @@ -241,7 +241,7 @@ out: * e1000_init_nvm_params_82575 - Init NVM func ptrs. * @hw: pointer to the HW structure **/ -static s32 e1000_init_nvm_params_82575(struct e1000_hw *hw) +s32 e1000_init_nvm_params_82575(struct e1000_hw *hw) { struct e1000_nvm_info *nvm = hw-nvm; u32 eecd = E1000_READ_REG(hw, E1000_EECD); @@ -258,7 +258,6 @@ static s32 e1000_init_nvm_params_82575(s size += NVM_WORD_SIZE_BASE_SHIFT; nvm-word_size = 1 size; - nvm-opcode_bits= 8; nvm-delay_usec = 1; switch (nvm-override) { @@ -278,20 +277,23 @@ static s32 e1000_init_nvm_params_82575(s nvm-type = e1000_nvm_eeprom_spi; - if (nvm-word_size == (1 15)) { + if (nvm-word_size == (1 15)) nvm-page_size = 128; - } - /* Function Pointers */ - nvm-ops.acquire = e1000_acquire_nvm_82575; - if (nvm-word_size (1 15)) { - nvm-ops.read = e1000_read_nvm_eerd; - } else { - nvm-ops.read = e1000_read_nvm_spi; - } - nvm-ops.release = e1000_release_nvm_82575; - nvm-ops.valid_led_default = e1000_valid_led_default_82575; + nvm-ops.acquire= e1000_acquire_nvm_82575; + nvm-ops.release= e1000_release_nvm_82575; + if (nvm-word_size (1 15)) + nvm-ops.read= e1000_read_nvm_eerd; + else + nvm-ops.read= e1000_read_nvm_spi; + + nvm-ops.write = e1000_write_nvm_spi; + nvm-ops.validate = e1000_validate_nvm_checksum_generic; + nvm-ops.update = e1000_update_nvm_checksum_generic; + nvm-ops.valid_led_default = e1000_valid_led_default_82575; + + /* override genric family function pointers for specific descendants */ switch (hw-mac.type) { case e1000_82580: nvm-ops.validate = e1000_validate_nvm_checksum_82580; @@ -302,10 +304,8 @@ static s32 e1000_init_nvm_params_82575(s nvm-ops.update = e1000_update_nvm_checksum_i350; break; default: - nvm-ops.validate = e1000_validate_nvm_checksum_generic; - nvm-ops.update = e1000_update_nvm_checksum_generic; + break; } - nvm-ops.write = e1000_write_nvm_spi; return E1000_SUCCESS; } @@ -889,9 +889,7 @@ static s32 e1000_acquire_nvm_82575(struc ret_val =
Re: svn commit: r219753 - head/sys/dev/e1000
On Fri, Mar 18, 2011 at 11:54, Jack F Vogel j...@freebsd.org wrote: Author: jfv Date: Fri Mar 18 18:54:00 2011 New Revision: 219753 URL: http://svn.freebsd.org/changeset/base/219753 Log: This delta updates the em driver to version 7.2.2 which has been undergoing test for some weeks. This improves the RX mbuf handling to avoid system hang due to depletion. Thanks to all those who have been testing the code, and to Beezar Liu for the design changes. I understand that the fundamental unit coming out of Intel is an atomic driver version, but it really, really, really would be nice to not fix functional and stylistic changes at such a fundamental level and with such a widely-used driver as these. I understand that you have enough work already, but if it's at all possible to do these updates in a couple of passes, I would really appreciate it, and I know there are other people who have to mine the significant deltas from these updates who would appreciate it, too. You could start with stylistic changes and then do a couple of functional changes and then update the driver version to reflect the Intel finished product, say. It's good that it's been undergoing a long period of test, but it would have been nice if the commit message had included more details on the functional changes. Some specific comments: It seems like the update to e1000_82575 (and other chip-specific bits) is totally independent of the other style changes and the depletion fix and that it would have been easy to do that separately. - if (nvm-word_size == (1 15)) { + if (nvm-word_size == (1 15)) nvm-page_size = 128; - } - Great that this is moving towards KNF. Might be good to take a few minutes and fix all such statements now rather than doing them in pieces later in time. -#define E1000_DMACR_DMACTHR_MASK 0x00FF /* DMA Coalescing Receive +#define E1000_DMACR_DMACTHR_MASK 0x00FF /* DMA Coalescing Rx * Threshold */ All of these changes could have easily been done separately since they are entirely stylistic. +/* Energy efficient ethernet - default to OFF */ +static int eee_setting = 0; +TUNABLE_INT(hw.em.eee_setting, eee_setting); Would have been useful to see some mention of this in the commit message. + struct e1000_hw *hw; int error = 0; INIT_DEBUGOUT(em_attach: begin); adapter = device_get_softc(dev); adapter-dev = adapter-osdep.dev = dev; + hw = adapter-hw; [...] - if ((adapter-hw.mac.type == e1000_ich8lan) || - (adapter-hw.mac.type == e1000_ich9lan) || - (adapter-hw.mac.type == e1000_ich10lan) || - (adapter-hw.mac.type == e1000_pchlan) || - (adapter-hw.mac.type == e1000_pch2lan)) { + if ((hw-mac.type == e1000_ich8lan) || + (hw-mac.type == e1000_ich9lan) || + (hw-mac.type == e1000_ich10lan) || + (hw-mac.type == e1000_pchlan) || + (hw-mac.type == e1000_pch2lan)) { Like the brace changes elsewhere, this is not the first time this stylistic improvement has been made in the e1000 code base. Perhaps it would be good to replace all uses of adapter-hw. with hw- and add the appropriate hw variables now. It seems insignificant, but I assure you it is a source of conflicts for those of us who have to maintain local changes to e1000. That's alright as a one time cost, and it would seem worthwhile to fix this universally since that's the direction this driver and the Linux driver seem to be going in. - bool more; if (ifp-if_drv_flags IFF_DRV_RUNNING) { - more = em_rxeof(rxr, adapter-rx_process_limit, NULL); - + bool more = em_rxeof(rxr, adapter-rx_process_limit, NULL); This seems like a style regression, at least by FreeBSD standards. - for (int i = 0; i j; ++i) { + for (int i = 0, n = 0; i q; ++i) { Why is n being initialized to 0 when it will be set immediately below? Even if it were necessary, putting it in the for statement is only an obfuscatory eye-sore, doubly so since it has nothing to do with the loop construct as far as I can tell. rxr = adapter-rx_rings[i]; - for (int n = 0; n adapter-num_rx_desc; n++) { + n = rxr-next_to_check; ^^^ Here n is set. + while(n != rxr-next_to_refresh) { ^^^ Here n is used in a while missing a very small amount of whitespace. + while(i != rxr-next_to_refresh) { ^^^ Similar. - Copyright (c) 2001-2011, Intel Corporation + Copyright (c) 2001-2010, Intel Corporation This seems like a step backwards. Through time. +/* +** DMA Coalescing, only for i350 - default to off, +** this feature is for power savings +*/ +static int igb_dma_coalesce = FALSE; +TUNABLE_INT(hw.igb.dma_coalesce, igb_dma_coalesce); Again, would've loved some
Re: svn commit: r219753 - head/sys/dev/e1000
The problem is that the shared code is delivered to me as a component. I generally do try to filter it a little, but if I start diverging from the internal component files, then I just introduce a never-ending task for myself to do that. It also is tested in house as a complete component, so every time I would change something that introduces risks. To both you and Yongari... its nice to compare how things are done with Linux, but what you need to understand is that there are, oh, about 20 engineers with varying tasks that handle Linux. For FreeBSD there is just me, so the only way I can accomplish as much is to creatively leverage the work of others, or to consolidate tasks in some ways. I know there are plenty of things to criticize, I apologize when I don't get it quite the way you'd like, or I make work for others, I'll try to take the feedback into account, I'm trying to do my best though. Regards, Jack On Fri, Mar 18, 2011 at 12:15 PM, Juli Mallett jmall...@freebsd.org wrote: On Fri, Mar 18, 2011 at 11:54, Jack F Vogel j...@freebsd.org wrote: Author: jfv Date: Fri Mar 18 18:54:00 2011 New Revision: 219753 URL: http://svn.freebsd.org/changeset/base/219753 Log: This delta updates the em driver to version 7.2.2 which has been undergoing test for some weeks. This improves the RX mbuf handling to avoid system hang due to depletion. Thanks to all those who have been testing the code, and to Beezar Liu for the design changes. I understand that the fundamental unit coming out of Intel is an atomic driver version, but it really, really, really would be nice to not fix functional and stylistic changes at such a fundamental level and with such a widely-used driver as these. I understand that you have enough work already, but if it's at all possible to do these updates in a couple of passes, I would really appreciate it, and I know there are other people who have to mine the significant deltas from these updates who would appreciate it, too. You could start with stylistic changes and then do a couple of functional changes and then update the driver version to reflect the Intel finished product, say. It's good that it's been undergoing a long period of test, but it would have been nice if the commit message had included more details on the functional changes. Some specific comments: It seems like the update to e1000_82575 (and other chip-specific bits) is totally independent of the other style changes and the depletion fix and that it would have been easy to do that separately. - if (nvm-word_size == (1 15)) { + if (nvm-word_size == (1 15)) nvm-page_size = 128; - } - Great that this is moving towards KNF. Might be good to take a few minutes and fix all such statements now rather than doing them in pieces later in time. -#define E1000_DMACR_DMACTHR_MASK0x00FF /* DMA Coalescing Receive +#define E1000_DMACR_DMACTHR_MASK0x00FF /* DMA Coalescing Rx * Threshold */ All of these changes could have easily been done separately since they are entirely stylistic. +/* Energy efficient ethernet - default to OFF */ +static int eee_setting = 0; +TUNABLE_INT(hw.em.eee_setting, eee_setting); Would have been useful to see some mention of this in the commit message. + struct e1000_hw *hw; int error = 0; INIT_DEBUGOUT(em_attach: begin); adapter = device_get_softc(dev); adapter-dev = adapter-osdep.dev = dev; + hw = adapter-hw; [...] - if ((adapter-hw.mac.type == e1000_ich8lan) || - (adapter-hw.mac.type == e1000_ich9lan) || - (adapter-hw.mac.type == e1000_ich10lan) || - (adapter-hw.mac.type == e1000_pchlan) || - (adapter-hw.mac.type == e1000_pch2lan)) { + if ((hw-mac.type == e1000_ich8lan) || + (hw-mac.type == e1000_ich9lan) || + (hw-mac.type == e1000_ich10lan) || + (hw-mac.type == e1000_pchlan) || + (hw-mac.type == e1000_pch2lan)) { Like the brace changes elsewhere, this is not the first time this stylistic improvement has been made in the e1000 code base. Perhaps it would be good to replace all uses of adapter-hw. with hw- and add the appropriate hw variables now. It seems insignificant, but I assure you it is a source of conflicts for those of us who have to maintain local changes to e1000. That's alright as a one time cost, and it would seem worthwhile to fix this universally since that's the direction this driver and the Linux driver seem to be going in. - boolmore; if (ifp-if_drv_flags IFF_DRV_RUNNING) { - more = em_rxeof(rxr, adapter-rx_process_limit, NULL); - + bool more = em_rxeof(rxr, adapter-rx_process_limit, NULL); This seems like a style regression, at least
Re: svn commit: r218753 - head/etc/namedb
On Sun, Feb 20, 2011 at 12:18 PM, Doug Barton do...@dougbarton.us wrote: On 2/20/2011 8:49 AM, Philip M. Gollucci wrote: On 2/19/2011 8:35 PM, Doug Barton wrote: On 02/19/2011 16:52, Philip M. Gollucci wrote: On 2/16/2011 4:23 PM, Doug Barton wrote: Author: dougb Date: Wed Feb 16 21:23:09 2011 New Revision: 218753 URL: http://svn.freebsd.org/changeset/base/218753 Log: Remove in-addr.arpa from the list of zones it is possible to slave locally This is b/c of the recent change to fix the list of root servers that serve this right ? Not precisely. in-addr.arpa has moved to its own set of servers operated jointly by the RIRs and ICANN. At some point in the near future this zone will no longer be available directly from the root servers at all. We said the same thing, just I said it badly. Sorry to be pedantic, but it's for a (hopefully) good reason. People often refer to any servers high up in the tree as the root servers for ... There is actually only one set of root servers, the ones that serve the actual root zone. For hysterical raisins these servers also served ARPA, and IN-ADDR.ARPA. A little bit better job was done with IP6.ARPA to start with so it was the first to move from one set of servers managed by the RIRs and ICANN to a different set that are similarly named in order to take advantage of name compression in the DNS packet. IN-ADDR.ARPA is the next to move both for compression purposes, and to get the zone off the roots. So, not to pick on you here, my purpose is simply to clarify that they did not change the list of root servers, they actually changed the delegation of IN-ADDR.ARPA to its own set of name servers. I should probably add that while it's technically possible, it's highly unlikely that ARPA itself will move off the roots. The zone is very small, and very static; and that is incredibly unlikely to change any time in the near future. The IN-ADDR and IP6.ARPA zones on the other hand are both larger, and more dynamic (although IN-ADDR is going to be changing less and less as time goes on). Looks like this happened sometime in the last while because now I'm not getting NXDOMAIN errors after removing this entry when trying to run host on a machine in my network :). Doesn't fix my syslogd issue though (still debugging o...).. 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: r219756 - head/sys/ia64/ia64
Author: marcel Date: Fri Mar 18 22:33:19 2011 New Revision: 219756 URL: http://svn.freebsd.org/changeset/base/219756 Log: Remove inclusion of unneeded bootinfo.h header. Modified: head/sys/ia64/ia64/autoconf.c Modified: head/sys/ia64/ia64/autoconf.c == --- head/sys/ia64/ia64/autoconf.c Fri Mar 18 22:30:47 2011 (r219755) +++ head/sys/ia64/ia64/autoconf.c Fri Mar 18 22:33:19 2011 (r219756) @@ -38,7 +38,6 @@ #include sys/bus.h #include sys/cons.h -#include machine/bootinfo.h #include machine/intr.h #include machine/md_var.h ___ 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: r219757 - in stable/8: include sys/sys
Author: jilles Date: Fri Mar 18 22:35:48 2011 New Revision: 219757 URL: http://svn.freebsd.org/changeset/base/219757 Log: MFC r219271: POSIX.1-2008 moved some constants from the XSI option to the Base. Modified: stable/8/include/limits.h stable/8/sys/sys/limits.h Directory Properties: stable/8/include/ (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/include/limits.h == --- stable/8/include/limits.h Fri Mar 18 22:33:19 2011(r219756) +++ stable/8/include/limits.h Fri Mar 18 22:35:48 2011(r219757) @@ -120,18 +120,21 @@ #define_POSIX_RE_DUP_MAX _POSIX2_RE_DUP_MAX #endif +#if __XSI_VISIBLE || __POSIX_VISIBLE = 200809 +#defineNL_ARGMAX 99 /* max # of position args for printf */ +#defineNL_MSGMAX 32767 +#defineNL_SETMAX 255 +#defineNL_TEXTMAX 2048 +#endif + #if __XSI_VISIBLE #define_XOPEN_IOV_MAX 16 #define_XOPEN_NAME_MAX 255 #define_XOPEN_PATH_MAX 1024 #definePASS_MAX128 /* _PASSWORD_LEN from pwd.h */ -#defineNL_ARGMAX 99 /* max # of position args for printf */ #defineNL_LANGMAX 31 /* max LANG name length */ -#defineNL_MSGMAX 32767 #defineNL_NMAX 1 -#defineNL_SETMAX 255 -#defineNL_TEXTMAX 2048 #endif #defineMB_LEN_MAX 6 /* 31-bit UTF-8 */ Modified: stable/8/sys/sys/limits.h == --- stable/8/sys/sys/limits.h Fri Mar 18 22:33:19 2011(r219756) +++ stable/8/sys/sys/limits.h Fri Mar 18 22:35:48 2011(r219757) @@ -88,7 +88,7 @@ #defineQUAD_MIN(__QUAD_MIN)/* min value for a quad_t */ #endif -#if __XSI_VISIBLE +#if __XSI_VISIBLE || __POSIX_VISIBLE = 200809 #defineLONG_BIT__LONG_BIT #defineWORD_BIT__WORD_BIT #endif ___ 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: r219758 - in head/sys: conf ia64/ia64
Author: marcel Date: Fri Mar 18 22:45:43 2011 New Revision: 219758 URL: http://svn.freebsd.org/changeset/base/219758 Log: o Move the IVT and supporting functions to the front of the text segment so that it's always mapped by the loader. o Change the alternate fault handlers to account for PBVM. Since currently the region is handled by the VHPT, no alternate faults will be generated for it. Modified: head/sys/conf/ldscript.ia64 head/sys/ia64/ia64/exception.S head/sys/ia64/ia64/genassym.c head/sys/ia64/ia64/locore.S Modified: head/sys/conf/ldscript.ia64 == --- head/sys/conf/ldscript.ia64 Fri Mar 18 22:35:48 2011(r219757) +++ head/sys/conf/ldscript.ia64 Fri Mar 18 22:45:43 2011(r219758) @@ -9,6 +9,22 @@ SECTIONS /* Read-only sections, merged into text segment: */ . = kernel_text + SIZEOF_HEADERS; .interp : { *(.interp) } + + PROVIDE (btext = .); + .ivt : { *(.ivt) } + .text : + { +*(.text.ivt) +*(.text .stub .text.* .gnu.linkonce.t.*) +/* .gnu.warning sections are handled specially by elf32.em. */ +*(.gnu.warning) + } = 0x00300100700201000400 + .init : { *(.init) } = 0x00300100700201000400 + .plt: { *(.plt) } + .fini : { *(.fini) } = 0x00300100700201000400 + _etext = .; + PROVIDE (etext = .); + .hash : { *(.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } @@ -30,37 +46,23 @@ SECTIONS .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) } .rela.plt : { *(.rela.plt) } .rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) } - PROVIDE (btext = .); - .init : - { -*(.init) - } =0x00300100700201000400 - .plt: { *(.plt) } - .text : - { -*(.text .stub .text.* .gnu.linkonce.t.*) -/* .gnu.warning sections are handled specially by elf32.em. */ -*(.gnu.warning) - } =0x00300100700201000400 - .fini : - { -*(.fini) - } =0x00300100700201000400 - _etext = .; - PROVIDE (etext = .); + + .IA_64.unwind_info : { *(.IA_64.unwind_info* .gnu.linkonce.ia64unwi.*) } + .IA_64.unwind : { *(.IA_64.unwind* .gnu.linkonce.ia64unw.*) } + .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } .rodata1: { *(.rodata1) } .sdata2 : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) } .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) } .opd: { *(.opd) } - .IA_64.unwind_info : { *(.IA_64.unwind_info* .gnu.linkonce.ia64unwi.*) } - .IA_64.unwind : { *(.IA_64.unwind* .gnu.linkonce.ia64unw.*) } - /* Adjust the address for the data segment. We want to adjust up to - the same address within the page on the next page up. */ - . = . + 8192; + + /* Adjust the address for the data segment. We want to start in the next + page in the loader virtual memory. */ + . = ALIGN(65536); + .data : { -*(.data.proc0 .data .data.* .gnu.linkonce.d.*) +*(.data.kstack .data .data.* .gnu.linkonce.d.*) SORT(CONSTRUCTORS) } .data1 : { *(.data1) } Modified: head/sys/ia64/ia64/exception.S == --- head/sys/ia64/ia64/exception.S Fri Mar 18 22:35:48 2011 (r219757) +++ head/sys/ia64/ia64/exception.S Fri Mar 18 22:45:43 2011 (r219758) @@ -101,7 +101,7 @@ xhead: data8 xtrace #endif - .text + .section .text.ivt, ax /* * exception_save: save interrupted state @@ -725,7 +725,7 @@ ivt_##name: \ * bundles per vector and 48 slots with 16 bundles per vector. */ - .section .text.ivt,ax + .section .ivt, ax .align 32768 .global ia64_vector_table @@ -812,7 +812,7 @@ IVT_ENTRY(Instruction_TLB, 0x0400) 3: add r20=24,r20 // next in chain ;; ld8 r20=[r20] // read chain - br.cond.sptk.few 2b // loop + br.sptk 2b // loop ;; 9: ssm psr.dt mov pr=r17,0x1 // restore predicates @@ -898,7 +898,7 @@ IVT_ENTRY(Data_TLB, 0x0800) 3: add r20=24,r20 // next in chain ;; ld8 r20=[r20] // read chain - br.cond.sptk.few 2b // loop + br.sptk 2b // loop ;; 9: ssm psr.dt mov pr=r17,0x1 // restore predicates @@ -913,25 +913,40 @@ IVT_ENTRY(Alternate_Instruction_TLB, 0x0 mov r18=pr // save predicates ;; extr.u r17=r16,61,3// get region number + mov r19=PTE_PRESENT+PTE_ACCESSED+PTE_DIRTY+PTE_PL_KERN+PTE_AR_RWX ;; -
svn commit: r219760 - head/tools/tools/nanobsd/rescue
Author: mr Date: Fri Mar 18 22:56:53 2011 New Revision: 219760 URL: http://svn.freebsd.org/changeset/base/219760 Log: - Build disk image (for USB sticks) and iso image - Change name to reflect this - Install all kernel modules - Choose image size that i386 and amd64 can be combined into one image - Mount tmpfs over /boot/zfs for zpool imports Added: head/tools/tools/nanobsd/rescue/rescue_amd64.conf - copied, changed from r219753, head/tools/tools/nanobsd/rescue/isoamd64.conf head/tools/tools/nanobsd/rescue/rescue_i386.conf - copied, changed from r219753, head/tools/tools/nanobsd/rescue/isoi386.conf Deleted: head/tools/tools/nanobsd/rescue/isoamd64.conf head/tools/tools/nanobsd/rescue/isoi386.conf Modified: head/tools/tools/nanobsd/rescue/common Modified: head/tools/tools/nanobsd/rescue/common == --- head/tools/tools/nanobsd/rescue/common Fri Mar 18 22:55:32 2011 (r219759) +++ head/tools/tools/nanobsd/rescue/common Fri Mar 18 22:56:53 2011 (r219760) @@ -6,6 +6,20 @@ NANO_PACKAGE_DIR=`pwd`/Pkg NANO_RAM_TMPVARSIZE=20480 NANO_PMAKE=make -j 8 NANO_LABEL=rescue +NANO_RAM_TMPVARSIZE=40960 +#NANO_MEDIASIZE=8027712 +#NANO_MEDIASIZE=2097152 +NANO_MEDIASIZE=3932160 +NANO_SECTS=63 +NANO_HEADS=16 +NANO_IMAGES=2 +NANO_INIT_IMG2=0 +NANO_BOOT0CFG=-o packet,update,nosetdrv -s 1 -m 3 +NANO_DRIVE=da0 +#NANO_MODULES= +NANO_BOOTLOADER=boot/boot0 +NANO_BOOT2CFG= +NANO_MD_BACKING=swap # Options to put in make.conf during buildworld only CONF_BUILD=' @@ -17,7 +31,7 @@ CONF_INSTALL=' CONF_WORLD=' #TARGET_ARCH=i386 CFLAGS=-O -pipe -#MODULES_OVERRIDE= +ALL_MODULES=YES ' #customize_cmd cust_comconsole @@ -53,8 +67,8 @@ cust_etc_cfg () ( echo keymap=\german.iso\ etc/rc.conf echo #ifconfig_fxp0=\AUTO\ etc/rc.conf echo #sshd_enable=\YES\ etc/rc.conf - echo /dev/iso9660/${NANO_LABEL} / cd9660 ro,noatime 0 0 etc/fstab - echo tmpfs /tmp tmpfs rw,size=268435456,mode=1777 0 0 etc/fstab + echo /dev/ufs/${NANO_LABEL}s1a / ufs ro,noatime 0 0 etc/fstab + echo tmpfs /boot/zfs tmpfs rw,size=1048576,mode=777 0 0 etc/fstab echo ports:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0 etc/fstab # echo /dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0 etc/fstab /usr/sbin/pwd_mkdb -d etc etc/master.passwd @@ -78,6 +92,10 @@ last_orders () ( pprint 2 last orders ( cd ${NANO_WORLDDIR} + echo /dev/iso9660/${NANO_LABEL} / cd9660 ro,noatime 0 0 etc/fstab + echo tmpfs /boot/zfs tmpfs rw,size=1048576,mode=777 0 0 etc/fstab + echo ports:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0 etc/fstab +# echo /dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0 etc/fstab rm -f conf/default/etc/remount touch conf/default/etc/.keepme touch conf/default/var/.keepme @@ -88,10 +106,10 @@ last_orders () ( ) ) -create_i386_diskimage () { - #currently not used -} - -create_amd64_diskimage () { - create_i386_diskimage -} +#create_i386_diskimage () { +# #currently not used +#} + +#create_amd64_diskimage () { +# create_i386_diskimage +#} Copied and modified: head/tools/tools/nanobsd/rescue/rescue_amd64.conf (from r219753, head/tools/tools/nanobsd/rescue/isoamd64.conf) == --- head/tools/tools/nanobsd/rescue/isoamd64.conf Fri Mar 18 18:54:00 2011(r219753, copy source) +++ head/tools/tools/nanobsd/rescue/rescue_amd64.conf Fri Mar 18 22:56:53 2011(r219760) @@ -5,6 +5,6 @@ NANO_KERNEL=GENERIC NANO_ARCH=amd64 TARGET_ARCH=amd64; export TARGET_ARCH #TARGET_CPUTYPE=amd64; export TARGET_CPUTYPE -NANO_NAME=rescue_isoamd64 +NANO_NAME=rescue_amd64 . common Copied and modified: head/tools/tools/nanobsd/rescue/rescue_i386.conf (from r219753, head/tools/tools/nanobsd/rescue/isoi386.conf) == --- head/tools/tools/nanobsd/rescue/isoi386.confFri Mar 18 18:54:00 2011(r219753, copy source) +++ head/tools/tools/nanobsd/rescue/rescue_i386.confFri Mar 18 22:56:53 2011(r219760) @@ -5,6 +5,6 @@ NANO_KERNEL=GENERIC NANO_ARCH=i386 TARGET_ARCH=i386; export TARGET_ARCH #TARGET_CPUTYPE=i386; export TARGET_CPUTYPE -NANO_NAME=rescue_isoi386 +NANO_NAME=rescue_i386 . common ___ 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: r219763 - head/sys/dev/e1000
Author: jfv Date: Sat Mar 19 00:19:18 2011 New Revision: 219763 URL: http://svn.freebsd.org/changeset/base/219763 Log: Correct broken define Modified: head/sys/dev/e1000/if_em.h Modified: head/sys/dev/e1000/if_em.h == --- head/sys/dev/e1000/if_em.h Fri Mar 18 23:55:25 2011(r219762) +++ head/sys/dev/e1000/if_em.h Sat Mar 19 00:19:18 2011(r219763) @@ -212,7 +212,7 @@ #define EM_BAR_MEM_TYPE_64BIT 0x0004 #define EM_MSIX_BAR3 /* On 82575 */ -#if !defined(SYSTCL_ADD_UQUAD) +#if !defined(SYSCTL_ADD_UQUAD) #define SYSCTL_ADD_UQUAD SYSCTL_ADD_QUAD #endif ___ 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: r219764 - head/sys/dev/e1000
Author: jfv Date: Sat Mar 19 00:31:35 2011 New Revision: 219764 URL: http://svn.freebsd.org/changeset/base/219764 Log: A cut and paste here was wrong also. Modified: head/sys/dev/e1000/if_lem.h Modified: head/sys/dev/e1000/if_lem.h == --- head/sys/dev/e1000/if_lem.h Sat Mar 19 00:19:18 2011(r219763) +++ head/sys/dev/e1000/if_lem.h Sat Mar 19 00:31:35 2011(r219764) @@ -217,7 +217,7 @@ #define EM_BAR_MEM_TYPE_64BIT 0x0004 #define EM_MSIX_BAR3 /* On 82575 */ -#if !defined(SYSTCL_ADD_UQUAD) +#if !defined(SYSCTL_ADD_UQUAD) #define SYSCTL_ADD_UQUAD SYSCTL_ADD_QUAD #endif ___ 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: r219765 - stable/8/sbin/ifconfig
Author: gjb (doc committer) Date: Sat Mar 19 00:34:12 2011 New Revision: 219765 URL: http://svn.freebsd.org/changeset/base/219765 Log: MFC 219574,219575: - Add example of using 'scan' for wireless networks, similarly to OpenBSD's ifconfig(8)[1]. - remove unneeded newline PR: 151952 [1] Modified: stable/8/sbin/ifconfig/ifconfig.8 Directory Properties: stable/8/sbin/ifconfig/ (props changed) Modified: stable/8/sbin/ifconfig/ifconfig.8 == --- stable/8/sbin/ifconfig/ifconfig.8 Sat Mar 19 00:31:35 2011 (r219764) +++ stable/8/sbin/ifconfig/ifconfig.8 Sat Mar 19 00:34:12 2011 (r219765) @@ -2508,7 +2508,6 @@ to use 100baseTX, full duplex Ethernet m .Dl # ifconfig xl0 media 100baseTX mediaopt full-duplex .Pp Label the em0 interface as an uplink: -.Pp .Dl # ifconfig em0 description \Uplink to Gigabit Switch 2\ .Pp Create the software network interface @@ -2518,6 +2517,10 @@ Create the software network interface Destroy the software network interface .Li gif1 : .Dl # ifconfig gif1 destroy +.Pp +Scan for wireless networks using +.Li wlan0 : +.Dl # ifconfig wlan0 scan .Sh DIAGNOSTICS Messages indicating the specified interface does not exist, the requested address is unknown, or the user is not privileged and ___ 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: r219766 - stable/7/sbin/ifconfig
Author: gjb (doc committer) Date: Sat Mar 19 00:35:11 2011 New Revision: 219766 URL: http://svn.freebsd.org/changeset/base/219766 Log: MFC 219574: - Add example of using 'scan' for wireless networks, similarly to OpenBSD's ifconfig(8). - wlan0 isn't available on 7.x, so substitute ath0 for wlan0 in the example. PR: 151952 Modified: stable/7/sbin/ifconfig/ifconfig.8 Directory Properties: stable/7/sbin/ifconfig/ (props changed) Modified: stable/7/sbin/ifconfig/ifconfig.8 == --- stable/7/sbin/ifconfig/ifconfig.8 Sat Mar 19 00:34:12 2011 (r219765) +++ stable/7/sbin/ifconfig/ifconfig.8 Sat Mar 19 00:35:11 2011 (r219766) @@ -1946,6 +1946,10 @@ Create the software network interface Destroy the software network interface .Li gif1 : .Dl # ifconfig gif1 destroy +.Pp +Scan for wireless networks using +.Li ath0 : +.Dl # ifconfig ath0 scan .Sh DIAGNOSTICS Messages indicating the specified interface does not exist, the requested address is unknown, or the user is not privileged and ___ 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: r219767 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Sat Mar 19 00:46:10 2011 New Revision: 219767 URL: http://svn.freebsd.org/changeset/base/219767 Log: Add debugging messages to the AR5416 ANI code that's found in the AR5212 ANI code. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.cSat Mar 19 00:35:11 2011(r219766) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_ani.cSat Mar 19 00:46:10 2011(r219767) @@ -855,10 +855,16 @@ ar5416AniPoll(struct ath_hal *ah, const /* check to see if need to raise immunity */ if (aniState-ofdmPhyErrCount aniState-listenTime * params-ofdmTrigHigh / 1000) { +HALDEBUG(ah, HAL_DEBUG_ANI, +%s: OFDM err %u listenTime %u\n, __func__, +aniState-ofdmPhyErrCount, aniState-listenTime); ar5416AniOfdmErrTrigger(ah); ar5416AniRestart(ah, aniState); } else if (aniState-cckPhyErrCount aniState-listenTime * params-cckTrigHigh / 1000) { +HALDEBUG(ah, HAL_DEBUG_ANI, +%s: CCK err %u listenTime %u\n, __func__, +aniState-ofdmPhyErrCount, aniState-listenTime); ar5416AniCckErrTrigger(ah); ar5416AniRestart(ah, aniState); } ___ 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: r219753 - head/sys/dev/e1000
On 3/18/2011 12:37 PM, Jack Vogel wrote: I'm trying to do my best though. As an em0 user I really appreciate the effort you're putting in, and the fact that Intel is supporting you in it. Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ 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: r219768 - stable/8/usr.sbin/moused
Author: gjb (doc committer) Date: Sat Mar 19 01:41:21 2011 New Revision: 219768 URL: http://svn.freebsd.org/changeset/base/219768 Log: MFC 219723: - Formtting fix. Modified: stable/8/usr.sbin/moused/moused.8 Directory Properties: stable/8/usr.sbin/moused/ (props changed) Modified: stable/8/usr.sbin/moused/moused.8 == --- stable/8/usr.sbin/moused/moused.8 Sat Mar 19 00:46:10 2011 (r219767) +++ stable/8/usr.sbin/moused/moused.8 Sat Mar 19 01:41:21 2011 (r219768) @@ -450,9 +450,9 @@ X10 MouseRemote. Genius Kidspad and Easypad protocol. .It Ar versapad Interlink VersaPad protocol. -.El .It Ar gtco_digipad GTCO Digipad protocol. +.El .Pp For the bus and InPort mouse: .Bl -tag -compact -width mousesystemsxxx ___ 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: r219769 - stable/7/usr.sbin/moused
Author: gjb (doc committer) Date: Sat Mar 19 01:41:58 2011 New Revision: 219769 URL: http://svn.freebsd.org/changeset/base/219769 Log: MFC 219723: - Formatting fix. Modified: stable/7/usr.sbin/moused/moused.8 Directory Properties: stable/7/usr.sbin/moused/ (props changed) Modified: stable/7/usr.sbin/moused/moused.8 == --- stable/7/usr.sbin/moused/moused.8 Sat Mar 19 01:41:21 2011 (r219768) +++ stable/7/usr.sbin/moused/moused.8 Sat Mar 19 01:41:58 2011 (r219769) @@ -450,9 +450,9 @@ X10 MouseRemote. Genius Kidspad and Easypad protocol. .It Ar versapad Interlink VersaPad protocol. -.El .It Ar gtco_digipad GTCO Digipad protocol. +.El .Pp For the bus and InPort mouse: .Bl -tag -compact -width mousesystemsxxx ___ 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: r219667 - head/usr.sbin/bsdinstall/partedit
On 03/15/11 12:50, Gavin Atkinson wrote: On Tue, 2011-03-15 at 12:26 -0500, Nathan Whitehorn wrote: On 03/15/11 09:19, Gavin Atkinson wrote: On Tue, 2011-03-15 at 13:27 +, Nathan Whitehorn wrote: Author: nwhitehorn Date: Tue Mar 15 13:27:34 2011 New Revision: 219667 URL: http://svn.freebsd.org/changeset/base/219667 Log: Turn on softupdates by default. We need a UI to set filesystem parameters. Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c This would appear to still be a change from the previous behaviour, where softupdates were enabled by default for any filesystem except for the root filesystem. It is -- and this needs to become settable. Bear in mind, however, that the default partition layout is also different. If you select the auto option, only one file system is made, so there are no non-root file systems. Hrm, I hadn't realised this was the case. If this change is intentional and planned to remain, I guess the various bits of documentation that say several partitions good, one bad should be updated... It is intended. I think it makes things somewhat easier for the virtualization case, and I know a lot of people have been running their systems with one-big-/ for years. If it is harmful for some reason, however, it's easy to change. I wonder if it is time to start enabling SU+J on non-root filesystems now? That's certainly something to think about, although I'll defer whether that is wise to others. It's a little bit of a pain on the implementation side, since you can't turn it on from newfs, but that isn't a serious obstacle. As of r218726, you can now set this from newfs. (-j) Ah, wonderful. The decision of whether that is a good idea still rests with others, however :) -nathan ___ 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: r219667 - head/usr.sbin/bsdinstall/partedit
On 03/16/11 01:25, Daniel O'Connor wrote: On 16/03/2011, at 4:14, Ben Kaduk wrote: is wise to others. It's a little bit of a pain on the implementation side, since you can't turn it on from newfs, but that isn't a serious obstacle. I suspect the consensus of people like -arch and -fs will be that the burn-in time before it is considered sufficiently stable is be measured in years. Which is a good reason to have a UI to set it :) Or maybe when you say auto it asks if you want it on or not. Yes, there should be a UI for sure. Just ENOTIME so far. -Nathan ___ 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: r219770 - head/sys/dev/ath/ath_hal/ar5416
Author: adrian Date: Sat Mar 19 03:09:21 2011 New Revision: 219770 URL: http://svn.freebsd.org/changeset/base/219770 Log: Use the HAL method rather than directly calling ar5212ResetTxQueue(). Since ath9k does some slightly different bit fiddling when setting up the TX queues, it may that the TX queue setup/reset functions will need overriding later on. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat Mar 19 01:41:58 2011(r219769) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat Mar 19 03:09:21 2011(r219770) @@ -285,7 +285,7 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO ahp-ah_intrTxqs = 0; for (i = 0; i AH_PRIVATE(ah)-ah_caps.halTotalQueues; i++) - ar5212ResetTxQueue(ah, i); + ah-ah_resetTxQueue(ah, i); ar5416InitIMR(ah, opmode); ar5212SetCoverageClass(ah, AH_PRIVATE(ah)-ah_coverageClass, 1); ___ 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: r219771 - in head/sys/dev/ath/ath_hal: ar5212 ar5416
Author: adrian Date: Sat Mar 19 03:15:28 2011 New Revision: 219771 URL: http://svn.freebsd.org/changeset/base/219771 Log: Make sure that the AR_MISC_MODE value from the initvals are properly respected. This commit really is fix the OFDM duration calculation to match reality when running in 802.11g mode. The AR5212 init vals set AR_MISC_MODE to 0x0 and all the bits that can be set are set through code. The AR5416 and later initvals set AR_MISC_MODE to various other values (with the AR5212 AR_MISC_MODE options cleared), which include AR_PCU_CCK_SIFS_MODE . This adds 6uS to SIFS on non-CCK frames when transmitting. This fixes the issue where _DATA_ 802.11g OFDM frames were being TX'ed with the ACK duration set to 38uS, not 44uS as on the AR5212 (and other devices.) The AR5212 TX pathway obeys the software-programmed duration field in the packet, but the 11n TX pathway overrides that with a hardware-calculated duration. This was getting it wrong because of the above AR_MISC_MODE setting. I've verified that 11g data OFDM frames are now being TXed with the correct ACK+SIFS duration programmed in. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c == --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sat Mar 19 03:09:21 2011(r219770) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sat Mar 19 03:15:28 2011(r219771) @@ -934,7 +934,7 @@ ar5212SetCapability(struct ath_hal *ah, else ahp-ah_miscMode |= AR_MISC_MODE_MIC_NEW_LOC_ENABLE; /* NB: write here so keys can be setup w/o a reset */ - OS_REG_WRITE(ah, AR_MISC_MODE, ahp-ah_miscMode); + OS_REG_WRITE(ah, AR_MISC_MODE, OS_REG_READ(ah, AR_MISC_MODE) | ahp-ah_miscMode); return AH_TRUE; case HAL_CAP_DIVERSITY: if (ahp-ah_phyPowerOn) { Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c == --- head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Mar 19 03:09:21 2011(r219770) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Mar 19 03:15:28 2011(r219771) @@ -199,7 +199,7 @@ ar5212SetRxFilter(struct ath_hal *ah, ui ahp-ah_miscMode |= AR_MISC_MODE_BSSID_MATCH_FORCE; else ahp-ah_miscMode = ~AR_MISC_MODE_BSSID_MATCH_FORCE; - OS_REG_WRITE(ah, AR_MISC_MODE, ahp-ah_miscMode); + OS_REG_WRITE(ah, AR_MISC_MODE, OS_REG_READ(ah, AR_MISC_MODE) | ahp-ah_miscMode); } } Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat Mar 19 03:09:21 2011(r219770) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Sat Mar 19 03:15:28 2011(r219771) @@ -372,7 +372,7 @@ ar5416Attach(uint16_t devid, HAL_SOFTC s * placed into hardware. */ if (ahp-ah_miscMode != 0) - OS_REG_WRITE(ah, AR_MISC_MODE, ahp-ah_miscMode); + OS_REG_WRITE(ah, AR_MISC_MODE, OS_REG_READ(ah, AR_MISC_MODE) | ahp-ah_miscMode); rfStatus = ar2133RfAttach(ah, ecode); if (!rfStatus) { Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat Mar 19 03:09:21 2011(r219770) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat Mar 19 03:15:28 2011(r219771) @@ -581,7 +581,7 @@ ar5416InitUserSettings(struct ath_hal *a /* Restore user-specified settings */ if (ahp-ah_miscMode != 0) - OS_REG_WRITE(ah, AR_MISC_MODE, ahp-ah_miscMode); + OS_REG_WRITE(ah, AR_MISC_MODE, OS_REG_READ(ah, AR_MISC_MODE) | ahp-ah_miscMode); if (ahp-ah_sifstime != (u_int) -1) ar5212SetSifsTime(ah, ahp-ah_sifstime); if (ahp-ah_slottime != (u_int) -1) ___ 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