svn commit: r310762 - head/sys/dev/sfxge/common
Author: arybchik Date: Thu Dec 29 08:10:51 2016 New Revision: 310762 URL: https://svnweb.freebsd.org/changeset/base/310762 Log: sfxge(4): regenerate MCDI headers from firmwaresrc .yml Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/efx_regs_mcdi.h Modified: head/sys/dev/sfxge/common/efx_regs_mcdi.h == --- head/sys/dev/sfxge/common/efx_regs_mcdi.h Thu Dec 29 07:27:13 2016 (r310761) +++ head/sys/dev/sfxge/common/efx_regs_mcdi.h Thu Dec 29 08:10:51 2016 (r310762) @@ -136,6 +136,8 @@ #define MCDI_HEADER_XFLAGS_WIDTH 8 /* Request response using event */ #define MCDI_HEADER_XFLAGS_EVREQ 0x01 +/* Request (and signal) early doorbell return */ +#define MCDI_HEADER_XFLAGS_DBRET 0x02 /* Maximum number of payload bytes */ #define MCDI_CTL_SDU_LEN_MAX_V1 0xfc @@ -149,7 +151,7 @@ /* The MC can generate events for two reasons: - * - To complete a shared memory request if XFLAGS_EVREQ was set + * - To advance a shared memory request if XFLAGS_EVREQ was set * - As a notification (link state, i2c event), controlled * via MC_CMD_LOG_CTRL * @@ -302,6 +304,12 @@ /* The clock whose frequency you've attempted to set set * doesn't exist on this NIC */ #define MC_CMD_ERR_NO_CLOCK 0x1015 +/* Returned by MC_CMD_TESTASSERT if the action that should + * have caused an assertion failed to do so. */ +#define MC_CMD_ERR_UNREACHABLE 0x1016 +/* This command needs to be processed in the background but there were no + * resources to do so. Send it again after a command has completed. */ +#define MC_CMD_ERR_QUEUE_FULL 0x1017 #define MC_CMD_ERR_CODE_OFST 0 @@ -483,8 +491,48 @@ #defineMCDI_EVENT_AOE_DDR_ECC_STATUS 0xa /* enum: PTP status update */ #defineMCDI_EVENT_AOE_PTP_STATUS 0xb +/* enum: FPGA header incorrect */ +#defineMCDI_EVENT_AOE_FPGA_LOAD_HEADER_ERR 0xc +/* enum: FPGA Powered Off due to error in powering up FPGA */ +#defineMCDI_EVENT_AOE_FPGA_POWER_OFF 0xd +/* enum: AOE FPGA load failed due to MC to MUM communication failure */ +#defineMCDI_EVENT_AOE_FPGA_LOAD_FAILED 0xe +/* enum: Notify that invalid flash type detected */ +#defineMCDI_EVENT_AOE_INVALID_FPGA_FLASH_TYPE 0xf +/* enum: Notify that the attempt to run FPGA Controller firmware timedout */ +#defineMCDI_EVENT_AOE_FC_RUN_TIMEDOUT 0x10 #defineMCDI_EVENT_AOE_ERR_DATA_LBN 8 #defineMCDI_EVENT_AOE_ERR_DATA_WIDTH 8 +#defineMCDI_EVENT_AOE_ERR_CODE_FPGA_HEADER_VERIFY_FAILED_LBN 8 +#defineMCDI_EVENT_AOE_ERR_CODE_FPGA_HEADER_VERIFY_FAILED_WIDTH 8 +/* enum: Reading from NV failed */ +#defineMCDI_EVENT_AOE_ERR_FPGA_HEADER_NV_READ_FAIL 0x0 +/* enum: Invalid Magic Number if FPGA header */ +#defineMCDI_EVENT_AOE_ERR_FPGA_HEADER_MAGIC_FAIL 0x1 +/* enum: Invalid Silicon type detected in header */ +#defineMCDI_EVENT_AOE_ERR_FPGA_HEADER_SILICON_TYPE 0x2 +/* enum: Unsupported VRatio */ +#defineMCDI_EVENT_AOE_ERR_FPGA_HEADER_VRATIO 0x3 +/* enum: Unsupported DDR Type */ +#defineMCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_TYPE 0x4 +/* enum: DDR Voltage out of supported range */ +#defineMCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_VOLTAGE 0x5 +/* enum: Unsupported DDR speed */ +#defineMCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_SPEED 0x6 +/* enum: Unsupported DDR size */ +#defineMCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_SIZE 0x7 +/* enum: Unsupported DDR rank */ +#defineMCDI_EVENT_AOE_ERR_FPGA_HEADER_DDR_RANK 0x8 +#defineMCDI_EVENT_AOE_ERR_CODE_INVALID_FPGA_FLASH_TYPE_INFO_LBN 8 +#defineMCDI_EVENT_AOE_ERR_CODE_INVALID_FPGA_FLASH_TYPE_INFO_WIDTH 8 +/* enum: Primary boot flash */ +#defineMCDI_EVENT_AOE_FLASH_TYPE_BOOT_PRIMARY 0x0 +/* enum: Secondary boot flash */ +#defineMCDI_EVENT_AOE_FLASH_TYPE_BOOT_SECONDARY 0x1 +#defineMCDI_EVENT_AOE_ERR_CODE_FPGA_POWER_OFF_LBN 8 +#defineMCDI_EVENT_AOE_ERR_CODE_FPGA_POWER_OFF_WIDTH 8 +#defineMCDI_EVENT_AOE_ERR_CODE_FPGA_LOAD_FAILED_LBN 8 +#defineMCDI_EVENT_AOE_ERR_CODE_FPGA_LOAD_FAILED_WIDTH 8 #defineMCDI_EVENT_RX_ERR_RXQ_LBN 0 #defineMCDI_EVENT_RX_ERR_RXQ_WIDTH 12 #defineMCDI_EVENT_RX_ERR_TYPE_LBN 12 @@ -765,7 +813,7 @@ #defineFCDI_EVENT_BOOT_RESULT_WIDTH 32 /* FCDI_EXTENDED_EVENT_PPS structuredef: Extended FCDI event to send PPS events - * to the MC. Note that this structure | is overlaid over a normal FCDI event + * to the MC. Note that this structure | is overlayed over a normal FCDI event * such that bits 32-63 containing | event code, level, source etc remain the * same. In this case the data | field of the header is defined to be the * number of timestamps @@ -966,6 +1014,8 @@ #defineMC_CMD_COPYCODE_IN_BOOT_MAGIC_SKIP_BOOT_ICORE_SYNC_WIDTH 1 #defineMC_CMD_COPYCODE_IN_BOOT_MAGIC_FORCE_STANDALONE_LBN 5
svn commit: r310763 - head/contrib/bsnmp/snmpd
Author: ngie Date: Thu Dec 29 08:16:43 2016 New Revision: 310763 URL: https://svnweb.freebsd.org/changeset/base/310763 Log: Use uint32_t instead of u_int32_t for or_last_change and services in "struct systemg" This is being done to match "struct systemg" in snmpmod(3) No functional change MFC after:3 days Modified: head/contrib/bsnmp/snmpd/snmpmod.h Modified: head/contrib/bsnmp/snmpd/snmpmod.h == --- head/contrib/bsnmp/snmpd/snmpmod.h Thu Dec 29 08:10:51 2016 (r310762) +++ head/contrib/bsnmp/snmpd/snmpmod.h Thu Dec 29 08:16:43 2016 (r310763) @@ -317,8 +317,8 @@ struct systemg { u_char *contact; u_char *name; u_char *location; - u_int32_t services; - u_int32_t or_last_change; + uint32_tservices; + uint32_tor_last_change; }; extern struct systemg systemg; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310764 - head/sys/dev/sfxge/common
Author: arybchik Date: Thu Dec 29 08:25:00 2016 New Revision: 310764 URL: https://svnweb.freebsd.org/changeset/base/310764 Log: sfxge(4): sync up tlv_layout.h (from firmwaresrc 82cd8a5715e9) Submitted by: Matthew Slattery Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/ef10_tlv_layout.h Modified: head/sys/dev/sfxge/common/ef10_tlv_layout.h == --- head/sys/dev/sfxge/common/ef10_tlv_layout.h Thu Dec 29 08:16:43 2016 (r310763) +++ head/sys/dev/sfxge/common/ef10_tlv_layout.h Thu Dec 29 08:25:00 2016 (r310764) @@ -432,6 +432,7 @@ struct tlv_firmware_options { #define TLV_FIRMWARE_VARIANT_HIGH_TX_RATEMC_CMD_FW_HIGH_TX_RATE #define TLV_FIRMWARE_VARIANT_PACKED_STREAM_HASH_MODE_1 \ MC_CMD_FW_PACKED_STREAM_HASH_MODE_1 +#define TLV_FIRMWARE_VARIANT_RULES_ENGINEMC_CMD_FW_RULES_ENGINE }; /* Voltage settings @@ -797,20 +798,6 @@ struct tlv_tx_event_merging_config { #define TLV_TX_EVENT_MERGING_TIMEOUT_NS_DEFAULT (0x) #define TLV_TX_EVENT_MERGING_QEMPTY_TIMEOUT_NS_DEFAULT (0x) -/* Tx vFIFO Low latency configuration - * - * To keep the desired booting behaviour for the switch, it just requires to - * know if the low latency mode is enabled. - */ - -#define TLV_TAG_TX_VFIFO_ULL_MODE (0x1027) -struct tlv_tx_vfifo_ull_mode { - uint32_t tag; - uint32_t length; - uint8_t mode; -#define TLV_TX_VFIFO_ULL_MODE_DEFAULT0 -}; - /* BIU mode * * Medford2 tag for selecting VI window decode (see values below) @@ -856,8 +843,8 @@ typedef struct tlv_tsan_config { uint32_t netmask; uint32_t gateway; uint32_t port; - uint32_t bind_retry; - uint32_t bind_bkout; + uint32_t bind_retry; /* DEPRECATED */ + uint32_t bind_bkout; /* DEPRECATED */ } tlv_tsan_config_t; /* TSA Controller IP address configuration @@ -898,7 +885,7 @@ typedef struct tlv_binding_ticket { uint8_t bytes[]; } tlv_binding_ticket_t; -/* Solarflare private key +/* Solarflare private key (DEPRECATED) * * Sets the Solareflare private key used for signing during the binding process * @@ -907,7 +894,7 @@ typedef struct tlv_binding_ticket { * released code yet. */ -#define TLV_TAG_TMP_PIK_SF (0x1025) +#define TLV_TAG_TMP_PIK_SF (0x1025)/* DEPRECATED */ typedef struct tlv_pik_sf { uint32_t tag; @@ -933,4 +920,18 @@ typedef struct tlv_ca_root_cert { uint8_t bytes[]; } tlv_ca_root_cert_t; +/* Tx vFIFO Low latency configuration + * + * To keep the desired booting behaviour for the switch, it just requires to + * know if the low latency mode is enabled. + */ + +#define TLV_TAG_TX_VFIFO_ULL_MODE (0x1027) +struct tlv_tx_vfifo_ull_mode { + uint32_t tag; + uint32_t length; + uint8_t mode; +#define TLV_TX_VFIFO_ULL_MODE_DEFAULT0 +}; + #endif /* CI_MGMT_TLV_LAYOUT_H */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310765 - head/sys/dev/sfxge/common
Author: arybchik Date: Thu Dec 29 08:28:42 2016 New Revision: 310765 URL: https://svnweb.freebsd.org/changeset/base/310765 Log: sfxge(4): add support for firmware-verified NVRAM updates to the common code Submitted by: Andy Moreton Reviewed by:gnn Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8942 Modified: head/sys/dev/sfxge/common/ef10_impl.h head/sys/dev/sfxge/common/ef10_nic.c head/sys/dev/sfxge/common/ef10_nvram.c head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/efx_nvram.c head/sys/dev/sfxge/common/siena_impl.h head/sys/dev/sfxge/common/siena_nic.c head/sys/dev/sfxge/common/siena_nvram.c Modified: head/sys/dev/sfxge/common/ef10_impl.h == --- head/sys/dev/sfxge/common/ef10_impl.h Thu Dec 29 08:25:00 2016 (r310764) +++ head/sys/dev/sfxge/common/ef10_impl.h Thu Dec 29 08:28:42 2016 (r310765) @@ -384,7 +384,7 @@ ef10_nvram_partn_lock( __inefx_nic_t *enp, __inuint32_t partn); -extern void +extern __checkReturn efx_rc_t ef10_nvram_partn_unlock( __inefx_nic_t *enp, __inuint32_t partn); @@ -451,7 +451,7 @@ ef10_nvram_partn_write( __out_bcount(size) caddr_t data, __insize_t size); -extern void +extern __checkReturn efx_rc_t ef10_nvram_partn_rw_finish( __inefx_nic_t *enp, __inuint32_t partn); Modified: head/sys/dev/sfxge/common/ef10_nic.c == --- head/sys/dev/sfxge/common/ef10_nic.cThu Dec 29 08:25:00 2016 (r310764) +++ head/sys/dev/sfxge/common/ef10_nic.cThu Dec 29 08:28:42 2016 (r310765) @@ -1105,6 +1105,18 @@ ef10_get_datapath_caps( encp->enc_mac_stats_40g_tx_size_bins = CAP_FLAG2(flags2, MAC_STATS_40G_TX_SIZE_BINS) ? B_TRUE : B_FALSE; + /* +* Check if firmware-verified NVRAM updates must be used. +* +* The firmware trusted installer requires all NVRAM updates to use +* version 2 of MC_CMD_NVRAM_UPDATE_START (to enable verified update) +* and version 2 of MC_CMD_NVRAM_UPDATE_FINISH (to verify the updated +* partition and report the result). +*/ + encp->enc_fw_verified_nvram_update_required = + CAP_FLAG2(flags2, NVRAM_UPDATE_REPORT_VERIFY_RESULT) ? + B_TRUE : B_FALSE; + #undef CAP_FLAG #undef CAP_FLAG2 Modified: head/sys/dev/sfxge/common/ef10_nvram.c == --- head/sys/dev/sfxge/common/ef10_nvram.c Thu Dec 29 08:25:00 2016 (r310764) +++ head/sys/dev/sfxge/common/ef10_nvram.c Thu Dec 29 08:28:42 2016 (r310765) @@ -2046,22 +2046,26 @@ fail1: return (rc); } - void + __checkReturn efx_rc_t ef10_nvram_partn_unlock( __inefx_nic_t *enp, __inuint32_t partn) { - boolean_t reboot; + boolean_t reboot = B_FALSE; + uint32_t result = 0; /* FIXME: MC_CMD_NVRAM_VERIFY_RC_UNKNOWN */ efx_rc_t rc; - reboot = B_FALSE; - if ((rc = efx_mcdi_nvram_update_finish(enp, partn, reboot)) != 0) + rc = efx_mcdi_nvram_update_finish(enp, partn, reboot, &result); + if (rc != 0) goto fail1; - return; + return (0); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); + + /* FIXME: log result if verified firmware update fails */ + return (rc); } __checkReturn efx_rc_t @@ -2359,12 +2363,22 @@ fail1: return (rc); } - void + __checkReturn efx_rc_t ef10_nvram_partn_rw_finish( __inefx_nic_t *enp, __inuint32_t partn) { - ef10_nvram_partn_unlock(enp, partn); + efx_rc_t rc; + + if ((rc = ef10_nvram_partn_unlock(enp, partn)) != 0) + goto fail1; + + return (0); + +fail1: + EFSYS_PROBE1(fail1, efx_rc_t, rc); + + return (rc); } #endif /* EFSYS_OPT_NVRAM */ Modified: head/sys/dev/sfxge/common/efx.h == --- head/sys/dev/sfxge/common/efx.h Thu Dec 29 08:25:00 2016 (r310764) +++ head/sys/dev/sfxge/common/efx.h Thu Dec 29 08:28:42 2016 (r310765) @@ -1183,6 +1183,8 @@ typedef struct efx_nic_cfg_s { /* Minimum unidirectional bandwidth in Mb/s to max out all ports */ uint32_tenc_requi
svn commit: r310766 - head/sys/kern
Author: mjg Date: Thu Dec 29 08:34:50 2016 New Revision: 310766 URL: https://svnweb.freebsd.org/changeset/base/310766 Log: cache: drop the NULL check from VP2VNODELOCK Now that negative entries are annotated with a dedicated flag, NULL vnodes are no longer passed. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Thu Dec 29 08:28:42 2016(r310765) +++ head/sys/kern/vfs_cache.c Thu Dec 29 08:34:50 2016(r310766) @@ -260,12 +260,8 @@ static struct mtx *vnodelocks; static inline struct mtx * VP2VNODELOCK(struct vnode *vp) { - struct mtx *vlp; - if (vp == NULL) - return (NULL); - vlp = &vnodelocks[(((uintptr_t)(vp) >> 8) % numvnodelocks)]; - return (vlp); + return (&vnodelocks[(((uintptr_t)(vp) >> 8) % numvnodelocks)]); } /* @@ -1373,10 +1369,9 @@ cache_lock_vnodes_cel_3(struct celocksta cache_assert_vlp_locked(cel->vlp[0]); cache_assert_vlp_locked(cel->vlp[1]); MPASS(cel->vlp[2] == NULL); + MPASS(vp != NULL); vlp = VP2VNODELOCK(vp); - MPASS(vlp != NULL); - ret = true; if (vlp >= cel->vlp[1]) { mtx_lock(vlp); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310767 - head/sys/kern
Author: mjg Date: Thu Dec 29 08:41:25 2016 New Revision: 310767 URL: https://svnweb.freebsd.org/changeset/base/310767 Log: cache: depessimize hashing macros/inlines All hash sizes are power-of-2, but the compiler does not know that for sure and 'foo % size' forces doing a division. Store the size - 1 and use 'foo & hash' instead which allows mere shift. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Thu Dec 29 08:34:50 2016(r310766) +++ head/sys/kern/vfs_cache.c Thu Dec 29 08:41:25 2016(r310767) @@ -242,26 +242,29 @@ static struct neglist ncneg_hot; static int shrink_list_turn; -static u_int numneglists; +#definenumneglists (ncneghash + 1) +static u_int ncneghash; static inline struct neglist * NCP2NEGLIST(struct namecache *ncp) { - return (&neglists[(((uintptr_t)(ncp) >> 8) % numneglists)]); + return (&neglists[(((uintptr_t)(ncp) >> 8) & ncneghash)]); } -static u_int numbucketlocks; +#definenumbucketlocks (ncbuckethash + 1) +static u_int ncbuckethash; static struct rwlock_padalign *bucketlocks; #defineHASH2BUCKETLOCK(hash) \ - ((struct rwlock *)(&bucketlocks[((hash) % numbucketlocks)])) + ((struct rwlock *)(&bucketlocks[((hash) & ncbuckethash)])) -static u_int numvnodelocks; +#definenumvnodelocks (ncvnodehash + 1) +static u_int ncvnodehash; static struct mtx *vnodelocks; static inline struct mtx * VP2VNODELOCK(struct vnode *vp) { - return (&vnodelocks[(((uintptr_t)(vp) >> 8) % numvnodelocks)]); + return (&vnodelocks[(((uintptr_t)(vp) >> 8) & ncvnodehash)]); } /* @@ -1369,9 +1372,10 @@ cache_lock_vnodes_cel_3(struct celocksta cache_assert_vlp_locked(cel->vlp[0]); cache_assert_vlp_locked(cel->vlp[1]); MPASS(cel->vlp[2] == NULL); - MPASS(vp != NULL); + MPASS(vp != NULL); vlp = VP2VNODELOCK(vp); + ret = true; if (vlp >= cel->vlp[1]) { mtx_lock(vlp); @@ -1774,21 +1778,21 @@ nchinit(void *dummy __unused) NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_ZINIT); nchashtbl = hashinit(desiredvnodes * 2, M_VFSCACHE, &nchash); - numbucketlocks = cache_roundup_2(mp_ncpus * 64); - if (numbucketlocks > nchash + 1) - numbucketlocks = nchash + 1; + ncbuckethash = cache_roundup_2(mp_ncpus * 64) - 1; + if (ncbuckethash > nchash) + ncbuckethash = nchash; bucketlocks = malloc(sizeof(*bucketlocks) * numbucketlocks, M_VFSCACHE, M_WAITOK | M_ZERO); for (i = 0; i < numbucketlocks; i++) rw_init_flags(&bucketlocks[i], "ncbuc", RW_DUPOK | RW_RECURSE); - numvnodelocks = cache_roundup_2(mp_ncpus * 64); + ncvnodehash = cache_roundup_2(mp_ncpus * 64) - 1; vnodelocks = malloc(sizeof(*vnodelocks) * numvnodelocks, M_VFSCACHE, M_WAITOK | M_ZERO); for (i = 0; i < numvnodelocks; i++) mtx_init(&vnodelocks[i], "ncvn", NULL, MTX_DUPOK | MTX_RECURSE); ncpurgeminvnodes = numbucketlocks; - numneglists = 4; + ncneghash = 3; neglists = malloc(sizeof(*neglists) * numneglists, M_VFSCACHE, M_WAITOK | M_ZERO); for (i = 0; i < numneglists; i++) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310768 - in stable/10/sys/dev/hyperv: netvsc vmbus
Author: sephe Date: Thu Dec 29 09:02:49 2016 New Revision: 310768 URL: https://svnweb.freebsd.org/changeset/base/310768 Log: MFC 309310,309311,309316,309318 309310 hyperv/hn: Nuke the unused TX taskqueue CPU binding tunable. It was an experimental tunable, and is now deemed to be road blocker for further changes. Time to retire it. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8654 309311 hyperv/hn: Allow multiple TX taskqueues. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8655 309316 hyperv/vmbus: Add DEVMETHOD to map cpu to event taskq. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8658 309318 hyperv/hn: Allow TX to share event taskqueues. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8659 Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c stable/10/sys/dev/hyperv/netvsc/if_hnvar.h stable/10/sys/dev/hyperv/vmbus/vmbus.c stable/10/sys/dev/hyperv/vmbus/vmbus_if.m Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c == --- stable/10/sys/dev/hyperv/netvsc/if_hn.c Thu Dec 29 08:41:25 2016 (r310767) +++ stable/10/sys/dev/hyperv/netvsc/if_hn.c Thu Dec 29 09:02:49 2016 (r310768) @@ -172,6 +172,8 @@ do { \ #define HN_PKTSIZE(m, align) \ roundup2((m)->m_pkthdr.len + HN_RNDIS_PKT_LEN, (align)) +#define HN_RING_IDX2CPU(sc, idx) (((sc)->hn_cpu + (idx)) % mp_ncpus) + struct hn_txdesc { #ifndef HN_USE_TXDESC_BUFRING SLIST_ENTRY(hn_txdesc) link; @@ -414,10 +416,18 @@ SYSCTL_INT(_hw_hn, OID_AUTO, lro_entry_c #endif #endif -/* Use shared TX taskqueue */ -static int hn_share_tx_taskq = 0; -SYSCTL_INT(_hw_hn, OID_AUTO, share_tx_taskq, CTLFLAG_RDTUN, -&hn_share_tx_taskq, 0, "Enable shared TX taskqueue"); +static int hn_tx_taskq_cnt = 1; +SYSCTL_INT(_hw_hn, OID_AUTO, tx_taskq_cnt, CTLFLAG_RDTUN, +&hn_tx_taskq_cnt, 0, "# of TX taskqueues"); + +#define HN_TX_TASKQ_M_INDEP0 +#define HN_TX_TASKQ_M_GLOBAL 1 +#define HN_TX_TASKQ_M_EVTTQ2 + +static int hn_tx_taskq_mode = HN_TX_TASKQ_M_INDEP; +SYSCTL_INT(_hw_hn, OID_AUTO, tx_taskq_mode, CTLFLAG_RDTUN, +&hn_tx_taskq_mode, 0, "TX taskqueue modes: " +"0 - independent, 1 - share global tx taskqs, 2 - share event taskqs"); #ifndef HN_USE_TXDESC_BUFRING static int hn_use_txdesc_bufring = 0; @@ -427,11 +437,6 @@ static int hn_use_txdesc_bufring = 1; SYSCTL_INT(_hw_hn, OID_AUTO, use_txdesc_bufring, CTLFLAG_RD, &hn_use_txdesc_bufring, 0, "Use buf_ring for TX descriptors"); -/* Bind TX taskqueue to the target CPU */ -static int hn_bind_tx_taskq = -1; -SYSCTL_INT(_hw_hn, OID_AUTO, bind_tx_taskq, CTLFLAG_RDTUN, -&hn_bind_tx_taskq, 0, "Bind TX taskqueue to the specified cpu"); - #ifdef HN_IFSTART_SUPPORT /* Use ifnet.if_start instead of ifnet.if_transmit */ static int hn_use_if_start = 0; @@ -473,7 +478,7 @@ SYSCTL_INT(_hw_hn, OID_AUTO, tx_agg_pkts &hn_tx_agg_pkts, 0, "Packet transmission aggregation packet limit"); static u_int hn_cpu_index; /* next CPU for channel */ -static struct taskqueue*hn_tx_taskq; /* shared TX taskqueue */ +static struct taskqueue**hn_tx_taskque;/* shared TX taskqueues */ static const uint8_t hn_rss_key_default[NDIS_HASH_KEYSIZE_TOEPLITZ] = { @@ -883,19 +888,6 @@ hn_probe(device_t dev) return ENXIO; } -static void -hn_cpuset_setthread_task(void *xmask, int pending __unused) -{ - cpuset_t *mask = xmask; - int error; - - error = cpuset_setthread(curthread->td_tid, mask); - if (error) { - panic("curthread=%ju: can't pin; error=%d", - (uintmax_t)curthread->td_tid, error); - } -} - static int hn_attach(device_t dev) { @@ -919,26 +911,21 @@ hn_attach(device_t dev) /* * Setup taskqueue for transmission. */ - if (hn_tx_taskq == NULL) { - sc->hn_tx_taskq = taskqueue_create("hn_tx", M_WAITOK, - taskqueue_thread_enqueue, &sc->hn_tx_taskq); - taskqueue_start_threads(&sc->hn_tx_taskq, 1, PI_NET, "%s tx", - device_get_nameunit(dev)); - if (hn_bind_tx_taskq >= 0) { - int cpu = hn_bind_tx_taskq; - struct task cpuset_task; - cpuset_t cpu_set; - - if (cpu > mp_ncpus - 1) - cpu = mp_ncpus - 1; - CPU_SETOF(cpu, &cpu
svn commit: r310769 - stable/10/sys/dev/hyperv/storvsc
Author: sephe Date: Thu Dec 29 09:10:37 2016 New Revision: 310769 URL: https://svnweb.freebsd.org/changeset/base/310769 Log: MFC 309320,309726,309728 309320 hyperv/storvsc: Don't use timedwait. The timeout is unnecessary. Reviewed by:jhb Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8656 309726 hyperv/storvsc: Fix the SCSI disk attachment issue. On pre-WS2016 Hyper-V, if the only LUNs > 7 are used, then all disks fails to attach. Mainly because those versions of Hyper-V do not set SRB_STATUS properly and deliver junky INQUERY responses. Submitted by: Hongjiang Zhang Reported by:Hongxiong Xian Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8724 309728 hyperv/storvsc: Minor style changes; no functional changes. Reported by:rpokala Sponsored by: Microsoft Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c == --- stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Thu Dec 29 09:02:49 2016(r310768) +++ stable/10/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c Thu Dec 29 09:10:37 2016(r310769) @@ -413,13 +413,7 @@ storvsc_send_multichannel_request(struct VMBUS_CHANPKT_TYPE_INBAND, VMBUS_CHANPKT_FLAG_RC, vstor_packet, VSTOR_PKT_SIZE, (uint64_t)(uintptr_t)request); - /* wait for 5 seconds */ - ret = sema_timedwait(&request->synch_sema, 5 * hz); - if (ret != 0) { - printf("Storvsc_error: create multi-channel timeout, %d\n", - ret); - return; - } + sema_wait(&request->synch_sema); if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || vstor_packet->status != 0) { @@ -486,10 +480,7 @@ hv_storvsc_channel_init(struct storvsc_s if (ret != 0) goto cleanup; - /* wait 5 seconds */ - ret = sema_timedwait(&request->synch_sema, 5 * hz); - if (ret != 0) - goto cleanup; + sema_wait(&request->synch_sema); if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || vstor_packet->status != 0) { @@ -516,11 +507,7 @@ hv_storvsc_channel_init(struct storvsc_s if (ret != 0) goto cleanup; - /* wait 5 seconds */ - ret = sema_timedwait(&request->synch_sema, 5 * hz); - - if (ret) - goto cleanup; + sema_wait(&request->synch_sema); if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO) { ret = EINVAL; @@ -555,11 +542,7 @@ hv_storvsc_channel_init(struct storvsc_s if ( ret != 0) goto cleanup; - /* wait 5 seconds */ - ret = sema_timedwait(&request->synch_sema, 5 * hz); - - if (ret != 0) - goto cleanup; + sema_wait(&request->synch_sema); /* TODO: Check returned version */ if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || @@ -588,11 +571,7 @@ hv_storvsc_channel_init(struct storvsc_s goto cleanup; } - /* wait 5 seconds */ - ret = sema_timedwait(&request->synch_sema, 5 * hz); - - if (ret != 0) - goto cleanup; + sema_wait(&request->synch_sema); if (vstor_packet->operation != VSTOR_OPERATION_COMPLETEIO || vstor_packet->status != 0) @@ -672,12 +651,7 @@ hv_storvsc_host_reset(struct storvsc_sof goto cleanup; } - ret = sema_timedwait(&request->synch_sema, 5 * hz); /* KYS 5 seconds */ - - if (ret) { - goto cleanup; - } - + sema_wait(&request->synch_sema); /* * At this point, all outstanding requests in the adapter @@ -2079,6 +2053,19 @@ create_storvsc_request(union ccb *ccb, s return(0); } +static uint32_t +is_scsi_valid(const struct scsi_inquiry_data *inq_data) +{ + u_int8_t type; + + type = SID_TYPE(inq_data); + if (type == T_NODEVICE) + return (0); + if (SID_QUAL(inq_data) == SID_QUAL_BAD_LU) + return (0); + return (1); +} + /** * @brief completion function before returning to CAM * @@ -2097,6 +2084,7 @@ storvsc_io_done(struct hv_storvsc_reques struct vmscsi_req *vm_srb = &reqp->vstor_packet.u.vm_srb; bus_dma_segment_t *ori_sglist = NULL; int ori_sg_count = 0; + /* destroy bounce buffer if it is used */ if (reqp->bounce_sgl_count) { ori_sglist = (bus_dma_segment_t *)ccb->csio.data_ptr; @@ -2151,6 +2139,7 @@ storv
svn commit: r310770 - head/sys/dev/sfxge
Author: arybchik Date: Thu Dec 29 09:15:27 2016 New Revision: 310770 URL: https://svnweb.freebsd.org/changeset/base/310770 Log: sfxge(4): cleanup: clarify/unify variable name used for put-list length get_count is used for get-list. Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c == --- head/sys/dev/sfxge/sfxge_tx.c Thu Dec 29 09:10:37 2016 (r310769) +++ head/sys/dev/sfxge/sfxge_tx.c Thu Dec 29 09:15:27 2016 (r310770) @@ -608,7 +608,7 @@ sfxge_tx_qdpl_put_unlocked(struct sfxge_ volatile uintptr_t *putp; uintptr_t old; uintptr_t new; - unsigned old_len; + unsigned int put_count; KASSERT(mbuf->m_nextpkt == NULL, ("mbuf->m_nextpkt != NULL")); @@ -622,14 +622,14 @@ sfxge_tx_qdpl_put_unlocked(struct sfxge_ old = *putp; if (old != 0) { struct mbuf *mp = (struct mbuf *)old; - old_len = mp->m_pkthdr.csum_data; + put_count = mp->m_pkthdr.csum_data; } else - old_len = 0; - if (old_len >= stdp->std_put_max) { + put_count = 0; + if (put_count >= stdp->std_put_max) { atomic_add_long(&txq->put_overflow, 1); return (ENOBUFS); } - mbuf->m_pkthdr.csum_data = old_len + 1; + mbuf->m_pkthdr.csum_data = put_count + 1; mbuf->m_nextpkt = (void *)old; } while (atomic_cmpset_ptr(putp, old, new) == 0); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310771 - stable/11/sys/netinet
Author: ae Date: Thu Dec 29 09:50:37 2016 New Revision: 310771 URL: https://svnweb.freebsd.org/changeset/base/310771 Log: MFC r309257: Rework ip_tryforward() to use FIB4 KPI. Modified: stable/11/sys/netinet/ip_fastfwd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/ip_fastfwd.c == --- stable/11/sys/netinet/ip_fastfwd.c Thu Dec 29 09:15:27 2016 (r310770) +++ stable/11/sys/netinet/ip_fastfwd.c Thu Dec 29 09:50:37 2016 (r310771) @@ -97,6 +97,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -107,40 +108,33 @@ __FBSDID("$FreeBSD$"); #include -static struct sockaddr_in * -ip_findroute(struct route *ro, struct in_addr dest, struct mbuf *m) +static int +ip_findroute(struct nhop4_basic *pnh, struct in_addr dest, struct mbuf *m) { - struct sockaddr_in *dst; - struct rtentry *rt; + bzero(pnh, sizeof(*pnh)); + if (fib4_lookup_nh_basic(M_GETFIB(m), dest, 0, 0, pnh) != 0) { + IPSTAT_INC(ips_noroute); + IPSTAT_INC(ips_cantforward); + icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, 0); + return (EHOSTUNREACH); + } /* -* Find route to destination. +* Drop blackholed traffic and directed broadcasts. */ - bzero(ro, sizeof(*ro)); - dst = (struct sockaddr_in *)&ro->ro_dst; - dst->sin_family = AF_INET; - dst->sin_len = sizeof(*dst); - dst->sin_addr.s_addr = dest.s_addr; - in_rtalloc_ign(ro, 0, M_GETFIB(m)); - - /* -* Route there and interface still up? -*/ - rt = ro->ro_rt; - if (rt && (rt->rt_flags & RTF_UP) && - (rt->rt_ifp->if_flags & IFF_UP) && - (rt->rt_ifp->if_drv_flags & IFF_DRV_RUNNING)) { - if (rt->rt_flags & RTF_GATEWAY) - dst = (struct sockaddr_in *)rt->rt_gateway; - } else { - IPSTAT_INC(ips_noroute); + if ((pnh->nh_flags & (NHF_BLACKHOLE | NHF_BROADCAST)) != 0) { + IPSTAT_INC(ips_cantforward); + m_freem(m); + return (EHOSTUNREACH); + } + + if (pnh->nh_flags & NHF_REJECT) { IPSTAT_INC(ips_cantforward); - if (rt) - RTFREE(rt); icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_HOST, 0, 0); - return NULL; + return (EHOSTUNREACH); } - return dst; + + return (0); } /* @@ -155,13 +149,11 @@ ip_tryforward(struct mbuf *m) { struct ip *ip; struct mbuf *m0 = NULL; - struct route ro; - struct sockaddr_in *dst = NULL; - struct ifnet *ifp; + struct nhop4_basic nh; + struct sockaddr_in dst; struct in_addr odest, dest; uint16_t ip_len, ip_off; int error = 0; - int mtu; struct m_tag *fwd_tag = NULL; /* @@ -171,9 +163,6 @@ ip_tryforward(struct mbuf *m) M_ASSERTVALID(m); M_ASSERTPKTHDR(m); - bzero(&ro, sizeof(ro)); - - #ifdef ALTQ /* * Is packet dropped by traffic conditioner? @@ -305,29 +294,17 @@ passin: /* * Find route to destination. */ - if ((dst = ip_findroute(&ro, dest, m)) == NULL) - return NULL;/* icmp unreach already sent */ - ifp = ro.ro_rt->rt_ifp; - - /* -* Immediately drop blackholed traffic, and directed broadcasts -* for either the all-ones or all-zero subnet addresses on -* locally attached networks. -*/ - if ((ro.ro_rt->rt_flags & (RTF_BLACKHOLE|RTF_BROADCAST)) != 0) - goto drop; + if (ip_findroute(&nh, dest, m) != 0) + return (NULL); /* icmp unreach already sent */ /* * Step 5: outgoing firewall packet processing */ - - /* -* Run through list of hooks for output packets. -*/ if (!PFIL_HOOKED(&V_inet_pfil_hook)) goto passout; - if (pfil_run_hooks(&V_inet_pfil_hook, &m, ifp, PFIL_OUT, NULL) || m == NULL) { + if (pfil_run_hooks(&V_inet_pfil_hook, &m, nh.nh_ifp, PFIL_OUT, NULL) || + m == NULL) { goto drop; } @@ -352,9 +329,7 @@ forwardlocal: * Return packet for processing by ip_input(). */ m->m_flags |= M_FASTFWD_OURS; - if (ro.ro_rt) - RTFREE(ro.ro_rt); - return m; + return (m); } /* * Redo route lookup with new destination address @@ -365,10 +340,8 @@ forwardlocal: m_tag_delete(m, fwd_tag); m->m_flags &= ~M_IP_NEXTHOP; }
svn commit: r310772 - stable/11/sys/netinet
Author: tuexen Date: Thu Dec 29 11:25:41 2016 New Revision: 310772 URL: https://svnweb.freebsd.org/changeset/base/310772 Log: MFC r310547: Remove a KASSERT which is not always true. In case of the empty queue tp->snd_holes and tcp_sackhole_insert() failing due to memory shortage, tp->snd_holes will be empty. This problem was hit when stress tests where performed by pho. PR: 215513 Reported by: pho Tested by:pho Sponsored by: Netflix, Inc. Modified: stable/11/sys/netinet/tcp_sack.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_sack.c == --- stable/11/sys/netinet/tcp_sack.cThu Dec 29 09:50:37 2016 (r310771) +++ stable/11/sys/netinet/tcp_sack.cThu Dec 29 11:25:41 2016 (r310772) @@ -470,9 +470,6 @@ tcp_sack_doack(struct tcpcb *tp, struct tp->snd_fack = sblkp->end; sack_changed = 1; } - /* We must have at least one SACK hole in scoreboard. */ - KASSERT(!TAILQ_EMPTY(&tp->snd_holes), - ("SACK scoreboard must not be empty")); cur = TAILQ_LAST(&tp->snd_holes, sackhole_head); /* Last SACK hole. */ /* * Since the incoming sack blocks are sorted, we can process them ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310773 - in stable/11/sys: netinet netinet6
Author: tuexen Date: Thu Dec 29 11:32:42 2016 New Revision: 310773 URL: https://svnweb.freebsd.org/changeset/base/310773 Log: MFC r310590: Whitespace changes. The toolchain for processing the sources has been updated. No functional change. Modified: stable/11/sys/netinet/sctp_asconf.c stable/11/sys/netinet/sctp_auth.c stable/11/sys/netinet/sctp_auth.h stable/11/sys/netinet/sctp_bsd_addr.c stable/11/sys/netinet/sctp_bsd_addr.h stable/11/sys/netinet/sctp_cc_functions.c stable/11/sys/netinet/sctp_crc32.c stable/11/sys/netinet/sctp_indata.c stable/11/sys/netinet/sctp_indata.h stable/11/sys/netinet/sctp_input.c stable/11/sys/netinet/sctp_input.h stable/11/sys/netinet/sctp_output.c stable/11/sys/netinet/sctp_output.h stable/11/sys/netinet/sctp_pcb.c stable/11/sys/netinet/sctp_pcb.h stable/11/sys/netinet/sctp_ss_functions.c stable/11/sys/netinet/sctp_structs.h stable/11/sys/netinet/sctp_sysctl.c stable/11/sys/netinet/sctp_timer.c stable/11/sys/netinet/sctp_usrreq.c stable/11/sys/netinet/sctputil.c stable/11/sys/netinet/sctputil.h stable/11/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/sctp_asconf.c == --- stable/11/sys/netinet/sctp_asconf.c Thu Dec 29 11:25:41 2016 (r310772) +++ stable/11/sys/netinet/sctp_asconf.c Thu Dec 29 11:32:42 2016 (r310773) @@ -97,7 +97,7 @@ sctp_asconf_success_response(uint32_t id } static struct mbuf * -sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t * error_tlv, +sctp_asconf_error_response(uint32_t id, uint16_t cause, uint8_t *error_tlv, uint16_t tlv_length) { struct mbuf *m_reply = NULL; @@ -132,7 +132,7 @@ sctp_asconf_error_response(uint32_t id, return (NULL); } if (error_tlv != NULL) { - tlv = (uint8_t *) (error + 1); + tlv = (uint8_t *)(error + 1); memcpy(tlv, error_tlv, tlv_length); } SCTP_BUF_LEN(m_reply) = aph->ph.param_length; @@ -222,7 +222,7 @@ sctp_process_asconf_add_ip(struct sockad #endif default: m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, + SCTP_CAUSE_INVALID_PARAM, (uint8_t *)aph, aparam_length); return (m_reply); } /* end switch */ @@ -237,7 +237,7 @@ sctp_process_asconf_add_ip(struct sockad /* add the address */ if (bad_address) { m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, + SCTP_CAUSE_INVALID_PARAM, (uint8_t *)aph, aparam_length); } else if (sctp_add_remote_addr(stcb, sa, &net, stcb->asoc.port, SCTP_DONOT_SETSCOPE, @@ -245,7 +245,7 @@ sctp_process_asconf_add_ip(struct sockad SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_add_ip: error adding address\n"); m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_RESOURCE_SHORTAGE, (uint8_t *) aph, + SCTP_CAUSE_RESOURCE_SHORTAGE, (uint8_t *)aph, aparam_length); } else { /* notify upper layer */ @@ -367,7 +367,7 @@ sctp_process_asconf_delete_ip(struct soc #endif default: m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, + SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *)aph, aparam_length); return (m_reply); } @@ -377,7 +377,7 @@ sctp_process_asconf_delete_ip(struct soc /* trying to delete the source address! */ SCTPDBG(SCTP_DEBUG_ASCONF1, "process_asconf_delete_ip: tried to delete source addr\n"); m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_DELETING_SRC_ADDR, (uint8_t *) aph, + SCTP_CAUSE_DELETING_SRC_ADDR, (uint8_t *)aph, aparam_length); return (m_reply); } @@ -391,7 +391,7 @@ sctp_process_asconf_delete_ip(struct soc /* what error to reply with?? */ m_reply = sctp_asconf_error_response(aph->correlation_id, - SCTP_CAUSE_REQUEST_REFUSED, (uint8_t *) aph, + SCTP_CAUSE_REQUEST_REFUSED, (uint8_t *)aph, aparam_length); } else if (response_required) { m_reply = @@ -410,7 +410,7 @@ sctp_process_asconf_delete_ip(struct soc /* only one address in the asoc */ SCTPD
Re: svn commit: r310234 - head/sys/vm
On Wed, Dec 28, 2016 at 07:03:52PM -0800, Adrian Chadd wrote: > hi, > > I've bisected a boot failure on mips24k (carambola2) to this commit. > Nothing useful is printed - it hangs at startup time. What do you mean exactly ? Is copyright notice printed ? Show verbose dmesg of the failing boot. > > Any ideas? No. The patch you picked changes code that is only executed for the shadowed anonymous memory. AFAIK, including mips, there is no shadow chains in the kernel map. Such constructs are only instantiated when user space is operating and forking. Even if such data structure appears in the kernel mappings, vm object code is not initialized until much later in the boot, at vm_init stage. > > > -adrian > > > On 18 December 2016 at 12:56, Konstantin Belousov wrote: > > Author: kib > > Date: Sun Dec 18 20:56:14 2016 > > New Revision: 310234 > > URL: https://svnweb.freebsd.org/changeset/base/310234 > > > > Log: > > Improve vm_object_scan_all_shadowed() to also check swap backing objects. > > > > As noted in the removed comment, it is possible and not prohibitively > > costly to look up the swap blocks for the given page index. Implement > > a swap_pager_find_least() function to do that, and use it to iterate > > simultaneously over both backing object page queue and swap > > allocations when looking for shadowed pages. > > > > Testing shows that number of new succesful scans, enabled by this > > addition, is small but non-zero. When worked out, the change both > > further reduces the depth of the shadow object chain, and frees unused > > but allocated swap and memory. > > > > Suggested and reviewed by:alc > > Tested by:pho (previous version) > > Sponsored by: The FreeBSD Foundation > > MFC after:2 weeks > > > > Modified: > > head/sys/vm/swap_pager.c > > head/sys/vm/swap_pager.h > > head/sys/vm/vm_object.c > > > > Modified: head/sys/vm/swap_pager.c > > == > > --- head/sys/vm/swap_pager.cSun Dec 18 20:40:22 2016(r310233) > > +++ head/sys/vm/swap_pager.cSun Dec 18 20:56:14 2016(r310234) > > @@ -2013,6 +2013,44 @@ swp_pager_meta_ctl(vm_object_t object, v > > } > > > > /* > > + * Returns the least page index which is greater than or equal to the > > + * parameter pindex and for which there is a swap block allocated. > > + * Returns object's size if the object's type is not swap or if there > > + * are no allocated swap blocks for the object after the requested > > + * pindex. > > + */ > > +vm_pindex_t > > +swap_pager_find_least(vm_object_t object, vm_pindex_t pindex) > > +{ > > + struct swblock **pswap, *swap; > > + vm_pindex_t i, j, lim; > > + int idx; > > + > > + VM_OBJECT_ASSERT_LOCKED(object); > > + if (object->type != OBJT_SWAP || object->un_pager.swp.swp_bcount == > > 0) > > + return (object->size); > > + > > + mtx_lock(&swhash_mtx); > > + for (j = pindex; j < object->size; j = lim) { > > + pswap = swp_pager_hash(object, j); > > + lim = rounddown2(j + SWAP_META_PAGES, SWAP_META_PAGES); > > + if (lim > object->size) > > + lim = object->size; > > + if ((swap = *pswap) != NULL) { > > + for (idx = j & SWAP_META_MASK, i = j; i < lim; > > + i++, idx++) { > > + if (swap->swb_pages[idx] != SWAPBLK_NONE) > > + goto found; > > + } > > + } > > + } > > + i = object->size; > > +found: > > + mtx_unlock(&swhash_mtx); > > + return (i); > > +} > > + > > +/* > > * System call swapon(name) enables swapping on device name, > > * which must be in the swdevsw. Return EBUSY > > * if already swapping on this device. > > > > Modified: head/sys/vm/swap_pager.h > > == > > --- head/sys/vm/swap_pager.hSun Dec 18 20:40:22 2016(r310233) > > +++ head/sys/vm/swap_pager.hSun Dec 18 20:56:14 2016(r310234) > > @@ -79,6 +79,7 @@ extern int swap_pager_avail; > > struct xswdev; > > int swap_dev_info(int name, struct xswdev *xs, char *devname, size_t len); > > void swap_pager_copy(vm_object_t, vm_object_t, vm_pindex_t, int); > > +vm_pindex_t swap_pager_find_least(vm_object_t object, vm_pindex_t pindex); > > void swap_pager_freespace(vm_object_t, vm_pindex_t, vm_size_t); > > void swap_pager_swap_init(void); > > int swap_pager_isswapped(vm_object_t, struct swdevt *); > > > > Modified: head/sys/vm/vm_object.c > > == > > --- head/sys/vm/vm_object.c Sun Dec 18 20:40:22 2016(r310233) > > +++ head/sys/vm/vm_object.c Sun Dec 18 20:56:14 2016(r310234) > > @@ -1436,36 +1436,40 @@ vm_object_
svn commit: r310774 - head/sys/kern
Author: mjg Date: Thu Dec 29 12:01:54 2016 New Revision: 310774 URL: https://svnweb.freebsd.org/changeset/base/310774 Log: cache: move shrink lock init to nchinit This gets rid of unnecesary sysinit usage. While here also rename the lock to be consistent with the rest. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Thu Dec 29 11:32:42 2016(r310773) +++ head/sys/kern/vfs_cache.c Thu Dec 29 12:01:54 2016(r310774) @@ -229,8 +229,6 @@ SYSCTL_UINT(_vfs, OID_AUTO, ncneghitsreq struct nchstatsnchstats; /* cache effectiveness statistics */ static struct mtx ncneg_shrink_lock; -MTX_SYSINIT(vfscache_shrink_neg, &ncneg_shrink_lock, "Name Cache shrink neg", -MTX_DEF); struct neglist { struct mtx nl_lock; @@ -1802,6 +1800,8 @@ nchinit(void *dummy __unused) mtx_init(&ncneg_hot.nl_lock, "ncneglh", NULL, MTX_DEF); TAILQ_INIT(&ncneg_hot.nl_list); + mtx_init(&ncneg_shrink_lock, "ncnegs", NULL, MTX_DEF); + numcalls = counter_u64_alloc(M_WAITOK); dothits = counter_u64_alloc(M_WAITOK); dotdothits = counter_u64_alloc(M_WAITOK); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r310234 - head/sys/vm
Hiya, It hung completely. No echoing, no early printf (after I added it), nothing. I dug into it some more and yes, it doesn't seem to be this. Something else is causing the now much larger kernel then before to not boot. Sorry! Thanks for the explanation though! -adrian ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310775 - in head: lib/clang/libllvm usr.bin/clang
Author: dim Date: Thu Dec 29 13:27:04 2016 New Revision: 310775 URL: https://svnweb.freebsd.org/changeset/base/310775 Log: Move llvm-objdump from CLANG_EXTRAS to installed by default We currently install three tools from binutils 2.17.50: as, ld, and objdump. Work is underway to migrate to a permissively-licensed tool-chain, with one goal being the retirement of binutils 2.17.50. LLVM's llvm-objdump is intended to be compatible with GNU objdump although it is currently missing some options and may have formatting differences. Enable it by default for testing and further investigation. It may later be changed to install as /usr/bin/objdump, it becomes a fully viable replacement. Reviewed by: emaste Differential Revision:https://reviews.freebsd.org/D8879 Modified: head/lib/clang/libllvm/Makefile head/usr.bin/clang/Makefile Modified: head/lib/clang/libllvm/Makefile == --- head/lib/clang/libllvm/Makefile Thu Dec 29 12:01:54 2016 (r310774) +++ head/lib/clang/libllvm/Makefile Thu Dec 29 13:27:04 2016 (r310775) @@ -308,24 +308,24 @@ SRCS_MIN+=DebugInfo/CodeView/TypeRecord SRCS_MIN+= DebugInfo/CodeView/TypeRecordBuilder.cpp SRCS_MIN+= DebugInfo/CodeView/TypeStreamMerger.cpp SRCS_MIN+= DebugInfo/CodeView/TypeTableBuilder.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFAcceleratorTable.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFCompileUnit.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFContext.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFDebugAbbrev.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFDebugArangeSet.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFDebugAranges.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFDebugFrame.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFDebugInfoEntry.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFDebugLine.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFDebugLoc.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFDebugMacro.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFDebugRangeList.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFFormValue.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFTypeUnit.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFUnit.cpp -SRCS_EXT+= DebugInfo/DWARF/DWARFUnitIndex.cpp -SRCS_EXT+= DebugInfo/DWARF/SyntaxHighlighting.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFAcceleratorTable.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFCompileUnit.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFContext.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFDebugAbbrev.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFDebugArangeSet.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFDebugAranges.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFDebugFrame.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFDebugInfoEntry.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFDebugLine.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFDebugLoc.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFDebugMacro.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFDebugRangeList.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFFormValue.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFTypeUnit.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFUnit.cpp +SRCS_MIW+= DebugInfo/DWARF/DWARFUnitIndex.cpp +SRCS_MIW+= DebugInfo/DWARF/SyntaxHighlighting.cpp SRCS_EXT+= DebugInfo/PDB/GenericError.cpp SRCS_EXT+= DebugInfo/PDB/PDB.cpp SRCS_EXT+= DebugInfo/PDB/PDBContext.cpp @@ -699,7 +699,7 @@ SRCS_MIN+= Target/AArch64/AArch64TargetO SRCS_MIN+= Target/AArch64/AArch64TargetTransformInfo.cpp SRCS_MIN+= Target/AArch64/AsmParser/AArch64AsmParser.cpp SRCS_XDB+= Target/AArch64/Disassembler/AArch64Disassembler.cpp -SRCS_XDB+= Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp +SRCS_XDW+= Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp SRCS_MIN+= Target/AArch64/InstPrinter/AArch64InstPrinter.cpp SRCS_MIN+= Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp SRCS_MIN+= Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp @@ -880,7 +880,7 @@ SRCS_MIN+= Target/TargetSubtargetInfo.cp SRCS_MIN+= Target/X86/AsmParser/X86AsmInstrumentation.cpp SRCS_MIN+= Target/X86/AsmParser/X86AsmParser.cpp SRCS_XDB+= Target/X86/Disassembler/X86Disassembler.cpp -SRCS_XDB+= Target/X86/Disassembler/X86DisassemblerDecoder.cpp +SRCS_XDW+= Target/X86/Disassembler/X86DisassemblerDecoder.cpp SRCS_MIN+= Target/X86/InstPrinter/X86ATTInstPrinter.cpp SRCS_MIN+= Target/X86/InstPrinter/X86InstComments.cpp SRCS_MIN+= Target/X86/InstPrinter/X86IntelInstPrinter.cpp @@ -1090,6 +1090,9 @@ SRCS_MIN+=Transforms/Vectorize/SLPVecto SRCS_EXT+= Transforms/Vectorize/Vectorize.cpp SRCS_ALL+= ${SRCS_MIN} +.if !defined(TOOLS_PREFIX) +SRCS_ALL+= ${SRCS_MIW} +.endif .if ${MK_CLANG_EXTRAS} != "no" SRCS_ALL+= ${SRCS_EXT} .endif @@ -1105,6 +1108,9 @@ SRCS_ALL+=${SRCS_XDB} .if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "n
svn commit: r310776 - head/sys/mips/ingenic
Author: jmcneill Date: Thu Dec 29 14:00:10 2016 New Revision: 310776 URL: https://svnweb.freebsd.org/changeset/base/310776 Log: The JZ4780 I2S can feed either the internal audio codec or the HDMI transmitter, but not both at the same time. This patch: - Adds a dev.pcm.0.internal_codec sysctl node for selecting between internal and external codec - Changes playback sample rate from 96 kHz to 48 kHz for HDMI compatibility - Enables i2s clock on codec access Reviewed by: br Differential Revision:https://reviews.freebsd.org/D8960 Modified: head/sys/mips/ingenic/jz4780_aic.c head/sys/mips/ingenic/jz4780_codec.c head/sys/mips/ingenic/jz4780_codec.h Modified: head/sys/mips/ingenic/jz4780_aic.c == --- head/sys/mips/ingenic/jz4780_aic.c Thu Dec 29 13:27:04 2016 (r310775) +++ head/sys/mips/ingenic/jz4780_aic.c Thu Dec 29 14:00:10 2016 (r310776) @@ -81,6 +81,7 @@ struct aic_softc { void*ih; struct xdma_channel *xchan; xdma_controller_t *xdma_tx; + int internal_codec; }; /* Channel registers */ @@ -120,7 +121,7 @@ struct aic_rate { }; static struct aic_rate rate_map[] = { - { 96000 }, + { 48000 }, /* TODO: add more frequences */ { 0 }, }; @@ -355,7 +356,6 @@ aic_start(struct sc_pcminfo *scp) int reg; sc = scp->sc; - sc->pos = 0; /* Ensure clock enabled. */ reg = READ4(sc, I2SCR); @@ -387,10 +387,6 @@ aic_stop(struct sc_pcminfo *scp) xdma_terminate(sc->xchan); - sc->pos = 0; - - bzero(sc->buf_base, sc->dma_size); - return (0); } @@ -411,6 +407,8 @@ aicchan_trigger(kobj_t obj, void *data, case PCMTRIG_START: ch->run = 1; + sc->pos = 0; + aic_start(scp); break; @@ -421,6 +419,10 @@ aicchan_trigger(kobj_t obj, void *data, aic_stop(scp); + sc->pos = 0; + + bzero(sc->buf_base, sc->dma_size); + break; } @@ -448,7 +450,7 @@ static uint32_t aic_pfmt[] = { 0 }; -static struct pcmchan_caps aic_pcaps = {96000, 96000, aic_pfmt, 0}; +static struct pcmchan_caps aic_pcaps = {48000, 48000, aic_pfmt, 0}; static struct pcmchan_caps * aicchan_getcaps(kobj_t obj, void *data) @@ -583,16 +585,13 @@ aic_configure_clocks(struct aic_softc *s static int aic_configure(struct aic_softc *sc) { - int internal_codec; int reg; - internal_codec = 1; - WRITE4(sc, AICFR, AICFR_RST); /* Configure AIC */ reg = 0; - if (internal_codec) { + if (sc->internal_codec) { reg |= (AICFR_ICDC); } else { reg |= (AICFR_SYNCD | AICFR_BCKD); @@ -610,6 +609,48 @@ aic_configure(struct aic_softc *sc) } static int +sysctl_hw_pcm_internal_codec(SYSCTL_HANDLER_ARGS) +{ + struct sc_pcminfo *scp; + struct sc_chinfo *ch; + struct aic_softc *sc; + int error, val; + + if (arg1 == NULL) + return (EINVAL); + + scp = arg1; + sc = scp->sc; + ch = &scp->chan[0]; + + snd_mtxlock(sc->lock); + + val = sc->internal_codec; + error = sysctl_handle_int(oidp, &val, 0, req); + if (error || req->newptr == NULL) { + snd_mtxunlock(sc->lock); + return (error); + } + if (val < 0 || val > 1) { + snd_mtxunlock(sc->lock); + return (EINVAL); + } + + if (sc->internal_codec != val) { + sc->internal_codec = val; + if (ch->run) + aic_stop(scp); + aic_configure(sc); + if (ch->run) + aic_start(scp); + } + + snd_mtxunlock(sc->lock); + + return (0); +} + +static int aic_probe(device_t dev) { @@ -635,6 +676,7 @@ aic_attach(device_t dev) sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO); sc->dev = dev; sc->pos = 0; + sc->internal_codec = 1; /* Get xDMA controller */ sc->xdma_tx = xdma_ofw_get(sc->dev, "tx"); @@ -718,6 +760,13 @@ aic_attach(device_t dev) mixer_init(dev, &aicmixer_class, scp); + /* Create device sysctl node. */ + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "internal_codec", CTLTYPE_INT | CTLFLAG_RW, + scp, 0, sysctl_hw_pcm_internal_codec, "I", + "use internal audio codec"); + return (0); } Modified: head/sys/mips/ingenic/jz4780_codec.c == --- head/sys/mips/ingenic/jz4780_codec.cThu Dec 29 13:27:04 2016 (r310775) +++ head/sys/mips/ingenic/
svn commit: r310777 - in head/sys: arm/freescale/imx dev/hdmi
Author: jmcneill Date: Thu Dec 29 14:08:24 2016 New Revision: 310777 URL: https://svnweb.freebsd.org/changeset/base/310777 Log: Add support for audio on I2S based DesignWare HDMI controllers. Relnotes: yes Modified: head/sys/arm/freescale/imx/imx6_hdmi.c head/sys/dev/hdmi/dwc_hdmi.c head/sys/dev/hdmi/dwc_hdmi.h head/sys/dev/hdmi/dwc_hdmi_fdt.c head/sys/dev/hdmi/dwc_hdmireg.h Modified: head/sys/arm/freescale/imx/imx6_hdmi.c == --- head/sys/arm/freescale/imx/imx6_hdmi.c Thu Dec 29 14:00:10 2016 (r310776) +++ head/sys/arm/freescale/imx/imx6_hdmi.c Thu Dec 29 14:08:24 2016 (r310777) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include Modified: head/sys/dev/hdmi/dwc_hdmi.c == --- head/sys/dev/hdmi/dwc_hdmi.cThu Dec 29 14:00:10 2016 (r310776) +++ head/sys/dev/hdmi/dwc_hdmi.cThu Dec 29 14:08:24 2016 (r310777) @@ -53,8 +53,23 @@ __FBSDID("$FreeBSD$"); #include "hdmi_if.h" #defineI2C_DDC_ADDR(0x50 << 1) +#defineI2C_DDC_SEGADDR (0x30 << 1) #defineEDID_LENGTH 0x80 +#defineEXT_TAG 0x00 +#defineCEA_TAG_ID 0x02 +#defineCEA_DTD 0x03 +#defineDTD_BASIC_AUDIO (1 << 6) +#defineCEA_REV 0x02 +#defineCEA_DATA_OFF0x03 +#defineCEA_DATA_START 4 +#defineBLOCK_TAG(x)(((x) >> 5) & 0x7) +#defineBLOCK_TAG_VSDB 3 +#defineBLOCK_LEN(x)((x) & 0x1f) +#defineHDMI_VSDB_MINLEN5 +#defineHDMI_OUI"\x03\x0c\x00" +#defineHDMI_OUI_LEN3 + static void dwc_hdmi_phy_wait_i2c_done(struct dwc_hdmi_softc *sc, int msec) { @@ -122,7 +137,7 @@ dwc_hdmi_av_composer(struct dwc_hdmi_sof HDMI_FC_INVIDCONF_IN_I_P_PROGRESSIVE); /* TODO: implement HDMI part */ - is_dvi = 1; + is_dvi = sc->sc_has_audio == 0; inv_val |= (is_dvi ? HDMI_FC_INVIDCONF_DVI_MODEZ_DVI_MODE : HDMI_FC_INVIDCONF_DVI_MODEZ_HDMI_MODE); @@ -419,6 +434,70 @@ dwc_hdmi_enable_video_path(struct dwc_hd } static void +dwc_hdmi_configure_audio(struct dwc_hdmi_softc *sc) +{ + unsigned int n; + uint8_t val; + + if (sc->sc_has_audio == 0) + return; + + /* The following values are for 48 kHz */ + switch (sc->sc_mode.dot_clock) { + case 25170: + n = 6864; + break; + case 27020: + n = 6144; + break; + case 74170: + n = 11648; + break; + case 148350: + n = 5824; + break; + default: + n = 6144; + break; + } + + WR1(sc, HDMI_AUD_N1, (n >> 0) & 0xff); + WR1(sc, HDMI_AUD_N2, (n >> 8) & 0xff); + WR1(sc, HDMI_AUD_N3, (n >> 16) & 0xff); + + val = RD1(sc, HDMI_AUD_CTS3); + val &= ~(HDMI_AUD_CTS3_N_SHIFT_MASK | HDMI_AUD_CTS3_CTS_MANUAL); + WR1(sc, HDMI_AUD_CTS3, val); + + val = RD1(sc, HDMI_AUD_CONF0); + val &= ~HDMI_AUD_CONF0_INTERFACE_MASK; + val |= HDMI_AUD_CONF0_INTERFACE_IIS; + val &= ~HDMI_AUD_CONF0_I2SINEN_MASK; + val |= HDMI_AUD_CONF0_I2SINEN_CH2; + WR1(sc, HDMI_AUD_CONF0, val); + + val = RD1(sc, HDMI_AUD_CONF1); + val &= ~HDMI_AUD_CONF1_DATAMODE_MASK; + val |= HDMI_AUD_CONF1_DATAMODE_IIS; + val &= ~HDMI_AUD_CONF1_DATWIDTH_MASK; + val |= HDMI_AUD_CONF1_DATWIDTH_16BIT; + WR1(sc, HDMI_AUD_CONF1, val); + + WR1(sc, HDMI_AUD_INPUTCLKFS, HDMI_AUD_INPUTCLKFS_64); + + WR1(sc, HDMI_FC_AUDICONF0, 1 << 4); /* CC=1 */ + WR1(sc, HDMI_FC_AUDICONF1, 0); + WR1(sc, HDMI_FC_AUDICONF2, 0); /* CA=0 */ + WR1(sc, HDMI_FC_AUDICONF3, 0); + WR1(sc, HDMI_FC_AUDSV, 0xee); /* channels valid */ + + /* Enable audio clock */ + val = RD1(sc, HDMI_MC_CLKDIS); + val &= ~HDMI_MC_CLKDIS_AUDCLK_DISABLE; + WR1(sc, HDMI_MC_CLKDIS, val); +} + +static void dwc_hdmi_video_packetize(struct dwc_hdmi_softc *sc) { unsigned int color_depth = 0; @@ -552,11 +631,15 @@ static int dwc_hdmi_set_mode(struct dwc_hdmi_softc *sc) { + /* XXX */ + sc->sc_has_audio = 1; + dwc_hdmi_disable_overflow_interrupts(sc); dwc_hdmi_av_composer(sc); dwc_hdmi_phy_init(sc); dwc_hdmi_enable_video_path(sc); - /* TODO: AVI infoframes */ + dwc_hdmi_configure_audio(sc); + /* TODO: dwc_hdmi_config_avi(sc); */ dwc_hdmi_video_packetize(sc); /* TODO: dwc_hdmi_video_csc(sc); */ dwc_hdmi_video_sample(sc); @@ -567,14 +650,17 @@ dwc_hd
Re: svn commit: r310773 - in stable/11/sys: netinet netinet6
> Author: tuexen > Date: Thu Dec 29 11:32:42 2016 > New Revision: 310773 > URL: https://svnweb.freebsd.org/changeset/base/310773 > > Log: > MFC r310590: > > Whitespace changes. > > The toolchain for processing the sources has been updated. No functional > change. What tool chain? It is still broken in at least 1 respect: > /* now use the rest of the mbuf chain for the text */ > while (m_tmp != NULL) { > if ((SCTP_BUF_NEXT(m_tmp) == NULL) && trailer) { > - sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t > *) + m_offset, > + sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t > *)+m_offset, ^^ > SCTP_BUF_LEN(m_tmp) - (trailer + m_offset)); > } else { > - sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t > *) + m_offset, > + sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t > *)+m_offset, ^^^ > SCTP_BUF_LEN(m_tmp) - m_offset); > } > ... others errors of this type occur in this patch. I think it would of been better to revert the old patch that messed up some comments before creating this change as now there are other changes intermingled making the 2 changes inter-dependent. Even with this small nit, I applaud the number of style(9) corrections! -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310778 - head/sys/cam/ctl
Author: mav Date: Thu Dec 29 15:09:34 2016 New Revision: 310778 URL: https://svnweb.freebsd.org/changeset/base/310778 Log: Improve use of I/O's private area. - Since I/Os are allocates from per-port pools, make allocations store pointer to CTL softc there, and use it where needed instead of global. - Created bunch of helper macros to access LUN, port and CTL softc. MFC after: 2 weeks Modified: head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_backend_block.c head/sys/cam/ctl/ctl_backend_ramdisk.c head/sys/cam/ctl/ctl_error.c head/sys/cam/ctl/ctl_io.h head/sys/cam/ctl/ctl_tpc.c Modified: head/sys/cam/ctl/ctl.c == --- head/sys/cam/ctl/ctl.c Thu Dec 29 14:08:24 2016(r310777) +++ head/sys/cam/ctl/ctl.c Thu Dec 29 15:09:34 2016(r310778) @@ -437,7 +437,6 @@ static int ctl_alloc_lun(struct ctl_soft struct ctl_be_lun *be_lun); static int ctl_free_lun(struct ctl_lun *lun); static void ctl_create_lun(struct ctl_be_lun *be_lun); -static struct ctl_port * ctl_io_port(struct ctl_io_hdr *io_hdr); static int ctl_do_mode_select(union ctl_io *io); static int ctl_pro_preempt(struct ctl_softc *softc, struct ctl_lun *lun, @@ -448,7 +447,7 @@ static int ctl_pro_preempt(struct ctl_so struct scsi_per_res_out_parms* param); static void ctl_pro_preempt_other(struct ctl_lun *lun, union ctl_ha_msg *msg); -static void ctl_hndl_per_res_out_on_other_sc(union ctl_ha_msg *msg); +static void ctl_hndl_per_res_out_on_other_sc(union ctl_io *io); static int ctl_inquiry_evpd_supported(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_serial(struct ctl_scsiio *ctsio, int alloc_len); static int ctl_inquiry_evpd_devid(struct ctl_scsiio *ctsio, int alloc_len); @@ -567,13 +566,12 @@ static struct ctl_frontend ha_frontend = static void ctl_ha_datamove(union ctl_io *io) { - struct ctl_lun *lun; + struct ctl_lun *lun = CTL_LUN(io); struct ctl_sg_entry *sgl; union ctl_ha_msg msg; uint32_t sg_entries_sent; int do_sg_copy, i, j; - lun = (struct ctl_lun *)io->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; memset(&msg.dt, 0, sizeof(msg.dt)); msg.hdr.msg_type = CTL_MSG_DATAMOVE; msg.hdr.original_sc = io->io_hdr.original_sc; @@ -1803,7 +1801,8 @@ ctl_init(void) args.mda_si_drv1 = softc; error = make_dev_s(&args, &softc->dev, "cam/ctl"); if (error != 0) { - free(control_softc, M_DEVBUF); + free(softc, M_DEVBUF); + control_softc = NULL; return (error); } @@ -1815,7 +1814,7 @@ ctl_init(void) if (softc->sysctl_tree == NULL) { printf("%s: unable to allocate sysctl tree\n", __func__); destroy_dev(softc->dev); - free(control_softc, M_DEVBUF); + free(softc, M_DEVBUF); control_softc = NULL; return (ENOMEM); } @@ -1963,7 +1962,7 @@ ctl_shutdown(void) sysctl_ctx_free(&softc->sysctl_ctx); - free(control_softc, M_DEVBUF); + free(softc, M_DEVBUF); control_softc = NULL; } @@ -2205,18 +2204,16 @@ ctl_create_iid(struct ctl_port *port, in static void ctl_serialize_other_sc_cmd(struct ctl_scsiio *ctsio) { - struct ctl_softc *softc = control_softc; + struct ctl_softc *softc = CTL_SOFTC(ctsio); + struct ctl_port *port = CTL_PORT(ctsio); union ctl_ha_msg msg_info; - struct ctl_port *port; struct ctl_lun *lun; const struct ctl_cmd_entry *entry; uint32_t targ_lun; targ_lun = ctsio->io_hdr.nexus.targ_mapped_lun; - mtx_lock(&softc->ctl_lock); /* Make sure that we know about this port. */ - port = ctl_io_port(&ctsio->io_hdr); if (port == NULL || (port->status & CTL_PORT_STATUS_ONLINE) == 0) { ctl_set_internal_failure(ctsio, /*sks_valid*/ 0, /*retry_count*/ 1); @@ -2224,6 +2221,7 @@ ctl_serialize_other_sc_cmd(struct ctl_sc } /* Make sure that we know about this LUN. */ + mtx_lock(&softc->ctl_lock); if (targ_lun >= CTL_MAX_LUNS || (lun = softc->ctl_luns[targ_lun]) == NULL) { mtx_unlock(&softc->ctl_lock); @@ -2256,8 +2254,8 @@ ctl_serialize_other_sc_cmd(struct ctl_sc goto badjuju; } - ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr = lun; - ctsio->io_hdr.ctl_private[CTL_PRIV_BACKEND_LUN].ptr = lun->be_lun; + CTL_LUN(ctsio) = lun; + CTL_BACKEND_LUN(ctsio) = lun->be_lun; /* * Every I/O goes into the OOA queue for a @@ -3625,13 +3623,6 @@ ctl_encode_lun(uint32_t decoded) return uint64_t)RPL_LUNDATA_ATYP_EXTLUN | 0x22) << 56) | (l << 16)); } -static struct c
svn commit: r310779 - head/sys/kern
Author: mjg Date: Thu Dec 29 16:35:49 2016 New Revision: 310779 URL: https://svnweb.freebsd.org/changeset/base/310779 Log: cache: sprinkle __predict_false Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Thu Dec 29 15:09:34 2016(r310778) +++ head/sys/kern/vfs_cache.c Thu Dec 29 16:35:49 2016(r310779) @@ -1104,7 +1104,7 @@ cache_lookup(struct vnode *dvp, struct v uint32_t hash; int error, ltype; - if (!doingcache) { + if (__predict_false(!doingcache)) { cnp->cn_flags &= ~MAKEENTRY; return (0); } @@ -1544,13 +1544,13 @@ cache_enter_time(struct vnode *dvp, stru VNASSERT(dvp == NULL || (dvp->v_iflag & VI_DOOMED) == 0, dvp, ("cache_enter: Doomed vnode used as src")); - if (!doingcache) + if (__predict_false(!doingcache)) return; /* * Avoid blowout in namecache entries. */ - if (numcache >= desiredvnodes * ncsizefactor) + if (__predict_false(numcache >= desiredvnodes * ncsizefactor)) return; cache_celockstate_init(&cel); @@ -2054,9 +2054,9 @@ kern___getcwd(struct thread *td, char *b struct vnode *cdir, *rdir; int error; - if (disablecwd) + if (__predict_false(disablecwd)) return (ENODEV); - if (buflen < 2) + if (__predict_false(buflen < 2)) return (EINVAL); if (buflen > path_max) buflen = path_max; @@ -2107,9 +2107,9 @@ vn_fullpath(struct thread *td, struct vn struct vnode *rdir; int error; - if (disablefullpath) + if (__predict_false(disablefullpath)) return (ENODEV); - if (vn == NULL) + if (__predict_false(vn == NULL)) return (EINVAL); buf = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); @@ -2141,9 +2141,9 @@ vn_fullpath_global(struct thread *td, st char *buf; int error; - if (disablefullpath) + if (__predict_false(disablefullpath)) return (ENODEV); - if (vn == NULL) + if (__predict_false(vn == NULL)) return (EINVAL); buf = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); error = vn_fullpath1(td, vn, rootvnode, buf, retbuf, MAXPATHLEN); @@ -2407,7 +2407,7 @@ vn_path_to_global_path(struct thread *td ASSERT_VOP_ELOCKED(vp, __func__); /* Return ENODEV if sysctl debug.disablefullpath==1 */ - if (disablefullpath) + if (__predict_false(disablefullpath)) return (ENODEV); /* Construct global filesystem path from vp. */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r310773 - in stable/11/sys: netinet netinet6
On 2016-12-29 06:38:10, Rodney W. Grimes wrote: Author: tuexen Date: Thu Dec 29 11:32:42 2016 New Revision: 310773 URL: https://svnweb.freebsd.org/changeset/base/310773 Log: MFC r310590: Whitespace changes. The toolchain for processing the sources has been updated. No functional change. What tool chain? It is still broken in at least 1 respect: It's indent(1) from FreeBSD HEAD. /* now use the rest of the mbuf chain for the text */ while (m_tmp != NULL) { if ((SCTP_BUF_NEXT(m_tmp) == NULL) && trailer) { - sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *) + m_offset, + sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *)+m_offset, ^^ SCTP_BUF_LEN(m_tmp) - (trailer + m_offset)); } else { - sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *) + m_offset, + sctp_hmac_update(hmac_algo, &ctx, mtod(m_tmp, uint8_t *)+m_offset, ^^^ SCTP_BUF_LEN(m_tmp) - m_offset); } ... others errors of this type occur in this patch. This is caused by an old bug in indent that hasn't presented itself until -ta was used to automatically recognize tokens ending with "_t" as type names. I think it would of been better to revert the old patch that messed up some comments before creating this change as now there are other changes intermingled making the 2 changes inter-dependent. Two things have changed since that old patch that you refer to: 1) newest version of FreeBSD indent(1) was used 2) the option -ta was added It's the 1) that fixed comment formatting (broken earlier by me) since the old patch. It's the 2) that is responsible for some of the corrections that you applaud. It's also 2) that is responsible for uncovering the old bug in indent that I haven't fixed yet. Even with this small nit, I applaud the number of style(9) corrections! -- Rod Grimes rgri...@freebsd.org signature.asc Description: PGP signature
svn commit: r310780 - head/sys/mips/atheros
Author: adrian Date: Thu Dec 29 17:31:07 2016 New Revision: 310780 URL: https://svnweb.freebsd.org/changeset/base/310780 Log: [ar71xx] put in an implicit read-after-write to flush things out. Note: I may need to revisit this for mips74k. Modified: head/sys/mips/atheros/ar71xxreg.h Modified: head/sys/mips/atheros/ar71xxreg.h == --- head/sys/mips/atheros/ar71xxreg.h Thu Dec 29 16:35:49 2016 (r310779) +++ head/sys/mips/atheros/ar71xxreg.h Thu Dec 29 17:31:07 2016 (r310780) @@ -527,7 +527,10 @@ typedef enum { *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) #define ATH_WRITE_REG(reg, val) \ -*((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) = (val) +do { \ + *((volatile uint32_t *)MIPS_PHYS_TO_KSEG1((reg))) = (val); \ + (void) ATH_READ_REG(reg); \ +} while (0) static inline void ar71xx_ddr_flush(uint32_t reg) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310781 - head/sys/mips/atheros
Author: adrian Date: Thu Dec 29 17:31:38 2016 New Revision: 310781 URL: https://svnweb.freebsd.org/changeset/base/310781 Log: [ar71xx] add EARLY_PRINTF support for the AR933x (Hornet) UART. Tested: * Carambola 2 Modified: head/sys/mips/atheros/uart_bus_ar933x.c Modified: head/sys/mips/atheros/uart_bus_ar933x.c == --- head/sys/mips/atheros/uart_bus_ar933x.c Thu Dec 29 17:31:07 2016 (r310780) +++ head/sys/mips/atheros/uart_bus_ar933x.c Thu Dec 29 17:31:38 2016 (r310781) @@ -44,6 +44,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef EARLY_PRINTF +#include +#endif #include "uart_if.h" @@ -88,4 +91,25 @@ uart_ar933x_probe(device_t dev) return (uart_bus_probe(dev, 2, freq, 0, 0)); } +/* + * Assume the UART is setup by the bootloader and just echo that. + */ +#ifdefined(EARLY_PRINTF) +static void +ar933x_early_putc(int c) +{ + int i = 1000; + + /* Wait until FIFO is clear */ + while ((i > 0) && (ATH_READ_REG(AR71XX_UART_ADDR + AR933X_UART_CS_REG) & +AR933X_UART_CS_TX_BUSY)) + i--; + + /* Write it out */ + ATH_WRITE_REG(AR71XX_UART_ADDR + AR933X_UART_DATA_REG, + (c & 0xff)| AR933X_UART_DATA_TX_CSR); +} +early_putc_t *early_putc = ar933x_early_putc; +#endif /* EARLY_PRINTF */ + DRIVER_MODULE(uart, apb, uart_ar933x_driver, uart_devclass, 0, 0); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r310778 - head/sys/cam/ctl
On Thu, Dec 29, 2016 at 03:09:34PM +, Alexander Motin wrote: > Author: mav > Date: Thu Dec 29 15:09:34 2016 > New Revision: 310778 > URL: https://svnweb.freebsd.org/changeset/base/310778 > > Log: > Improve use of I/O's private area. > >- Since I/Os are allocates from per-port pools, make allocations store > pointer to CTL softc there, and use it where needed instead of global. >- Created bunch of helper macros to access LUN, port and CTL softc. > This fails to build with: sys/modules/ctl/../../cam/ctl/ctl.c:12522:27: error: member reference base type 'void' is not a structure or union mtx_assert(&CTL_SOFTC(io)->ctl_lock, MA_NOTOWNED); Looks like thep roblem is that CTL_SOFTC indeed does not cast and returns void instead: +#define CTL_SOFTC(io) ((io)->io_hdr.ctl_private[CTL_PRIV_LUN].ptrs[1]) -- Mateusz Guzik ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310782 - head/sys/cam/ctl
Author: mav Date: Thu Dec 29 18:08:04 2016 New Revision: 310782 URL: https://svnweb.freebsd.org/changeset/base/310782 Log: Fix build with enabled debug after r310778. MFC after:2 weeks Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c == --- head/sys/cam/ctl/ctl.c Thu Dec 29 17:31:38 2016(r310781) +++ head/sys/cam/ctl/ctl.c Thu Dec 29 18:08:04 2016(r310782) @@ -12519,7 +12519,7 @@ ctl_datamove(union ctl_io *io) { void (*fe_datamove)(union ctl_io *io); - mtx_assert(&CTL_SOFTC(io)->ctl_lock, MA_NOTOWNED); + mtx_assert(&((struct ctl_softc *)CTL_SOFTC(io))->ctl_lock, MA_NOTOWNED); CTL_DEBUG_PRINT(("ctl_datamove\n")); @@ -13012,7 +13012,7 @@ static void ctl_datamove_remote(union ctl_io *io) { - mtx_assert(&CTL_SOFTC(io)->ctl_lock, MA_NOTOWNED); + mtx_assert(&((struct ctl_softc *)CTL_SOFTC(io))->ctl_lock, MA_NOTOWNED); if (io->io_hdr.flags & CTL_FLAG_FAILOVER) { ctl_failover_io(io, /*have_lock*/ 0); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r310778 - head/sys/cam/ctl
On 29.12.2016 20:02, Mateusz Guzik wrote: > On Thu, Dec 29, 2016 at 03:09:34PM +, Alexander Motin wrote: >> Author: mav >> Date: Thu Dec 29 15:09:34 2016 >> New Revision: 310778 >> URL: https://svnweb.freebsd.org/changeset/base/310778 >> >> Log: >> Improve use of I/O's private area. >> >>- Since I/Os are allocates from per-port pools, make allocations store >> pointer to CTL softc there, and use it where needed instead of global. >>- Created bunch of helper macros to access LUN, port and CTL softc. >> > > This fails to build with: > > sys/modules/ctl/../../cam/ctl/ctl.c:12522:27: error: member reference > base type 'void' is not a structure or union > mtx_assert(&CTL_SOFTC(io)->ctl_lock, MA_NOTOWNED); > > Looks like thep roblem is that CTL_SOFTC indeed does not cast and > returns void instead: > +#define CTL_SOFTC(io) ((io)->io_hdr.ctl_private[CTL_PRIV_LUN].ptrs[1]) Thank you! Fixed. -- Alexander Motin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r310773 - in stable/11/sys: netinet netinet6
On 2016-12-29 18:09:39, Piotr P. Stefaniak wrote: 2) the option -ta was added To clarify, what I mean is that the process that generates the sources started using the -ta switch of indent(1), not that the feature was recently implemented. signature.asc Description: PGP signature
svn commit: r310783 - head/sys/netinet
Author: ae Date: Thu Dec 29 19:57:46 2016 New Revision: 310783 URL: https://svnweb.freebsd.org/changeset/base/310783 Log: When we are sending IP fragments, update ip pointers in IP_PROBE() for each fragment. MFC after:1 week Modified: head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_fastfwd.c == --- head/sys/netinet/ip_fastfwd.c Thu Dec 29 18:08:04 2016 (r310782) +++ head/sys/netinet/ip_fastfwd.c Thu Dec 29 19:57:46 2016 (r310783) @@ -400,8 +400,9 @@ passout: */ m_clrprotoflags(m); - IP_PROBE(send, NULL, NULL, ip, nh.nh_ifp, - ip, NULL); + IP_PROBE(send, NULL, NULL, + mtod(m, struct ip *), nh.nh_ifp, + mtod(m, struct ip *), NULL); /* XXX: we can use cached route here */ error = (*nh.nh_ifp->if_output)(nh.nh_ifp, m, (struct sockaddr *)&dst, NULL); Modified: head/sys/netinet/ip_output.c == --- head/sys/netinet/ip_output.cThu Dec 29 18:08:04 2016 (r310782) +++ head/sys/netinet/ip_output.cThu Dec 29 19:57:46 2016 (r310783) @@ -696,7 +696,8 @@ sendit: */ m_clrprotoflags(m); - IP_PROBE(send, NULL, NULL, ip, ifp, ip, NULL); + IP_PROBE(send, NULL, NULL, mtod(m, struct ip *), ifp, + mtod(m, struct ip *), NULL); error = (*ifp->if_output)(ifp, m, (const struct sockaddr *)gw, ro); } else ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310784 - head/sys/mips/mips
Author: kan Date: Thu Dec 29 20:11:50 2016 New Revision: 310784 URL: https://svnweb.freebsd.org/changeset/base/310784 Log: Use mips_dcache_wbinv_range instead of mips_dcache_wb_range on CPU_XBURST Ingenic CPUs treat plain cache writeback as local-only operation and do nothing if that is a remote CPU that holds the dirty cache line. They do broadcast invalidate and write-and-invalidate to other cores though, so take advantage of that and use wbinv in place of wb as this still gives us required busdma semantics. Otherwise we'd have to do IPI to remote CPU ourselves. Modified: head/sys/mips/mips/busdma_machdep.c Modified: head/sys/mips/mips/busdma_machdep.c == --- head/sys/mips/mips/busdma_machdep.c Thu Dec 29 19:57:46 2016 (r310783) +++ head/sys/mips/mips/busdma_machdep.c Thu Dec 29 20:11:50 2016 (r310784) @@ -66,6 +66,16 @@ __FBSDID("$FreeBSD$"); #define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3 #define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4 +/* + * On XBurst cores from Ingenic, cache-line writeback is local + * only, unless accompanied by invalidation. Invalidations force + * dirty line writeout and invalidation requests forwarded to + * other cores if other cores have the cache line dirty. + */ +#if defined(SMP) && defined(CPU_XBURST) +#defineBUS_DMA_FORCE_WBINV +#endif + struct bounce_zone; struct bus_dma_tag { @@ -1069,7 +1079,7 @@ bus_dmamap_sync_buf(vm_offset_t buf, int /* * dcache invalidation operates on cache line aligned addresses * and could modify areas of memory that share the same cache line -* at the beginning and the ending of the buffer. In order to +* at the beginning and the ending of the buffer. In order to * prevent a data loss we save these chunks in temporary buffer * before invalidation and restore them afer it. * @@ -1099,7 +1109,7 @@ bus_dmamap_sync_buf(vm_offset_t buf, int case BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE: case BUS_DMASYNC_POSTREAD: - /* + /* * Save buffers that might be modified by invalidation */ if (size_cl) @@ -1107,14 +1117,14 @@ bus_dmamap_sync_buf(vm_offset_t buf, int if (size_clend) memcpy (tmp_clend, (void*)buf_clend, size_clend); mips_dcache_inv_range(buf, len); - /* + /* * Restore them */ if (size_cl) memcpy ((void*)buf_cl, tmp_cl, size_cl); if (size_clend) memcpy ((void*)buf_clend, tmp_clend, size_clend); - /* + /* * Copies above have brought corresponding memory * cache lines back into dirty state. Write them back * out and invalidate affected cache lines again if @@ -1132,7 +1142,7 @@ bus_dmamap_sync_buf(vm_offset_t buf, int break; case BUS_DMASYNC_PREREAD: - /* + /* * Save buffers that might be modified by invalidation */ if (size_cl) @@ -1147,7 +1157,7 @@ bus_dmamap_sync_buf(vm_offset_t buf, int memcpy ((void *)buf_cl, tmp_cl, size_cl); if (size_clend) memcpy ((void *)buf_clend, tmp_clend, size_clend); - /* + /* * Copies above have brought corresponding memory * cache lines back into dirty state. Write them back * out and invalidate affected cache lines again if @@ -1161,7 +1171,11 @@ bus_dmamap_sync_buf(vm_offset_t buf, int break; case BUS_DMASYNC_PREWRITE: +#ifdef BUS_DMA_FORCE_WBINV + mips_dcache_wbinv_range(buf, len); +#else mips_dcache_wb_range(buf, len); +#endif break; } } @@ -1175,19 +1189,24 @@ _bus_dmamap_sync_bp(bus_dma_tag_t dmat, if (op & BUS_DMASYNC_PREWRITE) { if (bpage->datavaddr != 0) bcopy((void *)bpage->datavaddr, - (void *)(bpage->vaddr_nocache != 0 ? + (void *)(bpage->vaddr_nocache != 0 ? bpage->vaddr_nocache : bpage->vaddr), bpage->datacount); else physcopyout(bpage->dataaddr, - (void *)(bpage->vaddr_nocache != 0 ? + (void *)(bpage->vaddr_nocache != 0 ? bpage->vaddr_nocache :
svn commit: r310786 - head/tests/sys/geom/class/eli
Author: asomers Date: Thu Dec 29 20:28:50 2016 New Revision: 310786 URL: https://svnweb.freebsd.org/changeset/base/310786 Log: Reduce the runtime of the GELI tests There is no reduction in test coverage. On my system runtime is reduced from 38m32s to 6m24s. tests/sys/geom/class/eli/conf.sh tests/sys/geom/class/eli/init_a_test.sh tests/sys/geom/class/eli/init_test.sh tests/sys/geom/class/eli/integrity_copy_test.sh tests/sys/geom/class/eli/integrity_data_test.sh tests/sys/geom/class/eli/integrity_hmac_test.sh tests/sys/geom/class/eli/onetime_a_test.sh tests/sys/geom/class/eli/onetime_test.sh Move the looping code into common functions in conf.sh, and remove alias ciphers from the list. tests/sys/geom/class/eli/init_a_test.sh tests/sys/geom/class/eli/init_test.sh tests/sys/geom/class/eli/integrity_copy_test.sh tests/sys/geom/class/eli/integrity_data_test.sh tests/sys/geom/class/eli/integrity_hmac_test.sh tests/sys/geom/class/eli/onetime_a_test.sh Move a few commands that don't need to be in the inner loop out. tests/sys/geom/class/eli/init_test.sh tests/sys/geom/class/eli/onetime_a_test.sh Reduce the sector count tests/sys/geom/class/eli/Makefile tests/sys/geom/class/eli/init_alias_test.sh Add a test for initializing a GELI device using one of the cipher aliases, and check that the alias is correctly interpreted. MFC after:4 weeks Sponsored by: Spectra Logic Corp Differential Revision:https://reviews.freebsd.org/D8814 Added: head/tests/sys/geom/class/eli/init_alias_test.sh (contents, props changed) Modified: head/tests/sys/geom/class/eli/Makefile head/tests/sys/geom/class/eli/conf.sh head/tests/sys/geom/class/eli/init_a_test.sh head/tests/sys/geom/class/eli/init_test.sh head/tests/sys/geom/class/eli/integrity_copy_test.sh head/tests/sys/geom/class/eli/integrity_data_test.sh head/tests/sys/geom/class/eli/integrity_hmac_test.sh head/tests/sys/geom/class/eli/onetime_a_test.sh head/tests/sys/geom/class/eli/onetime_test.sh Modified: head/tests/sys/geom/class/eli/Makefile == --- head/tests/sys/geom/class/eli/Makefile Thu Dec 29 20:27:54 2016 (r310785) +++ head/tests/sys/geom/class/eli/Makefile Thu Dec 29 20:28:50 2016 (r310786) @@ -11,6 +11,7 @@ TAP_TESTS_SH+= detach_l_test TAP_TESTS_SH+= init_B_test TAP_TESTS_SH+= init_J_test TAP_TESTS_SH+= init_a_test +TAP_TESTS_SH+= init_alias_test TAP_TESTS_SH+= init_i_P_test TAP_TESTS_SH+= init_test TAP_TESTS_SH+= integrity_copy_test Modified: head/tests/sys/geom/class/eli/conf.sh == --- head/tests/sys/geom/class/eli/conf.sh Thu Dec 29 20:27:54 2016 (r310785) +++ head/tests/sys/geom/class/eli/conf.sh Thu Dec 29 20:28:50 2016 (r310786) @@ -11,6 +11,54 @@ while [ -c /dev/md$no ]; do : $(( no += 1 )) done +# Execute `func` for each combination of cipher, sectorsize, and hmac algo +# `func` usage should be: +# func +for_each_geli_config() { + func=$1 + + for cipher in aes-xts:128 aes-xts:256 \ + aes-cbc:128 aes-cbc:192 aes-cbc:256 \ + 3des-cbc:192 \ + blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 \ + blowfish-cbc:224 blowfish-cbc:256 blowfish-cbc:288 \ + blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ + blowfish-cbc:416 blowfish-cbc:448 \ + camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do + ealgo=${cipher%%:*} + keylen=${cipher##*:} + for aalgo in hmac/md5 hmac/sha1 hmac/ripemd160 hmac/sha256 \ + hmac/sha384 hmac/sha512; do + for secsize in 512 1024 2048 4096 8192; do + ${func} $cipher $aalgo $secsize + done + done + done +} + +# Execute `func` for each combination of cipher, and sectorsize, with no hmac +# `func` usage should be: +# func +for_each_geli_config_nointegrity() { + func=$1 + + for cipher in aes-xts:128 aes-xts:256 \ + aes-cbc:128 aes-cbc:192 aes-cbc:256 \ + 3des-cbc:192 \ + blowfish-cbc:128 blowfish-cbc:160 blowfish-cbc:192 \ + blowfish-cbc:224 blowfish-cbc:256 blowfish-cbc:288 \ + blowfish-cbc:320 blowfish-cbc:352 blowfish-cbc:384 \ + blowfish-cbc:416 blowfish-cbc:448 \ + camellia-cbc:128 camellia-cbc:192 camellia-cbc:256; do + ealgo=${cipher%%:*} + keylen=${cipher##*:} + for secsize in 512 1024 2048 4096 8192; do + ${func} $cipher $aalgo $secsize + done + done +} + + geli_test_cleanup() { [ -c /dev/md${no}.eli ] && geli detach md${no}.eli Modified: head/tests/sys/geom/cla
svn commit: r310785 - head/cddl/lib/libdtrace
Author: ae Date: Thu Dec 29 20:27:54 2016 New Revision: 310785 URL: https://svnweb.freebsd.org/changeset/base/310785 Log: Convert ipv4_flags and ipv4_offset fields into host byte order. Also save only high bits in the ipv4_flags, because it is defined as uint8_t. So now it will show DF and MF flags as 0x40 and 0x20. Reviewed by: markj@ MFC after:1 week Modified: head/cddl/lib/libdtrace/ip.d Modified: head/cddl/lib/libdtrace/ip.d == --- head/cddl/lib/libdtrace/ip.dThu Dec 29 20:11:50 2016 (r310784) +++ head/cddl/lib/libdtrace/ip.dThu Dec 29 20:27:54 2016 (r310785) @@ -255,8 +255,8 @@ translator ipv4info_t < struct ip *p > { ipv4_tos = p == NULL ? 0 : p->ip_tos; ipv4_length = p == NULL ? 0 : ntohs(p->ip_len); ipv4_ident =p == NULL ? 0 : ntohs(p->ip_id); - ipv4_flags =p == NULL ? 0 : (p->ip_off & 0xe000); - ipv4_offset = p == NULL ? 0 : p->ip_off; + ipv4_flags =p == NULL ? 0 : (ntohs(p->ip_off) & 0xe000) >> 8; + ipv4_offset = p == NULL ? 0 : ntohs(p->ip_off) & 0x1fff; ipv4_ttl = p == NULL ? 0 : p->ip_ttl; ipv4_protocol = p == NULL ? 0 : p->ip_p; ipv4_protostr = p == NULL ? "" : protocols[p->ip_p]; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310787 - stable/11/sys/x86/x86
Author: markj Date: Thu Dec 29 21:03:00 2016 New Revision: 310787 URL: https://svnweb.freebsd.org/changeset/base/310787 Log: MFC r309657: Require the STACK option for code that captures stacks of running threads. Modified: stable/11/sys/x86/x86/mca.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/mca.c == --- stable/11/sys/x86/x86/mca.c Thu Dec 29 20:28:50 2016(r310786) +++ stable/11/sys/x86/x86/mca.c Thu Dec 29 21:03:00 2016(r310787) @@ -508,7 +508,7 @@ mca_record_entry(enum scan_mode mode, co STAILQ_INSERT_TAIL(&mca_records, rec, link); mca_count++; mtx_unlock_spin(&mca_lock); - if (mode == CMCI) + if (mode == CMCI && !cold) taskqueue_enqueue(mca_tq, &mca_refill_task); } @@ -714,6 +714,9 @@ mca_createtq(void *dummy) mca_tq = taskqueue_create_fast("mca", M_WAITOK, taskqueue_thread_enqueue, &mca_tq); taskqueue_start_threads(&mca_tq, 1, PI_SWI(SWI_TQ), "mca taskq"); + + /* CMCIs during boot may have claimed items from the freelist. */ + mca_fill_freelist(); } SYSINIT(mca_createtq, SI_SUB_CONFIGURE, SI_ORDER_ANY, mca_createtq, NULL); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310788 - stable/11/sys/x86/x86
Author: markj Date: Thu Dec 29 21:06:31 2016 New Revision: 310788 URL: https://svnweb.freebsd.org/changeset/base/310788 Log: MFC r309657: Require the STACK option for code that captures stacks of running threads. Modified: stable/11/sys/x86/x86/stack_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/stack_machdep.c == --- stable/11/sys/x86/x86/stack_machdep.c Thu Dec 29 21:03:00 2016 (r310787) +++ stable/11/sys/x86/x86/stack_machdep.c Thu Dec 29 21:06:31 2016 (r310788) @@ -28,6 +28,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_stack.h" + #include #include #include @@ -59,6 +61,7 @@ typedef struct i386_frame *x86_frame_t; typedef struct amd64_frame *x86_frame_t; #endif +#ifdef STACK static struct stack *nmi_stack; static volatile struct thread *nmi_pending; @@ -66,6 +69,7 @@ static volatile struct thread *nmi_pendi static struct mtx nmi_lock; MTX_SYSINIT(nmi_lock, &nmi_lock, "stack_nmi", MTX_SPIN); #endif +#endif static void stack_capture(struct thread *td, struct stack *st, register_t fp) @@ -95,6 +99,7 @@ int stack_nmi_handler(struct trapframe *tf) { +#ifdef STACK /* Don't consume an NMI that wasn't meant for us. */ if (nmi_stack == NULL || curthread != nmi_pending) return (0); @@ -107,6 +112,9 @@ stack_nmi_handler(struct trapframe *tf) atomic_store_rel_ptr((long *)&nmi_pending, (long)NULL); return (1); +#else + return (0); +#endif } void @@ -125,6 +133,7 @@ int stack_save_td_running(struct stack *st, struct thread *td) { +#ifdef STACK THREAD_LOCK_ASSERT(td, MA_OWNED); MPASS(TD_IS_RUNNING(td)); @@ -148,10 +157,13 @@ stack_save_td_running(struct stack *st, if (st->depth == 0) /* We interrupted a thread in user mode. */ return (EAGAIN); -#else +#else /* !SMP */ KASSERT(0, ("curthread isn't running")); -#endif +#endif /* SMP */ return (0); +#else /* !STACK */ + return (EOPNOTSUPP); +#endif /* STACK */ } void ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r310787 - stable/11/sys/x86/x86
On Thu, Dec 29, 2016 at 09:03:00PM +, Mark Johnston wrote: > Author: markj > Date: Thu Dec 29 21:03:00 2016 > New Revision: 310787 > URL: https://svnweb.freebsd.org/changeset/base/310787 > > Log: > MFC r309657: > Require the STACK option for code that captures stacks of running threads. > > Modified: > stable/11/sys/x86/x86/mca.c > Directory Properties: > stable/11/ (props changed) The commit message is wrong - this was an MFC of r310084. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310789 - head/lib/libpam/static_libpam
Author: kan Date: Thu Dec 29 21:30:52 2016 New Revision: 310789 URL: https://svnweb.freebsd.org/changeset/base/310789 Log: Use compiler driver to build relocatable object This works better with external toolchains where LD will not necessarily defailt to emulation we want. Compiler driver knows better. Modified: head/lib/libpam/static_libpam/Makefile Modified: head/lib/libpam/static_libpam/Makefile == --- head/lib/libpam/static_libpam/Makefile Thu Dec 29 21:06:31 2016 (r310788) +++ head/lib/libpam/static_libpam/Makefile Thu Dec 29 21:30:52 2016 (r310789) @@ -64,6 +64,6 @@ CLEANFILES+= openpam_static.o \ openpam_static_modules.o openpam_static_modules.o: openpam_static.o ${STATIC_MODULES} - ${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC} + ${CC} -nostdlib ${CFLAGS} -o ${.TARGET} -r -Wl,--whole-archive ${.ALLSRC} .include "${.CURDIR}/../libpam/Makefile" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310790 - head/sys/conf
Author: kan Date: Thu Dec 29 21:36:04 2016 New Revision: 310790 URL: https://svnweb.freebsd.org/changeset/base/310790 Log: Use TARGET_ARCH instead of MACHINE_ARCH for MIPS kernel MACHINE_ARCH is overwritten by config file and will not contain -hf suffix, so uname -p reported by kernel will be wrong. Modified: head/sys/conf/kern.pre.mk Modified: head/sys/conf/kern.pre.mk == --- head/sys/conf/kern.pre.mk Thu Dec 29 21:30:52 2016(r310789) +++ head/sys/conf/kern.pre.mk Thu Dec 29 21:36:04 2016(r310790) @@ -74,7 +74,7 @@ CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KE CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100 CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000 .if ${MACHINE_CPUARCH} == "mips" -CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 -DMACHINE_ARCH='"${MACHINE_ARCH}"' +CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 -DMACHINE_ARCH='"${TARGET_ARCH}"' .endif CFLAGS.gcc+= -fno-common -fms-extensions -finline-limit=${INLINE_LIMIT} CFLAGS.gcc+= --param inline-unit-growth=${CFLAGS_PARAM_INLINE_UNIT_GROWTH} ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310791 - head/sys/arm/arm
Author: gonzo Date: Thu Dec 29 21:55:23 2016 New Revision: 310791 URL: https://svnweb.freebsd.org/changeset/base/310791 Log: [qemu] Fix VERSATILEPB kernel boot in QEMU broken by r300968 QEMU does not implement hardware debug registers so when dbg_monitor_is_enabled is called kernel receives "invalid instruction" exception. QEMU implements only DIDR register and on read returns all zeroes to indicate that it doesn't support other registers. Real hardware has Version bits set. MFC after:1 week Modified: head/sys/arm/arm/debug_monitor.c Modified: head/sys/arm/arm/debug_monitor.c == --- head/sys/arm/arm/debug_monitor.cThu Dec 29 21:36:04 2016 (r310790) +++ head/sys/arm/arm/debug_monitor.cThu Dec 29 21:55:23 2016 (r310791) @@ -792,10 +792,21 @@ dbg_get_ossr(void) static __inline boolean_t dbg_arch_supported(void) { + uint32_t dbg_didr; switch (dbg_model) { case ID_DFR0_CP_DEBUG_M_V6: case ID_DFR0_CP_DEBUG_M_V6_1: + dbg_didr = cp14_dbgdidr_get(); + /* +* read-all-zeroes is used by QEMU +* to indicate that ARMv6 debug support +* is not implemented. Real hardware has at +* least version bits set +*/ + if (dbg_didr == 0) + return (FALSE); + return (TRUE); case ID_DFR0_CP_DEBUG_M_V7: case ID_DFR0_CP_DEBUG_M_V7_1: /* fall through */ return (TRUE); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310792 - in head: lib/clang/libllvm usr.bin/clang
Author: dim Date: Thu Dec 29 21:57:16 2016 New Revision: 310792 URL: https://svnweb.freebsd.org/changeset/base/310792 Log: Revert r310775 for now, until we can figure out why it does not seem to work properly when cross-building. Sorry for the breakage. Modified: head/lib/clang/libllvm/Makefile head/usr.bin/clang/Makefile Modified: head/lib/clang/libllvm/Makefile == --- head/lib/clang/libllvm/Makefile Thu Dec 29 21:55:23 2016 (r310791) +++ head/lib/clang/libllvm/Makefile Thu Dec 29 21:57:16 2016 (r310792) @@ -308,24 +308,24 @@ SRCS_MIN+=DebugInfo/CodeView/TypeRecord SRCS_MIN+= DebugInfo/CodeView/TypeRecordBuilder.cpp SRCS_MIN+= DebugInfo/CodeView/TypeStreamMerger.cpp SRCS_MIN+= DebugInfo/CodeView/TypeTableBuilder.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFAcceleratorTable.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFCompileUnit.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFContext.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFDebugAbbrev.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFDebugArangeSet.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFDebugAranges.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFDebugFrame.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFDebugInfoEntry.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFDebugLine.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFDebugLoc.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFDebugMacro.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFDebugRangeList.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFFormValue.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFTypeUnit.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFUnit.cpp -SRCS_MIW+= DebugInfo/DWARF/DWARFUnitIndex.cpp -SRCS_MIW+= DebugInfo/DWARF/SyntaxHighlighting.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFAcceleratorTable.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFCompileUnit.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFContext.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFDebugAbbrev.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFDebugArangeSet.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFDebugAranges.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFDebugFrame.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFDebugInfoEntry.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFDebugLine.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFDebugLoc.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFDebugMacro.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFDebugRangeList.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFFormValue.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFTypeUnit.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFUnit.cpp +SRCS_EXT+= DebugInfo/DWARF/DWARFUnitIndex.cpp +SRCS_EXT+= DebugInfo/DWARF/SyntaxHighlighting.cpp SRCS_EXT+= DebugInfo/PDB/GenericError.cpp SRCS_EXT+= DebugInfo/PDB/PDB.cpp SRCS_EXT+= DebugInfo/PDB/PDBContext.cpp @@ -699,7 +699,7 @@ SRCS_MIN+= Target/AArch64/AArch64TargetO SRCS_MIN+= Target/AArch64/AArch64TargetTransformInfo.cpp SRCS_MIN+= Target/AArch64/AsmParser/AArch64AsmParser.cpp SRCS_XDB+= Target/AArch64/Disassembler/AArch64Disassembler.cpp -SRCS_XDW+= Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp +SRCS_XDB+= Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp SRCS_MIN+= Target/AArch64/InstPrinter/AArch64InstPrinter.cpp SRCS_MIN+= Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp SRCS_MIN+= Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp @@ -880,7 +880,7 @@ SRCS_MIN+= Target/TargetSubtargetInfo.cp SRCS_MIN+= Target/X86/AsmParser/X86AsmInstrumentation.cpp SRCS_MIN+= Target/X86/AsmParser/X86AsmParser.cpp SRCS_XDB+= Target/X86/Disassembler/X86Disassembler.cpp -SRCS_XDW+= Target/X86/Disassembler/X86DisassemblerDecoder.cpp +SRCS_XDB+= Target/X86/Disassembler/X86DisassemblerDecoder.cpp SRCS_MIN+= Target/X86/InstPrinter/X86ATTInstPrinter.cpp SRCS_MIN+= Target/X86/InstPrinter/X86InstComments.cpp SRCS_MIN+= Target/X86/InstPrinter/X86IntelInstPrinter.cpp @@ -1090,9 +1090,6 @@ SRCS_MIN+=Transforms/Vectorize/SLPVecto SRCS_EXT+= Transforms/Vectorize/Vectorize.cpp SRCS_ALL+= ${SRCS_MIN} -.if !defined(TOOLS_PREFIX) -SRCS_ALL+= ${SRCS_MIW} -.endif .if ${MK_CLANG_EXTRAS} != "no" SRCS_ALL+= ${SRCS_EXT} .endif @@ -1108,9 +1105,6 @@ SRCS_ALL+=${SRCS_XDB} .if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no" || ${MK_LLD} != "no" SRCS_ALL+= ${SRCS_XDL} .endif -.if ${MK_CLANG_EXTRAS} != "no" || ${MK_LLDB} != "no" || !defined(TOOLS_PREFIX) -SRCS_ALL+= ${SRCS_XDW} -.endif SRCS+= ${SRCS_ALL:O} llvm/IR/Attributes.inc: ${LLVM_SRCS}/include/llvm/IR/Attributes.td Modified: head/usr.bin/clang/Makefile == --- head/usr.bin/clang/Makefile Thu Dec 29 21:55:23 2016(r310791) +++ head/usr.bin/clang/Makefile Thu Dec 29 21:57:16 2016(r310792) @@
Re: svn commit: r310790 - head/sys/conf
On Thu, Dec 29, 2016 at 2:36 PM, Alexander Kabaev wrote: > Author: kan > Date: Thu Dec 29 21:36:04 2016 > New Revision: 310790 > URL: https://svnweb.freebsd.org/changeset/base/310790 > > Log: > Use TARGET_ARCH instead of MACHINE_ARCH for MIPS kernel TARGET_ARCH is only defined for cross builds. I'm pretty sure this is wrong. It won't work for native builds. TARGET_ARCH only has meaning in Makefile.inc1. > MACHINE_ARCH is overwritten by config file and will not > contain -hf suffix, so uname -p reported by kernel will > be wrong. Then that must be fixed instead. Warner > Modified: > head/sys/conf/kern.pre.mk > > Modified: head/sys/conf/kern.pre.mk > == > --- head/sys/conf/kern.pre.mk Thu Dec 29 21:30:52 2016(r310789) > +++ head/sys/conf/kern.pre.mk Thu Dec 29 21:36:04 2016(r310790) > @@ -74,7 +74,7 @@ CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KE > CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100 > CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000 > .if ${MACHINE_CPUARCH} == "mips" > -CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 > -DMACHINE_ARCH='"${MACHINE_ARCH}"' > +CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 > -DMACHINE_ARCH='"${TARGET_ARCH}"' > .endif > CFLAGS.gcc+= -fno-common -fms-extensions -finline-limit=${INLINE_LIMIT} > CFLAGS.gcc+= --param inline-unit-growth=${CFLAGS_PARAM_INLINE_UNIT_GROWTH} > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310793 - head/sys/dev/rtwn/rtl8812a
Author: avos Date: Thu Dec 29 22:36:16 2016 New Revision: 310793 URL: https://svnweb.freebsd.org/changeset/base/310793 Log: rtwn: silence compiler warning (-Wmaybe-uninitialized). Reported by: adrian Modified: head/sys/dev/rtwn/rtl8812a/r12a_chan.c Modified: head/sys/dev/rtwn/rtl8812a/r12a_chan.c == --- head/sys/dev/rtwn/rtl8812a/r12a_chan.c Thu Dec 29 21:57:16 2016 (r310792) +++ head/sys/dev/rtwn/rtl8812a/r12a_chan.c Thu Dec 29 22:36:16 2016 (r310793) @@ -332,7 +332,7 @@ r12a_set_band(struct rtwn_softc *sc, str /* XXX PATH_B is set by vendor driver. */ for (i = 0; i < 2; i++) { - uint16_t val; + uint16_t val = 0; switch ((swing >> i * 2) & 0x3) { case 0: ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310794 - in head/sys: conf mips/conf
Author: kan Date: Fri Dec 30 00:34:52 2016 New Revision: 310794 URL: https://svnweb.freebsd.org/changeset/base/310794 Log: Support mips[*]hf variants in config files Recognize new MACHINE_ARCH names now as we have added hardfloat support. Switch JZ4780 to mipselhf and remove all uses of TARGET_ARCH in kernel .mk files. Reviewed by: adrian Differential Revision:https://reviews.freebsd.org/D8989 Modified: head/sys/conf/files.mips head/sys/conf/kern.mk head/sys/conf/kern.pre.mk head/sys/conf/options.mips head/sys/mips/conf/JZ4780 Modified: head/sys/conf/files.mips == --- head/sys/conf/files.mipsThu Dec 29 22:36:16 2016(r310793) +++ head/sys/conf/files.mipsFri Dec 30 00:34:52 2016(r310794) @@ -52,7 +52,7 @@ kern/kern_clocksource.c standard kern/link_elf_obj.cstandard kern/subr_busdma_bufalloc.cstandard kern/subr_dummy_vdso_tc.c standard -kern/subr_sfbuf.c optionalmips | mipsel | mipsn32 +kern/subr_sfbuf.c standard # gcc/clang runtime libkern/ffsl.c standard @@ -61,8 +61,8 @@ libkern/fls.c standard libkern/flsl.c standard libkern/flsll.cstandard libkern/memmove.c standard -libkern/cmpdi2.c optionalmips | mipsel -libkern/ucmpdi2.c optionalmips | mipsel +libkern/cmpdi2.c optionalmips | mipshf | mipsel | mipselhf +libkern/ucmpdi2.c optionalmips | mipshf | mipsel | mipselhf libkern/ashldi3.c standard libkern/ashrdi3.c standard Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Thu Dec 29 22:36:16 2016(r310793) +++ head/sys/conf/kern.mk Fri Dec 30 00:34:52 2016(r310794) @@ -184,7 +184,7 @@ CFLAGS.gcc+=-mcall-aixdesc .if ${MACHINE_CPUARCH} == "mips" CFLAGS+= -msoft-float INLINE_LIMIT?= 8000 -.if ${TARGET_ARCH:Mmips*hf} != "" +.if ${MACHINE_ARCH:Mmips*hf} != "" CFLAGS+= -DCPU_HAVEFPU .endif .endif Modified: head/sys/conf/kern.pre.mk == --- head/sys/conf/kern.pre.mk Thu Dec 29 22:36:16 2016(r310793) +++ head/sys/conf/kern.pre.mk Fri Dec 30 00:34:52 2016(r310794) @@ -74,7 +74,7 @@ CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KE CFLAGS_PARAM_INLINE_UNIT_GROWTH?=100 CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=1000 .if ${MACHINE_CPUARCH} == "mips" -CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 -DMACHINE_ARCH='"${TARGET_ARCH}"' +CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 -DMACHINE_ARCH='"${MACHINE_ARCH}"' .endif CFLAGS.gcc+= -fno-common -fms-extensions -finline-limit=${INLINE_LIMIT} CFLAGS.gcc+= --param inline-unit-growth=${CFLAGS_PARAM_INLINE_UNIT_GROWTH} Modified: head/sys/conf/options.mips == --- head/sys/conf/options.mips Thu Dec 29 22:36:16 2016(r310793) +++ head/sys/conf/options.mips Fri Dec 30 00:34:52 2016(r310794) @@ -50,9 +50,13 @@ CPU_MALTAopt_global.h # which MACHINE_ARCH architecture MIPS +MIPSHF MIPSEL +MIPSELHF MIPS64 +MIPS64HF MIPS64EL +MIPS64ELHF MIPSN32 COMPAT_FREEBSD32 opt_compat.h Modified: head/sys/mips/conf/JZ4780 == --- head/sys/mips/conf/JZ4780 Thu Dec 29 22:36:16 2016(r310793) +++ head/sys/mips/conf/JZ4780 Fri Dec 30 00:34:52 2016(r310794) @@ -5,7 +5,7 @@ #NO_UNIVERSE ident JZ4780 -machinemips mipsel +machinemips mipselhf cpuCPU_XBURST cpuCPU_MIPS4KC ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r310782 - head/sys/cam/ctl
Hi Alexander, Wouldn't it be better to put the cast directly in the definition of CTL_SOFTC()? That puts the cast in a single place, and anything that calls CTL_SOFTC() will expect a (struct ctl_softc *) anyway. Thanks, and happy holidays! -Ravi (rpokala@) -Original Message- > From: on behalf of Alexander Motin > > Date: 2016-12-29, Thursday at 12:08 > To: , , > > Subject: svn commit: r310782 - head/sys/cam/ctl > > Author: mav > Date: Thu Dec 29 18:08:04 2016 > New Revision: 310782 > URL: https://svnweb.freebsd.org/changeset/base/310782 > > Log: > Fix build with enabled debug after r310778. > > MFC after: 2 weeks > > Modified: > head/sys/cam/ctl/ctl.c > > Modified: head/sys/cam/ctl/ctl.c > == > --- head/sys/cam/ctl/ctl.cThu Dec 29 17:31:38 2016(r310781) > +++ head/sys/cam/ctl/ctl.cThu Dec 29 18:08:04 2016(r310782) > @@ -12519,7 +12519,7 @@ ctl_datamove(union ctl_io *io) > { > void (*fe_datamove)(union ctl_io *io); > > - mtx_assert(&CTL_SOFTC(io)->ctl_lock, MA_NOTOWNED); > + mtx_assert(&((struct ctl_softc *)CTL_SOFTC(io))->ctl_lock, MA_NOTOWNED); > > CTL_DEBUG_PRINT(("ctl_datamove\n")); > > @@ -13012,7 +13012,7 @@ static void > ctl_datamove_remote(union ctl_io *io) > { > > - mtx_assert(&CTL_SOFTC(io)->ctl_lock, MA_NOTOWNED); > + mtx_assert(&((struct ctl_softc *)CTL_SOFTC(io))->ctl_lock, MA_NOTOWNED); > > if (io->io_hdr.flags & CTL_FLAG_FAILOVER) { > ctl_failover_io(io, /*have_lock*/ 0); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r310773 - in stable/11/sys: netinet netinet6
-- Start of PGP signed section. > On 2016-12-29 18:09:39, Piotr P. Stefaniak wrote: > >2) the option -ta was added > > To clarify, what I mean is that the process that generates the sources > started using the -ta switch of indent(1), not that the feature was > recently implemented. Can you clarify what process these source files are generated by? If these are not the source files, but are being generated by some other thing then wouldn't we want the true sources and the generation process in the repsitory? If this is running indent(1) over source files to clean them up, then that is not "generating" sources per say, but instead cleaning them up with indent(1). -- Rod Grimes rgri...@freebsd.org ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310795 - stable/11/sys/cddl/contrib/opensolaris/uts/common/sys
Author: gnn Date: Fri Dec 30 01:24:08 2016 New Revision: 310795 URL: https://svnweb.freebsd.org/changeset/base/310795 Log: MFC: 310175 Remove extra DOF_SEC_XLIMPORT from the DOF_SEC_ISLOADABLE macro Sponsored by: DARPA, AFRL Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h == --- stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Fri Dec 30 00:34:52 2016(r310794) +++ stable/11/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Fri Dec 30 01:24:08 2016(r310795) @@ -739,8 +739,8 @@ typedef struct dof_sec { ((x) == DOF_SECT_PRARGS) || ((x) == DOF_SECT_PROFFS) || \ ((x) == DOF_SECT_INTTAB) || ((x) == DOF_SECT_XLTAB) || \ ((x) == DOF_SECT_XLMEMBERS) || ((x) == DOF_SECT_XLIMPORT) ||\ - ((x) == DOF_SECT_XLIMPORT) || ((x) == DOF_SECT_XLEXPORT) || \ - ((x) == DOF_SECT_PREXPORT) || ((x) == DOF_SECT_PRENOFFS)) + ((x) == DOF_SECT_XLEXPORT) || ((x) == DOF_SECT_PREXPORT) ||\ + ((x) == DOF_SECT_PRENOFFS)) typedef struct dof_ecbdesc { dof_secidx_t dofe_probes; /* link to DOF_SECT_PROBEDESC */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310796 - in vendor/libarchive/dist: . libarchive libarchive/test
Author: mm Date: Fri Dec 30 01:27:27 2016 New Revision: 310796 URL: https://svnweb.freebsd.org/changeset/base/310796 Log: Update vendor/libarchive to git to 379867ecb330b3a952fb7bfa7bffb7bbd5547205 Vendor changes: PR #771: Add NFSv4 ACL support to pax and restricted pax Added: vendor/libarchive/dist/libarchive/test/test_acl_pax_nfs4.tar.uu vendor/libarchive/dist/libarchive/test/test_acl_pax_posix1e.tar.uu - copied, changed from r310795, vendor/libarchive/dist/libarchive/test/test_acl_pax.tar.uu vendor/libarchive/dist/libarchive/test/test_acl_text.c (contents, props changed) vendor/libarchive/dist/libarchive/test/test_compat_star_acl.c - copied, changed from r310795, vendor/libarchive/dist/libarchive/test/test_compat_star_acl_posix1e.c vendor/libarchive/dist/libarchive/test/test_compat_star_acl_nfs4.tar.uu Deleted: vendor/libarchive/dist/libarchive/test/test_acl_pax.tar.uu vendor/libarchive/dist/libarchive/test/test_compat_star_acl_posix1e.c Modified: vendor/libarchive/dist/Makefile.am vendor/libarchive/dist/NEWS vendor/libarchive/dist/libarchive/archive_acl.c vendor/libarchive/dist/libarchive/archive_acl_private.h vendor/libarchive/dist/libarchive/archive_entry.c vendor/libarchive/dist/libarchive/archive_entry.h vendor/libarchive/dist/libarchive/archive_entry_acl.3 vendor/libarchive/dist/libarchive/archive_entry_locale.h vendor/libarchive/dist/libarchive/archive_read_disk_entry_from_file.c vendor/libarchive/dist/libarchive/archive_read_support_format_tar.c vendor/libarchive/dist/libarchive/archive_write_set_format_pax.c vendor/libarchive/dist/libarchive/libarchive-formats.5 vendor/libarchive/dist/libarchive/tar.5 vendor/libarchive/dist/libarchive/test/CMakeLists.txt vendor/libarchive/dist/libarchive/test/main.c vendor/libarchive/dist/libarchive/test/test.h vendor/libarchive/dist/libarchive/test/test_acl_freebsd_nfs4.c vendor/libarchive/dist/libarchive/test/test_acl_freebsd_posix1e.c vendor/libarchive/dist/libarchive/test/test_acl_nfs4.c vendor/libarchive/dist/libarchive/test/test_acl_pax.c vendor/libarchive/dist/libarchive/test/test_acl_posix1e.c Modified: vendor/libarchive/dist/Makefile.am == --- vendor/libarchive/dist/Makefile.am Fri Dec 30 01:24:08 2016 (r310795) +++ vendor/libarchive/dist/Makefile.am Fri Dec 30 01:27:27 2016 (r310796) @@ -328,6 +328,7 @@ libarchive_test_SOURCES= \ libarchive/test/test_acl_nfs4.c \ libarchive/test/test_acl_pax.c \ libarchive/test/test_acl_posix1e.c \ + libarchive/test/test_acl_text.c \ libarchive/test/test_archive_api_feature.c \ libarchive/test/test_archive_clear_error.c \ libarchive/test/test_archive_cmdline.c \ @@ -376,7 +377,7 @@ libarchive_test_SOURCES= \ libarchive/test/test_compat_plexus_archiver_tar.c \ libarchive/test/test_compat_solaris_tar_acl.c \ libarchive/test/test_compat_solaris_pax_sparse.c \ - libarchive/test/test_compat_star_acl_posix1e.c \ + libarchive/test/test_compat_star_acl.c \ libarchive/test/test_compat_tar_hardlink.c \ libarchive/test/test_compat_uudecode.c \ libarchive/test/test_compat_uudecode_large.c \ @@ -598,7 +599,8 @@ libarchive_TESTS_ENVIRONMENT= LIBARCHIVE libarchive_test_EXTRA_DIST=\ libarchive/test/list.h \ - libarchive/test/test_acl_pax.tar.uu \ + libarchive/test/test_acl_pax_posix1e.tar.uu \ + libarchive/test/test_acl_pax_nfs4.tar.uu \ libarchive/test/test_archive_string_conversion.txt.Z.uu \ libarchive/test/test_compat_bzip2_1.tbz.uu \ libarchive/test/test_compat_bzip2_2.tbz.uu \ @@ -635,6 +637,7 @@ libarchive_test_EXTRA_DIST=\ libarchive/test/test_compat_solaris_pax_sparse_1.pax.Z.uu \ libarchive/test/test_compat_solaris_pax_sparse_2.pax.Z.uu \ libarchive/test/test_compat_solaris_tar_acl.tar.uu \ + libarchive/test/test_compat_star_acl_nfs4.tar.uu \ libarchive/test/test_compat_star_acl_posix1e.tar.uu \ libarchive/test/test_compat_tar_hardlink_1.tar.uu \ libarchive/test/test_compat_uudecode_large.tar.Z.uu \ Modified: vendor/libarchive/dist/NEWS == --- vendor/libarchive/dist/NEWS Fri Dec 30 01:24:08 2016(r310795) +++ vendor/libarchive/dist/NEWS Fri Dec 30 01:27:27 2016(r310796) @@ -1,3 +1,6 @@ +Dec 27, 2016: NFSv4 ACL read and write support for pax +Deprecated functions: archive_entry_acl_text(), archive_entry_acl_text_w() + Oct 26, 2016: Remove liblzmadec support Oct 23, 2016: libarchive 3.2.2 released Modified: vendor/libarchive/dist/libarchive/archive_acl.c == --- vendor/libarchive/dist/libarchive/archive_acl.c Fri Dec 30 01:24:08 2016(r310795) +++ ven
svn commit: r310797 - vendor/libarchive/dist/libarchive
Author: mm Date: Fri Dec 30 01:31:03 2016 New Revision: 310797 URL: https://svnweb.freebsd.org/changeset/base/310797 Log: Update vendor/libarchive to git e8a9de5eaf3b79fc3d990d056343bb52c51c5ba4 Fix style typo in tar.5 Modified: vendor/libarchive/dist/libarchive/tar.5 Modified: vendor/libarchive/dist/libarchive/tar.5 == --- vendor/libarchive/dist/libarchive/tar.5 Fri Dec 30 01:27:27 2016 (r310796) +++ vendor/libarchive/dist/libarchive/tar.5 Fri Dec 30 01:31:03 2016 (r310797) @@ -441,7 +441,7 @@ archives to store files much larger than Vendor-specific attributes used by Joerg Schilling's .Nm star implementation. -.It Cm SCHILY.acl.access , Cm SCHILY.acl.default, .Cm SCHILY.acl.ace +.It Cm SCHILY.acl.access , Cm SCHILY.acl.default, Cm SCHILY.acl.ace Stores the access, default and NFSv4 ACLs as textual strings in a format that is an extension of the format specified by POSIX.1e draft 17. In particular, each user or group access specification can include ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310798 - in vendor/libarchive/dist: cpio libarchive libarchive/test
Author: mm Date: Fri Dec 30 01:34:06 2016 New Revision: 310798 URL: https://svnweb.freebsd.org/changeset/base/310798 Log: Update vendor/libarchive to git 2a2488a81599f9cd065a8254b16a6fd48d81c3b4 Vendor bugfixes: PR #843: Fix memory leak of struct archive_entry in cpio/cpio.c PR #851: Spelling fixes Fix two protoypes in manual page archive_read_disk.3 Modified: vendor/libarchive/dist/cpio/cpio.c vendor/libarchive/dist/libarchive/archive_match.c vendor/libarchive/dist/libarchive/archive_rb.c vendor/libarchive/dist/libarchive/archive_read_disk.3 vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c vendor/libarchive/dist/libarchive/archive_write_disk_posix.c vendor/libarchive/dist/libarchive/archive_write_set_format_iso9660.c vendor/libarchive/dist/libarchive/archive_write_set_format_warc.c vendor/libarchive/dist/libarchive/archive_write_set_format_xar.c vendor/libarchive/dist/libarchive/test/test_acl_freebsd_posix1e.c vendor/libarchive/dist/libarchive/test/test_read_format_7zip.c vendor/libarchive/dist/libarchive/test/test_read_format_isorr_bz2.c vendor/libarchive/dist/libarchive/test/test_read_format_zip_filename.c vendor/libarchive/dist/libarchive/test/test_write_format_iso9660.c vendor/libarchive/dist/libarchive/test/test_write_format_iso9660_zisofs.c Modified: vendor/libarchive/dist/cpio/cpio.c == --- vendor/libarchive/dist/cpio/cpio.c Fri Dec 30 01:31:03 2016 (r310797) +++ vendor/libarchive/dist/cpio/cpio.c Fri Dec 30 01:34:06 2016 (r310798) @@ -703,6 +703,7 @@ file_to_archive(struct cpio *cpio, const lafe_warnc(0, "%s", archive_error_string(cpio->archive_read_disk)); if (r <= ARCHIVE_FAILED) { + archive_entry_free(entry); cpio->return_value = 1; return (r); } Modified: vendor/libarchive/dist/libarchive/archive_match.c == --- vendor/libarchive/dist/libarchive/archive_match.c Fri Dec 30 01:31:03 2016(r310797) +++ vendor/libarchive/dist/libarchive/archive_match.c Fri Dec 30 01:34:06 2016(r310798) @@ -471,7 +471,7 @@ archive_match_path_excluded(struct archi } /* - * Utilty functions to get statistic information for inclusion patterns. + * Utility functions to get statistic information for inclusion patterns. */ int archive_match_path_unmatched_inclusions(struct archive *_a) @@ -1270,7 +1270,7 @@ set_timefilter_pathname_wcs(struct archi #endif /* _WIN32 && !__CYGWIN__ */ /* - * Call back funtions for archive_rb. + * Call back functions for archive_rb. */ static int cmp_node_mbs(const struct archive_rb_node *n1, @@ -1405,7 +1405,7 @@ add_entry(struct archive_match *a, int f &(a->exclusion_tree), pathname); /* -* We always overwrite comparison condision. +* We always overwrite comparison condition. * If you do not want to overwrite it, you should not * call archive_match_exclude_entry(). We cannot know * what behavior you really expect since overwriting @@ -1481,7 +1481,7 @@ time_excluded(struct archive_match *a, s if (nsec == a->older_ctime_nsec && (a->older_ctime_filter & ARCHIVE_MATCH_EQUAL) == 0) - return (1); /* Eeual, skip it. */ + return (1); /* Equal, skip it. */ } } if (a->newer_mtime_filter) { @@ -1513,7 +1513,7 @@ time_excluded(struct archive_match *a, s } } - /* If there is no excluson list, include the file. */ + /* If there is no exclusion list, include the file. */ if (a->exclusion_entry_list.count == 0) return (0); @@ -1700,7 +1700,7 @@ add_owner_id(struct archive_match *a, st break; } - /* Add oowner id. */ + /* Add owner id. */ if (i == ids->count) ids->ids[ids->count++] = id; else if (ids->ids[i] != id) { Modified: vendor/libarchive/dist/libarchive/archive_rb.c == --- vendor/libarchive/dist/libarchive/archive_rb.c Fri Dec 30 01:31:03 2016(r310797) +++ vendor/libarchive/dist/libarchive/archive_rb.c Fri Dec 30 01:34:06 2016(r310798) @@ -312,7 +312,7 @@ __archive_rb_tree_insert_rebalance(struc father = RB_FATHER(self); if (RB_BLACK_P(father)) { /* -* If our greatgrandpa is black, we're done. +* If our great-grandpa is black, we're done. */ retu
svn commit: r310799 - in stable/10/sys: conf dev/hyperv/netvsc modules/hyperv/netvsc
Author: sephe Date: Fri Dec 30 01:59:19 2016 New Revision: 310799 URL: https://svnweb.freebsd.org/changeset/base/310799 Log: MFC 309346,309348 309346 hyperv/hn: Add HN_DEBUG kernel option. If bufring is used for per-TX ring descs, don't update "available" counter, which is only used to help debugging. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8674 309348 hyperv/hn: Don't hold txdesc, if no BPFs are attached. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8675 Modified: stable/10/sys/conf/options stable/10/sys/dev/hyperv/netvsc/if_hn.c stable/10/sys/modules/hyperv/netvsc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/options == --- stable/10/sys/conf/options Fri Dec 30 01:34:06 2016(r310798) +++ stable/10/sys/conf/options Fri Dec 30 01:59:19 2016(r310799) @@ -947,3 +947,6 @@ RANDOM_RWFILE opt_random.h # Intel em(4) driver EM_MULTIQUEUE opt_em.h + +# Hyper-V network driver +HN_DEBUG opt_hn.h Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c == --- stable/10/sys/dev/hyperv/netvsc/if_hn.c Fri Dec 30 01:34:06 2016 (r310798) +++ stable/10/sys/dev/hyperv/netvsc/if_hn.c Fri Dec 30 01:59:19 2016 (r310799) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include "opt_inet6.h" #include "opt_inet.h" +#include "opt_hn.h" #include #include @@ -1436,10 +1437,12 @@ hn_txdesc_put(struct hn_tx_ring *txr, st txr->hn_txdesc_avail++; SLIST_INSERT_HEAD(&txr->hn_txlist, txd, link); mtx_unlock_spin(&txr->hn_txlist_spin); -#else +#else /* HN_USE_TXDESC_BUFRING */ +#ifdef HN_DEBUG atomic_add_int(&txr->hn_txdesc_avail, 1); - buf_ring_enqueue(txr->hn_txdesc_br, txd); #endif + buf_ring_enqueue(txr->hn_txdesc_br, txd); +#endif /* !HN_USE_TXDESC_BUFRING */ return 1; } @@ -1465,8 +1468,10 @@ hn_txdesc_get(struct hn_tx_ring *txr) if (txd != NULL) { #ifdef HN_USE_TXDESC_BUFRING +#ifdef HN_DEBUG atomic_subtract_int(&txr->hn_txdesc_avail, 1); #endif +#endif /* HN_USE_TXDESC_BUFRING */ KASSERT(txd->m == NULL && txd->refs == 0 && STAILQ_EMPTY(&txd->agg_list) && txd->chim_index == HN_NVS_CHIM_IDX_INVALID && @@ -1933,17 +1938,20 @@ done: static int hn_txpkt(struct ifnet *ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd) { - int error, send_failed = 0; + int error, send_failed = 0, has_bpf; again: - /* -* Make sure that this txd and any aggregated txds are not freed -* before ETHER_BPF_MTAP. -*/ - hn_txdesc_hold(txd); + has_bpf = bpf_peers_present(ifp->if_bpf); + if (has_bpf) { + /* +* Make sure that this txd and any aggregated txds are not +* freed before ETHER_BPF_MTAP. +*/ + hn_txdesc_hold(txd); + } error = txr->hn_sendpkt(txr, txd); if (!error) { - if (bpf_peers_present(ifp->if_bpf)) { + if (has_bpf) { const struct hn_txdesc *tmp_txd; ETHER_BPF_MTAP(ifp, txd->m); @@ -1966,7 +1974,8 @@ again: txr->hn_pkts += txr->hn_stat_pkts; txr->hn_sends++; } - hn_txdesc_put(txr, txd); + if (has_bpf) + hn_txdesc_put(txr, txd); if (__predict_false(error)) { int freed; @@ -3479,9 +3488,11 @@ hn_tx_ring_create(struct hn_softc *sc, i if (txr->hn_tx_sysctl_tree != NULL) { child = SYSCTL_CHILDREN(txr->hn_tx_sysctl_tree); +#ifdef HN_DEBUG SYSCTL_ADD_INT(ctx, child, OID_AUTO, "txdesc_avail", CTLFLAG_RD, &txr->hn_txdesc_avail, 0, "# of available TX descs"); +#endif #ifdef HN_IFSTART_SUPPORT if (!hn_use_if_start) #endif Modified: stable/10/sys/modules/hyperv/netvsc/Makefile == --- stable/10/sys/modules/hyperv/netvsc/MakefileFri Dec 30 01:34:06 2016(r310798) +++ stable/10/sys/modules/hyperv/netvsc/MakefileFri Dec 30 01:59:19 2016(r310799) @@ -5,7 +5,7 @@ KMOD= hv_netvsc SRCS= hn_nvs.c hn_rndis.c if_hn.c -SRCS+= bus_if.h device_if.h opt_inet.h opt_inet6.h vmbus_if.h +SRCS+= bus_if.h device_if.h opt_inet.h opt_inet6.h vmbus_if.h opt_hn.h CFLAGS+= -I${.CURDIR}/../../../dev/hyperv/netvsc ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe,
Re: svn commit: r310789 - head/lib/libpam/static_libpam
Hi Alexander, I'm a little confused - the original version had to have had a compile-only step to generate the object first, before running the link-only operation against the object. The new code replaces the link-only operation with a compile+link operation. Shouldn't the pre-existing compile-only operation be removed, since the new compile+link operation supersedes it? Thanks, Ravi (rpokala@) -Original Message- > From: on behalf of Alexander Kabaev > > Date: 2016-12-29, Thursday at 15:30 > To: , , > > Subject: svn commit: r310789 - head/lib/libpam/static_libpam > > Author: kan > Date: Thu Dec 29 21:30:52 2016 > New Revision: 310789 > URL: https://svnweb.freebsd.org/changeset/base/310789 > > Log: > Use compiler driver to build relocatable object > > This works better with external toolchains where LD > will not necessarily defailt to emulation we want. > Compiler driver knows better. > > Modified: > head/lib/libpam/static_libpam/Makefile > > Modified: head/lib/libpam/static_libpam/Makefile > == > --- head/lib/libpam/static_libpam/MakefileThu Dec 29 21:06:31 2016 > (r310788) > +++ head/lib/libpam/static_libpam/MakefileThu Dec 29 21:30:52 2016 > (r310789) > @@ -64,6 +64,6 @@ CLEANFILES+=openpam_static.o \ > openpam_static_modules.o > > openpam_static_modules.o: openpam_static.o ${STATIC_MODULES} > - ${LD} -o ${.TARGET} -r --whole-archive ${.ALLSRC} > + ${CC} -nostdlib ${CFLAGS} -o ${.TARGET} -r -Wl,--whole-archive > ${.ALLSRC} > > .include "${.CURDIR}/../libpam/Makefile" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r310800 - stable/10/sys/dev/hyperv/vmbus
Author: sephe Date: Fri Dec 30 02:02:00 2016 New Revision: 310800 URL: https://svnweb.freebsd.org/changeset/base/310800 Log: MFC 309704 hyperv/vmbus: Utilize vmbus_chan_run_task() Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8686 Modified: stable/10/sys/dev/hyperv/vmbus/vmbus_chan.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/vmbus/vmbus_chan.c == --- stable/10/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Dec 30 01:59:19 2016 (r310799) +++ stable/10/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Dec 30 02:02:00 2016 (r310800) @@ -772,8 +772,7 @@ vmbus_chan_clear_chmap(struct vmbus_chan struct task chmap_task; TASK_INIT(&chmap_task, 0, vmbus_chan_clrchmap_task, chan); - taskqueue_enqueue(chan->ch_tq, &chmap_task); - taskqueue_drain(chan->ch_tq, &chmap_task); + vmbus_chan_run_task(chan, &chmap_task); } static void ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r310789 - head/lib/libpam/static_libpam
On Thu, 29 Dec 2016 18:59:17 -0600 Ravi Pokala wrote: > Hi Alexander, > > I'm a little confused - the original version had to have had a > compile-only step to generate the object first, before running the > link-only operation against the object. The new code replaces the > link-only operation with a compile+link operation. Shouldn't the > pre-existing compile-only operation be removed, since the new > compile+link operation supersedes it? > > Thanks, > > Ravi (rpokala@) > Well, clearly it does not replace link-only operation with compile+link as you suggest. It feeds .o file to to the compiler driver which then invokes ld with all the correct parameters for the target object format. -- Alexander Kabaev pgpy3RvvpdUjZ.pgp Description: Цифровая подпись OpenPGP
svn commit: r310801 - in stable/10/sys/dev/hyperv: include utilities vmbus
Author: sephe Date: Fri Dec 30 02:13:21 2016 New Revision: 310801 URL: https://svnweb.freebsd.org/changeset/base/310801 Log: MFC 309705 hyperv/timesync: Support "sent TC" to improve accuracy. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8723 Modified: stable/10/sys/dev/hyperv/include/hyperv.h stable/10/sys/dev/hyperv/utilities/hv_timesync.c stable/10/sys/dev/hyperv/utilities/vmbus_icreg.h stable/10/sys/dev/hyperv/vmbus/hyperv_reg.h stable/10/sys/dev/hyperv/vmbus/hyperv_var.h stable/10/sys/dev/hyperv/vmbus/vmbus_et.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/include/hyperv.h == --- stable/10/sys/dev/hyperv/include/hyperv.h Fri Dec 30 02:02:00 2016 (r310800) +++ stable/10/sys/dev/hyperv/include/hyperv.h Fri Dec 30 02:13:21 2016 (r310801) @@ -36,6 +36,23 @@ #include #include +#define MSR_HV_TIME_REF_COUNT 0x4020 + +#define CPUID_HV_MSR_TIME_REFCNT 0x0002 /* MSR_HV_TIME_REF_COUNT */ +#define CPUID_HV_MSR_SYNIC 0x0004 /* MSRs for SynIC */ +#define CPUID_HV_MSR_SYNTIMER 0x0008 /* MSRs for SynTimer */ +#define CPUID_HV_MSR_APIC 0x0010 /* MSR_HV_{EOI,ICR,TPR} */ +#define CPUID_HV_MSR_HYPERCALL 0x0020 /* MSR_HV_GUEST_OS_ID +* MSR_HV_HYPERCALL */ +#define CPUID_HV_MSR_VP_INDEX 0x0040 /* MSR_HV_VP_INDEX */ +#define CPUID_HV_MSR_GUEST_IDLE0x0400 /* MSR_HV_GUEST_IDLE */ + +#ifndef NANOSEC +#define NANOSEC10ULL +#endif +#define HYPERV_TIMER_NS_FACTOR 100ULL +#define HYPERV_TIMER_FREQ (NANOSEC / HYPERV_TIMER_NS_FACTOR) + struct hyperv_guid { uint8_t hv_guid[16]; } __packed; @@ -44,4 +61,6 @@ struct hyperv_guid { inthyperv_guid2str(const struct hyperv_guid *, char *, size_t); +extern u_int hyperv_features;/* CPUID_HV_MSR_ */ + #endif /* _HYPERV_H_ */ Modified: stable/10/sys/dev/hyperv/utilities/hv_timesync.c == --- stable/10/sys/dev/hyperv/utilities/hv_timesync.cFri Dec 30 02:02:00 2016(r310800) +++ stable/10/sys/dev/hyperv/utilities/hv_timesync.cFri Dec 30 02:13:21 2016(r310801) @@ -46,10 +46,14 @@ __FBSDID("$FreeBSD$"); #define VMBUS_TIMESYNC_FWVER \ VMBUS_IC_VERSION(VMBUS_TIMESYNC_FWVER_MAJOR, 0) -#define VMBUS_TIMESYNC_MSGVER_MAJOR3 +#define VMBUS_TIMESYNC_MSGVER_MAJOR4 #define VMBUS_TIMESYNC_MSGVER \ VMBUS_IC_VERSION(VMBUS_TIMESYNC_MSGVER_MAJOR, 0) +#define VMBUS_TIMESYNC_DORTT(sc) \ + ((sc)->ic_msgver >= VMBUS_IC_VERSION(4, 0) && \ +(hyperv_features & CPUID_HV_MSR_TIME_REFCNT)) + static const struct vmbus_ic_desc vmbus_timesync_descs[] = { { .ic_guid = { .hv_guid = { @@ -81,12 +85,16 @@ SYSCTL_INT(_hw_hvtimesync, OID_AUTO, sam &vmbus_ts_sample_verbose, 0, "Increase sample request verbosity."); static void -vmbus_timesync(struct hv_util_sc *sc, uint64_t hvtime, uint8_t tsflags) +vmbus_timesync(struct hv_util_sc *sc, uint64_t hvtime, uint64_t sent_tc, +uint8_t tsflags) { struct timespec vm_ts; - uint64_t hv_ns, vm_ns; + uint64_t hv_ns, vm_ns, rtt = 0; + + if (VMBUS_TIMESYNC_DORTT(sc)) + rtt = rdmsr(MSR_HV_TIME_REF_COUNT) - sent_tc; - hv_ns = (hvtime - VMBUS_ICMSG_TS_BASE) * VMBUS_ICMSG_TS_FACTOR; + hv_ns = (hvtime - VMBUS_ICMSG_TS_BASE + rtt) * HYPERV_TIMER_NS_FACTOR; nanotime(&vm_ts); vm_ns = (vm_ts.tv_sec * NANOSEC) + vm_ts.tv_nsec; @@ -174,6 +182,8 @@ vmbus_timesync_cb(struct vmbus_channel * VMBUS_TIMESYNC_FWVER, VMBUS_TIMESYNC_MSGVER); if (error) return; + if (VMBUS_TIMESYNC_DORTT(sc)) + device_printf(sc->ic_dev, "RTT\n"); break; case VMBUS_ICMSG_TYPE_TIMESYNC: @@ -183,7 +193,8 @@ vmbus_timesync_cb(struct vmbus_channel * return; } msg = data; - vmbus_timesync(sc, msg->ic_hvtime, msg->ic_tsflags); + vmbus_timesync(sc, msg->ic_hvtime, msg->ic_sent_tc, + msg->ic_tsflags); break; default: Modified: stable/10/sys/dev/hyperv/utilities/vmbus_icreg.h == --- stable/10/sys/dev/hyperv/utilities/vmbus_icreg.hFri Dec 30 02:02:00 2016(r310800) +++ stable/10/sys/dev/hyperv/utilities/vmbus_icreg.hFri Dec 30 02:13:21 2016(r310801) @@ -114,18 +114,13 @@ struct vmbus_icmsg_timesync { struct vmbus_icmsg_hdr ic_hdr; uint64_t
svn commit: r310802 - in stable/10/sys/dev/hyperv: include netvsc vmbus
Author: sephe Date: Fri Dec 30 02:18:34 2016 New Revision: 310802 URL: https://svnweb.freebsd.org/changeset/base/310802 Log: MFC 309874,309875 309874 hyperv/vmbus: Add channel polling support. Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8738 309875 hyperv/hn: Add polling support Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8739 Modified: stable/10/sys/dev/hyperv/include/vmbus.h stable/10/sys/dev/hyperv/netvsc/if_hn.c stable/10/sys/dev/hyperv/netvsc/if_hnvar.h stable/10/sys/dev/hyperv/vmbus/vmbus_chan.c stable/10/sys/dev/hyperv/vmbus/vmbus_chanvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hyperv/include/vmbus.h == --- stable/10/sys/dev/hyperv/include/vmbus.hFri Dec 30 02:13:21 2016 (r310801) +++ stable/10/sys/dev/hyperv/include/vmbus.hFri Dec 30 02:18:34 2016 (r310802) @@ -50,6 +50,9 @@ #define VMBUS_VERSION_MAJOR(ver) (((uint32_t)(ver)) >> 16) #define VMBUS_VERSION_MINOR(ver) (((uint32_t)(ver)) & 0x) +#define VMBUS_CHAN_POLLHZ_MIN 100 /* 10ms interval */ +#define VMBUS_CHAN_POLLHZ_MAX 100 /* 1us interval */ + /* * GPA stuffs. */ @@ -221,4 +224,8 @@ boolvmbus_chan_tx_empty(const struct v struct taskqueue * vmbus_chan_mgmt_tq(const struct vmbus_channel *chan); +void vmbus_chan_poll_enable(struct vmbus_channel *chan, + u_int pollhz); +void vmbus_chan_poll_disable(struct vmbus_channel *chan); + #endif /* !_VMBUS_H_ */ Modified: stable/10/sys/dev/hyperv/netvsc/if_hn.c == --- stable/10/sys/dev/hyperv/netvsc/if_hn.c Fri Dec 30 02:13:21 2016 (r310801) +++ stable/10/sys/dev/hyperv/netvsc/if_hn.c Fri Dec 30 02:18:34 2016 (r310802) @@ -286,6 +286,7 @@ static int hn_txagg_size_sysctl(SYSCTL static int hn_txagg_pkts_sysctl(SYSCTL_HANDLER_ARGS); static int hn_txagg_pktmax_sysctl(SYSCTL_HANDLER_ARGS); static int hn_txagg_align_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_polling_sysctl(SYSCTL_HANDLER_ARGS); static voidhn_stop(struct hn_softc *); static voidhn_init_locked(struct hn_softc *); @@ -312,6 +313,8 @@ static void hn_resume_mgmt(struct hn_s static voidhn_suspend_mgmt_taskfunc(void *, int); static voidhn_chan_drain(struct hn_softc *, struct vmbus_channel *); +static voidhn_polling(struct hn_softc *, u_int); +static voidhn_chan_polling(struct vmbus_channel *, u_int); static voidhn_update_link_status(struct hn_softc *); static voidhn_change_network(struct hn_softc *); @@ -1095,6 +1098,10 @@ hn_attach(device_t dev) hn_txagg_pkts_sysctl, "I", "Packet transmission aggregation packets, " "0 -- disable, -1 -- auto"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "polling", + CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, + hn_polling_sysctl, "I", + "Polling frequency: [100,100], 0 disable polling"); /* * Setup the ifmedia, which has been initialized earlier. @@ -2347,6 +2354,9 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, break; } + /* Disable polling. */ + hn_polling(sc, 0); + /* * Suspend this interface before the synthetic parts * are ripped. @@ -2392,6 +2402,13 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, */ hn_resume(sc); + /* +* Re-enable polling if this interface is running and +* the polling is requested. +*/ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && sc->hn_pollhz > 0) + hn_polling(sc, sc->hn_pollhz); + HN_UNLOCK(sc); break; @@ -2518,6 +2535,9 @@ hn_stop(struct hn_softc *sc) KASSERT(sc->hn_flags & HN_FLAG_SYNTH_ATTACHED, ("synthetic parts were not attached")); + /* Disable polling. */ + hn_polling(sc, 0); + /* Clear RUNNING bit _before_ hn_suspend_data() */ atomic_clear_int(&ifp->if_drv_flags, IFF_DRV_RUNNING); hn_suspend_data(sc); @@ -2555,6 +2575,10 @@ hn_init_locked(struct hn_softc *sc) /* Everything is ready; unleash! */ atomic_set_int(&ifp->if_drv_flags, IFF_DRV_RUNNING); + + /* Re-enable polling if requested. */ + if (sc->hn_pollhz > 0) +
svn commit: r310803 - head/tests/sys/geom/class/nop
Author: asomers Date: Fri Dec 30 02:22:38 2016 New Revision: 310803 URL: https://svnweb.freebsd.org/changeset/base/310803 Log: ATFify the gnop tests Also, add test cases for the -p, -P, and -s options to gnop create Reviewed by: ngie MFC after:4 weeks Differential Revision:https://reviews.freebsd.org/D8892 Added: head/tests/sys/geom/class/nop/nop_test.sh (contents, props changed) Deleted: head/tests/sys/geom/class/nop/1_test.sh head/tests/sys/geom/class/nop/2_test.sh head/tests/sys/geom/class/nop/conf.sh Modified: head/tests/sys/geom/class/nop/Makefile Modified: head/tests/sys/geom/class/nop/Makefile == --- head/tests/sys/geom/class/nop/Makefile Fri Dec 30 02:18:34 2016 (r310802) +++ head/tests/sys/geom/class/nop/Makefile Fri Dec 30 02:22:38 2016 (r310803) @@ -4,13 +4,6 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/geom/class/${.CURDIR:T} -TAP_TESTS_SH+= 1_test -TAP_TESTS_SH+= 2_test - -${PACKAGE}FILES+= conf.sh - -.for t in ${TAP_TESTS_SH} -TEST_METADATA.$t+= required_user="root" -.endfor +ATF_TESTS_SH+= nop_test .include Added: head/tests/sys/geom/class/nop/nop_test.sh == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/geom/class/nop/nop_test.sh Fri Dec 30 02:22:38 2016 (r310803) @@ -0,0 +1,166 @@ +# Copyright (c) 2016 Alan Somers +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +MD_DEVS="md.devs" +PLAINFILES=plainfiles + +atf_test_case diskinfo cleanup +diskinfo_head() +{ + atf_set "descr" "gnop should preserve diskinfo's basic properties" + atf_set "require.user" "root" + atf_set "timeout" 15 +} +diskinfo_body() +{ + us=$(alloc_md) + atf_check gnop create /dev/${us} + md_secsize=$(diskinfo ${us} | cut -wf 2) + md_mediasize=$(diskinfo ${us} | cut -wf 3) + md_stripesize=$(diskinfo ${us} | cut -wf 5) + nop_secsize=$(diskinfo ${us}.nop | cut -wf 2) + nop_mediasize=$(diskinfo ${us}.nop | cut -wf 3) + nop_stripesize=$(diskinfo ${us}.nop | cut -wf 5) + atf_check_equal "$md_secsize" "$nop_secsize" + atf_check_equal "$md_mediasize" "$nop_mediasize" + atf_check_equal "$md_stripesize" "$nop_stripesize" +} +diskinfo_cleanup() +{ + common_cleanup +} + +atf_test_case io cleanup +io_head() +{ + atf_set "descr" "I/O works on gnop devices" + atf_set "require.user" "root" + atf_set "timeout" 15 +} +io_body() +{ + us=$(alloc_md) + atf_check gnop create /dev/${us} + + echo src >> $PLAINFILES + echo dst >> $PLAINFILES + dd if=/dev/random of=src bs=1m count=1 >/dev/null 2>&1 + dd if=src of=/dev/${us}.nop bs=1m count=1 > /dev/null 2>&1 + dd if=/dev/${us}.nop of=dst bs=1m count=1 > /dev/null 2>&1 + + atf_check_equal `md5 -q src` `md5 -q dst` +} +io_cleanup() +{ + common_cleanup +} + +atf_test_case size cleanup +size_head() +{ + atf_set "descr" "Test gnop's -s option" + atf_set "require.user" "root" + atf_set "timeout" 15 +} +size_body() +{ + us=$(alloc_md) + for mediasize in 65536 524288 1048576; do + atf_check gnop create -s ${mediasize} /dev/${us} + gnop_mediasize=`diskinfo /dev/${us}.nop | cut -wf 3` + atf_check_equal "${mediasize}" "${gnop_mediasize}" + atf_check gnop destroy /dev/${us}.nop + done + # We shouldn't be able to extend the provider's size + atf_check -s not-exit:0 -e ignore gnop create -s 2
svn commit: r310804 - head/sys/dev/rtwn/rtl8812a
Author: kevlo Date: Fri Dec 30 03:08:46 2016 New Revision: 310804 URL: https://svnweb.freebsd.org/changeset/base/310804 Log: - Fix incorrect values in the computation of OFDM and MCS Tx power. - Make power a uint8_t rather than a uint16_t. - Replace the hardcoded RF chains. Reviewed by: avos Modified: head/sys/dev/rtwn/rtl8812a/r12a_chan.c Modified: head/sys/dev/rtwn/rtl8812a/r12a_chan.c == --- head/sys/dev/rtwn/rtl8812a/r12a_chan.c Fri Dec 30 02:22:38 2016 (r310803) +++ head/sys/dev/rtwn/rtl8812a/r12a_chan.c Fri Dec 30 03:08:46 2016 (r310804) @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); static void r12a_write_txpower(struct rtwn_softc *sc, int chain, -struct ieee80211_channel *c, uint16_t power[RTWN_RIDX_COUNT]) +struct ieee80211_channel *c, uint8_t power[RTWN_RIDX_COUNT]) { if (IEEE80211_IS_CHAN_2GHZ(c)) { @@ -163,7 +163,7 @@ r12a_get_power_group(struct rtwn_softc * static void r12a_get_txpower(struct rtwn_softc *sc, int chain, -struct ieee80211_channel *c, uint16_t power[RTWN_RIDX_COUNT]) +struct ieee80211_channel *c, uint8_t power[RTWN_RIDX_COUNT]) { struct r12a_softc *rs = sc->sc_priv; int i, ridx, group, max_mcs; @@ -187,11 +187,8 @@ r12a_get_txpower(struct rtwn_softc *sc, for (ridx = RTWN_RIDX_OFDM6; ridx <= max_mcs; ridx++) power[ridx] = rs->ht40_tx_pwr_2g[chain][group]; - if (RTWN_RATE_IS_OFDM(ridx)) { - uint8_t pwr_diff = rs->ofdm_tx_pwr_diff_2g[chain][0]; - for (ridx = RTWN_RIDX_CCK1; ridx <= max_mcs; ridx++) - power[ridx] += pwr_diff; - } + for (ridx = RTWN_RIDX_OFDM6; ridx <= RTWN_RIDX_OFDM54; ridx++) + power[ridx] += rs->ofdm_tx_pwr_diff_2g[chain][0]; for (i = 0; i < sc->ntxchains; i++) { uint8_t min_mcs; @@ -208,7 +205,7 @@ r12a_get_txpower(struct rtwn_softc *sc, else pwr_diff = rs->bw20_tx_pwr_diff_2g[chain][i]; - min_mcs = RTWN_RIDX_MCS(i * 8 + 7); + min_mcs = RTWN_RIDX_MCS(i * 8); for (ridx = min_mcs; ridx <= max_mcs; ridx++) power[ridx] += pwr_diff; } @@ -216,6 +213,9 @@ r12a_get_txpower(struct rtwn_softc *sc, for (ridx = RTWN_RIDX_OFDM6; ridx <= max_mcs; ridx++) power[ridx] = rs->ht40_tx_pwr_5g[chain][group]; + for (ridx = RTWN_RIDX_OFDM6; ridx <= RTWN_RIDX_OFDM54; ridx++) + power[ridx] += rs->ofdm_tx_pwr_diff_5g[chain][0]; + for (i = 0; i < sc->ntxchains; i++) { uint8_t min_mcs; uint8_t pwr_diff; @@ -231,7 +231,7 @@ r12a_get_txpower(struct rtwn_softc *sc, else pwr_diff = rs->bw20_tx_pwr_diff_5g[chain][i]; - min_mcs = RTWN_RIDX_MCS(i * 8 + 7); + min_mcs = RTWN_RIDX_MCS(i * 8); for (ridx = min_mcs; ridx <= max_mcs; ridx++) power[ridx] += pwr_diff; } @@ -256,7 +256,7 @@ r12a_get_txpower(struct rtwn_softc *sc, static void r12a_set_txpower(struct rtwn_softc *sc, struct ieee80211_channel *c) { - uint16_t power[RTWN_RIDX_COUNT]; + uint8_t power[RTWN_RIDX_COUNT]; int i; for (i = 0; i < sc->ntxchains; i++) { @@ -463,7 +463,7 @@ r12a_set_chan(struct rtwn_softc *sc, str /* RTL8812AU-specific */ rtwn_r12a_fix_spur(sc, c); - for (i = 0; i < 2; i++) + for (i = 0; i < sc->nrxchains; i++) rtwn_rf_setbits(sc, i, R92C_RF_CHNLBW, 0xc00, val); /* Set Tx power for this new channel. */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r310773 - in stable/11/sys: netinet netinet6
On 2016-12-29 17:17:46, Rodney W. Grimes wrote: -- Start of PGP signed section. On 2016-12-29 18:09:39, Piotr P. Stefaniak wrote: >2) the option -ta was added To clarify, what I mean is that the process that generates the sources started using the -ta switch of indent(1), not that the feature was recently implemented. Can you clarify what process these source files are generated by? If these are not the source files, but are being generated by some other thing then wouldn't we want the true sources and the generation process in the repsitory? I think that Michael would be the best person to answer that; I'm merely the one who fixes and breaks indent(1). If this is running indent(1) over source files to clean them up, then that is not "generating" sources per say, but instead cleaning them up with indent(1). That's what I mean. Sorry for the confusion. signature.asc Description: PGP signature
svn commit: r310805 - in head/sys: kern sys vm
Author: mjg Date: Fri Dec 30 06:26:17 2016 New Revision: 310805 URL: https://svnweb.freebsd.org/changeset/base/310805 Log: Remove cpu_spinwait after seq_consistent. It does not add any benefit as the read routine will do it as necessary. Modified: head/sys/kern/kern_descrip.c head/sys/sys/seq.h head/sys/vm/vm_domain.c Modified: head/sys/kern/kern_descrip.c == --- head/sys/kern/kern_descrip.cFri Dec 30 03:08:46 2016 (r310804) +++ head/sys/kern/kern_descrip.cFri Dec 30 06:26:17 2016 (r310805) @@ -2556,10 +2556,8 @@ fget_unlocked(struct filedesc *fdp, int fde = &fdt->fdt_ofiles[fd]; haverights = *cap_rights_fde(fde); fp = fde->fde_file; - if (!seq_consistent(fd_seq(fdt, fd), seq)) { - cpu_spinwait(); + if (!seq_consistent(fd_seq(fdt, fd), seq)) continue; - } #else fp = fdt->fdt_ofiles[fd].fde_file; #endif Modified: head/sys/sys/seq.h == --- head/sys/sys/seq.h Fri Dec 30 03:08:46 2016(r310804) +++ head/sys/sys/seq.h Fri Dec 30 06:26:17 2016(r310805) @@ -59,7 +59,6 @@ typedef uint32_t seq_t; * lobj = gobj; * if (seq_consistent(&gobj->seq, seq)) * break; - * cpu_spinwait(); * } * foo(lobj); */ Modified: head/sys/vm/vm_domain.c == --- head/sys/vm/vm_domain.c Fri Dec 30 03:08:46 2016(r310804) +++ head/sys/vm/vm_domain.c Fri Dec 30 06:26:17 2016(r310805) @@ -140,7 +140,6 @@ vm_domain_policy_localcopy(struct vm_dom *dst = *src; if (seq_consistent(&src->seq, seq)) return; - cpu_spinwait(); } } @@ -168,7 +167,6 @@ vm_domain_policy_copy(struct vm_domain_p seq_write_end(&dst->seq); return; } - cpu_spinwait(); } } @@ -330,7 +328,6 @@ vm_domain_iterator_set_policy(struct vm_ _vm_domain_iterator_set_policy(vi, &vt_lcl); return; } - cpu_spinwait(); } } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r310773 - in stable/11/sys: netinet netinet6
> On 30 Dec 2016, at 07:17, Piotr P. Stefaniak wrote: > > On 2016-12-29 17:17:46, Rodney W. Grimes wrote: >> -- Start of PGP signed section. >>> On 2016-12-29 18:09:39, Piotr P. Stefaniak wrote: >>> >2) the option -ta was added >>> >>> To clarify, what I mean is that the process that generates the sources >>> started using the -ta switch of indent(1), not that the feature was >>> recently implemented. >> >> Can you clarify what process these source files are generated by? If >> these are not the source files, but are being generated by some other >> thing then wouldn't we want the true sources and the generation process >> in the repsitory? I don't know. As far as I know, this kind of processing was happening right from the beginning of the integration of SCTP in FreeBSD. The script which runs is available at: https://github.com/sctplab/sctp-idata/blob/master/src/freebsd_prepare calling https://github.com/sctplab/sctp-idata/blob/master/src/s9indent Please note that this processing is happening for years. I added the -ta recently, since Piotr suggested it... The sources are also available at https://github.com/sctplab/sctp-idata/tree/master/src in the netinet and netinet6 directory. Please note that the upstream sources are ifdef'ed to allow * to be compiled in the FreeBSD kernel * to be compiled as a network kernel extension for Mac OS X * to be compiled as a loadable module for Windows (this worked in the past and the maintainer stopped) * to be compiled in a user land stack (with some glue code) being used in Firefox and Chrome browsers. Except for the -ta change, nothing has changed on my side, just ident was evolving and I wanted to keep the changes related to this isolated in a commit. That way I know that there is no upstream change in the source code. Best regards Michael > > I think that Michael would be the best person to answer that; I'm merely > the one who fixes and breaks indent(1). > >> If this is running indent(1) over source files to clean them up, >> then that is not "generating" sources per say, but instead cleaning >> them up with indent(1). > > That's what I mean. Sorry for the confusion. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"