svn commit: r251485 - head/sbin/mount
Author: jh Date: Fri Jun 7 07:17:46 2013 New Revision: 251485 URL: http://svnweb.freebsd.org/changeset/base/251485 Log: Revert r238399. The "failok" option doesn't have any effect at all unless specified in fstab(5) and combined with the -a flag. The "failok" option is already documented in fstab(5). PR: 177630 No objection: eadler MFC after:1 week Modified: head/sbin/mount/mount.8 Modified: head/sbin/mount/mount.8 == --- head/sbin/mount/mount.8 Fri Jun 7 05:18:07 2013(r251484) +++ head/sbin/mount/mount.8 Fri Jun 7 07:17:46 2013(r251485) @@ -28,7 +28,7 @@ .\" @(#)mount.88.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd July 12, 2012 +.Dd June 6, 2011 .Dt MOUNT 8 .Os .Sh NAME @@ -152,11 +152,6 @@ When used with the .Fl u flag, this is the same as specifying the options currently in effect for the mounted file system. -.It Cm failok -If this option is specified, -.Nm -will return 0 even if an error occurs -during the mount of the filesystem. .It Cm force The same as .Fl f ; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251486 - head/usr.bin/kdump
Author: ae Date: Fri Jun 7 08:06:48 2013 New Revision: 251486 URL: http://svnweb.freebsd.org/changeset/base/251486 Log: Use getnameinfo(3) instead of inet_ntop(3) to make printable versions of sockaddr_in6 structures. getnameinfo(3) does the same thing, but it is also able to represent a scope zone id as described in the RFC 4007. MFC after:2 weeks Modified: head/usr.bin/kdump/kdump.c Modified: head/usr.bin/kdump/kdump.c == --- head/usr.bin/kdump/kdump.c Fri Jun 7 07:17:46 2013(r251485) +++ head/usr.bin/kdump/kdump.c Fri Jun 7 08:06:48 2013(r251486) @@ -74,6 +74,7 @@ extern int errno; #include #include #include +#include #include #include #include @@ -1531,7 +1532,8 @@ ktrsockaddr(struct sockaddr *sa) memset(&sa_in6, 0, sizeof(sa_in6)); memcpy(&sa_in6, sa, sa->sa_len); check_sockaddr_len(in6); - inet_ntop(AF_INET6, &sa_in6.sin6_addr, addr, sizeof addr); + getnameinfo((struct sockaddr *)&sa_in6, sizeof(sa_in6), + addr, sizeof(addr), NULL, 0, NI_NUMERICHOST); printf("[%s]:%u", addr, htons(sa_in6.sin6_port)); break; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251487 - in head/sys: conf dev/ath modules/ath
Author: adrian Date: Fri Jun 7 09:02:02 2013 New Revision: 251487 URL: http://svnweb.freebsd.org/changeset/base/251487 Log: Bring over the initial static bluetooth coexistence configuration for the WB195 combo NIC - an AR9285 w/ an AR3011 USB bluetooth NIC. The AR3011 is wired up using a 3-wire coexistence scheme to the AR9285. The code in if_ath_btcoex.c sets up the initial hardware mapping and coexistence configuration. There's nothing special about it - it's static; it doesn't try to configure bluetooth / MAC traffic priorities or try to figure out what's actually going on. It's enough to stop basic bluetooth traffic from causing traffic stalls and diassociation from the wireless network. To use this code, you must have the above NIC. No, it won't work for the AR9287+AR3012, nor the AR9485, AR9462 or AR955x combo cards. Then you set a kernel hint before boot or before kldload, where 'X' is the unit number of your AR9285 NIC: # kenv hint.ath.X.btcoex_profile=wb195 This will then appear in your boot messages: [100482] athX: Enabling WB195 BTCOEX This code is going to evolve pretty quickly (well, depending upon my spare time) so don't assume the btcoex API is going to stay stable. In order to use the bluetooth side, you must also load in firmware using ath3kfw and the binary firmware file (ath3k-1.fw in my case.) Tested: * AR9280, no interference * WB195 - AR9285 + AR3011 combo; STA mode; basic bluetooth inquiries were enough to cause traffic stalls and disassociations. This has stopped with the btcoex profile code. TODO: * Importantly - the AR9285 needs ASPM disabled if bluetooth coexistence is enabled. No, I don't know why. It's likely some kind of bug to do with the AR3011 sending bluetooth coexistence signals whilst the device is asleep. Since we don't actually sleep the MAC just yet, it shouldn't be a problem. That said, to be totally correct: + ASPM should be disabled - upon attach and wakeup + The PCIe powersave HAL code should never be called Look at what the ath9k driver does for inspiration. * Add WB197 (AR9287+AR3012) support * Add support for the AR9485, which is another combo like the AR9285 * The later NICs have a different signaling mechanism between the MAC and the bluetooth device; I haven't even begun to experiment with making that HAL code work. But it should be a lot more automatic. * The hardware can do much more interesting traffic weighting with bluetooth and wifi traffic. None of this is currently used. Ideally someone would code up something to watch the bluetooth traffic GPIO (via an interrupt) and then watch it go high/low; then figure out what the bluetooth traffic is and adjust things appropriately. * If I get the time I may add in some code to at least track this stuff and expose statistics. But it's up to someone else to experiment with the bluetooth coexistence support and add the interesting stuff (like "real" detection of bulk, audio, etc bluetooth traffic patterns and change wifi parameters appropriately - eg, maximum aggregate length, transmit power, using quiet time to control TX duty cycle, etc.) Added: head/sys/dev/ath/if_ath_btcoex.c (contents, props changed) head/sys/dev/ath/if_ath_btcoex.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/ath/if_ath.c head/sys/modules/ath/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Fri Jun 7 08:06:48 2013(r251486) +++ head/sys/conf/files Fri Jun 7 09:02:02 2013(r251487) @@ -725,6 +725,8 @@ dev/ath/if_ath.coptional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_beacon.coptional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" +dev/ath/if_ath_btcoex.coptional ath \ + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_debug.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_keycache.c optional ath \ Modified: head/sys/dev/ath/if_ath.c == --- head/sys/dev/ath/if_ath.c Fri Jun 7 08:06:48 2013(r251486) +++ head/sys/dev/ath/if_ath.c Fri Jun 7 09:02:02 2013(r251487) @@ -111,6 +111,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -521,6 +522,14 @@ ath_attach(u_int16_t devid, struct ath_s goto bad2; } + /* Attach bluetooth coexistence module */ + if (ath_btcoex_attach(sc) < 0) { + device_printf(sc->sc_dev, + "%s: unable to attach bluetooth coexistence\n", __func__); + error = EIO; + goto bad2; + } + /* Start DF
svn commit: r251488 - head/sys/net80211
Author: adrian Date: Fri Jun 7 09:03:56 2013 New Revision: 251488 URL: http://svnweb.freebsd.org/changeset/base/251488 Log: Don't hold the node lock over the iterator. The "find node" function call will increase the node reference anyway; so there's no reason to hold the node table lock during the MLME change. The only reason I could think of is to stop overlapping mlme ioctls from causing issues, but this should be fixed a different way. This fixes a whole class of LORs that creep up when nodes are being timed out or removed by hostapd. Tested: * AR5416, hostap, with nodes coming and going. No LORs or stability issues were observed. Modified: head/sys/net80211/ieee80211_ioctl.c Modified: head/sys/net80211/ieee80211_ioctl.c == --- head/sys/net80211/ieee80211_ioctl.c Fri Jun 7 09:02:02 2013 (r251487) +++ head/sys/net80211/ieee80211_ioctl.c Fri Jun 7 09:03:56 2013 (r251488) @@ -1340,12 +1340,17 @@ setmlme_dropsta(struct ieee80211vap *vap if (!IEEE80211_ADDR_EQ(mac, ic->ic_ifp->if_broadcastaddr)) { IEEE80211_NODE_LOCK(nt); ni = ieee80211_find_node_locked(nt, mac); + IEEE80211_NODE_UNLOCK(nt); + /* +* Don't do the node update inside the node +* table lock. This unfortunately causes LORs +* with drivers and their TX paths. +*/ if (ni != NULL) { domlme(mlmeop, ni); ieee80211_free_node(ni); } else error = ENOENT; - IEEE80211_NODE_UNLOCK(nt); } else { ieee80211_iterate_nodes(nt, domlme, mlmeop); } @@ -1400,13 +1405,18 @@ setmlme_common(struct ieee80211vap *vap, case IEEE80211_M_MBSS: IEEE80211_NODE_LOCK(nt); ni = ieee80211_find_node_locked(nt, mac); + /* +* Don't do the node update inside the node +* table lock. This unfortunately causes LORs +* with drivers and their TX paths. +*/ + IEEE80211_NODE_UNLOCK(nt); if (ni != NULL) { ieee80211_node_leave(ni); ieee80211_free_node(ni); } else { error = ENOENT; } - IEEE80211_NODE_UNLOCK(nt); break; default: error = EINVAL; @@ -1422,6 +1432,12 @@ setmlme_common(struct ieee80211vap *vap, } IEEE80211_NODE_LOCK(nt); ni = ieee80211_find_vap_node_locked(nt, vap, mac); + /* +* Don't do the node update inside the node +* table lock. This unfortunately causes LORs +* with drivers and their TX paths. +*/ + IEEE80211_NODE_UNLOCK(nt); if (ni != NULL) { mlmedebug(vap, mac, op, reason); if (op == IEEE80211_MLME_AUTHORIZE) @@ -1431,7 +1447,6 @@ setmlme_common(struct ieee80211vap *vap, ieee80211_free_node(ni); } else error = ENOENT; - IEEE80211_NODE_UNLOCK(nt); break; case IEEE80211_MLME_AUTH: if (vap->iv_opmode != IEEE80211_M_HOSTAP) { @@ -1440,6 +1455,12 @@ setmlme_common(struct ieee80211vap *vap, } IEEE80211_NODE_LOCK(nt); ni = ieee80211_find_vap_node_locked(nt, vap, mac); + /* +* Don't do the node update inside the node +* table lock. This unfortunately causes LORs +* with drivers and their TX paths. +*/ + IEEE80211_NODE_UNLOCK(nt); if (ni != NULL) { mlmedebug(vap, mac, op, reason); if (reason == IEEE80211_STATUS_SUCCESS) { @@ -1463,7 +1484,6 @@ setmlme_common(struct ieee80211vap *vap, ieee80211_free_node(ni); } else error = ENOENT; - IEEE80211_NODE_UNLOCK(nt); break; default: error = EINVAL; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251490 - head/sys/net
Author: trociny Date: Fri Jun 7 10:27:50 2013 New Revision: 251490 URL: http://svnweb.freebsd.org/changeset/base/251490 Log: Properly set curvnet context in lagg_port_setlladdr() task handler. Reported by: Nikos Vassiliadis Submitted by: zec Tested by:Nikos Vassiliadis MFC after:1 week Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c == --- head/sys/net/if_lagg.c Fri Jun 7 09:06:50 2013(r251489) +++ head/sys/net/if_lagg.c Fri Jun 7 10:27:50 2013(r251490) @@ -505,7 +505,9 @@ lagg_port_setlladdr(void *arg, int pendi ifp = llq->llq_ifp; /* Set the link layer address */ + CURVNET_SET(ifp->if_vnet); error = if_setlladdr(ifp, llq->llq_lladdr, ETHER_ADDR_LEN); + CURVNET_RESTORE(); if (error) printf("%s: setlladdr failed on %s\n", __func__, ifp->if_xname); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r251490 - head/sys/net
On Fri, Jun 07, 2013 at 10:27:51AM +, Mikolaj Golub wrote: M> Author: trociny M> Date: Fri Jun 7 10:27:50 2013 M> New Revision: 251490 M> URL: http://svnweb.freebsd.org/changeset/base/251490 M> M> Log: M> Properly set curvnet context in lagg_port_setlladdr() task handler. M> M> Reported by: Nikos Vassiliadis M> Submitted by: zec M> Tested by: Nikos Vassiliadis M> MFC after: 1 week M> M> Modified: M> head/sys/net/if_lagg.c M> M> Modified: head/sys/net/if_lagg.c M> == M> --- head/sys/net/if_lagg.c Fri Jun 7 09:06:50 2013(r251489) M> +++ head/sys/net/if_lagg.c Fri Jun 7 10:27:50 2013(r251490) M> @@ -505,7 +505,9 @@ lagg_port_setlladdr(void *arg, int pendi M> ifp = llq->llq_ifp; M> M> /* Set the link layer address */ M> +CURVNET_SET(ifp->if_vnet); M> error = if_setlladdr(ifp, llq->llq_lladdr, ETHER_ADDR_LEN); M> +CURVNET_RESTORE(); M> if (error) M> printf("%s: setlladdr failed on %s\n", __func__, M> ifp->if_xname); IMHO, the entire task function should be embraced into VNET context. -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r251490 - head/sys/net
On Fri, Jun 07, 2013 at 02:33:08PM +0400, Gleb Smirnoff wrote: T> On Fri, Jun 07, 2013 at 10:27:51AM +, Mikolaj Golub wrote: T> M> Author: trociny T> M> Date: Fri Jun 7 10:27:50 2013 T> M> New Revision: 251490 T> M> URL: http://svnweb.freebsd.org/changeset/base/251490 T> M> T> M> Log: T> M> Properly set curvnet context in lagg_port_setlladdr() task handler. T> M> T> M> Reported by:Nikos Vassiliadis T> M> Submitted by: zec T> M> Tested by: Nikos Vassiliadis T> M> MFC after: 1 week T> M> T> M> Modified: T> M> head/sys/net/if_lagg.c T> M> T> M> Modified: head/sys/net/if_lagg.c T> M> == T> M> --- head/sys/net/if_lagg.cFri Jun 7 09:06:50 2013 (r251489) T> M> +++ head/sys/net/if_lagg.cFri Jun 7 10:27:50 2013 (r251490) T> M> @@ -505,7 +505,9 @@ lagg_port_setlladdr(void *arg, int pendi T> M> ifp = llq->llq_ifp; T> M> T> M> /* Set the link layer address */ T> M> + CURVNET_SET(ifp->if_vnet); T> M> error = if_setlladdr(ifp, llq->llq_lladdr, ETHER_ADDR_LEN); T> M> + CURVNET_RESTORE(); T> M> if (error) T> M> printf("%s: setlladdr failed on %s\n", __func__, T> M> ifp->if_xname); T> T> IMHO, the entire task function should be embraced into VNET context. Sorry, I'm wrong. :( -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r251490 - head/sys/net
On Fri, Jun 07, 2013 at 02:33:08PM +0400, Gleb Smirnoff wrote: > On Fri, Jun 07, 2013 at 10:27:51AM +, Mikolaj Golub wrote: > M> Author: trociny > M> Date: Fri Jun 7 10:27:50 2013 > M> New Revision: 251490 > M> URL: http://svnweb.freebsd.org/changeset/base/251490 > M> > M> Log: > M> Properly set curvnet context in lagg_port_setlladdr() task handler. > M> > M> Reported by: Nikos Vassiliadis > M> Submitted by:zec > M> Tested by: Nikos Vassiliadis > M> MFC after: 1 week > M> > M> Modified: > M> head/sys/net/if_lagg.c > M> > M> Modified: head/sys/net/if_lagg.c > M> > == > M> --- head/sys/net/if_lagg.c Fri Jun 7 09:06:50 2013(r251489) > M> +++ head/sys/net/if_lagg.c Fri Jun 7 10:27:50 2013(r251490) > M> @@ -505,7 +505,9 @@ lagg_port_setlladdr(void *arg, int pendi > M>ifp = llq->llq_ifp; > M> > M>/* Set the link layer address */ > M> + CURVNET_SET(ifp->if_vnet); > M>error = if_setlladdr(ifp, llq->llq_lladdr, ETHER_ADDR_LEN); > M> + CURVNET_RESTORE(); > M>if (error) > M>printf("%s: setlladdr failed on %s\n", __func__, > M>ifp->if_xname); > > IMHO, the entire task function should be embraced into VNET context. The VNET context is obtained from ifp, which is taken from the queue just one line above. It might be taken from lagg interface, supposing that all the lagg ports are in the same vnet, but this may not always be true, e.g. when you moving a lagg and its ports to another vnet, one by one. -- Mikolaj Golub ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251495 - head/lib/libusb
Author: emaste Date: Fri Jun 7 13:45:58 2013 New Revision: 251495 URL: http://svnweb.freebsd.org/changeset/base/251495 Log: Add libusb_get_port_numbers libusbx deprecated libusb_get_port_path and replaced it with libusb_get_port_numbers. The latter omits an extra parameter which was unused in the FreeBSD implementation anyway. Modified: head/lib/libusb/libusb.3 head/lib/libusb/libusb.h head/lib/libusb/libusb10.c Modified: head/lib/libusb/libusb.3 == --- head/lib/libusb/libusb.3Fri Jun 7 13:30:59 2013(r251494) +++ head/lib/libusb/libusb.3Fri Jun 7 13:45:58 2013(r251495) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 7, 2013 +.Dd June 7, 2013 .Dt LIBUSB 3 .Os .Sh NAME @@ -103,7 +103,7 @@ Returns the number of the bus contained .Fa dev . .Pp .Ft int -.Fn libusb_get_port_path "libusb_context *ctx" "libusb_device *dev" "uint8_t *buf" "uint8_t bufsize" +.Fn libusb_get_port_numbers "libusb_device *dev" "uint8_t *buf" "uint8_t bufsize" Stores, in the buffer .Fa buf of size @@ -111,6 +111,10 @@ of size the list of all port numbers from root for the device .Fa dev . .Pp +.Ft int +.Fn libusb_get_port_path "libusb_context *ctx" "libusb_device *dev" "uint8_t *buf" "uint8_t bufsize" +Deprecated function equivalent to libusb_get_port_numbers. +.Pp .Ft uint8_t .Fn libusb_get_device_address "libusb_device *dev" Returns the device_address contained by the device Modified: head/lib/libusb/libusb.h == --- head/lib/libusb/libusb.hFri Jun 7 13:30:59 2013(r251494) +++ head/lib/libusb/libusb.hFri Jun 7 13:45:58 2013(r251495) @@ -369,6 +369,7 @@ voidlibusb_exit(struct libusb_context * ssize_t libusb_get_device_list(libusb_context * ctx, libusb_device *** list); void libusb_free_device_list(libusb_device ** list, int unref_devices); uint8_tlibusb_get_bus_number(libusb_device * dev); +intlibusb_get_port_numbers(libusb_device *dev, uint8_t *buf, uint8_t bufsize); intlibusb_get_port_path(libusb_context *ctx, libusb_device *dev, uint8_t *buf, uint8_t bufsize); uint8_tlibusb_get_device_address(libusb_device * dev); enum libusb_speed libusb_get_device_speed(libusb_device * dev); Modified: head/lib/libusb/libusb10.c == --- head/lib/libusb/libusb10.c Fri Jun 7 13:30:59 2013(r251494) +++ head/lib/libusb/libusb10.c Fri Jun 7 13:45:58 2013(r251495) @@ -291,6 +291,12 @@ libusb_get_bus_number(libusb_device *dev } int +libusb_get_port_numbers(libusb_device *dev, uint8_t *buf, uint8_t bufsize) +{ + return (libusb20_dev_get_port_path(dev->os_priv, buf, bufsize)); +} + +int libusb_get_port_path(libusb_context *ctx, libusb_device *dev, uint8_t *buf, uint8_t bufsize) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251499 - head/sys/dev/usb/controller
Author: hselasky Date: Fri Jun 7 14:30:06 2013 New Revision: 251499 URL: http://svnweb.freebsd.org/changeset/base/251499 Log: Add support for polling the XHCI interrupt handler when the regular interrupt handler is not working properly or in case of MSI interrupts which are not yet supported. Remove interrupt setup code for FreeBSD versions older than 700031. MFC after:1 week PR: usb/179342 Modified: head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/controller/xhci.h head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci.c == --- head/sys/dev/usb/controller/xhci.c Fri Jun 7 14:23:11 2013 (r251498) +++ head/sys/dev/usb/controller/xhci.c Fri Jun 7 14:30:06 2013 (r251499) @@ -90,6 +90,7 @@ #ifdef USB_DEBUG static int xhcidebug; static int xhciroute; +static int xhcipolling; static SYSCTL_NODE(_hw_usb, OID_AUTO, xhci, CTLFLAG_RW, 0, "USB XHCI"); SYSCTL_INT(_hw_usb_xhci, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, @@ -98,6 +99,9 @@ TUNABLE_INT("hw.usb.xhci.debug", &xhcide SYSCTL_INT(_hw_usb_xhci, OID_AUTO, xhci_port_route, CTLFLAG_RW | CTLFLAG_TUN, &xhciroute, 0, "Routing bitmap for switching EHCI ports to XHCI controller"); TUNABLE_INT("hw.usb.xhci.xhci_port_route", &xhciroute); +SYSCTL_INT(_hw_usb_xhci, OID_AUTO, use_polling, CTLFLAG_RW | CTLFLAG_TUN, +&xhcipolling, 0, "Set to enable software interrupt polling for XHCI controller"); +TUNABLE_INT("hw.usb.xhci.use_polling", &xhcipolling); #endif #defineXHCI_INTR_ENDPT 1 @@ -194,6 +198,16 @@ xhci_get_port_route(void) #endif } +uint8_t +xhci_use_polling(void) +{ +#ifdef USB_DEBUG + return (xhcipolling != 0); +#else + return (0); +#endif +} + static void xhci_iterate_hw_softc(struct usb_bus *bus, usb_bus_mem_sub_cb_t *cb) { Modified: head/sys/dev/usb/controller/xhci.h == --- head/sys/dev/usb/controller/xhci.h Fri Jun 7 14:23:11 2013 (r251498) +++ head/sys/dev/usb/controller/xhci.h Fri Jun 7 14:30:06 2013 (r251499) @@ -438,6 +438,8 @@ struct xhci_softc { /* configure message */ struct usb_bus_msg sc_config_msg[2]; + struct usb_callout sc_callout; + union xhci_hub_desc sc_hub_desc; struct cv sc_cmd_cv; @@ -500,6 +502,7 @@ struct xhci_softc { /* prototypes */ uint32_t xhci_get_port_route(void); +uint8_txhci_use_polling(void); usb_error_t xhci_halt_controller(struct xhci_softc *); usb_error_t xhci_init(struct xhci_softc *, device_t); usb_error_t xhci_start_controller(struct xhci_softc *); Modified: head/sys/dev/usb/controller/xhci_pci.c == --- head/sys/dev/usb/controller/xhci_pci.c Fri Jun 7 14:23:11 2013 (r251498) +++ head/sys/dev/usb/controller/xhci_pci.c Fri Jun 7 14:30:06 2013 (r251499) @@ -132,6 +132,16 @@ xhci_pci_probe(device_t self) } } +static void +xhci_interrupt_poll(void *_sc) +{ + struct xhci_softc *sc = _sc; + USB_BUS_UNLOCK(&sc->sc_bus); + xhci_interrupt(sc); + USB_BUS_LOCK(&sc->sc_bus); + usb_callout_reset(&sc->sc_callout, 1, (void *)&xhci_interrupt_poll, sc); +} + static int xhci_pci_attach(device_t self) { @@ -159,12 +169,13 @@ xhci_pci_attach(device_t self) sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res); sc->sc_io_size = rman_get_size(sc->sc_io_res); + usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0); + rid = 0; sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (sc->sc_irq_res == NULL) { device_printf(self, "Could not allocate IRQ\n"); - goto error; } sc->sc_bus.bdev = device_add_child(self, "usbus", -1); if (sc->sc_bus.bdev == NULL) { @@ -175,18 +186,22 @@ xhci_pci_attach(device_t self) sprintf(sc->sc_vendor, "0x%04x", pci_get_vendor(self)); -#if (__FreeBSD_version >= 700031) - err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); -#else - err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); -#endif - if (err) { - device_printf(self, "Could not setup IRQ, err=%d\n", err); - sc->sc_intr_hdl = NULL; - goto error; + if (sc->sc_irq_res != NULL) { + err = bus_setup_intr(self, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, + NULL, (driver_intr_t *)xhci_interrupt, sc, &sc->sc_intr_hdl); + if (err != 0) { + device_printf(se
svn commit: r251501 - head/share/misc
Author: pluknet Date: Fri Jun 7 17:06:08 2013 New Revision: 251501 URL: http://svnweb.freebsd.org/changeset/base/251501 Log: FreeBSD 8.4 added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree == --- head/share/misc/bsd-family-tree Fri Jun 7 15:52:33 2013 (r251500) +++ head/share/misc/bsd-family-tree Fri Jun 7 17:06:08 2013 (r251501) @@ -254,16 +254,17 @@ FreeBSD 5.2 | | |9.0 | | | NetBSD 5.1.2| DragonFly 3.0.1 | |FreeBSD | | | | | | 8.3 | | OpenBSD 5.1 | - | | Mac OS X | | | - | | 10.8| | | - | | | NetBSD 6.0 | | - | | | | OpenBSD 5.2 DragonFly 3.2.1 - | FreeBSD | | | | - |9.1 | | | | - || | | | - || |OpenBSD 5.3 DragonFly 3.4.1 - || NetBSD 6.1 | | - || | | | + | | | Mac OS X | | | + | | | 10.8| | | + | | | | NetBSD 6.0 | | + | | | | | OpenBSD 5.2 DragonFly 3.2.1 + | FreeBSD| | | | | + |9.1 | | | | | + | | | | | | + | | | |OpenBSD 5.3 DragonFly 3.4.1 + | | | NetBSD 6.1 | | + | FreeBSD | | | | + |8.4 | | | | || | | | FreeBSD 10 -current | NetBSD -current OpenBSD -current | || | | | @@ -568,6 +569,7 @@ FreeBSD 9.1 2012-12-30 [FBD] DragonFly 3.4.12013-04-29 [DFB] OpenBSD 5.32013-05-01 [OBD] NetBSD 6.1 2013-05-18 [NBD] +FreeBSD 8.42013-06-07 [FBD] Bibliography ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251502 - head/sys/netinet
Author: bms Date: Fri Jun 7 17:12:08 2013 New Revision: 251502 URL: http://svnweb.freebsd.org/changeset/base/251502 Log: Disable IGMPv3 link timers on a transition to IGMPv2. Submitted by: Alan Smithee Modified: head/sys/netinet/igmp.c Modified: head/sys/netinet/igmp.c == --- head/sys/netinet/igmp.c Fri Jun 7 17:06:08 2013(r251501) +++ head/sys/netinet/igmp.c Fri Jun 7 17:12:08 2013(r251502) @@ -2121,6 +2121,7 @@ igmp_v1v2_process_querier_timers(struct __func__, igi->igi_version, IGMP_VERSION_2, igi->igi_ifp, igi->igi_ifp->if_xname); igi->igi_version = IGMP_VERSION_2; + igmp_v3_cancel_link_timers(igi); } } } else if (igi->igi_v1_timer > 0) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251505 - head/sys/fs/tmpfs
Author: alc Date: Fri Jun 7 19:42:00 2013 New Revision: 251505 URL: http://svnweb.freebsd.org/changeset/base/251505 Log: Add missing VM object unlocks in an error case. Reviewed by: kib Modified: head/sys/fs/tmpfs/tmpfs_vnops.c Modified: head/sys/fs/tmpfs/tmpfs_vnops.c == --- head/sys/fs/tmpfs/tmpfs_vnops.c Fri Jun 7 19:02:32 2013 (r251504) +++ head/sys/fs/tmpfs/tmpfs_vnops.c Fri Jun 7 19:42:00 2013 (r251505) @@ -470,6 +470,7 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p printf( "tmpfs: vm_obj %p idx %jd null lookup rv %d\n", tobj, idx, rv); + VM_OBJECT_WUNLOCK(tobj); return (EIO); } if (rv != VM_PAGER_OK) { @@ -586,6 +587,7 @@ tmpfs_mappedwrite(vm_object_t tobj, size printf( "tmpfs: vm_obj %p idx %jd null lookup rv %d\n", tobj, idx, rv); + VM_OBJECT_WUNLOCK(tobj); return (EIO); } if (rv != VM_PAGER_OK) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251506 - head/share/mk
Author: sjg Date: Fri Jun 7 19:45:04 2013 New Revision: 251506 URL: http://svnweb.freebsd.org/changeset/base/251506 Log: Override bmake's default MAKEFILE_PREFERENCE Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk == --- head/share/mk/sys.mkFri Jun 7 19:42:00 2013(r251505) +++ head/share/mk/sys.mkFri Jun 7 19:45:04 2013(r251506) @@ -334,7 +334,7 @@ OBJFORMAT?= elf .MAKE.EXPAND_VARIABLES= yes # Tell bmake the makefile preference -.MAKE.MAKEFILE_PREFERENCE?= BSDmakefile makefile Makefile +.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile .if !defined(.PARSEDIR) # We are not bmake, which is more aggressive about searching .PATH ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r251282 - head/sys/kern
On 6/5/13 10:55 AM, Adrian Chadd wrote: ... can people please boot an i386 kernel w/ this stuff in it, with the RAM constrained to something small (say, 128mb), and verify that you can at least start a buildworld (minus clang, of course) without panicing? There's a recent PR (http://www.freebsd.org/cgi/query-pr.cgi?pr=179112) which shows regressions on i386 + small RAM platforms. I know it's a different area, but I'd really appreciate it if people better tested this stuff out before they make i386 (and by extension, any platform with limited KVA and small amounts of RAM) unusable through carelessness. Adrian, I'm pretty sure that kib's patch actually limits memory. The concern I have is that it's a hard limit that appears not based on KVA, but rather 32GB. I can be wrong, but Bruce's feedback looks like it backs up my concern. -Alfred Thanks, Adrian On 5 June 2013 05:11, Alfred Perlstein wrote: Konstantin, is there any way to take some of Bruce's feedback into account to get rid of the hard coded max? -Alfred On 6/4/13 1:14 AM, Bruce Evans wrote: On Tue, 4 Jun 2013, Konstantin Belousov wrote: On Mon, Jun 03, 2013 at 02:24:26AM -0700, Alfred Perlstein wrote: On 6/3/13 12:55 AM, Konstantin Belousov wrote: On Sun, Jun 02, 2013 at 09:27:53PM -0700, Alfred Perlstein wrote: Hey Konstaintin, shouldn't this be scaled against the actual amount of KVA we have instead of an arbitrary limit? The commit changes the buffer cache to scale according to the available KVA, making the scaling less dumb. I do not understand what exactly do you want to do, please describe the algorithm you propose to implement instead of my change. Sure, how about deriving the hardcoded "32" from the maxkva a machine can have? Is that possible? I do not see why this would be useful. Initially I thought about simply capping nbuf at 10 without referencing any "memory". Then I realized that this would somewhat conflict with (unlikely) changes to the value of BKVASIZE due to "factor". The presence of BKVASIZE in 'factor' is a bug. My version never had this bug (see below for a patch). The scaling should be to maximize nbuf, subject to non-arbitrary limits on physical memory and kva, and now an arbirary limit of about 10 / (BKVASIZE / 16384) on nbuf. Your new limit is arbitrary so it shouldn't affect nbuf depending on BKVASIZE. Expanding BKVASIZE should expand kva use, but on i386 this will soon hit a non-arbitary kva limit so nbuf will not be as high as preferred. nbuf needs to be very large mainly to support file systems with small buffers. Even 10 only gives 50MB of buffering if the fs block size is 512. This would shrink to only 12.5MB if BKVASIZE is expanded by a factor of 4 and the bug is not fixed. If 25000 buffers after expanding BKVASIZE is enough, then that should be the arbitary limit (independent of BKVASIZE) so as to save physical memory. On i386 systems with 1GB RAM, nbuf defaults to about 7000. With an fs block size of 512, that can buffer 3.5MB. Expanding BKVASIZE by a factor of 4 shrinks this to 0.875MB in -current. That is ridiculously small. VMIO limits the lossage from this. BKVASIZE was originally 8KB. I forget if nbuf was halved by not modifying the scale factor when it was expanded to 16KB. Probably not. I used to modify the scale factor to get twice as many as the default nbuf, but once the default nbuf expanded to a few thousand it became large enough for most purposes so I no longer do this. Except on arches with extremely limit kva like i386, KVASIZE should be MAXBSIZE, and all of the complications for expanding a buffer's kva beyond BKVASIZE and handling the fragmentation problems caused by this shouldn't exist. Limits like vfs.maxbufspace should be scaled by NOMBSIZE = current BKVASIZE instead of BKVASIZE. Oops, my NOMBSIZE has similar logical problems to BKVASIZE. It needs to be precisely 16KB to preserve the defaults for nbuf and maxbufspace, but the nominal (ffs) buffer size is now 32KB. So the heuristic scale factors should use the historical magic number 16K. I changed sequential_heuristic() to use a hard-coded 16K instead of BKVASIZE. The correct number here depends on disk technology. The patch has many style fixes: @ Index: vfs_bio.c @ === @ RCS file: /home/ncvs/src/sys/kern/vfs_bio.c,v @ retrieving revision 1.436 @ diff -u -2 -r1.436 vfs_bio.c @ --- vfs_bio.c17 Jun 2004 17:16:49 -1.436 @ +++ vfs_bio.c3 Jun 2013 16:04:34 - @ @@ -419,64 +493,54 @@ @ @ /* @ - * Calculating buffer cache scaling values and reserve space for buffer @ + * Calculate buffer cache scaling values and reserve space for buffer @ * headers. This is called during low level kernel initialization and @ * may be called more then once. We CANNOT write to the memory area @ * being reserved at this time. @ */ @ -caddr_t @ -kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est) @ +vo
Re: svn commit: r251506 - head/share/mk
On 6/7/2013 2:45 PM, Simon J. Gerraty wrote: > Author: sjg > Date: Fri Jun 7 19:45:04 2013 > New Revision: 251506 > URL: http://svnweb.freebsd.org/changeset/base/251506 > > Log: > Override bmake's default MAKEFILE_PREFERENCE Thanks! > > Modified: > head/share/mk/sys.mk > > Modified: head/share/mk/sys.mk > == > --- head/share/mk/sys.mk Fri Jun 7 19:42:00 2013(r251505) > +++ head/share/mk/sys.mk Fri Jun 7 19:45:04 2013(r251506) > @@ -334,7 +334,7 @@ OBJFORMAT?= elf > .MAKE.EXPAND_VARIABLES= yes > > # Tell bmake the makefile preference > -.MAKE.MAKEFILE_PREFERENCE?= BSDmakefile makefile Makefile > +.MAKE.MAKEFILE_PREFERENCE= BSDmakefile makefile Makefile > > .if !defined(.PARSEDIR) > # We are not bmake, which is more aggressive about searching .PATH > ___ > svn-src-...@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" > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r251507 - head/usr.sbin/portsnap/portsnap
Author: delphij Date: Fri Jun 7 20:21:30 2013 New Revision: 251507 URL: http://svnweb.freebsd.org/changeset/base/251507 Log: Make 'portsnap alfred' overwrite ports tree if it's not created by a portsnap. Discussed with: alfred Reviewed by: cperciva Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh == --- head/usr.sbin/portsnap/portsnap/portsnap.sh Fri Jun 7 19:45:04 2013 (r251506) +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Fri Jun 7 20:21:30 2013 (r251507) @@ -1113,7 +1113,7 @@ cmd_alfred() { else cmd_cron fi - if [ -d ${PORTSDIR} ]; then + if [ -r ${PORTSDIR}/.portsnap.INDEX ]; then cmd_update else cmd_extract ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r251507 - head/usr.sbin/portsnap/portsnap
Oh no, you made me destructive!! :) -Alfred On 6/7/13 1:21 PM, Xin LI wrote: Author: delphij Date: Fri Jun 7 20:21:30 2013 New Revision: 251507 URL: http://svnweb.freebsd.org/changeset/base/251507 Log: Make 'portsnap alfred' overwrite ports tree if it's not created by a portsnap. Discussed with: alfred Reviewed by: cperciva Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh == --- head/usr.sbin/portsnap/portsnap/portsnap.sh Fri Jun 7 19:45:04 2013 (r251506) +++ head/usr.sbin/portsnap/portsnap/portsnap.sh Fri Jun 7 20:21:30 2013 (r251507) @@ -1113,7 +1113,7 @@ cmd_alfred() { else cmd_cron fi - if [ -d ${PORTSDIR} ]; then + if [ -r ${PORTSDIR}/.portsnap.INDEX ]; then cmd_update else cmd_extract ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251508 - head/lib/libstand/arm
Author: andrew Date: Fri Jun 7 21:06:19 2013 New Revision: 251508 URL: http://svnweb.freebsd.org/changeset/base/251508 Log: Remove an extra copy of _setjmp from libstand. We have used the libc version of this function since r183876. Deleted: head/lib/libstand/arm/ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251509 - head/lib/libc/arm/gen
Author: andrew Date: Fri Jun 7 21:13:28 2013 New Revision: 251509 URL: http://svnweb.freebsd.org/changeset/base/251509 Log: Include machine/setjmp.h to get the definition of _JB_MAGIC__SETJMP. This allows us to remove it from the ARM copy of machine/asm.h. Modified: head/lib/libc/arm/gen/sigsetjmp.S Modified: head/lib/libc/arm/gen/sigsetjmp.S == --- head/lib/libc/arm/gen/sigsetjmp.S Fri Jun 7 21:06:19 2013 (r251508) +++ head/lib/libc/arm/gen/sigsetjmp.S Fri Jun 7 21:13:28 2013 (r251509) @@ -1,4 +1,4 @@ -/* $NetBSD: sigsetjmp.S,v 1.3 2002/08/17 19:54:30 thorpej Exp $*/ +/* $NetBSD: sigsetjmp.S,v 1.6 2013/04/19 16:50:22 matt Exp $ */ /* * Copyright (c) 1997 Mark Brinicombe @@ -35,6 +35,8 @@ #include __FBSDID("$FreeBSD$"); +#include + /* * C library -- sigsetjmp, siglongjmp * ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251510 - head/sys/arm/include
Author: andrew Date: Fri Jun 7 21:23:11 2013 New Revision: 251510 URL: http://svnweb.freebsd.org/changeset/base/251510 Log: Reduce the difference to NetBSD. * Stop pretending we support anything other than ELF by removing code surrounded by #ifdef __ELF__ ... #endif. * Remove _JB_MAGIC_SETJMP and _JB_MAGIC__SETJMP, they are defined in setjmp.h, which is able to be included from asm. * Fix the spelling of dependent. * Rename END _END and add END and ASEND to complement ENTRY and ASENTRY respectively * Add macros to simplify accessing the Global Offset Table, some of these will be used in the upcoming update to the setjmp functions. Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h == --- head/sys/arm/include/asm.h Fri Jun 7 21:13:28 2013(r251509) +++ head/sys/arm/include/asm.h Fri Jun 7 21:23:11 2013(r251510) @@ -40,22 +40,9 @@ #define _MACHINE_ASM_H_ #include -#ifdef __ELF__ -# define _C_LABEL(x) x -#else -# ifdef __STDC__ -# define _C_LABEL(x) _ ## x -# else -# define _C_LABEL(x) _/**/x -# endif -#endif +#define_C_LABEL(x) x #define_ASM_LABEL(x) x -#ifndef _JB_MAGIC__SETJMP -#define _JB_MAGIC__SETJMP 0x4278f500 -#define _JB_MAGIC_SETJMP0x4278f501 -#endif - #define I32_bit (1 << 7) /* IRQ disable */ #define F32_bit (1 << 6)/* FIQ disable */ @@ -79,7 +66,7 @@ /* * gas/arm uses @ as a single comment character and thus cannot be used here * Instead it recognised the # instead of an @ symbols in .type directives - * We define a couple of macros so that assembly code will not be dependant + * We define a couple of macros so that assembly code will not be dependent * on one or the other. */ #define _ASM_TYPE_FUNCTION #function @@ -88,7 +75,7 @@ #define _ENTRY(x) \ .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x: _FNSTART -#defineEND(x) .size x, . - x; _FNEND +#define_END(x) .size x, . - x; _FNEND #ifdef GPROF # define _PROF_PROLOGUE \ @@ -99,20 +86,41 @@ #defineENTRY(y)_ENTRY(_C_LABEL(y)); _PROF_PROLOGUE #defineENTRY_NP(y) _ENTRY(_C_LABEL(y)) +#defineEND(y) _END(_C_LABEL(y)) #defineASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE #defineASENTRY_NP(y) _ENTRY(_ASM_LABEL(y)) +#defineASEND(y)_END(_ASM_LABEL(y)) #defineASMSTR .asciz -#if defined(__ELF__) && defined(PIC) +#if defined(PIC) +#definePLT_SYM(x) PIC_SYM(x, PLT) +#defineGOT_SYM(x) PIC_SYM(x, GOT) +#defineGOT_GET(x,got,sym) \ + ldr x, sym; \ + ldr x, [x, got] +#defineGOT_INIT(got,gotsym,pclabel) \ + ldr got, gotsym;\ + add got, got, pc; \ + pclabel: +#defineGOT_INITSYM(gotsym,pclabel) \ + gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) + (. - (pclabel+4)) + #ifdef __STDC__ #definePIC_SYM(x,y)x ## ( ## y ## ) #else #definePIC_SYM(x,y)x/**/(/**/y/**/) #endif + #else +#definePLT_SYM(x) x +#defineGOT_SYM(x) x +#defineGOT_GET(x,got,sym) \ + ldr x, sym; +#defineGOT_INIT(got,gotsym,pclabel) +#defineGOT_INITSYM(gotsym,pclabel) #definePIC_SYM(x,y)x -#endif +#endif /* PIC */ #undef __FBSDID #if !defined(lint) && !defined(STRIP_FBSDID) @@ -122,24 +130,18 @@ #endif -#ifdef __ELF__ #defineWEAK_ALIAS(alias,sym) \ .weak alias;\ alias = sym -#endif #ifdef __STDC__ #defineWARN_REFERENCES(sym,msg) \ .stabs msg ## ,30,0,0,0 ; \ .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0 -#elif defined(__ELF__) -#defineWARN_REFERENCES(sym,msg) \ - .stabs msg,30,0,0,0 ; \ - .stabs __STRING(sym),1,0,0,0 #else #defineWARN_REFERENCES(sym,msg) \ .stabs msg,30,0,0,0 ; \ - .stabs __STRING(_/**/sym),1,0,0,0 + .stabs __STRING(sym),1,0,0,0 #endif /* __STDC__ */ /* Exactly one of the __ARM_ARCH_*__ macros will be defined by the compiler. */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251512 - in head: . etc etc/mtree gnu/usr.bin/gdb gnu/usr.bin/gdb/arch/amd64 gnu/usr.bin/gdb/arch/arm gnu/usr.bin/gdb/arch/i386 gnu/usr.bin/gdb/arch/ia64 gnu/usr.bin/gdb/arch/mips gnu/...
Author: emaste Date: Fri Jun 7 21:40:02 2013 New Revision: 251512 URL: http://svnweb.freebsd.org/changeset/base/251512 Log: Add a new knob WITH_DEBUG_FILES to control the building of standalone debug files for userland programs and libraries. The "-g" debug flag is automatically applied when WITH_DEBUG_FILES is set. The debug files are now named ${prog}.debug and ${shlib}.debug for consistency with other systems and documentation. In addition they are installed under /usr/lib/debug, to simplify the process of installing them if needed after a crash. Users of bsd.{prog,lib}.mk outside of the base system place the standalone debug files in a .debug subdirectory. GDB automatically searches both of these directories for standalone debug files. Thanks to everyone who contributed changes, review, and testing during development. Added: head/etc/mtree/BSD.debug.dist (contents, props changed) head/tools/build/options/WITH_DEBUG_FILES (contents, props changed) Modified: head/Makefile.inc1 head/etc/Makefile head/etc/mtree/Makefile head/gnu/usr.bin/gdb/Makefile.inc head/gnu/usr.bin/gdb/arch/amd64/config.h head/gnu/usr.bin/gdb/arch/arm/config.h head/gnu/usr.bin/gdb/arch/i386/config.h head/gnu/usr.bin/gdb/arch/ia64/config.h head/gnu/usr.bin/gdb/arch/mips/config.h head/gnu/usr.bin/gdb/arch/powerpc/config.h head/gnu/usr.bin/gdb/arch/powerpc64/config.h head/gnu/usr.bin/gdb/arch/sparc64/config.h head/gnu/usr.bin/gdb/gdb/Makefile head/share/mk/bsd.crunchgen.mk head/share/mk/bsd.lib.mk head/share/mk/bsd.own.mk head/share/mk/bsd.prog.mk Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Fri Jun 7 21:39:46 2013(r251511) +++ head/Makefile.inc1 Fri Jun 7 21:40:02 2013(r251512) @@ -470,6 +470,13 @@ _worldtmp: mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${WORLDTMP}/usr/include >/dev/null ln -sf ${.CURDIR}/sys ${WORLDTMP} +.if ${MK_DEBUG_FILES} != "no" + # We could instead disable debug files for these build stages + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + -p ${WORLDTMP}/legacy/usr/lib >/dev/null + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + -p ${WORLDTMP}/usr/lib >/dev/null +.endif .if ${MK_BIND_LIBS} != "no" mtree -deU -f ${.CURDIR}/etc/mtree/BIND.include.dist \ -p ${WORLDTMP}/usr/include >/dev/null @@ -555,6 +562,10 @@ build32: -p ${LIB32TMP}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${LIB32TMP}/usr/include >/dev/null +.if ${MK_DEBUG_FILES} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + -p ${LIB32TMP}/usr/lib >/dev/null +.endif mkdir -p ${WORLDTMP} ln -sf ${.CURDIR}/sys ${WORLDTMP} .for _t in obj includes @@ -779,6 +790,10 @@ distributeworld installworld: installche -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null +.if ${MK_DEBUG_FILES} != "no" + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null +.endif .if defined(NO_ROOT) ${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \ sed -e 's#^\./#./${dist}/#' >> ${METALOG} Modified: head/etc/Makefile == --- head/etc/Makefile Fri Jun 7 21:39:46 2013(r251511) +++ head/etc/Makefile Fri Jun 7 21:40:02 2013(r251512) @@ -143,6 +143,9 @@ MTREE+= BIND.chroot.dist MTREE+=BIND.include.dist .endif .endif +.if ${MK_DEBUG_FILES} != "no" +MTREE+=BSD.debug.dist +.endif PPPCNF=ppp.conf @@ -312,6 +315,9 @@ MTREES= mtree/BSD.root.dist / \ mtree/BSD.var.dist /var\ mtree/BSD.usr.dist /usr\ mtree/BSD.include.dist /usr/include +.if ${MK_DEBUG_FILES} != "no" +MTREES+= mtree/BSD.debug.dist/usr/lib +.endif .if ${MK_BIND_LIBS} != "no" MTREES+= mtree/BIND.include.dist /usr/include .endif Added: head/etc/mtree/BSD.debug.dist == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/mtree/BSD.debug.dist Fri Jun 7 21:40:02 2013 (r251512) @@ -0,0 +1,48 @@ +# $FreeBSD$ +# +# Please see the file src/etc/mtree/README before making changes to this file. +# + +/set type=dir uname=root gname=wheel mode=0755 +. +debug +bin +.. +boot +.. +lib +geom +.. +.. +libexec +
svn commit: r251513 - head/share/man/man5
Author: emaste Date: Fri Jun 7 21:51:10 2013 New Revision: 251513 URL: http://svnweb.freebsd.org/changeset/base/251513 Log: Add WITH_DEBUG_FILES makeman currently generates a src.conf that claims every option also enforces WITHOUT_BIND_UTILS, so I applied this section by hand. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Fri Jun 7 21:40:02 2013 (r251512) +++ head/share/man/man5/src.conf.5 Fri Jun 7 21:51:10 2013 (r251513) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd May 21, 2013 +.Dd June 7, 2013 .Dt SRC.CONF 5 .Os .Sh NAME @@ -413,6 +413,14 @@ When set, it also enforces the following .It .Va WITHOUT_GROFF .El +.It Va WITH_DEBUG_FILES +.\" from FreeBSD: head/tools/build/options/WITH_DEBUG_FILES 251512 2013-06-07 21:40:02Z emaste +Set to strip debug info into a separate file for each executable binary +and shared library. +The debug files will be placed in a subdirectory of +.Pa /usr/lib/debug +and are located automatically by +.Xr gdb 1 . .It Va WITHOUT_DICT .\" from FreeBSD: head/tools/build/options/WITHOUT_DICT 156932 2006-03-21 07:50:50Z ru Set to not build the Webster dictionary files. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r251514 - head/lib/libc/arm/gen
Author: andrew Date: Fri Jun 7 22:01:06 2013 New Revision: 251514 URL: http://svnweb.freebsd.org/changeset/base/251514 Log: Finish pulling in the NetBSD setjmp/longjmp updates on ARM. Store/restore the VFP registers in setjmp/longjmp on ARM EABI if VFP is enabled in the kernel. It checks the hw.floatingpoint sysctl to see if floating-point is available and uses this to determine if it should store them. If it does it uses a different magic value so longjmp is able to know if it should load them. Added: head/lib/libc/arm/gen/arm_initfini.c (contents, props changed) Modified: head/lib/libc/arm/gen/Makefile.inc head/lib/libc/arm/gen/_setjmp.S head/lib/libc/arm/gen/setjmp.S Modified: head/lib/libc/arm/gen/Makefile.inc == --- head/lib/libc/arm/gen/Makefile.inc Fri Jun 7 21:51:10 2013 (r251513) +++ head/lib/libc/arm/gen/Makefile.inc Fri Jun 7 22:01:06 2013 (r251514) @@ -3,7 +3,8 @@ SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \ getcontextx.c infinity.c ldexp.c makecontext.c \ - __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S flt_rounds.c + __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S flt_rounds.c \ + arm_initfini.c .if ${MK_ARM_EABI} == "no" SRCS+= divsi3.S Modified: head/lib/libc/arm/gen/_setjmp.S == --- head/lib/libc/arm/gen/_setjmp.S Fri Jun 7 21:51:10 2013 (r251513) +++ head/lib/libc/arm/gen/_setjmp.S Fri Jun 7 22:01:06 2013 (r251514) @@ -36,7 +36,7 @@ #error FPA is not supported anymore #endif -#ifdef __ARM_EABI__ +#if defined(__ARM_EABI__) && !defined(_STANDALONE) .fpuvfp #endif @@ -61,6 +61,26 @@ __FBSDID("$FreeBSD$"); ENTRY(_setjmp) ldr r1, .L_setjmp_magic +#if defined(__ARM_EABI__) && !defined(_STANDALONE) + ldr r2, .Lfpu_present +#ifdef PIC + GOT_INIT(r3, .L_setjmp_got, .L_setjmp_gotinit) + ldr r2, [r2, r3] +#else + ldr r2, [r2] +#endif + teq r2, #0 /* do we have a FPU? */ + beq 1f /* no, don't save VFP registers */ + + orr r1, r1, #(_JB_MAGIC__SETJMP ^ _JB_MAGIC__SETJMP_VFP) + /* change magic to VFP magic */ + add r2, r0, #(_JB_REG_D8 * 4) + vstmia r2, {d8-d15} + vmrsr2, fpscr + str r2, [r0, #(_JB_REG_FPSCR * 4)] +1: +#endif /* __ARM_EABI__ */ + str r1, [r0] add r0, r0, #(_JB_REG_R4 * 4) @@ -72,14 +92,31 @@ ENTRY(_setjmp) .L_setjmp_magic: .word _JB_MAGIC__SETJMP +#if defined(__ARM_EABI__) && !defined(_STANDALONE) + GOT_INITSYM(.L_setjmp_got, .L_setjmp_gotinit) +.Lfpu_present: + .word PIC_SYM(_libc_arm_fpu_present, GOTOFF) +#endif /* __ARM_EABI__ */ WEAK_ALIAS(___longjmp, _longjmp) ENTRY(_longjmp) ldr r2, [r0]/* get magic from jmp_buf */ + bic r3, r2, #(_JB_MAGIC__SETJMP ^ _JB_MAGIC__SETJMP_VFP) + /* ignore VFP-ness of magic */ ldr ip, .L_setjmp_magic /* load magic */ - teq ip, r2 /* magic correct? */ + teq ip, r3 /* magic correct? */ bne botch /* no, botch */ +#if defined(__ARM_EABI__) && !defined(_STANDALONE) + teq r3, r2 /* did magic change? */ + beq 1f /* no, don't restore VFP */ + add ip, r0, #(_JB_REG_D8 * 4) + vldmia ip, {d8-d15} + ldr ip, [r0, #(_JB_REG_FPSCR * 4)] + vmsrfpscr, ip +1: +#endif /* __ARM_EABI__ */ + add r0, r0, #(_JB_REG_R4 * 4) /* Restore integer registers */ ldmia r0, {r4-r14} Added: head/lib/libc/arm/gen/arm_initfini.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/gen/arm_initfini.cFri Jun 7 22:01:06 2013 (r251514) @@ -0,0 +1,78 @@ +/*- + * Copyright (c) 2013 The NetBSD Foundation, Inc. + * Copyright (c) 2013 Andrew Turner + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * 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
svn commit: r251515 - head/sys/dev/usb/controller
Author: hselasky Date: Fri Jun 7 22:35:58 2013 New Revision: 251515 URL: http://svnweb.freebsd.org/changeset/base/251515 Log: Fix some recent regression issues: 1) Only multi-TD isochronous transfers should use NORMAL type after specific type as per XHCI specification. 2) BEI bit is only available in NORMAL and ISOCHRONOUS TRB types. Don't use this bit for other types to avoid hardware asserts. Reserved bits should be don't care though ... MFC after:1 week PR: usb/179342 Modified: head/sys/dev/usb/controller/xhci.c Modified: head/sys/dev/usb/controller/xhci.c == --- head/sys/dev/usb/controller/xhci.c Fri Jun 7 22:01:06 2013 (r251514) +++ head/sys/dev/usb/controller/xhci.c Fri Jun 7 22:35:58 2013 (r251515) @@ -1561,6 +1561,7 @@ xhci_setup_generic_chain_sub(struct xhci struct xhci_td *td; struct xhci_td *td_next; struct xhci_td *td_alt_next; + struct xhci_td *td_first; uint32_t buf_offset; uint32_t average; uint32_t len_old; @@ -1569,7 +1570,6 @@ xhci_setup_generic_chain_sub(struct xhci uint8_t shortpkt_old; uint8_t precompute; uint8_t x; - uint8_t first_trb = 1; td_alt_next = NULL; buf_offset = 0; @@ -1581,7 +1581,7 @@ xhci_setup_generic_chain_sub(struct xhci restart: td = temp->td; - td_next = temp->td_next; + td_next = td_first = temp->td_next; while (1) { @@ -1717,48 +1717,55 @@ restart: td->td_trb[x].dwTrb2 = htole32(dword); - /* BEI: Interrupts are inhibited until EOT */ - dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | - XHCI_TRB_3_BEI_BIT | - XHCI_TRB_3_TBC_SET(temp->tbc) | - XHCI_TRB_3_TLBPC_SET(temp->tlbpc); - - if (first_trb != 0) { - first_trb = 0; - dword |= XHCI_TRB_3_TYPE_SET(temp->trb_type); - /* -* Remove cycle bit from the first TRB -* if we are stepping them: -*/ - if (temp->step_td != 0) - dword &= ~XHCI_TRB_3_CYCLE_BIT; - } else { - dword |= XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_NORMAL); - } - if (temp->trb_type == XHCI_TRB_TYPE_ISOCH) { - if (temp->do_isoc_sync != 0) { + switch (temp->trb_type) { + case XHCI_TRB_TYPE_ISOCH: + /* BEI: Interrupts are inhibited until EOT */ + dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | + XHCI_TRB_3_BEI_BIT | + XHCI_TRB_3_TBC_SET(temp->tbc) | + XHCI_TRB_3_TLBPC_SET(temp->tlbpc); + if (td != td_first) { + dword |= XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_NORMAL); + } else if (temp->do_isoc_sync != 0) { temp->do_isoc_sync = 0; - dword |= XHCI_TRB_3_FRID_SET(temp->isoc_frame / 8); + /* wait until "isoc_frame" */ + dword |= XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_ISOCH) | + XHCI_TRB_3_FRID_SET(temp->isoc_frame / 8); } else { - dword |= XHCI_TRB_3_ISO_SIA_BIT; + /* start data transfer at next interval */ + dword |= XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_ISOCH) | + XHCI_TRB_3_ISO_SIA_BIT; } + if (temp->direction == UE_DIR_IN) + dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + break; + case XHCI_TRB_TYPE_DATA_STAGE: + dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | + XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE) | + XHCI_TRB_3_TBC_SET(temp->tbc) | + XHCI_TRB_3_TLBPC_SET(temp->tlbpc); + if (temp->direction == UE_DIR_IN) + dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + break; +
Re: svn commit: r251507 - head/usr.sbin/portsnap/portsnap
On 7 June 2013 22:21, Xin LI wrote: > Author: delphij > Date: Fri Jun 7 20:21:30 2013 > New Revision: 251507 > URL: http://svnweb.freebsd.org/changeset/base/251507 > > Log: > Make 'portsnap alfred' overwrite ports tree if it's not created by a > portsnap. FWIW, the 'alfred' command is poorly named and is used by other projects (ISTR portshaker uses it). It should also be documented. -- Eitan Adler ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r251512 - in head: . etc etc/mtree gnu/usr.bin/gdb gnu/usr.bin/gdb/arch/amd64 gnu/usr.bin/gdb/arch/arm gnu/usr.bin/gdb/arch/i386 gnu/usr.bin/gdb/arch/ia64 gnu/usr.bin/gdb/arch/mips gnu
On 7 Jun, Ed Maste wrote: > Author: emaste > Date: Fri Jun 7 21:40:02 2013 > New Revision: 251512 > URL: http://svnweb.freebsd.org/changeset/base/251512 > > Log: > Add a new knob WITH_DEBUG_FILES to control the building of standalone > debug files for userland programs and libraries. The "-g" debug flag > is automatically applied when WITH_DEBUG_FILES is set. > > The debug files are now named ${prog}.debug and ${shlib}.debug for > consistency with other systems and documentation. In addition they are > installed under /usr/lib/debug, to simplify the process of installing > them if needed after a crash. Users of bsd.{prog,lib}.mk outside of the > base system place the standalone debug files in a .debug subdirectory. > GDB automatically searches both of these directories for standalone > debug files. Can the debug files be compressed so they don't take up as much room? It looks like gdb supports compressed symbol files. The same would be nice for /boot/kernel/*.symbols, btw ... ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r251512 - in head: . etc etc/mtree gnu/usr.bin/gdb gnu/usr.bin/gdb/arch/amd64 gnu/usr.bin/gdb/arch/arm gnu/usr.bin/gdb/arch/i386 gnu/usr.bin/gdb/arch/ia64 gnu/usr.bin/gdb/arch/mips gnu
On Fri, Jun 07, 2013 at 04:35:23PM -0700, Don Lewis wrote: > On 7 Jun, Ed Maste wrote: > > Author: emaste > > Date: Fri Jun 7 21:40:02 2013 > > New Revision: 251512 > > URL: http://svnweb.freebsd.org/changeset/base/251512 > > > > Log: > > Add a new knob WITH_DEBUG_FILES to control the building of standalone > > debug files for userland programs and libraries. The "-g" debug flag > > is automatically applied when WITH_DEBUG_FILES is set. > > > > The debug files are now named ${prog}.debug and ${shlib}.debug for > > consistency with other systems and documentation. In addition they are > > installed under /usr/lib/debug, to simplify the process of installing > > them if needed after a crash. Users of bsd.{prog,lib}.mk outside of the > > base system place the standalone debug files in a .debug subdirectory. > > GDB automatically searches both of these directories for standalone > > debug files. > > Can the debug files be compressed so they don't take up as much room? It > looks like gdb supports compressed symbol files. The same would be nice > for /boot/kernel/*.symbols, btw ... > I don't think compression will gain us much here. The difference of release medium size with WITH_DEBUG_FILES set versus without is ~2GB compared to ~750MB. On the release medium, the debug files are compressed with the base system with xz(1). Glen pgphS3YiUr6Im.pgp Description: PGP signature
Re: svn commit: r251512 - in head: . etc etc/mtree gnu/usr.bin/gdb gnu/usr.bin/gdb/arch/amd64 gnu/usr.bin/gdb/arch/arm gnu/usr.bin/gdb/arch/i386 gnu/usr.bin/gdb/arch/ia64 gnu/usr.bin/gdb/arch/mips gnu
On 7 Jun, Glen Barber wrote: > On Fri, Jun 07, 2013 at 04:35:23PM -0700, Don Lewis wrote: >> On 7 Jun, Ed Maste wrote: >> > Author: emaste >> > Date: Fri Jun 7 21:40:02 2013 >> > New Revision: 251512 >> > URL: http://svnweb.freebsd.org/changeset/base/251512 >> > >> > Log: >> > Add a new knob WITH_DEBUG_FILES to control the building of standalone >> > debug files for userland programs and libraries. The "-g" debug flag >> > is automatically applied when WITH_DEBUG_FILES is set. >> > >> > The debug files are now named ${prog}.debug and ${shlib}.debug for >> > consistency with other systems and documentation. In addition they are >> > installed under /usr/lib/debug, to simplify the process of installing >> > them if needed after a crash. Users of bsd.{prog,lib}.mk outside of the >> > base system place the standalone debug files in a .debug subdirectory. >> > GDB automatically searches both of these directories for standalone >> > debug files. >> >> Can the debug files be compressed so they don't take up as much room? It >> looks like gdb supports compressed symbol files. The same would be nice >> for /boot/kernel/*.symbols, btw ... >> > > I don't think compression will gain us much here. The difference of > release medium size with WITH_DEBUG_FILES set versus without is ~2GB > compared to ~750MB. On the release medium, the debug files are > compressed with the base system with xz(1). I'm not concerned so much about the size of the release medium as I am about how much space this will take on my /usr partition. I still remember having to resize the root partitions on all my machines when the kernel symbols were added. My head machine also has a small drive with everything under / and space is very tight once all the ports are installed. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r251512 - in head: . etc etc/mtree gnu/usr.bin/gdb gnu/usr.bin/gdb/arch/amd64 gnu/usr.bin/gdb/arch/arm gnu/usr.bin/gdb/arch/i386 gnu/usr.bin/gdb/arch/ia64 gnu/usr.bin/gdb/arch/mips gnu
On 7 June 2013 19:35, Don Lewis wrote: > Can the debug files be compressed so they don't take up as much room? It > looks like gdb supports compressed symbol files. The same would be nice > for /boot/kernel/*.symbols, btw ... Unfortunately our binutils is too old, so we're out of luck in the short term. This is most likely a project to undertake once we've migrated from binutils. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r251512 - in head: . etc etc/mtree gnu/usr.bin/gdb gnu/usr.bin/gdb/arch/amd64 gnu/usr.bin/gdb/arch/arm gnu/usr.bin/gdb/arch/i386 gnu/usr.bin/gdb/arch/ia64 gnu/usr.bin/gdb/arch/mips gnu
On Fri, Jun 07, 2013 at 04:50:58PM -0700, Don Lewis wrote: > On 7 Jun, Glen Barber wrote: > > On Fri, Jun 07, 2013 at 04:35:23PM -0700, Don Lewis wrote: > >> On 7 Jun, Ed Maste wrote: > >> > Author: emaste > >> > Date: Fri Jun 7 21:40:02 2013 > >> > New Revision: 251512 > >> > URL: http://svnweb.freebsd.org/changeset/base/251512 > >> > > >> > Log: > >> > Add a new knob WITH_DEBUG_FILES to control the building of standalone > >> > debug files for userland programs and libraries. The "-g" debug flag > >> > is automatically applied when WITH_DEBUG_FILES is set. > >> > > >> > The debug files are now named ${prog}.debug and ${shlib}.debug for > >> > consistency with other systems and documentation. In addition they are > >> > installed under /usr/lib/debug, to simplify the process of installing > >> > them if needed after a crash. Users of bsd.{prog,lib}.mk outside of > >> > the > >> > base system place the standalone debug files in a .debug subdirectory. > >> > GDB automatically searches both of these directories for standalone > >> > debug files. > >> > >> Can the debug files be compressed so they don't take up as much room? It > >> looks like gdb supports compressed symbol files. The same would be nice > >> for /boot/kernel/*.symbols, btw ... > >> > > > > I don't think compression will gain us much here. The difference of > > release medium size with WITH_DEBUG_FILES set versus without is ~2GB > > compared to ~750MB. On the release medium, the debug files are > > compressed with the base system with xz(1). > > I'm not concerned so much about the size of the release medium as I am > about how much space this will take on my /usr partition. I still > remember having to resize the root partitions on all my machines when > the kernel symbols were added. My head machine also has a small drive > with everything under / and space is very tight once all the ports are > installed. > Understood. I was just pointing out the significant size difference overall. Glen pgpLV4KlKeQSf.pgp Description: PGP signature
svn commit: r251516 - in head: sys/dev/mfi usr.sbin/mfiutil
Author: sbruno Date: Sat Jun 8 02:54:59 2013 New Revision: 251516 URL: http://svnweb.freebsd.org/changeset/base/251516 Log: Implement foreign volume handling. Allows admins to view foreign metadata and clear or import it for use. PR: kern/172091 Submitted by: s...@freebsd.org Reviewed by:j...@freebsd.org MFC after: 2 weeks Added: head/usr.sbin/mfiutil/mfi_foreign.c (contents, props changed) Modified: head/sys/dev/mfi/mfireg.h head/usr.sbin/mfiutil/Makefile head/usr.sbin/mfiutil/mfi_config.c head/usr.sbin/mfiutil/mfi_show.c head/usr.sbin/mfiutil/mfiutil.8 head/usr.sbin/mfiutil/mfiutil.c head/usr.sbin/mfiutil/mfiutil.h Modified: head/sys/dev/mfi/mfireg.h == --- head/sys/dev/mfi/mfireg.h Fri Jun 7 22:35:58 2013(r251515) +++ head/sys/dev/mfi/mfireg.h Sat Jun 8 02:54:59 2013(r251516) @@ -230,7 +230,11 @@ typedef enum { MFI_DCMD_CFG_CLEAR =0x0403, MFI_DCMD_CFG_MAKE_SPARE = 0x0404, MFI_DCMD_CFG_REMOVE_SPARE = 0x0405, + MFI_DCMD_CFG_FOREIGN_SCAN = 0x04060100, + MFI_DCMD_CFG_FOREIGN_DISPLAY = 0x04060200, + MFI_DCMD_CFG_FOREIGN_PREVIEW = 0x04060300, MFI_DCMD_CFG_FOREIGN_IMPORT = 0x04060400, + MFI_DCMD_CFG_FOREIGN_CLEAR =0x04060500, MFI_DCMD_BBU_GET_STATUS = 0x0501, MFI_DCMD_BBU_GET_CAPACITY_INFO =0x0502, MFI_DCMD_BBU_GET_DESIGN_INFO = 0x0503, Modified: head/usr.sbin/mfiutil/Makefile == --- head/usr.sbin/mfiutil/Makefile Fri Jun 7 22:35:58 2013 (r251515) +++ head/usr.sbin/mfiutil/Makefile Sat Jun 8 02:54:59 2013 (r251516) @@ -2,7 +2,7 @@ PROG= mfiutil SRCS= mfiutil.c mfi_bbu.c mfi_cmd.c mfi_config.c mfi_drive.c mfi_evt.c \ - mfi_flash.c mfi_patrol.c mfi_show.c mfi_volume.c + mfi_flash.c mfi_patrol.c mfi_show.c mfi_volume.c mfi_foreign.c MAN8= mfiutil.8 CFLAGS+= -fno-builtin-strftime Modified: head/usr.sbin/mfiutil/mfi_config.c == --- head/usr.sbin/mfiutil/mfi_config.c Fri Jun 7 22:35:58 2013 (r251515) +++ head/usr.sbin/mfiutil/mfi_config.c Sat Jun 8 02:54:59 2013 (r251516) @@ -37,19 +37,13 @@ #include #include #include -#ifdef DEBUG #include -#endif #include #include #include #include #include "mfiutil.h" -#ifdef DEBUG -static voiddump_config(int fd, struct mfi_config_data *config); -#endif - static int add_spare(int ac, char **av); static int remove_spare(int ac, char **av); @@ -81,9 +75,17 @@ dehumanize(const char *value) } return (iv); } + int mfi_config_read(int fd, struct mfi_config_data **configp) { + return mfi_config_read_opcode(fd, MFI_DCMD_CFG_READ, configp, NULL, 0); +} + +int +mfi_config_read_opcode(int fd, uint32_t opcode, struct mfi_config_data **configp, + uint8_t *mbox, size_t mboxlen) +{ struct mfi_config_data *config; uint32_t config_size; int error; @@ -98,8 +100,8 @@ fetch: config = reallocf(config, config_size); if (config == NULL) return (-1); - if (mfi_dcmd_command(fd, MFI_DCMD_CFG_READ, config, - config_size, NULL, 0, NULL) < 0) { + if (mfi_dcmd_command(fd, opcode, config, + config_size, mbox, mboxlen, NULL) < 0) { error = errno; free(config); errno = error; @@ -366,6 +368,13 @@ parse_array(int fd, int raid_type, char info->drives = NULL; return (EINVAL); } + + if (pinfo->state.ddf.v.pd_type.is_foreign) { + warnx("Drive %u is foreign", device_id); + free(info->drives); + info->drives = NULL; + return (EINVAL); + } } return (0); @@ -804,7 +813,7 @@ create_volume(int ac, char **av) #ifdef DEBUG if (dump) - dump_config(fd, config); + dump_config(fd, config, NULL); #endif /* Send the new config to the controller. */ @@ -1093,10 +1102,9 @@ remove_spare(int ac, char **av) } MFI_COMMAND(top, remove, remove_spare); -#ifdef DEBUG /* Display raw data about a config. */ -static void -dump_config(int fd, struct mfi_config_data *config) +void +dump_config(int fd, struct mfi_config_data *config, const char *msg_prefix) { struct mfi_array *ar; struct mfi_ld_config *ld; @@ -1106,9 +1114,12 @@ dump_config(int fd, struct mfi_config_da char *p; int i, j; + if (NULL == msg_prefix) + msg_prefix = "Configuration (Debug)"; + printf( - "mfi%d Configuration (Debug): %d arrays, %d volu