svn commit: r277291 - head/sys/boot/common
Author: royger Date: Sat Jan 17 08:09:07 2015 New Revision: 277291 URL: https://svnweb.freebsd.org/changeset/base/277291 Log: loader: use correct types for parse_modmetadata Use the proper types in parse_modmetadata for the p_start and p_end parameters. This was causing problems in the ARM 32bit loader. Sponsored by: Citrix Systems R&D Reported and Tested by: ian Modified: head/sys/boot/common/load_elf.c Modified: head/sys/boot/common/load_elf.c == --- head/sys/boot/common/load_elf.c Sat Jan 17 07:33:02 2015 (r277290) +++ head/sys/boot/common/load_elf.c Sat Jan 17 08:09:07 2015 (r277291) @@ -77,7 +77,7 @@ static int __elfN(lookup_symbol)(struct static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, Elf_Addr p, void *val, size_t len); static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef, -u_int64_t p_start, u_int64_t p_end); +Elf_Addr p_start, Elf_Addr p_end); static symaddr_fn __elfN(symaddr); static char*fake_modname(const char *name); @@ -300,7 +300,7 @@ __elfN(loadimage)(struct preloaded_file Elf_Size size; u_int fpcopy; Elf_Symsym; -u_int64_t p_start, p_end; +Elf_Addr p_start, p_end; dp = NULL; shdr = NULL; @@ -712,7 +712,7 @@ __elfN(load_modmetadata)(struct preloade Elf_Shdr*sh_data[2]; char*shstrtab = NULL; size_t size; - u_int64_tp_start, p_end; + Elf_Addr p_start, p_end; bzero(&ef, sizeof(struct elf_file)); ef.fd = -1; @@ -820,7 +820,7 @@ out: int __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef, -u_int64_t p_start, u_int64_t p_end) +Elf_Addr p_start, Elf_Addr p_end) { struct mod_metadata md; #if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64 ___ 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: r277204 - head/sys/amd64/conf
Among emails in this thread, Warner Losh wrote: [ so to avoid replying on per-email bases ] > (2) is the exact problem I'm working on. Since the design of that will > allow us to read from the kernel these modules, (1) becomes largely > irrelevant because the only /boot/loader incursion would be to load > drivers for any storage devices that are on the PCIe bus. ... > But you bring up a good point. i386 is easy, once the basics are done. > PowerPC is only slightly harder, since it has good /boot/loader support > as well as a GENERIC kernel or two. Ditto sparc64. But stepping into arm > and mips then all hell breaks loose. > > It's also desirable to refactor GENERIC, for the transition period, to be > include MINIMAL + more stuff. I'll do that as time permits. Thanks for these follow-ups, it certainly brings more clarity to what you are up to, and overall it all sounds pretty awesome. Keep it up! :) ./danfe ___ 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: r277204 - head/sys/amd64/conf
On Thu, Jan 15, 2015 at 04:23:03PM +0300, Slawa Olhovchenkov wrote: > I think defining UFS options in kernel connfig affect to module too. > When I define this options in kernel config (w/o options FFS) I got > ufs.ko with this SU, quota, acl etc. Nice point I missed in earlier replies. In my stable/8 kernel config, now I have: options FFS options SOFTUPDATES options UFS_ACL options UFS_DIRHASH If I read stable/8/sys/modules/ufs/Makefile correctly, I can safely remove all four lines and still get ufs.ko with all these features (+ some more I don't really need, like QUOTA, but don't mind), right? ./danfe ___ 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: r277295 - head/sys/net
Author: ae Date: Sat Jan 17 11:32:09 2015 New Revision: 277295 URL: https://svnweb.freebsd.org/changeset/base/277295 Log: Fix condition and really sort ports. Also add comment describing the intent of this code. Reported by: sbruno MFC after:1 week Sponsored by: Yandex LLC Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c == --- head/sys/net/if_lagg.c Sat Jan 17 08:35:31 2015(r277294) +++ head/sys/net/if_lagg.c Sat Jan 17 11:32:09 2015(r277295) @@ -799,11 +799,16 @@ lagg_port_create(struct lagg_softc *sc, lagg_port_lladdr(lp, IF_LLADDR(sc->sc_ifp)); } - /* Insert into the list of ports. Keep ports sorted by if_index. */ + /* +* Insert into the list of ports. +* Keep ports sorted by if_index. It is handy, when configuration +* is predictable and `ifconfig laggN create ...` command +* will lead to the same result each time. +*/ SLIST_FOREACH(tlp, &sc->sc_ports, lp_entries) { if (tlp->lp_ifp->if_index < ifp->if_index && ( SLIST_NEXT(tlp, lp_entries) == NULL || - SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index < + SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index > ifp->if_index)) break; } ___ 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: r277296 - in stable: 10/lib/libmagic 9/lib/libmagic
Author: dim Date: Sat Jan 17 11:41:04 2015 New Revision: 277296 URL: https://svnweb.freebsd.org/changeset/base/277296 Log: MFC r277147: Since the merge of file 5.21 in r276415 and r276416, stable/9 and stable/10 cannot be built from FreeBSD 8.x. This is because the build-tools stage requires libmagic, but lib/libmagic/config.h was generated on head, and it now enables using the xlocale.h APIs, which are not supported on 8.x (and on 9.x before __FreeBSD_version 900506). See also the start of this thread on -stable: https://lists.freebsd.org/pipermail/freebsd-stable/2015-January/081521.html To fix this, conditionalize the use of xlocale.h APIs to make bootstrapping from older FreeBSD versions work correctly. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D1518 Modified: stable/10/lib/libmagic/config.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/lib/libmagic/config.h Directory Properties: stable/9/lib/libmagic/ (props changed) Modified: stable/10/lib/libmagic/config.h == --- stable/10/lib/libmagic/config.h Sat Jan 17 11:32:09 2015 (r277295) +++ stable/10/lib/libmagic/config.h Sat Jan 17 11:41:04 2015 (r277296) @@ -1,5 +1,13 @@ /* $FreeBSD$ */ +/* Get __FreeBSD_version. */ +#include + +/* Only specific versions of FreeBSD support xlocale */ +#if __FreeBSD_version >= 102 || (__FreeBSD_version < 100 && __FreeBSD_version >= 900506) +#define FREEBSD_XLOCALE_SUPPORT 1 +#endif + /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ @@ -48,7 +56,9 @@ #define HAVE_FORK 1 /* Define to 1 if you have the `freelocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_FREELOCALE 1 +#endif /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #define HAVE_FSEEKO 1 @@ -102,7 +112,9 @@ #define HAVE_MMAP 1 /* Define to 1 if you have the `newlocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_NEWLOCALE 1 +#endif /* Define to 1 if you have the `pread' function. */ #define HAVE_PREAD 1 @@ -195,7 +207,9 @@ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `uselocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_USELOCALE 1 +#endif /* Define to 1 if you have the `utime' function. */ #define HAVE_UTIME 1 @@ -235,7 +249,9 @@ #define HAVE_WORKING_VFORK 1 /* Define to 1 if you have the header file. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_XLOCALE_H 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_ZLIB_H 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: r277296 - in stable: 10/lib/libmagic 9/lib/libmagic
Author: dim Date: Sat Jan 17 11:41:04 2015 New Revision: 277296 URL: https://svnweb.freebsd.org/changeset/base/277296 Log: MFC r277147: Since the merge of file 5.21 in r276415 and r276416, stable/9 and stable/10 cannot be built from FreeBSD 8.x. This is because the build-tools stage requires libmagic, but lib/libmagic/config.h was generated on head, and it now enables using the xlocale.h APIs, which are not supported on 8.x (and on 9.x before __FreeBSD_version 900506). See also the start of this thread on -stable: https://lists.freebsd.org/pipermail/freebsd-stable/2015-January/081521.html To fix this, conditionalize the use of xlocale.h APIs to make bootstrapping from older FreeBSD versions work correctly. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D1518 Modified: stable/9/lib/libmagic/config.h Directory Properties: stable/9/lib/libmagic/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libmagic/config.h Directory Properties: stable/10/ (props changed) Modified: stable/9/lib/libmagic/config.h == --- stable/9/lib/libmagic/config.h Sat Jan 17 11:32:09 2015 (r277295) +++ stable/9/lib/libmagic/config.h Sat Jan 17 11:41:04 2015 (r277296) @@ -1,5 +1,13 @@ /* $FreeBSD$ */ +/* Get __FreeBSD_version. */ +#include + +/* Only specific versions of FreeBSD support xlocale */ +#if __FreeBSD_version >= 102 || (__FreeBSD_version < 100 && __FreeBSD_version >= 900506) +#define FREEBSD_XLOCALE_SUPPORT 1 +#endif + /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ @@ -48,7 +56,9 @@ #define HAVE_FORK 1 /* Define to 1 if you have the `freelocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_FREELOCALE 1 +#endif /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #define HAVE_FSEEKO 1 @@ -104,7 +114,9 @@ #define HAVE_MMAP 1 /* Define to 1 if you have the `newlocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_NEWLOCALE 1 +#endif /* Define to 1 if you have the `pread' function. */ #define HAVE_PREAD 1 @@ -197,7 +209,9 @@ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `uselocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_USELOCALE 1 +#endif /* Define to 1 if you have the `utime' function. */ #define HAVE_UTIME 1 @@ -237,7 +251,9 @@ #define HAVE_WORKING_VFORK 1 /* Define to 1 if you have the header file. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_XLOCALE_H 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_ZLIB_H 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: r277297 - stable/10/sys/net
Author: ae Date: Sat Jan 17 11:43:13 2015 New Revision: 277297 URL: https://svnweb.freebsd.org/changeset/base/277297 Log: MFC r276901: Move the recursion detection code into separate function gif_check_nesting(). Also make MTAG_GIF definition private to if_gif.c. MFC r276907: Restore Ethernet-within-IP Encapsulation support that was broken after r273087. Move all checks from gif_output() into gif_transmit(). Previously they were checked always, because if_start always called gif_output. Now gif_transmit() can be called directly from if_bridge() code and we need do checks here. PR: 196646 Modified: stable/10/sys/net/if_gif.c stable/10/sys/net/if_gif.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_gif.c == --- stable/10/sys/net/if_gif.c Sat Jan 17 11:41:04 2015(r277296) +++ stable/10/sys/net/if_gif.c Sat Jan 17 11:43:13 2015(r277297) @@ -120,6 +120,7 @@ void(*ng_gif_input_orphan_p)(struct ifn void (*ng_gif_attach_p)(struct ifnet *ifp); void (*ng_gif_detach_p)(struct ifnet *ifp); +static int gif_check_nesting(struct ifnet *, struct mbuf *); static int gif_set_tunnel(struct ifnet *, struct sockaddr *, struct sockaddr *); static voidgif_delete_tunnel(struct ifnet *); @@ -352,18 +353,32 @@ gif_transmit(struct ifnet *ifp, struct m uint8_t proto, ecn; int error; +#ifdef MAC + error = mac_ifnet_check_transmit(ifp, m); + if (error) { + m_freem(m); + goto err; + } +#endif error = ENETDOWN; sc = ifp->if_softc; - if (sc->gif_family == 0) { + if ((ifp->if_flags & IFF_MONITOR) != 0 || + (ifp->if_flags & IFF_UP) == 0 || + sc->gif_family == 0 || + (error = gif_check_nesting(ifp, m)) != 0) { m_freem(m); goto err; } /* Now pull back the af that we stashed in the csum_data. */ - af = m->m_pkthdr.csum_data; + if (ifp->if_bridge) + af = AF_LINK; + else + af = m->m_pkthdr.csum_data; + m->m_flags &= ~(M_BCAST|M_MCAST); + M_SETFIB(m, sc->gif_fibnum); BPF_MTAP2(ifp, &af, sizeof(af), m); if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len); - M_SETFIB(m, sc->gif_fibnum); /* inner AF-specific encapsulation */ ecn = 0; switch (af) { @@ -447,24 +462,12 @@ gif_qflush(struct ifnet *ifp __unused) } -int -gif_output(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, - struct route *ro) +#defineMTAG_GIF1080679712 +static int +gif_check_nesting(struct ifnet *ifp, struct mbuf *m) { struct m_tag *mtag; - uint32_t af; - int gif_called; - int error = 0; -#ifdef MAC - error = mac_ifnet_check_transmit(ifp, m); - if (error) - goto err; -#endif - if ((ifp->if_flags & IFF_MONITOR) != 0 || - (ifp->if_flags & IFF_UP) == 0) { - error = ENETDOWN; - goto err; - } + int count; /* * gif may cause infinite recursion calls when misconfigured. @@ -473,42 +476,39 @@ gif_output(struct ifnet *ifp, struct mbu * High nesting level may cause stack exhaustion. * We'll prevent this by introducing upper limit. */ - gif_called = 1; - mtag = m_tag_locate(m, MTAG_GIF, MTAG_GIF_CALLED, NULL); - while (mtag != NULL) { + count = 1; + mtag = NULL; + while ((mtag = m_tag_locate(m, MTAG_GIF, 0, mtag)) != NULL) { if (*(struct ifnet **)(mtag + 1) == ifp) { - log(LOG_NOTICE, - "gif_output: loop detected on %s\n", - (*(struct ifnet **)(mtag + 1))->if_xname); - error = EIO;/* is there better errno? */ - goto err; + log(LOG_NOTICE, "%s: loop detected\n", ifp->if_xname); + return (EIO); } - mtag = m_tag_locate(m, MTAG_GIF, MTAG_GIF_CALLED, mtag); - gif_called++; + count++; } - if (gif_called > V_max_gif_nesting) { + if (count > V_max_gif_nesting) { log(LOG_NOTICE, - "gif_output: recursively called too many times(%d)\n", - gif_called); - error = EIO;/* is there better errno? */ - goto err; - } - mtag = m_tag_alloc(MTAG_GIF, MTAG_GIF_CALLED, sizeof(struct ifnet *), - M_NOWAIT); - if (mtag == NULL) { - error = ENOMEM; - goto err; - } + "%s: if_output recursively called too many times(%d)\n", +
svn commit: r277298 - head/sys/dev/usb/net
Author: br Date: Sat Jan 17 12:31:26 2015 New Revision: 277298 URL: https://svnweb.freebsd.org/changeset/base/277298 Log: o Notify USB host about connection when operating in device mode. Required when communicating to Mac OS X USB host stack. o Also don't set stall bit to TX pipe in device mode as seems Mac OS X don't clears it as it should. Discussed with: hselasky@ Modified: head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/net/if_cdcereg.h Modified: head/sys/dev/usb/net/if_cdce.c == --- head/sys/dev/usb/net/if_cdce.c Sat Jan 17 11:43:13 2015 (r277297) +++ head/sys/dev/usb/net/if_cdce.c Sat Jan 17 12:31:26 2015 (r277298) @@ -898,8 +898,14 @@ cdce_init(struct usb_ether *ue) usbd_transfer_start(sc->sc_xfer[CDCE_INTR_RX]); usbd_transfer_start(sc->sc_xfer[CDCE_INTR_TX]); - /* stall data write direction, which depends on USB mode */ - usbd_xfer_set_stall(sc->sc_xfer[CDCE_BULK_TX]); + /* +* Stall data write direction, which depends on USB mode. +* +* Some USB host stacks (e.g. Mac OS X) don't clears stall +* bit as it should, so set it in our host mode only. +*/ + if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) + usbd_xfer_set_stall(sc->sc_xfer[CDCE_BULK_TX]); /* start data transfers */ cdce_start(ue); @@ -1065,6 +1071,10 @@ tr_setup: static void cdce_intr_write_callback(struct usb_xfer *xfer, usb_error_t error) { + struct cdce_softc *sc = usbd_xfer_softc(xfer); + struct usb_cdc_notification req; + struct usb_page_cache *pc; + uint32_t speed; int actlen; usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); @@ -1077,10 +1087,50 @@ cdce_intr_write_callback(struct usb_xfer /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: -#if 0 - usbd_xfer_set_frame_len(xfer, 0, XXX); - usbd_transfer_submit(xfer); -#endif + /* +* Inform host about connection. Required according to USB CDC +* specification and communicating to Mac OS X USB host stack. +* Some of the values seems ignored by Mac OS X though. +*/ + if (sc->sc_notify_state == CDCE_NOTIFY_NETWORK_CONNECTION) { + req.bmRequestType = UCDC_NOTIFICATION; + req.bNotification = UCDC_N_NETWORK_CONNECTION; + req.wIndex[0] = sc->sc_ifaces_index[1]; + req.wIndex[1] = 0; + USETW(req.wValue, 1); /* Connected */ + USETW(req.wLength, 0); + + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_in(pc, 0, &req, sizeof(req)); + usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); + usbd_xfer_set_frames(xfer, 1); + usbd_transfer_submit(xfer); + sc->sc_notify_state = CDCE_NOTIFY_SPEED_CHANGE; + + } else if (sc->sc_notify_state == CDCE_NOTIFY_SPEED_CHANGE) { + req.bmRequestType = UCDC_NOTIFICATION; + req.bNotification = UCDC_N_CONNECTION_SPEED_CHANGE; + req.wIndex[0] = sc->sc_ifaces_index[1]; + req.wIndex[1] = 0; + USETW(req.wValue, 0); + USETW(req.wLength, 8); + + /* Peak theoretical bulk trasfer rate in bits/s */ + if (usbd_get_speed(sc->sc_ue.ue_udev) == USB_SPEED_HIGH) + speed = (13 * 512 * 8 * 1000 * 8); + else + speed = (19 * 64 * 1 * 1000 * 8); + + USETDW(req.data + 0, speed); /* Upstream bit rate */ + USETDW(req.data + 4, speed); /* Downstream bit rate */ + + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_in(pc, 0, &req, sizeof(req)); + usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); + usbd_xfer_set_frames(xfer, 1); + usbd_transfer_submit(xfer); + sc->sc_notify_state = CDCE_NOTIFY_DONE; + } break; default:/* Error */ Modified: head/sys/dev/usb/net/if_cdcereg.h == --- head/sys/dev/usb/net/if_cdcereg.h Sat Jan 17 11:43:13 2015 (r277297) +++ head/sys/dev/usb/net/if_cdcereg.h Sat Jan 17 12:31:26 2015 (r277298) @@ -93,6 +93,10 @@ struct cdce_softc { uint8_t sc_eaddr_str_index; uint8_t sc_ifaces_index[2]; + uint8_t sc_notify_state; +#defineCDCE_NOTIFY_NETWORK_CONNECTION 0 +#defi
svn commit: r277299 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include
Author: dim Date: Sat Jan 17 12:54:02 2015 New Revision: 277299 URL: https://svnweb.freebsd.org/changeset/base/277299 Log: MFC r276517: Pull in r200010 from upstream libc++ trunk (by Marshall Clow): Rename some internal templates to avoid conflict with complier intrinsics. __is_constructible --> __libcpp_is_constructible, __is_nothrow_constructible --> __libcpp_is_nothrow_constructible, and __is_nothrow_assignable --> __libcpp_is_nothrow_assignable. No functionality change. Pull in r206805 from upstream libc++ trunk (by Marshall Clow): Use compiler intrinsic __is_constructible if available This should fix building parts of world with -std=c++11 enabled. Reported by: Oliver Hartmann Modified: stable/9/contrib/libc++/include/type_traits Directory Properties: stable/9/contrib/libc++/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libc++/include/type_traits Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libc++/include/type_traits == --- stable/9/contrib/libc++/include/type_traits Sat Jan 17 12:31:26 2015 (r277298) +++ stable/9/contrib/libc++/include/type_traits Sat Jan 17 12:54:02 2015 (r277299) @@ -2015,10 +2015,24 @@ class _LIBCPP_TYPE_VIS_ONLY result_of<_F #endif // _LIBCPP_HAS_NO_VARIADICS -#ifndef _LIBCPP_HAS_NO_VARIADICS - // template struct is_constructible; +namespace __is_construct +{ +struct __nat {}; +} + +#if __has_feature(is_constructible) + +template +struct _LIBCPP_TYPE_VIS_ONLY is_constructible +: public integral_constant +{}; + +#else + +#ifndef _LIBCPP_HAS_NO_VARIADICS + // main is_constructible test template @@ -2030,7 +2044,7 @@ false_type __is_constructible_test(__any, _Args&& ...); template -struct __is_constructible // false, _Tp is not a scalar +struct __libcpp_is_constructible // false, _Tp is not a scalar : public common_type < decltype(__is_constructible_test(declval<_Tp>(), declval<_Args>()...)) @@ -2040,7 +2054,7 @@ struct __is_constructible // false, _Tp // function types are not constructible template -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; @@ -2049,7 +2063,7 @@ struct __is_constructible -struct __is_constructible +struct __libcpp_is_constructible : public is_scalar<_Tp> {}; @@ -2064,7 +2078,7 @@ struct __is_constructible_ref }; template -struct __is_constructible +struct __libcpp_is_constructible : public common_type < decltype(__is_constructible_ref<_Tp>::__lxx(declval<_A0>())) @@ -2074,7 +2088,7 @@ struct __is_constructible -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; @@ -2082,7 +2096,7 @@ struct __is_constructible struct __is_constructible_void_check -: public __is_constructible::value || is_reference<_Tp>::value, +: public __libcpp_is_constructible::value || is_reference<_Tp>::value, _Tp, _Args...> {}; @@ -2117,21 +2131,21 @@ struct _LIBCPP_TYPE_VIS_ONLY is_construc // is default constructible template -struct __is_constructible +struct __libcpp_is_constructible : public is_constructible::type> {}; // Otherwise array types are not constructible by this syntax template -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; // Incomplete array types are not constructible template -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; @@ -2246,13 +2260,6 @@ struct __is_constructible2_void_check struct _LIBCPP_TYPE_VIS_ONLY is_constructible @@ -2317,6 +2324,7 @@ struct __is_constructible2_imp struct __is_nothrow_constructible; +template struct __libcpp_is_nothrow_constructible; template -struct __is_nothrow_constructible +struct __libcpp_is_nothrow_constructible : public integral_constant()...))> { }; template -struct __is_nothrow_constructible +struct __libcpp_is_nothrow_constructible : public false_type { }; template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible -: __is_nothrow_constructible::value, _Tp, _Args...> +: __libcpp_is_nothrow_constructible::value, _Tp, _Args...> { }; template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp[_Ns]> -: __is_nothrow_constructible::value, _Tp> +: __libcpp_is_nothrow_constructible::value, _Tp> { }; @@ -2743,23 +2751,23 @@ template struct _LIBCPP_TYPE #if __has_feature(cxx_noexcept) -template struct __is_nothrow_assignable; +template struct __libcpp_is_nothrow_assignable; template -struct __is_nothrow_assignable +struct __libcpp_is_nothrow_assignable : public false_type { }; template -struct __is_no
svn commit: r277299 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include
Author: dim Date: Sat Jan 17 12:54:02 2015 New Revision: 277299 URL: https://svnweb.freebsd.org/changeset/base/277299 Log: MFC r276517: Pull in r200010 from upstream libc++ trunk (by Marshall Clow): Rename some internal templates to avoid conflict with complier intrinsics. __is_constructible --> __libcpp_is_constructible, __is_nothrow_constructible --> __libcpp_is_nothrow_constructible, and __is_nothrow_assignable --> __libcpp_is_nothrow_assignable. No functionality change. Pull in r206805 from upstream libc++ trunk (by Marshall Clow): Use compiler intrinsic __is_constructible if available This should fix building parts of world with -std=c++11 enabled. Reported by: Oliver Hartmann Modified: stable/10/contrib/libc++/include/type_traits Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/contrib/libc++/include/type_traits Directory Properties: stable/9/contrib/libc++/ (props changed) Modified: stable/10/contrib/libc++/include/type_traits == --- stable/10/contrib/libc++/include/type_traitsSat Jan 17 12:31:26 2015(r277298) +++ stable/10/contrib/libc++/include/type_traitsSat Jan 17 12:54:02 2015(r277299) @@ -2015,10 +2015,24 @@ class _LIBCPP_TYPE_VIS_ONLY result_of<_F #endif // _LIBCPP_HAS_NO_VARIADICS -#ifndef _LIBCPP_HAS_NO_VARIADICS - // template struct is_constructible; +namespace __is_construct +{ +struct __nat {}; +} + +#if __has_feature(is_constructible) + +template +struct _LIBCPP_TYPE_VIS_ONLY is_constructible +: public integral_constant +{}; + +#else + +#ifndef _LIBCPP_HAS_NO_VARIADICS + // main is_constructible test template @@ -2030,7 +2044,7 @@ false_type __is_constructible_test(__any, _Args&& ...); template -struct __is_constructible // false, _Tp is not a scalar +struct __libcpp_is_constructible // false, _Tp is not a scalar : public common_type < decltype(__is_constructible_test(declval<_Tp>(), declval<_Args>()...)) @@ -2040,7 +2054,7 @@ struct __is_constructible // false, _Tp // function types are not constructible template -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; @@ -2049,7 +2063,7 @@ struct __is_constructible -struct __is_constructible +struct __libcpp_is_constructible : public is_scalar<_Tp> {}; @@ -2064,7 +2078,7 @@ struct __is_constructible_ref }; template -struct __is_constructible +struct __libcpp_is_constructible : public common_type < decltype(__is_constructible_ref<_Tp>::__lxx(declval<_A0>())) @@ -2074,7 +2088,7 @@ struct __is_constructible -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; @@ -2082,7 +2096,7 @@ struct __is_constructible struct __is_constructible_void_check -: public __is_constructible::value || is_reference<_Tp>::value, +: public __libcpp_is_constructible::value || is_reference<_Tp>::value, _Tp, _Args...> {}; @@ -2117,21 +2131,21 @@ struct _LIBCPP_TYPE_VIS_ONLY is_construc // is default constructible template -struct __is_constructible +struct __libcpp_is_constructible : public is_constructible::type> {}; // Otherwise array types are not constructible by this syntax template -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; // Incomplete array types are not constructible template -struct __is_constructible +struct __libcpp_is_constructible : public false_type {}; @@ -2246,13 +2260,6 @@ struct __is_constructible2_void_check struct _LIBCPP_TYPE_VIS_ONLY is_constructible @@ -2317,6 +2324,7 @@ struct __is_constructible2_imp struct __is_nothrow_constructible; +template struct __libcpp_is_nothrow_constructible; template -struct __is_nothrow_constructible +struct __libcpp_is_nothrow_constructible : public integral_constant()...))> { }; template -struct __is_nothrow_constructible +struct __libcpp_is_nothrow_constructible : public false_type { }; template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible -: __is_nothrow_constructible::value, _Tp, _Args...> +: __libcpp_is_nothrow_constructible::value, _Tp, _Args...> { }; template struct _LIBCPP_TYPE_VIS_ONLY is_nothrow_constructible<_Tp[_Ns]> -: __is_nothrow_constructible::value, _Tp> +: __libcpp_is_nothrow_constructible::value, _Tp> { }; @@ -2743,23 +2751,23 @@ template struct _LIBCPP_TYPE #if __has_feature(cxx_noexcept) -template struct __is_nothrow_assignable; +template struct __libcpp_is_nothrow_assignable; template -struct __is_nothrow_assignable +struct __libcpp_is_nothrow_assignable : public false_type { }; template
Re: svn commit: r277285 - head/sys/x86/isa
> On 17 Jan 2015, at 02:18 , Warner Losh wrote: > > Author: imp > Date: Sat Jan 17 02:17:59 2015 > New Revision: 277285 > URL: https://svnweb.freebsd.org/changeset/base/277285 > > Log: > Need to include opt_mca.h to test for DEV_MCA. > > Modified: > head/sys/x86/isa/atpic.c i386 LINT kernels: /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:376:6: error: use of undeclared identifier 'MCA_system' /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:440:6: error: use of undeclared identifier 'MCA_system' > > Modified: head/sys/x86/isa/atpic.c > == > --- head/sys/x86/isa/atpic.c Sat Jan 17 02:17:57 2015(r277284) > +++ head/sys/x86/isa/atpic.c Sat Jan 17 02:17:59 2015(r277285) > @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); > > #include "opt_auto_eoi.h" > #include "opt_isa.h" > +#include "opt_mca.h" > > #include > #include > — Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." ___ 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: r277300 - in head: cddl/contrib/opensolaris/cmd/dtrace cddl/contrib/opensolaris/cmd/lockstat cddl/contrib/opensolaris/cmd/mdb/tools/common cddl/contrib/opensolaris/cmd/plockstat cddl/co...
Author: smh Date: Sat Jan 17 14:44:59 2015 New Revision: 277300 URL: https://svnweb.freebsd.org/changeset/base/277300 Log: Mechanically convert cddl sun #ifdef's to illumos Since the upstream for cddl code is now illumos not sun, mechanically convert all sun #ifdef's to illumos #ifdef's which have been used in all newer code for some time. Also do a manual pass to correct the use if #ifdef comments as per style(9) as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos. MFC after:1 month Sponsored by: Multiplay Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c head/cddl/contrib/opensolaris/cmd/lockstat/sym.c head/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c head/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c head/cddl/contrib/opensolaris/cmd/sgs/include/alist.h head/cddl/contrib/opensolaris/cmd/sgs/include/sgs.h head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c head/cddl/contrib/opensolaris/common/util/strtolctype.h head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_work.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h head/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c head/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c head/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.h head/cddl/contrib/opensolaris/tools/ctf/cvt/ctfconvert.c head/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c head/cddl/contrib/opensolaris/tools/ctf/cvt/tdata.c head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c head/sys/cddl/contrib/opensolaris/common/util/strtolctype.h head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sy
svn commit: r277301 - head/sys/fs/ext2fs
Author: pfg Date: Sat Jan 17 15:19:18 2015 New Revision: 277301 URL: https://svnweb.freebsd.org/changeset/base/277301 Log: ext2: cosmetical issues Minor sorting and note when the cases are expected to fall through. MFC after:1 week Modified: head/sys/fs/ext2fs/ext2_hash.c Modified: head/sys/fs/ext2fs/ext2_hash.c == --- head/sys/fs/ext2fs/ext2_hash.c Sat Jan 17 14:44:59 2015 (r277300) +++ head/sys/fs/ext2fs/ext2_hash.c Sat Jan 17 15:19:18 2015 (r277301) @@ -196,10 +196,10 @@ ext2_prep_hashbuf(const char *src, int s { uint32_t padding = slen | (slen << 8) | (slen << 16) | (slen << 24); uint32_t buf_val; - int len, i; - int buf_byte; const unsigned char *ubuf = (const unsigned char *)src; const signed char *sbuf = (const signed char *)src; + int len, i; + int buf_byte; if (slen > dlen) len = dlen; @@ -265,6 +265,7 @@ ext2_htree_hash(const char *name, int le switch (hash_version) { case EXT2_HTREE_TEA_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_TEA: while (len > 0) { ext2_prep_hashbuf(name, len, data, 16, unsigned_char); @@ -277,11 +278,13 @@ ext2_htree_hash(const char *name, int le break; case EXT2_HTREE_LEGACY_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_LEGACY: major = ext2_legacy_hash(name, len, unsigned_char); break; case EXT2_HTREE_HALF_MD4_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_HALF_MD4: while (len > 0) { ext2_prep_hashbuf(name, len, data, 32, unsigned_char); ___ 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: r277302 - in head/sys: conf modules modules/ibcore modules/ipoib modules/linuxapi modules/mlx4 modules/mlx4ib ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/i...
Author: hselasky Date: Sat Jan 17 16:36:39 2015 New Revision: 277302 URL: https://svnweb.freebsd.org/changeset/base/277302 Log: Start importing the basic OFED linux compatibility layer changes made by dumbbell@ to be able to compile this layer as a dependency module. Clean up some Makefiles and remove the no longer used OFED define. Currently only i386 and amd64 targets are supported. MFC after:1 month Sponsored by: Mellanox Technologies Added: head/sys/modules/linuxapi/ head/sys/modules/linuxapi/Makefile (contents, props changed) head/sys/ofed/include/linux/linux_kmod.c (contents, props changed) head/sys/ofed/include/linux/linux_pci.c (contents, props changed) Modified: head/sys/conf/files head/sys/conf/options head/sys/modules/Makefile head/sys/modules/ibcore/Makefile head/sys/modules/ipoib/Makefile head/sys/modules/mlx4/Makefile head/sys/modules/mlx4ib/Makefile head/sys/ofed/drivers/infiniband/core/device.c head/sys/ofed/drivers/infiniband/hw/mlx4/main.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c head/sys/ofed/drivers/net/mlx4/en_main.c head/sys/ofed/drivers/net/mlx4/main.c head/sys/ofed/include/linux/linux_compat.c head/sys/ofed/include/linux/pci.h Modified: head/sys/conf/files == --- head/sys/conf/files Sat Jan 17 15:19:18 2015(r277301) +++ head/sys/conf/files Sat Jan 17 16:36:39 2015(r277302) @@ -3571,13 +3571,13 @@ nlm/nlm_prot_svc.c optional nfslockd | nlm/nlm_prot_xdr.c optional nfslockd | nfsd nlm/sm_inter_xdr.c optional nfslockd | nfsd +# Linux Kernel Compatibility API +ofed/include/linux/linux_kmod.coptional ofed | compat_linuxapi +ofed/include/linux/linux_compat.c optional ofed | compat_linuxapi +ofed/include/linux/linux_pci.c optional ofed | compat_linuxapi +ofed/include/linux/linux_idr.c optional ofed | compat_linuxapi +ofed/include/linux/linux_radix.c optional ofed | compat_linuxapi # OpenFabrics Enterprise Distribution (Infiniband) -ofed/include/linux/linux_compat.c optional ofed \ - no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_idr.c optional ofed \ - no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_radix.c optional ofed \ - no-depend compile-with "${OFED_C}" ofed/drivers/infiniband/core/addr.coptional ofed \ no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" Modified: head/sys/conf/options == --- head/sys/conf/options Sat Jan 17 15:19:18 2015(r277301) +++ head/sys/conf/options Sat Jan 17 16:36:39 2015(r277302) @@ -85,6 +85,7 @@ COMPAT_FREEBSD6 opt_compat.h COMPAT_FREEBSD7opt_compat.h COMPAT_FREEBSD9opt_compat.h COMPAT_FREEBSD10 opt_compat.h +COMPAT_LINUXAPIopt_compat.h COMPILING_LINT opt_global.h COMPRESS_USER_CORES opt_core.h CY_PCI_FASTINTR @@ -907,7 +908,6 @@ FDT opt_platform.h FDT_DTB_STATIC opt_platform.h # OFED Infiniband stack -OFED opt_ofed.h OFED_DEBUG_INITopt_ofed.h SDPopt_ofed.h SDP_DEBUG opt_ofed.h Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Sat Jan 17 15:19:18 2015(r277301) +++ head/sys/modules/Makefile Sat Jan 17 16:36:39 2015(r277302) @@ -198,6 +198,7 @@ SUBDIR= \ ${_linprocfs} \ ${_linsysfs} \ ${_linux} \ + ${_linuxapi} \ lmc \ lpt \ mac_biba \ @@ -501,6 +502,7 @@ _ipoib= ipoib _linprocfs=linprocfs _linsysfs= linsysfs _linux=linux +_linuxapi= linuxapi _ndis= ndis .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _opensolaris= opensolaris Modified: head/sys/modules/ibcore/Makefile == --- head/sys/modules/ibcore/MakefileSat Jan 17 15:19:18 2015 (r277301) +++ head/sys/modules/ibcore/MakefileSat Jan 17 16:36:39 2015 (r277302) @@ -2,19 +2,19 @@ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/core .PATH: ${.CURDIR}/../../ofed/include/linux -KMOD= ibcore -SRCS= addr.c cm_msgs.h iwcm.c mad_rmpp.h sa_query.c ucma.c uverbs_cmd.c -SRCS+= agent.clocal_sa.c iwcm.h multicast.c smi.c ud_header.c uverbs_main.c -SRCS+= agent.h core_priv.h mad.c notice.c smi.h umem.c uverbs_marshall.c -SRCS+= cache.c device.c mad_priv.h packer.c sysfs.c user_mad.c verbs.c -SRCS+= cm.c fmr_pool.c mad_rmpp.c sa.h ucm.c uverbs.h cma.c -SRCS+=
svn commit: r277303 - head/sys/contrib/dev/ath/ath_hal/ar9300
Author: adrian Date: Sat Jan 17 17:31:47 2015 New Revision: 277303 URL: https://svnweb.freebsd.org/changeset/base/277303 Log: Skip the OFDM weak signal threshold detection programming for AR9462/AR9565. This and some upcoming changes to the HAL for these chips should address some of the signal sensitivity reported by users. Tested: * AR9462 (WB222), STA mode Obtained from:Linux ath9k Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.cSat Jan 17 16:36:39 2015(r277302) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.cSat Jan 17 17:31:47 2015(r277303) @@ -484,6 +484,9 @@ ar9300_ani_control(struct ath_hal *ah, H */ is_on = param ? 1 : 0; +if (AR_SREV_JUPITER(ah) || AR_SREV_APHRODITE(ah)) +goto skip_ws_det; + /* * make register setting for default (weak sig detect ON) * come from INI file @@ -528,6 +531,7 @@ ar9300_ani_control(struct ath_hal *ah, H m1_thresh_ext); OS_REG_RMW_FIELD(ah, AR_PHY_SFCORR_EXT, AR_PHY_SFCORR_EXT_M2_THRESH, m2_thresh_ext); +skip_ws_det: if (is_on) { OS_REG_SET_BIT(ah, AR_PHY_SFCORR_LOW, AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); ___ 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: r277304 - head/sys/contrib/dev/ath/ath_hal/ar9300
Author: adrian Date: Sat Jan 17 17:37:08 2015 New Revision: 277304 URL: https://svnweb.freebsd.org/changeset/base/277304 Log: Correct the descriptor length for AR9462/AR9565 and set the final field to zero - TX drops are otherwise reported. Tested: * AR9462 (WB222), STA mode Obtained from:Linux ath9k Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.cSat Jan 17 17:31:47 2015(r277303) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.cSat Jan 17 17:37:08 2015(r277304) @@ -68,9 +68,11 @@ ar9300_fill_tx_desc( const void *ds0) { struct ar9300_txc *ads = AR9300TXC(ds); +short desclen; /* Fill TXC info field */ -ads->ds_info = TXC_INFO(qcu); +desclen = (AR_SREV_JUPITER(ah) || AR_SREV_APHRODITE(ah)) ? 0x18 : 0x17; +ads->ds_info = TXC_INFO(qcu, desclen); /* Set the buffer addresses */ ads->ds_data0 = buf_addr[0]; @@ -124,6 +126,9 @@ ar9300_fill_tx_desc( ads->ds_ctl17 = SM(key_type, AR_encr_type); } +/* Only relevant for Jupiter/Aphrodite */ +ads->ds_ctl23 = 0; + return AH_TRUE; } Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.hSat Jan 17 17:31:47 2015(r277303) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.hSat Jan 17 17:37:08 2015(r277304) @@ -78,7 +78,8 @@ struct ar9300_txc { u_int32_t ds_ctl20; /* DMA control 20 */ u_int32_t ds_ctl21; /* DMA control 21 */ u_int32_t ds_ctl22; /* DMA control 22 */ -u_int32_t ds_pad[9]; /* pad to cache line (128 bytes/32 dwords) */ +u_int32_t ds_ctl23; /* DMA control 23 */ +u_int32_t ds_pad[8]; /* pad to cache line (128 bytes/32 dwords) */ }; @@ -429,11 +430,11 @@ struct ar9300_txc { #define RXSTATUS_NUMWORDS(ah) 11 -#define TXC_INFO(_qcu) (ATHEROS_VENDOR_ID << AR_desc_id_S) \ +#define TXC_INFO(_qcu, _desclen) (ATHEROS_VENDOR_ID << AR_desc_id_S) \ | (1 << AR_tx_rx_desc_S) \ | (1 << AR_ctrl_stat_S) \ | (_qcu << AR_tx_qcu_num_S) \ -| (0x17) +| (_desclen) #define VALID_KEY_TYPES \ ((1 << HAL_KEY_TYPE_CLEAR) | (1 << HAL_KEY_TYPE_WEP)|\ ___ 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: r277305 - head/sys/arm/arm
Author: ian Date: Sat Jan 17 18:40:46 2015 New Revision: 277305 URL: https://svnweb.freebsd.org/changeset/base/277305 Log: Minor cleanups, comment changes. No need to load 3 values when setting up the stack for secondary cores, the other two values are only used for zeroing bss on the primary core. No need to store the size of the stack at the top of the stack (seems to be a leftover instruction from some cut-n-paste). Modified: head/sys/arm/arm/locore-v6.S Modified: head/sys/arm/arm/locore-v6.S == --- head/sys/arm/arm/locore-v6.SSat Jan 17 17:37:08 2015 (r277304) +++ head/sys/arm/arm/locore-v6.SSat Jan 17 18:40:46 2015 (r277305) @@ -367,9 +367,9 @@ VA_TO_PA_POINTER(Lpagetable, boot_pt1) .Lstart: - .word _edata - .word _ebss - .word svcstk + .word _edata /* Note that these three items are */ + .word _ebss /* loaded with a single ldmia and */ + .word svcstk /* must remain in order together. */ .Lmainreturned: .asciz "main() returned" @@ -425,20 +425,19 @@ ASENTRY_NP(mpentry) bl init_mmu - adr r1, .Lstart - ldmia r1, {r1, r2, sp}/* Set initial stack and */ - mrc p15, 0, r0, c0, c0, 5 - and r0, r0, #15 + adr r1, .Lstart+8 /* Get initstack pointer from */ + ldr sp, [r1]/* startup data. */ + mrc CP15_MPIDR(r0) /* Get processor id number. */ + and r0, r0, #0x0f mov r1, #INIT_ARM_STACK_SIZE - mul r2, r1, r0 - add sp, sp, r2 - str r1, [sp] + mul r2, r1, r0 /* Point sp to initstack */ + add sp, sp, r2 /* area for this processor. */ /* Switch to virtual addresses. */ ldr pc, =1f 1: mov fp, #0 /* trace back starts here */ - bl _C_LABEL(init_secondary)/* Off we go */ + bl _C_LABEL(init_secondary)/* Off we go, cpu id in r0. */ adr r0, .Lmpreturned b _C_LABEL(panic) ___ 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: r277306 - head/sys/dev/sdhci
Author: ian Date: Sat Jan 17 18:56:22 2015 New Revision: 277306 URL: https://svnweb.freebsd.org/changeset/base/277306 Log: Add defines for SDHCI 3.0 controllers. Submitted by: Michal Meloun Modified: head/sys/dev/sdhci/sdhci.h Modified: head/sys/dev/sdhci/sdhci.h == --- head/sys/dev/sdhci/sdhci.h Sat Jan 17 18:40:46 2015(r277305) +++ head/sys/dev/sdhci/sdhci.h Sat Jan 17 18:56:22 2015(r277306) @@ -169,6 +169,10 @@ #define SDHCI_INT_CARD_INSERT 0x0040 #define SDHCI_INT_CARD_REMOVE 0x0080 #define SDHCI_INT_CARD_INT0x0100 +#define SDHCI_INT_INT_A 0x0200 +#define SDHCI_INT_INT_B 0x0400 +#define SDHCI_INT_INT_C 0x0800 +#define SDHCI_INT_RETUNE 0x1000 #define SDHCI_INT_ERROR 0x8000 #define SDHCI_INT_TIMEOUT 0x0001 #define SDHCI_INT_CRC 0x0002 @@ -180,6 +184,7 @@ #define SDHCI_INT_BUS_POWER 0x0080 #define SDHCI_INT_ACMD12ERR 0x0100 #define SDHCI_INT_ADMAERR 0x0200 +#define SDHCI_INT_TUNEERR 0x0400 #define SDHCI_INT_NORMAL_MASK 0x7FFF #define SDHCI_INT_ERROR_MASK 0x8000 @@ -195,6 +200,7 @@ SDHCI_INT_DATA_END_BIT) #define SDHCI_ACMD12_ERR 0x3C +#define SDHCI_HOST_CONTROL20x3E #define SDHCI_CAPABILITIES 0x40 #define SDHCI_TIMEOUT_CLK_MASK0x003F @@ -214,8 +220,31 @@ #define SDHCI_CAN_VDD_300 0x0200 #define SDHCI_CAN_VDD_180 0x0400 #define SDHCI_CAN_DO_64BIT0x1000 +#define SDHCI_CAN_ASYNC_INTR 0x2000 + +#define SDHCI_CAPABILITIES20x44 +#define SDHCI_CAN_SDR50 0x0001 +#define SDHCI_CAN_SDR104 0x0002 +#define SDHCI_CAN_DDR50 0x0004 +#define SDHCI_CAN_DRIVE_TYPE_A0x0010 +#define SDHCI_CAN_DRIVE_TYPE_B0x0020 +#define SDHCI_CAN_DRIVE_TYPE_C0x0040 +#define SDHCI_RETUNE_CNT_MASK 0x0F00 +#define SDHCI_RETUNE_CNT_SHIFT8 +#define SDHCI_TUNE_SDR50 0x2000 +#define SDHCI_RETUNE_MODES_MASK 0xC000 +#define SDHCI_RETUNE_MODES_SHIFT 14 +#define SDHCI_CLOCK_MULT_MASK 0x00FF +#define SDHCI_CLOCK_MULT_SHIFT16 #define SDHCI_MAX_CURRENT 0x48 +#define SDHCI_FORCE_AUTO_EVENT 0x50 +#define SDHCI_FORCE_INTR_EVENT 0x52 +#define SDHCI_ADMA_ERR 0x54 +#define SDHCI_ADMA_ADDRESS_LOW 0x58 +#define SDHCI_ADMA_ADDRESS_HI 0x5C +#define SDHCI_PRESET_VALUE 0x60 +#define SDHCI_SHARED_BUS_CTRL 0xE0 #define SDHCI_SLOT_INT_STATUS 0xFC ___ 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: r277307 - in head/sys: arm/broadcom/bcm2835 dev/sdhci
Author: ian Date: Sat Jan 17 19:57:03 2015 New Revision: 277307 URL: https://svnweb.freebsd.org/changeset/base/277307 Log: Add a new SDHCI quirk, SDHCI_QUIRK_DONT_SET_HISPD_BIT. Apparently some sdhci controllers, such as the one on a Raspberry Pi, mishandle the signal timing in high speed signaling mode, but run just fine in standard mode with the bus running at frequencies between 25-50MHz (which shouldn't work). This is the solution adopted by U-Boot and other OSes (linux and *BSD) for the timeouts on Raspberry Pi boards with certain SD cards. Some research shows that this quirk is also used on a few other boards, so the fix is a generic quirk instead of being in the RPi-specific driver code. This change is based on information discovered by Michal Meloun. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c == --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sat Jan 17 18:56:22 2015(r277306) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sat Jan 17 19:57:03 2015(r277307) @@ -91,7 +91,7 @@ __FBSDID("$FreeBSD$"); * HS mode still can be enabled with the tunable. */ static int bcm2835_sdhci_min_freq = 40; -static int bcm2835_sdhci_hs = 0; +static int bcm2835_sdhci_hs = 1; static int bcm2835_sdhci_pio_mode = 0; TUNABLE_INT("hw.bcm2835.sdhci.min_freq", &bcm2835_sdhci_min_freq); @@ -235,6 +235,7 @@ bcm_sdhci_attach(device_t dev) sc->sc_slot.caps |= (default_freq << SDHCI_CLOCK_BASE_SHIFT); sc->sc_slot.quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL + | SDHCI_QUIRK_DONT_SET_HISPD_BIT | SDHCI_QUIRK_MISSING_CAPS; sdhci_init_slot(dev, &sc->sc_slot, 0); Modified: head/sys/dev/sdhci/sdhci.c == --- head/sys/dev/sdhci/sdhci.c Sat Jan 17 18:56:22 2015(r277306) +++ head/sys/dev/sdhci/sdhci.c Sat Jan 17 19:57:03 2015(r277307) @@ -696,7 +696,8 @@ sdhci_generic_update_ios(device_t brdev, slot->hostctrl |= SDHCI_CTRL_4BITBUS; else slot->hostctrl &= ~SDHCI_CTRL_4BITBUS; - if (ios->timing == bus_timing_hs) + if (ios->timing == bus_timing_hs && + !(slot->quirks & SDHCI_QUIRK_DONT_SET_HISPD_BIT)) slot->hostctrl |= SDHCI_CTRL_HISPD; else slot->hostctrl &= ~SDHCI_CTRL_HISPD; Modified: head/sys/dev/sdhci/sdhci.h == --- head/sys/dev/sdhci/sdhci.h Sat Jan 17 18:56:22 2015(r277306) +++ head/sys/dev/sdhci/sdhci.h Sat Jan 17 19:57:03 2015(r277307) @@ -61,6 +61,8 @@ #defineSDHCI_QUIRK_DONT_SHIFT_RESPONSE (1<<13) /* Wait to see reset bit asserted before waiting for de-asserted */ #defineSDHCI_QUIRK_WAITFOR_RESET_ASSERTED (1<<14) +/* Leave controller in standard mode when putting card in HS mode. */ +#defineSDHCI_QUIRK_DONT_SET_HISPD_BIT (1<<15) /* * Controller registers ___ 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: r277285 - head/sys/x86/isa
> On Jan 17, 2015, at 6:31 AM, Bjoern A. Zeeb wrote: > > >> On 17 Jan 2015, at 02:18 , Warner Losh wrote: >> >> Author: imp >> Date: Sat Jan 17 02:17:59 2015 >> New Revision: 277285 >> URL: https://svnweb.freebsd.org/changeset/base/277285 >> >> Log: >> Need to include opt_mca.h to test for DEV_MCA. >> >> Modified: >> head/sys/x86/isa/atpic.c > > > i386 LINT kernels: > > /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:376:6: error: use of undeclared > identifier 'MCA_system' > /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:440:6: error: use of undeclared > identifier ‘MCA_system' I don’t get that far. After ‘make LINT’ in i386, I get OFED unknown option… Warner >> >> Modified: head/sys/x86/isa/atpic.c >> == >> --- head/sys/x86/isa/atpic.c Sat Jan 17 02:17:57 2015(r277284) >> +++ head/sys/x86/isa/atpic.c Sat Jan 17 02:17:59 2015(r277285) >> @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); >> >> #include "opt_auto_eoi.h" >> #include "opt_isa.h" >> +#include "opt_mca.h" >> >> #include >> #include >> > > — > Bjoern A. Zeeb Charles Haddon Spurgeon: > "Friendship is one of the sweetest joys of life. Many might have failed > beneath the bitterness of their trial had they not found a friend." > signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r277308 - head/sys/conf
Author: bz Date: Sun Jan 18 01:28:08 2015 New Revision: 277308 URL: https://svnweb.freebsd.org/changeset/base/277308 Log: There are still kernel configs and mk files depending on the OFED option. This will need a proper cleanup and in the meantime after r277302 unbreak LINT builds. Modified: head/sys/conf/options Modified: head/sys/conf/options == --- head/sys/conf/options Sat Jan 17 19:57:03 2015(r277307) +++ head/sys/conf/options Sun Jan 18 01:28:08 2015(r277308) @@ -908,6 +908,7 @@ FDT opt_platform.h FDT_DTB_STATIC opt_platform.h # OFED Infiniband stack +OFED opt_ofed.h OFED_DEBUG_INITopt_ofed.h SDPopt_ofed.h SDP_DEBUG opt_ofed.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"
Re: svn commit: r277302 - in head/sys: conf modules modules/ibcore modules/ipoib modules/linuxapi modules/mlx4 modules/mlx4ib ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/
> On 17 Jan 2015, at 16:36 , Hans Petter Selasky wrote: > > Author: hselasky > Date: Sat Jan 17 16:36:39 2015 > New Revision: 277302 > URL: https://svnweb.freebsd.org/changeset/base/277302 > > Log: > Start importing the basic OFED linux compatibility layer changes made > by dumbbell@ to be able to compile this layer as a dependency module. > Clean up some Makefiles and remove the no longer used OFED define. Build files, NOTES files, .. still referenced the “OFED” option. I put it back in for now to unbreak LINT builds. Please cleanup properly. Can always put it into reviews and find someone to make sure you caught all places. > Currently only i386 and amd64 targets are supported. > > MFC after: 1 month > Sponsored by:Mellanox Technologies > > Added: > .. > Modified: > .. > head/sys/conf/options > .. > Modified: head/sys/conf/options > == > --- head/sys/conf/options Sat Jan 17 15:19:18 2015(r277301) > +++ head/sys/conf/options Sat Jan 17 16:36:39 2015(r277302) > @@ -85,6 +85,7 @@ COMPAT_FREEBSD6 opt_compat.h > COMPAT_FREEBSD7 opt_compat.h > COMPAT_FREEBSD9 opt_compat.h > COMPAT_FREEBSD10 opt_compat.h > +COMPAT_LINUXAPI opt_compat.h On another note: this sounds really strange to me. > COMPILING_LINTopt_global.h > COMPRESS_USER_CORES opt_core.h > CY_PCI_FASTINTR > @@ -907,7 +908,6 @@ FDT opt_platform.h > FDT_DTB_STATICopt_platform.h > > # OFED Infiniband stack > -OFED opt_ofed.h > OFED_DEBUG_INIT opt_ofed.h > SDP opt_ofed.h > SDP_DEBUG opt_ofed.h > — Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." ___ 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: r277285 - head/sys/x86/isa
> On 17 Jan 2015, at 23:19 , Warner Losh wrote: > > >> On Jan 17, 2015, at 6:31 AM, Bjoern A. Zeeb wrote: >> >> >>> On 17 Jan 2015, at 02:18 , Warner Losh wrote: >>> >>> Author: imp >>> Date: Sat Jan 17 02:17:59 2015 >>> New Revision: 277285 >>> URL: https://svnweb.freebsd.org/changeset/base/277285 >>> >>> Log: >>> Need to include opt_mca.h to test for DEV_MCA. >>> >>> Modified: >>> head/sys/x86/isa/atpic.c >> >> >> i386 LINT kernels: >> >> /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:376:6: error: use of undeclared >> identifier 'MCA_system' >> /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:440:6: error: use of undeclared >> identifier ‘MCA_system' > > > I don’t get that far. After ‘make LINT’ in i386, I get OFED unknown option… Yeah blame r277302 on that ;-) I put it back for now and let hps know but you could also go back to 277301 and try to fix yours ;-) > > Warner > >>> >>> Modified: head/sys/x86/isa/atpic.c >>> == >>> --- head/sys/x86/isa/atpic.cSat Jan 17 02:17:57 2015 >>> (r277284) >>> +++ head/sys/x86/isa/atpic.cSat Jan 17 02:17:59 2015 >>> (r277285) >>> @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); >>> >>> #include "opt_auto_eoi.h" >>> #include "opt_isa.h" >>> +#include "opt_mca.h" >>> >>> #include >>> #include >>> >> >> — >> Bjoern A. Zeeb Charles Haddon Spurgeon: >> "Friendship is one of the sweetest joys of life. Many might have failed >> beneath the bitterness of their trial had they not found a friend." >> > — Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." ___ 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: r277309 - head/share/examples/bhyve
Author: neel Date: Sun Jan 18 01:50:10 2015 New Revision: 277309 URL: https://svnweb.freebsd.org/changeset/base/277309 Log: Make the error message explicit instead of just printing the usage if the virtual machine name is not specified. Requested by: grehan MFC after:1 week Modified: head/share/examples/bhyve/vmrun.sh Modified: head/share/examples/bhyve/vmrun.sh == --- head/share/examples/bhyve/vmrun.sh Sun Jan 18 01:28:08 2015 (r277308) +++ head/share/examples/bhyve/vmrun.sh Sun Jan 18 01:50:10 2015 (r277309) @@ -39,7 +39,13 @@ DEFAULT_CONSOLE=stdio DEFAULT_VIRTIO_DISK="./diskdev" DEFAULT_ISOFILE="./release.iso" +errmsg() { + echo "*** $1" +} + usage() { + local msg=$1 + echo "Usage: vmrun.sh [-ahi] [-c ] [-C ] [-d ]" echo "[-e ] [-g ] [-H ]" echo "[-I ] [-m ]" @@ -58,18 +64,18 @@ usage() { echo " -m: memory size (default is ${DEFAULT_MEMSIZE})" echo " -t: tap device for virtio-net (default is $DEFAULT_TAPDEV)" echo "" - echo " This script needs to be executed with superuser privileges" - echo "" + [ -n "$msg" ] && errmsg "$msg" exit 1 } if [ `id -u` -ne 0 ]; then - usage + errmsg "This script must be executed with superuser privileges" + exit 1 fi kldstat -n vmm > /dev/null 2>&1 if [ $? -ne 0 ]; then - echo "vmm.ko is not loaded!" + errmsg "vmm.ko is not loaded" exit 1 fi @@ -140,7 +146,7 @@ fi shift $((${OPTIND} - 1)) if [ $# -ne 1 ]; then - usage + usage "virtual machine name not specified" fi vmname="$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: r277310 - in head: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel usr.sbin/bhyve usr.sbin/bhyvectl
Author: neel Date: Sun Jan 18 03:08:30 2015 New Revision: 277310 URL: https://svnweb.freebsd.org/changeset/base/277310 Log: Simplify instruction restart logic in bhyve. Keep track of the next instruction to be executed by the vcpu as 'nextrip'. As a result the VM_RUN ioctl no longer takes the %rip where a vcpu should start execution. Also, instruction restart happens implicitly via 'vm_inject_exception()' or explicitly via 'vm_restart_instruction()'. The APIs behave identically in both kernel and userspace contexts. The main beneficiary is the instruction emulation code that executes in both contexts. bhyve(8) VM exit handlers now treat 'vmexit->rip' and 'vmexit->inst_length' as readonly: - Restarting an instruction is now done by calling 'vm_restart_instruction()' as opposed to setting 'vmexit->inst_length' to 0 (e.g. emulate_inout()) - Resuming vcpu at an arbitrary %rip is now done by setting VM_REG_GUEST_RIP as opposed to changing 'vmexit->rip' (e.g. vmexit_task_switch()) Differential Revision:https://reviews.freebsd.org/D1526 Reviewed by: grehan MFC after:2 weeks Modified: head/lib/libvmmapi/vmmapi.c head/lib/libvmmapi/vmmapi.h head/sys/amd64/include/vmm_dev.h head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_dev.c head/usr.sbin/bhyve/bhyverun.c head/usr.sbin/bhyve/bhyverun.h head/usr.sbin/bhyve/inout.c head/usr.sbin/bhyve/task_switch.c head/usr.sbin/bhyvectl/bhyvectl.c Modified: head/lib/libvmmapi/vmmapi.c == --- head/lib/libvmmapi/vmmapi.c Sun Jan 18 01:50:10 2015(r277309) +++ head/lib/libvmmapi/vmmapi.c Sun Jan 18 03:08:30 2015(r277310) @@ -368,14 +368,13 @@ vm_get_register(struct vmctx *ctx, int v } int -vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *vmexit) +vm_run(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit) { int error; struct vm_run vmrun; bzero(&vmrun, sizeof(vmrun)); vmrun.cpuid = vcpu; - vmrun.rip = rip; error = ioctl(ctx->fd, VM_RUN, &vmrun); bcopy(&vmrun.vm_exit, vmexit, sizeof(struct vm_exit)); @@ -399,36 +398,22 @@ vm_reinit(struct vmctx *ctx) return (ioctl(ctx->fd, VM_REINIT, 0)); } -static int -vm_inject_exception_real(struct vmctx *ctx, int vcpu, int vector, -int error_code, int error_code_valid) +int +vm_inject_exception(struct vmctx *ctx, int vcpu, int vector, int errcode_valid, +uint32_t errcode, int restart_instruction) { struct vm_exception exc; - bzero(&exc, sizeof(exc)); exc.cpuid = vcpu; exc.vector = vector; - exc.error_code = error_code; - exc.error_code_valid = error_code_valid; + exc.error_code = errcode; + exc.error_code_valid = errcode_valid; + exc.restart_instruction = restart_instruction; return (ioctl(ctx->fd, VM_INJECT_EXCEPTION, &exc)); } int -vm_inject_exception(struct vmctx *ctx, int vcpu, int vector) -{ - - return (vm_inject_exception_real(ctx, vcpu, vector, 0, 0)); -} - -int -vm_inject_exception2(struct vmctx *ctx, int vcpu, int vector, int errcode) -{ - - return (vm_inject_exception_real(ctx, vcpu, vector, errcode, 1)); -} - -int vm_apicid2vcpu(struct vmctx *ctx, int apicid) { /* @@ -1198,3 +1183,11 @@ vm_rtc_gettime(struct vmctx *ctx, time_t *secs = rtctime.secs; return (error); } + +int +vm_restart_instruction(void *arg, int vcpu) +{ + struct vmctx *ctx = arg; + + return (ioctl(ctx->fd, VM_RESTART_INSTRUCTION, &vcpu)); +} Modified: head/lib/libvmmapi/vmmapi.h == --- head/lib/libvmmapi/vmmapi.h Sun Jan 18 01:50:10 2015(r277309) +++ head/lib/libvmmapi/vmmapi.h Sun Jan 18 03:08:30 2015(r277310) @@ -32,6 +32,12 @@ #include #include +/* + * API version for out-of-tree consumers like grub-bhyve for making compile + * time decisions. + */ +#defineVMMAPI_VERSION 0101/* 2 digit major followed by 2 digit minor */ + struct iovec; struct vmctx; enum x2apic_state; @@ -70,13 +76,12 @@ int vm_get_seg_desc(struct vmctx *ctx, i struct seg_desc *seg_desc); intvm_set_register(struct vmctx *ctx, int vcpu, int reg, uint64_t val); intvm_get_register(struct vmctx *ctx, int vcpu, int reg, uint64_t *retval); -intvm_run(struct vmctx *ctx, int vcpu, uint64_t rip, - struct vm_exit *ret_vmexit); +intvm_run(struct vmctx *ctx, int vcpu, struct vm_exit *ret_vmexit); intvm_suspend(struct vmctx *ctx, enum vm_suspend_how how); intvm_reinit(struct vmctx *ctx); intvm_apicid2vcpu(struct vmctx *ctx, int apicid); -intvm_inject_exception(struct vmctx *ctx, int vcpu, int vec); -intvm_inject_exception2(struct vmctx *ctx, int vcpu, int vec, int errcode
Re: svn commit: r277302 - in head/sys: conf modules modules/ibcore modules/ipoib modules/linuxapi modules/mlx4 modules/mlx4ib ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/
> On 18 Jan 2015, at 01:33 , Bjoern A. Zeeb wrote: > > >> On 17 Jan 2015, at 16:36 , Hans Petter Selasky wrote: >> >> Author: hselasky >> Date: Sat Jan 17 16:36:39 2015 >> New Revision: 277302 >> URL: https://svnweb.freebsd.org/changeset/base/277302 >> >> Log: >> Start importing the basic OFED linux compatibility layer changes made >> by dumbbell@ to be able to compile this layer as a dependency module. >> Clean up some Makefiles and remove the no longer used OFED define. > > Build files, NOTES files, .. still referenced the “OFED” option. I put it > back in for now to unbreak LINT builds. Please cleanup properly. Can always > put it into reviews and find someone to make sure you caught all places. > Ok, never mind: /home/baz21/SVN/head-reviews.svn/sys/ofed/include/linux/linux_compat.c:49:10: fatal error: 'linux/kobject.h' file not found #include ^ 1 error generated. /home/baz21/SVN/head-reviews.svn/sys/ofed/include/linux/linux_pci.c:47:10: fatal error: 'linux/kobject.h' file not found #include ^ 1 error generated. /home/baz21/SVN/head-reviews.svn/sys/ofed/include/linux/linux_idr.c:40:10: fatal error: 'linux/bitops.h' file not found #include ^ 1 error generated. /home/baz21/SVN/head-reviews.svn/sys/ofed/include/linux/linux_radix.c:36:10: fatal error: 'linux/slab.h' file not found #include ^ 1 error generated. mkdep: compile failed --- .depend --- *** [.depend] Error code 1 >> Currently only i386 and amd64 targets are supported. >> >> MFC after: 1 month >> Sponsored by:Mellanox Technologies >> >> Added: >> .. >> Modified: >> .. >> head/sys/conf/options >> .. > >> Modified: head/sys/conf/options >> == >> --- head/sys/conf/optionsSat Jan 17 15:19:18 2015(r277301) >> +++ head/sys/conf/optionsSat Jan 17 16:36:39 2015(r277302) >> @@ -85,6 +85,7 @@ COMPAT_FREEBSD6opt_compat.h >> COMPAT_FREEBSD7 opt_compat.h >> COMPAT_FREEBSD9 opt_compat.h >> COMPAT_FREEBSD10 opt_compat.h >> +COMPAT_LINUXAPI opt_compat.h > > On another note: this sounds really strange to me. > > >> COMPILING_LINT opt_global.h >> COMPRESS_USER_CORES opt_core.h >> CY_PCI_FASTINTR >> @@ -907,7 +908,6 @@ FDT opt_platform.h >> FDT_DTB_STATIC opt_platform.h >> >> # OFED Infiniband stack >> -OFEDopt_ofed.h >> OFED_DEBUG_INIT opt_ofed.h >> SDP opt_ofed.h >> SDP_DEBUGopt_ofed.h >> > > — > Bjoern A. Zeeb Charles Haddon Spurgeon: > "Friendship is one of the sweetest joys of life. Many might have failed > beneath the bitterness of their trial had they not found a friend." > > — Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." ___ 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: r277311 - head/sys/x86/isa
Author: imp Date: Sun Jan 18 03:43:47 2015 New Revision: 277311 URL: https://svnweb.freebsd.org/changeset/base/277311 Log: Include mca_machdep.h. Modified: head/sys/x86/isa/atpic.c Modified: head/sys/x86/isa/atpic.c == --- head/sys/x86/isa/atpic.cSun Jan 18 03:08:30 2015(r277310) +++ head/sys/x86/isa/atpic.cSun Jan 18 03:43:47 2015(r277311) @@ -58,6 +58,9 @@ __FBSDID("$FreeBSD$"); #include #endif #include +#ifdef DEV_MCA +#include +#endif #ifdef __amd64__ #defineSDT_ATPIC SDT_SYSIGT ___ 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: r277313 - head/sys/arm/ti/am335x
Author: gonzo Date: Sun Jan 18 06:43:09 2015 New Revision: 277313 URL: https://svnweb.freebsd.org/changeset/base/277313 Log: Fix programming timing parameters to LCDC. Actual value used for HBP, HFP, HSW, VSW is register's programmed value + 1. Modified: head/sys/arm/ti/am335x/am335x_lcd.c Modified: head/sys/arm/ti/am335x/am335x_lcd.c == --- head/sys/arm/ti/am335x/am335x_lcd.c Sun Jan 18 05:31:26 2015 (r277312) +++ head/sys/arm/ti/am335x/am335x_lcd.c Sun Jan 18 06:43:09 2015 (r277313) @@ -433,6 +433,9 @@ am335x_lcd_attach(device_t dev) uint32_t burst_log; int err; size_t dma_size; + uint32_t hbp, hfp, hsw; + uint32_t vbp, vfp, vsw; + uint32_t width, height; sc = device_get_softc(dev); sc->sc_dev = dev; @@ -527,31 +530,42 @@ am335x_lcd_attach(device_t dev) /* Set timing */ timing0 = timing1 = timing2 = 0; + hbp = panel.panel_hbp - 1; + hfp = panel.panel_hfp - 1; + hsw = panel.panel_hsw - 1; + + vbp = panel.panel_vbp; + vfp = panel.panel_vfp; + vsw = panel.panel_vsw - 1; + + height = panel.panel_height - 1; + width = panel.panel_width - 1; + /* Horizontal back porch */ - timing0 |= (panel.panel_hbp & 0xff) << RASTER_TIMING_0_HBP_SHIFT; - timing2 |= ((panel.panel_hbp >> 8) & 3) << RASTER_TIMING_2_HBPHI_SHIFT; + timing0 |= (hbp & 0xff) << RASTER_TIMING_0_HBP_SHIFT; + timing2 |= ((hbp >> 8) & 3) << RASTER_TIMING_2_HBPHI_SHIFT; /* Horizontal front porch */ - timing0 |= (panel.panel_hfp & 0xff) << RASTER_TIMING_0_HFP_SHIFT; - timing2 |= ((panel.panel_hfp >> 8) & 3) << RASTER_TIMING_2_HFPHI_SHIFT; + timing0 |= (hfp & 0xff) << RASTER_TIMING_0_HFP_SHIFT; + timing2 |= ((hfp >> 8) & 3) << RASTER_TIMING_2_HFPHI_SHIFT; /* Horizontal sync width */ - timing0 |= (panel.panel_hsw & 0x3f) << RASTER_TIMING_0_HSW_SHIFT; - timing2 |= ((panel.panel_hsw >> 6) & 0xf) << RASTER_TIMING_2_HSWHI_SHIFT; + timing0 |= (hsw & 0x3f) << RASTER_TIMING_0_HSW_SHIFT; + timing2 |= ((hsw >> 6) & 0xf) << RASTER_TIMING_2_HSWHI_SHIFT; /* Vertical back porch, front porch, sync width */ - timing1 |= (panel.panel_vbp & 0xff) << RASTER_TIMING_1_VBP_SHIFT; - timing1 |= (panel.panel_vfp & 0xff) << RASTER_TIMING_1_VFP_SHIFT; - timing1 |= (panel.panel_vsw & 0x3f) << RASTER_TIMING_1_VSW_SHIFT; + timing1 |= (vbp & 0xff) << RASTER_TIMING_1_VBP_SHIFT; + timing1 |= (vfp & 0xff) << RASTER_TIMING_1_VFP_SHIFT; + timing1 |= (vsw & 0x3f) << RASTER_TIMING_1_VSW_SHIFT; /* Pixels per line */ - timing0 |= (((panel.panel_width - 1) >> 10) & 1) + timing0 |= ((width >> 10) & 1) << RASTER_TIMING_0_PPLMSB_SHIFT; - timing0 |= (((panel.panel_width - 1) >> 4) & 0x3f) + timing0 |= ((width >> 4) & 0x3f) << RASTER_TIMING_0_PPLLSB_SHIFT; /* Lines per panel */ - timing1 |= ((panel.panel_height - 1) & 0x3ff) + timing1 |= (height & 0x3ff) << RASTER_TIMING_1_LPP_SHIFT; - timing2 |= (((panel.panel_height - 1) >> 10 ) & 1) + timing2 |= ((height >> 10 ) & 1) << RASTER_TIMING_2_LPP_B10_SHIFT; /* clock signal settings */ ___ 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: r277314 - head/sys/dev/iicbus
Author: jhibbits Date: Sun Jan 18 07:08:06 2015 New Revision: 277314 URL: https://svnweb.freebsd.org/changeset/base/277314 Log: Use proper signed types. The ADT746x uses signed 8-bit numbers for the temperature. MFC after:2 weeks Modified: head/sys/dev/iicbus/adt746x.c Modified: head/sys/dev/iicbus/adt746x.c == --- head/sys/dev/iicbus/adt746x.c Sun Jan 18 06:43:09 2015 (r277313) +++ head/sys/dev/iicbus/adt746x.c Sun Jan 18 07:08:06 2015 (r277314) @@ -539,9 +539,10 @@ static int adt746x_sensor_read(struct adt746x_sensor *sens) { struct adt746x_softc *sc; - uint16_t tmp = 0; + int tmp = 0; uint16_t val; - uint8_t temp, data[1], data1[1]; + uint8_t data[1], data1[1]; + int8_t temp; sc = device_get_softc(sens->dev); if (sens->type != ADT746X_SENSOR_SPEED) { ___ 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"