svn commit: r214907 - head/usr.sbin/apmd
Author: joel (doc committer) Date: Sun Nov 7 07:16:35 2010 New Revision: 214907 URL: http://svn.freebsd.org/changeset/base/214907 Log: Remove extraneous Aq. Modified: head/usr.sbin/apmd/apmd.8 Modified: head/usr.sbin/apmd/apmd.8 == --- head/usr.sbin/apmd/apmd.8 Sun Nov 7 06:46:52 2010(r214906) +++ head/usr.sbin/apmd/apmd.8 Sun Nov 7 07:16:35 2010(r214907) @@ -1,6 +1,6 @@ .\ Copyright (c) 1999 Mitsuru IWASAKI iwas...@freebsd.org .\ Copyright (c) 1999 KOIE Hidetaka k...@suri.co.jp -.\ Copyright (c) 1999 Yoshihiko SARUMARU Aq mist...@imasy.or.jp +.\ Copyright (c) 1999 Yoshihiko SARUMARU mist...@imasy.or.jp .\ Copyright (c) 1999 Norihiro Kumagai k...@nk.rim.or.jp .\ All rights reserved. .\ ___ 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: r214908 - head/usr.bin/objformat
Author: uqs Date: Sun Nov 7 10:49:40 2010 New Revision: 214908 URL: http://svn.freebsd.org/changeset/base/214908 Log: Retire objformat(1), take two. It's been almost four years, and this placeholder has not been needed. Deleted: head/usr.bin/objformat/ ___ 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: r214909 - in stable/8/sys: arm/xscale/ixp425 dev/ae dev/age dev/alc dev/ale dev/bfe dev/bge dev/bm dev/cas dev/dc dev/fxp dev/gem dev/hme dev/jme dev/mge dev/mii dev/msk dev/pcn dev/re ...
Author: marius Date: Sun Nov 7 11:12:29 2010 New Revision: 214909 URL: http://svn.freebsd.org/changeset/base/214909 Log: MFC: r213893, r213908, r214566, r214605, r214846 Convert the PHY drivers to honor the mii_flags passed down and convert the NIC drivers as well as the PHY drivers to take advantage of the mii_attach() introduced in r213878 (MFC'ed to stable/8 in r214684) to get rid of certain hacks. For the most part these were: - Artificially limiting miibus_{read,write}reg methods to certain PHY addresses; we now let mii_attach() only probe the PHY at the desired address(es) instead. - PHY drivers setting MIIF_* flags based on the NIC driver they hang off from, partly even based on grabbing and using the softc of the parent; we now pass these flags down from the NIC to the PHY drivers via mii_attach(). This got us rid of all such hacks except those of brgphy() in combination with bce(4) and bge(4), which is way beyond what can be expressed with simple flags. While at it, I took the opportunity to change the NIC drivers to pass up the error returned by mii_attach() (previously by mii_phy_probe()) and unify the error message used in this case where and as appropriate as mii_attach() actually can fail for a number of reasons, not just because of no PHY(s) being present at the expected address(es). Reviewed by: jhb, yongari Modified: stable/8/sys/arm/xscale/ixp425/if_npe.c stable/8/sys/dev/ae/if_ae.c stable/8/sys/dev/ae/if_aevar.h stable/8/sys/dev/age/if_age.c stable/8/sys/dev/alc/if_alc.c stable/8/sys/dev/ale/if_ale.c stable/8/sys/dev/bfe/if_bfe.c stable/8/sys/dev/bge/if_bge.c stable/8/sys/dev/bge/if_bgereg.h stable/8/sys/dev/bm/if_bm.c stable/8/sys/dev/cas/if_cas.c stable/8/sys/dev/cas/if_casvar.h stable/8/sys/dev/dc/dcphy.c stable/8/sys/dev/dc/if_dc.c stable/8/sys/dev/dc/pnphy.c stable/8/sys/dev/fxp/if_fxp.c stable/8/sys/dev/gem/if_gem.c stable/8/sys/dev/gem/if_gemvar.h stable/8/sys/dev/hme/if_hme.c stable/8/sys/dev/jme/if_jme.c stable/8/sys/dev/mge/if_mge.c stable/8/sys/dev/mii/acphy.c stable/8/sys/dev/mii/amphy.c stable/8/sys/dev/mii/atphy.c stable/8/sys/dev/mii/axphy.c stable/8/sys/dev/mii/bmtphy.c stable/8/sys/dev/mii/brgphy.c stable/8/sys/dev/mii/ciphy.c stable/8/sys/dev/mii/e1000phy.c stable/8/sys/dev/mii/exphy.c stable/8/sys/dev/mii/gentbi.c stable/8/sys/dev/mii/icsphy.c stable/8/sys/dev/mii/inphy.c stable/8/sys/dev/mii/ip1000phy.c stable/8/sys/dev/mii/jmphy.c stable/8/sys/dev/mii/lxtphy.c stable/8/sys/dev/mii/miivar.h stable/8/sys/dev/mii/mlphy.c stable/8/sys/dev/mii/nsgphy.c stable/8/sys/dev/mii/nsphy.c stable/8/sys/dev/mii/nsphyter.c stable/8/sys/dev/mii/pnaphy.c stable/8/sys/dev/mii/qsphy.c stable/8/sys/dev/mii/rgephy.c stable/8/sys/dev/mii/rlphy.c stable/8/sys/dev/mii/rlswitch.c stable/8/sys/dev/mii/ruephy.c stable/8/sys/dev/mii/smcphy.c stable/8/sys/dev/mii/tdkphy.c stable/8/sys/dev/mii/tlphy.c stable/8/sys/dev/mii/truephy.c stable/8/sys/dev/mii/ukphy.c stable/8/sys/dev/mii/xmphy.c stable/8/sys/dev/msk/if_msk.c stable/8/sys/dev/pcn/if_pcn.c stable/8/sys/dev/re/if_re.c stable/8/sys/dev/sk/if_sk.c stable/8/sys/dev/ste/if_ste.c stable/8/sys/dev/stge/if_stge.c stable/8/sys/dev/tsec/if_tsec.c stable/8/sys/dev/vge/if_vge.c stable/8/sys/dev/vr/if_vr.c stable/8/sys/dev/vr/if_vrreg.h stable/8/sys/dev/xl/if_xl.c stable/8/sys/pci/if_rl.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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/arm/xscale/ixp425/if_npe.c == --- stable/8/sys/arm/xscale/ixp425/if_npe.c Sun Nov 7 10:49:40 2010 (r214908) +++ stable/8/sys/arm/xscale/ixp425/if_npe.c Sun Nov 7 11:12:29 2010 (r214909) @@ -137,7 +137,6 @@ struct npe_softc { int rx_freeqid; /* rx free buffers qid */ int tx_qid; /* tx qid */ int tx_doneqid; /* tx completed qid */ - int sc_phy; /* PHY id */ struct ifmib_iso_8802_3 mibdata; bus_dma_tag_t sc_stats_tag; /* bus dma tag for stats block */ struct npestats *sc_stats; @@ -668,7 +667,7 @@ static int npe_activate(device_t dev) { struct npe_softc *sc = device_get_softc(dev); - int error, i, macbase, miibase; + int error, i, macbase, miibase, phy; /* * Setup NEP ID, MAC, and MII bindings. We allow override @@ -693,8 +692,8 @@ npe_activate(device_t dev) } /* PHY */ - if (!override_unit(dev, phy, sc-sc_phy, 0, MII_NPHY-1)) - sc-sc_phy
svn commit: r214910 - in stable/7/sys: arm/xscale/ixp425 dev/ae dev/age dev/alc dev/ale dev/bfe dev/bge dev/bm dev/cas dev/dc dev/fxp dev/gem dev/hme dev/jme dev/mii dev/msk dev/pcn dev/re dev/sk d...
Author: marius Date: Sun Nov 7 11:12:30 2010 New Revision: 214910 URL: http://svn.freebsd.org/changeset/base/214910 Log: MFC: r213893, r213908, r214566, r214605, r214846 Convert the PHY drivers to honor the mii_flags passed down and convert the NIC drivers as well as the PHY drivers to take advantage of the mii_attach() introduced in r213878 (MFC'ed to stable/8 in r214685) to get rid of certain hacks. For the most part these were: - Artificially limiting miibus_{read,write}reg methods to certain PHY addresses; we now let mii_attach() only probe the PHY at the desired address(es) instead. - PHY drivers setting MIIF_* flags based on the NIC driver they hang off from, partly even based on grabbing and using the softc of the parent; we now pass these flags down from the NIC to the PHY drivers via mii_attach(). This got us rid of all such hacks except those of brgphy() in combination with bce(4) and bge(4), which is way beyond what can be expressed with simple flags. While at it, I took the opportunity to change the NIC drivers to pass up the error returned by mii_attach() (previously by mii_phy_probe()) and unify the error message used in this case where and as appropriate as mii_attach() actually can fail for a number of reasons, not just because of no PHY(s) being present at the expected address(es). Reviewed by: jhb, yongari Modified: stable/7/sys/arm/xscale/ixp425/if_npe.c stable/7/sys/dev/ae/if_ae.c stable/7/sys/dev/ae/if_aevar.h stable/7/sys/dev/age/if_age.c stable/7/sys/dev/alc/if_alc.c stable/7/sys/dev/ale/if_ale.c stable/7/sys/dev/bfe/if_bfe.c stable/7/sys/dev/bge/if_bge.c stable/7/sys/dev/bge/if_bgereg.h stable/7/sys/dev/bm/if_bm.c stable/7/sys/dev/cas/if_cas.c stable/7/sys/dev/cas/if_casvar.h stable/7/sys/dev/dc/if_dc.c stable/7/sys/dev/dc/pnphy.c stable/7/sys/dev/fxp/if_fxp.c stable/7/sys/dev/gem/if_gem.c stable/7/sys/dev/gem/if_gemvar.h stable/7/sys/dev/hme/if_hme.c stable/7/sys/dev/jme/if_jme.c stable/7/sys/dev/mii/acphy.c stable/7/sys/dev/mii/amphy.c stable/7/sys/dev/mii/atphy.c stable/7/sys/dev/mii/bmtphy.c stable/7/sys/dev/mii/brgphy.c stable/7/sys/dev/mii/ciphy.c stable/7/sys/dev/mii/e1000phy.c stable/7/sys/dev/mii/exphy.c stable/7/sys/dev/mii/gentbi.c stable/7/sys/dev/mii/icsphy.c stable/7/sys/dev/mii/inphy.c stable/7/sys/dev/mii/ip1000phy.c stable/7/sys/dev/mii/jmphy.c stable/7/sys/dev/mii/lxtphy.c stable/7/sys/dev/mii/mlphy.c stable/7/sys/dev/mii/nsgphy.c stable/7/sys/dev/mii/nsphy.c stable/7/sys/dev/mii/nsphyter.c stable/7/sys/dev/mii/pnaphy.c stable/7/sys/dev/mii/qsphy.c stable/7/sys/dev/mii/rgephy.c stable/7/sys/dev/mii/rlphy.c stable/7/sys/dev/mii/rlswitch.c stable/7/sys/dev/mii/ruephy.c stable/7/sys/dev/mii/tdkphy.c stable/7/sys/dev/mii/tlphy.c stable/7/sys/dev/mii/truephy.c stable/7/sys/dev/mii/ukphy.c stable/7/sys/dev/mii/xmphy.c stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/pcn/if_pcn.c stable/7/sys/dev/re/if_re.c stable/7/sys/dev/sk/if_sk.c stable/7/sys/dev/ste/if_ste.c stable/7/sys/dev/stge/if_stge.c stable/7/sys/dev/vge/if_vge.c stable/7/sys/dev/vr/if_vr.c stable/7/sys/dev/vr/if_vrreg.h stable/7/sys/pci/if_rl.c stable/7/sys/pci/if_xl.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/arm/xscale/ixp425/if_npe.c == --- stable/7/sys/arm/xscale/ixp425/if_npe.c Sun Nov 7 11:12:29 2010 (r214909) +++ stable/7/sys/arm/xscale/ixp425/if_npe.c Sun Nov 7 11:12:30 2010 (r214910) @@ -318,11 +318,13 @@ npe_attach(device_t dev) npe_getmac(sc, eaddr); - /* NB: must be setup prior to invoking mii code */ sc-sc_ifp = ifp = if_alloc(IFT_ETHER); - if (mii_phy_probe(dev, sc-sc_mii, npe_ifmedia_update, npe_ifmedia_status)) { - device_printf(dev, Cannot find my PHY.\n); - error = ENXIO; + error = mii_attach(dev, sc-sc_mii, ifp, npe_ifmedia_update, + npe_ifmedia_status, BMSR_DEFCAPMASK, sc-sc_phy, MII_OFFSET_ANY, + 0); + if (error != 0) { + device_printf(dev, attaching PHYs failed\n); + return error; goto out; } @@ -1596,8 +1598,6 @@ npe_miibus_readreg(device_t dev, int phy struct npe_softc *sc = device_get_softc(dev); uint32_t v; - if (phy != sc-sc_phy) /* XXX no auto-detect */ - return 0x; v = (phy NPE_MII_ADDR_SHL) | (reg NPE_MII_REG_SHL) | NPE_MII_GO; npe_mii_mdio_write(sc, NPE_MAC_MDIO_CMD, v); @@ -1615,8 +1615,6 @@ npe_miibus_writereg(device_t dev, int ph struct npe_softc *sc = device_get_softc(dev);
svn commit: r214911 - stable/8/etc/periodic/security
Author: delphij Date: Sun Nov 7 11:39:48 2010 New Revision: 214911 URL: http://svn.freebsd.org/changeset/base/214911 Log: Revert r214897 in order to finish the merge properly without stopping svn2cvs. Pointy hat to:delphij Deleted: stable/8/etc/periodic/security/460.chkportsum Modified: stable/8/etc/periodic/security/Makefile Modified: stable/8/etc/periodic/security/Makefile == --- stable/8/etc/periodic/security/Makefile Sun Nov 7 11:12:30 2010 (r214910) +++ stable/8/etc/periodic/security/Makefile Sun Nov 7 11:39:48 2010 (r214911) @@ -6,7 +6,6 @@ FILES= 100.chksetuid \ 200.chkmounts \ 300.chkuid0 \ 400.passwdless \ - 460.chkportsum \ 410.logincheck \ 700.kernelmsg \ 800.loginfail \ ___ 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: r214912 - in stable/8/etc: defaults periodic/security
Author: delphij Date: Sun Nov 7 11:51:57 2010 New Revision: 214912 URL: http://svn.freebsd.org/changeset/base/214912 Log: Redo r214897: MFC r211141 (gabor) - Fixes to the chkportsum script to handle better some special cases, like spaces in filename Submitted by: Alex Kozlov s...@rm-rf.kiev.ua MFC r210254 (gabor) - Add a periodic script, which can be used to find installed ports' files with mismatched checksum PR: conf/124641 Submitted by: Alex Kozlov s...@rm-rf.kiev.ua Added: stable/8/etc/periodic/security/460.chkportsum - copied, changed from r210254, head/etc/periodic/security/460.chkportsum Modified: stable/8/etc/defaults/periodic.conf stable/8/etc/periodic/security/Makefile Directory Properties: stable/8/etc/periodic/security/ (props changed) Modified: stable/8/etc/defaults/periodic.conf == --- stable/8/etc/defaults/periodic.conf Sun Nov 7 11:39:48 2010 (r214911) +++ stable/8/etc/defaults/periodic.conf Sun Nov 7 11:51:57 2010 (r214912) @@ -171,6 +171,9 @@ daily_status_security_passwdless_enable= # 410.logincheck daily_status_security_logincheck_enable=YES +# 460.chkportsum +daily_status_security_chkportsum_enable=NO # Check ports w/ wrong checksum + # 500.ipfwdenied daily_status_security_ipfwdenied_enable=YES Copied and modified: stable/8/etc/periodic/security/460.chkportsum (from r210254, head/etc/periodic/security/460.chkportsum) == --- head/etc/periodic/security/460.chkportsum Mon Jul 19 20:19:14 2010 (r210254, copy source) +++ stable/8/etc/periodic/security/460.chkportsum Sun Nov 7 11:51:57 2010(r214912) @@ -42,20 +42,20 @@ echo 'Checking for ports with mismatched case ${daily_status_security_chkportsum_enable} in [Yy][Ee][Ss]) + set -f pkg_info -ga 2/dev/null | \ - while read one two three; do - case ${one} in + while IFS= read -r line; do + set -- $line + case $1 in Information) - case ${two} in - for) name=${three%%:} ;; - *) name='??' ;; + case $2 in + for) name=${3%%:} ;; + *) name='??' ;; esac ;; Mismatched|'') ;; - *) - if [ -n ${name} ]; then - echo ${name}: ${one} - fi + *) [ -n ${name} ] + echo ${name}: ${line%% fails the original MD5 checksum} ;; esac done Modified: stable/8/etc/periodic/security/Makefile == --- stable/8/etc/periodic/security/Makefile Sun Nov 7 11:39:48 2010 (r214911) +++ stable/8/etc/periodic/security/Makefile Sun Nov 7 11:51:57 2010 (r214912) @@ -7,6 +7,7 @@ FILES= 100.chksetuid \ 300.chkuid0 \ 400.passwdless \ 410.logincheck \ + 460.chkportsum \ 700.kernelmsg \ 800.loginfail \ 900.tcpwrap \ ___ 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: r214913 - head/sys/dev/wb
Author: marius Date: Sun Nov 7 12:29:26 2010 New Revision: 214913 URL: http://svn.freebsd.org/changeset/base/214913 Log: Fix indentation in r213894. Modified: head/sys/dev/wb/if_wb.c Modified: head/sys/dev/wb/if_wb.c == --- head/sys/dev/wb/if_wb.c Sun Nov 7 11:51:57 2010(r214912) +++ head/sys/dev/wb/if_wb.c Sun Nov 7 12:29:26 2010(r214913) @@ -857,7 +857,7 @@ wb_attach(dev) */ error = mii_attach(dev, sc-wb_miibus, ifp, wb_ifmedia_upd, wb_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); - if (error != 0) { + if (error != 0) { device_printf(dev, attaching PHYs failed\n); goto fail; } ___ 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: r214917 - head/sys/kern
Author: jh Date: Sun Nov 7 14:28:01 2010 New Revision: 214917 URL: http://svn.freebsd.org/changeset/base/214917 Log: Add missing curly brackets. By chance, the missing brackets didn't alter the code behavior. Submitted by: Lucius Windschuh Modified: head/sys/kern/kern_conf.c Modified: head/sys/kern/kern_conf.c == --- head/sys/kern/kern_conf.c Sun Nov 7 13:50:42 2010(r214916) +++ head/sys/kern/kern_conf.c Sun Nov 7 14:28:01 2010(r214917) @@ -752,7 +752,7 @@ make_dev_credv(int flags, struct cdev ** return (res); } dev = newdev(devsw, unit, dev_new); - if ((dev-si_flags SI_NAMED) == 0) + if ((dev-si_flags SI_NAMED) == 0) { res = prep_devname(dev, fmt, ap); if (res != 0) { if ((flags MAKEDEV_CHECKNAME) == 0) { @@ -766,6 +766,7 @@ make_dev_credv(int flags, struct cdev ** devfs_free(dev); } return (res); + } } if (flags MAKEDEV_REF) dev_refl(dev); ___ 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: r214918 - head/sys/netinet
Author: tuexen Date: Sun Nov 7 14:39:40 2010 New Revision: 214918 URL: http://svn.freebsd.org/changeset/base/214918 Log: Not only stop all timers when entering the SHUTDOWN_SENT state, but also when entering the SHUTDOWN_ACK_SEND state. MFC after: 3 days. Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_indata.c == --- head/sys/netinet/sctp_indata.c Sun Nov 7 14:28:01 2010 (r214917) +++ head/sys/netinet/sctp_indata.c Sun Nov 7 14:39:40 2010 (r214918) @@ -4369,7 +4369,7 @@ again: SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING); sctp_send_shutdown_ack(stcb, stcb-asoc.primary_destination); - + sctp_stop_timers_for_shutdown(stcb); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb-sctp_ep, stcb, asoc-primary_destination); } @@ -5081,7 +5081,7 @@ done_with_it: SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING); sctp_send_shutdown_ack(stcb, stcb-asoc.primary_destination); - + sctp_stop_timers_for_shutdown(stcb); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb-sctp_ep, stcb, asoc-primary_destination); return; Modified: head/sys/netinet/sctp_input.c == --- head/sys/netinet/sctp_input.c Sun Nov 7 14:28:01 2010 (r214917) +++ head/sys/netinet/sctp_input.c Sun Nov 7 14:39:40 2010 (r214918) @@ -908,9 +908,7 @@ sctp_handle_shutdown(struct sctp_shutdow } SCTP_SET_STATE(asoc, SCTP_STATE_SHUTDOWN_ACK_SENT); SCTP_CLEAR_SUBSTATE(asoc, SCTP_STATE_SHUTDOWN_PENDING); - sctp_timer_stop(SCTP_TIMER_TYPE_RECV, stcb-sctp_ep, stcb, net, - SCTP_FROM_SCTP_INPUT + SCTP_LOC_7); - /* start SHUTDOWN timer */ + sctp_stop_timers_for_shutdown(stcb); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNACK, stcb-sctp_ep, stcb, net); } Modified: head/sys/netinet/sctputil.c == --- head/sys/netinet/sctputil.c Sun Nov 7 14:28:01 2010(r214917) +++ head/sys/netinet/sctputil.c Sun Nov 7 14:39:40 2010(r214918) @@ -725,6 +725,31 @@ sctp_audit_log(uint8_t ev, uint8_t fd) #endif /* + * sctp_stop_timers_for_shutdown() should be called + * when entering the SHUTDOWN_SENT or SHUTDOWN_ACK_SENT + * state to make sure that all timers are stopped. + */ +void +sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) +{ + struct sctp_association *asoc; + struct sctp_nets *net; + + asoc = stcb-asoc; + + (void)SCTP_OS_TIMER_STOP(asoc-hb_timer.timer); + (void)SCTP_OS_TIMER_STOP(asoc-dack_timer.timer); + (void)SCTP_OS_TIMER_STOP(asoc-strreset_timer.timer); + (void)SCTP_OS_TIMER_STOP(asoc-asconf_timer.timer); + (void)SCTP_OS_TIMER_STOP(asoc-autoclose_timer.timer); + (void)SCTP_OS_TIMER_STOP(asoc-delayed_event_timer.timer); + TAILQ_FOREACH(net, asoc-nets, sctp_next) { + (void)SCTP_OS_TIMER_STOP(net-fr_timer.timer); + (void)SCTP_OS_TIMER_STOP(net-pmtu_timer.timer); + } +} + +/* * a list of sizes based on typical mtu's, used only if next hop size not * returned. */ @@ -749,26 +774,6 @@ static int sctp_mtu_sizes[] = { 65535 }; -void -sctp_stop_timers_for_shutdown(struct sctp_tcb *stcb) -{ - struct sctp_association *asoc; - struct sctp_nets *net; - - asoc = stcb-asoc; - - (void)SCTP_OS_TIMER_STOP(asoc-hb_timer.timer); - (void)SCTP_OS_TIMER_STOP(asoc-dack_timer.timer); - (void)SCTP_OS_TIMER_STOP(asoc-strreset_timer.timer); - (void)SCTP_OS_TIMER_STOP(asoc-asconf_timer.timer); - (void)SCTP_OS_TIMER_STOP(asoc-autoclose_timer.timer); - (void)SCTP_OS_TIMER_STOP(asoc-delayed_event_timer.timer); - TAILQ_FOREACH(net, asoc-nets, sctp_next) { - (void)SCTP_OS_TIMER_STOP(net-fr_timer.timer); - (void)SCTP_OS_TIMER_STOP(net-pmtu_timer.timer); - } -} - int find_next_best_mtu(int totsz) { ___ 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: r214919 - head/sys/dev/usb/serial
Author: n_hibma Date: Sun Nov 7 15:36:07 2010 New Revision: 214919 URL: http://svn.freebsd.org/changeset/base/214919 Log: Bugfix: Set the bit that marks a device number in use. This would cause a panic when disconnecting the second serial device. Submitted by: Lucius Windschuh Modified: head/sys/dev/usb/serial/usb_serial.c Modified: head/sys/dev/usb/serial/usb_serial.c == --- head/sys/dev/usb/serial/usb_serial.cSun Nov 7 14:39:40 2010 (r214918) +++ head/sys/dev/usb/serial/usb_serial.cSun Nov 7 15:36:07 2010 (r214919) @@ -200,9 +200,12 @@ ucom_unit_alloc(void) mtx_lock(ucom_bitmap_mtx); - for (unit = 0; unit UCOM_UNIT_MAX; unit++) - if ((ucom_bitmap[unit / 8] (1 (unit % 8))) == 0) + for (unit = 0; unit UCOM_UNIT_MAX; unit++) { + if ((ucom_bitmap[unit / 8] (1 (unit % 8))) == 0) { + ucom_bitmap[unit / 8] |= (1 (unit % 8)); break; + } + } mtx_unlock(ucom_bitmap_mtx); ___ 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: r214921 - in head/usr.sbin/makefs: . cd9660 compat ffs
Author: cognet Date: Sun Nov 7 16:05:04 2010 New Revision: 214921 URL: http://svn.freebsd.org/changeset/base/214921 Log: Sync with the latest version from NetBSD. It notably addds ISO9660 support. Submitted by: bapt Added: head/usr.sbin/makefs/cd9660/ head/usr.sbin/makefs/cd9660.c (contents, props changed) head/usr.sbin/makefs/cd9660.h (contents, props changed) head/usr.sbin/makefs/cd9660/Makefile.inc (contents, props changed) head/usr.sbin/makefs/cd9660/cd9660_archimedes.c (contents, props changed) head/usr.sbin/makefs/cd9660/cd9660_archimedes.h (contents, props changed) head/usr.sbin/makefs/cd9660/cd9660_conversion.c (contents, props changed) head/usr.sbin/makefs/cd9660/cd9660_debug.c (contents, props changed) head/usr.sbin/makefs/cd9660/cd9660_eltorito.c (contents, props changed) head/usr.sbin/makefs/cd9660/cd9660_eltorito.h (contents, props changed) head/usr.sbin/makefs/cd9660/cd9660_strings.c (contents, props changed) head/usr.sbin/makefs/cd9660/cd9660_write.c (contents, props changed) head/usr.sbin/makefs/cd9660/iso9660_rrip.c (contents, props changed) head/usr.sbin/makefs/cd9660/iso9660_rrip.h (contents, props changed) head/usr.sbin/makefs/compat/Makefile.inc (contents, props changed) head/usr.sbin/makefs/ffs.h (contents, props changed) head/usr.sbin/makefs/ffs/Makefile.inc (contents, props changed) Modified: head/usr.sbin/makefs/Makefile head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs/buf.c head/usr.sbin/makefs/ffs/ffs_alloc.c head/usr.sbin/makefs/ffs/mkfs.c head/usr.sbin/makefs/makefs.8 head/usr.sbin/makefs/makefs.c head/usr.sbin/makefs/makefs.h head/usr.sbin/makefs/walk.c Modified: head/usr.sbin/makefs/Makefile == --- head/usr.sbin/makefs/Makefile Sun Nov 7 15:41:41 2010 (r214920) +++ head/usr.sbin/makefs/Makefile Sun Nov 7 16:05:04 2010 (r214921) @@ -1,22 +1,23 @@ # $FreeBSD$ PROG= makefs + +CFLAGS+=-I${.CURDIR} + +SRCS= cd9660.c ffs.c \ + getid.c \ + makefs.c \ + walk.c MAN= makefs.8 WARNS?=2 -CFLAGS+=-I${.CURDIR} -SRCS= ffs.c getid.c makefs.c walk.c +.include ${.CURDIR}/cd9660/Makefile.inc +.include ${.CURDIR}/ffs/Makefile.inc +.include ${.CURDIR}/compat/Makefile.inc -.PATH: ${.CURDIR}/ffs -CFLAGS+=-I${.CURDIR}/ffs CFLAGS+=-DHAVE_STRUCT_STAT_ST_FLAGS=1 CFLAGS+=-DHAVE_STRUCT_STAT_ST_GEN=1 -SRCS+= buf.c ffs_alloc.c ffs_balloc.c ffs_bswap.c ffs_subr.c mkfs.c ufs_bmap.c - -.PATH: ${.CURDIR}/compat -CFLAGS+=-I${.CURDIR}/compat -SRCS+= pwcache.c strsuftoll.c .PATH: ${.CURDIR}/../mtree CFLAGS+=-I${.CURDIR}/../mtree Added: head/usr.sbin/makefs/cd9660.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/makefs/cd9660.c Sun Nov 7 16:05:04 2010 (r214921) @@ -0,0 +1,2154 @@ +/* $NetBSD: cd9660.c,v 1.27 2010/10/27 18:51:34 christos Exp $ */ + +/* + * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan + * Perez-Rathke and Ram Vedam. All rights reserved. + * + * This code was written by Daniel Watt, Walter Deignan, Ryan Gabrys, + * Alan Perez-Rathke and Ram Vedam. + * + * Redistribution and use in source and binary forms, with or + * without modification, are permitted provided that the following + * conditions are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above + *copyright notice, this list of conditions and the following + *disclaimer in the documentation and/or other materials provided + *with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY DANIEL WATT, WALTER DEIGNAN, RYAN + * GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL DANIEL WATT, WALTER DEIGNAN, RYAN + * GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE,DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + */ +/* + * Copyright (c) 2001 Wasabi Systems, Inc. + * All rights reserved. + * + * Written by Luke Mewburn for Wasabi Systems, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided
Re: svn commit: r214921 - in head/usr.sbin/makefs: . cd9660 compat ffs
* Olivier Houchard cog...@freebsd.org, 20101107 17:05: Sync with the latest version from NetBSD. It notably addds ISO9660 support. Thank you! -- Ed Schouten e...@80386.nl WWW: http://80386.nl/ pgpIX5Y9tdTGL.pgp Description: PGP signature
svn commit: r214922 - in stable/8/sys: arm/at91 dev/bce dev/ed dev/et dev/lge dev/nfe dev/nge dev/nve dev/sf dev/sge dev/sis dev/smc dev/tl dev/tx dev/usb/net dev/wb mips/idt
Author: marius Date: Sun Nov 7 16:56:29 2010 New Revision: 214922 URL: http://svn.freebsd.org/changeset/base/214922 Log: MFC: r213894, r213896, r214913 Converted the remainder of the NIC drivers to use the mii_attach() introduced in r213878 (MFC'ed to stable/8 in r214685) instead of mii_phy_probe(). Unlike r213893 (MFC'ed to stable/8 in r214909) these are only straight forward conversions though. Reviewed by: yongari Modified: stable/8/sys/arm/at91/if_ate.c stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/ed/if_ed_pccard.c stable/8/sys/dev/et/if_et.c stable/8/sys/dev/lge/if_lge.c stable/8/sys/dev/nfe/if_nfe.c stable/8/sys/dev/nge/if_nge.c stable/8/sys/dev/nve/if_nve.c stable/8/sys/dev/sf/if_sf.c stable/8/sys/dev/sge/if_sge.c stable/8/sys/dev/sis/if_sis.c stable/8/sys/dev/smc/if_smc.c stable/8/sys/dev/tl/if_tl.c stable/8/sys/dev/tx/if_tx.c stable/8/sys/dev/usb/net/usb_ethernet.c stable/8/sys/dev/wb/if_wb.c stable/8/sys/mips/idt/if_kr.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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/arm/at91/if_ate.c == --- stable/8/sys/arm/at91/if_ate.c Sun Nov 7 16:05:04 2010 (r214921) +++ stable/8/sys/arm/at91/if_ate.c Sun Nov 7 16:56:29 2010 (r214922) @@ -258,9 +258,10 @@ ate_attach(device_t dev) } sc-ifp = ifp = if_alloc(IFT_ETHER); - if (mii_phy_probe(dev, sc-miibus, ate_ifmedia_upd, ate_ifmedia_sts)) { - device_printf(dev, Cannot find my PHY.\n); - err = ENXIO; + err = mii_attach(dev, sc-miibus, ifp, ate_ifmedia_upd, + ate_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); + if (err != 0) { + device_printf(dev, attaching PHYs failed\n); goto out; } Modified: stable/8/sys/dev/bce/if_bce.c == --- stable/8/sys/dev/bce/if_bce.c Sun Nov 7 16:05:04 2010 (r214921) +++ stable/8/sys/dev/bce/if_bce.c Sun Nov 7 16:56:29 2010 (r214922) @@ -1134,12 +1134,13 @@ bce_attach(device_t dev) /* Handle any special PHY initialization for SerDes PHYs. */ bce_init_media(sc); - /* MII child bus by probing the PHY. */ - if (mii_phy_probe(dev, sc-bce_miibus, bce_ifmedia_upd, - bce_ifmedia_sts)) { - BCE_PRINTF(%s(%d): No PHY found on child MII bus!\n, - __FILE__, __LINE__); - rc = ENXIO; + /* MII child bus by attaching the PHY. */ + rc = mii_attach(dev, sc-bce_miibus, ifp, bce_ifmedia_upd, + bce_ifmedia_sts, BMSR_DEFCAPMASK, sc-bce_phy_addr, + MII_OFFSET_ANY, 0); + if (rc != 0) { + BCE_PRINTF(%s(%d): attaching PHYs failed\n, __FILE__, + __LINE__); goto bce_attach_fail; } Modified: stable/8/sys/dev/ed/if_ed_pccard.c == --- stable/8/sys/dev/ed/if_ed_pccard.c Sun Nov 7 16:05:04 2010 (r214921) +++ stable/8/sys/dev/ed/if_ed_pccard.c Sun Nov 7 16:56:29 2010 (r214922) @@ -578,25 +578,21 @@ ed_pccard_attach(device_t dev) goto bad; if (sc-chip_type == ED_CHIP_TYPE_DL10019 || sc-chip_type == ED_CHIP_TYPE_DL10022) { - /* Probe for an MII bus, but ignore errors. */ + /* Try to attach an MII bus, but ignore errors. */ ed_pccard_dl100xx_mii_reset(sc); - (void)mii_phy_probe(dev, sc-miibus, ed_ifmedia_upd, - ed_ifmedia_sts); + (void)mii_attach(dev, sc-miibus, sc-ifp, ed_ifmedia_upd, + ed_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, + MII_OFFSET_ANY, 0); } else if (sc-chip_type == ED_CHIP_TYPE_AX88190 || - sc-chip_type == ED_CHIP_TYPE_AX88790) { - if ((error = mii_phy_probe(dev, sc-miibus, ed_ifmedia_upd, -ed_ifmedia_sts)) != 0) { - device_printf(dev, Missing mii %d!\n, error); + sc-chip_type == ED_CHIP_TYPE_AX88790 || + sc-chip_type == ED_CHIP_TYPE_TC5299J) { + error = mii_attach(dev, sc-miibus, sc-ifp, ed_ifmedia_upd, + ed_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, + MII_OFFSET_ANY, 0); + if (error != 0) { + device_printf(dev, attaching PHYs failed\n); goto bad; } - - } else if (sc-chip_type == ED_CHIP_TYPE_TC5299J)
svn commit: r214923 - head/tools/regression/acltools
Author: trasz Date: Sun Nov 7 17:33:04 2010 New Revision: 214923 URL: http://svn.freebsd.org/changeset/base/214923 Log: Remove useless comment. Modified: head/tools/regression/acltools/tools-nfs4.test Modified: head/tools/regression/acltools/tools-nfs4.test == --- head/tools/regression/acltools/tools-nfs4.test Sun Nov 7 16:56:29 2010(r214922) +++ head/tools/regression/acltools/tools-nfs4.test Sun Nov 7 17:33:04 2010(r214923) @@ -527,7 +527,6 @@ $ setfacl -a0 owner@:r:allow,group@:w:de $ ls -ld ddd | cut -d' ' -f1 drx---+ -# XXX: This one is fishy. Shouldn't it be dr---wx---+? $ rmdir ddd $ mkdir ddd $ chmod 0 ddd ___ 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: r214924 - stable/8/sys/dev/mii
Author: marius Date: Sun Nov 7 17:35:42 2010 New Revision: 214924 URL: http://svn.freebsd.org/changeset/base/214924 Log: MFC: r214262 - Take advantage of mii_phy_dev_probe(). - Use mii_phy_add_media() instead of mii_add_media(). I'm not sure how this driver actually managed to work before as mii_add_media() is intended to be used to gether with mii_anar() while mii_phy_add_media() is intended to be used with mii_phy_setmedia(), however this driver mii_add_media() along with mii_phy_setmedia(). Modified: stable/8/sys/dev/mii/smcphy.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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/smcphy.c == --- stable/8/sys/dev/mii/smcphy.c Sun Nov 7 17:33:04 2010 (r214923) +++ stable/8/sys/dev/mii/smcphy.c Sun Nov 7 17:35:42 2010 (r214924) @@ -76,20 +76,16 @@ static driver_t smcphy_driver = { DRIVER_MODULE(smcphy, miibus, smcphy_driver, smcphy_devclass, 0, 0); +static const struct mii_phydesc smcphys[] = { + MII_PHY_DESC(SMSC, LAN83C183), + MII_PHY_END +}; + static int smcphy_probe(device_t dev) { - struct mii_attach_args *ma; - - ma = device_get_ivars(dev); - if (MII_OUI(ma-mii_id1, ma-mii_id2) != MII_OUI_SMSC || - MII_MODEL(ma-mii_id2) != MII_MODEL_SMSC_LAN83C183) - return (ENXIO); - - device_set_desc(dev, MII_STR_SMSC_LAN83C183); - - return (0); + return (mii_phy_dev_probe(dev, smcphys, BUS_PROBE_DEFAULT)); } static int @@ -111,7 +107,7 @@ smcphy_attach(device_t dev) sc-mii_service = smcphy_service; sc-mii_pdata = mii; - sc-mii_flags |= MIIF_NOISOLATE; + sc-mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP; if (smcphy_reset(sc) != 0) { device_printf(dev, reset failed\n); @@ -122,7 +118,7 @@ smcphy_attach(device_t dev) sc-mii_capabilities = PHY_READ(sc, MII_BMSR) ma-mii_capmask; device_printf(dev, ); - mii_add_media(sc); + mii_phy_add_media(sc); printf(\n); MIIBUS_MEDIAINIT(sc-mii_dev); ___ 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: r214925 - in stable/7/sys: arm/at91 dev/bce dev/ed dev/et dev/lge dev/nfe dev/nge dev/nve dev/sf dev/sge dev/sis dev/tx dev/usb pci
Author: marius Date: Sun Nov 7 17:38:54 2010 New Revision: 214925 URL: http://svn.freebsd.org/changeset/base/214925 Log: MFC: r213894, r213896, r214913 Converted the remainder of the NIC drivers to use the mii_attach() introduced in r213878 (MFC'ed to stable/7 in r214685) instead of mii_phy_probe(). Unlike r213893 (MFC'ed to stable/7 in r214910) these are mostly straight forward conversions though. Modified: stable/7/sys/arm/at91/if_ate.c stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/ed/if_ed_pccard.c stable/7/sys/dev/et/if_et.c stable/7/sys/dev/lge/if_lge.c stable/7/sys/dev/nfe/if_nfe.c stable/7/sys/dev/nge/if_nge.c stable/7/sys/dev/nve/if_nve.c stable/7/sys/dev/sf/if_sf.c stable/7/sys/dev/sge/if_sge.c stable/7/sys/dev/sis/if_sis.c stable/7/sys/dev/tx/if_tx.c stable/7/sys/dev/usb/if_aue.c stable/7/sys/dev/usb/if_axe.c stable/7/sys/dev/usb/if_rue.c stable/7/sys/dev/usb/if_udav.c stable/7/sys/pci/if_tl.c stable/7/sys/pci/if_wb.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/arm/at91/if_ate.c == --- stable/7/sys/arm/at91/if_ate.c Sun Nov 7 17:35:42 2010 (r214924) +++ stable/7/sys/arm/at91/if_ate.c Sun Nov 7 17:38:54 2010 (r214925) @@ -215,9 +215,10 @@ ate_attach(device_t dev) ate_set_mac(sc, eaddr); sc-ifp = ifp = if_alloc(IFT_ETHER); - if (mii_phy_probe(dev, sc-miibus, ate_ifmedia_upd, ate_ifmedia_sts)) { - device_printf(dev, Cannot find my PHY.\n); - err = ENXIO; + err = mii_attach(dev, sc-miibus, ifp, ate_ifmedia_upd, + ate_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); + if (err != 0) { + device_printf(dev, attaching PHYs failed\n); goto out; } Modified: stable/7/sys/dev/bce/if_bce.c == --- stable/7/sys/dev/bce/if_bce.c Sun Nov 7 17:35:42 2010 (r214924) +++ stable/7/sys/dev/bce/if_bce.c Sun Nov 7 17:38:54 2010 (r214925) @@ -1134,12 +1134,13 @@ bce_attach(device_t dev) /* Handle any special PHY initialization for SerDes PHYs. */ bce_init_media(sc); - /* MII child bus by probing the PHY. */ - if (mii_phy_probe(dev, sc-bce_miibus, bce_ifmedia_upd, - bce_ifmedia_sts)) { - BCE_PRINTF(%s(%d): No PHY found on child MII bus!\n, - __FILE__, __LINE__); - rc = ENXIO; + /* MII child bus by attaching the PHY. */ + rc = mii_attach(dev, sc-bce_miibus, ifp, bce_ifmedia_upd, + bce_ifmedia_sts, BMSR_DEFCAPMASK, sc-bce_phy_addr, + MII_OFFSET_ANY, 0); + if (rc != 0) { + BCE_PRINTF(%s(%d): attaching PHYs failed\n, __FILE__, + __LINE__); goto bce_attach_fail; } Modified: stable/7/sys/dev/ed/if_ed_pccard.c == --- stable/7/sys/dev/ed/if_ed_pccard.c Sun Nov 7 17:35:42 2010 (r214924) +++ stable/7/sys/dev/ed/if_ed_pccard.c Sun Nov 7 17:38:54 2010 (r214925) @@ -540,23 +540,27 @@ ed_pccard_attach(device_t dev) goto bad; if (sc-chip_type == ED_CHIP_TYPE_DL10019 || sc-chip_type == ED_CHIP_TYPE_DL10022) { - /* Probe for an MII bus, but ignore errors. */ + /* Try to attach an MII bus, but ignore errors. */ ed_pccard_dl100xx_mii_reset(sc); - (void)mii_phy_probe(dev, sc-miibus, ed_ifmedia_upd, - ed_ifmedia_sts); + (void)mii_attach(dev, sc-miibus, sc-ifp, ed_ifmedia_upd, + ed_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, + MII_OFFSET_ANY, 0); } else if (sc-chip_type == ED_CHIP_TYPE_AX88190) { ed_pccard_ax88x90_mii_reset(sc); - if ((error = mii_phy_probe(dev, sc-miibus, ed_ifmedia_upd, -ed_ifmedia_sts)) != 0) { - device_printf(dev, Missing mii!\n); + error = mii_attach(dev, sc-miibus, sc-ifp, ed_ifmedia_upd, + ed_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, + MII_OFFSET_ANY, 0); + if (error != 0) { + device_printf(dev, attaching PHYs failed\n); goto bad; } - } else if (sc-chip_type == ED_CHIP_TYPE_TC5299J) { ed_pccard_tc5299j_mii_reset(sc); - if ((error = mii_phy_probe(dev, sc-miibus, ed_ifmedia_upd, -ed_ifmedia_sts)) != 0) { -
svn commit: r214926 - stable/8/sys/dev/mii
Author: marius Date: Sun Nov 7 17:40:58 2010 New Revision: 214926 URL: http://svn.freebsd.org/changeset/base/214926 Log: MFC: r214263 Take advantage of mii_phy_add_media()/mii_phy_setmedia(). Modified: stable/8/sys/dev/mii/pnaphy.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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/pnaphy.c == --- stable/8/sys/dev/mii/pnaphy.c Sun Nov 7 17:38:54 2010 (r214925) +++ stable/8/sys/dev/mii/pnaphy.c Sun Nov 7 17:40:58 2010 (r214926) @@ -102,7 +102,6 @@ pnaphy_attach(device_t dev) struct mii_softc *sc; struct mii_attach_args *ma; struct mii_data *mii; - const char *sep = ; sc = device_get_softc(dev); ma = device_get_ivars(dev); @@ -116,29 +115,16 @@ pnaphy_attach(device_t dev) sc-mii_service = pnaphy_service; sc-mii_pdata = mii; - sc-mii_flags |= MIIF_NOISOLATE; - -#defineADD(m, c) ifmedia_add(mii-mii_media, (m), (c), NULL) -#define PRINT(s) printf(%s%s, sep, s); sep = , + sc-mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP | MIIF_IS_HPNA; mii_phy_reset(sc); sc-mii_capabilities = PHY_READ(sc, MII_BMSR) ma-mii_capmask; device_printf(dev, ); - if ((sc-mii_capabilities BMSR_MEDIAMASK) == 0) - printf(no media present); - else { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_HPNA_1, 0, sc-mii_inst), 0); - PRINT(HomePNA); - } - + mii_phy_add_media(sc); printf(\n); -#undef ADD -#undef PRINT - MIIBUS_MEDIAINIT(sc-mii_dev); - return (0); } @@ -159,17 +145,11 @@ pnaphy_service(struct mii_softc *sc, str break; switch (IFM_SUBTYPE(ife-ifm_media)) { - case IFM_AUTO: - case IFM_10_T: - case IFM_100_TX: - case IFM_100_T4: - return (EINVAL); + case IFM_HPNA_1: + mii_phy_setmedia(sc); + break; default: - /* -* BMCR data is stored in the ifmedia entry. -*/ - PHY_WRITE(sc, MII_ANAR, mii_anar(ife-ifm_media)); - PHY_WRITE(sc, MII_BMCR, ife-ifm_data); + return (EINVAL); } break; @@ -182,7 +162,7 @@ pnaphy_service(struct mii_softc *sc, str /* Update the media status. */ ukphy_status(sc); if (IFM_SUBTYPE(mii-mii_media_active) == IFM_10_T) - mii-mii_media_active = IFM_ETHER|IFM_HPNA_1; + mii-mii_media_active = IFM_ETHER | IFM_HPNA_1; /* Callback if something changed. */ mii_phy_update(sc, cmd); ___ 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: r214927 - stable/7/sys/dev/mii
Author: marius Date: Sun Nov 7 17:41:09 2010 New Revision: 214927 URL: http://svn.freebsd.org/changeset/base/214927 Log: MFC: r214263 Take advantage of mii_phy_add_media()/mii_phy_setmedia(). Modified: stable/7/sys/dev/mii/pnaphy.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/dev/mii/pnaphy.c == --- stable/7/sys/dev/mii/pnaphy.c Sun Nov 7 17:40:58 2010 (r214926) +++ stable/7/sys/dev/mii/pnaphy.c Sun Nov 7 17:41:09 2010 (r214927) @@ -102,7 +102,6 @@ pnaphy_attach(device_t dev) struct mii_softc *sc; struct mii_attach_args *ma; struct mii_data *mii; - const char *sep = ; sc = device_get_softc(dev); ma = device_get_ivars(dev); @@ -116,29 +115,16 @@ pnaphy_attach(device_t dev) sc-mii_service = pnaphy_service; sc-mii_pdata = mii; - sc-mii_flags |= MIIF_NOISOLATE; - -#defineADD(m, c) ifmedia_add(mii-mii_media, (m), (c), NULL) -#define PRINT(s) printf(%s%s, sep, s); sep = , + sc-mii_flags |= MIIF_NOISOLATE | MIIF_NOLOOP | MIIF_IS_HPNA; mii_phy_reset(sc); sc-mii_capabilities = PHY_READ(sc, MII_BMSR) ma-mii_capmask; device_printf(dev, ); - if ((sc-mii_capabilities BMSR_MEDIAMASK) == 0) - printf(no media present); - else { - ADD(IFM_MAKEWORD(IFM_ETHER, IFM_HPNA_1, 0, sc-mii_inst), 0); - PRINT(HomePNA); - } - + mii_phy_add_media(sc); printf(\n); -#undef ADD -#undef PRINT - MIIBUS_MEDIAINIT(sc-mii_dev); - return (0); } @@ -159,17 +145,11 @@ pnaphy_service(struct mii_softc *sc, str break; switch (IFM_SUBTYPE(ife-ifm_media)) { - case IFM_AUTO: - case IFM_10_T: - case IFM_100_TX: - case IFM_100_T4: - return (EINVAL); + case IFM_HPNA_1: + mii_phy_setmedia(sc); + break; default: - /* -* BMCR data is stored in the ifmedia entry. -*/ - PHY_WRITE(sc, MII_ANAR, mii_anar(ife-ifm_media)); - PHY_WRITE(sc, MII_BMCR, ife-ifm_data); + return (EINVAL); } break; @@ -182,7 +162,7 @@ pnaphy_service(struct mii_softc *sc, str /* Update the media status. */ ukphy_status(sc); if (IFM_SUBTYPE(mii-mii_media_active) == IFM_10_T) - mii-mii_media_active = IFM_ETHER|IFM_HPNA_1; + mii-mii_media_active = IFM_ETHER | IFM_HPNA_1; /* Callback if something changed. */ mii_phy_update(sc, cmd); ___ 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: r214928 - head/sys/netinet
Author: tuexen Date: Sun Nov 7 17:44:04 2010 New Revision: 214928 URL: http://svn.freebsd.org/changeset/base/214928 Log: * Use exponential backoff for retransmission of SHUTDOWN and SHUTDOWN-ACK chunks. * While there, do some cleanups. MFC after: 3 days. Modified: head/sys/netinet/sctp_timer.c Modified: head/sys/netinet/sctp_timer.c == --- head/sys/netinet/sctp_timer.c Sun Nov 7 17:41:09 2010 (r214927) +++ head/sys/netinet/sctp_timer.c Sun Nov 7 17:44:04 2010 (r214928) @@ -291,6 +291,10 @@ sctp_threshold_management(struct sctp_in return (0); } +/* + * sctp_find_alternate_net() returns a non-NULL pointer as long + * the argument net is non-NULL. + */ struct sctp_nets * sctp_find_alternate_net(struct sctp_tcb *stcb, struct sctp_nets *net, @@ -440,8 +444,7 @@ sctp_find_alternate_net(struct sctp_tcb else if (mode == 1) { TAILQ_FOREACH(mnet, stcb-asoc.nets, sctp_next) { if (((mnet-dest_state SCTP_ADDR_REACHABLE) != SCTP_ADDR_REACHABLE) || - (mnet-dest_state SCTP_ADDR_UNCONFIRMED) - ) { + (mnet-dest_state SCTP_ADDR_UNCONFIRMED)) { /* * will skip ones that are not-reachable or * unconfirmed @@ -505,12 +508,10 @@ sctp_find_alternate_net(struct sctp_tcb } alt-src_addr_selected = 0; } - if ( - ((alt-dest_state SCTP_ADDR_REACHABLE) == SCTP_ADDR_REACHABLE) - (alt-ro.ro_rt != NULL) /* sa_ignore NO_NULL_CHK */ - (!(alt-dest_state SCTP_ADDR_UNCONFIRMED)) - ) { + if (((alt-dest_state SCTP_ADDR_REACHABLE) == SCTP_ADDR_REACHABLE) + (alt-ro.ro_rt != NULL) + (!(alt-dest_state SCTP_ADDR_UNCONFIRMED))) { /* Found a reachable address */ break; } @@ -549,8 +550,6 @@ sctp_find_alternate_net(struct sctp_tcb return (alt); } - - static void sctp_backoff_on_timeout(struct sctp_tcb *stcb, struct sctp_nets *net, @@ -1021,8 +1020,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp, * used, then pick dest with largest ssthresh for any * retransmission. */ - alt = net; - alt = sctp_find_alternate_net(stcb, alt, 1); + alt = sctp_find_alternate_net(stcb, net, 1); /* * CUCv2: If a different dest is picked for the * retransmission, then new (rtx-)pseudo_cumack needs to be @@ -1213,7 +1211,7 @@ sctp_t1init_timer(struct sctp_inpcb *inp struct sctp_nets *alt; alt = sctp_find_alternate_net(stcb, stcb-asoc.primary_destination, 0); - if ((alt != NULL) (alt != stcb-asoc.primary_destination)) { + if (alt != stcb-asoc.primary_destination) { sctp_move_chunks_from_net(stcb, stcb-asoc.primary_destination); stcb-asoc.primary_destination = alt; } @@ -1480,6 +1478,7 @@ sctp_delete_prim_timer(struct sctp_inpcb * For the shutdown and shutdown-ack, we do not keep one around on the * control queue. This means we must generate a new one and call the general * chunk output routine, AFTER having done threshold management. + * It is assumed that net is non-NULL. */ int sctp_shutdown_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, @@ -1492,18 +1491,13 @@ sctp_shutdown_timer(struct sctp_inpcb *i /* Assoc is over */ return (1); } + sctp_backoff_on_timeout(stcb, net, 1, 0, 0); /* second select an alternative */ alt = sctp_find_alternate_net(stcb, net, 0); /* third generate a shutdown into the queue for out net */ - if (alt) { - sctp_send_shutdown(stcb, alt); - } else { - /* -* if alt is NULL, there is no dest to send to?? -*/ - return (0); - } + sctp_send_shutdown(stcb, alt); + /* fourth restart timer */ sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, inp, stcb, alt); return (0); @@ -1520,6 +1514,7 @@ sctp_shutdownack_timer(struct sctp_inpcb /* Assoc is over */ return (1); } + sctp_backoff_on_timeout(stcb, net, 1, 0, 0); /* second select an alternative */ alt = sctp_find_alternate_net(stcb, net, 0); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to
svn commit: r214929 - in stable/8/sys/dev: mii tl
Author: marius Date: Sun Nov 7 17:48:07 2010 New Revision: 214929 URL: http://svn.freebsd.org/changeset/base/214929 Log: MFC: r214264 - Add IFM_10_2 and IFM_10_5 media via tlphy(4) only in case the respective interface also has such connectors. - In tl_attach() unify three different ways of obtaining the device and vendor IDs and remove the now obsolete tl_dinfo from tl_softc. - Given that tlphy(4) only handles the integrated PHYs of NICs driven by tl(4) make it only probe on the latter. - Switch mlphy(4) and tlphy(4) to use mii_phy_add_media()/mii_phy_setmedia(). - Simplify looking for the respective companion PHY in mlphy(4) and tlphy(4) by ignoring the native one by just comparing the device_t's directly rather than the device name. Modified: stable/8/sys/dev/mii/mlphy.c stable/8/sys/dev/mii/tlphy.c stable/8/sys/dev/tl/if_tl.c stable/8/sys/dev/tl/if_tlreg.h 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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/mlphy.c == --- stable/8/sys/dev/mii/mlphy.cSun Nov 7 17:44:04 2010 (r214928) +++ stable/8/sys/dev/mii/mlphy.cSun Nov 7 17:48:07 2010 (r214929) @@ -70,6 +70,7 @@ __FBSDID($FreeBSD$); struct mlphy_softc { struct mii_softcml_mii; + device_tml_dev; int ml_state; int ml_linked; }; @@ -96,6 +97,7 @@ static driver_t mlphy_driver = { DRIVER_MODULE(mlphy, miibus, mlphy_driver, mlphy_devclass, 0, 0); +static struct mii_softc *mlphy_find_other(struct mlphy_softc *); static int mlphy_service(struct mii_softc *, struct mii_data *, int); static voidmlphy_reset(struct mii_softc *); static voidmlphy_status(struct mii_softc *); @@ -105,10 +107,8 @@ mlphy_probe(dev) device_tdev; { struct mii_attach_args *ma; - device_tparent; ma = device_get_ivars(dev); - parent = device_get_parent(device_get_parent(dev)); /* * Micro Linear PHY reports oui == 0 model == 0 @@ -122,7 +122,8 @@ mlphy_probe(dev) * encountered the 6692 on an Olicom card with a ThunderLAN * controller chip. */ - if (strcmp(device_get_name(parent), tl) != 0) + if (strcmp(device_get_name(device_get_parent(device_get_parent(dev))), + tl) != 0) return (ENXIO); device_set_desc(dev, Micro Linear 6692 media interface); @@ -141,6 +142,7 @@ mlphy_attach(dev) msc = device_get_softc(dev); sc = msc-ml_mii; + msc-ml_dev = dev; ma = device_get_ivars(dev); sc-mii_dev = device_get_parent(dev); mii = ma-mii_data; @@ -155,14 +157,15 @@ mlphy_attach(dev) #defineADD(m, c) ifmedia_add(mii-mii_media, (m), (c), NULL) ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc-mii_inst), - BMCR_LOOP|BMCR_S100); + MII_MEDIA_100_TX); mii_phy_reset(sc); sc-mii_capabilities = PHY_READ(sc, MII_BMSR) ma-mii_capmask; + /* Let the companion PHY (if any) only handle the media we don't. */ ma-mii_capmask = ~sc-mii_capabilities; device_printf(dev, ); - mii_add_media(sc); + mii_phy_add_media(sc); printf(\n); #undef ADD MIIBUS_MEDIAINIT(sc-mii_dev); @@ -170,20 +173,21 @@ mlphy_attach(dev) } static struct mii_softc * -mlphy_find_other(device_t mii) +mlphy_find_other(struct mlphy_softc *msc) { device_t*devlist; struct mii_softc *retval; int i, devs; retval = NULL; - if (device_get_children(mii, devlist, devs)) + if (device_get_children(msc-ml_mii.mii_dev, devlist, devs) != 0) return (NULL); - for (i = 0; i devs; i++) - if (strcmp(device_get_name(devlist[i]), mlphy)) { + for (i = 0; i devs; i++) { + if (devlist[i] != msc-ml_dev) { retval = device_get_softc(devlist[i]); break; } + } free(devlist, M_TEMP); return (retval); } @@ -204,7 +208,7 @@ mlphy_service(xsc, mii, cmd) * See if there's another PHY on this bus with us. * If so, we may need it for 10Mbps modes. */ - other = mlphy_find_other(msc-ml_mii.mii_dev); + other = mlphy_find_other(msc); switch (cmd) { case MII_POLLSTAT: @@ -229,7 +233,7 @@ mlphy_service(xsc, mii, cmd) mii_phy_reset(other); PHY_WRITE(other, MII_BMCR, BMCR_ISO);
svn commit: r214930 - in stable/7/sys: dev/mii pci
Author: marius Date: Sun Nov 7 17:48:11 2010 New Revision: 214930 URL: http://svn.freebsd.org/changeset/base/214930 Log: MFC: r214264 - Add IFM_10_2 and IFM_10_5 media via tlphy(4) only in case the respective interface also has such connectors. - In tl_attach() unify three different ways of obtaining the device and vendor IDs and remove the now obsolete tl_dinfo from tl_softc. - Given that tlphy(4) only handles the integrated PHYs of NICs driven by tl(4) make it only probe on the latter. - Switch mlphy(4) and tlphy(4) to use mii_phy_add_media()/mii_phy_setmedia(). - Simplify looking for the respective companion PHY in mlphy(4) and tlphy(4) by ignoring the native one by just comparing the device_t's directly rather than the device name. Modified: stable/7/sys/dev/mii/mlphy.c stable/7/sys/dev/mii/tlphy.c stable/7/sys/pci/if_tl.c stable/7/sys/pci/if_tlreg.h 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/dev/mii/mlphy.c == --- stable/7/sys/dev/mii/mlphy.cSun Nov 7 17:48:07 2010 (r214929) +++ stable/7/sys/dev/mii/mlphy.cSun Nov 7 17:48:11 2010 (r214930) @@ -70,6 +70,7 @@ __FBSDID($FreeBSD$); struct mlphy_softc { struct mii_softcml_mii; + device_tml_dev; int ml_state; int ml_linked; }; @@ -96,6 +97,7 @@ static driver_t mlphy_driver = { DRIVER_MODULE(mlphy, miibus, mlphy_driver, mlphy_devclass, 0, 0); +static struct mii_softc *mlphy_find_other(struct mlphy_softc *); static int mlphy_service(struct mii_softc *, struct mii_data *, int); static voidmlphy_reset(struct mii_softc *); static voidmlphy_status(struct mii_softc *); @@ -105,10 +107,8 @@ mlphy_probe(dev) device_tdev; { struct mii_attach_args *ma; - device_tparent; ma = device_get_ivars(dev); - parent = device_get_parent(device_get_parent(dev)); /* * Micro Linear PHY reports oui == 0 model == 0 @@ -122,7 +122,8 @@ mlphy_probe(dev) * encountered the 6692 on an Olicom card with a ThunderLAN * controller chip. */ - if (strcmp(device_get_name(parent), tl) != 0) + if (strcmp(device_get_name(device_get_parent(device_get_parent(dev))), + tl) != 0) return (ENXIO); device_set_desc(dev, Micro Linear 6692 media interface); @@ -141,6 +142,7 @@ mlphy_attach(dev) msc = device_get_softc(dev); sc = msc-ml_mii; + msc-ml_dev = dev; ma = device_get_ivars(dev); sc-mii_dev = device_get_parent(dev); mii = ma-mii_data; @@ -155,14 +157,15 @@ mlphy_attach(dev) #defineADD(m, c) ifmedia_add(mii-mii_media, (m), (c), NULL) ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_LOOP, sc-mii_inst), - BMCR_LOOP|BMCR_S100); + MII_MEDIA_100_TX); mii_phy_reset(sc); sc-mii_capabilities = PHY_READ(sc, MII_BMSR) ma-mii_capmask; + /* Let the companion PHY (if any) only handle the media we don't. */ ma-mii_capmask = ~sc-mii_capabilities; device_printf(dev, ); - mii_add_media(sc); + mii_phy_add_media(sc); printf(\n); #undef ADD MIIBUS_MEDIAINIT(sc-mii_dev); @@ -170,20 +173,21 @@ mlphy_attach(dev) } static struct mii_softc * -mlphy_find_other(device_t mii) +mlphy_find_other(struct mlphy_softc *msc) { device_t*devlist; struct mii_softc *retval; int i, devs; retval = NULL; - if (device_get_children(mii, devlist, devs)) + if (device_get_children(msc-ml_mii.mii_dev, devlist, devs) != 0) return (NULL); - for (i = 0; i devs; i++) - if (strcmp(device_get_name(devlist[i]), mlphy)) { + for (i = 0; i devs; i++) { + if (devlist[i] != msc-ml_dev) { retval = device_get_softc(devlist[i]); break; } + } free(devlist, M_TEMP); return (retval); } @@ -204,7 +208,7 @@ mlphy_service(xsc, mii, cmd) * See if there's another PHY on this bus with us. * If so, we may need it for 10Mbps modes. */ - other = mlphy_find_other(msc-ml_mii.mii_dev); + other = mlphy_find_other(msc); switch (cmd) { case MII_POLLSTAT: @@ -229,7 +233,7 @@ mlphy_service(xsc, mii, cmd) mii_phy_reset(other); PHY_WRITE(other, MII_BMCR, BMCR_ISO); } - (void) mii_phy_auto(sc); +
svn commit: r214932 - stable/7/sys/sparc64/sparc64
Author: marius Date: Sun Nov 7 17:50:55 2010 New Revision: 214932 URL: http://svn.freebsd.org/changeset/base/214932 Log: MFC: r214528 - When resetting pm_active and pm_context of a pmap in pmap_pinit() we need locking as otherwise we may race against the other parts of the MD code which expects a consistent state of these. While at it move the resetting of the pmap before entering it in the TSB. - Spell a 0 as TLB_CTX_KERNEL. Modified: stable/7/sys/sparc64/sparc64/pmap.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/sparc64/sparc64/pmap.c == --- stable/7/sys/sparc64/sparc64/pmap.c Sun Nov 7 17:50:54 2010 (r214931) +++ stable/7/sys/sparc64/sparc64/pmap.c Sun Nov 7 17:50:55 2010 (r214932) @@ -1056,7 +1056,7 @@ pmap_pinit0(pmap_t pm) PMAP_LOCK_INIT(pm); for (i = 0; i MAXCPU; i++) - pm-pm_context[i] = 0; + pm-pm_context[i] = TLB_CTX_KERNEL; pm-pm_active = 0; pm-pm_tsb = NULL; pm-pm_tsb_obj = NULL; @@ -1094,6 +1094,12 @@ pmap_pinit(pmap_t pm) if (pm-pm_tsb_obj == NULL) pm-pm_tsb_obj = vm_object_allocate(OBJT_DEFAULT, TSB_PAGES); + mtx_lock_spin(sched_lock); + for (i = 0; i MAXCPU; i++) + pm-pm_context[i] = -1; + pm-pm_active = 0; + mtx_unlock_spin(sched_lock); + VM_OBJECT_LOCK(pm-pm_tsb_obj); for (i = 0; i TSB_PAGES; i++) { m = vm_page_grab(pm-pm_tsb_obj, i, VM_ALLOC_NOBUSY | @@ -1105,9 +,6 @@ pmap_pinit(pmap_t pm) VM_OBJECT_UNLOCK(pm-pm_tsb_obj); pmap_qenter((vm_offset_t)pm-pm_tsb, ma, TSB_PAGES); - for (i = 0; i MAXCPU; i++) - pm-pm_context[i] = -1; - pm-pm_active = 0; bzero(pm-pm_stats, sizeof(pm-pm_stats)); return (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: r214931 - stable/8/sys/sparc64/sparc64
Author: marius Date: Sun Nov 7 17:50:54 2010 New Revision: 214931 URL: http://svn.freebsd.org/changeset/base/214931 Log: MFC: r214528 - When resetting pm_active and pm_context of a pmap in pmap_pinit() we need locking as otherwise we may race against the other parts of the MD code which expects a consistent state of these. While at it move the resetting of the pmap before entering it in the TSB. - Spell a 0 as TLB_CTX_KERNEL. Modified: stable/8/sys/sparc64/sparc64/pmap.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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sparc64/sparc64/pmap.c == --- stable/8/sys/sparc64/sparc64/pmap.c Sun Nov 7 17:48:11 2010 (r214930) +++ stable/8/sys/sparc64/sparc64/pmap.c Sun Nov 7 17:50:54 2010 (r214931) @@ -1061,7 +1061,7 @@ pmap_pinit0(pmap_t pm) PMAP_LOCK_INIT(pm); for (i = 0; i MAXCPU; i++) - pm-pm_context[i] = 0; + pm-pm_context[i] = TLB_CTX_KERNEL; pm-pm_active = 0; pm-pm_tsb = NULL; pm-pm_tsb_obj = NULL; @@ -1099,6 +1099,12 @@ pmap_pinit(pmap_t pm) if (pm-pm_tsb_obj == NULL) pm-pm_tsb_obj = vm_object_allocate(OBJT_DEFAULT, TSB_PAGES); + mtx_lock_spin(sched_lock); + for (i = 0; i MAXCPU; i++) + pm-pm_context[i] = -1; + pm-pm_active = 0; + mtx_unlock_spin(sched_lock); + VM_OBJECT_LOCK(pm-pm_tsb_obj); for (i = 0; i TSB_PAGES; i++) { m = vm_page_grab(pm-pm_tsb_obj, i, VM_ALLOC_NOBUSY | @@ -1110,9 +1116,6 @@ pmap_pinit(pmap_t pm) VM_OBJECT_UNLOCK(pm-pm_tsb_obj); pmap_qenter((vm_offset_t)pm-pm_tsb, ma, TSB_PAGES); - for (i = 0; i MAXCPU; i++) - pm-pm_context[i] = -1; - pm-pm_active = 0; bzero(pm-pm_stats, sizeof(pm-pm_stats)); return (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: r214933 - head/sys/netinet
Author: tuexen Date: Sun Nov 7 17:50:56 2010 New Revision: 214933 URL: http://svn.freebsd.org/changeset/base/214933 Log: Remove two functions which are not used. MFC after: 3 days. Modified: head/sys/netinet/sctp_timer.c head/sys/netinet/sctp_timer.h Modified: head/sys/netinet/sctp_timer.c == --- head/sys/netinet/sctp_timer.c Sun Nov 7 17:50:55 2010 (r214932) +++ head/sys/netinet/sctp_timer.c Sun Nov 7 17:50:56 2010 (r214933) @@ -1670,30 +1670,6 @@ sctp_heartbeat_timer(struct sctp_inpcb * return (0); } -int -sctp_is_hb_timer_running(struct sctp_tcb *stcb) -{ - if (SCTP_OS_TIMER_PENDING(stcb-asoc.hb_timer.timer)) { - /* its running */ - return (1); - } else { - /* nope */ - return (0); - } -} - -int -sctp_is_sack_timer_running(struct sctp_tcb *stcb) -{ - if (SCTP_OS_TIMER_PENDING(stcb-asoc.dack_timer.timer)) { - /* its running */ - return (1); - } else { - /* nope */ - return (0); - } -} - #define SCTP_NUMBER_OF_MTU_SIZES 18 static uint32_t mtu_sizes[] = { 68, Modified: head/sys/netinet/sctp_timer.h == --- head/sys/netinet/sctp_timer.h Sun Nov 7 17:50:55 2010 (r214932) +++ head/sys/netinet/sctp_timer.h Sun Nov 7 17:50:56 2010 (r214933) @@ -65,9 +65,6 @@ int sctp_heartbeat_timer(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *, int); -int sctp_is_hb_timer_running(struct sctp_tcb *stcb); -int sctp_is_sack_timer_running(struct sctp_tcb *stcb); - int sctp_cookie_timer(struct sctp_inpcb *, struct sctp_tcb *, struct sctp_nets *); ___ 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: r214934 - stable/8/sys/dev/mii
Author: marius Date: Sun Nov 7 17:54:41 2010 New Revision: 214934 URL: http://svn.freebsd.org/changeset/base/214934 Log: MFC: r214606 Try to make the style consistent (including regarding NetBSD bits not yet merged) and adhere style(9). Modified: stable/8/sys/dev/mii/mii_physubr.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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/mii/mii_physubr.c == --- stable/8/sys/dev/mii/mii_physubr.c Sun Nov 7 17:50:56 2010 (r214933) +++ stable/8/sys/dev/mii/mii_physubr.c Sun Nov 7 17:54:41 2010 (r214934) @@ -107,8 +107,8 @@ mii_phy_setmedia(struct mii_softc *sc) if (IFM_SUBTYPE(ife-ifm_media) == IFM_AUTO) { if ((PHY_READ(sc, MII_BMCR) BMCR_AUTOEN) == 0 || - (sc-mii_flags MIIF_FORCEANEG)) - (void) mii_phy_auto(sc); + (sc-mii_flags MIIF_FORCEANEG) != 0) + (void)mii_phy_auto(sc); return; } @@ -124,10 +124,10 @@ mii_phy_setmedia(struct mii_softc *sc) bmcr = mii_media_table[ife-ifm_data].mm_bmcr; gtcr = mii_media_table[ife-ifm_data].mm_gtcr; - if (mii-mii_media.ifm_media IFM_ETH_MASTER) { + if ((mii-mii_media.ifm_media IFM_ETH_MASTER) != 0) { switch (IFM_SUBTYPE(ife-ifm_media)) { case IFM_1000_T: - gtcr |= GTCR_MAN_MS|GTCR_ADV_MS; + gtcr |= GTCR_MAN_MS | GTCR_ADV_MS; break; default: @@ -135,53 +135,48 @@ mii_phy_setmedia(struct mii_softc *sc) } } - if (ife-ifm_media IFM_LOOP) + if ((ife-ifm_media IFM_LOOP) != 0) bmcr |= BMCR_LOOP; PHY_WRITE(sc, MII_ANAR, anar); PHY_WRITE(sc, MII_BMCR, bmcr); - if (sc-mii_flags MIIF_HAVE_GTCR) + if ((sc-mii_flags MIIF_HAVE_GTCR) != 0) PHY_WRITE(sc, MII_100T2CR, gtcr); } int mii_phy_auto(struct mii_softc *sc) { + int anar, gtcr; /* * Check for 1000BASE-X. Autonegotiation is a bit * different on such devices. */ - if (sc-mii_flags MIIF_IS_1000X) { - uint16_t anar = 0; - - if (sc-mii_extcapabilities EXTSR_1000XFDX) + if ((sc-mii_flags MIIF_IS_1000X) != 0) { + anar = 0; + if ((sc-mii_extcapabilities EXTSR_1000XFDX) != 0) anar |= ANAR_X_FD; - if (sc-mii_extcapabilities EXTSR_1000XHDX) + if ((sc-mii_extcapabilities EXTSR_1000XHDX) != 0) anar |= ANAR_X_HD; - if (sc-mii_flags MIIF_DOPAUSE) { + if ((sc-mii_flags MIIF_DOPAUSE) != 0) { /* XXX Asymmetric vs. symmetric? */ anar |= ANLPAR_X_PAUSE_TOWARDS; } - PHY_WRITE(sc, MII_ANAR, anar); } else { - uint16_t anar; - anar = BMSR_MEDIA_TO_ANAR(sc-mii_capabilities) | ANAR_CSMA; - if (sc-mii_flags MIIF_DOPAUSE) + if ((sc-mii_flags MIIF_DOPAUSE) != 0) anar |= ANAR_FC; PHY_WRITE(sc, MII_ANAR, anar); - if (sc-mii_flags MIIF_HAVE_GTCR) { - uint16_t gtcr = 0; - - if (sc-mii_extcapabilities EXTSR_1000TFDX) + if ((sc-mii_flags MIIF_HAVE_GTCR) != 0) { + gtcr = 0; + if ((sc-mii_extcapabilities EXTSR_1000TFDX) != 0) gtcr |= GTCR_ADV_1000TFDX; - if (sc-mii_extcapabilities EXTSR_1000THDX) + if ((sc-mii_extcapabilities EXTSR_1000THDX) != 0) gtcr |= GTCR_ADV_1000THDX; - PHY_WRITE(sc, MII_100T2CR, gtcr); } } @@ -213,7 +208,7 @@ mii_phy_tick(struct mii_softc *sc) /* Read the status register twice; BMSR_LINK is latch-low. */ reg = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); - if (reg BMSR_LINK) { + if ((reg BMSR_LINK) != 0) { sc-mii_ticks = 0; /* reset autonegotiation timer. */ /* See above. */ return (0); @@ -243,7 +238,7 @@ mii_phy_reset(struct mii_softc *sc) struct ifmedia_entry *ife = sc-mii_pdata-mii_media.ifm_cur; int reg, i; - if (sc-mii_flags MIIF_NOISOLATE) + if ((sc-mii_flags MIIF_NOISOLATE) != 0) reg = BMCR_RESET; else reg
svn commit: r214935 - stable/7/sys/dev/mii
Author: marius Date: Sun Nov 7 17:54:43 2010 New Revision: 214935 URL: http://svn.freebsd.org/changeset/base/214935 Log: MFC: r214606 Try to make the style consistent (including regarding NetBSD bits not yet merged) and adhere style(9). Modified: stable/7/sys/dev/mii/mii_physubr.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/dev/mii/mii_physubr.c == --- stable/7/sys/dev/mii/mii_physubr.c Sun Nov 7 17:54:41 2010 (r214934) +++ stable/7/sys/dev/mii/mii_physubr.c Sun Nov 7 17:54:43 2010 (r214935) @@ -107,8 +107,8 @@ mii_phy_setmedia(struct mii_softc *sc) if (IFM_SUBTYPE(ife-ifm_media) == IFM_AUTO) { if ((PHY_READ(sc, MII_BMCR) BMCR_AUTOEN) == 0 || - (sc-mii_flags MIIF_FORCEANEG)) - (void) mii_phy_auto(sc); + (sc-mii_flags MIIF_FORCEANEG) != 0) + (void)mii_phy_auto(sc); return; } @@ -124,10 +124,10 @@ mii_phy_setmedia(struct mii_softc *sc) bmcr = mii_media_table[ife-ifm_data].mm_bmcr; gtcr = mii_media_table[ife-ifm_data].mm_gtcr; - if (mii-mii_media.ifm_media IFM_ETH_MASTER) { + if ((mii-mii_media.ifm_media IFM_ETH_MASTER) != 0) { switch (IFM_SUBTYPE(ife-ifm_media)) { case IFM_1000_T: - gtcr |= GTCR_MAN_MS|GTCR_ADV_MS; + gtcr |= GTCR_MAN_MS | GTCR_ADV_MS; break; default: @@ -135,53 +135,48 @@ mii_phy_setmedia(struct mii_softc *sc) } } - if (ife-ifm_media IFM_LOOP) + if ((ife-ifm_media IFM_LOOP) != 0) bmcr |= BMCR_LOOP; PHY_WRITE(sc, MII_ANAR, anar); PHY_WRITE(sc, MII_BMCR, bmcr); - if (sc-mii_flags MIIF_HAVE_GTCR) + if ((sc-mii_flags MIIF_HAVE_GTCR) != 0) PHY_WRITE(sc, MII_100T2CR, gtcr); } int mii_phy_auto(struct mii_softc *sc) { + int anar, gtcr; /* * Check for 1000BASE-X. Autonegotiation is a bit * different on such devices. */ - if (sc-mii_flags MIIF_IS_1000X) { - uint16_t anar = 0; - - if (sc-mii_extcapabilities EXTSR_1000XFDX) + if ((sc-mii_flags MIIF_IS_1000X) != 0) { + anar = 0; + if ((sc-mii_extcapabilities EXTSR_1000XFDX) != 0) anar |= ANAR_X_FD; - if (sc-mii_extcapabilities EXTSR_1000XHDX) + if ((sc-mii_extcapabilities EXTSR_1000XHDX) != 0) anar |= ANAR_X_HD; - if (sc-mii_flags MIIF_DOPAUSE) { + if ((sc-mii_flags MIIF_DOPAUSE) != 0) { /* XXX Asymmetric vs. symmetric? */ anar |= ANLPAR_X_PAUSE_TOWARDS; } - PHY_WRITE(sc, MII_ANAR, anar); } else { - uint16_t anar; - anar = BMSR_MEDIA_TO_ANAR(sc-mii_capabilities) | ANAR_CSMA; - if (sc-mii_flags MIIF_DOPAUSE) + if ((sc-mii_flags MIIF_DOPAUSE) != 0) anar |= ANAR_FC; PHY_WRITE(sc, MII_ANAR, anar); - if (sc-mii_flags MIIF_HAVE_GTCR) { - uint16_t gtcr = 0; - - if (sc-mii_extcapabilities EXTSR_1000TFDX) + if ((sc-mii_flags MIIF_HAVE_GTCR) != 0) { + gtcr = 0; + if ((sc-mii_extcapabilities EXTSR_1000TFDX) != 0) gtcr |= GTCR_ADV_1000TFDX; - if (sc-mii_extcapabilities EXTSR_1000THDX) + if ((sc-mii_extcapabilities EXTSR_1000THDX) != 0) gtcr |= GTCR_ADV_1000THDX; - PHY_WRITE(sc, MII_100T2CR, gtcr); } } @@ -213,7 +208,7 @@ mii_phy_tick(struct mii_softc *sc) /* Read the status register twice; BMSR_LINK is latch-low. */ reg = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); - if (reg BMSR_LINK) { + if ((reg BMSR_LINK) != 0) { sc-mii_ticks = 0; /* reset autonegotiation timer. */ /* See above. */ return (0); @@ -243,7 +238,7 @@ mii_phy_reset(struct mii_softc *sc) struct ifmedia_entry *ife = sc-mii_pdata-mii_media.ifm_cur; int reg, i; - if (sc-mii_flags MIIF_NOISOLATE) + if ((sc-mii_flags MIIF_NOISOLATE) != 0) reg = BMCR_RESET; else reg = BMCR_RESET | BMCR_ISO; @@ -396,7 +391,10 @@ mii_phy_add_media(struct mii_softc *sc)
svn commit: r214936 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Sun Nov 7 18:21:42 2010 New Revision: 214936 URL: http://svn.freebsd.org/changeset/base/214936 Log: MFC r213937: zfs: add vop_getpages method implementation Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Nov 7 17:54:43 2010(r214935) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Nov 7 18:21:42 2010(r214936) @@ -4158,6 +4158,96 @@ zfs_setsecattr(vnode_t *vp, vsecattr_t * } static int +zfs_getpages(struct vnode *vp, vm_page_t *m, int count, int reqpage) +{ + znode_t *zp = VTOZ(vp); + zfsvfs_t *zfsvfs = zp-z_zfsvfs; + objset_t *os = zp-z_zfsvfs-z_os; + vm_page_t mreq; + vm_object_t object; + caddr_t va; + struct sf_buf *sf; + int i, error; + int pcount, size; + + ZFS_ENTER(zfsvfs); + ZFS_VERIFY_ZP(zp); + + pcount = round_page(count) / PAGE_SIZE; + mreq = m[reqpage]; + object = mreq-object; + error = 0; + + KASSERT(vp-v_object == object, (mismatching object)); + + VM_OBJECT_LOCK(object); + + for (i = 0; i pcount; i++) { + if (i != reqpage) { + vm_page_lock(m[i]); + vm_page_free(m[i]); + vm_page_unlock(m[i]); + } + } + + if (mreq-valid) { + if (mreq-valid != VM_PAGE_BITS_ALL) + vm_page_zero_invalid(mreq, TRUE); + VM_OBJECT_UNLOCK(object); + ZFS_EXIT(zfsvfs); + return (VM_PAGER_OK); + } + + PCPU_INC(cnt.v_vnodein); + PCPU_INC(cnt.v_vnodepgsin); + + if (IDX_TO_OFF(mreq-pindex) = object-un_pager.vnp.vnp_size) { + VM_OBJECT_UNLOCK(object); + ZFS_EXIT(zfsvfs); + return (VM_PAGER_BAD); + } + + size = PAGE_SIZE; + if (IDX_TO_OFF(mreq-pindex) + size object-un_pager.vnp.vnp_size) + size = object-un_pager.vnp.vnp_size - IDX_TO_OFF(mreq-pindex); + + VM_OBJECT_UNLOCK(object); + + va = zfs_map_page(mreq, sf); + error = dmu_read(os, zp-z_id, IDX_TO_OFF(mreq-pindex), + size, va, DMU_READ_PREFETCH); + if (size != PAGE_SIZE) + bzero(va + size, PAGE_SIZE - size); + zfs_unmap_page(sf); + + VM_OBJECT_LOCK(object); + + if (!error) + mreq-valid = VM_PAGE_BITS_ALL; + KASSERT(mreq-dirty == 0, (zfs_getpages: page %p is dirty, mreq)); + + VM_OBJECT_UNLOCK(object); + + ZFS_ACCESSTIME_STAMP(zfsvfs, zp); + ZFS_EXIT(zfsvfs); + return (error ? VM_PAGER_ERROR : VM_PAGER_OK); +} + +static int +zfs_freebsd_getpages(ap) + struct vop_getpages_args /* { + struct vnode *a_vp; + vm_page_t *a_m; + int a_count; + int a_reqpage; + vm_ooffset_t a_offset; + } */ *ap; +{ + + return (zfs_getpages(ap-a_vp, ap-a_m, ap-a_count, ap-a_reqpage)); +} + +static int zfs_freebsd_open(ap) struct vop_open_args /* { struct vnode *a_vp; @@ -5261,6 +5351,7 @@ struct vop_vector zfs_vnodeops = { .vop_getacl = zfs_freebsd_getacl, .vop_setacl = zfs_freebsd_setacl, .vop_aclcheck = zfs_freebsd_aclcheck, + .vop_getpages = zfs_freebsd_getpages, }; struct vop_vector zfs_fifoops = { ___ 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: r214937 - in stable/8/sys: amd64/amd64 i386/i386
Author: avg Date: Sun Nov 7 18:25:42 2010 New Revision: 214937 URL: http://svn.freebsd.org/changeset/base/214937 Log: MFC r214774: x86 topo_probe: do not probe smp topology if only one cpu is visible Modified: stable/8/sys/amd64/amd64/mp_machdep.c stable/8/sys/i386/i386/mp_machdep.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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/mp_machdep.c == --- stable/8/sys/amd64/amd64/mp_machdep.c Sun Nov 7 18:21:42 2010 (r214936) +++ stable/8/sys/amd64/amd64/mp_machdep.c Sun Nov 7 18:25:42 2010 (r214937) @@ -231,6 +231,9 @@ topo_probe_0x4(void) cpu_logical++; } + KASSERT(cpu_cores = 1 cpu_logical = 1, + (topo_probe_0x4 couldn't find BSP)); + cpu_cores /= cpu_logical; hyperthreading_cpus = cpu_logical; } @@ -302,7 +305,9 @@ topo_probe(void) return; logical_cpus_mask = 0; - if (cpu_vendor_id == CPU_VENDOR_AMD) + if (mp_ncpus = 1) + cpu_cores = cpu_logical = 1; + else if (cpu_vendor_id == CPU_VENDOR_AMD) topo_probe_amd(); else if (cpu_vendor_id == CPU_VENDOR_INTEL) { /* @@ -324,10 +329,8 @@ topo_probe(void) * Fallback: assume each logical CPU is in separate * physical package. That is, no multi-core, no SMT. */ - if (cpu_cores == 0) - cpu_cores = 1; - if (cpu_logical == 0) - cpu_logical = 1; + if (cpu_cores == 0 || cpu_logical == 0) + cpu_cores = cpu_logical = 1; cpu_topo_probed = 1; } Modified: stable/8/sys/i386/i386/mp_machdep.c == --- stable/8/sys/i386/i386/mp_machdep.c Sun Nov 7 18:21:42 2010 (r214936) +++ stable/8/sys/i386/i386/mp_machdep.c Sun Nov 7 18:25:42 2010 (r214937) @@ -285,6 +285,9 @@ topo_probe_0x4(void) cpu_logical++; } + KASSERT(cpu_cores = 1 cpu_logical = 1, + (topo_probe_0x4 couldn't find BSP)); + cpu_cores /= cpu_logical; hyperthreading_cpus = cpu_logical; } @@ -356,7 +359,9 @@ topo_probe(void) return; logical_cpus_mask = 0; - if (cpu_vendor_id == CPU_VENDOR_AMD) + if (mp_ncpus = 1) + cpu_cores = cpu_logical = 1; + else if (cpu_vendor_id == CPU_VENDOR_AMD) topo_probe_amd(); else if (cpu_vendor_id == CPU_VENDOR_INTEL) { /* @@ -378,10 +383,8 @@ topo_probe(void) * Fallback: assume each logical CPU is in separate * physical package. That is, no multi-core, no SMT. */ - if (cpu_cores == 0) - cpu_cores = 1; - if (cpu_logical == 0) - cpu_logical = 1; + if (cpu_cores == 0 || cpu_logical == 0) + cpu_cores = cpu_logical = 1; cpu_topo_probed = 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: r214938 - head/sys/i386/i386
Author: alc Date: Sun Nov 7 18:42:37 2010 New Revision: 214938 URL: http://svn.freebsd.org/changeset/base/214938 Log: Eliminate a possible race between pmap_pinit() and pmap_kenter_pde() on superpage promotion or demotion. Micro-optimize pmap_kenter_pde(). Reviewed by: kib, jhb (an earlier version) MFC after:1 week Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Sun Nov 7 18:25:42 2010(r214937) +++ head/sys/i386/i386/pmap.c Sun Nov 7 18:42:37 2010(r214938) @@ -1678,11 +1678,19 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v return (pmap_unwire_pte_hold(pmap, mpte, free)); } +/* + * Initialize the pmap for the swapper process. + */ void pmap_pinit0(pmap_t pmap) { PMAP_LOCK_INIT(pmap); + /* +* Since the page table directory is shared with the kernel pmap, +* which is already included in the list allpmaps, this pmap does +* not need to be inserted into that list. +*/ pmap-pm_pdir = (pd_entry_t *)(KERNBASE + (vm_offset_t)IdlePTD); #ifdef PAE pmap-pm_pdpt = (pdpt_entry_t *)(KERNBASE + (vm_offset_t)IdlePDPT); @@ -1692,9 +1700,6 @@ pmap_pinit0(pmap_t pmap) PCPU_SET(curpmap, pmap); TAILQ_INIT(pmap-pm_pvchunk); bzero(pmap-pm_stats, sizeof pmap-pm_stats); - mtx_lock_spin(allpmaps_lock); - LIST_INSERT_HEAD(allpmaps, pmap, pm_list); - mtx_unlock_spin(allpmaps_lock); } /* @@ -1759,9 +1764,9 @@ pmap_pinit(pmap_t pmap) mtx_lock_spin(allpmaps_lock); LIST_INSERT_HEAD(allpmaps, pmap, pm_list); - mtx_unlock_spin(allpmaps_lock); - /* Wire in kernel global address entries. */ + /* Copy the kernel page table directory entries. */ bcopy(PTD + KPTDI, pmap-pm_pdir + KPTDI, nkpt * sizeof(pd_entry_t)); + mtx_unlock_spin(allpmaps_lock); /* install self-referential address mapping entry(s) */ for (i = 0; i NPGPTD; i++) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r214939 - head/sys/netinet
Author: tuexen Date: Sun Nov 7 18:50:35 2010 New Revision: 214939 URL: http://svn.freebsd.org/changeset/base/214939 Log: Do not have the MTU table twice in the code. Therefore move the function from the timer code to util, rename it appropriately and also fix a bug in sctp_get_prev_mtu(), where calling it with a value existing in the MTU table did not return a smaller one. MFC after: 3 days. Modified: head/sys/netinet/sctp_timer.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h Modified: head/sys/netinet/sctp_timer.c == --- head/sys/netinet/sctp_timer.c Sun Nov 7 18:42:37 2010 (r214938) +++ head/sys/netinet/sctp_timer.c Sun Nov 7 18:50:35 2010 (r214939) @@ -1670,46 +1670,6 @@ sctp_heartbeat_timer(struct sctp_inpcb * return (0); } -#define SCTP_NUMBER_OF_MTU_SIZES 18 -static uint32_t mtu_sizes[] = { - 68, - 296, - 508, - 512, - 544, - 576, - 1006, - 1492, - 1500, - 1536, - 2002, - 2048, - 4352, - 4464, - 8166, - 17914, - 32000, - 65535 -}; - - -static uint32_t -sctp_getnext_mtu(struct sctp_inpcb *inp, uint32_t cur_mtu) -{ - /* select another MTU that is just bigger than this one */ - int i; - - for (i = 0; i SCTP_NUMBER_OF_MTU_SIZES; i++) { - if (cur_mtu mtu_sizes[i]) { - /* no max_mtu is bigger than this one */ - return (mtu_sizes[i]); - } - } - /* here return the highest allowable */ - return (cur_mtu); -} - - void sctp_pathmtu_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, @@ -1717,7 +1677,7 @@ sctp_pathmtu_timer(struct sctp_inpcb *in { uint32_t next_mtu, mtu; - next_mtu = sctp_getnext_mtu(inp, net-mtu); + next_mtu = sctp_get_next_mtu(inp, net-mtu); if ((next_mtu net-mtu) (net-port == 0)) { if ((net-src_addr_selected == 0) || Modified: head/sys/netinet/sctp_usrreq.c == --- head/sys/netinet/sctp_usrreq.c Sun Nov 7 18:42:37 2010 (r214938) +++ head/sys/netinet/sctp_usrreq.c Sun Nov 7 18:50:35 2010 (r214939) @@ -194,7 +194,7 @@ sctp_notify_mbuf(struct sctp_inpcb *inp, * mtu is. Rats we will have to guess (in a educated fashion * of course) */ - nxtsz = find_next_best_mtu(totsz); + nxtsz = sctp_get_prev_mtu(totsz); } /* Stop any PMTU timer */ if (SCTP_OS_TIMER_PENDING(net-pmtu_timer.timer)) { Modified: head/sys/netinet/sctputil.c == --- head/sys/netinet/sctputil.c Sun Nov 7 18:42:37 2010(r214938) +++ head/sys/netinet/sctputil.c Sun Nov 7 18:50:35 2010(r214939) @@ -50,8 +50,6 @@ __FBSDID($FreeBSD$); #include netinet/sctp_cc_functions.h #include netinet/sctp_bsd_addr.h -#define NUMBER_OF_MTU_SIZES 18 - #ifndef KTR_SCTP #define KTR_SCTP KTR_SUBSYS @@ -753,7 +751,7 @@ sctp_stop_timers_for_shutdown(struct sct * a list of sizes based on typical mtu's, used only if next hop size not * returned. */ -static int sctp_mtu_sizes[] = { +static uint32_t sctp_mtu_sizes[] = { 68, 296, 508, @@ -774,25 +772,42 @@ static int sctp_mtu_sizes[] = { 65535 }; -int -find_next_best_mtu(int totsz) +/* + * Return the largest MTU smaller than val. If there is no + * entry, just return val. + */ +uint32_t +sctp_get_prev_mtu(uint32_t val) { - int i, perfer; + uint32_t i; - /* -* if we are in here we must find the next best fit based on the -* size of the dg that failed to be sent. -*/ - perfer = 0; - for (i = 0; i NUMBER_OF_MTU_SIZES; i++) { - if (totsz sctp_mtu_sizes[i]) { - perfer = i - 1; - if (perfer 0) - perfer = 0; + if (val = sctp_mtu_sizes[0]) { + return (val); + } + for (i = 1; i (sizeof(sctp_mtu_sizes) / sizeof(uint32_t)); i++) { + if (val = sctp_mtu_sizes[i]) { break; } } - return (sctp_mtu_sizes[perfer]); + return (sctp_mtu_sizes[i - 1]); +} + +/* + * Return the smallest MTU larger than val. If there is no + * entry, just return val. + */ +uint32_t +sctp_get_next_mtu(struct sctp_inpcb *inp, uint32_t val) +{ + /* select another MTU that is just bigger than this one */ + uint32_t i; + + for (i = 0; i (sizeof(sctp_mtu_sizes) / sizeof(uint32_t)); i++) { + if (val sctp_mtu_sizes[i]) { + return (sctp_mtu_sizes[i]); +
Re: svn commit: r214905 - in head/lib/libarchive: . test
On Nov 6, 2010, at 9:09 PM, Anonymous wrote: Tim Kientzle kient...@freebsd.org writes: Author: kientzle Date: Sun Nov 7 03:40:37 2010 New Revision: 214905 URL: http://svn.freebsd.org/changeset/base/214905 Log: If the Zip reader doesn't see a PK signature block because there's inter-entry garbage, just scan forward to find the next one. This allows us to handle a lot of Zip archives that have been modified in-place. It's unrelated but can you also look at archives produces by Mojo Setup? http://icculus.org/mojosetup/examples/ $ /usr/bin/unzip duke3d-mojosetup-linux-x86.bin Archive: duke3d-mojosetup-linux-x86.bin unzip: Unrecognized archive format zsh: exit 1 $ LOCALBASE/bin/unzip duke3d-mojosetup-linux-x86.bin Archive: duke3d-mojosetup-linux-x86.bin warning [duke3d-mojosetup-linux-x86.bin]: 157716 extra bytes at beginning or within zipfile (attempting to process anyway) creating: data/ inflating: data/duke3d_readme.txt Libarchive currently doesn't support self-extracting Zip archives (the 157716 extra bytes that Info-Zip mentions). There's a hack in libarchive's Zip reader that mostly supports one particular common type of self-extracting Zip archive, but it's not very easy to generalize. There are a couple of possible options for addressing this, but I won't have time to work on any of those any time soon. Tim ___ 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: r214941 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: avg Date: Sun Nov 7 19:32:03 2010 New Revision: 214941 URL: http://svn.freebsd.org/changeset/base/214941 Log: Followup to r214936: zfs_getpages: account for differences from head in page locking Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Nov 7 19:23:25 2010(r214940) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Nov 7 19:32:03 2010(r214941) @@ -4181,14 +4181,13 @@ zfs_getpages(struct vnode *vp, vm_page_t KASSERT(vp-v_object == object, (mismatching object)); VM_OBJECT_LOCK(object); - + vm_page_lock_queues(); for (i = 0; i pcount; i++) { if (i != reqpage) { - vm_page_lock(m[i]); vm_page_free(m[i]); - vm_page_unlock(m[i]); } } + vm_page_unlock_queues(); if (mreq-valid) { if (mreq-valid != VM_PAGE_BITS_ALL) ___ 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: r214942 - stable/8/sys/vm
Author: alc Date: Sun Nov 7 19:51:51 2010 New Revision: 214942 URL: http://svn.freebsd.org/changeset/base/214942 Log: MFC r214564 Correct some format strings used by sysctls. Modified: stable/8/sys/vm/vm_phys.c stable/8/sys/vm/vm_reserv.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) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/vm/vm_phys.c == --- stable/8/sys/vm/vm_phys.c Sun Nov 7 19:32:03 2010(r214941) +++ stable/8/sys/vm/vm_phys.c Sun Nov 7 19:51:51 2010(r214942) @@ -120,11 +120,11 @@ sysctl_vm_phys_free(SYSCTL_HANDLER_ARGS) sbuf_printf(sbuf, -- -- ); sbuf_printf(sbuf, --\n); for (oind = VM_NFREEORDER - 1; oind = 0; oind--) { - sbuf_printf(sbuf, %2.2d (%6.6dK), oind, + sbuf_printf(sbuf, %2d (%6dK), oind, 1 (PAGE_SHIFT - 10 + oind)); for (pind = 0; pind VM_NFREEPOOL; pind++) { fl = vm_phys_free_queues[flind][pind]; - sbuf_printf(sbuf, | %6.6d, fl[oind].lcnt); + sbuf_printf(sbuf, | %6d, fl[oind].lcnt); } sbuf_printf(sbuf, \n); } Modified: stable/8/sys/vm/vm_reserv.c == --- stable/8/sys/vm/vm_reserv.c Sun Nov 7 19:32:03 2010(r214941) +++ stable/8/sys/vm/vm_reserv.c Sun Nov 7 19:51:51 2010(r214942) @@ -196,7 +196,7 @@ sysctl_vm_reserv_partpopq(SYSCTL_HANDLER unused_pages += VM_LEVEL_0_NPAGES - rv-popcnt; } mtx_unlock(vm_page_queue_free_mtx); - sbuf_printf(sbuf, %5.5d: %6.6dK, %6.6d\n, level, + sbuf_printf(sbuf, %5d: %6dK, %6d\n, level, unused_pages * (PAGE_SIZE / 1024), counter); } sbuf_finish(sbuf); ___ 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: r214943 - stable/7/sys/vm
Author: alc Date: Sun Nov 7 20:20:19 2010 New Revision: 214943 URL: http://svn.freebsd.org/changeset/base/214943 Log: MFC r214564 Correct some format strings used by sysctls. Modified: stable/7/sys/vm/vm_phys.c stable/7/sys/vm/vm_reserv.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/vm/vm_phys.c == --- stable/7/sys/vm/vm_phys.c Sun Nov 7 19:51:51 2010(r214942) +++ stable/7/sys/vm/vm_phys.c Sun Nov 7 20:20:19 2010(r214943) @@ -120,11 +120,11 @@ sysctl_vm_phys_free(SYSCTL_HANDLER_ARGS) sbuf_printf(sbuf, -- -- ); sbuf_printf(sbuf, --\n); for (oind = VM_NFREEORDER - 1; oind = 0; oind--) { - sbuf_printf(sbuf, %2.2d (%6.6dK), oind, + sbuf_printf(sbuf, %2d (%6dK), oind, 1 (PAGE_SHIFT - 10 + oind)); for (pind = 0; pind VM_NFREEPOOL; pind++) { fl = vm_phys_free_queues[flind][pind]; - sbuf_printf(sbuf, | %6.6d, fl[oind].lcnt); + sbuf_printf(sbuf, | %6d, fl[oind].lcnt); } sbuf_printf(sbuf, \n); } Modified: stable/7/sys/vm/vm_reserv.c == --- stable/7/sys/vm/vm_reserv.c Sun Nov 7 19:51:51 2010(r214942) +++ stable/7/sys/vm/vm_reserv.c Sun Nov 7 20:20:19 2010(r214943) @@ -196,7 +196,7 @@ sysctl_vm_reserv_partpopq(SYSCTL_HANDLER unused_pages += VM_LEVEL_0_NPAGES - rv-popcnt; } mtx_unlock(vm_page_queue_free_mtx); - sbuf_printf(sbuf, %5.5d: %6.6dK, %6.6d\n, level, + sbuf_printf(sbuf, %5d: %6dK, %6d\n, level, unused_pages * (PAGE_SIZE / 1024), counter); } sbuf_finish(sbuf); ___ 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: r214944 - stable/8/bin/sh
Author: jilles Date: Sun Nov 7 20:29:39 2010 New Revision: 214944 URL: http://svn.freebsd.org/changeset/base/214944 Log: MFC r214609: sh(1): Correct synopsis and make precise how $0 is set. In particular, the extra argument to set $0 with -c was not documented. Modified: stable/8/bin/sh/sh.1 Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/sh.1 == --- stable/8/bin/sh/sh.1Sun Nov 7 20:20:19 2010(r214943) +++ stable/8/bin/sh/sh.1Sun Nov 7 20:29:39 2010(r214944) @@ -32,7 +32,7 @@ .\from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\ $FreeBSD$ .\ -.Dd October 16, 2010 +.Dd October 31, 2010 .Dt SH 1 .Os .Sh NAME @@ -40,9 +40,24 @@ .Nd command interpreter (shell) .Sh SYNOPSIS .Nm -.Op Fl /+abCEefIimnPpsTuVvx +.Op Fl /+abCEefIimnPpTuVvx .Op Fl /+o Ar longname -.Op Fl c Ar string +.Oo +.Ar script +.Op Ar arg ... +.Oc +.Nm +.Op Fl /+abCEefIimnPpTuVvx +.Op Fl /+o Ar longname +.Fl c Ar string +.Oo +.Ar name +.Op Ar arg ... +.Oc +.Nm +.Op Fl /+abCEefIimnPpTuVvx +.Op Fl /+o Ar longname +.Fl s .Op Ar arg ... .Sh DESCRIPTION The @@ -1105,7 +1120,12 @@ For a pipeline, the process ID is that of the last command in the pipeline. .It Li $0 -(zero) Expands to the name of the shell or shell script. +(zero) Expands to the name of the shell script if passed on the command line, +the +.Ar name +operand if given (with +.Fl c ) +or otherwise argument 0 passed to the shell. .El .Ss Word Expansions This clause describes the various expansions that are ___ 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: r214945 - stable/7/bin/sh
Author: jilles Date: Sun Nov 7 20:33:36 2010 New Revision: 214945 URL: http://svn.freebsd.org/changeset/base/214945 Log: MFC r214609: sh(1): Correct synopsis and make precise how $0 is set. In particular, the extra argument to set $0 with -c was not documented. Modified: stable/7/bin/sh/sh.1 Directory Properties: stable/7/bin/sh/ (props changed) Modified: stable/7/bin/sh/sh.1 == --- stable/7/bin/sh/sh.1Sun Nov 7 20:29:39 2010(r214944) +++ stable/7/bin/sh/sh.1Sun Nov 7 20:33:36 2010(r214945) @@ -32,7 +32,7 @@ .\from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\ $FreeBSD$ .\ -.Dd October 16, 2010 +.Dd October 31, 2010 .Dt SH 1 .Os .Sh NAME @@ -40,9 +40,24 @@ .Nd command interpreter (shell) .Sh SYNOPSIS .Nm -.Op Fl /+abCEefIimnPpsTuVvx +.Op Fl /+abCEefIimnPpTuVvx .Op Fl /+o Ar longname -.Op Fl c Ar string +.Oo +.Ar script +.Op Ar arg ... +.Oc +.Nm +.Op Fl /+abCEefIimnPpTuVvx +.Op Fl /+o Ar longname +.Fl c Ar string +.Oo +.Ar name +.Op Ar arg ... +.Oc +.Nm +.Op Fl /+abCEefIimnPpTuVvx +.Op Fl /+o Ar longname +.Fl s .Op Ar arg ... .Sh DESCRIPTION The @@ -1099,7 +1114,12 @@ For a pipeline, the process ID is that of the last command in the pipeline. .It Li $0 -(zero) Expands to the name of the shell or shell script. +(zero) Expands to the name of the shell script if passed on the command line, +the +.Ar name +operand if given (with +.Fl c ) +or otherwise argument 0 passed to the shell. .El .Ss Word Expansions This clause describes the various expansions that are ___ 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: r214946 - in head/sys/arm: conf xscale/ixp425
Author: thompsa Date: Sun Nov 7 20:33:39 2010 New Revision: 214946 URL: http://svn.freebsd.org/changeset/base/214946 Log: Hook up the five gpio pins on the Avila board to the gpio framework. There are actually 16 I/O lines but the other ones are used for system devices and interrupts. The IXP4XX platform can set interrupts on these pins for high/low/rising/falling/transitional but this is not implemented yet. The Cambria has the same interface but as all the pins are assigned to system functions the gpio header is toggled via a PLD on the i2c bus and is not supported by this commit. Added: head/sys/arm/xscale/ixp425/avila_gpio.c (contents, props changed) Modified: head/sys/arm/conf/AVILA head/sys/arm/conf/AVILA.hints head/sys/arm/xscale/ixp425/files.avila head/sys/arm/xscale/ixp425/ixp425reg.h Modified: head/sys/arm/conf/AVILA == --- head/sys/arm/conf/AVILA Sun Nov 7 20:33:36 2010(r214945) +++ head/sys/arm/conf/AVILA Sun Nov 7 20:33:39 2010(r214946) @@ -87,6 +87,10 @@ device ad7418 # AD7418 on I2C bus device avila_led +device gpio +device gpioled +device avila_gpio # GPIO pins on J8 + device ata device atadisk # ATA disk drives device avila_ata # Gateworks CF/IDE support Modified: head/sys/arm/conf/AVILA.hints == --- head/sys/arm/conf/AVILA.hints Sun Nov 7 20:33:36 2010 (r214945) +++ head/sys/arm/conf/AVILA.hints Sun Nov 7 20:33:39 2010 (r214946) @@ -41,6 +41,9 @@ hint.ata_avila.0.at=ixp0 # Front Panel LED hint.led_avila.0.at=ixp0 +# GPIO pins +hint.gpio_avila.0.at=ixp0 + # Analog Devices AD7418 temperature sensor hint.ad7418.0.at=iicbus0 hint.ad7418.0.addr=0x50 Added: head/sys/arm/xscale/ixp425/avila_gpio.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/xscale/ixp425/avila_gpio.c Sun Nov 7 20:33:39 2010 (r214946) @@ -0,0 +1,380 @@ +/*- + * Copyright (c) 2009, Oleksandr Tymoshenko go...@freebsd.org + * Copyright (c) 2009, Luiz Otavio O Souza. + * Copyright (c) 2010, Andrew Thompson thom...@freebsd.org + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice unmodified, this list of conditions, and the following + *disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * GPIO driver for Gateworks Avilia + */ + +#include sys/cdefs.h +__FBSDID($FreeBSD$); + +#include sys/param.h +#include sys/systm.h +#include sys/bus.h + +#include sys/kernel.h +#include sys/module.h +#include sys/rman.h +#include sys/lock.h +#include sys/mutex.h +#include sys/gpio.h + +#include machine/bus.h +#include machine/resource.h +#include arm/xscale/ixp425/ixp425reg.h +#include arm/xscale/ixp425/ixp425var.h + +#include gpio_if.h + +#define GPIO_SET_BITS(sc, reg, bits) \ + GPIO_CONF_WRITE_4(sc, reg, GPIO_CONF_READ_4(sc, (reg)) | (bits)) + +#define GPIO_CLEAR_BITS(sc, reg, bits) \ + GPIO_CONF_WRITE_4(sc, reg, GPIO_CONF_READ_4(sc, (reg)) ~(bits)) + +#define GPIO_LOCK(_sc) mtx_lock((_sc)-sc_mtx) +#define GPIO_UNLOCK(_sc) mtx_unlock((_sc)-sc_mtx) +#define GPIO_LOCK_ASSERT(_sc) mtx_assert((_sc)-sc_mtx, MA_OWNED) + +struct avila_gpio_softc { + device_tsc_dev; +struct mtx sc_mtx; + bus_space_tag_t sc_iot; + bus_space_handle_t sc_gpio_ioh; + uint32_tsc_valid; + struct gpio_pin sc_pins[IXP4XX_GPIO_PINS]; +}; + +struct avila_gpio_pin { + const char
svn commit: r214947 - head/contrib/gdb/gdb
Author: gonzo Date: Sun Nov 7 20:37:25 2010 New Revision: 214947 URL: http://svn.freebsd.org/changeset/base/214947 Log: Calculate offset from frame top for registers saved on a stack frame. Modified: head/contrib/gdb/gdb/mips-tdep.c Modified: head/contrib/gdb/gdb/mips-tdep.c == --- head/contrib/gdb/gdb/mips-tdep.cSun Nov 7 20:33:39 2010 (r214946) +++ head/contrib/gdb/gdb/mips-tdep.cSun Nov 7 20:37:25 2010 (r214947) @@ -1495,6 +1495,7 @@ mips_mdebug_frame_cache (struct frame_in int kernel_trap; /* What registers have been saved? Bitmasks. */ unsigned long gen_mask, float_mask; + long reg_offset; if ((*this_cache) != NULL) return (*this_cache); @@ -1513,6 +1514,8 @@ mips_mdebug_frame_cache (struct frame_in /* Extract the frame's base. */ cache-base = (frame_unwind_register_signed (next_frame, NUM_REGS + PROC_FRAME_REG (proc_desc)) + PROC_FRAME_OFFSET (proc_desc) - PROC_FRAME_ADJUST (proc_desc)); + /* Save registers offset from scratching by following find_proc_desc call */ + reg_offset = PROC_REG_OFFSET (proc_desc); kernel_trap = PROC_REG_MASK (proc_desc) 1; gen_mask = kernel_trap ? 0x : PROC_REG_MASK (proc_desc); @@ -1567,8 +1570,7 @@ mips_mdebug_frame_cache (struct frame_in /* Fill in the offsets for the registers which gen_mask says were saved. */ { -CORE_ADDR reg_position = (cache-base - + PROC_REG_OFFSET (proc_desc)); +CORE_ADDR reg_position = (cache-base + reg_offset); int ireg; for (ireg = MIPS_NUMREGS - 1; gen_mask; --ireg, gen_mask = 1) if (gen_mask 0x8000) @@ -2162,15 +2164,18 @@ restart: { PROC_REG_MASK (temp_proc_desc) |= 1 reg; set_reg_offset (temp_saved_regs, reg, sp + low_word); + /* Do we have registers offset yet? */ + if (!PROC_REG_OFFSET (temp_proc_desc)) +PROC_REG_OFFSET (temp_proc_desc) = low_word - PROC_FRAME_OFFSET (temp_proc_desc); } else if ((high_word 0xFFE0) == 0xffa0) /* sd reg,offset($sp) */ { - /* Irix 6.2 N32 ABI uses sd instructions for saving $gp and $ra, -but the register size used is only 32 bits. Make the address -for the saved register point to the lower 32 bits. */ PROC_REG_MASK (temp_proc_desc) |= 1 reg; set_reg_offset (temp_saved_regs, reg, - sp + low_word + 8 - mips_regsize (current_gdbarch)); + sp + low_word); + /* Do we have registers offset yet? */ + if (!PROC_REG_OFFSET (temp_proc_desc)) +PROC_REG_OFFSET (temp_proc_desc) = low_word - PROC_FRAME_OFFSET (temp_proc_desc); } else if (high_word == 0x27be)/* addiu $30,$sp,size */ { ___ 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: r214948 - head/sys/arm/xscale/ixp425
Author: thompsa Date: Sun Nov 7 20:38:14 2010 New Revision: 214948 URL: http://svn.freebsd.org/changeset/base/214948 Log: Remove line for the uncommitted Cambria gpio drive that snuck in with r214946. Modified: head/sys/arm/xscale/ixp425/files.avila Modified: head/sys/arm/xscale/ixp425/files.avila == --- head/sys/arm/xscale/ixp425/files.avila Sun Nov 7 20:37:25 2010 (r214947) +++ head/sys/arm/xscale/ixp425/files.avila Sun Nov 7 20:38:14 2010 (r214948) @@ -6,5 +6,4 @@ arm/xscale/ixp425/avila_gpio.c optional arm/xscale/ixp425/cambria_exp_space.c standard arm/xscale/ixp425/cambria_fled.c optional cambria_fled arm/xscale/ixp425/cambria_led.coptional cambria_led -arm/xscale/ixp425/cambria_gpio.c optional cambria_gpio arm/xscale/ixp425/ixdp425_pci.coptional pci ___ 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: r214949 - head/contrib/gdb/gdb
Author: gonzo Date: Sun Nov 7 20:40:00 2010 New Revision: 214949 URL: http://svn.freebsd.org/changeset/base/214949 Log: Change register numbers according to current struct reg and struct fpreg in src/sys/mips/include/reg.h Modified: head/contrib/gdb/gdb/mips-tdep.h head/contrib/gdb/gdb/mipsfbsd-tdep.h Modified: head/contrib/gdb/gdb/mips-tdep.h == --- head/contrib/gdb/gdb/mips-tdep.hSun Nov 7 20:38:14 2010 (r214948) +++ head/contrib/gdb/gdb/mips-tdep.hSun Nov 7 20:40:00 2010 (r214949) @@ -78,7 +78,7 @@ enum { MIPS_EMBED_BADVADDR_REGNUM = 35, MIPS_EMBED_CAUSE_REGNUM = 36, MIPS_EMBED_PC_REGNUM = 37, - MIPS_EMBED_FP0_REGNUM = 38 + MIPS_EMBED_FP0_REGNUM = 40 }; /* Defined in mips-tdep.c and used in remote-mips.c */ Modified: head/contrib/gdb/gdb/mipsfbsd-tdep.h == --- head/contrib/gdb/gdb/mipsfbsd-tdep.hSun Nov 7 20:38:14 2010 (r214948) +++ head/contrib/gdb/gdb/mipsfbsd-tdep.hSun Nov 7 20:40:00 2010 (r214949) @@ -34,7 +34,7 @@ void mipsfbsd_fill_reg (char *, int); void mipsfbsd_supply_fpreg (char *, int); void mipsfbsd_fill_fpreg (char *, int); -#define SIZEOF_STRUCT_REG (38 * mips_regsize (current_gdbarch)) -#define SIZEOF_STRUCT_FPREG(33 * mips_regsize (current_gdbarch)) +#define SIZEOF_STRUCT_REG (40 * mips_regsize (current_gdbarch)) +#define SIZEOF_STRUCT_FPREG(34 * mips_regsize (current_gdbarch)) #endif /* mipsfbsd_TDEP_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: r214950 - head/contrib/binutils/bfd
Author: gonzo Date: Sun Nov 7 20:44:46 2010 New Revision: 214950 URL: http://svn.freebsd.org/changeset/base/214950 Log: Prevent endless loop by detecting broken MIPS.options Modified: head/contrib/binutils/bfd/elfxx-mips.c Modified: head/contrib/binutils/bfd/elfxx-mips.c == --- head/contrib/binutils/bfd/elfxx-mips.c Sun Nov 7 20:40:00 2010 (r214949) +++ head/contrib/binutils/bfd/elfxx-mips.c Sun Nov 7 20:44:46 2010 (r214950) @@ -4330,6 +4330,15 @@ _bfd_mips_elf_section_processing (bfd *a bfd_mips_elf_swap_options_in (abfd, (Elf_External_Options *) l, intopt); + if (intopt.size sizeof (Elf_External_Options)) + { + (*_bfd_error_handler) + (_(Warning: bad `%s' option size %u smaller than its header), + MIPS_ELF_OPTIONS_SECTION_NAME (abfd), intopt.size); + break; + } + + if (ABI_64_P (abfd) intopt.kind == ODK_REGINFO) { bfd_byte buf[8]; @@ -4542,6 +4551,14 @@ _bfd_mips_elf_section_from_shdr (bfd *ab bfd_mips_elf_swap_options_in (abfd, (Elf_External_Options *) l, intopt); + if (intopt.size sizeof (Elf_External_Options)) + { + (*_bfd_error_handler) + (_(Warning: bad `%s' option size %u smaller than its header), + MIPS_ELF_OPTIONS_SECTION_NAME (abfd), intopt.size); + break; + } + if (ABI_64_P (abfd) intopt.kind == ODK_REGINFO) { Elf64_Internal_RegInfo intreg; ___ 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: r214951 - head/gnu/usr.bin/gdb/arch/mips
Author: gonzo Date: Sun Nov 7 20:53:19 2010 New Revision: 214951 URL: http://svn.freebsd.org/changeset/base/214951 Log: Link threads support to the build Modified: head/gnu/usr.bin/gdb/arch/mips/Makefile head/gnu/usr.bin/gdb/arch/mips/init.c Modified: head/gnu/usr.bin/gdb/arch/mips/Makefile == --- head/gnu/usr.bin/gdb/arch/mips/Makefile Sun Nov 7 20:44:46 2010 (r214950) +++ head/gnu/usr.bin/gdb/arch/mips/Makefile Sun Nov 7 20:53:19 2010 (r214951) @@ -1,7 +1,7 @@ # $FreeBSD$ .if !defined(GDB_CROSS_DEBUGGER) -LIBSRCS+= mipsfbsd-nat.c +LIBSRCS+= mipsfbsd-nat.c fbsd-threads.c .endif LIBSRCS+= solib.c solib-svr4.c LIBSRCS+= mips-tdep.c mipsfbsd-tdep.c fbsd-proc.c Modified: head/gnu/usr.bin/gdb/arch/mips/init.c == --- head/gnu/usr.bin/gdb/arch/mips/init.c Sun Nov 7 20:44:46 2010 (r214950) +++ head/gnu/usr.bin/gdb/arch/mips/init.c Sun Nov 7 20:53:19 2010 (r214951) @@ -131,6 +131,7 @@ initialize_all_files (void) _initialize_infptrace (); _initialize_inftarg (); _initialize_solib (); + _initialize_thread_db (); _initialize_svr4_solib (); #if 0 _initialize_svr4_lm (); ___ 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: r214952 - head/gnu/usr.bin/gdb/kgdb
Author: gonzo Date: Sun Nov 7 20:56:41 2010 New Revision: 214952 URL: http://svn.freebsd.org/changeset/base/214952 Log: - Use proper constant for accessing PCB intead of hardcoded numbers - Minor clean-up Modified: head/gnu/usr.bin/gdb/kgdb/trgt_mips.c Modified: head/gnu/usr.bin/gdb/kgdb/trgt_mips.c == --- head/gnu/usr.bin/gdb/kgdb/trgt_mips.c Sun Nov 7 20:53:19 2010 (r214951) +++ head/gnu/usr.bin/gdb/kgdb/trgt_mips.c Sun Nov 7 20:56:41 2010 (r214952) @@ -46,6 +46,8 @@ __FBSDID($FreeBSD$); #include frame-unwind.h #include mips-tdep.h +#include machine/pcb.h + #include kgdb.h void @@ -61,24 +63,26 @@ kgdb_trgt_fetch_registers(int regno __un warnx(kvm_read: %s, kvm_geterr(kvm)); memset(pcb, 0, sizeof(pcb)); } - supply_register(MIPS_S0_REGNUM, (char *)pcb.pcb_context[0]); - supply_register(MIPS_S1_REGNUM, (char *)pcb.pcb_context[1]); - supply_register(MIPS_S2_REGNUM, (char *)pcb.pcb_context[2]); - supply_register(MIPS_S3_REGNUM, (char *)pcb.pcb_context[3]); - supply_register(MIPS_S4_REGNUM, (char *)pcb.pcb_context[4]); - supply_register(MIPS_S5_REGNUM, (char *)pcb.pcb_context[5]); - supply_register(MIPS_S6_REGNUM, (char *)pcb.pcb_context[6]); - supply_register(MIPS_S7_REGNUM, (char *)pcb.pcb_context[7]); - supply_register(MIPS_SP_REGNUM, (char *)pcb.pcb_context[8]); - supply_register(MIPS_FP_REGNUM, (char *)pcb.pcb_context[9]); - supply_register(MIPS_RA_REGNUM, (char *)pcb.pcb_context[10]); + + supply_register(MIPS_S0_REGNUM, (char *)pcb.pcb_context[PCB_REG_S0]); + supply_register(MIPS_S1_REGNUM, (char *)pcb.pcb_context[PCB_REG_S1]); + supply_register(MIPS_S2_REGNUM, (char *)pcb.pcb_context[PCB_REG_S2]); + supply_register(MIPS_S3_REGNUM, (char *)pcb.pcb_context[PCB_REG_S3]); + supply_register(MIPS_S4_REGNUM, (char *)pcb.pcb_context[PCB_REG_S4]); + supply_register(MIPS_S5_REGNUM, (char *)pcb.pcb_context[PCB_REG_S5]); + supply_register(MIPS_S6_REGNUM, (char *)pcb.pcb_context[PCB_REG_S6]); + supply_register(MIPS_S7_REGNUM, (char *)pcb.pcb_context[PCB_REG_S7]); + supply_register(MIPS_SP_REGNUM, (char *)pcb.pcb_context[PCB_REG_SP]); + supply_register(MIPS_FP_REGNUM, (char *)pcb.pcb_context[PCB_REG_GP]); + supply_register(MIPS_RA_REGNUM, (char *)pcb.pcb_context[PCB_REG_RA]); + supply_register(MIPS_EMBED_PC_REGNUM, (char *)pcb.pcb_context[PCB_REG_PC]); } void kgdb_trgt_store_registers(int regno __unused) { - fprintf_unfiltered(gdb_stderr, XXX: %s\n, __func__); + fprintf_unfiltered(gdb_stderr, Unimplemented function: %s\n, __func__); } void @@ -127,7 +131,7 @@ static int kgdb_trgt_frame_offset[] = { }; static struct kgdb_frame_cache * -kgdb_trgt_frame_cache(struct frame_info *next_frame __unused, void **this_cache __unused) +kgdb_trgt_frame_cache(struct frame_info *next_frame, void **this_cache) { char buf[MAX_REGISTER_SIZE]; struct kgdb_frame_cache *cache; @@ -192,7 +196,7 @@ static const struct frame_unwind kgdb_tr }; const struct frame_unwind * -kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame __unused) +kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame) { char *pname; CORE_ADDR pc; @@ -207,6 +211,5 @@ kgdb_trgt_trapframe_sniffer(struct frame (strcmp(pname, MipsUserIntr) == 0) || (strcmp(pname, MipsUserGenException) == 0)) return (kgdb_trgt_trapframe_unwind); - /* printf(%s: %llx =%s\n, __func__, pc, pname); */ return (NULL); } ___ 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: r214953 - head/sys/vm
Author: alc Date: Sun Nov 7 21:40:34 2010 New Revision: 214953 URL: http://svn.freebsd.org/changeset/base/214953 Log: In case the stack size reaches its limit and its growth must be restricted, ensure that grow_amount is a multiple of the page size. Otherwise, the kernel may crash in swap_reserve_by_uid() on HEAD and FreeBSD 8.x, and produce a core file with a missing stack on FreeBSD 7.x. Diagnosed and reported by: jilles Reviewed by: kib MFC after:1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c == --- head/sys/vm/vm_map.cSun Nov 7 20:56:41 2010(r214952) +++ head/sys/vm/vm_map.cSun Nov 7 21:40:34 2010(r214953) @@ -3338,7 +3338,8 @@ Retry: if (grow_amount stack_entry-avail_ssize) grow_amount = stack_entry-avail_ssize; if (is_procstack (ctob(vm-vm_ssize) + grow_amount stacklim)) { - grow_amount = stacklim - ctob(vm-vm_ssize); + grow_amount = trunc_page((vm_size_t)stacklim) - + ctob(vm-vm_ssize); } /* If we would blow our VMEM resource limit, no go */ ___ 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: r214954 - head/sys/amd64/amd64
Author: alc Date: Sun Nov 7 21:48:49 2010 New Revision: 214954 URL: http://svn.freebsd.org/changeset/base/214954 Log: Don't call pmap_demote_DMAP() on MTRR entries from the BIOS that are marked as bogus. Reported by: Jia-Shiun Li Modified: head/sys/amd64/amd64/amd64_mem.c Modified: head/sys/amd64/amd64/amd64_mem.c == --- head/sys/amd64/amd64/amd64_mem.cSun Nov 7 21:40:34 2010 (r214953) +++ head/sys/amd64/amd64/amd64_mem.cSun Nov 7 21:48:49 2010 (r214954) @@ -583,7 +583,7 @@ amd64_mrset(struct mem_range_softc *sc, i = (sc-mr_cap MR686_FIXMTRR) ? MTRR_N64K + MTRR_N16K + MTRR_N4K : 0; mrd = sc-mr_desc + i; for (; i sc-mr_ndesc; i++, mrd++) { - if (mrd-mr_flags MDF_ACTIVE) + if ((mrd-mr_flags (MDF_ACTIVE | MDF_BOGUS)) == MDF_ACTIVE) pmap_demote_DMAP(mrd-mr_base, mrd-mr_len, FALSE); } @@ -688,7 +688,7 @@ amd64_mrinit(struct mem_range_softc *sc) i = (sc-mr_cap MR686_FIXMTRR) ? MTRR_N64K + MTRR_N16K + MTRR_N4K : 0; mrd = sc-mr_desc + i; for (; i sc-mr_ndesc; i++, mrd++) { - if (mrd-mr_flags MDF_ACTIVE) + if ((mrd-mr_flags (MDF_ACTIVE | MDF_BOGUS)) == MDF_ACTIVE) pmap_demote_DMAP(mrd-mr_base, mrd-mr_len, TRUE); } } ___ 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: r214955 - head/tools/tools/nanobsd
Author: n_hibma Date: Sun Nov 7 21:57:57 2010 New Revision: 214955 URL: http://svn.freebsd.org/changeset/base/214955 Log: - Set -x flag when executing customisation scripts to aid in debugging them. - Use KERNCONFDIR with KERNCONF instead of copying the kernel config into the source tree so included kernel configs work. - Put more stuff in the _.bk/_.ik log file, not just make statements. - Add the kernel config name to the pprint during kernel installation. - Add NANO_MODULES providing a list of modules to build and install. Reviewed by: imp MFC after:2 weeks Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh == --- head/tools/tools/nanobsd/nanobsd.sh Sun Nov 7 21:48:49 2010 (r214954) +++ head/tools/tools/nanobsd/nanobsd.sh Sun Nov 7 21:57:57 2010 (r214955) @@ -75,6 +75,9 @@ CONF_WORLD=' ' # Kernel config file to use NANO_KERNEL=GENERIC +# Kernel modules to build; default is none +NANO_MODULES= + # Customize commands. NANO_CUSTOMIZE= @@ -189,19 +192,26 @@ build_kernel ( ) ( pprint 2 build kernel ($NANO_KERNEL) pprint 3 log: ${MAKEOBJDIRPREFIX}/_.bk + ( if [ -f ${NANO_KERNEL} ] ; then - cp ${NANO_KERNEL} ${NANO_SRC}/sys/${NANO_ARCH}/conf + kernconfdir=$(realpath $(dirname ${NANO_KERNEL})) + kernconf=$(basename ${NANO_KERNEL}) + else + kernconf=${NANO_KERNEL} fi - (cd ${NANO_SRC}; + cd ${NANO_SRC}; # unset these just in case to avoid compiler complaints # when cross-building unset TARGET_CPUTYPE unset TARGET_BIG_ENDIAN + # Note: We intentionally build all modules, not only the ones in + # NANO_MODULES so the built world can be reused by multiple images. env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ - __MAKE_CONF=${NANO_MAKE_CONF_BUILD} KERNCONF=`basename ${NANO_KERNEL}` \ -${MAKEOBJDIRPREFIX}/_.bk 21 - ) + __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ + ${kernconfdir:+KERNCONFDIR=}${kernconfdir} \ + KERNCONF=${kernconf} + ) ${MAKEOBJDIRPREFIX}/_.bk 21 ) clean_world ( ) ( @@ -258,14 +268,25 @@ install_etc ( ) ( ) install_kernel ( ) ( - pprint 2 install kernel + pprint 2 install kernel ($NANO_KERNEL) pprint 3 log: ${NANO_OBJ}/_.ik + ( + if [ -f ${NANO_KERNEL} ] ; then + kernconfdir=$(realpath $(dirname ${NANO_KERNEL})) + kernconf=$(basename ${NANO_KERNEL}) + else + kernconf=${NANO_KERNEL} + fi + cd ${NANO_SRC} env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ DESTDIR=${NANO_WORLDDIR} \ - __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} KERNCONF=`basename ${NANO_KERNEL}` \ -${NANO_OBJ}/_.ik 21 + __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} \ + ${kernconfdir:+KERNCONFDIR=}${kernconfdir} \ + KERNCONF=${kernconf} \ + MODULES_OVERRIDE=${NANO_MODULES} + ) ${NANO_OBJ}/_.ik 21 ) run_customize() ( @@ -276,7 +297,7 @@ run_customize() ( pprint 2 customize \$c\ pprint 3 log: ${NANO_OBJ}/_.cust.$c pprint 4 `type $c` - ( $c ) ${NANO_OBJ}/_.cust.$c 21 + ( set -x ; $c ) ${NANO_OBJ}/_.cust.$c 21 done ) @@ -288,7 +309,7 @@ run_late_customize() ( pprint 2 late customize \$c\ pprint 3 log: ${NANO_OBJ}/_.late_cust.$c pprint 4 `type $c` - ( $c ) ${NANO_OBJ}/_.late_cust.$c 21 + ( set -x ; $c ) ${NANO_OBJ}/_.late_cust.$c 21 done ) ___ 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: r214956 - in stable/8: sbin/growfs tools/regression/lib/msun tools/regression/sbin tools/regression/usr.bin/pkill tools/tools/ath/common tools/tools/termcap
Author: brian Date: Sun Nov 7 22:24:17 2010 New Revision: 214956 URL: http://svn.freebsd.org/changeset/base/214956 Log: MFC r197763 and r212839: Handle extending a filesystem into unzeroed storage. Added: stable/8/tools/regression/sbin/ - copied from r212839, head/tools/regression/sbin/ Modified: stable/8/sbin/growfs/growfs.c Directory Properties: stable/8/sbin/growfs/ (props changed) stable/8/tools/ (props changed) stable/8/tools/build/mk/ (props changed) stable/8/tools/build/options/ (props changed) stable/8/tools/debugscripts/ (props changed) stable/8/tools/kerneldoc/subsys/ (props changed) stable/8/tools/regression/acltools/ (props changed) stable/8/tools/regression/aio/aiotest/ (props changed) stable/8/tools/regression/bin/sh/ (props changed) stable/8/tools/regression/fifo/ (props changed) stable/8/tools/regression/geom/ (props changed) stable/8/tools/regression/lib/libc/ (props changed) stable/8/tools/regression/lib/msun/test-conj.t (props changed) stable/8/tools/regression/mqueue/mqtest1/ (props changed) stable/8/tools/regression/mqueue/mqtest2/ (props changed) stable/8/tools/regression/mqueue/mqtest3/ (props changed) stable/8/tools/regression/mqueue/mqtest4/ (props changed) stable/8/tools/regression/mqueue/mqtest5/ (props changed) stable/8/tools/regression/poll/ (props changed) stable/8/tools/regression/posixsem/ (props changed) stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/usr.bin/ (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_g.t (props changed) stable/8/tools/regression/usr.bin/pkill/pgrep-_s.t (props changed) stable/8/tools/regression/usr.bin/pkill/pkill-_g.t (props changed) stable/8/tools/regression/usr.bin/sed/ (props changed) stable/8/tools/regression/usr.bin/tr/ (props changed) stable/8/tools/test/ (props changed) stable/8/tools/tools/ (props changed) stable/8/tools/tools/ath/ (props changed) stable/8/tools/tools/ath/common/dumpregs.h (props changed) stable/8/tools/tools/ath/common/dumpregs_5210.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5211.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5212.c (props changed) stable/8/tools/tools/ath/common/dumpregs_5416.c (props changed) stable/8/tools/tools/nanobsd/ (props changed) stable/8/tools/tools/netrate/ (props changed) stable/8/tools/tools/netrate/tcpp/ (props changed) stable/8/tools/tools/termcap/termcap.pl (props changed) stable/8/tools/tools/umastat/ (props changed) stable/8/tools/tools/vimage/ (props changed) Modified: stable/8/sbin/growfs/growfs.c == --- stable/8/sbin/growfs/growfs.c Sun Nov 7 21:57:57 2010 (r214955) +++ stable/8/sbin/growfs/growfs.c Sun Nov 7 22:24:17 2010 (r214956) @@ -371,16 +371,16 @@ static void initcg(int cylno, time_t utime, int fso, unsigned int Nflag) { DBG_FUNC(initcg) - static void *iobuf; + static caddr_t iobuf; long blkno, start; ufs2_daddr_t i, cbase, dmax; struct ufs1_dinode *dp1; struct csum *cs; uint d, dupper, dlower; - if (iobuf == NULL (iobuf = malloc(sblock.fs_bsize)) == NULL) { + if (iobuf == NULL (iobuf = malloc(sblock.fs_bsize * 3)) == NULL) errx(37, panic: cannot allocate I/O buffer); - } + /* * Determine block bounds for cylinder group. * Allow space for super block summary information in first @@ -400,7 +400,8 @@ initcg(int cylno, time_t utime, int fso, acg.cg_magic = CG_MAGIC; acg.cg_cgx = cylno; acg.cg_niblk = sblock.fs_ipg; - acg.cg_initediblk = sblock.fs_ipg; + acg.cg_initediblk = sblock.fs_ipg 2 * INOPB(sblock) ? + sblock.fs_ipg : 2 * INOPB(sblock); acg.cg_ndblk = dmax - cbase; if (sblock.fs_contigsumsize 0) acg.cg_nclusterblks = acg.cg_ndblk / sblock.fs_frag; @@ -533,11 +534,14 @@ initcg(int cylno, time_t utime, int fso, sblock.fs_cstotal.cs_nbfree += acg.cg_cs.cs_nbfree; sblock.fs_cstotal.cs_nifree += acg.cg_cs.cs_nifree; *cs = acg.cg_cs; + + memcpy(iobuf, acg, sblock.fs_cgsize); + memset(iobuf + sblock.fs_cgsize, '\0', + sblock.fs_bsize * 3 - sblock.fs_cgsize); + wtfs(fsbtodb(sblock, cgtod(sblock, cylno)), - sblock.fs_bsize, (char *)acg, fso, Nflag); - DBG_DUMP_CG(sblock, - new cg, - acg); + sblock.fs_bsize * 3, iobuf, fso, Nflag); + DBG_DUMP_CG(sblock, new cg, acg); DBG_LEAVE; return; @@ -2209,6 +2213,7 @@ main(int argc, char **argv) printf(Warning: %jd sector(s) cannot be allocated.\n, (intmax_t)fsbtodb(sblock, sblock.fs_size % sblock.fs_fpg));
svn commit: r214957 - stable/8/sbin/growfs
Author: brian Date: Sun Nov 7 22:28:55 2010 New Revision: 214957 URL: http://svn.freebsd.org/changeset/base/214957 Log: MFC r198236 for now. Modified: stable/8/sbin/growfs/Makefile Directory Properties: stable/8/sbin/growfs/ (props changed) Modified: stable/8/sbin/growfs/Makefile == --- stable/8/sbin/growfs/Makefile Sun Nov 7 22:24:17 2010 (r214956) +++ stable/8/sbin/growfs/Makefile Sun Nov 7 22:28:55 2010 (r214957) @@ -10,8 +10,6 @@ PROG= growfs SRCS= growfs.c MAN= growfs.8 -WARNS?=6 - .if defined(GFSDBG) SRCS+= debug.c .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: r214958 - stable/8/sbin/growfs
Author: brian Date: Sun Nov 7 22:33:55 2010 New Revision: 214958 URL: http://svn.freebsd.org/changeset/base/214958 Log: MFC r212886 (by marcel): Unbreak the build on strong-aligned architectures. Modified: stable/8/sbin/growfs/growfs.c Directory Properties: stable/8/sbin/growfs/ (props changed) Modified: stable/8/sbin/growfs/growfs.c == --- stable/8/sbin/growfs/growfs.c Sun Nov 7 22:28:55 2010 (r214957) +++ stable/8/sbin/growfs/growfs.c Sun Nov 7 22:33:55 2010 (r214958) @@ -452,7 +452,7 @@ initcg(int cylno, time_t utime, int fso, bzero(iobuf, sblock.fs_bsize); for (i = 0; i sblock.fs_ipg / INOPF(sblock); i += sblock.fs_frag) { - dp1 = (struct ufs1_dinode *)iobuf; + dp1 = (struct ufs1_dinode *)(void *)iobuf; #ifdef FSIRAND for (j = 0; j INOPB(sblock); j++) { dp1-di_gen = random(); ___ 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: r214959 - head/usr.bin/yacc
Author: obrien Date: Sun Nov 7 22:51:54 2010 New Revision: 214959 URL: http://svn.freebsd.org/changeset/base/214959 Log: Change to ANSI-C function definitions. Modified: head/usr.bin/yacc/Makefile head/usr.bin/yacc/closure.c head/usr.bin/yacc/error.c head/usr.bin/yacc/lalr.c head/usr.bin/yacc/lr0.c head/usr.bin/yacc/main.c head/usr.bin/yacc/mkpar.c head/usr.bin/yacc/output.c head/usr.bin/yacc/reader.c head/usr.bin/yacc/skeleton.c head/usr.bin/yacc/symtab.c head/usr.bin/yacc/verbose.c head/usr.bin/yacc/warshall.c Modified: head/usr.bin/yacc/Makefile == --- head/usr.bin/yacc/Makefile Sun Nov 7 22:33:55 2010(r214958) +++ head/usr.bin/yacc/Makefile Sun Nov 7 22:51:54 2010(r214959) @@ -9,6 +9,6 @@ MAN=yacc.1 yyfix.1 LINKS= ${BINDIR}/yacc ${BINDIR}/byacc MLINKS=yacc.1 byacc.1 -WARNS?=2 +WARNS?=6 .include bsd.prog.mk Modified: head/usr.bin/yacc/closure.c == --- head/usr.bin/yacc/closure.c Sun Nov 7 22:33:55 2010(r214958) +++ head/usr.bin/yacc/closure.c Sun Nov 7 22:51:54 2010(r214959) @@ -62,7 +62,7 @@ static unsigned *EFF; static void -set_EFF() +set_EFF(void) { unsigned *row; int symbol; @@ -99,7 +99,7 @@ set_EFF() void -set_first_derives() +set_first_derives(void) { unsigned *rrow; unsigned *vrow; @@ -154,9 +154,7 @@ set_first_derives() void -closure(nucleus, n) -short *nucleus; -int n; +closure(short *nucleus, int n) { int ruleno; unsigned word; @@ -224,7 +222,7 @@ int n; void -finalize_closure() +finalize_closure(void) { FREE(itemset); FREE(ruleset); @@ -235,8 +233,7 @@ finalize_closure() #ifdef DEBUG static void -print_closure(n) -int n; +print_closure(int n) { short *isp; @@ -247,7 +244,7 @@ int n; static void -print_EFF() +print_EFF(void) { int i, j; unsigned *rowp; @@ -279,7 +276,7 @@ print_EFF() static void -print_first_derives() +print_first_derives(void) { int i; int j; Modified: head/usr.bin/yacc/error.c == --- head/usr.bin/yacc/error.c Sun Nov 7 22:33:55 2010(r214958) +++ head/usr.bin/yacc/error.c Sun Nov 7 22:51:54 2010(r214959) @@ -49,8 +49,7 @@ __FBSDID($FreeBSD$); static void print_pos(char *, char *); void -fatal(msg) -const char *msg; +fatal(const char *msg) { warnx(f - %s, msg); done(2); @@ -58,7 +57,7 @@ const char *msg; void -no_space() +no_space(void) { warnx(f - out of space); done(2); @@ -66,8 +65,7 @@ no_space() void -open_error(filename) -const char *filename; +open_error(const char *filename) { warnx(f - cannot open \%s\, filename); done(2); @@ -75,7 +73,7 @@ const char *filename; void -unexpected_EOF() +unexpected_EOF(void) { warnx(e - line %d of \%s\, unexpected end-of-file, lineno, input_file_name); @@ -84,9 +82,7 @@ unexpected_EOF() static void -print_pos(st_line, st_cptr) -char *st_line; -char *st_cptr; +print_pos(char *st_line, char *st_cptr) { char *s; @@ -112,10 +108,7 @@ char *st_cptr; void -syntax_error(st_lineno, st_line, st_cptr) -int st_lineno; -char *st_line; -char *st_cptr; +syntax_error(int st_lineno, char *st_line, char *st_cptr) { warnx(e - line %d of \%s\, syntax error, st_lineno, input_file_name); @@ -125,10 +118,7 @@ char *st_cptr; void -unterminated_comment(c_lineno, c_line, c_cptr) -int c_lineno; -char *c_line; -char *c_cptr; +unterminated_comment(int c_lineno, char *c_line, char *c_cptr) { warnx(e - line %d of \%s\, unmatched /*, c_lineno, input_file_name); @@ -138,10 +128,7 @@ char *c_cptr; void -unterminated_string(s_lineno, s_line, s_cptr) -int s_lineno; -char *s_line; -char *s_cptr; +unterminated_string(int s_lineno, char *s_line, char *s_cptr) { warnx(e - line %d of \%s\, unterminated string, s_lineno, input_file_name); @@ -151,10 +138,7 @@ char *s_cptr; void -unterminated_text(t_lineno, t_line, t_cptr) -int t_lineno; -char *t_line; -char *t_cptr; +unterminated_text(int t_lineno, char *t_line, char *t_cptr) { warnx(e - line %d of \%s\, unmatched %%{, t_lineno, input_file_name); @@ -164,10 +148,7 @@ char *t_cptr; void -unterminated_union(u_lineno, u_line, u_cptr) -int u_lineno; -char *u_line; -char *u_cptr; +unterminated_union(int u_lineno, char *u_line, char *u_cptr) { warnx(e - line %d of \%s\, unterminated %%union declaration, u_lineno, input_file_name); @@ -177,8 +158,7 @@ char *u_cptr; void -over_unionized(u_cptr) -char *u_cptr; +over_unionized(char *u_cptr) { warnx(e - line %d of \%s\, too many %%union declarations, lineno, input_file_name); @@ -188,10 +168,7 @@ char *u_cptr;
svn commit: r214960 - head/gnu/usr.bin/gdb/arch/mips
Author: gonzo Date: Sun Nov 7 23:22:22 2010 New Revision: 214960 URL: http://svn.freebsd.org/changeset/base/214960 Log: Fix initialization order:_initialize_svr4_solib should be called before _initialize_thread_db Modified: head/gnu/usr.bin/gdb/arch/mips/init.c Modified: head/gnu/usr.bin/gdb/arch/mips/init.c == --- head/gnu/usr.bin/gdb/arch/mips/init.c Sun Nov 7 22:51:54 2010 (r214959) +++ head/gnu/usr.bin/gdb/arch/mips/init.c Sun Nov 7 23:22:22 2010 (r214960) @@ -119,6 +119,8 @@ initialize_all_files (void) _initialize_mips_tdep (); _initialize_mipsfbsd_tdep (); _initialize_corelow (); + _initialize_solib (); + _initialize_svr4_solib (); _initialize_ser_hardwire (); _initialize_ser_pipe (); _initialize_ser_tcp (); @@ -130,9 +132,7 @@ initialize_all_files (void) _initialize_kernel_u_addr (); _initialize_infptrace (); _initialize_inftarg (); - _initialize_solib (); _initialize_thread_db (); - _initialize_svr4_solib (); #if 0 _initialize_svr4_lm (); #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: r214961 - head/usr.bin/yacc
Author: obrien Date: Sun Nov 7 23:22:42 2010 New Revision: 214961 URL: http://svn.freebsd.org/changeset/base/214961 Log: Directly use memory allocation functions and remove needless casts in their usage. Also use associated modern types instead of kr ones. Modified: head/usr.bin/yacc/closure.c head/usr.bin/yacc/defs.h head/usr.bin/yacc/lalr.c head/usr.bin/yacc/lr0.c head/usr.bin/yacc/main.c head/usr.bin/yacc/mkpar.c head/usr.bin/yacc/output.c head/usr.bin/yacc/reader.c head/usr.bin/yacc/skeleton.c head/usr.bin/yacc/symtab.c head/usr.bin/yacc/verbose.c Modified: head/usr.bin/yacc/closure.c == --- head/usr.bin/yacc/closure.c Sun Nov 7 23:22:22 2010(r214960) +++ head/usr.bin/yacc/closure.c Sun Nov 7 23:22:42 2010(r214961) @@ -149,7 +149,7 @@ set_first_derives(void) print_first_derives(); #endif -FREE(EFF); +free(EFF); } @@ -224,9 +224,9 @@ closure(short *nucleus, int n) void finalize_closure(void) { - FREE(itemset); - FREE(ruleset); - FREE(first_derives + ntokens * WORDSIZE(nrules)); + free(itemset); + free(ruleset); + free(first_derives + ntokens * WORDSIZE(nrules)); } Modified: head/usr.bin/yacc/defs.h == --- head/usr.bin/yacc/defs.hSun Nov 7 23:22:22 2010(r214960) +++ head/usr.bin/yacc/defs.hSun Nov 7 23:22:42 2010(r214961) @@ -133,12 +133,8 @@ /* storage allocation macros */ -#define CALLOC(k,n)(calloc((unsigned)(k),(unsigned)(n))) -#defineFREE(x) (free((char*)(x))) -#define MALLOC(n) (malloc((unsigned)(n))) #defineNEW(t) ((t*)allocate(sizeof(t))) -#defineNEW2(n,t) ((t*)allocate((unsigned)((n)*sizeof(t -#define REALLOC(p,n) (realloc((char*)(p),(unsigned)(n))) +#defineNEW2(n,t) ((t*)allocate((n)*sizeof(t))) /* the structure of a symbol table entry */ @@ -304,7 +300,7 @@ extern short final_state; /* global functions */ -char *allocate(unsigned); +void *allocate(size_t); void closure(short *, int); void create_symbol_table(void); void default_action_warning(void); Modified: head/usr.bin/yacc/lalr.c == --- head/usr.bin/yacc/lalr.cSun Nov 7 23:22:22 2010(r214960) +++ head/usr.bin/yacc/lalr.cSun Nov 7 23:22:42 2010(r214961) @@ -293,7 +293,7 @@ set_goto_map(void) } } - FREE(temp_map + ntokens); + free(temp_map + ntokens); } @@ -396,11 +396,11 @@ initialize_F(void) for (i = 0; i ngotos; i++) { if (reads[i]) - FREE(reads[i]); + free(reads[i]); } - FREE(reads); - FREE(edge); + free(reads); + free(edge); } @@ -487,14 +487,14 @@ build_relations(void) for (i = 0; i ngotos; i++) if (includes[i]) - FREE(includes[i]); + free(includes[i]); - FREE(includes); + free(includes); includes = new_includes; - FREE(edge); - FREE(states); + free(edge); + free(states); } @@ -562,7 +562,7 @@ transpose(short **R, int n) } } - FREE(nedges); + free(nedges); for (i = 0; i n; i++) { @@ -574,7 +574,7 @@ transpose(short **R, int n) } } - FREE(temp_R); + free(temp_R); return (new_R); } @@ -615,11 +615,11 @@ compute_lookaheads(void) for (sp = lookback[i]; sp; sp = next) { next = sp-next; -FREE(sp); +free(sp); } - FREE(lookback); - FREE(F); + free(lookback); + free(F); } @@ -642,8 +642,8 @@ digraph(short **relation) traverse(i, relation); } - FREE(INDEX); - FREE(VERTICES); + free(INDEX); + free(VERTICES); } Modified: head/usr.bin/yacc/lr0.c == --- head/usr.bin/yacc/lr0.c Sun Nov 7 23:22:22 2010(r214960) +++ head/usr.bin/yacc/lr0.c Sun Nov 7 23:22:42 2010(r214961) @@ -176,13 +176,13 @@ append_states(void) static void free_storage(void) { -FREE(shift_symbol); -FREE(redset); -FREE(shiftset); -FREE(kernel_base); -FREE(kernel_end); -FREE(kernel_items); -FREE(state_set); +free(shift_symbol); +free(redset); +free(shiftset); +free(kernel_base); +free(kernel_end); +free(kernel_items); +free(state_set); } @@ -290,7 +290,7 @@ initialize_states(void) for (i = 0; start_derives[i] = 0; ++i) continue; -p = (core *) MALLOC(sizeof(core) + i*sizeof(short)); +p = malloc(sizeof(core) + i*sizeof(short)); if (p == 0) no_space(); p-next = 0; @@ -579,8 +579,8 @@ set_derives(void) #if 0 free_derives() { -FREE(derives[start_symbol]); -FREE(derives); +free(derives[start_symbol]); +free(derives); } #endif @@ -615,7 +615,7 @@ set_nullable(void) int empty;
svn commit: r214962 - head/gnu/usr.bin/gdb/kgdb
Author: gonzo Date: Sun Nov 7 23:23:48 2010 New Revision: 214962 URL: http://svn.freebsd.org/changeset/base/214962 Log: Fix cross-debugger build Modified: head/gnu/usr.bin/gdb/kgdb/trgt_mips.c Modified: head/gnu/usr.bin/gdb/kgdb/trgt_mips.c == --- head/gnu/usr.bin/gdb/kgdb/trgt_mips.c Sun Nov 7 23:22:42 2010 (r214961) +++ head/gnu/usr.bin/gdb/kgdb/trgt_mips.c Sun Nov 7 23:23:48 2010 (r214962) @@ -46,13 +46,16 @@ __FBSDID($FreeBSD$); #include frame-unwind.h #include mips-tdep.h +#ifndefCROSS_DEBUGGER #include machine/pcb.h +#endif #include kgdb.h void kgdb_trgt_fetch_registers(int regno __unused) { +#ifndefCROSS_DEBUGGER struct kthr *kt; struct pcb pcb; @@ -76,6 +79,7 @@ kgdb_trgt_fetch_registers(int regno __un supply_register(MIPS_FP_REGNUM, (char *)pcb.pcb_context[PCB_REG_GP]); supply_register(MIPS_RA_REGNUM, (char *)pcb.pcb_context[PCB_REG_RA]); supply_register(MIPS_EMBED_PC_REGNUM, (char *)pcb.pcb_context[PCB_REG_PC]); +#endif } void @@ -90,6 +94,7 @@ kgdb_trgt_new_objfile(struct objfile *ob { } +#ifndef CROSS_DEBUGGER struct kgdb_frame_cache { CORE_ADDR pc; CORE_ADDR sp; @@ -194,10 +199,12 @@ static const struct frame_unwind kgdb_tr kgdb_trgt_trapframe_this_id, kgdb_trgt_trapframe_prev_register }; +#endif const struct frame_unwind * kgdb_trgt_trapframe_sniffer(struct frame_info *next_frame) { +#ifndef CROSS_DEBUGGER char *pname; CORE_ADDR pc; @@ -211,5 +218,6 @@ kgdb_trgt_trapframe_sniffer(struct frame (strcmp(pname, MipsUserIntr) == 0) || (strcmp(pname, MipsUserGenException) == 0)) return (kgdb_trgt_trapframe_unwind); +#endif return (NULL); } ___ 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: r214963 - head/usr.bin/yacc
Author: obrien Date: Sun Nov 7 23:34:05 2010 New Revision: 214963 URL: http://svn.freebsd.org/changeset/base/214963 Log: Inherit WARNS from parent directory. Submitted by: marius Modified: head/usr.bin/yacc/Makefile Modified: head/usr.bin/yacc/Makefile == --- head/usr.bin/yacc/Makefile Sun Nov 7 23:23:48 2010(r214962) +++ head/usr.bin/yacc/Makefile Sun Nov 7 23:34:05 2010(r214963) @@ -9,6 +9,4 @@ MAN=yacc.1 yyfix.1 LINKS= ${BINDIR}/yacc ${BINDIR}/byacc MLINKS=yacc.1 byacc.1 -WARNS?=6 - .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: r214964 - head/usr.bin/yacc
Author: obrien Date: Sun Nov 7 23:44:40 2010 New Revision: 214964 URL: http://svn.freebsd.org/changeset/base/214964 Log: Add '-y' for bison compatibility. Obtained from:http://invisible-island.net Modified: head/usr.bin/yacc/main.c head/usr.bin/yacc/yacc.1 Modified: head/usr.bin/yacc/main.c == --- head/usr.bin/yacc/main.cSun Nov 7 23:34:05 2010(r214963) +++ head/usr.bin/yacc/main.cSun Nov 7 23:44:40 2010(r214964) @@ -166,7 +166,7 @@ getargs(int argc, char *argv[]) { int ch; -while ((ch = getopt(argc, argv, b:dlo:p:rtv)) != -1) +while ((ch = getopt(argc, argv, b:dlo:p:rtvy)) != -1) { switch (ch) { @@ -202,6 +202,10 @@ getargs(int argc, char *argv[]) vflag = 1; break; + case 'y': + /* for bison compatibility -- byacc is already POSIX compatible */ + break; + default: usage(); } Modified: head/usr.bin/yacc/yacc.1 == --- head/usr.bin/yacc/yacc.1Sun Nov 7 23:34:05 2010(r214963) +++ head/usr.bin/yacc/yacc.1Sun Nov 7 23:44:40 2010(r214964) @@ -44,7 +44,7 @@ .Nd an LALR(1) parser generator .Sh SYNOPSIS .Nm -.Op Fl dlrtv +.Op Fl dlrtvy .Op Fl b Ar file_prefix .Op Fl o Ar output_filename .Op Fl p Ar symbol_prefix @@ -118,6 +118,10 @@ so that debugging statements will be inc Cause a human-readable description of the generated parser to be written to the file .Pa y.output . +.It Fl y +NOOP for bison compatibility. +.Nm +is already designed to be POSIX yacc compatible. .El .Sh ENVIRONMENT .Bl -tag -width .Ev TMPDIR ___ 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: r214965 - head/sys/mips/mips
Author: gonzo Date: Mon Nov 8 00:26:49 2010 New Revision: 214965 URL: http://svn.freebsd.org/changeset/base/214965 Log: - Provide more registers for GDB Modified: head/sys/mips/mips/gdb_machdep.c Modified: head/sys/mips/mips/gdb_machdep.c == --- head/sys/mips/mips/gdb_machdep.cSun Nov 7 23:44:40 2010 (r214964) +++ head/sys/mips/mips/gdb_machdep.cMon Nov 8 00:26:49 2010 (r214965) @@ -117,26 +117,33 @@ gdb_cpu_getreg(int regnum, size_t *regsz *regsz = gdb_cpu_regsz(regnum); if (kdb_thread == PCPU_GET(curthread)) { - switch (regnum) { - /* - * XXX: May need to add more registers - */ - case 2: return (kdb_frame-v0); - case 3: return (kdb_frame-v1); - } + register_t *zero_ptr = kdb_frame-zero; + return zero_ptr + regnum; } + switch (regnum) { - case 16: return (kdb_thrctx-pcb_context[0]); - case 17: return (kdb_thrctx-pcb_context[1]); - case 18: return (kdb_thrctx-pcb_context[2]); - case 19: return (kdb_thrctx-pcb_context[3]); - case 20: return (kdb_thrctx-pcb_context[4]); - case 21: return (kdb_thrctx-pcb_context[5]); - case 22: return (kdb_thrctx-pcb_context[6]); - case 23: return (kdb_thrctx-pcb_context[7]); - case 29: return (kdb_thrctx-pcb_context[8]); - case 30: return (kdb_thrctx-pcb_context[9]); - case 31: return (kdb_thrctx-pcb_context[10]); + /* +* S0..S7 +*/ + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + return (kdb_thrctx-pcb_context[PCB_REG_S0 + regnum - 16]); + case 28: + return (kdb_thrctx-pcb_context[PCB_REG_GP]); + case 29: + return (kdb_thrctx-pcb_context[PCB_REG_SP]); + case 30: + return (kdb_thrctx-pcb_context[PCB_REG_S8]); + case 31: + return (kdb_thrctx-pcb_context[PCB_REG_RA]); + case 37: + return (kdb_thrctx-pcb_context[PCB_REG_PC]); } return (NULL); } ___ 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: r214968 - head/share/man/man4
Author: yongari Date: Mon Nov 8 01:15:42 2010 New Revision: 214968 URL: http://svn.freebsd.org/changeset/base/214968 Log: Use shorten model name instead of showing all controller model numbers. bge(4) supports too many models such that it's unreasonable to list all these controllers in one line description of name. While I'm here mention that BCM590x/BCM5779x is Fast Ethernet controller. bge(4) still lacks support for some controllers but supporting these controllers should be easy now and adding new controllers do not require touching .Nd any more. Obtained from:OpenBSD Modified: head/share/man/man4/bge.4 Modified: head/share/man/man4/bge.4 == --- head/share/man/man4/bge.4 Mon Nov 8 00:42:32 2010(r214967) +++ head/share/man/man4/bge.4 Mon Nov 8 01:15:42 2010(r214968) @@ -31,12 +31,12 @@ .\ .\ $FreeBSD$ .\ -.Dd August 21, 2010 +.Dd November 7, 2010 .Dt BGE 4 .Os .Sh NAME .Nm bge -.Nd Broadcom BCM570x/5714/5721/5722/5750/5751/5752/5761/5784/5789/57780 PCI Gigabit Ethernet adapter driver +.Nd Broadcom BCM57xx/BCM590x Gigabit/Fast Ethernet driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -56,8 +56,8 @@ if_bge_load=YES The .Nm driver provides support for various NICs based on the Broadcom BCM570x, -5714, 5721, 5722, 5750, 5751, 5752, 5761, 5784, 5789 and 57780 families -of Gigabit Ethernet controller chips. +571x, 572x, 575x, 576x, 578x, 5776x and 5778x Gigabit Ethernet controller +chips and the 590x and 5779x Fast Ethernet controller chips. .Pp All of these NICs are capable of 10, 100 and 1000Mbps speeds over CAT5 copper cable, except for the SysKonnect SK-9D41 which supports only @@ -82,7 +82,7 @@ copper gigabit transceivers, which support autonegotiation of 10, 100 and 1000Mbps modes in full or half duplex. .Pp -The BCM5700, BCM5701, BCM5702, BCM5703 and BCM5704 also support +The BCM5700, BCM5701, BCM5702, BCM5703, BCM5704 and BCM5717 also support jumbo frames, which can be configured via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the ___ 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: r214961 - head/usr.bin/yacc
David, On Sun, Nov 7, 2010 at 15:22, David E. O'Brien obr...@freebsd.org wrote: Author: obrien Date: Sun Nov 7 23:22:42 2010 New Revision: 214961 URL: http://svn.freebsd.org/changeset/base/214961 Log: Directly use memory allocation functions and remove needless casts in their usage. Also use associated modern types instead of kr ones. You do know that changing skeleton.c affects the generated files, right? I'm wondering if whatever sed script you're judiciously-applying knows that. C++ does not do implicit conversions from void * so you need the casts on the mallocs there. With a C++ compiler: y.tab.c:116: error: invalid conversion from 'void*' to 'short int*' y.tab.c:122: error: invalid conversion from 'void*' to 'YYSTYPE*' Please back out the changes to the skeleton. ___ 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: r214971 - head/sys/dev/gpio
Author: thompsa Date: Mon Nov 8 03:08:01 2010 New Revision: 214971 URL: http://svn.freebsd.org/changeset/base/214971 Log: Set the pin to output on attach, we can't assume it already is. Reviewed by: gonzo Modified: head/sys/dev/gpio/gpioled.c Modified: head/sys/dev/gpio/gpioled.c == --- head/sys/dev/gpio/gpioled.c Mon Nov 8 02:47:29 2010(r214970) +++ head/sys/dev/gpio/gpioled.c Mon Nov 8 03:08:01 2010(r214971) @@ -103,6 +103,9 @@ gpioled_attach(device_t dev) device_get_unit(dev), name, name)) name = NULL; + GPIOBUS_PIN_SETFLAGS(sc-sc_busdev, sc-sc_dev, GPIOLED_PIN, + GPIO_PIN_OUTPUT); + sc-sc_leddev = led_create(gpioled_control, sc, name ? name : device_get_nameunit(dev)); ___ 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: r214972 - head/sys/arm/include
Author: kevlo Date: Mon Nov 8 07:54:24 2010 New Revision: 214972 URL: http://svn.freebsd.org/changeset/base/214972 Log: Intel IXP425 SoC is based on the ARMv5TE architecture MFC after:3 days Modified: head/sys/arm/include/cpuconf.h Modified: head/sys/arm/include/cpuconf.h == --- head/sys/arm/include/cpuconf.h Mon Nov 8 03:08:01 2010 (r214971) +++ head/sys/arm/include/cpuconf.h Mon Nov 8 07:54:24 2010 (r214972) @@ -70,7 +70,7 @@ */ #if (defined(CPU_ARM7TDMI) || defined(CPU_ARM8) || defined(CPU_ARM9) || \ defined(CPU_SA110) || defined(CPU_SA1100) || defined(CPU_SA1110) || \ - defined(CPU_IXP12X0) || defined(CPU_XSCALE_IXP425) || defined(CPU_FA526)) + defined(CPU_IXP12X0) || defined(CPU_FA526)) #defineARM_ARCH_4 1 #else #defineARM_ARCH_4 0 @@ -79,7 +79,8 @@ #if (defined(CPU_ARM9E) || defined(CPU_ARM10) || \ defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_FA626TE)) + defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ + defined(CPU_FA626TE)) #defineARM_ARCH_5 1 #else #defineARM_ARCH_5 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