svn commit: r272806 - head/cddl/contrib/opensolaris/cmd/zdb
Author: delphij Date: Thu Oct 9 06:02:53 2014 New Revision: 272806 URL: https://svnweb.freebsd.org/changeset/base/272806 Log: MFV r272802: - Limit ARC for zdb at 256MB. zdb do not typically revisit data in the ARC. - Increase default max_inflight from 200 to 1000 (can be overriden by -I) so we can queue more I/Os when doing scrubbing. - Print status while loading meataslabs for leak detection. Illumos issues: 5169 zdb should limit its ARC size 5170 zdb -c should create more scrub i/os by default 5171 zdb should print status while loading metaslabs for leak detection MFC after:2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c == --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Oct 9 05:53:58 2014 (r272805) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Oct 9 06:02:53 2014 (r272806) @@ -76,8 +76,10 @@ #ifndef lint extern boolean_t zfs_recover; +extern uint64_t zfs_arc_max, zfs_arc_meta_limit; #else boolean_t zfs_recover; +uint64_t zfs_arc_max, zfs_arc_meta_limit; #endif const char cmdname[] = zdb; @@ -89,7 +91,7 @@ extern void dump_intent_log(zilog_t *); uint64_t *zopt_object = NULL; int zopt_objects = 0; libzfs_handle_t *g_zfs; -uint64_t max_inflight = 200; +uint64_t max_inflight = 1000; /* * These libumem hooks provide a reasonable set of defaults for the allocator's @@ -2382,7 +2384,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog zcb-zcb_readfails = 0; - if (dump_opt['b'] 5 isatty(STDERR_FILENO) + if (dump_opt['b'] 5 gethrtime() zcb-zcb_lastprint + NANOSEC) { uint64_t now = gethrtime(); char buf[10]; @@ -2467,9 +2469,9 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) if (!dump_opt['L']) { vdev_t *rvd = spa-spa_root_vdev; - for (int c = 0; c rvd-vdev_children; c++) { + for (uint64_t c = 0; c rvd-vdev_children; c++) { vdev_t *vd = rvd-vdev_child[c]; - for (int m = 0; m vd-vdev_ms_count; m++) { + for (uint64_t m = 0; m vd-vdev_ms_count; m++) { metaslab_t *msp = vd-vdev_ms[m]; mutex_enter(msp-ms_lock); metaslab_unload(msp); @@ -2482,6 +2484,15 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) * interfaces. */ if (msp-ms_sm != NULL) { + (void) fprintf(stderr, + \rloading space map for + vdev %llu of %llu, + metaslab %llu of %llu ..., + (longlong_t)c, + (longlong_t)rvd-vdev_children, + (longlong_t)m, + (longlong_t)vd-vdev_ms_count); + msp-ms_ops = zdb_metaslab_ops; VERIFY0(space_map_load(msp-ms_sm, msp-ms_tree, SM_ALLOC)); @@ -2490,6 +2501,7 @@ zdb_leak_init(spa_t *spa, zdb_cb_t *zcb) mutex_exit(msp-ms_lock); } } + (void) fprintf(stderr, \n); } spa_config_enter(spa, SCL_CONFIG, FTAG, RW_READER); @@ -3490,6 +3502,12 @@ main(int argc, char **argv) usage(); } + /* +* ZDB does not typically re-read blocks; therefore limit the ARC +* to 256 MB, which can be used entirely for metadata. +*/ + zfs_arc_max = zfs_arc_meta_limit = 256 * 1024 * 1024; + kernel_init(FREAD); g_zfs = libzfs_init(); ASSERT(g_zfs != NULL); ___ 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: r272805 - head/sys/cam
Also... On Oct 8, 2014, at 22:53, Alexander Motin m...@freebsd.org wrote: Author: mav Date: Thu Oct 9 05:53:58 2014 New Revision: 272805 URL: https://svnweb.freebsd.org/changeset/base/272805 Log: Use proper variable when looping through periphs with CAM_PERIPH_FREE. PR:194256 Submitted by:Scott M. Ferris smfer...@gmail.com MFC after:3 days Sponsored by:EMC/Isilon Storage Division Reported by: Anton Rang anton.rang AT Isilon DOT com Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c == --- head/sys/cam/cam_xpt.cThu Oct 9 05:53:04 2014(r272804) +++ head/sys/cam/cam_xpt.cThu Oct 9 05:53:58 2014(r272805) @@ -2195,7 +2195,7 @@ xptperiphtraverse(struct cam_ed *device, next_periph = SLIST_NEXT(periph, periph_links); while (next_periph != NULL (next_periph-flags CAM_PERIPH_FREE) != 0) -next_periph = SLIST_NEXT(periph, periph_links); +next_periph = SLIST_NEXT(next_periph, periph_links); if (next_periph) next_periph-refcount++; mtx_unlock(bus-eb_mtx); @@ -2269,7 +2269,7 @@ xptpdperiphtraverse(struct periph_driver next_periph = TAILQ_NEXT(periph, unit_links); while (next_periph != NULL (next_periph-flags CAM_PERIPH_FREE) != 0) -next_periph = TAILQ_NEXT(periph, unit_links); +next_periph = TAILQ_NEXT(next_periph, unit_links); if (next_periph) next_periph-refcount++; xpt_unlock_buses(); ___ 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: r272807 - in head/sys/dev/usb: . controller
Author: hselasky Date: Thu Oct 9 06:24:06 2014 New Revision: 272807 URL: https://svnweb.freebsd.org/changeset/base/272807 Log: Refine support for disabling USB enumeration to allow device detach and suspend and resume of existing devices. MFC after:2 weeks Modified: head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/controller/usb_controller.c == --- head/sys/dev/usb/controller/usb_controller.cThu Oct 9 06:02:53 2014(r272806) +++ head/sys/dev/usb/controller/usb_controller.cThu Oct 9 06:24:06 2014(r272807) @@ -102,14 +102,6 @@ static int usb_no_shutdown_wait = 0; SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RWTUN, usb_no_shutdown_wait, 0, No USB device waiting at system shutdown.); -#if USB_HAVE_DISABLE_ENUM -static int usb_disable_enumeration = 0; -SYSCTL_INT(_hw_usb, OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, -usb_disable_enumeration, 0, Set to disable all USB device enumeration.); -#else -#defineusb_disable_enumeration 0 -#endif - static devclass_t usb_devclass; static device_method_t usb_methods[] = { @@ -379,8 +371,7 @@ usb_bus_explore(struct usb_proc_msg *pm) USB_BUS_LOCK(bus); } - if (usb_disable_enumeration == 0 - udev != NULL udev-hub != NULL) { + if (udev != NULL udev-hub != NULL) { if (bus-do_probe) { bus-do_probe = 0; Modified: head/sys/dev/usb/usb_hub.c == --- head/sys/dev/usb/usb_hub.c Thu Oct 9 06:02:53 2014(r272806) +++ head/sys/dev/usb/usb_hub.c Thu Oct 9 06:24:06 2014(r272807) @@ -97,6 +97,12 @@ SYSCTL_INT(_hw_usb, OID_AUTO, power_time usb_power_timeout, 0, USB power timeout); #endif +#if USB_HAVE_DISABLE_ENUM +static int usb_disable_enumeration = 0; +SYSCTL_INT(_hw_usb, OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, +usb_disable_enumeration, 0, Set to disable all USB device enumeration.); +#endif + struct uhub_current_state { uint16_t port_change; uint16_t port_status; @@ -621,9 +627,9 @@ repeat: err = usbd_req_clear_port_feature(udev, NULL, portno, UHF_C_PORT_CONNECTION); - if (err) { + if (err) goto error; - } + /* check if there is a child */ if (child != NULL) { @@ -636,14 +642,22 @@ repeat: /* get fresh status */ err = uhub_read_port_status(sc, portno); - if (err) { + if (err) + goto error; + +#if USB_HAVE_DISABLE_ENUM + /* check if we should skip enumeration from this USB HUB */ + if (usb_disable_enumeration != 0 || + sc-sc_disable_enumeration != 0) { + DPRINTF(Enumeration is disabled!\n); goto error; } +#endif /* check if nothing is connected to the port */ - if (!(sc-sc_st.port_status UPS_CURRENT_CONNECT_STATUS)) { + if (!(sc-sc_st.port_status UPS_CURRENT_CONNECT_STATUS)) goto error; - } + /* check if there is no power on the port and print a warning */ switch (udev-speed) { @@ -996,13 +1010,6 @@ uhub_explore(struct usb_device *udev) DPRINTFN(11, udev=%p addr=%d\n, udev, udev-address); -#if USB_HAVE_DISABLE_ENUM - /* check if we should skip enumeration from this USB HUB */ - if (sc-sc_disable_enumeration != 0) { - DPRINTF(Enumeration is disabled!\n); - return (0); - } -#endif /* ignore devices that are too deep */ if (uhub_is_too_deep(udev)) return (USB_ERR_TOO_DEEP); ___ 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: r272808 - head/include/rpcsvc
Author: bapt Date: Thu Oct 9 06:58:33 2014 New Revision: 272808 URL: https://svnweb.freebsd.org/changeset/base/272808 Log: Fix build with rpcgen using a recent (tested with gcc 4.9.1) GNU cpp Modified: head/include/rpcsvc/nis.x Modified: head/include/rpcsvc/nis.x == --- head/include/rpcsvc/nis.x Thu Oct 9 06:24:06 2014(r272807) +++ head/include/rpcsvc/nis.x Thu Oct 9 06:58:33 2014(r272808) @@ -400,10 +400,7 @@ program NIS_PROG { %#define OARIGHTS(d, n) (((d)-do_armask.do_armask_val+n)-oa_rights) %#define WORLD_DEFAULT (NIS_READ_ACC) %#define GROUP_DEFAULT (NIS_READ_ACC 8) -%#define OWNER_DEFAULT ((NIS_READ_ACC +\ -NIS_MODIFY_ACC +\ -NIS_CREATE_ACC +\ -NIS_DESTROY_ACC) 16) +%#define OWNER_DEFAULT ((NIS_READ_ACC + NIS_MODIFY_ACC + NIS_CREATE_ACC + NIS_DESTROY_ACC) 16) %#define DEFAULT_RIGHTS (WORLD_DEFAULT | GROUP_DEFAULT | OWNER_DEFAULT) % %/* Result manipulation defines ... */ @@ -432,10 +429,8 @@ program NIS_PROG { % * these definitions they take an nis_object *, and an int and return % * a u_char * for Value, and an int for length. % */ -%#define ENTRY_VAL(obj, col) \ - (obj)-EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val -%#define ENTRY_LEN(obj, col) \ - (obj)-EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len +%#define ENTRY_VAL(obj, col) (obj)-EN_data.en_cols.en_cols_val[col].ec_value.ec_value_val +%#define ENTRY_LEN(obj, col) (obj)-EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len % %#ifdef __cplusplus %} ___ 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: r272809 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: delphij Date: Thu Oct 9 07:18:40 2014 New Revision: 272809 URL: https://svnweb.freebsd.org/changeset/base/272809 Log: MFV r272803: Illumos issue: 5175 implement dmu_read_uio_dbuf() to improve cached read performance MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Thu Oct 9 06:58:33 2014(r272808) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Thu Oct 9 07:18:40 2014(r272809) @@ -1021,8 +1021,8 @@ xuio_stat_wbuf_nocopy() } #ifdef _KERNEL -int -dmu_read_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size) +static int +dmu_read_uio_dnode(dnode_t *dn, uio_t *uio, uint64_t size) { dmu_buf_t **dbp; int numbufs, i, err; @@ -1032,8 +1032,8 @@ dmu_read_uio(objset_t *os, uint64_t obje * NB: we could do this block-at-a-time, but it's nice * to be reading in parallel. */ - err = dmu_buf_hold_array(os, object, uio-uio_loffset, size, TRUE, FTAG, - numbufs, dbp); + err = dmu_buf_hold_array_by_dnode(dn, uio-uio_loffset, size, + TRUE, FTAG, numbufs, dbp, 0); if (err) return (err); @@ -1080,6 +1080,58 @@ dmu_read_uio(objset_t *os, uint64_t obje return (err); } +/* + * Read 'size' bytes into the uio buffer. + * From object zdb-db_object. + * Starting at offset uio-uio_loffset. + * + * If the caller already has a dbuf in the target object + * (e.g. its bonus buffer), this routine is faster than dmu_read_uio(), + * because we don't have to find the dnode_t for the object. + */ +int +dmu_read_uio_dbuf(dmu_buf_t *zdb, uio_t *uio, uint64_t size) +{ + dmu_buf_impl_t *db = (dmu_buf_impl_t *)zdb; + dnode_t *dn; + int err; + + if (size == 0) + return (0); + + DB_DNODE_ENTER(db); + dn = DB_DNODE(db); + err = dmu_read_uio_dnode(dn, uio, size); + DB_DNODE_EXIT(db); + + return (err); +} + +/* + * Read 'size' bytes into the uio buffer. + * From the specified object + * Starting at offset uio-uio_loffset. + */ +int +dmu_read_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size) +{ + dnode_t *dn; + int err; + + if (size == 0) + return (0); + + err = dnode_hold(os, object, FTAG, dn); + if (err) + return (err); + + err = dmu_read_uio_dnode(dn, uio, size); + + dnode_rele(dn, FTAG); + + return (err); +} + static int dmu_write_uio_dnode(dnode_t *dn, uio_t *uio, uint64_t size, dmu_tx_t *tx) { @@ -1132,6 +1184,15 @@ dmu_write_uio_dnode(dnode_t *dn, uio_t * return (err); } +/* + * Write 'size' bytes from the uio buffer. + * To object zdb-db_object. + * Starting at offset uio-uio_loffset. + * + * If the caller already has a dbuf in the target object + * (e.g. its bonus buffer), this routine is faster than dmu_write_uio(), + * because we don't have to find the dnode_t for the object. + */ int dmu_write_uio_dbuf(dmu_buf_t *zdb, uio_t *uio, uint64_t size, dmu_tx_t *tx) @@ -1151,6 +1212,11 @@ dmu_write_uio_dbuf(dmu_buf_t *zdb, uio_t return (err); } +/* + * Write 'size' bytes from the uio buffer. + * To the specified object. + * Starting at offset uio-uio_loffset. + */ int dmu_write_uio(objset_t *os, uint64_t object, uio_t *uio, uint64_t size, dmu_tx_t *tx) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Oct 9 06:58:33 2014(r272808) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Thu Oct 9 07:18:40 2014(r272809) @@ -616,6 +616,7 @@ void dmu_write(objset_t *os, uint64_t ob void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size, dmu_tx_t *tx); int dmu_read_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size); +int dmu_read_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size); int dmu_write_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size, dmu_tx_t *tx); int dmu_write_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size, Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Oct 9 06:58:33 2014(r272808) +++
svn commit: r272810 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: delphij Date: Thu Oct 9 07:52:51 2014 New Revision: 272810 URL: https://svnweb.freebsd.org/changeset/base/272810 Log: MFV r272804: Refactor the code and stop restore_object from creating two transactions. Illumos issue: 3693 restore_object uses at least two transactions to restore an object MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Thu Oct 9 07:18:40 2014(r272809) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Thu Oct 9 07:52:51 2014(r272810) @@ -1918,6 +1918,7 @@ dmu_object_info_from_dnode(dnode_t *dn, doi-doi_indirection = dn-dn_nlevels; doi-doi_checksum = dn-dn_checksum; doi-doi_compress = dn-dn_compress; + doi-doi_nblkptr = dn-dn_nblkptr; doi-doi_physical_blocks_512 = (DN_USED_BYTES(dnp) + 256) 9; doi-doi_max_offset = (dn-dn_maxblkid + 1) * dn-dn_datablksz; doi-doi_fill_count = 0; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.cThu Oct 9 07:18:40 2014(r272809) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.cThu Oct 9 07:52:51 2014(r272810) @@ -20,7 +20,8 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. + * Copyright 2014 HybridCluster. All rights reserved. */ #include sys/dmu.h @@ -107,11 +108,9 @@ dmu_object_claim(objset_t *os, uint64_t int dmu_object_reclaim(objset_t *os, uint64_t object, dmu_object_type_t ot, -int blocksize, dmu_object_type_t bonustype, int bonuslen) +int blocksize, dmu_object_type_t bonustype, int bonuslen, dmu_tx_t *tx) { dnode_t *dn; - dmu_tx_t *tx; - int nblkptr; int err; if (object == DMU_META_DNODE_OBJECT) @@ -122,44 +121,9 @@ dmu_object_reclaim(objset_t *os, uint64_ if (err) return (err); - if (dn-dn_type == ot dn-dn_datablksz == blocksize - dn-dn_bonustype == bonustype dn-dn_bonuslen == bonuslen) { - /* nothing is changing, this is a noop */ - dnode_rele(dn, FTAG); - return (0); - } - - if (bonustype == DMU_OT_SA) { - nblkptr = 1; - } else { - nblkptr = 1 + ((DN_MAX_BONUSLEN - bonuslen) SPA_BLKPTRSHIFT); - } - - /* -* If we are losing blkptrs or changing the block size this must -* be a new file instance. We must clear out the previous file -* contents before we can change this type of metadata in the dnode. -*/ - if (dn-dn_nblkptr nblkptr || dn-dn_datablksz != blocksize) { - err = dmu_free_long_range(os, object, 0, DMU_OBJECT_END); - if (err) - goto out; - } - - tx = dmu_tx_create(os); - dmu_tx_hold_bonus(tx, object); - err = dmu_tx_assign(tx, TXG_WAIT); - if (err) { - dmu_tx_abort(tx); - goto out; - } - dnode_reallocate(dn, ot, blocksize, bonustype, bonuslen, tx); - dmu_tx_commit(tx); -out: dnode_rele(dn, FTAG); - return (err); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Oct 9 07:18:40 2014(r272809) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Thu Oct 9 07:52:51 2014(r272810) @@ -24,6 +24,7 @@ * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2012, Martin Matuska m...@freebsd.org. All rights reserved. + * Copyright 2014 HybridCluster. All rights reserved. */ #include sys/dmu.h @@ -1392,12 +1393,25 @@ backup_byteswap(dmu_replay_record_t *drr #undef DO32 } +static inline uint8_t +deduce_nblkptr(dmu_object_type_t bonus_type, uint64_t bonus_size) +{ + if (bonus_type == DMU_OT_SA) { + return (1); + } else { + return (1 + + ((DN_MAX_BONUSLEN - bonus_size) SPA_BLKPTRSHIFT)); + }
svn commit: r272811 - head
Author: bapt Date: Thu Oct 9 09:04:01 2014 New Revision: 272811 URL: https://svnweb.freebsd.org/changeset/base/272811 Log: Add CROSS_TOOLCHAIN macro select pre seeded external toolchain configuration files The goal is to provide pre seeded toolchain configurations withing the ports tree to allow the use of an external toolchain in a simple way: make CROSS_TOOLCHAIN=powerpc64-gcc TARGET=powerpc TARGET_ARCH=powerpc64 buildworld This will look for the external toolchain definition in /usr/local/share/mk/powerpc64-gcc.mk While here add the notion of X_COMPILER_TYPE to the external toolchain framework to allow to deal with differences between gcc and clang in regards of cross building Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 9 07:52:51 2014(r272810) +++ head/Makefile.inc1 Thu Oct 9 09:04:01 2014(r272811) @@ -299,6 +299,10 @@ HMAKE+=PATH=${TMPPATH} METALOG=${METAL WMAKEENV+= MK_CTF=no .endif +.if defined(CROSS_TOOLCHAIN) +LOCALBASE?=/usr/local +.include ${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk +.endif .if defined(CROSS_TOOLCHAIN_PREFIX) CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} @@ -343,10 +347,14 @@ TARGET_ABI= gnueabihf TARGET_ABI=gnueabi .endif .endif +.if ${X_COMPILER_TYPE} == gcc +XFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib +.else TARGET_ABI?= unknown TARGET_TRIPLE?=${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 XFLAGS+= -target ${TARGET_TRIPLE} .endif +.endif WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 DESTDIR=${WORLDTMP} ___ 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: r272812 - in head/sys: cam/ctl dev/iscsi
Author: mav Date: Thu Oct 9 09:12:08 2014 New Revision: 272812 URL: https://svnweb.freebsd.org/changeset/base/272812 Log: Make iSCSI connection close somewhat less aggressive. It allows to push out some final data from the send queue to the socket before its close. In particular, it increases chances for logout response to be delivered to the initiator. Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/dev/iscsi/icl.c head/sys/dev/iscsi/icl.h head/sys/dev/iscsi/iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c == --- head/sys/cam/ctl/ctl_frontend_iscsi.c Thu Oct 9 09:04:01 2014 (r272811) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Thu Oct 9 09:12:08 2014 (r272812) @@ -1135,7 +1135,6 @@ cfiscsi_maintenance_thread(void *arg) * that anymore. We might need to revisit that. */ callout_drain(cs-cs_callout); - icl_conn_shutdown(cs-cs_conn); icl_conn_close(cs-cs_conn); /* Modified: head/sys/dev/iscsi/icl.c == --- head/sys/dev/iscsi/icl.cThu Oct 9 09:04:01 2014(r272811) +++ head/sys/dev/iscsi/icl.cThu Oct 9 09:12:08 2014(r272812) @@ -873,8 +873,6 @@ icl_conn_send_pdus(struct icl_conn *ic, SOCKBUF_UNLOCK(so-so_snd); while (!STAILQ_EMPTY(queue)) { - if (ic-ic_disconnecting) - return; request = STAILQ_FIRST(queue); size = icl_pdu_size(request); if (available size) { @@ -971,11 +969,6 @@ icl_send_thread(void *arg) ic-ic_send_running = true; for (;;) { - if (ic-ic_disconnecting) { - //ICL_DEBUG(terminating); - break; - } - for (;;) { /* * If the local queue is empty, populate it from @@ -1014,6 +1007,11 @@ icl_send_thread(void *arg) break; } + if (ic-ic_disconnecting) { + //ICL_DEBUG(terminating); + break; + } + cv_wait(ic-ic_send_cv, ic-ic_lock); } @@ -1298,21 +1296,6 @@ icl_conn_handoff(struct icl_conn *ic, in } void -icl_conn_shutdown(struct icl_conn *ic) -{ - ICL_CONN_LOCK_ASSERT_NOT(ic); - - ICL_CONN_LOCK(ic); - if (ic-ic_socket == NULL) { - ICL_CONN_UNLOCK(ic); - return; - } - ICL_CONN_UNLOCK(ic); - - soshutdown(ic-ic_socket, SHUT_RDWR); -} - -void icl_conn_close(struct icl_conn *ic) { struct icl_pdu *pdu; Modified: head/sys/dev/iscsi/icl.h == --- head/sys/dev/iscsi/icl.hThu Oct 9 09:04:01 2014(r272811) +++ head/sys/dev/iscsi/icl.hThu Oct 9 09:12:08 2014(r272812) @@ -107,7 +107,6 @@ struct icl_conn { struct icl_conn*icl_conn_new(const char *name, struct mtx *lock); void icl_conn_free(struct icl_conn *ic); inticl_conn_handoff(struct icl_conn *ic, int fd); -void icl_conn_shutdown(struct icl_conn *ic); void icl_conn_close(struct icl_conn *ic); bool icl_conn_connected(struct icl_conn *ic); Modified: head/sys/dev/iscsi/iscsi.c == --- head/sys/dev/iscsi/iscsi.c Thu Oct 9 09:04:01 2014(r272811) +++ head/sys/dev/iscsi/iscsi.c Thu Oct 9 09:12:08 2014(r272812) @@ -367,7 +367,6 @@ static void iscsi_maintenance_thread_reconnect(struct iscsi_session *is) { - icl_conn_shutdown(is-is_conn); icl_conn_close(is-is_conn); ISCSI_SESSION_LOCK(is); ___ 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: r272813 - head
Author: bapt Date: Thu Oct 9 09:46:44 2014 New Revision: 272813 URL: https://svnweb.freebsd.org/changeset/base/272813 Log: Fix build when XCC is defined and X_COMPILER_TYPE is not Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 9 09:12:08 2014(r272812) +++ head/Makefile.inc1 Thu Oct 9 09:46:44 2014(r272813) @@ -347,7 +347,7 @@ TARGET_ABI= gnueabihf TARGET_ABI=gnueabi .endif .endif -.if ${X_COMPILER_TYPE} == gcc +.if defined(X_COMPILER_TYPE) ${X_COMPILER_TYPE} == gcc XFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib .else TARGET_ABI?= unknown ___ 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: r272814 - head
Author: bapt Date: Thu Oct 9 10:47:14 2014 New Revision: 272814 URL: https://svnweb.freebsd.org/changeset/base/272814 Log: Add OBJCOPY to the list of external tools Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 9 09:46:44 2014(r272813) +++ head/Makefile.inc1 Thu Oct 9 10:47:14 2014(r272814) @@ -315,7 +315,7 @@ X${COMPILER}?= ${CROSS_COMPILER_PREFIX}$ X${COMPILER}?= ${${COMPILER}} .endif .endfor -XBINUTILS= AS AR LD NM OBJDUMP RANLIB STRINGS +XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB STRINGS .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}} @@ -326,7 +326,8 @@ X${BINUTIL}?= ${${BINUTIL}} WMAKEENV+= CC=${XCC} ${XFLAGS} CXX=${XCXX} ${XFLAGS} \ CPP=${XCPP} ${XFLAGS} \ AS=${XAS} AR=${XAR} LD=${XLD} NM=${XNM} \ - OBJDUMP=${XOBJDUMP} RANLIB=${XRANLIB} STRINGS=${XSTRINGS} + OBJDUMP=${XOBJDUMP} OBJCOPY=${OBJCOPY} \ + RANLIB=${XRANLIB} STRINGS=${XSTRINGS} .if ${XCC:M/*} XFLAGS=--sysroot=${WORLDTMP} ___ 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: r272815 - head
Author: bapt Date: Thu Oct 9 12:20:00 2014 New Revision: 272815 URL: https://svnweb.freebsd.org/changeset/base/272815 Log: Fix typo Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 9 10:47:14 2014(r272814) +++ head/Makefile.inc1 Thu Oct 9 12:20:00 2014(r272815) @@ -326,7 +326,7 @@ X${BINUTIL}?= ${${BINUTIL}} WMAKEENV+= CC=${XCC} ${XFLAGS} CXX=${XCXX} ${XFLAGS} \ CPP=${XCPP} ${XFLAGS} \ AS=${XAS} AR=${XAR} LD=${XLD} NM=${XNM} \ - OBJDUMP=${XOBJDUMP} OBJCOPY=${OBJCOPY} \ + OBJDUMP=${XOBJDUMP} OBJCOPY=${XOBJCOPY} \ RANLIB=${XRANLIB} STRINGS=${XSTRINGS} .if ${XCC:M/*} ___ 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: r272816 - head/sys/conf
Author: bapt Date: Thu Oct 9 12:35:17 2014 New Revision: 272816 URL: https://svnweb.freebsd.org/changeset/base/272816 Log: Only catch the line from the compiler output where 'version' is a word This allows to build the kernel with gcc 4.9.1 from ports Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh == --- head/sys/conf/newvers.shThu Oct 9 12:20:00 2014(r272815) +++ head/sys/conf/newvers.shThu Oct 9 12:35:17 2014(r272816) @@ -89,7 +89,7 @@ fi touch version v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date` i=`${MAKE:-make} -V KERN_IDENT` -compiler_v=$($(${MAKE:-make} -V CC) -v 21 | grep 'version') +compiler_v=$($(${MAKE:-make} -V CC) -v 21 | grep -w 'version') for dir in /usr/bin /usr/local/bin; do if [ ! -z ${svnversion} ] ; then ___ 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: r272820 - head/etc/devd
Author: hselasky Date: Thu Oct 9 13:58:19 2014 New Revision: 272820 URL: https://svnweb.freebsd.org/changeset/base/272820 Log: Add example devd configuration file for USB printers. Added: head/etc/devd/ulpt.conf (contents, props changed) Modified: head/etc/devd/Makefile Modified: head/etc/devd/Makefile == --- head/etc/devd/Makefile Thu Oct 9 13:36:37 2014(r272819) +++ head/etc/devd/Makefile Thu Oct 9 13:58:19 2014(r272820) @@ -11,7 +11,7 @@ FILES+= asus.conf .endif .if ${MK_USB} != no -FILES+=uath.conf usb.conf +FILES+=uath.conf ulpt.conf usb.conf .endif .if ${MK_ZFS} != no Added: head/etc/devd/ulpt.conf == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/devd/ulpt.conf Thu Oct 9 13:58:19 2014(r272820) @@ -0,0 +1,18 @@ +# +# $FreeBSD$ +# + +# +# Example devd configuration file for USB printers. +# Uncomment the notify rule below to enable. +# +# Generic USB printer devices +#notify 100 { +# match system USB; +# match subsystem INTERFACE; +# match typeATTACH; +# match intclass0x07; +# match intsubclass 0x01; +# match intprotocol (0x01|0x02|0x03); +# action chown root:wheel /dev/$cdev; +#}; ___ 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: r272822 - head/sys/dev/usb
Author: hselasky Date: Thu Oct 9 14:43:43 2014 New Revision: 272822 URL: https://svnweb.freebsd.org/changeset/base/272822 Log: Add sysctl knob to disable port power on a specific USB HUB. You need to reset the USB HUB using usbconfig -d X.Y reset or boot having the setting in /boot/loader.conf before it activates. Modified: head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/usb_hub.c == --- head/sys/dev/usb/usb_hub.c Thu Oct 9 14:33:20 2014(r272821) +++ head/sys/dev/usb/usb_hub.c Thu Oct 9 14:43:43 2014(r272822) @@ -101,6 +101,10 @@ SYSCTL_INT(_hw_usb, OID_AUTO, power_time static int usb_disable_enumeration = 0; SYSCTL_INT(_hw_usb, OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, usb_disable_enumeration, 0, Set to disable all USB device enumeration.); + +static int usb_disable_port_power = 0; +SYSCTL_INT(_hw_usb, OID_AUTO, disable_port_power, CTLFLAG_RWTUN, +usb_disable_port_power, 0, Set to disable all USB port power.); #endif struct uhub_current_state { @@ -119,6 +123,7 @@ struct uhub_softc { struct usb_xfer *sc_xfer[UHUB_N_TRANSFER]; /* interrupt xfer */ #if USB_HAVE_DISABLE_ENUM int sc_disable_enumeration; + int sc_disable_port_power; #endif uint8_t sc_flags; #defineUHUB_FLAG_DID_EXPLORE 0x01 @@ -1406,6 +1411,24 @@ uhub_attach(device_t dev) /* wait with power off for a while */ usb_pause_mtx(NULL, USB_MS_TO_TICKS(USB_POWER_DOWN_TIME)); +#if USB_HAVE_DISABLE_ENUM + /* Add device sysctls */ + + sysctl_ctx = device_get_sysctl_ctx(dev); + sysctl_tree = device_get_sysctl_tree(dev); + + if (sysctl_ctx != NULL sysctl_tree != NULL) { + (void) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, + sc-sc_disable_enumeration, 0, + Set to disable enumeration on this USB HUB.); + + (void) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), + OID_AUTO, disable_port_power, CTLFLAG_RWTUN, + sc-sc_disable_port_power, 0, + Set to disable USB port power on this USB HUB.); + } +#endif /* * To have the best chance of success we do things in the exact same * order as Windoze98. This should not be necessary, but some @@ -1460,13 +1483,27 @@ uhub_attach(device_t dev) removable++; break; } - if (!err) { - /* turn the power on */ - err = usbd_req_set_port_feature(udev, NULL, - portno, UHF_PORT_POWER); + if (err == 0) { +#if USB_HAVE_DISABLE_ENUM + /* check if we should disable USB port power or not */ + if (usb_disable_port_power != 0 || + sc-sc_disable_port_power != 0) { + /* turn the power off */ + DPRINTFN(0, Turning port %d power off\n, portno); + err = usbd_req_clear_port_feature(udev, NULL, + portno, UHF_PORT_POWER); + } else { +#endif + /* turn the power on */ + DPRINTFN(0, Turning port %d power on\n, portno); + err = usbd_req_set_port_feature(udev, NULL, + portno, UHF_PORT_POWER); +#if USB_HAVE_DISABLE_ENUM + } +#endif } - if (err) { - DPRINTFN(0, port %d power on failed, %s\n, + if (err != 0) { + DPRINTFN(0, port %d power on or off failed, %s\n, portno, usbd_errstr(err)); } DPRINTF(turn on port %d power\n, @@ -1490,19 +1527,6 @@ uhub_attach(device_t dev) usbd_set_power_mode(udev, USB_POWER_MODE_SAVE); -#if USB_HAVE_DISABLE_ENUM - /* Add device sysctls */ - - sysctl_ctx = device_get_sysctl_ctx(dev); - sysctl_tree = device_get_sysctl_tree(dev); - - if (sysctl_ctx != NULL sysctl_tree != NULL) { - (void) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), - OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, - sc-sc_disable_enumeration, 0, - Set to disable enumeration on this USB HUB.); - } -#endif return (0); error: ___ 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: r272822 - head/sys/dev/usb
*join free social network clickcare https://www.globallshare.com/en/3076994.html* On Thursday, October 9, 2014 8:13:51 PM UTC+5:30, Hans Petter Selasky wrote: Author: hselasky Date: Thu Oct 9 14:43:43 2014 New Revision: 272822 URL: https://svnweb.freebsd.org/changeset/base/272822 Log: Add sysctl knob to disable port power on a specific USB HUB. You need to reset the USB HUB using usbconfig -d X.Y reset or boot having the setting in /boot/loader.conf before it activates. Modified: head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/usb_hub.c == --- head/sys/dev/usb/usb_hub.cThu Oct 9 14:33:20 2014(r272821) +++ head/sys/dev/usb/usb_hub.cThu Oct 9 14:43:43 2014(r272822) @@ -101,6 +101,10 @@ SYSCTL_INT(_hw_usb, OID_AUTO, power_time static int usb_disable_enumeration = 0; SYSCTL_INT(_hw_usb, OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, usb_disable_enumeration, 0, Set to disable all USB device enumeration.); + +static int usb_disable_port_power = 0; +SYSCTL_INT(_hw_usb, OID_AUTO, disable_port_power, CTLFLAG_RWTUN, +usb_disable_port_power, 0, Set to disable all USB port power.); #endif struct uhub_current_state { @@ -119,6 +123,7 @@ struct uhub_softc { struct usb_xfer *sc_xfer[UHUB_N_TRANSFER];/* interrupt xfer */ #if USB_HAVE_DISABLE_ENUM int sc_disable_enumeration; +int sc_disable_port_power; #endif uint8_tsc_flags; #defineUHUB_FLAG_DID_EXPLORE 0x01 @@ -1406,6 +1411,24 @@ uhub_attach(device_t dev) /* wait with power off for a while */ usb_pause_mtx(NULL, USB_MS_TO_TICKS(USB_POWER_DOWN_TIME)); +#if USB_HAVE_DISABLE_ENUM +/* Add device sysctls */ + +sysctl_ctx = device_get_sysctl_ctx(dev); +sysctl_tree = device_get_sysctl_tree(dev); + +if (sysctl_ctx != NULL sysctl_tree != NULL) { +(void) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), +OID_AUTO, disable_enumeration, CTLFLAG_RWTUN, +sc-sc_disable_enumeration, 0, +Set to disable enumeration on this USB HUB.); + +(void) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), +OID_AUTO, disable_port_power, CTLFLAG_RWTUN, +sc-sc_disable_port_power, 0, +Set to disable USB port power on this USB HUB.); +} +#endif /* * To have the best chance of success we do things in the exact same * order as Windoze98. This should not be necessary, but some @@ -1460,13 +1483,27 @@ uhub_attach(device_t dev) removable++; break; } -if (!err) { -/* turn the power on */ -err = usbd_req_set_port_feature(udev, NULL, -portno, UHF_PORT_POWER); +if (err == 0) { +#if USB_HAVE_DISABLE_ENUM +/* check if we should disable USB port power or not */ +if (usb_disable_port_power != 0 || +sc-sc_disable_port_power != 0) { +/* turn the power off */ +DPRINTFN(0, Turning port %d power off\n, portno); +err = usbd_req_clear_port_feature(udev, NULL, +portno, UHF_PORT_POWER); +} else { +#endif +/* turn the power on */ +DPRINTFN(0, Turning port %d power on\n, portno); +err = usbd_req_set_port_feature(udev, NULL, +portno, UHF_PORT_POWER); +#if USB_HAVE_DISABLE_ENUM +} +#endif } -if (err) { -DPRINTFN(0, port %d power on failed, %s\n, +if (err != 0) { +DPRINTFN(0, port %d power on or off failed, %s\n, portno, usbd_errstr(err)); } DPRINTF(turn on port %d power\n, @@ -1490,19 +1527,6 @@ uhub_attach(device_t dev) usbd_set_power_mode(udev, USB_POWER_MODE_SAVE); -#if USB_HAVE_DISABLE_ENUM -/* Add device sysctls */ - -sysctl_ctx = device_get_sysctl_ctx(dev); -sysctl_tree = device_get_sysctl_tree(dev); - -if (sysctl_ctx != NULL sysctl_tree != NULL) { -(void) SYSCTL_ADD_INT(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), -OID_AUTO,
svn commit: r272823 - in head/sys: compat/freebsd32 conf kern netinet sys
Author: marcel Date: Thu Oct 9 15:16:52 2014 New Revision: 272823 URL: https://svnweb.freebsd.org/changeset/base/272823 Log: Move the SCTP syscalls to netinet with the rest of the SCTP code. The syscalls themselves are tightly coupled with the network stack and therefore should not be in the generic socket code. The following four syscalls have been marked as NOSTD so they can be dynamically registered in sctp_syscalls_init() function: sys_sctp_peeloff sys_sctp_generic_sendmsg sys_sctp_generic_sendmsg_iov sys_sctp_generic_recvmsg The syscalls are also set up to be dynamically registered when COMPAT32 option is configured. As a side effect of moving the SCTP syscalls, getsock_cap needs to be made available outside of the uipc_syscalls.c source file. A proper prototype has been added to the sys/socketvar.h header file. API tests from the SCTP reference implementation have been run to ensure compatibility. (http://code.google.com/p/sctp-refimpl/source/checkout) Submitted by: Steve Kiernan ste...@juniper.net Reviewed by: tuexen, rrs Obtained from:Juniper Networks, Inc. Added: head/sys/netinet/sctp_syscalls.c - copied, changed from r272821, head/sys/kern/uipc_syscalls.c Modified: head/sys/compat/freebsd32/syscalls.master head/sys/conf/files head/sys/kern/syscalls.master head/sys/kern/uipc_syscalls.c head/sys/sys/socketvar.h Modified: head/sys/compat/freebsd32/syscalls.master == --- head/sys/compat/freebsd32/syscalls.master Thu Oct 9 14:43:43 2014 (r272822) +++ head/sys/compat/freebsd32/syscalls.master Thu Oct 9 15:16:52 2014 (r272823) @@ -845,14 +845,14 @@ 468AUE_NULLUNIMPL nosys 469AUE_NULLUNIMPL __getpath_fromfd 470AUE_NULLUNIMPL __getpath_fromaddr -471AUE_NULLNOPROTO { int sctp_peeloff(int sd, uint32_t name); } -472AUE_NULLNOPROTO { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ +471AUE_NULLNOPROTO|NOSTD { int sctp_peeloff(int sd, uint32_t name); } +472AUE_NULLNOPROTO|NOSTD { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ caddr_t to, __socklen_t tolen, \ struct sctp_sndrcvinfo *sinfo, int flags); } -473AUE_NULLNOPROTO { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ +473AUE_NULLNOPROTO|NOSTD { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ caddr_t to, __socklen_t tolen, \ struct sctp_sndrcvinfo *sinfo, int flags); } -474AUE_NULLNOPROTO { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ +474AUE_NULLNOPROTO|NOSTD { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ struct sockaddr * from, __socklen_t *fromlenaddr, \ struct sctp_sndrcvinfo *sinfo, int *msg_flags); } #ifdef PAD64_REQUIRED Modified: head/sys/conf/files == --- head/sys/conf/files Thu Oct 9 14:43:43 2014(r272822) +++ head/sys/conf/files Thu Oct 9 15:16:52 2014(r272823) @@ -3429,6 +3429,7 @@ netinet/sctp_output.c optional inet sct netinet/sctp_pcb.c optional inet sctp | inet6 sctp netinet/sctp_peeloff.c optional inet sctp | inet6 sctp netinet/sctp_ss_functions.coptional inet sctp | inet6 sctp +netinet/sctp_syscalls.coptional inet sctp | inet6 sctp netinet/sctp_sysctl.c optional inet sctp | inet6 sctp netinet/sctp_timer.c optional inet sctp | inet6 sctp netinet/sctp_usrreq.c optional inet sctp | inet6 sctp Modified: head/sys/kern/syscalls.master == --- head/sys/kern/syscalls.master Thu Oct 9 14:43:43 2014 (r272822) +++ head/sys/kern/syscalls.master Thu Oct 9 15:16:52 2014 (r272823) @@ -837,14 +837,14 @@ 468AUE_NULLUNIMPL nosys 469AUE_NULLUNIMPL __getpath_fromfd 470AUE_NULLUNIMPL __getpath_fromaddr -471AUE_NULLSTD { int sctp_peeloff(int sd, uint32_t name); } -472 AUE_NULLSTD{ int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ +471AUE_NULLNOSTD { int sctp_peeloff(int sd, uint32_t name); } +472 AUE_NULLNOSTD { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ caddr_t to, __socklen_t tolen, \ struct sctp_sndrcvinfo *sinfo, int flags); } -473 AUE_NULLSTD{ int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int
svn commit: r272824 - in head/sys: compat/freebsd32 kern sys
Author: marcel Date: Thu Oct 9 15:19:35 2014 New Revision: 272824 URL: https://svnweb.freebsd.org/changeset/base/272824 Log: Regenerate after r272823: Move the SCTP syscalls to netinet with the rest of the SCTP code. Submitted by: Steve Kiernan ste...@juniper.net Reviewed by: tuexen, rrs Obtained from:Juniper Networks, Inc. Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h == --- head/sys/compat/freebsd32/freebsd32_proto.h Thu Oct 9 15:16:52 2014 (r272823) +++ head/sys/compat/freebsd32/freebsd32_proto.h Thu Oct 9 15:19:35 2014 (r272824) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 270691 2014-08-27 01:02:02Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 272823 2014-10-09 15:16:52Z marcel */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h == --- head/sys/compat/freebsd32/freebsd32_syscall.h Thu Oct 9 15:16:52 2014(r272823) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Thu Oct 9 15:19:35 2014(r272824) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 270691 2014-08-27 01:02:02Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 272823 2014-10-09 15:16:52Z marcel */ #defineFREEBSD32_SYS_syscall 0 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c == --- head/sys/compat/freebsd32/freebsd32_syscalls.c Thu Oct 9 15:16:52 2014(r272823) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Thu Oct 9 15:19:35 2014(r272824) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 270691 2014-08-27 01:02:02Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 272823 2014-10-09 15:16:52Z marcel */ const char *freebsd32_syscallnames[] = { Modified: head/sys/compat/freebsd32/freebsd32_sysent.c == --- head/sys/compat/freebsd32/freebsd32_sysent.cThu Oct 9 15:16:52 2014(r272823) +++ head/sys/compat/freebsd32/freebsd32_sysent.cThu Oct 9 15:19:35 2014(r272824) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 270691 2014-08-27 01:02:02Z kib + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 272823 2014-10-09 15:16:52Z marcel */ #include opt_compat.h @@ -518,10 +518,10 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 468 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 469 = __getpath_fromfd */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 470 = __getpath_fromaddr */ - { AS(sctp_peeloff_args), (sy_call_t *)sys_sctp_peeloff, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 471 = sctp_peeloff */ - { AS(sctp_generic_sendmsg_args), (sy_call_t *)sys_sctp_generic_sendmsg, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 472 = sctp_generic_sendmsg */ - { AS(sctp_generic_sendmsg_iov_args), (sy_call_t *)sys_sctp_generic_sendmsg_iov, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 473 = sctp_generic_sendmsg_iov */ - { AS(sctp_generic_recvmsg_args), (sy_call_t *)sys_sctp_generic_recvmsg, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 474 = sctp_generic_recvmsg */ + { AS(sctp_peeloff_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 471 = sctp_peeloff */ + { AS(sctp_generic_sendmsg_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 472 = sctp_generic_sendmsg */ + { AS(sctp_generic_sendmsg_iov_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 473 = sctp_generic_sendmsg_iov */ + { AS(sctp_generic_recvmsg_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 474 = sctp_generic_recvmsg */
svn commit: r272825 - head/sys/ufs/ufs
Author: bapt Date: Thu Oct 9 15:26:22 2014 New Revision: 272825 URL: https://svnweb.freebsd.org/changeset/base/272825 Log: Use offsetof() from sys/types.h instead of a custom one This fixes build with recent gcc versions Modified: head/sys/ufs/ufs/dir.h Modified: head/sys/ufs/ufs/dir.h == --- head/sys/ufs/ufs/dir.h Thu Oct 9 15:19:35 2014(r272824) +++ head/sys/ufs/ufs/dir.h Thu Oct 9 15:26:22 2014(r272825) @@ -110,7 +110,7 @@ struct direct { * */ #defineDIRECTSIZ(namlen) \ - (((uintptr_t)((struct direct *)0)-d_name +\ + ((offsetof(struct direct, d_name) + \ ((namlen)+1)*sizeof(((struct direct *)0)-d_name[0]) + 3) ~3) #if (BYTE_ORDER == LITTLE_ENDIAN) #defineDIRSIZ(oldfmt, dp) \ ___ 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: r272825 - head/sys/ufs/ufs
On Thu, Oct 09, 2014 at 03:26:23PM +, Baptiste Daroussin wrote: Author: bapt Date: Thu Oct 9 15:26:22 2014 New Revision: 272825 URL: https://svnweb.freebsd.org/changeset/base/272825 Log: Use offsetof() from sys/types.h instead of a custom one This fixes build with recent gcc versions I forgot: Reviewed by: kan, imp Differential revision: https://reviews.freebsd.org/D925 regards, Bapt pgpgyJip4yXsh.pgp Description: PGP signature
svn commit: r272827 - head
Author: bapt Date: Thu Oct 9 15:52:01 2014 New Revision: 272827 URL: https://svnweb.freebsd.org/changeset/base/272827 Log: Add size(1) to the cross build toolchain Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 9 15:35:28 2014(r272826) +++ head/Makefile.inc1 Thu Oct 9 15:52:01 2014(r272827) @@ -315,7 +315,7 @@ X${COMPILER}?= ${CROSS_COMPILER_PREFIX}$ X${COMPILER}?= ${${COMPILER}} .endif .endfor -XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB STRINGS +XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB SIZE STRINGS .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}} @@ -327,7 +327,8 @@ WMAKEENV+= CC=${XCC} ${XFLAGS} CXX=${ CPP=${XCPP} ${XFLAGS} \ AS=${XAS} AR=${XAR} LD=${XLD} NM=${XNM} \ OBJDUMP=${XOBJDUMP} OBJCOPY=${XOBJCOPY} \ - RANLIB=${XRANLIB} STRINGS=${XSTRINGS} + RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ + SIZE=${XSIZE} .if ${XCC:M/*} XFLAGS=--sysroot=${WORLDTMP} ___ 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: r272829 - head/sys/conf
Author: imp Date: Thu Oct 9 16:39:10 2014 New Revision: 272829 URL: https://svnweb.freebsd.org/changeset/base/272829 Log: When building with a newer GCC, suppress some warnings for the moment. The kernel isn't ready for them without a lot of work. Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Thu Oct 9 16:12:01 2014(r272828) +++ head/sys/conf/kern.mk Thu Oct 9 16:39:10 2014(r272829) @@ -33,7 +33,13 @@ CWARNEXTRA?= -Wno-error-tautological-com .endif .if ${COMPILER_TYPE} == gcc ${COMPILER_VERSION} = 40300 -CWARNEXTRA?= -Wno-inline +# Catch-all for all the things that are in our tree, but for which we're +# not yet ready for this compiler. Note: we likely only really support +# building with gcc 4.8 and newer. Nothing older has been tested. +CWARNEXTRA?= -Wno-error=inline -Wno-error=enum-compare -Wno-error=unused-but-set-variable \ + -Wno-error=aggressive-loop-optimizations -Wno-error=maybe-uninitialized \ + -Wno-error=unused-local-typedefs -Wno-error=array-bounds -Wno-error=address \ + -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes .endif # External compilers may not support our format extensions. Allow them ___ 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: r272830 - head/lib/libcrypt
Author: des Date: Thu Oct 9 16:45:11 2014 New Revision: 272830 URL: https://svnweb.freebsd.org/changeset/base/272830 Log: Change the hardcoded default back from SHA512 to DES. PR: 192277 MFC after:3 days Modified: head/lib/libcrypt/crypt.c Modified: head/lib/libcrypt/crypt.c == --- head/lib/libcrypt/crypt.c Thu Oct 9 16:39:10 2014(r272829) +++ head/lib/libcrypt/crypt.c Thu Oct 9 16:45:11 2014(r272830) @@ -37,24 +37,26 @@ __FBSDID($FreeBSD$); #include crypt.h /* - * List of supported crypt(3) formats. The first element in the list will - * be the default. + * List of supported crypt(3) formats. + * + * The default algorithm is the last entry in the list (second-to-last + * array element since the last is a sentinel). The reason for placing + * the default last rather than first is that DES needs to be at the + * bottom for the algorithm guessing logic in crypt(3) to work correctly, + * and it needs to be the default for backward compatibility. */ static const struct crypt_format { const char *const name; char *(*const func)(const char *, const char *); const char *const magic; } crypt_formats[] = { - /* default format */ - { sha512, crypt_sha512, $6$ }, - - /* other supported formats */ { md5,crypt_md5, $1$ }, #ifdef HAS_BLOWFISH { blf,crypt_blowfish, $2}, #endif { nth,crypt_nthash, $3$ }, { sha256, crypt_sha256, $5$ }, + { sha512, crypt_sha512, $6$ }, #ifdef HAS_DES { des,crypt_des, _ }, #endif @@ -63,7 +65,8 @@ static const struct crypt_format { { NULL, NULL, NULL} }; -static const struct crypt_format *crypt_format = crypt_formats[0]; +static const struct crypt_format *crypt_format = +crypt_formats[(sizeof crypt_formats / sizeof *crypt_formats) - 2]; #define DES_SALT_ALPHABET \ ./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ___ 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: r272831 - head/sys/sys
Author: adrian Date: Thu Oct 9 16:48:42 2014 New Revision: 272831 URL: https://svnweb.freebsd.org/changeset/base/272831 Log: Shuffle things. Suggested by: jhb Differential Revision:D906 Sponsored by: Norse Corp Modified: head/sys/sys/bus.h Modified: head/sys/sys/bus.h == --- head/sys/sys/bus.h Thu Oct 9 16:45:11 2014(r272830) +++ head/sys/sys/bus.h Thu Oct 9 16:48:42 2014(r272831) @@ -327,6 +327,7 @@ int bus_generic_detach(device_t dev); void bus_generic_driver_added(device_t dev, driver_t *driver); bus_dma_tag_t bus_generic_get_dma_tag(device_t dev, device_t child); +intbus_generic_get_domain(device_t dev, device_t child, int *domain); struct resource_list * bus_generic_get_resource_list (device_t, device_t); void bus_generic_new_pass(device_t dev); @@ -365,8 +366,6 @@ int bus_generic_teardown_intr(device_t d intbus_generic_write_ivar(device_t dev, device_t child, int which, uintptr_t value); -intbus_generic_get_domain(device_t dev, device_t child, int *domain); - /* * Wrapper functions for the BUS_*_RESOURCE methods to make client code * a little simpler. ___ 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: r272832 - head/sys/ufs/ufs
Author: bapt Date: Thu Oct 9 17:26:29 2014 New Revision: 272832 URL: https://svnweb.freebsd.org/changeset/base/272832 Log: Backout r272825 every useland usage of ufs/ufs/dir.h are now broken with that change Modified: head/sys/ufs/ufs/dir.h Modified: head/sys/ufs/ufs/dir.h == --- head/sys/ufs/ufs/dir.h Thu Oct 9 16:48:42 2014(r272831) +++ head/sys/ufs/ufs/dir.h Thu Oct 9 17:26:29 2014(r272832) @@ -110,7 +110,7 @@ struct direct { * */ #defineDIRECTSIZ(namlen) \ - ((offsetof(struct direct, d_name) + \ + (((uintptr_t)((struct direct *)0)-d_name +\ ((namlen)+1)*sizeof(((struct direct *)0)-d_name[0]) + 3) ~3) #if (BYTE_ORDER == LITTLE_ENDIAN) #defineDIRSIZ(oldfmt, dp) \ ___ 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: r272833 - head/usr.sbin/pw
Author: des Date: Thu Oct 9 17:39:11 2014 New Revision: 272833 URL: https://svnweb.freebsd.org/changeset/base/272833 Log: Two more places where login_setcryptfmt() defaults to MD5 were missed in r252688. MFC after:3 days Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c == --- head/usr.sbin/pw/pw_user.c Thu Oct 9 17:26:29 2014(r272832) +++ head/usr.sbin/pw/pw_user.c Thu Oct 9 17:39:11 2014(r272833) @@ -615,7 +615,7 @@ pw_user(struct userconf * cnf, int mode, pwd-pw_dir = pw_homepolicy(cnf, args, pwd-pw_name); pwd-pw_shell = pw_shellpolicy(cnf, args, NULL); lc = login_getpwclass(pwd); - if (lc == NULL || login_setcryptfmt(lc, md5, NULL) == NULL) + if (lc == NULL || login_setcryptfmt(lc, sha512, NULL) == NULL) warn(setting crypt(3) format); login_close(lc); pwd-pw_passwd = pw_password(cnf, args, pwd-pw_name); @@ -690,7 +690,7 @@ pw_user(struct userconf * cnf, int mode, } else { lc = login_getpwclass(pwd); if (lc == NULL || - login_setcryptfmt(lc, md5, NULL) == NULL) + login_setcryptfmt(lc, sha512, NULL) == NULL) warn(setting crypt(3) format); login_close(lc); pwd-pw_passwd = pw_pwcrypt(line); ___ 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: r272834 - head/cddl/contrib/opensolaris/cmd/lockstat
Author: markj Date: Thu Oct 9 17:45:58 2014 New Revision: 272834 URL: https://svnweb.freebsd.org/changeset/base/272834 Log: Document the CPU+Pri_Class column rather than CPU+PRI, as the latter isn't used or implemented on FreeBSD. Reported by: kmacy Reviewed by: kmacy, rpaulo MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Modified: head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 == --- head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Thu Oct 9 17:39:11 2014(r272833) +++ head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 Thu Oct 9 17:45:58 2014(r272834) @@ -21,7 +21,7 @@ .\ .\ $FreeBSD$ .\ -.Dd October 24, 2013 +.Dd October 8, 2014 .Dt LOCKSTAT 1 .Os .Sh NAME @@ -238,10 +238,11 @@ Average duration of the events in nanose For the profiling event, duration means interrupt latency. .It Lock Address of the lock; displayed symbolically if possible. -.It CPU+PIL -CPU plus processor interrupt level (PIL). -For example, if CPU 4 is interrupted while at PIL 6, this will be reported as -cpu[4]+6. +.It CPU+Pri_Class +CPU plus the priority class of the interrupted thread. +For example, if CPU 4 is interrupted while running a timeshare thread, this +will be reported as +.Ql cpu[4]+TShar . .It Caller Address of the caller; displayed symbolically if possible. .El ___ 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: r272800 - head/sys/x86/acpica
On Thu, Oct 09, 2014 at 05:34:29AM +, Adrian Chadd wrote: Author: adrian Date: Thu Oct 9 05:34:28 2014 New Revision: 272800 URL: https://svnweb.freebsd.org/changeset/base/272800 Log: Missing from previous commit - keep the VM domain - PXM mapping array and use it to map PXM - VM domain when needed. Differential Revision: D906 Reviewed by:jhb Modified: head/sys/x86/acpica/srat.c Modified: head/sys/x86/acpica/srat.c == --- head/sys/x86/acpica/srat.cThu Oct 9 05:33:25 2014 (r272799) +++ head/sys/x86/acpica/srat.cThu Oct 9 05:34:28 2014 (r272800) @@ -62,6 +62,8 @@ int num_mem; static ACPI_TABLE_SRAT *srat; static vm_paddr_t srat_physaddr; +static int vm_domains[VM_PHYSSEG_MAX]; + static void srat_walk_table(acpi_subtable_handler *handler, void *arg); /* @@ -247,7 +249,6 @@ check_phys_avail(void) static int renumber_domains(void) { - int domains[VM_PHYSSEG_MAX]; int i, j, slot; /* Enumerate all the domains. */ @@ -255,17 +256,17 @@ renumber_domains(void) for (i = 0; i num_mem; i++) { /* See if this domain is already known. */ for (j = 0; j vm_ndomains; j++) { - if (domains[j] = mem_info[i].domain) + if (vm_domains[j] = mem_info[i].domain) break; } - if (j vm_ndomains domains[j] == mem_info[i].domain) + if (j vm_ndomains vm_domains[j] == mem_info[i].domain) continue; /* Insert the new domain at slot 'j'. */ slot = j; for (j = vm_ndomains; j slot; j--) - domains[j] = domains[j - 1]; - domains[slot] = mem_info[i].domain; + vm_domains[j] = vm_domains[j - 1]; + vm_domains[slot] = mem_info[i].domain; vm_ndomains++; if (vm_ndomains MAXMEMDOM) { vm_ndomains = 1; @@ -280,15 +281,15 @@ renumber_domains(void) * If the domain is already the right value, no need * to renumber. */ - if (domains[i] == i) + if (vm_domains[i] == i) continue; /* Walk the cpu[] and mem_info[] arrays to renumber. */ for (j = 0; j num_mem; j++) - if (mem_info[j].domain == domains[i]) + if (mem_info[j].domain == vm_domains[i]) mem_info[j].domain = i; for (j = 0; j = MAX_APIC_ID; j++) - if (cpus[j].enabled cpus[j].domain == domains[i]) + if (cpus[j].enabled cpus[j].domain == vm_domains[i]) cpus[j].domain = i; } KASSERT(vm_ndomains 0, @@ -368,4 +369,23 @@ srat_set_cpus(void *dummy) } } SYSINIT(srat_set_cpus, SI_SUB_CPU, SI_ORDER_ANY, srat_set_cpus, NULL); + +/* + * Map a _PXM value to a VM domain ID. + * + * Returns the domain ID, or -1 if no domain ID was found. + */ +int +acpi_map_pxm_to_vm_domainid(int pxm) +{ + int i; + + for (i = 0; i vm_ndomains; i++) { + if (vm_domains[i] == pxm) + return (i); + } + + return (-1); +} + #endif /* MAXMEMDOM 1 */ I do not like it. Sorry for not looking at the web thing, I have very little time. It never was an intention that one proximity domain reported by ACPI was mapped to single VM domain. VM could split domains (in terms of vm_domains) further for other reasons. Main motivation is that there is 1:1 relations between domain/page queues/page queues locks/pagedaemons. I have patches in WIP stage which split firmware proximity domains further, to decrease congestion on the page queue locks. I wrote about this in the pgsql performance report. The short version is that there is/will be N:1 relation between VM domains and proximity domains (which is reported by ACPI for devices). ___ 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: r272836 - head/sys/fs/autofs
Author: trasz Date: Thu Oct 9 18:49:58 2014 New Revision: 272836 URL: https://svnweb.freebsd.org/changeset/base/272836 Log: Remove remnants of some cleanup; no functional changes. Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/autofs/autofs_vnops.c Modified: head/sys/fs/autofs/autofs_vnops.c == --- head/sys/fs/autofs/autofs_vnops.c Thu Oct 9 18:03:12 2014 (r272835) +++ head/sys/fs/autofs/autofs_vnops.c Thu Oct 9 18:49:58 2014 (r272836) @@ -459,8 +459,8 @@ autofs_readdir(struct vop_readdir_args * static int autofs_reclaim(struct vop_reclaim_args *ap) { - struct vnode *vp = ap-a_vp; - struct autofs_node *anp = vp-v_data; + struct vnode *vp; + struct autofs_node *anp; vp = ap-a_vp; anp = vp-v_data; ___ 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: r272838 - head/usr.sbin/bhyve
Author: neel Date: Thu Oct 9 19:02:32 2014 New Revision: 272838 URL: https://svnweb.freebsd.org/changeset/base/272838 Log: iasl(8) expects integer fields in data tables to be specified as hexadecimal values. Therefore the bit width of the PM Timer Block was actually being interpreted as 50-bits instead of the expected 32-bit. This eliminates an error message emitted by a Linux 3.17 guest during boot: Invalid length for FADT/PmTimerBlock: 50, using default 32 Reviewed by: grehan MFC after:1 week Modified: head/usr.sbin/bhyve/acpi.c Modified: head/usr.sbin/bhyve/acpi.c == --- head/usr.sbin/bhyve/acpi.c Thu Oct 9 18:50:37 2014(r272837) +++ head/usr.sbin/bhyve/acpi.c Thu Oct 9 19:02:32 2014(r272838) @@ -492,7 +492,7 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, [0012]\t\tPM Timer Block : [Generic Address Structure]\n); EFPRINTF(fp, [0001]\t\tSpace ID : 01 [SystemIO]\n); - EFPRINTF(fp, [0001]\t\tBit Width : 32\n); + EFPRINTF(fp, [0001]\t\tBit Width : 20\n); EFPRINTF(fp, [0001]\t\tBit Offset : 00\n); EFPRINTF(fp, [0001]\t\tEncoded Access Width : 03 [DWord Access:32]\n); @@ -502,7 +502,7 @@ basl_fwrite_fadt(FILE *fp) EFPRINTF(fp, [0012]\t\tGPE0 Block : [Generic Address Structure]\n); EFPRINTF(fp, [0001]\t\tSpace ID : 01 [SystemIO]\n); - EFPRINTF(fp, [0001]\t\tBit Width : 80\n); + EFPRINTF(fp, [0001]\t\tBit Width : 00\n); EFPRINTF(fp, [0001]\t\tBit Offset : 00\n); EFPRINTF(fp, [0001]\t\tEncoded Access Width : 01 [Byte Access:8]\n); EFPRINTF(fp, [0008]\t\tAddress : \n); ___ 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: r272839 - in head: sys/amd64/vmm/intel sys/x86/include usr.sbin/bhyve
Author: neel Date: Thu Oct 9 19:13:33 2014 New Revision: 272839 URL: https://svnweb.freebsd.org/changeset/base/272839 Log: Support Intel-specific MSRs that are accessed when booting up a linux in bhyve: - MSR_PLATFORM_INFO - MSR_TURBO_RATIO_LIMITx - MSR_RAPL_POWER_UNIT Reviewed by: grehan MFC after:1 week Modified: head/sys/amd64/vmm/intel/vmx_msr.c head/sys/x86/include/specialreg.h head/usr.sbin/bhyve/xmsr.c Modified: head/sys/amd64/vmm/intel/vmx_msr.c == --- head/sys/amd64/vmm/intel/vmx_msr.c Thu Oct 9 19:02:32 2014 (r272838) +++ head/sys/amd64/vmm/intel/vmx_msr.c Thu Oct 9 19:13:33 2014 (r272839) @@ -33,7 +33,9 @@ __FBSDID($FreeBSD$); #include sys/systm.h #include sys/cpuset.h +#include machine/clock.h #include machine/cpufunc.h +#include machine/md_var.h #include machine/specialreg.h #include machine/vmm.h @@ -176,11 +178,64 @@ msr_bitmap_change_access(char *bitmap, u } static uint64_t misc_enable; +static uint64_t platform_info; +static uint64_t turbo_ratio_limit; static uint64_t host_msrs[GUEST_MSR_NUM]; +static bool +nehalem_cpu(void) +{ + u_int family, model; + + /* +* The family:model numbers belonging to the Nehalem microarchitecture +* are documented in Section 35.5, Intel SDM dated Feb 2014. +*/ + family = CPUID_TO_FAMILY(cpu_id); + model = CPUID_TO_MODEL(cpu_id); + if (family == 0x6) { + switch (model) { + case 0x1A: + case 0x1E: + case 0x1F: + case 0x2E: + return (true); + default: + break; + } + } + return (false); +} + +static bool +westmere_cpu(void) +{ + u_int family, model; + + /* +* The family:model numbers belonging to the Westmere microarchitecture +* are documented in Section 35.6, Intel SDM dated Feb 2014. +*/ + family = CPUID_TO_FAMILY(cpu_id); + model = CPUID_TO_MODEL(cpu_id); + if (family == 0x6) { + switch (model) { + case 0x25: + case 0x2C: + return (true); + default: + break; + } + } + return (false); +} + void vmx_msr_init(void) { + uint64_t bus_freq, ratio; + int i; + /* * It is safe to cache the values of the following MSRs because * they don't change based on curcpu, curproc or curthread. @@ -204,6 +259,44 @@ vmx_msr_init(void) */ misc_enable |= (1 12) | (1 11); misc_enable = ~((1 18) | (1 16)); + + if (nehalem_cpu() || westmere_cpu()) + bus_freq = 1; /* 133Mhz */ + else + bus_freq = 1; /* 100Mhz */ + + /* +* XXXtime +* The ratio should really be based on the virtual TSC frequency as +* opposed to the host TSC. +*/ + ratio = (tsc_freq / bus_freq) 0xff; + + /* +* The register definition is based on the micro-architecture +* but the following bits are always the same: +* [15:8] Maximum Non-Turbo Ratio +* [28]Programmable Ratio Limit for Turbo Mode +* [29]Programmable TDC-TDP Limit for Turbo Mode +* [47:40] Maximum Efficiency Ratio +* +* The other bits can be safely set to 0 on all +* micro-architectures up to Haswell. +*/ + platform_info = (ratio 8) | (ratio 40); + + /* +* The number of valid bits in the MSR_TURBO_RATIO_LIMITx register is +* dependent on the maximum cores per package supported by the micro- +* architecture. For e.g., Westmere supports 6 cores per package and +* uses the low 48 bits. Sandybridge support 8 cores per package and +* uses up all 64 bits. +* +* However, the unused bits are reserved so we pretend that all bits +* in this MSR are valid. +*/ + for (i = 0; i 8; i++) + turbo_ratio_limit = (turbo_ratio_limit 8) | ratio; } void @@ -266,6 +359,13 @@ vmx_rdmsr(struct vmx *vmx, int vcpuid, u case MSR_IA32_MISC_ENABLE: *val = misc_enable; break; + case MSR_PLATFORM_INFO: + *val = platform_info; + break; + case MSR_TURBO_RATIO_LIMIT: + case MSR_TURBO_RATIO_LIMIT1: + *val = turbo_ratio_limit; + break; default: error = EINVAL; break; Modified: head/sys/x86/include/specialreg.h == --- head/sys/x86/include/specialreg.h Thu Oct 9 19:02:32 2014 (r272838) +++ head/sys/x86/include/specialreg.h Thu Oct 9 19:13:33
svn commit: r272840 - in head: sbin/ipfw sys/conf sys/modules/ipfw sys/netgraph sys/netinet sys/netpfil/ipfw
Author: melifaro Date: Thu Oct 9 19:32:35 2014 New Revision: 272840 URL: https://svnweb.freebsd.org/changeset/base/272840 Log: Merge projects/ipfw to HEAD. Main user-visible changes are related to tables: * Tables are now identified by names, not numbers. There can be up to 65k tables with up to 63-byte long names. * Tables are now set-aware (default off), so you can switch/move them atomically with rules. * More functionality is supported (swap, lock, limits, user-level lookup, batched add/del) by generic table code. * New table types are added (flow) so you can match multiple packet fields at once. * Ability to add different type of lookup algorithms for particular table type has been added. * New table algorithms are added (cidr:hash, iface:array, number:array and flow:hash) to make certain types of lookup more effective. * Table value are now capable of holding multiple data fields for different tablearg users Performance changes: * Main ipfw lock was converted to rmlock * Rule counters were separated from rule itself and made per-cpu. * Radix table entries fits into 128 bytes * struct ip_fw is now more compact so more rules will fit into 64 bytes * interface tables uses array of existing ifindexes for faster match ABI changes: All functionality supported by old ipfw(8) remains functional. Old new binaries can work together with the following restrictions: * Tables named other than ^\d+$ are shown as table(65535) in ruleset in old binaries Internal changes:. Changing table ids to numbers resulted in format modification for most sockopt codes. Old sopt format was compact, but very hard to extend (no versioning, inability to add more opcodes), so * All relevant opcodes were converted to TLV-based versioned IP_FW3-based codes. * The remaining opcodes were also converted to be able to eliminate all older opcodes at once * All IP_FW3 handlers uses special API instead of calling sooptcopy* directly to ease adding another communication methods * struct ip_fw is now different for kernel and userland * tablearg value has been changed to 0 to ease future extensions * table values are now indexes in special value array which holds extended data for given index * Batched add/delete has been added to tables code * Most changes has been done to permit batched rule addition. * interface tracking API has been added (started on demand) to permit effective interface tables operations * O(1) skipto cache, currently turned off by default at compile-time (eats 512K). * Several steps has been made towards making libipfw: * most of new functions were separated into parse/prepare/show and actuall-do-stuff pieces (already merged). * there are separate functions for parsing text string into struct ip_fw and printing struct ip_fw to supplied buffer (already merged). * Probably some more less significant/forgotten features MFC after:1 month Sponsored by: Yandex LLC Added: head/sbin/ipfw/tables.c - copied unchanged from r272837, projects/ipfw/sbin/ipfw/tables.c head/sys/netpfil/ipfw/ip_fw_iface.c - copied unchanged from r272837, projects/ipfw/sys/netpfil/ipfw/ip_fw_iface.c head/sys/netpfil/ipfw/ip_fw_table.h (contents, props changed) - copied, changed from r272837, projects/ipfw/sys/netpfil/ipfw/ip_fw_table.h head/sys/netpfil/ipfw/ip_fw_table_algo.c (contents, props changed) - copied, changed from r272837, projects/ipfw/sys/netpfil/ipfw/ip_fw_table_algo.c head/sys/netpfil/ipfw/ip_fw_table_value.c - copied unchanged from r272837, projects/ipfw/sys/netpfil/ipfw/ip_fw_table_value.c Modified: head/sbin/ipfw/Makefile head/sbin/ipfw/ipfw.8 head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sbin/ipfw/main.c head/sbin/ipfw/nat.c head/sys/conf/files head/sys/modules/ipfw/Makefile head/sys/netgraph/ng_ipfw.c head/sys/netinet/ip_fw.h head/sys/netpfil/ipfw/ip_dummynet.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_dynamic.c head/sys/netpfil/ipfw/ip_fw_log.c head/sys/netpfil/ipfw/ip_fw_nat.c head/sys/netpfil/ipfw/ip_fw_private.h head/sys/netpfil/ipfw/ip_fw_sockopt.c head/sys/netpfil/ipfw/ip_fw_table.c Directory Properties: head/ (props changed) head/sbin/ (props changed) head/sbin/ipfw/ (props changed) head/sys/ (props changed) head/sys/conf/ (props changed) Modified: head/sbin/ipfw/Makefile == --- head/sbin/ipfw/Makefile Thu Oct 9 19:13:33 2014(r272839) +++ head/sbin/ipfw/Makefile Thu Oct 9 19:32:35 2014(r272840) @@ -3,7 +3,7 @@ .include src.opts.mk PROG= ipfw -SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c +SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c tables.c WARNS?=2 .if ${MK_PF} != no Modified: head/sbin/ipfw/ipfw.8
Re: svn commit: r272800 - head/sys/x86/acpica
On 9 October 2014 11:23, Konstantin Belousov kostik...@gmail.com wrote: I do not like it. Sorry for not looking at the web thing, I have very little time. It never was an intention that one proximity domain reported by ACPI was mapped to single VM domain. VM could split domains (in terms of vm_domains) further for other reasons. Main motivation is that there is 1:1 relations between domain/page queues/page queues locks/pagedaemons. I have patches in WIP stage which split firmware proximity domains further, to decrease congestion on the page queue locks. I wrote about this in the pgsql performance report. The short version is that there is/will be N:1 relation between VM domains and proximity domains (which is reported by ACPI for devices). Hi, Well, we'll have to come up with an alternate design for all of this then. If we're going to actively define VM domains to be more than 1:1 VM domain to proximity domain then we're going to have to introduce proximity domains as a separate construct to the VM/NUMA system. (This is all fallout from this stuff not really being well defined and multiple people having differing ideas of what things may mean.) So let's flesh out what that's going to look like so we can mutate this interface and the general NUMA side of things into something that's useful. It may be enough to store the PXM map (renumbered to origin from 0 and be non-sparse) and then have a different mapping from PXM to VM domain. -a ___ 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: r272840 - in head: sbin/ipfw sys/conf sys/modules/ipfw sys/netgraph sys/netinet sys/netpfil/ipfw
On Oct 9, 2014, at 12:32, Alexander V. Chernikov melif...@freebsd.org wrote: Author: melifaro Date: Thu Oct 9 19:32:35 2014 New Revision: 272840 URL: https://svnweb.freebsd.org/changeset/base/272840 ... MFC after:1 month Should this be MFCed? Does it break existing usability? Sponsored by:Yandex LLC Relnotes: YES ___ 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: r272841 - head/sys/netinet
Author: tuexen Date: Thu Oct 9 20:08:12 2014 New Revision: 272841 URL: https://svnweb.freebsd.org/changeset/base/272841 Log: Ensure that the flags field of sctp_tmit_chunks is initialized. Thanks to Peter Bostroem from Google for reporting the issue. MFC after: 3 days Modified: head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_input.c == --- head/sys/netinet/sctp_input.c Thu Oct 9 19:32:35 2014 (r272840) +++ head/sys/netinet/sctp_input.c Thu Oct 9 20:08:12 2014 (r272841) @@ -4069,8 +4069,10 @@ __attribute__((noinline)) if (chk == NULL) { return (ret_code); } + chk-copy_by_ref = 0; chk-rec.chunk_id.id = SCTP_STREAM_RESET; chk-rec.chunk_id.can_take_data = 0; + chk-flags = 0; chk-asoc = stcb-asoc; chk-no_fr_allowed = 0; chk-book_size = chk-send_size = sizeof(struct sctp_chunkhdr); Modified: head/sys/netinet/sctp_output.c == --- head/sys/netinet/sctp_output.c Thu Oct 9 19:32:35 2014 (r272840) +++ head/sys/netinet/sctp_output.c Thu Oct 9 20:08:12 2014 (r272841) @@ -8925,16 +8925,11 @@ sctp_queue_op_err(struct sctp_tcb *stcb, return; } chk-send_size = 0; - mat = op_err; - while (mat != NULL) { + for (mat = op_err; mat != NULL; mat = SCTP_BUF_NEXT(mat)) { chk-send_size += SCTP_BUF_LEN(mat); - mat = SCTP_BUF_NEXT(mat); } - chk-rec.chunk_id.id = SCTP_OPERATION_ERROR; - chk-rec.chunk_id.can_take_data = 1; chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; - chk-flags = 0; chk-asoc = stcb-asoc; chk-data = op_err; chk-whoTo = NULL; @@ -9022,12 +9017,12 @@ sctp_send_cookie_echo(struct mbuf *m, return (-5); } chk-copy_by_ref = 0; - chk-send_size = plen; chk-rec.chunk_id.id = SCTP_COOKIE_ECHO; chk-rec.chunk_id.can_take_data = 0; + chk-flags = CHUNK_FLAGS_FRAGMENT_OK; + chk-send_size = plen; chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; - chk-flags = CHUNK_FLAGS_FRAGMENT_OK; chk-asoc = stcb-asoc; chk-data = cookie; chk-whoTo = net; @@ -9090,12 +9085,12 @@ sctp_send_heartbeat_ack(struct sctp_tcb return; } chk-copy_by_ref = 0; - chk-send_size = chk_length; chk-rec.chunk_id.id = SCTP_HEARTBEAT_ACK; chk-rec.chunk_id.can_take_data = 1; + chk-flags = 0; + chk-send_size = chk_length; chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; - chk-flags = 0; chk-asoc = stcb-asoc; chk-data = outchain; chk-whoTo = net; @@ -9127,12 +9122,12 @@ sctp_send_cookie_ack(struct sctp_tcb *st return; } chk-copy_by_ref = 0; - chk-send_size = sizeof(struct sctp_chunkhdr); chk-rec.chunk_id.id = SCTP_COOKIE_ACK; chk-rec.chunk_id.can_take_data = 1; + chk-flags = 0; + chk-send_size = sizeof(struct sctp_chunkhdr); chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; - chk-flags = 0; chk-asoc = stcb-asoc; chk-data = cookie_ack; if (chk-asoc-last_control_chunk_from != NULL) { @@ -9173,9 +9168,10 @@ sctp_send_shutdown_ack(struct sctp_tcb * return; } chk-copy_by_ref = 0; - chk-send_size = sizeof(struct sctp_chunkhdr); chk-rec.chunk_id.id = SCTP_SHUTDOWN_ACK; chk-rec.chunk_id.can_take_data = 1; + chk-flags = 0; + chk-send_size = sizeof(struct sctp_chunkhdr); chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; chk-flags = 0; @@ -9216,9 +9212,10 @@ sctp_send_shutdown(struct sctp_tcb *stcb return; } chk-copy_by_ref = 0; - chk-send_size = sizeof(struct sctp_shutdown_chunk); chk-rec.chunk_id.id = SCTP_SHUTDOWN; chk-rec.chunk_id.can_take_data = 1; + chk-flags = 0; + chk-send_size = sizeof(struct sctp_shutdown_chunk); chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; chk-flags = 0; @@ -9269,13 +9266,13 @@ sctp_send_asconf(struct sctp_tcb *stcb, return; } chk-copy_by_ref = 0; - chk-data = m_asconf; - chk-send_size = len; chk-rec.chunk_id.id = SCTP_ASCONF; chk-rec.chunk_id.can_take_data = 0; + chk-flags = CHUNK_FLAGS_FRAGMENT_OK; + chk-data = m_asconf; + chk-send_size = len; chk-sent = SCTP_DATAGRAM_UNSENT; chk-snd_count = 0; - chk-flags = CHUNK_FLAGS_FRAGMENT_OK; chk-asoc = stcb-asoc; chk-whoTo = net; if (chk-whoTo) { @@ -9364,7 +9361,9
svn commit: r272842 - head/libexec/rtld-elf
Author: emaste Date: Thu Oct 9 20:39:18 2014 New Revision: 272842 URL: https://svnweb.freebsd.org/changeset/base/272842 Log: Always return pathname in dl_iterate_phdr's dlpi_name, as Linux does Linux LD_ITERATE_PHDR(3): The dlpi_name field is a null-terminated string giving the pathname from which the shared object was loaded. That functionality is much more useful than returning just the short name. Approved by: kan Sponsored by: The FreeBSD Foundation Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cThu Oct 9 20:08:12 2014 (r272841) +++ head/libexec/rtld-elf/rtld.cThu Oct 9 20:39:18 2014 (r272842) @@ -3377,8 +3377,7 @@ rtld_fill_dl_phdr_info(const Obj_Entry * { phdr_info-dlpi_addr = (Elf_Addr)obj-relocbase; - phdr_info-dlpi_name = STAILQ_FIRST(obj-names) ? - STAILQ_FIRST(obj-names)-name : obj-path; + phdr_info-dlpi_name = obj-path; phdr_info-dlpi_phdr = obj-phdr; phdr_info-dlpi_phnum = obj-phsize / sizeof(obj-phdr[0]); phdr_info-dlpi_tls_modid = obj-tlsindex; ___ 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: r272840 - in head: sbin/ipfw sys/conf sys/modules/ipfw sys/netgraph sys/netinet sys/netpfil/ipfw
On 09 Oct 2014, at 23:43, Garrett Cooper yaneurab...@gmail.com wrote: On Oct 9, 2014, at 12:32, Alexander V. Chernikov melif...@freebsd.org wrote: Author: melifaro Date: Thu Oct 9 19:32:35 2014 New Revision: 272840 URL: https://svnweb.freebsd.org/changeset/base/272840 ... MFC after:1 month Should this be MFCed? Does it break existing usability? Old ABI is kept, so old binaries can work as-is. There are _some_ output changes in new ipfw(8) binary, but this can/will be altered for MFC. Sponsored by:Yandex LLC Relnotes: YES ___ 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: r272843 - head/lib/libnv
Author: pjd Date: Thu Oct 9 20:55:05 2014 New Revision: 272843 URL: https://svnweb.freebsd.org/changeset/base/272843 Log: Fix problem on big endian systems introduced in r271579 - when we were returning from handling a nested nvlist we were resetting big-endian flag. Reported by: Kuleshov Aleksey @ yandex.ru Tested by:Kuleshov Aleksey @ yandex.ru Modified: head/lib/libnv/nvlist.c head/lib/libnv/nvlist_impl.h head/lib/libnv/nvpair.c head/lib/libnv/nvpair_impl.h Modified: head/lib/libnv/nvlist.c == --- head/lib/libnv/nvlist.c Thu Oct 9 20:39:18 2014(r272842) +++ head/lib/libnv/nvlist.c Thu Oct 9 20:55:05 2014(r272843) @@ -698,7 +698,7 @@ nvlist_check_header(struct nvlist_header const unsigned char * nvlist_unpack_header(nvlist_t *nvl, const unsigned char *ptr, size_t nfds, -int *flagsp, size_t *leftp) +bool *isbep, size_t *leftp) { struct nvlist_header nvlhdr; @@ -725,7 +725,8 @@ nvlist_unpack_header(nvlist_t *nvl, cons nvl-nvl_flags = (nvlhdr.nvlh_flags NV_FLAG_PUBLIC_MASK); ptr += sizeof(nvlhdr); - *flagsp = (int)nvlhdr.nvlh_flags; + if (isbep != NULL) + *isbep = (((int)nvlhdr.nvlh_flags NV_FLAG_BIG_ENDIAN) != 0); *leftp -= sizeof(nvlhdr); return (ptr); @@ -741,7 +742,7 @@ nvlist_xunpack(const void *buf, size_t s nvlist_t *nvl, *retnvl, *tmpnvl; nvpair_t *nvp; size_t left; - int flags; + bool isbe; left = size; ptr = buf; @@ -751,44 +752,43 @@ nvlist_xunpack(const void *buf, size_t s if (nvl == NULL) goto failed; - ptr = nvlist_unpack_header(nvl, ptr, nfds, flags, left); + ptr = nvlist_unpack_header(nvl, ptr, nfds, isbe, left); if (ptr == NULL) goto failed; while (left 0) { - ptr = nvpair_unpack(flags, ptr, left, nvp); + ptr = nvpair_unpack(isbe, ptr, left, nvp); if (ptr == NULL) goto failed; switch (nvpair_type(nvp)) { case NV_TYPE_NULL: - ptr = nvpair_unpack_null(flags, nvp, ptr, left); + ptr = nvpair_unpack_null(isbe, nvp, ptr, left); break; case NV_TYPE_BOOL: - ptr = nvpair_unpack_bool(flags, nvp, ptr, left); + ptr = nvpair_unpack_bool(isbe, nvp, ptr, left); break; case NV_TYPE_NUMBER: - ptr = nvpair_unpack_number(flags, nvp, ptr, left); + ptr = nvpair_unpack_number(isbe, nvp, ptr, left); break; case NV_TYPE_STRING: - ptr = nvpair_unpack_string(flags, nvp, ptr, left); + ptr = nvpair_unpack_string(isbe, nvp, ptr, left); break; case NV_TYPE_NVLIST: - ptr = nvpair_unpack_nvlist(flags, nvp, ptr, left, - nfds, tmpnvl); + ptr = nvpair_unpack_nvlist(isbe, nvp, ptr, left, nfds, + tmpnvl); nvlist_set_parent(tmpnvl, nvp); break; case NV_TYPE_DESCRIPTOR: - ptr = nvpair_unpack_descriptor(flags, nvp, ptr, left, + ptr = nvpair_unpack_descriptor(isbe, nvp, ptr, left, fds, nfds); break; case NV_TYPE_BINARY: - ptr = nvpair_unpack_binary(flags, nvp, ptr, left); + ptr = nvpair_unpack_binary(isbe, nvp, ptr, left); break; case NV_TYPE_NVLIST_UP: if (nvl-nvl_parent == NULL) goto failed; nvl = nvpair_nvlist(nvl-nvl_parent); - flags = nvl-nvl_flags; continue; default: PJDLOG_ABORT(Invalid type (%d)., nvpair_type(nvp)); Modified: head/lib/libnv/nvlist_impl.h == --- head/lib/libnv/nvlist_impl.hThu Oct 9 20:39:18 2014 (r272842) +++ head/lib/libnv/nvlist_impl.hThu Oct 9 20:55:05 2014 (r272843) @@ -42,6 +42,6 @@ nvlist_t *nvlist_xunpack(const void *buf nvpair_t *nvlist_get_nvpair_parent(const nvlist_t *nvl); const unsigned char *nvlist_unpack_header(nvlist_t *nvl, -const unsigned char *ptr, size_t nfds, int *flagsp, size_t *leftp); +const unsigned char *ptr, size_t nfds, bool *isbep, size_t *leftp); #endif /* !_NVLIST_IMPL_H_ */ Modified: head/lib/libnv/nvpair.c
Re: svn commit: r272800 - head/sys/x86/acpica
On Thursday, October 09, 2014 2:23:10 pm Konstantin Belousov wrote: On Thu, Oct 09, 2014 at 05:34:29AM +, Adrian Chadd wrote: Author: adrian Date: Thu Oct 9 05:34:28 2014 New Revision: 272800 URL: https://svnweb.freebsd.org/changeset/base/272800 Log: Missing from previous commit - keep the VM domain - PXM mapping array and use it to map PXM - VM domain when needed. Differential Revision:D906 Reviewed by: jhb Modified: head/sys/x86/acpica/srat.c Modified: head/sys/x86/acpica/srat.c == --- head/sys/x86/acpica/srat.c Thu Oct 9 05:33:25 2014 (r272799) +++ head/sys/x86/acpica/srat.c Thu Oct 9 05:34:28 2014 (r272800) @@ -62,6 +62,8 @@ int num_mem; static ACPI_TABLE_SRAT *srat; static vm_paddr_t srat_physaddr; +static int vm_domains[VM_PHYSSEG_MAX]; + static voidsrat_walk_table(acpi_subtable_handler *handler, void *arg); /* @@ -247,7 +249,6 @@ check_phys_avail(void) static int renumber_domains(void) { - int domains[VM_PHYSSEG_MAX]; int i, j, slot; /* Enumerate all the domains. */ @@ -255,17 +256,17 @@ renumber_domains(void) for (i = 0; i num_mem; i++) { /* See if this domain is already known. */ for (j = 0; j vm_ndomains; j++) { - if (domains[j] = mem_info[i].domain) + if (vm_domains[j] = mem_info[i].domain) break; } - if (j vm_ndomains domains[j] == mem_info[i].domain) + if (j vm_ndomains vm_domains[j] == mem_info[i].domain) continue; /* Insert the new domain at slot 'j'. */ slot = j; for (j = vm_ndomains; j slot; j--) - domains[j] = domains[j - 1]; - domains[slot] = mem_info[i].domain; + vm_domains[j] = vm_domains[j - 1]; + vm_domains[slot] = mem_info[i].domain; vm_ndomains++; if (vm_ndomains MAXMEMDOM) { vm_ndomains = 1; @@ -280,15 +281,15 @@ renumber_domains(void) * If the domain is already the right value, no need * to renumber. */ - if (domains[i] == i) + if (vm_domains[i] == i) continue; /* Walk the cpu[] and mem_info[] arrays to renumber. */ for (j = 0; j num_mem; j++) - if (mem_info[j].domain == domains[i]) + if (mem_info[j].domain == vm_domains[i]) mem_info[j].domain = i; for (j = 0; j = MAX_APIC_ID; j++) - if (cpus[j].enabled cpus[j].domain == domains[i]) + if (cpus[j].enabled cpus[j].domain == vm_domains[i]) cpus[j].domain = i; } KASSERT(vm_ndomains 0, @@ -368,4 +369,23 @@ srat_set_cpus(void *dummy) } } SYSINIT(srat_set_cpus, SI_SUB_CPU, SI_ORDER_ANY, srat_set_cpus, NULL); + +/* + * Map a _PXM value to a VM domain ID. + * + * Returns the domain ID, or -1 if no domain ID was found. + */ +int +acpi_map_pxm_to_vm_domainid(int pxm) +{ + int i; + + for (i = 0; i vm_ndomains; i++) { + if (vm_domains[i] == pxm) + return (i); + } + + return (-1); +} + #endif /* MAXMEMDOM 1 */ I do not like it. Sorry for not looking at the web thing, I have very little time. It never was an intention that one proximity domain reported by ACPI was mapped to single VM domain. VM could split domains (in terms of vm_domains) further for other reasons. Main motivation is that there is 1:1 relations between domain/page queues/page queues locks/pagedaemons. I have patches in WIP stage which split firmware proximity domains further, to decrease congestion on the page queue locks. I wrote about this in the pgsql performance report. The short version is that there is/will be N:1 relation between VM domains and proximity domains (which is reported by ACPI for devices). _PXM is also defined to be what SRAT reports for memory, and is what will be used to do NUMA-aware memory allocations. While the VM system may decide to split a given NUMA domain into multiple some-other-things, those some-other- things won't be a NUMA domain anymore. At that point, you will need to divorce them from 'domain' and use another term as the domain index into mem_info[] will still be needed so that NUMA allocations do the correct thing. -- John Baldwin ___ 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: r272844 - in head/sys: netinet netinet6
Author: bryanv Date: Thu Oct 9 22:36:21 2014 New Revision: 272844 URL: https://svnweb.freebsd.org/changeset/base/272844 Log: Add missing UDP multicast receive dtrace probes Phabricator: https://reviews.freebsd.org/D924 Reviewed by: rpaulo markj MFC after:1 month Modified: head/sys/netinet/udp_usrreq.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/udp_usrreq.c == --- head/sys/netinet/udp_usrreq.c Thu Oct 9 20:55:05 2014 (r272843) +++ head/sys/netinet/udp_usrreq.c Thu Oct 9 22:36:21 2014 (r272844) @@ -576,6 +576,8 @@ udp_input(struct mbuf **mp, int *offp, i struct mbuf *n; if ((n = m_copy(m, 0, M_COPYALL)) != NULL) { + UDP_PROBE(receive, NULL, last, ip, + last, uh); udp_append(last, ip, n, iphlen, udp_in); } @@ -607,6 +609,7 @@ udp_input(struct mbuf **mp, int *offp, i INP_INFO_RUNLOCK(pcbinfo); goto badunlocked; } + UDP_PROBE(receive, NULL, last, ip, last, uh); udp_append(last, ip, m, iphlen, udp_in); INP_RUNLOCK(last); INP_INFO_RUNLOCK(pcbinfo); Modified: head/sys/netinet6/udp6_usrreq.c == --- head/sys/netinet6/udp6_usrreq.c Thu Oct 9 20:55:05 2014 (r272843) +++ head/sys/netinet6/udp6_usrreq.c Thu Oct 9 22:36:21 2014 (r272844) @@ -370,6 +370,8 @@ udp6_input(struct mbuf **mp, int *offp, if ((n = m_copy(m, 0, M_COPYALL)) != NULL) { INP_RLOCK(last); + UDP_PROBE(receive, NULL, last, ip6, + last, uh); udp6_append(last, n, off, fromsa); INP_RUNLOCK(last); } ___ 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: r272845 - in head/lib/msun: ld128 ld80 src
Author: kargl Date: Thu Oct 9 22:39:52 2014 New Revision: 272845 URL: https://svnweb.freebsd.org/changeset/base/272845 Log: The value small=2**-(p+3), where p is the precision, can be determine from lgamma(x) = -log(x) - log(1+x) + x*(1-g) + x**2*P(x) with g = 0.57... being the Euler constant and P(x) a polynomial. Substitution of small into the RHS shows that the last 3 terms are negligible in comparison to the leading term. The choice of 3 may be conservative. The value large=2**(p+3) is detemined from Stirling's approximation lgamma(x) = x*(log(x)-1) - log(x)/2 + log(2*pi)/2 + P(1/x)/x Again, substitution of large into the RHS reveals the last 3 terms are negligible in comparison to the leading term. Move the x=+-0 special case into the |x|small block. In the ld80 and ld128 implementaion, use fdlibm compatible comparisons involving ix, lx, and llx. This replaces several floating point comparisons (some involving fabsl()) and also fixes the special cases x=1 and x=2. While here . Remove unnecessary parentheses. . Fix/improve comments due to the above changes. . Fix nearby whitespace. * src/e_lgamma_r.c: . Sort declaration. . Remove unneeded explicit cast for type conversion. . Replace a double literal constant by an integer literal constant. * src/e_lgammaf_r.c: . Sort declaration. * ld128/e_lgammal_r.c: . Replace a long double literal constant by a double literal constant. * ld80/e_lgammal_r.c: . Remove unused '#include float.h' . Replace a long double literal constant by a double literal constant. Requested by: bde Modified: head/lib/msun/ld128/e_lgammal_r.c head/lib/msun/ld80/e_lgammal_r.c head/lib/msun/src/e_lgamma_r.c head/lib/msun/src/e_lgammaf_r.c Modified: head/lib/msun/ld128/e_lgammal_r.c == --- head/lib/msun/ld128/e_lgammal_r.c Thu Oct 9 22:36:21 2014 (r272844) +++ head/lib/msun/ld128/e_lgammal_r.c Thu Oct 9 22:39:52 2014 (r272845) @@ -206,13 +206,13 @@ sin_pil(long double x) n--; } n = 7; - y = y - z + n * 0.25L; + y = y - z + n * 0.25; switch (n) { case 0: y = __kernel_sinl(pi*y,zero,0); break; case 1: case 2: y = __kernel_cosl(pi*(0.5-y),zero); break; - case 3: + case 3: case 4: y = __kernel_sinl(pi*(one-y),zero,0); break; case 5: case 6: y = -__kernel_cosl(pi*(y-1.5),zero); break; @@ -221,41 +221,33 @@ sin_pil(long double x) return -y; } - long double lgammal_r(long double x, int *signgamp) { long double nadj,p,p1,p2,p3,q,r,t,w,y,z; uint64_t llx,lx; int i; - uint16_t hx; - - EXTRACT_LDBL128_WORDS(hx, lx, llx, x); + uint16_t hx,ix; - if((hx 0x7fff) == 0x7fff) { /* erfl(nan)=nan */ - i = (hx15)1; - return (1-i)+one/x; /* erfl(+-inf)=+-1 */ - } + EXTRACT_LDBL128_WORDS(hx,lx,llx,x); -/* purge off +-inf, NaN, +-0, tiny and negative arguments */ +/* purge +-Inf and NaNs */ *signgamp = 1; - if((hx 0x7fff) == 0x7fff) /* x is +-Inf or NaN */ - return x*x; - if((hx==0||hx==0x8000)lx==0) { - if (hx0x8000) - *signgamp = -1; - return one/vzero; - } + ix = hx0x7fff; + if(ix==0x7fff) return x*x; - /* purge off tiny and negative arguments */ - if(fabsl(x)0x1p-119L) { - if(hx0x8000) { - *signgamp = -1; - return -logl(-x); - } else return -logl(x); + /* purge +-0 and tiny arguments */ + *signgamp = 1-2*(hx15); + if(ix0x3fff-116) { /* |x|2**-(p+3), return -log(|x|) */ + if((ix|lx|llx)==0) + return one/vzero; + return -logl(fabsl(x)); } + +/* purge negative integers and start evaluation for other x 0 */ if(hx0x8000) { - if(fabsl(x)=0x1p112) + *signgamp = 1; + if(ix=0x3fff+112) /* |x|=2**(p-1), must be -integer */ return one/vzero; t = sin_pil(x); if(t==zero) return one/vzero; @@ -264,17 +256,19 @@ lgammal_r(long double x, int *signgamp) x = -x; } - if(x == 1 || x ==2) r = 0; - else if(x2) { - if(x=0.896185302734) { +/* purge 1 and 2 */ + if((ix==0x3fff || ix==0x4000) (lx|llx)==0) r = 0; +/* for x 2.0 */ + else if(ix0x4000) { + if(x=8.961853027344e-01) { r = -logl(x); - if(x=0.7315998077392578) {y = 1-x; i= 0;} - else if(x=0.2316399812698364) {y= x-(tc-1); i=1;} + if(x=7.3159980773925781e-01) {y = 1-x; i= 0;} + else if(x=2.3163998126983643e-01) {y= x-(tc-1); i=1;}
svn commit: r272848 - head/lib/libc/gen
Author: emaste Date: Thu Oct 9 22:58:33 2014 New Revision: 272848 URL: https://svnweb.freebsd.org/changeset/base/272848 Log: Update dl_iterate_phdr(3) to follow r272842 Relnotes: yes Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/gen/dl_iterate_phdr.3 Modified: head/lib/libc/gen/dl_iterate_phdr.3 == --- head/lib/libc/gen/dl_iterate_phdr.3 Thu Oct 9 22:56:38 2014 (r272847) +++ head/lib/libc/gen/dl_iterate_phdr.3 Thu Oct 9 22:58:33 2014 (r272848) @@ -15,7 +15,7 @@ .\ .\ $OpenBSD: dl_iterate_phdr.3,v 1.3 2007/05/31 19:19:48 jmc Exp $ .\ $FreeBSD$ -.Dd February 15, 2012 +.Dd October 9, 2014 .Dt DL_ITERATE_PHDR 3 .Os .Sh NAME @@ -68,7 +68,7 @@ have the following meaning: The base address at which the object is mapped into the address space of the calling process. .It Fa dlpi_name -The name of the ELF object. +The pathname of the ELF object. .It Fa dlpi_phdr A pointer to the object's program headers. .It Fa dlpi_phnum ___ 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: r272849 - in head: . gnu/usr.bin tools/build/mk
Author: emaste Date: Thu Oct 9 23:05:31 2014 New Revision: 272849 URL: https://svnweb.freebsd.org/changeset/base/272849 Log: Build gperf only if we're using g++ (not clang++) gperf is used as a build tool for g++ and is not needed for Clang architectures. Ports and third-party software that need it can use the up-to-date devel/gperf port. PR: 194103 (exp-run) Reviewed by: bapt Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D886 Modified: head/UPDATING head/gnu/usr.bin/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/UPDATING == --- head/UPDATING Thu Oct 9 22:58:33 2014(r272848) +++ head/UPDATING Thu Oct 9 23:05:31 2014(r272849) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run ln -s 'abort:false,junk:false' /etc/malloc.conf.) +20141009: + gperf has been removed from the base system for architectures + that use clang. Ports that require gperf will obtain it from the + devel/gperf port. + 20140923: pjdfstest has been moved from tools/regression/pjdfstest to contrib/pjdfstest . Modified: head/gnu/usr.bin/Makefile == --- head/gnu/usr.bin/Makefile Thu Oct 9 22:58:33 2014(r272848) +++ head/gnu/usr.bin/Makefile Thu Oct 9 23:05:31 2014(r272849) @@ -18,7 +18,9 @@ SUBDIR= ${_binutils} \ ${_texinfo} .if ${MK_CXX} != no +.if ${MK_GCC} != no _gperf=gperf +.endif .if ${MK_GROFF} != no _groff=groff .endif Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Oct 9 22:58:33 2014(r272848) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Oct 9 23:05:31 2014(r272849) @@ -591,13 +591,18 @@ OLD_FILES+=usr/share/man/man1/ctm_smail. OLD_FILES+=usr/share/man/man5/ctm.5.gz .endif -# devd(8) and gperf(1) not listed here on purpose +# devd(8) not listed here on purpose .if ${MK_CXX} == no OLD_FILES+=usr/bin/CC OLD_FILES+=usr/bin/c++ OLD_FILES+=usr/bin/c++filt OLD_FILES+=usr/bin/g++ OLD_FILES+=usr/libexec/cc1plus +.if ${MK_GCC} == no +OLD_FILES+=usr/bin/gperf +OLD_FILES+=usr/share/info/gperf.info.gz +OLD_FILES+=usr/share/man/man1/gperf.1.gz +.endif .endif .if ${MK_FMTREE} == no ___ 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: r272878 - head/contrib/bsnmp/snmp_target
Author: syrinx Date: Fri Oct 10 00:26:28 2014 New Revision: 272878 URL: https://svnweb.freebsd.org/changeset/base/272878 Log: Fix a bug in decoding string indexes in snmp_target(3), thus causing bsnmpd(1) to not send v3 notifications properly; while here add two missing return statements which could lead to abort() in case of a rollback Modified: head/contrib/bsnmp/snmp_target/target_snmp.c Modified: head/contrib/bsnmp/snmp_target/target_snmp.c == --- head/contrib/bsnmp/snmp_target/target_snmp.cFri Oct 10 00:26:00 2014(r272877) +++ head/contrib/bsnmp/snmp_target/target_snmp.cFri Oct 10 00:26:28 2014(r272878) @@ -301,6 +301,7 @@ op_snmp_target_addrs(struct snmp_context default: break; } + return (SNMP_ERR_NOERROR); default: abort(); @@ -625,6 +626,7 @@ op_snmp_notify(struct snmp_context *ctx default: break; } + return (SNMP_ERR_NOERROR); default: abort(); @@ -663,13 +665,14 @@ target_append_index(struct asn_oid *oid, static int target_decode_index(const struct asn_oid *oid, uint sub, char *name) { - uint32_t i, len; + uint32_t i; - if ((len = oid-len - sub) = SNMP_ADM_STR32_SIZ) + if (oid-len - sub != oid-subs[sub] + 1 || oid-subs[sub] = + SNMP_ADM_STR32_SIZ) return (-1); - for (i = 0; i len; i++) - name[i] = oid-subs[sub + i]; + for (i = 0; i oid-subs[sub]; i++) + name[i] = oid-subs[sub + i + 1]; name[i] = '\0'; return (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: r272881 - in head/sys: conf sys
Author: imp Date: Fri Oct 10 00:35:13 2014 New Revision: 272881 URL: https://svnweb.freebsd.org/changeset/base/272881 Log: For gcc 4.6 and newer, _Static_assert is a keyword, so don't try to redefine it. It does what we want, and is always available unlike other alternatives. Modified: head/sys/conf/kern.mk head/sys/sys/cdefs.h Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Fri Oct 10 00:35:08 2014(r272880) +++ head/sys/conf/kern.mk Fri Oct 10 00:35:13 2014(r272881) @@ -38,7 +38,7 @@ CWARNEXTRA?= -Wno-error-tautological-com # building with gcc 4.8 and newer. Nothing older has been tested. CWARNEXTRA?= -Wno-error=inline -Wno-error=enum-compare -Wno-error=unused-but-set-variable \ -Wno-error=aggressive-loop-optimizations -Wno-error=maybe-uninitialized \ - -Wno-error=unused-local-typedefs -Wno-error=array-bounds -Wno-error=address \ + -Wno-error=array-bounds -Wno-error=address \ -Wno-error=cast-qual -Wno-error=sequence-point -Wno-error=attributes .endif Modified: head/sys/sys/cdefs.h == --- head/sys/sys/cdefs.hFri Oct 10 00:35:08 2014(r272880) +++ head/sys/sys/cdefs.hFri Oct 10 00:35:13 2014(r272881) @@ -288,6 +288,8 @@ #if (defined(__cplusplus) __cplusplus = 201103L) || \ __has_extension(cxx_static_assert) #define_Static_assert(x, y)static_assert(x, y) +#elif __GNUC_PREREQ__(4,6) +/* Nothing, gcc 4.6 and higher has _Static_assert built-in */ #elif defined(__COUNTER__) #define_Static_assert(x, y)__Static_assert(x, __COUNTER__) #define__Static_assert(x, y) ___Static_assert(x, y) ___ 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: r272880 - head/sys/ufs/ufs
Author: imp Date: Fri Oct 10 00:35:08 2014 New Revision: 272880 URL: https://svnweb.freebsd.org/changeset/base/272880 Log: Restore the backed-out change, using __offsetof instead. Modified: head/sys/ufs/ufs/dir.h Modified: head/sys/ufs/ufs/dir.h == --- head/sys/ufs/ufs/dir.h Fri Oct 10 00:28:19 2014(r272879) +++ head/sys/ufs/ufs/dir.h Fri Oct 10 00:35:08 2014(r272880) @@ -110,7 +110,7 @@ struct direct { * */ #defineDIRECTSIZ(namlen) \ - (((uintptr_t)((struct direct *)0)-d_name +\ + ((__offsetof(struct direct, d_name) + \ ((namlen)+1)*sizeof(((struct direct *)0)-d_name[0]) + 3) ~3) #if (BYTE_ORDER == LITTLE_ENDIAN) #defineDIRSIZ(oldfmt, dp) \ ___ 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: r272884 - head/lib/libc/sys
Author: delphij Date: Fri Oct 10 03:05:55 2014 New Revision: 272884 URL: https://svnweb.freebsd.org/changeset/base/272884 Log: accept(2) may and can return EAGAIN, document it. MFC after:1 week Modified: head/lib/libc/sys/accept.2 Modified: head/lib/libc/sys/accept.2 == --- head/lib/libc/sys/accept.2 Fri Oct 10 01:01:04 2014(r272883) +++ head/lib/libc/sys/accept.2 Fri Oct 10 03:05:55 2014(r272884) @@ -28,7 +28,7 @@ .\ @(#)accept.2 8.2 (Berkeley) 12/11/93 .\ $FreeBSD$ .\ -.Dd October 1, 2013 +.Dd October 9, 2014 .Dt ACCEPT 2 .Os .Sh NAME @@ -201,7 +201,7 @@ The .Fa addr argument is not in a writable part of the user address space. -.It Bq Er EWOULDBLOCK +.It Bo Er EWOULDBLOCK Bc or Bq Er EAGAIN The socket is marked non-blocking and no connections are present to be accepted. .It Bq Er ECONNABORTED ___ 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: r272885 - head/sbin/swapon
Author: hrs Date: Fri Oct 10 03:20:12 2014 New Revision: 272885 URL: https://svnweb.freebsd.org/changeset/base/272885 Log: Do not add late flag when file= is specified because it has a bad side-effect. The specified file should exist before the fstab line. Reported by: wblock (long time ago) MFC after:1 day Modified: head/sbin/swapon/swapon.c Modified: head/sbin/swapon/swapon.c == --- head/sbin/swapon/swapon.c Fri Oct 10 03:05:55 2014(r272884) +++ head/sbin/swapon/swapon.c Fri Oct 10 03:20:12 2014(r272885) @@ -172,15 +172,8 @@ main(int argc, char **argv) continue; if (strstr(fsp-fs_mntops, noauto) != NULL) continue; - /* -* Forcibly enable late option when file= is -* specified. This is because mounting file -* systems with rw option is typically -* required to make the backing store ready. -*/ if (which_prog != SWAPOFF - (strstr(fsp-fs_mntops, late) != NULL || -strstr(fsp-fs_mntops, file=) != NULL) + strstr(fsp-fs_mntops, late) late == 0) continue; swfile = swap_on_off(fsp-fs_spec, 1, ___ 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: r272827 - head
On Thursday, October 09, 2014 03:52:01 PM Baptiste Daroussin wrote: Author: bapt Date: Thu Oct 9 15:52:01 2014 New Revision: 272827 URL: https://svnweb.freebsd.org/changeset/base/272827 Log: Add size(1) to the cross build toolchain Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Oct 9 15:35:28 2014(r272826) +++ head/Makefile.inc1Thu Oct 9 15:52:01 2014(r272827) @@ -315,7 +315,7 @@ X${COMPILER}?=${CROSS_COMPILER_PREFIX}$ X${COMPILER}?= ${${COMPILER}} .endif .endfor -XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB STRINGS +XBINUTILS= AS AR LD NM OBJCOPY OBJDUMP RANLIB SIZE STRINGS .for BINUTIL in ${XBINUTILS} .if defined(CROSS_BINUTILS_PREFIX) X${BINUTIL}?=${CROSS_BINUTILS_PREFIX}${${BINUTIL}} @@ -327,7 +327,8 @@ WMAKEENV+=CC=${XCC} ${XFLAGS} CXX=${ CPP=${XCPP} ${XFLAGS} \ AS=${XAS} AR=${XAR} LD=${XLD} NM=${XNM} \ OBJDUMP=${XOBJDUMP} OBJCOPY=${XOBJCOPY} \ - RANLIB=${XRANLIB} STRINGS=${XSTRINGS} + RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ + SIZE=${XSIZE} .if ${XCC:M/*} XFLAGS= --sysroot=${WORLDTMP} This broke 'make buildkernel'. kern.pre.mk: SIZE?= size kern.post.mk: SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \ ${SIZE} ${.TARGET} ; chmod 755 ${.TARGET} This is getting executed as: objcopy --strip-symbol gcc2_compiled. .kernel ; kernel ; chmod 755 kernel ie: kernel instead of size kernel. XSIZE isn't set for the non-cross case. -- Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 signature.asc Description: This is a digitally signed message part.