From owner-svn-src-all@freebsd.org Sun Nov 29 05:08:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11CE5A3B64B; Sun, 29 Nov 2015 05:08:25 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEDC313A4; Sun, 29 Nov 2015 05:08:24 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAT58ObN043065; Sun, 29 Nov 2015 05:08:24 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAT58NUs043062; Sun, 29 Nov 2015 05:08:23 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511290508.tAT58NUs043062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sun, 29 Nov 2015 05:08:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291432 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 05:08:25 -0000 Author: arybchik Date: Sun Nov 29 05:08:23 2015 New Revision: 291432 URL: https://svnweb.freebsd.org/changeset/base/291432 Log: sfxge: modify nvram update functions for uio platform to support RFID-selectable presets Dynamic config partitions on boards that support RFID are divided into a number of segments, each formatted like a partition, with header, trailer and end tags. The first segment is the current active configuration. The segments are initialised by manftest and each contain a different configuration e.g. firmware variant. The firmware can be instructed via RFID to copy a segment over the first segment, hence changing the active configuration. This allows ops to change the configuration of a board prior to shipment using RFID. Changes to the dynamic config may need to be written to all segments (in particular firmware versions written by manftest) or just the first segment (changes to the active configuration). See SF-111324-SW. If only the first segment is written the code still needs to be aware of the possible presence of subsequent segments as writing to a segment may cause its size to increase, which would overwrite the subsequent segments and invalidate them. Boards that do not support RFID will only have one segment in their dynamic config partition. Submitted by: Paul Fox Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4302 Modified: head/sys/dev/sfxge/common/hunt_impl.h head/sys/dev/sfxge/common/hunt_nvram.c head/sys/dev/sfxge/common/hunt_vpd.c Modified: head/sys/dev/sfxge/common/hunt_impl.h ============================================================================== --- head/sys/dev/sfxge/common/hunt_impl.h Sat Nov 28 17:38:27 2015 (r291431) +++ head/sys/dev/sfxge/common/hunt_impl.h Sun Nov 29 05:08:23 2015 (r291432) @@ -295,8 +295,8 @@ hunt_mcdi_macaddr_change_supported( extern __checkReturn int hunt_nvram_buf_read_tlv( __in efx_nic_t *enp, - __in_bcount(partn_size) caddr_t partn_data, - __in size_t partn_size, + __in_bcount(max_seg_size) caddr_t seg_data, + __in size_t max_seg_size, __in uint32_t tag, __deref_out_bcount_opt(*sizep) caddr_t *datap, __out size_t *sizep); @@ -327,6 +327,15 @@ hunt_nvram_partn_write_tlv( __in size_t size); extern __checkReturn int +hunt_nvram_partn_write_segment_tlv( + __in efx_nic_t *enp, + __in uint32_t partn, + __in uint32_t tag, + __in_bcount(size) caddr_t data, + __in size_t size, + __in boolean_t all_segments); + +extern __checkReturn int hunt_nvram_partn_size( __in efx_nic_t *enp, __in unsigned int partn, Modified: head/sys/dev/sfxge/common/hunt_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_nvram.c Sat Nov 28 17:38:27 2015 (r291431) +++ head/sys/dev/sfxge/common/hunt_nvram.c Sun Nov 29 05:08:23 2015 (r291432) @@ -571,13 +571,19 @@ fail1: return (rc); } -/* Read and validate an entire TLV formatted partition */ -static __checkReturn int -hunt_nvram_read_tlv_partition( - __in efx_nic_t *enp, - __in uint32_t partn, - __in_bcount(partn_size) caddr_t partn_data, - __in size_t partn_size) +/* + * Read and validate a segment from a partition. A segment is a complete + * tlv chain between PARTITION_HEADER and PARTITION_END tags. There may + * be multiple segments in a partition, so seg_offset allows segments + * beyond the first to be read. + */ +static __checkReturn int +hunt_nvram_read_tlv_segment( + __in efx_nic_t *enp, + __in uint32_t partn, + __in size_t seg_offset, + __in_bcount(max_seg_size) caddr_t seg_data, + __in size_t max_seg_size) { tlv_cursor_t cursor; struct tlv_partition_header *header; @@ -589,20 +595,20 @@ hunt_nvram_read_tlv_partition( EFX_STATIC_ASSERT(sizeof (*header) <= HUNTINGTON_NVRAM_CHUNK); - if ((partn_data == NULL) || (partn_size == 0)) { + if ((seg_data == NULL) || (max_seg_size == 0)) { rc = EINVAL; goto fail1; } - /* Read initial chunk of partition */ - if ((rc = hunt_nvram_partn_read(enp, partn, 0, partn_data, + /* Read initial chunk of the segment, starting at offset */ + if ((rc = hunt_nvram_partn_read(enp, partn, seg_offset, seg_data, HUNTINGTON_NVRAM_CHUNK)) != 0) { goto fail2; } - /* The partition header must be the first item (at offset zero) */ - if ((rc = tlv_init_cursor_from_size(&cursor, partn_data, - partn_size)) != 0) { + /* A PARTITION_HEADER tag must be the first item at the given offset */ + if ((rc = tlv_init_cursor_from_size(&cursor, seg_data, + max_seg_size)) != 0) { rc = EFAULT; goto fail3; } @@ -612,23 +618,23 @@ hunt_nvram_read_tlv_partition( } header = (struct tlv_partition_header *)tlv_item(&cursor); - /* Check TLV partition length (includes the END tag) */ + /* Check TLV segment length (includes the END tag) */ total_length = __LE_TO_CPU_32(header->total_length); - if (total_length > partn_size) { + if (total_length > max_seg_size) { rc = EFBIG; goto fail5; } - /* Read the remaining partition content */ + /* Read the remaining segment content */ if (total_length > HUNTINGTON_NVRAM_CHUNK) { if ((rc = hunt_nvram_partn_read(enp, partn, - HUNTINGTON_NVRAM_CHUNK, - partn_data + HUNTINGTON_NVRAM_CHUNK, + seg_offset + HUNTINGTON_NVRAM_CHUNK, + seg_data + HUNTINGTON_NVRAM_CHUNK, total_length - HUNTINGTON_NVRAM_CHUNK)) != 0) goto fail6; } - /* Check partition ends with PARTITION_TRAILER and END tags */ + /* Check segment ends with PARTITION_TRAILER and END tags */ if ((rc = tlv_find(&cursor, TLV_TAG_PARTITION_TRAILER)) != 0) { rc = EINVAL; goto fail7; @@ -644,7 +650,7 @@ hunt_nvram_read_tlv_partition( goto fail9; } - /* Check data read from partition is consistent */ + /* Check data read from segment is consistent */ if (trailer->generation != header->generation) { /* * The partition data may have been modified between successive @@ -656,10 +662,10 @@ hunt_nvram_read_tlv_partition( goto fail10; } - /* Verify partition checksum */ + /* Verify segment checksum */ cksum = 0; for (pos = 0; (size_t)pos < total_length; pos += sizeof (uint32_t)) { - cksum += *((uint32_t *)(partn_data + pos)); + cksum += *((uint32_t *)(seg_data + pos)); } if (cksum != 0) { rc = EINVAL; @@ -696,13 +702,13 @@ fail1: /* * Read a single TLV item from a host memory - * buffer containing a TLV formatted partition. + * buffer containing a TLV formatted segment. */ __checkReturn int hunt_nvram_buf_read_tlv( __in efx_nic_t *enp, - __in_bcount(partn_size) caddr_t partn_data, - __in size_t partn_size, + __in_bcount(max_seg_size) caddr_t seg_data, + __in size_t max_seg_size, __in uint32_t tag, __deref_out_bcount_opt(*sizep) caddr_t *datap, __out size_t *sizep) @@ -713,14 +719,14 @@ hunt_nvram_buf_read_tlv( caddr_t value; int rc; - if ((partn_data == NULL) || (partn_size == 0)) { + if ((seg_data == NULL) || (max_seg_size == 0)) { rc = EINVAL; goto fail1; } - /* Find requested TLV tag in partition data */ - if ((rc = tlv_init_cursor_from_size(&cursor, partn_data, - partn_size)) != 0) { + /* Find requested TLV tag in segment data */ + if ((rc = tlv_init_cursor_from_size(&cursor, seg_data, + max_seg_size)) != 0) { rc = EFAULT; goto fail2; } @@ -760,18 +766,16 @@ fail1: return (rc); } - - -/* Read a single TLV item from a TLV formatted partition */ +/* Read a single TLV item from the first segment in a TLV formatted partition */ __checkReturn int hunt_nvram_partn_read_tlv( - __in efx_nic_t *enp, - __in uint32_t partn, - __in uint32_t tag, - __deref_out_bcount_opt(*sizep) caddr_t *datap, - __out size_t *sizep) + __in efx_nic_t *enp, + __in uint32_t partn, + __in uint32_t tag, + __deref_out_bcount_opt(*seg_sizep) caddr_t *seg_datap, + __out size_t *seg_sizep) { - caddr_t partn_data = NULL; + caddr_t seg_data = NULL; size_t partn_size = 0; size_t length; caddr_t data; @@ -787,39 +791,39 @@ hunt_nvram_partn_read_tlv( goto fail2; } - EFSYS_KMEM_ALLOC(enp->en_esip, partn_size, partn_data); - if (partn_data == NULL) { + EFSYS_KMEM_ALLOC(enp->en_esip, partn_size, seg_data); + if (seg_data == NULL) { rc = ENOMEM; goto fail3; } /* - * Read the entire TLV partition. Retry until consistent partition - * contents are returned. Inconsistent data may be read if: - * a) the partition contents are invalid + * Read the first segment in a TLV partition. Retry until consistent + * segment contents are returned. Inconsistent data may be read if: + * a) the segment contents are invalid * b) the MC has rebooted while we were reading the partition * c) the partition has been modified while we were reading it * Limit retry attempts to ensure forward progress. */ retry = 10; do { - rc = hunt_nvram_read_tlv_partition(enp, partn, - partn_data, partn_size); + rc = hunt_nvram_read_tlv_segment(enp, partn, 0, + seg_data, partn_size); } while ((rc == EAGAIN) && (--retry > 0)); if (rc != 0) { - /* Failed to obtain consistent partition data */ + /* Failed to obtain consistent segment data */ goto fail4; } - if ((rc = hunt_nvram_buf_read_tlv(enp, partn_data, partn_size, + if ((rc = hunt_nvram_buf_read_tlv(enp, seg_data, partn_size, tag, &data, &length)) != 0) goto fail5; - EFSYS_KMEM_FREE(enp->en_esip, partn_size, partn_data); + EFSYS_KMEM_FREE(enp->en_esip, partn_size, seg_data); - *datap = data; - *sizep = length; + *seg_datap = data; + *seg_sizep = length; return (0); @@ -828,7 +832,137 @@ fail5: fail4: EFSYS_PROBE(fail4); - EFSYS_KMEM_FREE(enp->en_esip, partn_size, partn_data); + EFSYS_KMEM_FREE(enp->en_esip, partn_size, seg_data); +fail3: + EFSYS_PROBE(fail3); +fail2: + EFSYS_PROBE(fail2); +fail1: + EFSYS_PROBE1(fail1, int, rc); + + return (rc); +} + +/* Compute the size of a segment. */ + static __checkReturn int +hunt_nvram_buf_segment_size( + __in caddr_t seg_data, + __in size_t max_seg_size, + __out size_t *seg_sizep) +{ + int rc; + tlv_cursor_t cursor; + struct tlv_partition_header *header; + struct tlv_partition_trailer *trailer; + uint32_t cksum; + int pos; + uint32_t *end_tag_position; + uint32_t segment_length; + + /* A PARTITION_HEADER tag must be the first item at the given offset */ + if ((rc = tlv_init_cursor_from_size(&cursor, seg_data, + max_seg_size)) != 0) { + rc = EFAULT; + goto fail1; + } + if (tlv_tag(&cursor) != TLV_TAG_PARTITION_HEADER) { + rc = EINVAL; + goto fail2; + } + header = (struct tlv_partition_header *)tlv_item(&cursor); + + /* Check TLV segment length (includes the END tag) */ + *seg_sizep = __LE_TO_CPU_32(header->total_length); + if (*seg_sizep > max_seg_size) { + rc = EFBIG; + goto fail3; + } + + /* Check segment ends with PARTITION_TRAILER and END tags */ + if ((rc = tlv_find(&cursor, TLV_TAG_PARTITION_TRAILER)) != 0) { + rc = EINVAL; + goto fail4; + } + trailer = (struct tlv_partition_trailer *)tlv_item(&cursor); + + if ((rc = tlv_advance(&cursor)) != 0) { + rc = EINVAL; + goto fail5; + } + if (tlv_tag(&cursor) != TLV_TAG_END) { + rc = EINVAL; + goto fail6; + } + end_tag_position = cursor.current; + + /* Verify segment checksum */ + cksum = 0; + for (pos = 0; (size_t)pos < *seg_sizep; pos += sizeof (uint32_t)) { + cksum += *((uint32_t *)(seg_data + pos)); + } + if (cksum != 0) { + rc = EINVAL; + goto fail7; + } + + /* + * Calculate total length from HEADER to END tags and compare to + * max_seg_size and the total_length field in the HEADER tag. + */ + segment_length = tlv_block_length_used(&cursor); + + if (segment_length > max_seg_size) { + rc = EINVAL; + goto fail8; + } + + if (segment_length != *seg_sizep) { + rc = EINVAL; + goto fail9; + } + + /* Skip over the first HEADER tag. */ + rc = tlv_rewind(&cursor); + rc = tlv_advance(&cursor); + + while (rc == 0) { + if (tlv_tag(&cursor) == TLV_TAG_END) { + /* Check that the END tag is the one found earlier. */ + if (cursor.current != end_tag_position) + goto fail10; + break; + } + /* Check for duplicate HEADER tags before the END tag. */ + if (tlv_tag(&cursor) == TLV_TAG_PARTITION_HEADER) { + rc = EINVAL; + goto fail11; + } + + rc = tlv_advance(&cursor); + } + if (rc != 0) + goto fail12; + + return (0); + +fail12: + EFSYS_PROBE(fail12); +fail11: + EFSYS_PROBE(fail11); +fail10: + EFSYS_PROBE(fail10); +fail9: + EFSYS_PROBE(fail9); +fail8: + EFSYS_PROBE(fail8); +fail7: + EFSYS_PROBE(fail7); +fail6: + EFSYS_PROBE(fail6); +fail5: + EFSYS_PROBE(fail5); +fail4: + EFSYS_PROBE(fail4); fail3: EFSYS_PROBE(fail3); fail2: @@ -841,12 +975,12 @@ fail1: /* * Add or update a single TLV item in a host memory buffer containing a TLV - * formatted partition. + * formatted segment. Historically partitions consisted of only one segment. */ - __checkReturn int + __checkReturn int hunt_nvram_buf_write_tlv( - __inout_bcount(partn_size) caddr_t partn_data, - __in size_t partn_size, + __inout_bcount(max_seg_size) caddr_t seg_data, + __in size_t max_seg_size, __in uint32_t tag, __in_bcount(tag_size) caddr_t tag_data, __in size_t tag_size, @@ -860,9 +994,9 @@ hunt_nvram_buf_write_tlv( int pos; int rc; - /* The partition header must be the first item (at offset zero) */ - if ((rc = tlv_init_cursor_from_size(&cursor, partn_data, - partn_size)) != 0) { + /* A PARTITION_HEADER tag must be the first item (at offset zero) */ + if ((rc = tlv_init_cursor_from_size(&cursor, seg_data, + max_seg_size)) != 0) { rc = EFAULT; goto fail1; } @@ -901,7 +1035,10 @@ hunt_nvram_buf_write_tlv( /* Update PARTITION_HEADER and PARTITION_TRAILER fields */ *total_lengthp = tlv_block_length_used(&cursor); - EFSYS_ASSERT3U(*total_lengthp, <=, partn_size); + if (*total_lengthp > max_seg_size) { + rc = ENOSPC; + goto fail7; + } generation = __LE_TO_CPU_32(header->generation) + 1; header->total_length = __CPU_TO_LE_32(*total_lengthp); @@ -912,12 +1049,14 @@ hunt_nvram_buf_write_tlv( trailer->checksum = 0; cksum = 0; for (pos = 0; (size_t)pos < *total_lengthp; pos += sizeof (uint32_t)) { - cksum += *((uint32_t *)(partn_data + pos)); + cksum += *((uint32_t *)(seg_data + pos)); } trailer->checksum = ~cksum + 1; return (0); +fail7: + EFSYS_PROBE(fail7); fail6: EFSYS_PROBE(fail6); fail5: @@ -934,7 +1073,11 @@ fail1: return (rc); } -/* Add or update a single TLV item in a TLV formatted partition */ +/* + * Add or update a single TLV item in the first segment of a TLV formatted + * dynamic config partition. The first segment is the current active + * configuration. + */ __checkReturn int hunt_nvram_partn_write_tlv( __in efx_nic_t *enp, @@ -943,10 +1086,114 @@ hunt_nvram_partn_write_tlv( __in_bcount(size) caddr_t data, __in size_t size) { - size_t partn_size; + return hunt_nvram_partn_write_segment_tlv(enp, partn, tag, data, + size, B_FALSE); +} + +/* + * Read a segment from nvram at the given offset into a buffer (segment_data) + * and optionally write a new tag to it. + */ + static __checkReturn int +hunt_nvram_segment_write_tlv( + __in efx_nic_t *enp, + __in uint32_t partn, + __in uint32_t tag, + __in_bcount(size) caddr_t data, + __in size_t size, + __inout caddr_t *seg_datap, + __inout size_t *partn_offsetp, + __inout size_t *src_remain_lenp, + __inout size_t *dest_remain_lenp, + __in boolean_t write) +{ + int rc; + int status; + size_t original_segment_size; + size_t modified_segment_size; + + /* + * Read the segment from NVRAM into the segment_data buffer and validate + * it, returning if it does not validate. This is not a failure unless + * this is the first segment in a partition. In this case the caller + * must propogate the error. + */ + status = hunt_nvram_read_tlv_segment(enp, partn, *partn_offsetp, + *seg_datap, *src_remain_lenp); + if (status != 0) + return (EINVAL); + + status = hunt_nvram_buf_segment_size(*seg_datap, + *src_remain_lenp, &original_segment_size); + if (status != 0) + return (EINVAL); + + if (write) { + /* Update the contents of the segment in the buffer */ + if ((rc = hunt_nvram_buf_write_tlv(*seg_datap, + *dest_remain_lenp, tag, data, size, + &modified_segment_size)) != 0) + goto fail1; + *dest_remain_lenp -= modified_segment_size; + *seg_datap += modified_segment_size; + } else { + /* + * We won't modify this segment, but still need to update the + * remaining lengths and pointers. + */ + *dest_remain_lenp -= original_segment_size; + *seg_datap += original_segment_size; + } + + *partn_offsetp += original_segment_size; + *src_remain_lenp -= original_segment_size; + + return (0); + +fail1: + EFSYS_PROBE1(fail1, int, rc); + + return (rc); +} + +/* + * Add or update a single TLV item in either the first segment or in all + * segments in a TLV formatted dynamic config partition. Dynamic config + * partitions on boards that support RFID are divided into a number of segments, + * each formatted like a partition, with header, trailer and end tags. The first + * segment is the current active configuration. + * + * The segments are initialised by manftest and each contain a different + * configuration e.g. firmware variant. The firmware can be instructed + * via RFID to copy a segment to replace the first segment, hence changing the + * active configuration. This allows ops to change the configuration of a board + * prior to shipment using RFID. + * + * Changes to the dynamic config may need to be written to all segments (e.g. + * firmware versions) or just the first segment (changes to the active + * configuration). See SF-111324-SW "The use of RFID in Solarflare Products". + * If only the first segment is written the code still needs to be aware of the + * possible presence of subsequent segments as writing to a segment may cause + * its size to increase, which would overwrite the subsequent segments and + * invalidate them. + */ + __checkReturn int +hunt_nvram_partn_write_segment_tlv( + __in efx_nic_t *enp, + __in uint32_t partn, + __in uint32_t tag, + __in_bcount(size) caddr_t data, + __in size_t size, + __in boolean_t all_segments) +{ + size_t partn_size = 0; caddr_t partn_data; - size_t total_length; + size_t total_length = 0; int rc; + size_t current_offset = 0; + size_t remaining_original_length; + size_t remaining_modified_length; + caddr_t segment_data; EFSYS_ASSERT3U(partn, ==, NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG); @@ -960,27 +1207,49 @@ hunt_nvram_partn_write_tlv( goto fail2; } + remaining_original_length = partn_size; + remaining_modified_length = partn_size; + segment_data = partn_data; + /* Lock the partition */ if ((rc = hunt_nvram_partn_lock(enp, partn)) != 0) goto fail3; - /* Read the partition contents (no need to retry when locked). */ - if ((rc = hunt_nvram_read_tlv_partition(enp, partn, - partn_data, partn_size)) != 0) { - /* Failed to obtain consistent partition data */ - goto fail4; - } + /* Iterate over each (potential) segment to update it. */ + do { + boolean_t write = all_segments || current_offset == 0; - /* Update the contents in memory */ - if ((rc = hunt_nvram_buf_write_tlv(partn_data, partn_size, - tag, data, size, &total_length)) != 0) + rc = hunt_nvram_segment_write_tlv(enp, partn, tag, data, size, + &segment_data, ¤t_offset, &remaining_original_length, + &remaining_modified_length, write); + if (rc != 0) { + if (current_offset == 0) { + /* + * If no data has been read then the first + * segment is invalid, which is an error. + */ + goto fail4; + } + break; + } + } while (current_offset < partn_size); + + total_length = segment_data - partn_data; + + /* + * We've run out of space. This should actually be dealt with by + * hunt_nvram_buf_write_tlv returning ENOSPC. + */ + if (total_length > partn_size) { + rc = ENOSPC; goto fail5; + } - /* Erase the whole partition */ + /* Erase the whole partition in NVRAM */ if ((rc = hunt_nvram_partn_erase(enp, partn, 0, partn_size)) != 0) goto fail6; - /* Write new partition contents to NVRAM */ + /* Write new partition contents from the buffer to NVRAM */ if ((rc = hunt_nvram_partn_write(enp, partn, 0, partn_data, total_length)) != 0) goto fail7; @@ -1014,6 +1283,10 @@ fail1: return (rc); } +/* + * Get the size of a NVRAM partition. This is the total size allocated in nvram, + * not the data used by the segments in the partition. + */ __checkReturn int hunt_nvram_partn_size( __in efx_nic_t *enp, @@ -1171,10 +1444,11 @@ hunt_nvram_partn_set_version( size = sizeof (partn_version) - (2 * sizeof (uint32_t)); - if ((rc = hunt_nvram_partn_write_tlv(enp, + /* Write the version number to all segments in the partition */ + if ((rc = hunt_nvram_partn_write_segment_tlv(enp, NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, TLV_TAG_PARTITION_VERSION(partn), - (caddr_t)&partn_version.version_w, size)) != 0) + (caddr_t)&partn_version.version_w, size, B_TRUE)) != 0) goto fail1; return (0); Modified: head/sys/dev/sfxge/common/hunt_vpd.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_vpd.c Sat Nov 28 17:38:27 2015 (r291431) +++ head/sys/dev/sfxge/common/hunt_vpd.c Sun Nov 29 05:08:23 2015 (r291432) @@ -396,11 +396,11 @@ hunt_vpd_write( if ((rc = efx_vpd_hunk_length(data, size, &vpd_length)) != 0) goto fail1; - /* Store new dynamic VPD in DYNAMIC_CONFIG partition */ - if ((rc = hunt_nvram_partn_write_tlv(enp, + /* Store new dynamic VPD in all segments in DYNAMIC_CONFIG partition */ + if ((rc = hunt_nvram_partn_write_segment_tlv(enp, NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, TLV_TAG_PF_DYNAMIC_VPD(pci_pf), - data, vpd_length)) != 0) { + data, vpd_length, B_TRUE)) != 0) { goto fail2; } From owner-svn-src-all@freebsd.org Sun Nov 29 05:34:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0867A3BCAE; Sun, 29 Nov 2015 05:34:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D1B110BB; Sun, 29 Nov 2015 05:34:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAT5Y0jj051606; Sun, 29 Nov 2015 05:34:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAT5Y0eH051602; Sun, 29 Nov 2015 05:34:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511290534.tAT5Y0eH051602@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 29 Nov 2015 05:34:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291433 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 05:34:02 -0000 Author: adrian Date: Sun Nov 29 05:34:00 2015 New Revision: 291433 URL: https://svnweb.freebsd.org/changeset/base/291433 Log: [ath_hal] add AR9461 (jupiter) 2.1 support. Obtained from: Linux ath9k Added: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9462_2p0_initvals.h (contents, props changed) head/sys/contrib/dev/ath/ath_hal/ar9300/ar9462_2p1_initvals.h (contents, props changed) Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300reg.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sun Nov 29 05:08:23 2015 (r291432) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sun Nov 29 05:34:00 2015 (r291433) @@ -39,6 +39,7 @@ #include "ar9300/ar9485_1_1.ini" #include "ar9300/ar9300_jupiter10.ini" #include "ar9300/ar9300_jupiter20.ini" +#include "ar9300/ar9462_2p1_initvals.h" #include "ar9300/ar9580.ini" #include "ar9300/ar955x.ini" #include "ar9300/ar9300_aphrodite10.ini" @@ -1598,11 +1599,21 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC else if (AR_SREV_JUPITER_20(ah)) { /* Jupiter: new INI format (pre, core, post arrays per subsystem) */ + /* FreeBSD: just override the registers for jupiter 2.1 */ + /* mac */ INIT_INI_ARRAY(&ahp->ah_ini_mac[ATH_INI_PRE], NULL, 0, 0); - INIT_INI_ARRAY(&ahp->ah_ini_mac[ATH_INI_CORE], - ar9300_jupiter_2p0_mac_core, - ARRAY_LENGTH(ar9300_jupiter_2p0_mac_core), 2); + + if (AR_SREV_JUPITER_21(ah)) { + INIT_INI_ARRAY(&ahp->ah_ini_mac[ATH_INI_CORE], + ar9462_2p1_mac_core, + ARRAY_LENGTH(ar9462_2p1_mac_core), 2); + } else { + INIT_INI_ARRAY(&ahp->ah_ini_mac[ATH_INI_CORE], + ar9300_jupiter_2p0_mac_core, + ARRAY_LENGTH(ar9300_jupiter_2p0_mac_core), 2); + } + INIT_INI_ARRAY(&ahp->ah_ini_mac[ATH_INI_POST], ar9300_jupiter_2p0_mac_postamble, ARRAY_LENGTH(ar9300_jupiter_2p0_mac_postamble), 5); @@ -1612,9 +1623,16 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC INIT_INI_ARRAY(&ahp->ah_ini_bb[ATH_INI_CORE], ar9300_jupiter_2p0_baseband_core, ARRAY_LENGTH(ar9300_jupiter_2p0_baseband_core), 2); - INIT_INI_ARRAY(&ahp->ah_ini_bb[ATH_INI_POST], - ar9300_jupiter_2p0_baseband_postamble, - ARRAY_LENGTH(ar9300_jupiter_2p0_baseband_postamble), 5); + + if (AR_SREV_JUPITER_21(ah)) { + INIT_INI_ARRAY(&ahp->ah_ini_bb[ATH_INI_POST], + ar9462_2p1_baseband_postamble, + ARRAY_LENGTH(ar9462_2p1_baseband_postamble), 5); + } else { + INIT_INI_ARRAY(&ahp->ah_ini_bb[ATH_INI_POST], + ar9300_jupiter_2p0_baseband_postamble, + ARRAY_LENGTH(ar9300_jupiter_2p0_baseband_postamble), 5); + } /* radio */ INIT_INI_ARRAY(&ahp->ah_ini_radio[ATH_INI_PRE], NULL, 0, 0); @@ -1629,9 +1647,15 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC ARRAY_LENGTH(ar9300_jupiter_2p0_radio_postamble_sys2ant), 5); /* soc */ - INIT_INI_ARRAY(&ahp->ah_ini_soc[ATH_INI_PRE], - ar9300_jupiter_2p0_soc_preamble, - ARRAY_LENGTH(ar9300_jupiter_2p0_soc_preamble), 2); + if (AR_SREV_JUPITER_21(ah)) { + INIT_INI_ARRAY(&ahp->ah_ini_soc[ATH_INI_PRE], + ar9462_2p1_soc_preamble, + ARRAY_LENGTH(ar9462_2p1_soc_preamble), 2); + } else { + INIT_INI_ARRAY(&ahp->ah_ini_soc[ATH_INI_PRE], + ar9300_jupiter_2p0_soc_preamble, + ARRAY_LENGTH(ar9300_jupiter_2p0_soc_preamble), 2); + } INIT_INI_ARRAY(&ahp->ah_ini_soc[ATH_INI_CORE], NULL, 0, 0); INIT_INI_ARRAY(&ahp->ah_ini_soc[ATH_INI_POST], ar9300_jupiter_2p0_soc_postamble, Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300reg.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300reg.h Sun Nov 29 05:08:23 2015 (r291432) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300reg.h Sun Nov 29 05:34:00 2015 (r291433) @@ -2970,6 +2970,7 @@ enum { #define AR_SREV_REVISION_JUPITER_10 0 /* Jupiter 1.0 */ #define AR_SREV_REVISION_JUPITER_20 2 /* Jupiter 2.0 */ +#define AR_SREV_REVISION_JUPITER_21 3 /* Jupiter 2.1 */ #define AR_SREV_REVISION_APHRODITE_10 0 /* Aphrodite 1.0 */ @@ -3012,10 +3013,18 @@ enum { ((AH_PRIVATE((_ah))->ah_macVersion == AR_SREV_VERSION_JUPITER) && \ (AH_PRIVATE((_ah))->ah_macRev == AR_SREV_REVISION_JUPITER_20)) +#define AR_SREV_JUPITER_21(_ah) \ + ((AH_PRIVATE((_ah))->ah_macVersion == AR_SREV_VERSION_JUPITER) && \ + (AH_PRIVATE((_ah))->ah_macRev == AR_SREV_REVISION_JUPITER_21)) + #define AR_SREV_JUPITER_20_OR_LATER(_ah) \ ((AH_PRIVATE((_ah))->ah_macVersion == AR_SREV_VERSION_JUPITER) && \ (AH_PRIVATE((_ah))->ah_macRev >= AR_SREV_REVISION_JUPITER_20)) +#define AR_SREV_JUPITER_21_OR_LATER(_ah) \ + ((AH_PRIVATE((_ah))->ah_macVersion == AR_SREV_VERSION_JUPITER) && \ + (AH_PRIVATE((_ah))->ah_macRev >= AR_SREV_REVISION_JUPITER_21)) + #define AR_SREV_APHRODITE(_ah) \ ((AH_PRIVATE((_ah))->ah_macVersion == AR_SREV_VERSION_APHRODITE)) Added: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9462_2p0_initvals.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9462_2p0_initvals.h Sun Nov 29 05:34:00 2015 (r291433) @@ -0,0 +1,1250 @@ +/* + * Copyright (c) 2010-2011 Atheros Communications Inc. + * Copyright (c) 2011-2012 Qualcomm Atheros Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef INITVALS_9462_2P0_H +#define INITVALS_9462_2P0_H + +/* AR9462 2.0 */ + +#define ar9462_2p0_mac_postamble ar9331_1p1_mac_postamble + +#define ar9462_2p0_common_wo_xlna_rx_gain ar9300Common_wo_xlna_rx_gain_table_2p2 + +#define ar9462_2p0_common_5g_xlna_only_rxgain ar9462_2p0_common_mixed_rx_gain + +#define ar9462_2p0_baseband_core_txfir_coeff_japan_2484 ar9300_2p2_baseband_core_txfir_coeff_japan_2484 + +static const u32 ar9462_2p0_modes_fast_clock[][3] = { + /* Addr 5G_HT20 5G_HT40 */ + {0x00001030, 0x00000268, 0x000004d0}, + {0x00001070, 0x0000018c, 0x00000318}, + {0x000010b0, 0x00000fd0, 0x00001fa0}, + {0x00008014, 0x044c044c, 0x08980898}, + {0x0000801c, 0x148ec02b, 0x148ec057}, + {0x00008318, 0x000044c0, 0x00008980}, + {0x00009e00, 0x0372131c, 0x0372131c}, + {0x0000a230, 0x0000400b, 0x00004016}, + {0x0000a254, 0x00000898, 0x00001130}, +}; + +static const u32 ar9462_2p0_baseband_postamble[][5] = { + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8011, 0xd00a800d}, + {0x00009820, 0x206a022e, 0x206a022e, 0x206a012e, 0x206a01ae}, + {0x00009824, 0x63c640de, 0x5ac640d0, 0x5ac640d0, 0x63c640da}, + {0x00009828, 0x0796be89, 0x0696b081, 0x0696b881, 0x09143e81}, + {0x0000982c, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4, 0x05eea6d4}, + {0x00009830, 0x0000059c, 0x0000059c, 0x0000119c, 0x0000119c}, + {0x00009c00, 0x000000c4, 0x000000c4, 0x000000c4, 0x000000c4}, + {0x00009e00, 0x0372111a, 0x0372111a, 0x037216a0, 0x037216a2}, + {0x00009e04, 0x001c2020, 0x001c2020, 0x001c2020, 0x001c2020}, + {0x00009e0c, 0x6c4000e2, 0x6d4000e2, 0x6d4000e2, 0x6c4000d8}, + {0x00009e10, 0x92c88d2e, 0x7ec88d2e, 0x7ec84d2e, 0x7ec86d2e}, + {0x00009e14, 0x37b95d5e, 0x37b9605e, 0x3236605e, 0x32365a5e}, + {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x00009e1c, 0x0001cf9c, 0x0001cf9c, 0x00021f9c, 0x00021f9c}, + {0x00009e20, 0x000003a5, 0x000003a5, 0x000003a5, 0x000003a5}, + {0x00009e2c, 0x0000001c, 0x0000001c, 0x00000021, 0x00000021}, + {0x00009e3c, 0xcf946220, 0xcf946220, 0xcfd5c782, 0xcfd5c282}, + {0x00009e44, 0x62321e27, 0x62321e27, 0xfe291e27, 0xfe291e27}, + {0x00009e48, 0x5030201a, 0x5030201a, 0x50302012, 0x50302012}, + {0x00009fc8, 0x0003f000, 0x0003f000, 0x0001a000, 0x0001a000}, + {0x0000a204, 0x01318fc0, 0x01318fc4, 0x01318fc4, 0x01318fc0}, + {0x0000a208, 0x00000104, 0x00000104, 0x00000004, 0x00000004}, + {0x0000a22c, 0x01026a2f, 0x01026a27, 0x01026a2f, 0x01026a2f}, + {0x0000a230, 0x0000400a, 0x00004014, 0x00004016, 0x0000400b}, + {0x0000a234, 0x00000fff, 0x10000fff, 0x10000fff, 0x00000fff}, + {0x0000a238, 0xffb81018, 0xffb81018, 0xffb81018, 0xffb81018}, + {0x0000a250, 0x00000000, 0x00000000, 0x00000210, 0x00000108}, + {0x0000a254, 0x000007d0, 0x00000fa0, 0x00001130, 0x00000898}, + {0x0000a258, 0x02020002, 0x02020002, 0x02020002, 0x02020002}, + {0x0000a25c, 0x01000e0e, 0x01000e0e, 0x01000e0e, 0x01000e0e}, + {0x0000a260, 0x0a021501, 0x0a021501, 0x3a021501, 0x3a021501}, + {0x0000a264, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e}, + {0x0000a280, 0x00000007, 0x00000007, 0x0000000b, 0x0000000b}, + {0x0000a284, 0x00000000, 0x00000000, 0x00000150, 0x00000150}, + {0x0000a288, 0x00000110, 0x00000110, 0x00000110, 0x00000110}, + {0x0000a28c, 0x00022222, 0x00022222, 0x00022222, 0x00022222}, + {0x0000a2c4, 0x00158d18, 0x00158d18, 0x00158d18, 0x00158d18}, + {0x0000a2d0, 0x00041981, 0x00041981, 0x00041981, 0x00041982}, + {0x0000a2d8, 0x7999a83b, 0x7999a83b, 0x7999a83b, 0x7999a83b}, + {0x0000a358, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a3a4, 0x00000050, 0x00000050, 0x00000000, 0x00000000}, + {0x0000a3a8, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa}, + {0x0000a3ac, 0xaaaaaa00, 0xaa30aa30, 0xaaaaaa00, 0xaaaaaa00}, + {0x0000a41c, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce}, + {0x0000a420, 0x000001ce, 0x000001ce, 0x000001ce, 0x000001ce}, + {0x0000a424, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce}, + {0x0000a428, 0x000001ce, 0x000001ce, 0x000001ce, 0x000001ce}, + {0x0000a42c, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce}, + {0x0000a430, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce, 0x1ce739ce}, + {0x0000a830, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c}, + {0x0000ae04, 0x001c0000, 0x001c0000, 0x001c0000, 0x00100000}, + {0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000ae1c, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c}, + {0x0000ae20, 0x000001a6, 0x000001a6, 0x000001aa, 0x000001aa}, + {0x0000b284, 0x00000000, 0x00000000, 0x00000550, 0x00000550}, +}; + +static const u32 ar9462_2p0_common_rx_gain[][2] = { + /* Addr allmodes */ + {0x0000a000, 0x00010000}, + {0x0000a004, 0x00030002}, + {0x0000a008, 0x00050004}, + {0x0000a00c, 0x00810080}, + {0x0000a010, 0x00830082}, + {0x0000a014, 0x01810180}, + {0x0000a018, 0x01830182}, + {0x0000a01c, 0x01850184}, + {0x0000a020, 0x01890188}, + {0x0000a024, 0x018b018a}, + {0x0000a028, 0x018d018c}, + {0x0000a02c, 0x01910190}, + {0x0000a030, 0x01930192}, + {0x0000a034, 0x01950194}, + {0x0000a038, 0x038a0196}, + {0x0000a03c, 0x038c038b}, + {0x0000a040, 0x0390038d}, + {0x0000a044, 0x03920391}, + {0x0000a048, 0x03940393}, + {0x0000a04c, 0x03960395}, + {0x0000a050, 0x00000000}, + {0x0000a054, 0x00000000}, + {0x0000a058, 0x00000000}, + {0x0000a05c, 0x00000000}, + {0x0000a060, 0x00000000}, + {0x0000a064, 0x00000000}, + {0x0000a068, 0x00000000}, + {0x0000a06c, 0x00000000}, + {0x0000a070, 0x00000000}, + {0x0000a074, 0x00000000}, + {0x0000a078, 0x00000000}, + {0x0000a07c, 0x00000000}, + {0x0000a080, 0x22222229}, + {0x0000a084, 0x1d1d1d1d}, + {0x0000a088, 0x1d1d1d1d}, + {0x0000a08c, 0x1d1d1d1d}, + {0x0000a090, 0x171d1d1d}, + {0x0000a094, 0x11111717}, + {0x0000a098, 0x00030311}, + {0x0000a09c, 0x00000000}, + {0x0000a0a0, 0x00000000}, + {0x0000a0a4, 0x00000000}, + {0x0000a0a8, 0x00000000}, + {0x0000a0ac, 0x00000000}, + {0x0000a0b0, 0x00000000}, + {0x0000a0b4, 0x00000000}, + {0x0000a0b8, 0x00000000}, + {0x0000a0bc, 0x00000000}, + {0x0000a0c0, 0x001f0000}, + {0x0000a0c4, 0x01000101}, + {0x0000a0c8, 0x011e011f}, + {0x0000a0cc, 0x011c011d}, + {0x0000a0d0, 0x02030204}, + {0x0000a0d4, 0x02010202}, + {0x0000a0d8, 0x021f0200}, + {0x0000a0dc, 0x0302021e}, + {0x0000a0e0, 0x03000301}, + {0x0000a0e4, 0x031e031f}, + {0x0000a0e8, 0x0402031d}, + {0x0000a0ec, 0x04000401}, + {0x0000a0f0, 0x041e041f}, + {0x0000a0f4, 0x0502041d}, + {0x0000a0f8, 0x05000501}, + {0x0000a0fc, 0x051e051f}, + {0x0000a100, 0x06010602}, + {0x0000a104, 0x061f0600}, + {0x0000a108, 0x061d061e}, + {0x0000a10c, 0x07020703}, + {0x0000a110, 0x07000701}, + {0x0000a114, 0x00000000}, + {0x0000a118, 0x00000000}, + {0x0000a11c, 0x00000000}, + {0x0000a120, 0x00000000}, + {0x0000a124, 0x00000000}, + {0x0000a128, 0x00000000}, + {0x0000a12c, 0x00000000}, + {0x0000a130, 0x00000000}, + {0x0000a134, 0x00000000}, + {0x0000a138, 0x00000000}, + {0x0000a13c, 0x00000000}, + {0x0000a140, 0x001f0000}, + {0x0000a144, 0x01000101}, + {0x0000a148, 0x011e011f}, + {0x0000a14c, 0x011c011d}, + {0x0000a150, 0x02030204}, + {0x0000a154, 0x02010202}, + {0x0000a158, 0x021f0200}, + {0x0000a15c, 0x0302021e}, + {0x0000a160, 0x03000301}, + {0x0000a164, 0x031e031f}, + {0x0000a168, 0x0402031d}, + {0x0000a16c, 0x04000401}, + {0x0000a170, 0x041e041f}, + {0x0000a174, 0x0502041d}, + {0x0000a178, 0x05000501}, + {0x0000a17c, 0x051e051f}, + {0x0000a180, 0x06010602}, + {0x0000a184, 0x061f0600}, + {0x0000a188, 0x061d061e}, + {0x0000a18c, 0x07020703}, + {0x0000a190, 0x07000701}, + {0x0000a194, 0x00000000}, + {0x0000a198, 0x00000000}, + {0x0000a19c, 0x00000000}, + {0x0000a1a0, 0x00000000}, + {0x0000a1a4, 0x00000000}, + {0x0000a1a8, 0x00000000}, + {0x0000a1ac, 0x00000000}, + {0x0000a1b0, 0x00000000}, + {0x0000a1b4, 0x00000000}, + {0x0000a1b8, 0x00000000}, + {0x0000a1bc, 0x00000000}, + {0x0000a1c0, 0x00000000}, + {0x0000a1c4, 0x00000000}, + {0x0000a1c8, 0x00000000}, + {0x0000a1cc, 0x00000000}, + {0x0000a1d0, 0x00000000}, + {0x0000a1d4, 0x00000000}, + {0x0000a1d8, 0x00000000}, + {0x0000a1dc, 0x00000000}, + {0x0000a1e0, 0x00000000}, + {0x0000a1e4, 0x00000000}, + {0x0000a1e8, 0x00000000}, + {0x0000a1ec, 0x00000000}, + {0x0000a1f0, 0x00000396}, + {0x0000a1f4, 0x00000396}, + {0x0000a1f8, 0x00000396}, + {0x0000a1fc, 0x00000196}, + {0x0000b000, 0x00010000}, + {0x0000b004, 0x00030002}, + {0x0000b008, 0x00050004}, + {0x0000b00c, 0x00810080}, + {0x0000b010, 0x00830082}, + {0x0000b014, 0x01810180}, + {0x0000b018, 0x01830182}, + {0x0000b01c, 0x01850184}, + {0x0000b020, 0x02810280}, + {0x0000b024, 0x02830282}, + {0x0000b028, 0x02850284}, + {0x0000b02c, 0x02890288}, + {0x0000b030, 0x028b028a}, + {0x0000b034, 0x0388028c}, + {0x0000b038, 0x038a0389}, + {0x0000b03c, 0x038c038b}, + {0x0000b040, 0x0390038d}, + {0x0000b044, 0x03920391}, + {0x0000b048, 0x03940393}, + {0x0000b04c, 0x03960395}, + {0x0000b050, 0x00000000}, + {0x0000b054, 0x00000000}, + {0x0000b058, 0x00000000}, + {0x0000b05c, 0x00000000}, + {0x0000b060, 0x00000000}, + {0x0000b064, 0x00000000}, + {0x0000b068, 0x00000000}, + {0x0000b06c, 0x00000000}, + {0x0000b070, 0x00000000}, + {0x0000b074, 0x00000000}, + {0x0000b078, 0x00000000}, + {0x0000b07c, 0x00000000}, + {0x0000b080, 0x2a2d2f32}, + {0x0000b084, 0x21232328}, + {0x0000b088, 0x19191c1e}, + {0x0000b08c, 0x12141417}, + {0x0000b090, 0x07070e0e}, + {0x0000b094, 0x03030305}, + {0x0000b098, 0x00000003}, + {0x0000b09c, 0x00000000}, + {0x0000b0a0, 0x00000000}, + {0x0000b0a4, 0x00000000}, + {0x0000b0a8, 0x00000000}, + {0x0000b0ac, 0x00000000}, + {0x0000b0b0, 0x00000000}, + {0x0000b0b4, 0x00000000}, + {0x0000b0b8, 0x00000000}, + {0x0000b0bc, 0x00000000}, + {0x0000b0c0, 0x003f0020}, + {0x0000b0c4, 0x00400041}, + {0x0000b0c8, 0x0140005f}, + {0x0000b0cc, 0x0160015f}, + {0x0000b0d0, 0x017e017f}, + {0x0000b0d4, 0x02410242}, + {0x0000b0d8, 0x025f0240}, + {0x0000b0dc, 0x027f0260}, + {0x0000b0e0, 0x0341027e}, + {0x0000b0e4, 0x035f0340}, + {0x0000b0e8, 0x037f0360}, + {0x0000b0ec, 0x04400441}, + {0x0000b0f0, 0x0460045f}, + {0x0000b0f4, 0x0541047f}, + {0x0000b0f8, 0x055f0540}, + {0x0000b0fc, 0x057f0560}, + {0x0000b100, 0x06400641}, + {0x0000b104, 0x0660065f}, + {0x0000b108, 0x067e067f}, + {0x0000b10c, 0x07410742}, + {0x0000b110, 0x075f0740}, + {0x0000b114, 0x077f0760}, + {0x0000b118, 0x07800781}, + {0x0000b11c, 0x07a0079f}, + {0x0000b120, 0x07c107bf}, + {0x0000b124, 0x000007c0}, + {0x0000b128, 0x00000000}, + {0x0000b12c, 0x00000000}, + {0x0000b130, 0x00000000}, + {0x0000b134, 0x00000000}, + {0x0000b138, 0x00000000}, + {0x0000b13c, 0x00000000}, + {0x0000b140, 0x003f0020}, + {0x0000b144, 0x00400041}, + {0x0000b148, 0x0140005f}, + {0x0000b14c, 0x0160015f}, + {0x0000b150, 0x017e017f}, + {0x0000b154, 0x02410242}, + {0x0000b158, 0x025f0240}, + {0x0000b15c, 0x027f0260}, + {0x0000b160, 0x0341027e}, + {0x0000b164, 0x035f0340}, + {0x0000b168, 0x037f0360}, + {0x0000b16c, 0x04400441}, + {0x0000b170, 0x0460045f}, + {0x0000b174, 0x0541047f}, + {0x0000b178, 0x055f0540}, + {0x0000b17c, 0x057f0560}, + {0x0000b180, 0x06400641}, + {0x0000b184, 0x0660065f}, + {0x0000b188, 0x067e067f}, + {0x0000b18c, 0x07410742}, + {0x0000b190, 0x075f0740}, + {0x0000b194, 0x077f0760}, + {0x0000b198, 0x07800781}, + {0x0000b19c, 0x07a0079f}, + {0x0000b1a0, 0x07c107bf}, + {0x0000b1a4, 0x000007c0}, + {0x0000b1a8, 0x00000000}, + {0x0000b1ac, 0x00000000}, + {0x0000b1b0, 0x00000000}, + {0x0000b1b4, 0x00000000}, + {0x0000b1b8, 0x00000000}, + {0x0000b1bc, 0x00000000}, + {0x0000b1c0, 0x00000000}, + {0x0000b1c4, 0x00000000}, + {0x0000b1c8, 0x00000000}, + {0x0000b1cc, 0x00000000}, + {0x0000b1d0, 0x00000000}, + {0x0000b1d4, 0x00000000}, + {0x0000b1d8, 0x00000000}, + {0x0000b1dc, 0x00000000}, + {0x0000b1e0, 0x00000000}, + {0x0000b1e4, 0x00000000}, + {0x0000b1e8, 0x00000000}, + {0x0000b1ec, 0x00000000}, + {0x0000b1f0, 0x00000396}, + {0x0000b1f4, 0x00000396}, + {0x0000b1f8, 0x00000396}, + {0x0000b1fc, 0x00000196}, +}; + +static const u32 ar9462_2p0_pciephy_clkreq_disable_L1[][2] = { + /* Addr allmodes */ + {0x00018c00, 0x18213ede}, + {0x00018c04, 0x000801d8}, + {0x00018c08, 0x0003780c}, +}; + +static const u32 ar9462_2p0_radio_postamble_sys2ant[][5] = { + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + {0x000160ac, 0xa4646c08, 0xa4646c08, 0x24645808, 0x24645808}, + {0x00016140, 0x10804008, 0x10804008, 0x50804008, 0x50804008}, + {0x00016540, 0x10804008, 0x10804008, 0x50804008, 0x50804008}, +}; + +static const u32 ar9462_2p0_modes_low_ob_db_tx_gain[][5] = { + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + {0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002}, + {0x0000a2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352}, + {0x0000a2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584}, + {0x0000a2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800}, + {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000}, + {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9}, + {0x0000a458, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002}, + {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004}, + {0x0000a50c, 0x10000023, 0x10000023, 0x0b000200, 0x0b000200}, + {0x0000a510, 0x16000220, 0x16000220, 0x0f000202, 0x0f000202}, + {0x0000a514, 0x1c000223, 0x1c000223, 0x12000400, 0x12000400}, + {0x0000a518, 0x21020220, 0x21020220, 0x16000402, 0x16000402}, + {0x0000a51c, 0x27020223, 0x27020223, 0x19000404, 0x19000404}, + {0x0000a520, 0x2b022220, 0x2b022220, 0x1c000603, 0x1c000603}, + {0x0000a524, 0x2f022222, 0x2f022222, 0x21000a02, 0x21000a02}, + {0x0000a528, 0x34022225, 0x34022225, 0x25000a04, 0x25000a04}, + {0x0000a52c, 0x3a02222a, 0x3a02222a, 0x28000a20, 0x28000a20}, + {0x0000a530, 0x3e02222c, 0x3e02222c, 0x2c000e20, 0x2c000e20}, + {0x0000a534, 0x4202242a, 0x4202242a, 0x30000e22, 0x30000e22}, + {0x0000a538, 0x4702244a, 0x4702244a, 0x34000e24, 0x34000e24}, + {0x0000a53c, 0x4b02244c, 0x4b02244c, 0x38001640, 0x38001640}, + {0x0000a540, 0x4e02246c, 0x4e02246c, 0x3c001660, 0x3c001660}, + {0x0000a544, 0x5302266c, 0x5302266c, 0x3f001861, 0x3f001861}, + {0x0000a548, 0x5702286c, 0x5702286c, 0x43001a81, 0x43001a81}, + {0x0000a54c, 0x5c04286b, 0x5c04286b, 0x47001a83, 0x47001a83}, + {0x0000a550, 0x61042a6c, 0x61042a6c, 0x4a001c84, 0x4a001c84}, + {0x0000a554, 0x66062a6c, 0x66062a6c, 0x4e001ce3, 0x4e001ce3}, + {0x0000a558, 0x6b062e6c, 0x6b062e6c, 0x52001ce5, 0x52001ce5}, + {0x0000a55c, 0x7006308c, 0x7006308c, 0x56001ce9, 0x56001ce9}, + {0x0000a560, 0x730a308a, 0x730a308a, 0x5a001ceb, 0x5a001ceb}, + {0x0000a564, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec}, + {0x0000a568, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec}, + {0x0000a56c, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec}, + {0x0000a570, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec}, + {0x0000a574, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec}, + {0x0000a578, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec}, + {0x0000a57c, 0x770a308c, 0x770a308c, 0x5d001eec, 0x5d001eec}, + {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a610, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a614, 0x01404000, 0x01404000, 0x01404000, 0x01404000}, + {0x0000a618, 0x01404501, 0x01404501, 0x01404501, 0x01404501}, + {0x0000a61c, 0x02008802, 0x02008802, 0x02008501, 0x02008501}, + {0x0000a620, 0x0300cc03, 0x0300cc03, 0x0280ca03, 0x0280ca03}, + {0x0000a624, 0x0300cc03, 0x0300cc03, 0x03010c04, 0x03010c04}, + {0x0000a628, 0x0300cc03, 0x0300cc03, 0x04014c04, 0x04014c04}, + {0x0000a62c, 0x03810c03, 0x03810c03, 0x04015005, 0x04015005}, + {0x0000a630, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005}, + {0x0000a634, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005}, + {0x0000a638, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005}, + {0x0000a63c, 0x03810e04, 0x03810e04, 0x04015005, 0x04015005}, + {0x0000b2dc, 0x0380c7fc, 0x0380c7fc, 0x03aaa352, 0x03aaa352}, + {0x0000b2e0, 0x0000f800, 0x0000f800, 0x03ccc584, 0x03ccc584}, + {0x0000b2e4, 0x03ff0000, 0x03ff0000, 0x03f0f800, 0x03f0f800}, + {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000}, + {0x00016044, 0x012482d4, 0x012482d4, 0x012482d4, 0x012482d4}, + {0x00016048, 0x64992060, 0x64992060, 0x64992060, 0x64992060}, + {0x00016054, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000}, + {0x00016444, 0x012482d4, 0x012482d4, 0x012482d4, 0x012482d4}, + {0x00016448, 0x64992000, 0x64992000, 0x64992000, 0x64992000}, + {0x00016454, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000}, +}; + +static const u32 ar9462_2p0_soc_postamble[][5] = { + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + {0x00007010, 0x00000033, 0x00000033, 0x00000033, 0x00000033}, +}; + +static const u32 ar9462_2p0_baseband_core[][2] = { + /* Addr allmodes */ + {0x00009800, 0xafe68e30}, + {0x00009804, 0xfd14e000}, + {0x00009808, 0x9c0a9f6b}, + {0x0000980c, 0x04900000}, + {0x00009814, 0x9280c00a}, + {0x00009818, 0x00000000}, + {0x0000981c, 0x00020028}, + {0x00009834, 0x6400a290}, + {0x00009838, 0x0108ecff}, + {0x0000983c, 0x0d000600}, + {0x00009880, 0x201fff00}, + {0x00009884, 0x00001042}, + {0x000098a4, 0x00200400}, + {0x000098b0, 0x32440bbe}, + {0x000098d0, 0x004b6a8e}, + {0x000098d4, 0x00000820}, + {0x000098dc, 0x00000000}, + {0x000098e4, 0x01ffffff}, + {0x000098e8, 0x01ffffff}, + {0x000098ec, 0x01ffffff}, + {0x000098f0, 0x00000000}, + {0x000098f4, 0x00000000}, + {0x00009bf0, 0x80000000}, + {0x00009c04, 0xff55ff55}, + {0x00009c08, 0x0320ff55}, + {0x00009c0c, 0x00000000}, + {0x00009c10, 0x00000000}, + {0x00009c14, 0x00046384}, + {0x00009c18, 0x05b6b440}, + {0x00009c1c, 0x00b6b440}, + {0x00009d00, 0xc080a333}, + {0x00009d04, 0x40206c10}, + {0x00009d08, 0x009c4060}, + {0x00009d0c, 0x9883800a}, + {0x00009d10, 0x01834061}, + {0x00009d14, 0x00c0040b}, + {0x00009d18, 0x00000000}, + {0x00009e08, 0x0038230c}, + {0x00009e24, 0x990bb515}, + {0x00009e28, 0x0c6f0000}, + {0x00009e30, 0x06336f77}, + {0x00009e34, 0x6af6532f}, + {0x00009e38, 0x0cc80c00}, + {0x00009e40, 0x15262820}, + {0x00009e4c, 0x00001004}, + {0x00009e50, 0x00ff03f1}, + {0x00009e54, 0xe4c555c2}, + {0x00009e58, 0xfd857722}, + {0x00009e5c, 0xe9198724}, + {0x00009fc0, 0x803e4788}, + {0x00009fc4, 0x0001efb5}, + {0x00009fcc, 0x40000014}, + {0x00009fd0, 0x0a193b93}, + {0x0000a20c, 0x00000000}, + {0x0000a220, 0x00000000}, + {0x0000a224, 0x00000000}, + {0x0000a228, 0x10002310}, + {0x0000a23c, 0x00000000}, + {0x0000a244, 0x0c000000}, + {0x0000a2a0, 0x00000001}, + {0x0000a2c0, 0x00000001}, + {0x0000a2c8, 0x00000000}, + {0x0000a2cc, 0x18c43433}, + {0x0000a2d4, 0x00000000}, + {0x0000a2ec, 0x00000000}, + {0x0000a2f0, 0x00000000}, + {0x0000a2f4, 0x00000000}, + {0x0000a2f8, 0x00000000}, + {0x0000a344, 0x00000000}, + {0x0000a34c, 0x00000000}, + {0x0000a350, 0x0000a000}, + {0x0000a364, 0x00000000}, + {0x0000a370, 0x00000000}, + {0x0000a390, 0x00000001}, + {0x0000a394, 0x00000444}, + {0x0000a398, 0x001f0e0f}, + {0x0000a39c, 0x0075393f}, + {0x0000a3a0, 0xb79f6427}, + {0x0000a3c0, 0x20202020}, + {0x0000a3c4, 0x22222220}, + {0x0000a3c8, 0x20200020}, + {0x0000a3cc, 0x20202020}, + {0x0000a3d0, 0x20202020}, + {0x0000a3d4, 0x20202020}, + {0x0000a3d8, 0x20202020}, + {0x0000a3dc, 0x20202020}, + {0x0000a3e0, 0x20202020}, + {0x0000a3e4, 0x20202020}, + {0x0000a3e8, 0x20202020}, + {0x0000a3ec, 0x20202020}, + {0x0000a3f0, 0x00000000}, + {0x0000a3f4, 0x00000006}, + {0x0000a3f8, 0x0c9bd380}, + {0x0000a3fc, 0x000f0f01}, + {0x0000a400, 0x8fa91f01}, + {0x0000a404, 0x00000000}, + {0x0000a408, 0x0e79e5c6}, + {0x0000a40c, 0x00820820}, + {0x0000a414, 0x1ce739ce}, + {0x0000a418, 0x2d001dce}, + {0x0000a434, 0x00000000}, + {0x0000a438, 0x00001801}, + {0x0000a43c, 0x00100000}, + {0x0000a444, 0x00000000}, + {0x0000a448, 0x05000080}, + {0x0000a44c, 0x00000001}, + {0x0000a450, 0x00010000}, + {0x0000a454, 0x07000000}, + {0x0000a644, 0xbfad9d74}, + {0x0000a648, 0x0048060a}, + {0x0000a64c, 0x00002037}, + {0x0000a670, 0x03020100}, + {0x0000a674, 0x09080504}, + {0x0000a678, 0x0d0c0b0a}, + {0x0000a67c, 0x13121110}, + {0x0000a680, 0x31301514}, + {0x0000a684, 0x35343332}, + {0x0000a688, 0x00000036}, + {0x0000a690, 0x00000838}, + {0x0000a6b0, 0x0000000a}, + {0x0000a6b4, 0x00512c01}, + {0x0000a7c0, 0x00000000}, + {0x0000a7c4, 0xfffffffc}, + {0x0000a7c8, 0x00000000}, + {0x0000a7cc, 0x00000000}, + {0x0000a7d0, 0x00000000}, + {0x0000a7d4, 0x00000004}, + {0x0000a7dc, 0x00000000}, + {0x0000a7f0, 0x80000000}, + {0x0000a8d0, 0x004b6a8e}, + {0x0000a8d4, 0x00000820}, + {0x0000a8dc, 0x00000000}, + {0x0000a8f0, 0x00000000}, + {0x0000a8f4, 0x00000000}, + {0x0000abf0, 0x80000000}, + {0x0000b2d0, 0x00000080}, + {0x0000b2d4, 0x00000000}, + {0x0000b2ec, 0x00000000}, + {0x0000b2f0, 0x00000000}, + {0x0000b2f4, 0x00000000}, + {0x0000b2f8, 0x00000000}, + {0x0000b408, 0x0e79e5c0}, + {0x0000b40c, 0x00820820}, + {0x0000b420, 0x00000000}, + {0x0000b6b0, 0x0000000a}, + {0x0000b6b4, 0x00000001}, +}; + +static const u32 ar9462_2p0_radio_postamble[][5] = { + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + {0x0001609c, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524, 0x0b8ee524}, + {0x000160b0, 0x01d67f70, 0x01d67f70, 0x01d67f70, 0x01d67f70}, + {0x0001610c, 0x48000000, 0x40000000, 0x40000000, 0x40000000}, + {0x0001650c, 0x48000000, 0x40000000, 0x40000000, 0x40000000}, +}; + +static const u32 ar9462_2p0_modes_mix_ob_db_tx_gain[][5] = { + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + {0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002}, + {0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352}, + {0x0000a2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584}, + {0x0000a2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800}, + {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000}, + {0x0000a410, 0x0000d0da, 0x0000d0da, 0x0000d0de, 0x0000d0de}, + {0x0000a458, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000}, + {0x0000a504, 0x06002223, 0x06002223, 0x04000002, 0x04000002}, + {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004}, + {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200}, + {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202}, + {0x0000a514, 0x18022622, 0x18022622, 0x12000400, 0x12000400}, + {0x0000a518, 0x1b022822, 0x1b022822, 0x16000402, 0x16000402}, + {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404}, + {0x0000a520, 0x22022c41, 0x22022c41, 0x1c000603, 0x1c000603}, + {0x0000a524, 0x28023042, 0x28023042, 0x21000a02, 0x21000a02}, + {0x0000a528, 0x2c023044, 0x2c023044, 0x25000a04, 0x25000a04}, + {0x0000a52c, 0x2f023644, 0x2f023644, 0x28000a20, 0x28000a20}, + {0x0000a530, 0x34025643, 0x34025643, 0x2c000e20, 0x2c000e20}, + {0x0000a534, 0x38025a44, 0x38025a44, 0x30000e22, 0x30000e22}, + {0x0000a538, 0x3b025e45, 0x3b025e45, 0x34000e24, 0x34000e24}, + {0x0000a53c, 0x41025e4a, 0x41025e4a, 0x38001640, 0x38001640}, + {0x0000a540, 0x48025e6c, 0x48025e6c, 0x3c001660, 0x3c001660}, + {0x0000a544, 0x4e025e8e, 0x4e025e8e, 0x3f001861, 0x3f001861}, + {0x0000a548, 0x55025eb3, 0x55025eb3, 0x43001a81, 0x43001a81}, + {0x0000a54c, 0x58025ef3, 0x58025ef3, 0x47001a83, 0x47001a83}, + {0x0000a550, 0x5d025ef6, 0x5d025ef6, 0x4a001c84, 0x4a001c84}, + {0x0000a554, 0x62025f56, 0x62025f56, 0x4e001ce3, 0x4e001ce3}, + {0x0000a558, 0x66027f56, 0x66027f56, 0x52001ce5, 0x52001ce5}, + {0x0000a55c, 0x6a029f56, 0x6a029f56, 0x56001ce9, 0x56001ce9}, + {0x0000a560, 0x70049f56, 0x70049f56, 0x5a001ceb, 0x5a001ceb}, + {0x0000a564, 0x751ffff6, 0x751ffff6, 0x5c001eec, 0x5c001eec}, + {0x0000a568, 0x751ffff6, 0x751ffff6, 0x5e001ef0, 0x5e001ef0}, + {0x0000a56c, 0x751ffff6, 0x751ffff6, 0x60001ef4, 0x60001ef4}, + {0x0000a570, 0x751ffff6, 0x751ffff6, 0x62001ff6, 0x62001ff6}, + {0x0000a574, 0x751ffff6, 0x751ffff6, 0x62001ff6, 0x62001ff6}, + {0x0000a578, 0x751ffff6, 0x751ffff6, 0x62001ff6, 0x62001ff6}, + {0x0000a57c, 0x751ffff6, 0x751ffff6, 0x62001ff6, 0x62001ff6}, + {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000}, + {0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000}, + {0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501}, + {0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501}, + {0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03}, + {0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04}, + {0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04}, + {0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005}, + {0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005}, + {0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005}, + {0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005}, + {0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005}, + {0x0000b2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352}, + {0x0000b2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584}, + {0x0000b2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800}, + {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000}, +}; + +static const u32 ar9462_2p0_modes_high_ob_db_tx_gain[][5] = { + /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + {0x000098bc, 0x00000002, 0x00000002, 0x00000002, 0x00000002}, + {0x0000a2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352}, + {0x0000a2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584}, + {0x0000a2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800}, + {0x0000a2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000}, + {0x0000a410, 0x000050da, 0x000050da, 0x000050de, 0x000050de}, + {0x0000a458, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a500, 0x00002220, 0x00002220, 0x00000000, 0x00000000}, + {0x0000a504, 0x06002223, 0x06002223, 0x04000002, 0x04000002}, + {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004}, + {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200}, + {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202}, + {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400}, + {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402}, + {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404}, + {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603}, + {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02}, + {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04}, + {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20}, + {0x0000a530, 0x34025643, 0x34025643, 0x2a000e20, 0x2a000e20}, + {0x0000a534, 0x38025a44, 0x38025a44, 0x2e000e22, 0x2e000e22}, + {0x0000a538, 0x3b025e45, 0x3b025e45, 0x31000e24, 0x31000e24}, + {0x0000a53c, 0x41025e4a, 0x41025e4a, 0x34001640, 0x34001640}, + {0x0000a540, 0x48025e6c, 0x48025e6c, 0x38001660, 0x38001660}, + {0x0000a544, 0x4e025e8e, 0x4e025e8e, 0x3b001861, 0x3b001861}, + {0x0000a548, 0x55025eb3, 0x55025eb3, 0x3e001a81, 0x3e001a81}, + {0x0000a54c, 0x58025ef3, 0x58025ef3, 0x42001a83, 0x42001a83}, + {0x0000a550, 0x5d025ef6, 0x5d025ef6, 0x44001a84, 0x44001a84}, + {0x0000a554, 0x62025f56, 0x62025f56, 0x48001ce3, 0x48001ce3}, + {0x0000a558, 0x66027f56, 0x66027f56, 0x4c001ce5, 0x4c001ce5}, + {0x0000a55c, 0x6a029f56, 0x6a029f56, 0x50001ce9, 0x50001ce9}, + {0x0000a560, 0x70049f56, 0x70049f56, 0x54001ceb, 0x54001ceb}, + {0x0000a564, 0x751ffff6, 0x751ffff6, 0x56001eec, 0x56001eec}, + {0x0000a568, 0x751ffff6, 0x751ffff6, 0x58001ef0, 0x58001ef0}, + {0x0000a56c, 0x751ffff6, 0x751ffff6, 0x5a001ef4, 0x5a001ef4}, + {0x0000a570, 0x751ffff6, 0x751ffff6, 0x5c001ff6, 0x5c001ff6}, + {0x0000a574, 0x751ffff6, 0x751ffff6, 0x5c001ff6, 0x5c001ff6}, + {0x0000a578, 0x751ffff6, 0x751ffff6, 0x5c001ff6, 0x5c001ff6}, + {0x0000a57c, 0x751ffff6, 0x751ffff6, 0x5c001ff6, 0x5c001ff6}, + {0x0000a600, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a604, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a608, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a60c, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, + {0x0000a610, 0x00804000, 0x00804000, 0x00000000, 0x00000000}, + {0x0000a614, 0x00804201, 0x00804201, 0x01404000, 0x01404000}, + {0x0000a618, 0x0280c802, 0x0280c802, 0x01404501, 0x01404501}, + {0x0000a61c, 0x0280ca03, 0x0280ca03, 0x02008501, 0x02008501}, + {0x0000a620, 0x04c15104, 0x04c15104, 0x0280ca03, 0x0280ca03}, + {0x0000a624, 0x04c15305, 0x04c15305, 0x03010c04, 0x03010c04}, + {0x0000a628, 0x04c15305, 0x04c15305, 0x04014c04, 0x04014c04}, + {0x0000a62c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005}, + {0x0000a630, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005}, + {0x0000a634, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005}, + {0x0000a638, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005}, + {0x0000a63c, 0x04c15305, 0x04c15305, 0x04015005, 0x04015005}, + {0x0000b2dc, 0x01feee00, 0x01feee00, 0x03aaa352, 0x03aaa352}, + {0x0000b2e0, 0x0000f000, 0x0000f000, 0x03ccc584, 0x03ccc584}, + {0x0000b2e4, 0x01ff0000, 0x01ff0000, 0x03f0f800, 0x03f0f800}, + {0x0000b2e8, 0x00000000, 0x00000000, 0x03ff0000, 0x03ff0000}, + {0x00016044, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4}, + {0x00016048, 0x8db49060, 0x8db49060, 0x8db49060, 0x8db49060}, + {0x00016054, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000}, + {0x00016444, 0x056d82e4, 0x056d82e4, 0x056d82e4, 0x056d82e4}, + {0x00016448, 0x8db49000, 0x8db49000, 0x8db49000, 0x8db49000}, + {0x00016454, 0x6db60000, 0x6db60000, 0x6db60000, 0x6db60000}, +}; + +static const u32 ar9462_2p0_radio_core[][2] = { + /* Addr allmodes */ + {0x00016000, 0x36db6db6}, + {0x00016004, 0x6db6db40}, + {0x00016008, 0x73f00000}, + {0x0001600c, 0x00000000}, + {0x00016010, 0x6d820001}, + {0x00016040, 0x7f80fff8}, + {0x0001604c, 0x2699e04f}, + {0x00016050, 0x6db6db6c}, + {0x00016058, 0x6c200000}, + {0x00016080, 0x000c0000}, + {0x00016084, 0x9a68048c}, + {0x00016088, 0x54214514}, + {0x0001608c, 0x1203040b}, + {0x00016090, 0x24926490}, + {0x00016098, 0xd2888888}, + {0x000160a0, 0x0a108ffe}, + {0x000160a4, 0x812fc491}, + {0x000160a8, 0x423c8000}, + {0x000160b4, 0x92000000}, + {0x000160b8, 0x0285dddc}, + {0x000160bc, 0x02908888}, + {0x000160c0, 0x00adb6d0}, + {0x000160c4, 0x6db6db60}, + {0x000160c8, 0x6db6db6c}, + {0x000160cc, 0x0de6c1b0}, + {0x00016100, 0x3fffbe04}, + {0x00016104, 0xfff80000}, + {0x00016108, 0x00200400}, + {0x00016110, 0x00000000}, + {0x00016144, 0x02084080}, + {0x00016148, 0x000080c0}, + {0x00016280, 0x050a0001}, + {0x00016284, 0x3d841418}, + {0x00016288, 0x00000000}, + {0x0001628c, 0xe3000000}, + {0x00016290, 0xa1005080}, + {0x00016294, 0x00000020}, + {0x00016298, 0x54a82900}, + {0x00016340, 0x121e4276}, + {0x00016344, 0x00300000}, + {0x00016400, 0x36db6db6}, + {0x00016404, 0x6db6db40}, + {0x00016408, 0x73f00000}, + {0x0001640c, 0x00000000}, + {0x00016410, 0x6c800001}, + {0x00016440, 0x7f80fff8}, + {0x0001644c, 0x4699e04f}, + {0x00016450, 0x6db6db6c}, + {0x00016500, 0x3fffbe04}, + {0x00016504, 0xfff80000}, + {0x00016508, 0x00200400}, + {0x00016510, 0x00000000}, + {0x00016544, 0x02084080}, + {0x00016548, 0x000080c0}, +}; + +static const u32 ar9462_2p0_soc_preamble[][2] = { + /* Addr allmodes */ + {0x000040a4, 0x00a0c1c9}, + {0x00007020, 0x00000000}, + {0x00007034, 0x00000002}, + {0x00007038, 0x000004c2}, +}; + +static const u32 ar9462_2p0_mac_core[][2] = { + /* Addr allmodes */ + {0x00000008, 0x00000000}, + {0x00000030, 0x000e0085}, + {0x00000034, 0x00000005}, + {0x00000040, 0x00000000}, + {0x00000044, 0x00000000}, + {0x00000048, 0x00000008}, + {0x0000004c, 0x00000010}, + {0x00000050, 0x00000000}, + {0x00001040, 0x002ffc0f}, + {0x00001044, 0x002ffc0f}, + {0x00001048, 0x002ffc0f}, + {0x0000104c, 0x002ffc0f}, + {0x00001050, 0x002ffc0f}, + {0x00001054, 0x002ffc0f}, + {0x00001058, 0x002ffc0f}, + {0x0000105c, 0x002ffc0f}, + {0x00001060, 0x002ffc0f}, + {0x00001064, 0x002ffc0f}, + {0x000010f0, 0x00000100}, + {0x00001270, 0x00000000}, + {0x000012b0, 0x00000000}, + {0x000012f0, 0x00000000}, + {0x0000143c, 0x00000000}, + {0x0000147c, 0x00000000}, + {0x00001810, 0x0f000003}, + {0x00008000, 0x00000000}, + {0x00008004, 0x00000000}, + {0x00008008, 0x00000000}, + {0x0000800c, 0x00000000}, + {0x00008018, 0x00000000}, + {0x00008020, 0x00000000}, + {0x00008038, 0x00000000}, + {0x0000803c, 0x00080000}, + {0x00008040, 0x00000000}, + {0x00008044, 0x00000000}, + {0x00008048, 0x00000000}, + {0x0000804c, 0xffffffff}, + {0x00008054, 0x00000000}, + {0x00008058, 0x00000000}, + {0x0000805c, 0x000fc78f}, + {0x00008060, 0x0000000f}, + {0x00008064, 0x00000000}, + {0x00008070, 0x00000310}, + {0x00008074, 0x00000020}, + {0x00008078, 0x00000000}, + {0x0000809c, 0x0000000f}, + {0x000080a0, 0x00000000}, + {0x000080a4, 0x02ff0000}, + {0x000080a8, 0x0e070605}, + {0x000080ac, 0x0000000d}, + {0x000080b0, 0x00000000}, + {0x000080b4, 0x00000000}, + {0x000080b8, 0x00000000}, + {0x000080bc, 0x00000000}, + {0x000080c0, 0x2a800000}, + {0x000080c4, 0x06900168}, + {0x000080c8, 0x13881c20}, + {0x000080cc, 0x01f40000}, + {0x000080d0, 0x00252500}, + {0x000080d4, 0x00b00005}, + {0x000080d8, 0x00400002}, + {0x000080dc, 0x00000000}, + {0x000080e0, 0xffffffff}, + {0x000080e4, 0x0000ffff}, + {0x000080e8, 0x3f3f3f3f}, + {0x000080ec, 0x00000000}, + {0x000080f0, 0x00000000}, + {0x000080f4, 0x00000000}, + {0x000080fc, 0x00020000}, + {0x00008100, 0x00000000}, + {0x00008108, 0x00000052}, + {0x0000810c, 0x00000000}, + {0x00008110, 0x00000000}, + {0x00008114, 0x000007ff}, + {0x00008118, 0x000000aa}, + {0x0000811c, 0x00003210}, + {0x00008124, 0x00000000}, + {0x00008128, 0x00000000}, + {0x0000812c, 0x00000000}, + {0x00008130, 0x00000000}, + {0x00008134, 0x00000000}, + {0x00008138, 0x00000000}, + {0x0000813c, 0x0000ffff}, + {0x00008144, 0xffffffff}, + {0x00008168, 0x00000000}, + {0x0000816c, 0x00000000}, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Nov 29 05:38:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A101AA3BD14; Sun, 29 Nov 2015 05:38:41 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F75E128E; Sun, 29 Nov 2015 05:38:41 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAT5ce5l051807; Sun, 29 Nov 2015 05:38:40 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAT5cec0051806; Sun, 29 Nov 2015 05:38:40 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511290538.tAT5cec0051806@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sun, 29 Nov 2015 05:38:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291434 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 05:38:41 -0000 Author: arybchik Date: Sun Nov 29 05:38:40 2015 New Revision: 291434 URL: https://svnweb.freebsd.org/changeset/base/291434 Log: sfxge: cleanup: fix prefast annotations on mac stats updates Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 2 days X-MFC with: r291397 Modified: head/sys/dev/sfxge/common/siena_impl.h Modified: head/sys/dev/sfxge/common/siena_impl.h ============================================================================== --- head/sys/dev/sfxge/common/siena_impl.h Sun Nov 29 05:34:00 2015 (r291433) +++ head/sys/dev/sfxge/common/siena_impl.h Sun Nov 29 05:38:40 2015 (r291434) @@ -375,19 +375,19 @@ siena_phy_oui_get( #if EFSYS_OPT_PHY_STATS -extern void +extern void siena_phy_decode_stats( - __in efx_nic_t *enp, - __in uint32_t vmask, - __in_opt efsys_mem_t *esmp, - __out_opt uint64_t *smaskp, - __out_ecount_opt(EFX_PHY_NSTATS) uint32_t *stat); + __in efx_nic_t *enp, + __in uint32_t vmask, + __in_opt efsys_mem_t *esmp, + __out_opt uint64_t *smaskp, + __inout_ecount_opt(EFX_PHY_NSTATS) uint32_t *stat); extern __checkReturn int siena_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, - __out_ecount(EFX_PHY_NSTATS) uint32_t *stat); + __inout_ecount(EFX_PHY_NSTATS) uint32_t *stat); #endif /* EFSYS_OPT_PHY_STATS */ From owner-svn-src-all@freebsd.org Sun Nov 29 05:42:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A200A3BDAC; Sun, 29 Nov 2015 05:42:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D939D1630; Sun, 29 Nov 2015 05:42:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAT5gJQb053801; Sun, 29 Nov 2015 05:42:19 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAT5gJ7I053800; Sun, 29 Nov 2015 05:42:19 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511290542.tAT5gJ7I053800@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 29 Nov 2015 05:42:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291435 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 05:42:20 -0000 Author: adrian Date: Sun Nov 29 05:42:18 2015 New Revision: 291435 URL: https://svnweb.freebsd.org/changeset/base/291435 Log: u32 -> uint32_t. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9462_2p1_initvals.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9462_2p1_initvals.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9462_2p1_initvals.h Sun Nov 29 05:38:40 2015 (r291434) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9462_2p1_initvals.h Sun Nov 29 05:42:18 2015 (r291435) @@ -58,7 +58,7 @@ #define ar9462_2p1_pciephy_clkreq_disable_L1 ar9462_2p0_pciephy_clkreq_disable_L1 -static const u32 ar9462_2p1_mac_core[][2] = { +static const uint32_t ar9462_2p1_mac_core[][2] = { /* Addr allmodes */ {0x00000008, 0x00000000}, {0x00000030, 0x000e0085}, @@ -221,7 +221,7 @@ static const u32 ar9462_2p1_mac_core[][2 {0x000083d0, 0x000301ff}, }; -static const u32 ar9462_2p1_baseband_postamble[][5] = { +static const uint32_t ar9462_2p1_baseband_postamble[][5] = { /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ {0x00009810, 0xd00a8005, 0xd00a8005, 0xd00a8011, 0xd00a800d}, {0x00009820, 0x206a022e, 0x206a022e, 0x206a012e, 0x206a01ae}, @@ -280,7 +280,7 @@ static const u32 ar9462_2p1_baseband_pos {0x0000b284, 0x00000000, 0x00000000, 0x00000550, 0x00000550}, }; -static const u32 ar9462_2p1_soc_preamble[][2] = { +static const uint32_t ar9462_2p1_soc_preamble[][2] = { /* Addr allmodes */ {0x000040a4, 0x00a0c9c9}, {0x00007020, 0x00000000}, From owner-svn-src-all@freebsd.org Sun Nov 29 05:42:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E628A3BEB3; Sun, 29 Nov 2015 05:42:51 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19A6F18D8; Sun, 29 Nov 2015 05:42:51 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAT5go7d054475; Sun, 29 Nov 2015 05:42:50 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAT5gnT7054469; Sun, 29 Nov 2015 05:42:49 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511290542.tAT5gnT7054469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sun, 29 Nov 2015 05:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291436 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 05:42:51 -0000 Author: arybchik Date: Sun Nov 29 05:42:49 2015 New Revision: 291436 URL: https://svnweb.freebsd.org/changeset/base/291436 Log: sfxge: add prefast annotation to common code return types Using a typedef for common code return types (rather than "int") allows the Prefast static analyser to understand when a function has been successful (and thus when its postconditions must hold). This greatly reduces then number of false positives reported by prefast for error paths in common code functions. Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/efsys.h head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_bootcfg.c head/sys/dev/sfxge/common/efx_ev.c head/sys/dev/sfxge/common/efx_filter.c head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/efx_intr.c head/sys/dev/sfxge/common/efx_mac.c head/sys/dev/sfxge/common/efx_mcdi.c head/sys/dev/sfxge/common/efx_mcdi.h head/sys/dev/sfxge/common/efx_mon.c head/sys/dev/sfxge/common/efx_nic.c head/sys/dev/sfxge/common/efx_nvram.c head/sys/dev/sfxge/common/efx_phy.c head/sys/dev/sfxge/common/efx_port.c head/sys/dev/sfxge/common/efx_rx.c head/sys/dev/sfxge/common/efx_sram.c head/sys/dev/sfxge/common/efx_tx.c head/sys/dev/sfxge/common/efx_vpd.c head/sys/dev/sfxge/common/efx_wol.c head/sys/dev/sfxge/common/hunt_ev.c head/sys/dev/sfxge/common/hunt_filter.c head/sys/dev/sfxge/common/hunt_impl.h head/sys/dev/sfxge/common/hunt_intr.c head/sys/dev/sfxge/common/hunt_mac.c head/sys/dev/sfxge/common/hunt_mcdi.c head/sys/dev/sfxge/common/hunt_nic.c head/sys/dev/sfxge/common/hunt_nvram.c head/sys/dev/sfxge/common/hunt_phy.c head/sys/dev/sfxge/common/hunt_rx.c head/sys/dev/sfxge/common/hunt_sram.c head/sys/dev/sfxge/common/hunt_tx.c head/sys/dev/sfxge/common/hunt_vpd.c head/sys/dev/sfxge/common/mcdi_mon.c head/sys/dev/sfxge/common/mcdi_mon.h head/sys/dev/sfxge/common/siena_impl.h head/sys/dev/sfxge/common/siena_mac.c head/sys/dev/sfxge/common/siena_mcdi.c head/sys/dev/sfxge/common/siena_nic.c head/sys/dev/sfxge/common/siena_nvram.c head/sys/dev/sfxge/common/siena_phy.c head/sys/dev/sfxge/common/siena_sram.c head/sys/dev/sfxge/common/siena_vpd.c Modified: head/sys/dev/sfxge/common/efsys.h ============================================================================== --- head/sys/dev/sfxge/common/efsys.h Sun Nov 29 05:42:18 2015 (r291435) +++ head/sys/dev/sfxge/common/efsys.h Sun Nov 29 05:42:49 2015 (r291436) @@ -225,6 +225,7 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b #define __deref_out_bcount_opt(n) #define __checkReturn +#define __success(_x) #define __drv_when(_p, _c) Modified: head/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Sun Nov 29 05:42:18 2015 (r291435) +++ head/sys/dev/sfxge/common/efx.h Sun Nov 29 05:42:49 2015 (r291436) @@ -40,11 +40,21 @@ extern "C" { #endif -#define EFX_STATIC_ASSERT(_cond) ((void)sizeof(char[(_cond) ? 1 : -1])) +#define EFX_STATIC_ASSERT(_cond) \ + ((void)sizeof(char[(_cond) ? 1 : -1])) -#define EFX_ARRAY_SIZE(_array) (sizeof(_array) / sizeof((_array)[0])) +#define EFX_ARRAY_SIZE(_array) \ + (sizeof(_array) / sizeof((_array)[0])) -#define EFX_FIELD_OFFSET(_type, _field) ((size_t) &(((_type *)0)->_field)) +#define EFX_FIELD_OFFSET(_type, _field) \ + ((size_t) &(((_type *)0)->_field)) + +/* Return codes */ + +typedef __success(return == 0) int efx_rc_t; + + +/* Chip families */ typedef enum efx_family_e { EFX_FAMILY_INVALID, @@ -54,13 +64,13 @@ typedef enum efx_family_e { EFX_FAMILY_NTYPES } efx_family_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_family( __in uint16_t venid, __in uint16_t devid, __out efx_family_t *efp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_infer_family( __in efsys_bar_t *esbp, __out efx_family_t *efp); @@ -124,7 +134,7 @@ typedef struct efx_nic_s efx_nic_t; #define EFX_NIC_FUNC_TRUSTED 0x00000004 -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_create( __in efx_family_t family, __in efsys_identifier_t *esip, @@ -132,34 +142,34 @@ efx_nic_create( __in efsys_lock_t *eslp, __deref_out efx_nic_t **enpp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_probe( __in efx_nic_t *enp); #if EFSYS_OPT_PCIE_TUNE -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_pcie_tune( __in efx_nic_t *enp, unsigned int nlanes); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_pcie_extended_sync( __in efx_nic_t *enp); #endif /* EFSYS_OPT_PCIE_TUNE */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_init( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_reset( __in efx_nic_t *enp); #if EFSYS_OPT_DIAG -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_register_test( __in efx_nic_t *enp); @@ -199,12 +209,12 @@ typedef struct efx_mcdi_transport_s { void (*emt_exception)(void *, efx_mcdi_exception_t); } efx_mcdi_transport_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_init( __in efx_nic_t *enp, __in const efx_mcdi_transport_t *mtp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mcdi_reboot( __in efx_nic_t *enp); @@ -246,7 +256,7 @@ typedef enum efx_intr_type_e { #define EFX_INTR_SIZE (sizeof (efx_oword_t)) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_intr_init( __in efx_nic_t *enp, __in efx_intr_type_t type, @@ -266,7 +276,7 @@ efx_intr_disable_unlocked( #define EFX_INTR_NEVQS 32 -extern __checkReturn int +extern __checkReturn efx_rc_t efx_intr_trigger( __in efx_nic_t *enp, __in unsigned int level); @@ -418,17 +428,17 @@ typedef enum efx_link_mode_e { #define EFX_MAC_PDU_MIN 60 #define EFX_MAC_PDU_MAX EFX_MAC_PDU(EFX_MAC_SDU_MAX) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_pdu_set( __in efx_nic_t *enp, __in size_t pdu); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_addr_set( __in efx_nic_t *enp, __in uint8_t *addr); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_filter_set( __in efx_nic_t *enp, __in boolean_t all_unicst, @@ -436,13 +446,13 @@ efx_mac_filter_set( __in boolean_t all_mulcst, __in boolean_t brdcst); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_multicast_list_set( __in efx_nic_t *enp, __in_ecount(6*count) uint8_t const *addrs, __in int count); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_filter_default_rxq_set( __in efx_nic_t *enp, __in efx_rxq_t *erp, @@ -452,12 +462,12 @@ extern void efx_mac_filter_default_rxq_clear( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_drain( __in efx_nic_t *enp, __in boolean_t enabled); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_up( __in efx_nic_t *enp, __out boolean_t *mac_upp); @@ -465,7 +475,7 @@ efx_mac_up( #define EFX_FCNTL_RESPOND 0x00000001 #define EFX_FCNTL_GENERATE 0x00000002 -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_fcntl_set( __in efx_nic_t *enp, __in unsigned int fcntl, @@ -479,7 +489,7 @@ efx_mac_fcntl_get( #define EFX_MAC_HASH_BITS (1 << 8) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_pktfilter_init( __in efx_nic_t *enp); @@ -487,26 +497,26 @@ extern void efx_pktfilter_fini( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_pktfilter_set( __in efx_nic_t *enp, __in boolean_t unicst, __in boolean_t brdcst); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_hash_set( __in efx_nic_t *enp, __in_ecount(EFX_MAC_HASH_BITS) unsigned int const *bucket); #if EFSYS_OPT_MCAST_FILTER_LIST -extern __checkReturn int +extern __checkReturn efx_rc_t efx_pktfilter_mcast_list_set( __in efx_nic_t *enp, __in uint8_t const *addrs, __in int count); #endif /* EFSYS_OPT_MCAST_FILTER_LIST */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_pktfilter_mcast_all( __in efx_nic_t *enp); @@ -536,19 +546,19 @@ efx_mac_stat_name( * Thus, drivers should zero this buffer before use, so that not-understood * statistics read back as zero. */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_stats_upload( __in efx_nic_t *enp, __in efsys_mem_t *esmp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_stats_periodic( __in efx_nic_t *enp, __in efsys_mem_t *esmp, __in uint16_t period_ms, __in boolean_t events); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mac_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -577,7 +587,7 @@ efx_mon_name( #endif /* EFSYS_OPT_NAMES */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mon_init( __in efx_nic_t *enp); @@ -684,7 +694,7 @@ efx_mon_stat_name( #endif /* EFSYS_OPT_NAMES */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_mon_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -707,7 +717,7 @@ efx_mon_fini( #define MAXMMD ((1 << 5) - 1) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_verify( __in efx_nic_t *enp); @@ -721,14 +731,14 @@ typedef enum efx_phy_led_mode_e { EFX_PHY_LED_NMODES } efx_phy_led_mode_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_led_set( __in efx_nic_t *enp, __in efx_phy_led_mode_t mode); #endif /* EFSYS_OPT_PHY_LED_CONTROL */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_port_init( __in efx_nic_t *enp); @@ -786,7 +796,7 @@ efx_loopback_mask( __in efx_loopback_kind_t loopback_kind, __out efx_qword_t *maskp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_port_loopback_set( __in efx_nic_t *enp, __in efx_link_mode_t link_mode, @@ -803,7 +813,7 @@ efx_loopback_type_name( #endif /* EFSYS_OPT_LOOPBACK */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_port_poll( __in efx_nic_t *enp, __out_opt efx_link_mode_t *link_modep); @@ -839,7 +849,7 @@ efx_phy_adv_cap_get( __in uint32_t flag, __out uint32_t *maskp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_adv_cap_set( __in efx_nic_t *enp, __in uint32_t mask); @@ -849,7 +859,7 @@ efx_phy_lp_cap_get( __in efx_nic_t *enp, __out uint32_t *maskp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_oui_get( __in efx_nic_t *enp, __out uint32_t *ouip); @@ -942,7 +952,7 @@ efx_phy_stat_name( #define EFX_PHY_STATS_SIZE 0x100 -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_stats_update( __in efx_nic_t *enp, __in efsys_mem_t *esmp, @@ -963,14 +973,14 @@ efx_phy_prop_name( #define EFX_PHY_PROP_DEFAULT 0x00000001 -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_prop_get( __in efx_nic_t *enp, __in unsigned int id, __in uint32_t flags, __out uint32_t *valp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_phy_prop_set( __in efx_nic_t *enp, __in unsigned int id, @@ -1030,16 +1040,16 @@ typedef enum efx_bist_value_e { EFX_BIST_NVALUES, } efx_bist_value_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_bist_enable_offline( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_bist_start( __in efx_nic_t *enp, __in efx_bist_type_t type); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_bist_poll( __in efx_nic_t *enp, __in efx_bist_type_t type, @@ -1184,7 +1194,7 @@ typedef struct efx_drv_limits_s uint32_t edl_max_pio_alloc_count; } efx_drv_limits_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_set_drv_limits( __inout efx_nic_t *enp, __in efx_drv_limits_t *edlp); @@ -1194,14 +1204,14 @@ typedef enum efx_nic_region_e { EFX_REGION_PIO_WRITE_VI, /* Memory BAR WC mapping */ } efx_nic_region_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_get_bar_region( __in efx_nic_t *enp, __in efx_nic_region_t region, __out uint32_t *offsetp, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nic_get_vi_pool( __in efx_nic_t *enp, __out uint32_t *evq_countp, @@ -1230,48 +1240,48 @@ typedef struct efx_vpd_value_s { #define EFX_VPD_KEYWORD(x, y) ((x) | ((y) << 8)) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_init( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_size( __in efx_nic_t *enp, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_verify( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_reinit( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_get( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, __in size_t size, __inout efx_vpd_value_t *evvp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_set( __in efx_nic_t *enp, __inout_bcount(size) caddr_t data, __in size_t size, __in efx_vpd_value_t *evvp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_next( __in efx_nic_t *enp, __inout_bcount(size) caddr_t data, @@ -1279,7 +1289,7 @@ efx_vpd_next( __out efx_vpd_value_t *evvp, __inout unsigned int *contp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_vpd_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -1311,25 +1321,25 @@ typedef enum efx_nvram_type_e { EFX_NVRAM_NTYPES, } efx_nvram_type_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_init( __in efx_nic_t *enp); #if EFSYS_OPT_DIAG -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_test( __in efx_nic_t *enp); #endif /* EFSYS_OPT_DIAG */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_size( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out size_t *sizep); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_rw_start( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -1340,14 +1350,14 @@ efx_nvram_rw_finish( __in efx_nic_t *enp, __in efx_nvram_type_t type); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_get_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __out uint32_t *subtypep, __out_ecount(4) uint16_t version[4]); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_read_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -1355,26 +1365,26 @@ efx_nvram_read_chunk( __out_bcount(size) caddr_t data, __in size_t size); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_set_version( __in efx_nic_t *enp, __in efx_nvram_type_t type, __in_ecount(4) uint16_t version[4]); /* Validate contents of TLV formatted partition */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_tlv_validate( __in efx_nic_t *enp, __in uint32_t partn, __in_bcount(partn_size) caddr_t partn_data, __in size_t partn_size); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_erase( __in efx_nic_t *enp, __in efx_nvram_type_t type); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_nvram_write_chunk( __in efx_nic_t *enp, __in efx_nvram_type_t type, @@ -1390,13 +1400,13 @@ efx_nvram_fini( #if EFSYS_OPT_BOOTCFG -extern int +extern efx_rc_t efx_bootcfg_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, __in size_t size); -extern int +extern efx_rc_t efx_bootcfg_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -1446,34 +1456,34 @@ typedef union efx_lightsout_offload_para } elop_ns; } efx_lightsout_offload_param_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_wol_init( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_wol_filter_clear( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_wol_filter_add( __in efx_nic_t *enp, __in efx_wol_type_t type, __in efx_wol_param_t *paramp, __out uint32_t *filter_idp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_wol_filter_remove( __in efx_nic_t *enp, __in uint32_t filter_id); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_lightsout_offload_add( __in efx_nic_t *enp, __in efx_lightsout_offload_type_t type, __in efx_lightsout_offload_param_t *paramp, __out uint32_t *filter_idp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_lightsout_offload_remove( __in efx_nic_t *enp, __in efx_lightsout_offload_type_t type, @@ -1503,14 +1513,14 @@ typedef void __in boolean_t negate, __out efx_qword_t *eqp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_sram_test( __in efx_nic_t *enp, __in efx_pattern_type_t type); #endif /* EFSYS_OPT_DIAG */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_sram_buf_tbl_set( __in efx_nic_t *enp, __in uint32_t id, @@ -1579,7 +1589,7 @@ typedef enum efx_ev_qstat_e { #endif /* EFSYS_OPT_QSTATS */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_ev_init( __in efx_nic_t *enp); @@ -1593,7 +1603,7 @@ efx_ev_fini( #define EFX_EVQ_SIZE(_nevs) ((_nevs) * sizeof (efx_qword_t)) #define EFX_EVQ_NBUFS(_nevs) (EFX_EVQ_SIZE(_nevs) / EFX_BUF_SIZE) -extern __checkReturn int +extern __checkReturn efx_rc_t efx_ev_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -1768,12 +1778,12 @@ efx_ev_qpoll( __in const efx_ev_callbacks_t *eecp, __in_opt void *arg); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_ev_qmoderate( __in efx_evq_t *eep, __in unsigned int us); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_ev_qprime( __in efx_evq_t *eep, __in unsigned int count); @@ -1802,7 +1812,7 @@ efx_ev_qdestroy( /* RX */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_init( __inout efx_nic_t *enp); @@ -1811,7 +1821,7 @@ efx_rx_fini( __in efx_nic_t *enp); #if EFSYS_OPT_RX_HDR_SPLIT - __checkReturn int + __checkReturn efx_rc_t efx_rx_hdr_split_enable( __in efx_nic_t *enp, __in unsigned int hdr_buf_size, @@ -1820,7 +1830,7 @@ efx_rx_hdr_split_enable( #endif /* EFSYS_OPT_RX_HDR_SPLIT */ #if EFSYS_OPT_RX_SCATTER - __checkReturn int + __checkReturn efx_rc_t efx_rx_scatter_enable( __in efx_nic_t *enp, __in unsigned int buf_size); @@ -1855,31 +1865,31 @@ typedef enum efx_rx_scale_support_e { EFX_RX_SCALE_SHARED /* Read-only key/indirection table */ } efx_rx_scale_support_t; - extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_hash_support_get( __in efx_nic_t *enp, __out efx_rx_hash_support_t *supportp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_scale_support_get( __in efx_nic_t *enp, __out efx_rx_scale_support_t *supportp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_scale_mode_set( __in efx_nic_t *enp, __in efx_rx_hash_alg_t alg, __in efx_rx_hash_type_t type, __in boolean_t insert); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_scale_tbl_set( __in efx_nic_t *enp, __in_ecount(n) unsigned int *table, __in size_t n); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_scale_key_set( __in efx_nic_t *enp, __in_ecount(n) uint8_t *key, @@ -1893,7 +1903,7 @@ efx_psuedo_hdr_hash_get( #endif /* EFSYS_OPT_RX_SCALE */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_psuedo_hdr_pkt_length_get( __in efx_nic_t *enp, __in uint8_t *buffer, @@ -1915,7 +1925,7 @@ typedef enum efx_rxq_type_e { EFX_RXQ_NTYPES } efx_rxq_type_t; -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -1952,7 +1962,7 @@ efx_rx_qpush( __in unsigned int added, __inout unsigned int *pushedp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_rx_qflush( __in efx_rxq_t *erp); @@ -1981,7 +1991,7 @@ typedef enum efx_tx_qstat_e { #endif /* EFSYS_OPT_QSTATS */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_init( __in efx_nic_t *enp); @@ -2004,7 +2014,7 @@ efx_tx_fini( #define EFX_TXQ_MAX_BUFS 8 /* Maximum independent of EFX_BUG35388_WORKAROUND. */ -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qcreate( __in efx_nic_t *enp, __in unsigned int index, @@ -2017,7 +2027,7 @@ efx_tx_qcreate( __deref_out efx_txq_t **etpp, __out unsigned int *addedp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qpost( __in efx_txq_t *etp, __in_ecount(n) efx_buffer_t *eb, @@ -2025,7 +2035,7 @@ efx_tx_qpost( __in unsigned int completed, __inout unsigned int *addedp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qpace( __in efx_txq_t *etp, __in unsigned int ns); @@ -2036,7 +2046,7 @@ efx_tx_qpush( __in unsigned int added, __in unsigned int pushed); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qflush( __in efx_txq_t *etp); @@ -2044,7 +2054,7 @@ extern void efx_tx_qenable( __in efx_txq_t *etp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qpio_enable( __in efx_txq_t *etp); @@ -2052,21 +2062,21 @@ extern void efx_tx_qpio_disable( __in efx_txq_t *etp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qpio_write( __in efx_txq_t *etp, __in_ecount(buf_length) uint8_t *buffer, __in size_t buf_length, __in size_t pio_buf_offset); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qpio_post( __in efx_txq_t *etp, __in size_t pkt_length, __in unsigned int completed, __inout unsigned int *addedp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_tx_qdesc_post( __in efx_txq_t *etp, __in_ecount(n) efx_desc_t *ed, @@ -2206,7 +2216,7 @@ typedef struct efx_filter_spec_s { #define EFX_FILTER_SPEC_RX_DMAQ_ID_DROP 0xfff #define EFX_FILTER_SPEC_VID_UNSPEC 0xffff -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_init( __in efx_nic_t *enp); @@ -2214,21 +2224,21 @@ extern void efx_filter_fini( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_insert( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_remove( __in efx_nic_t *enp, __inout efx_filter_spec_t *spec); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_restore( __in efx_nic_t *enp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_supported_filters( __in efx_nic_t *enp, __out uint32_t *list, @@ -2246,14 +2256,14 @@ efx_filter_spec_init_tx( __inout efx_filter_spec_t *spec, __in efx_txq_t *etp); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_spec_set_ipv4_local( __inout efx_filter_spec_t *spec, __in uint8_t proto, __in uint32_t host, __in uint16_t port); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_spec_set_ipv4_full( __inout efx_filter_spec_t *spec, __in uint8_t proto, @@ -2262,17 +2272,17 @@ efx_filter_spec_set_ipv4_full( __in uint32_t rhost, __in uint16_t rport); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_spec_set_eth_local( __inout efx_filter_spec_t *spec, __in uint16_t vid, __in const uint8_t *addr); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_spec_set_uc_def( __inout efx_filter_spec_t *spec); -extern __checkReturn int +extern __checkReturn efx_rc_t efx_filter_spec_set_mc_def( __inout efx_filter_spec_t *spec); Modified: head/sys/dev/sfxge/common/efx_bootcfg.c ============================================================================== --- head/sys/dev/sfxge/common/efx_bootcfg.c Sun Nov 29 05:42:18 2015 (r291435) +++ head/sys/dev/sfxge/common/efx_bootcfg.c Sun Nov 29 05:42:49 2015 (r291436) @@ -64,7 +64,7 @@ efx_bootcfg_csum( return (checksum); } -static __checkReturn int +static __checkReturn efx_rc_t efx_bootcfg_verify( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -73,7 +73,7 @@ efx_bootcfg_verify( { size_t offset = 0; size_t used = 0; - int rc; + efx_rc_t rc; /* Start parsing tags immediatly after the checksum */ for (offset = 1; offset < size; ) { @@ -125,12 +125,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - int + efx_rc_t efx_bootcfg_read( __in efx_nic_t *enp, __out_bcount(size) caddr_t data, @@ -139,7 +139,7 @@ efx_bootcfg_read( uint8_t *payload = NULL; size_t used_bytes; size_t sector_length; - int rc; + efx_rc_t rc; rc = efx_nvram_size(enp, EFX_NVRAM_BOOTROM_CFG, §or_length); if (rc != 0) @@ -238,12 +238,12 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } - int + efx_rc_t efx_bootcfg_write( __in efx_nic_t *enp, __in_bcount(size) caddr_t data, @@ -256,7 +256,7 @@ efx_bootcfg_write( size_t used_bytes; size_t offset; size_t remaining; - int rc; + efx_rc_t rc; rc = efx_nvram_size(enp, EFX_NVRAM_BOOTROM_CFG, §or_length); if (rc != 0) @@ -342,7 +342,7 @@ fail3: fail2: EFSYS_PROBE(fail2); fail1: - EFSYS_PROBE1(fail1, int, rc); + EFSYS_PROBE1(fail1, efx_rc_t, rc); return (rc); } Modified: head/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- head/sys/dev/sfxge/common/efx_ev.c Sun Nov 29 05:42:18 2015 (r291435) +++ head/sys/dev/sfxge/common/efx_ev.c Sun Nov 29 05:42:49 2015 (r291436) @@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA -static __checkReturn int +static __checkReturn efx_rc_t falconsiena_ev_init( __in efx_nic_t *enp); @@ -64,7 +64,7 @@ static void falconsiena_ev_fini( __in efx_nic_t *enp); -static __checkReturn int +static __checkReturn efx_rc_t *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Nov 29 05:47:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2903A3BF0A; Sun, 29 Nov 2015 05:47:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EA8B1A83; Sun, 29 Nov 2015 05:47:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAT5lrUk054701; Sun, 29 Nov 2015 05:47:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAT5lqW1054693; Sun, 29 Nov 2015 05:47:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511290547.tAT5lqW1054693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 29 Nov 2015 05:47:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291437 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 05:47:55 -0000 Author: adrian Date: Sun Nov 29 05:47:52 2015 New Revision: 291437 URL: https://svnweb.freebsd.org/changeset/base/291437 Log: Add initial support for the QCA953x SoC (honeybee) wifi. This is a 2x2 2GHz 802.11n part. It works enough at the moment to bring up, scan and associate. I haven't started using this as a day to day AP. The specifics: * add honeybee initvals * add in changes; a mix from the QCA HAL and ath9k; * fix a bug in AR_SREV_AR9580_10_OR_LATER(), which is only used for one capability check and we don't even implement it - so it's a big no-op. Shady things: * ath9k has the "platform data" define the 25/40MHz clock. This HAL .. doesn't. Honeybee gets hard-coded to 25MHz which it likely shouldn't be. I'll have to go and identify/fix those. Tested: * Qualcomm Atheros AP143 reference design board. Obtained from: Qualcomm Atheros; Linux ath9k Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radar.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300reg.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sun Nov 29 05:42:49 2015 (r291436) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sun Nov 29 05:47:52 2015 (r291437) @@ -42,6 +42,7 @@ #include "ar9300/ar9462_2p1_initvals.h" #include "ar9300/ar9580.ini" #include "ar9300/ar955x.ini" +#include "ar9300/ar953x.ini" #include "ar9300/ar9300_aphrodite10.ini" @@ -566,6 +567,9 @@ ar9300_read_revisions(struct ath_hal *ah } else if(AH_PRIVATE(ah)->ah_devid == AR9300_DEVID_QCA955X) { /* XXX: AR_SREV register in Scorpion reads 0 */ AH_PRIVATE(ah)->ah_macVersion = AR_SREV_VERSION_SCORPION; + } else if(AH_PRIVATE(ah)->ah_devid == AR9300_DEVID_QCA953X) { + /* XXX: AR_SREV register in HoneyBEE reads 0 */ + AH_PRIVATE(ah)->ah_macVersion = AR_SREV_VERSION_HONEYBEE; } else { /* * Include 6-bit Chip Type (masked to 0) @@ -799,6 +803,11 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC #undef AR9340_SOC_SEL_25M_40M #undef AR9340_REF_CLK_40 } + + if (AR_SREV_HONEYBEE(ah)) { + ahp->clk_25mhz = 1; + } + ar9300_init_pll(ah, AH_NULL); if (!ar9300_set_power_mode(ah, HAL_PM_AWAKE, AH_TRUE)) { @@ -823,6 +832,7 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC ahpriv->ah_macVersion != AR_SREV_VERSION_HORNET && ahpriv->ah_macVersion != AR_SREV_VERSION_POSEIDON && ahpriv->ah_macVersion != AR_SREV_VERSION_SCORPION && + ahpriv->ah_macVersion != AR_SREV_VERSION_HONEYBEE && ahpriv->ah_macVersion != AR_SREV_VERSION_JUPITER && ahpriv->ah_macVersion != AR_SREV_VERSION_APHRODITE) ) { HALDEBUG(ah, HAL_DEBUG_RESET, @@ -1376,6 +1386,15 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC ar9340Modes_fast_clock_wasp_1p0, ARRAY_LENGTH(ar9340Modes_fast_clock_wasp_1p0), 3); + /* XXX TODO: need to add this for freebsd; it's missing from the current .ini files */ +#if 0 + /* Japan 2484Mhz CCK settings */ + INIT_INI_ARRAY(&ahp->ah_ini_japan2484, + ar9340_wasp_1p0_baseband_core_txfir_coeff_japan_2484, + ARRAY_LENGTH( + ar9340_wasp_1p0_baseband_core_txfir_coeff_japan_2484), 2); +#endif + /* Additional setttings for 40Mhz */ INIT_INI_ARRAY(&ahp->ah_ini_modes_additional_40mhz, ar9340_wasp_1p0_radio_core_40M, @@ -1445,6 +1464,67 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC //INIT_INI_ARRAY(&ahp->ah_ini_modes_additional_40M, // ar955x_scorpion_1p0_radio_core_40M, // ARRAY_LENGTH(ar955x_scorpion_1p0_radio_core_40M), 2); + } else if (AR_SREV_HONEYBEE(ah)) { + /* mac */ + INIT_INI_ARRAY(&ahp->ah_ini_mac[ATH_INI_PRE], NULL, 0, 0); + INIT_INI_ARRAY(&ahp->ah_ini_mac[ATH_INI_CORE], + qca953x_honeybee_1p0_mac_core, + ARRAY_LENGTH(qca953x_honeybee_1p0_mac_core), 2); + INIT_INI_ARRAY(&ahp->ah_ini_mac[ATH_INI_POST], + qca953x_honeybee_1p0_mac_postamble, + ARRAY_LENGTH(qca953x_honeybee_1p0_mac_postamble), 5); + + /* bb */ + INIT_INI_ARRAY(&ahp->ah_ini_bb[ATH_INI_PRE], NULL, 0, 0); + INIT_INI_ARRAY(&ahp->ah_ini_bb[ATH_INI_CORE], + qca953x_honeybee_1p0_baseband_core, + ARRAY_LENGTH(qca953x_honeybee_1p0_baseband_core), 2); + INIT_INI_ARRAY(&ahp->ah_ini_bb[ATH_INI_POST], + qca953x_honeybee_1p0_baseband_postamble, + ARRAY_LENGTH(qca953x_honeybee_1p0_baseband_postamble), 5); + + /* radio */ + INIT_INI_ARRAY(&ahp->ah_ini_radio[ATH_INI_PRE], NULL, 0, 0); + INIT_INI_ARRAY(&ahp->ah_ini_radio[ATH_INI_CORE], + qca953x_honeybee_1p0_radio_core, + ARRAY_LENGTH(qca953x_honeybee_1p0_radio_core), 2); + INIT_INI_ARRAY(&ahp->ah_ini_radio[ATH_INI_POST], + qca953x_honeybee_1p0_radio_postamble, + ARRAY_LENGTH(qca953x_honeybee_1p0_radio_postamble), 5); + + /* soc */ + INIT_INI_ARRAY(&ahp->ah_ini_soc[ATH_INI_PRE], + qca953x_honeybee_1p0_soc_preamble, + ARRAY_LENGTH(qca953x_honeybee_1p0_soc_preamble), 2); + INIT_INI_ARRAY(&ahp->ah_ini_soc[ATH_INI_CORE], NULL, 0, 0); + INIT_INI_ARRAY(&ahp->ah_ini_soc[ATH_INI_POST], + qca953x_honeybee_1p0_soc_postamble, + ARRAY_LENGTH(qca953x_honeybee_1p0_soc_postamble), 5); + + /* rx/tx gain */ + INIT_INI_ARRAY(&ahp->ah_ini_modes_rxgain, + qca953xCommon_wo_xlna_rx_gain_table_honeybee_1p0, + ARRAY_LENGTH(qca953xCommon_wo_xlna_rx_gain_table_honeybee_1p0), 2); + INIT_INI_ARRAY(&ahp->ah_ini_modes_rxgain_bounds, + qca953xCommon_wo_xlna_rx_gain_bounds_honeybee_1p0, + ARRAY_LENGTH(qca953xCommon_wo_xlna_rx_gain_bounds_honeybee_1p0), 5); + INIT_INI_ARRAY(&ahp->ah_ini_modes_txgain, + qca953xModes_no_xpa_tx_gain_table_honeybee_1p0, + ARRAY_LENGTH(qca953xModes_no_xpa_tx_gain_table_honeybee_1p0), 2); + + /*ath_hal_pciePowerSaveEnable should be 2 for OWL/Condor and 0 for merlin */ + ah->ah_config.ath_hal_pcie_power_save_enable = 0; + + /* Fast clock modal settings */ + INIT_INI_ARRAY(&ahp->ah_ini_modes_additional, + qca953xModes_fast_clock_honeybee_1p0, + ARRAY_LENGTH(qca953xModes_fast_clock_honeybee_1p0), 3); + + /* Additional setttings for 40Mhz */ + //INIT_INI_ARRAY(&ahp->ah_ini_modes_additional_40M, + // qca953x_honeybee_1p0_radio_core_40M, + // ARRAY_LENGTH(qca953x_honeybee_1p0_radio_core_40M), 2); + } else if (AR_SREV_JUPITER_10(ah)) { /* Jupiter: new INI format (pre, core, post arrays per subsystem) */ @@ -3518,6 +3598,13 @@ void ar9300_rx_gain_table_apply(struct a INIT_INI_ARRAY(&ahp->ah_ini_modes_rxgain_bounds, ar955xCommon_rx_gain_bounds_scorpion_1p0, ARRAY_LENGTH(ar955xCommon_rx_gain_bounds_scorpion_1p0), 5); + } else if (AR_SREV_HONEYBEE(ah)) { + INIT_INI_ARRAY(&ahp->ah_ini_modes_rxgain, + qca953xCommon_rx_gain_table_honeybee_1p0, + ARRAY_LENGTH(qca953xCommon_rx_gain_table_honeybee_1p0), 2); + INIT_INI_ARRAY(&ahp->ah_ini_modes_rxgain_bounds, + qca953xCommon_rx_gain_bounds_honeybee_1p0, + ARRAY_LENGTH(qca953xCommon_rx_gain_bounds_honeybee_1p0), 5); } else { INIT_INI_ARRAY(&ahp->ah_ini_modes_rxgain, ar9300_common_rx_gain_table_osprey_2p2, @@ -3571,6 +3658,13 @@ void ar9300_rx_gain_table_apply(struct a INIT_INI_ARRAY(&ahp->ah_ini_modes_rxgain_bounds, ar955xCommon_wo_xlna_rx_gain_bounds_scorpion_1p0, ARRAY_LENGTH(ar955xCommon_wo_xlna_rx_gain_bounds_scorpion_1p0), 5); + } else if (AR_SREV_HONEYBEE(ah)) { + INIT_INI_ARRAY(&ahp->ah_ini_modes_rxgain, + qca953xCommon_wo_xlna_rx_gain_table_honeybee_1p0, + ARRAY_LENGTH(qca953xCommon_wo_xlna_rx_gain_table_honeybee_1p0), 2); + INIT_INI_ARRAY(&ahp->ah_ini_modes_rxgain_bounds, + qca953xCommon_wo_xlna_rx_gain_bounds_honeybee_1p0, + ARRAY_LENGTH(qca953xCommon_wo_xlna_rx_gain_bounds_honeybee_1p0), 5); } else { INIT_INI_ARRAY(&ahp->ah_ini_modes_rxgain, ar9300Common_wo_xlna_rx_gain_table_osprey_2p2, @@ -3629,6 +3723,11 @@ void ar9300_tx_gain_table_apply(struct a ar9300Modes_low_ob_db_tx_gain_table_jupiter_2p0, ARRAY_LENGTH(ar9300Modes_low_ob_db_tx_gain_table_jupiter_2p0), 5); + } else if (AR_SREV_HONEYBEE(ah)) { + INIT_INI_ARRAY(&ahp->ah_ini_modes_txgain, + qca953xModes_xpa_tx_gain_table_honeybee_1p0, + ARRAY_LENGTH(qca953xModes_xpa_tx_gain_table_honeybee_1p0), + 2); } else if (AR_SREV_APHRODITE(ah)) { INIT_INI_ARRAY(&ahp->ah_ini_modes_txgain, ar956XModes_low_ob_db_tx_gain_table_aphrodite_1p0, @@ -3686,6 +3785,16 @@ void ar9300_tx_gain_table_apply(struct a ar956XModes_high_ob_db_tx_gain_table_aphrodite_1p0, ARRAY_LENGTH( ar956XModes_high_ob_db_tx_gain_table_aphrodite_1p0), 5); + } else if (AR_SREV_HONEYBEE(ah)) { + if (AR_SREV_HONEYBEE_11(ah)) { + INIT_INI_ARRAY(&ahp->ah_ini_modes_txgain, + qca953xModes_no_xpa_tx_gain_table_honeybee_1p1, + ARRAY_LENGTH(qca953xModes_no_xpa_tx_gain_table_honeybee_1p1), 2); + } else { + INIT_INI_ARRAY(&ahp->ah_ini_modes_txgain, + qca953xModes_no_xpa_tx_gain_table_honeybee_1p0, + ARRAY_LENGTH(qca953xModes_no_xpa_tx_gain_table_honeybee_1p0), 2); + } } else { INIT_INI_ARRAY(&ahp->ah_ini_modes_txgain, ar9300Modes_high_ob_db_tx_gain_table_osprey_2p2, @@ -4159,6 +4268,8 @@ ar9300_probe(uint16_t vendorid, uint16_t return "Qualcomm Atheros QCA955x"; case AR9300_DEVID_QCA9565: /* Aphrodite */ return "Qualcomm Atheros AR9565"; + case AR9300_DEVID_QCA953X: /* Honeybee */ + return "Qualcomm Atheros QCA953x"; case AR9300_DEVID_AR1111_PCIE: return "Atheros AR1111"; default: Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c Sun Nov 29 05:42:49 2015 (r291436) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c Sun Nov 29 05:47:52 2015 (r291437) @@ -254,6 +254,9 @@ ar9300_otp_read(struct ath_hal *ah, u_in int status = 0; u_int32_t addr; + if (AR_SREV_HONEYBEE(ah)){ /* no OTP for Honeybee */ + return false; + } addr = (AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah))? OTP_MEM_START_ADDRESS_WASP : OTP_MEM_START_ADDRESS; if (!is_wifi) { @@ -354,7 +357,7 @@ ar9300_eeprom_attach(struct ath_hal *ah) ar9300_flash_map(ah); /* * ###### This function always return NO SPUR. - * This is not AH_TRUE for many board designs. + * This is not true for many board designs. * Does anyone use this? */ AH_PRIVATE(ah)->ah_getSpurChan = ar9300_eeprom_get_spur_chan; @@ -438,10 +441,15 @@ ar9300_eeprom_attach(struct ath_hal *ah) return HAL_OK; } #endif - if (AR_SREV_HORNET(ah) || AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah)) { + if (AR_SREV_HORNET(ah) || AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah) + || AR_SREV_HONEYBEE(ah)) { ahp->try_eeprom = 0; } + if (AR_SREV_HONEYBEE(ah)) { + ahp->try_otp = 0; + } + if (!ar9300_eeprom_restore(ah)) { return HAL_EIO; } @@ -1652,6 +1660,8 @@ HAL_BOOL ar9300_ant_ctrl_apply(struct at #define AR_SWITCH_TABLE_COM_JUPITER_ALL_S (0) #define AR_SWITCH_TABLE_COM_SCORPION_ALL (0xffffff) #define AR_SWITCH_TABLE_COM_SCORPION_ALL_S (0) +#define AR_SWITCH_TABLE_COM_HONEYBEE_ALL (0xffffff) +#define AR_SWITCH_TABLE_COM_HONEYBEE_ALL_S (0) #define AR_SWITCH_TABLE_COM_SPDT (0x00f00000) value = ar9300_ant_ctrl_common_get(ah, is_2ghz); if (AR_SREV_JUPITER(ah) || AR_SREV_APHRODITE(ah)) { @@ -1667,6 +1677,10 @@ HAL_BOOL ar9300_ant_ctrl_apply(struct at OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM, AR_SWITCH_TABLE_COM_SCORPION_ALL, value); } + else if (AR_SREV_HONEYBEE(ah)) { + OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM, + AR_SWITCH_TABLE_COM_HONEYBEE_ALL, value); + } else { OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM, AR_SWITCH_TABLE_COM_ALL, value); @@ -1713,7 +1727,7 @@ HAL_BOOL ar9300_ant_ctrl_apply(struct at value = ar9300_ant_ctrl_chain_get(ah, 1, is_2ghz); OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_CHAIN_1, AR_SWITCH_TABLE_ALL, value); - if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah)) { + if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah) && !AR_SREV_HONEYBEE(ah)) { value = ar9300_ant_ctrl_chain_get(ah, 2, is_2ghz); OS_REG_RMW_FIELD(ah, AR_PHY_SWITCH_CHAIN_2, AR_SWITCH_TABLE_ALL, value); @@ -1899,7 +1913,7 @@ HAL_BOOL ar9300_attenuation_apply(struct OS_REG_RMW_FIELD(ah, AR_PHY_EXT_ATTEN_CTL_1, AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN, value); - if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah)) { + if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah)&& !AR_SREV_HONEYBEE(ah) ) { value = ar9300_attenuation_chain_get(ah, 2, channel); OS_REG_RMW_FIELD(ah, AR_PHY_EXT_ATTEN_CTL_2, AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB, value); @@ -2270,7 +2284,7 @@ ar9300_power_control_override(struct ath OS_REG_RMW(ah, AR_PHY_TPC_11_B1, (correction[1] << AR_PHY_TPC_OLPC_GAIN_DELTA_S), AR_PHY_TPC_OLPC_GAIN_DELTA); - if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah)) { + if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah) && !AR_SREV_HONEYBEE(ah) ) { OS_REG_RMW(ah, AR_PHY_TPC_11_B2, (correction[2] << AR_PHY_TPC_OLPC_GAIN_DELTA_S), AR_PHY_TPC_OLPC_GAIN_DELTA); @@ -2284,7 +2298,7 @@ ar9300_power_control_override(struct ath if (!AR_SREV_POSEIDON(ah)) { OS_REG_RMW(ah, AR_PHY_TPC_6_B1, (3 << AR_PHY_TPC_6_ERROR_EST_MODE_S), AR_PHY_TPC_6_ERROR_EST_MODE); - if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah)) { + if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah) && !AR_SREV_HONEYBEE(ah) ) { OS_REG_RMW(ah, AR_PHY_TPC_6_B2, (3 << AR_PHY_TPC_6_ERROR_EST_MODE_S), AR_PHY_TPC_6_ERROR_EST_MODE); @@ -2344,42 +2358,60 @@ ar9300_power_control_override(struct ath } } - if (!AR_SREV_SCORPION(ah)) { + if (!AR_SREV_SCORPION(ah) && !AR_SREV_HONEYBEE(ah)) { OS_REG_RMW_FIELD(ah, AR_PHY_TPC_19, AR_PHY_TPC_19_ALPHA_THERM, temp_slope); } else { - /*Scorpion has tempSlope register for each chain*/ + /*Scorpion and Honeybee has tempSlope register for each chain*/ /*Check whether temp_compensation feature is enabled or not*/ if (eep->base_eep_header.feature_enable & 0x1){ if(frequency < 4000) { + if (((eep->base_eep_header.txrx_mask & 0xf0) >> 4) & 0x1) { OS_REG_RMW_FIELD(ah, AR_PHY_TPC_19, AR_PHY_TPC_19_ALPHA_THERM, eep->base_ext2.temp_slope_low); + } + if (((eep->base_eep_header.txrx_mask & 0xf0) >> 4) & 0x2) { OS_REG_RMW_FIELD(ah, AR_SCORPION_PHY_TPC_19_B1, AR_PHY_TPC_19_ALPHA_THERM, temp_slope); + } + if (((eep->base_eep_header.txrx_mask & 0xf0) >> 4) & 0x4) { OS_REG_RMW_FIELD(ah, AR_SCORPION_PHY_TPC_19_B2, AR_PHY_TPC_19_ALPHA_THERM, eep->base_ext2.temp_slope_high); + } } else { + if (((eep->base_eep_header.txrx_mask & 0xf0) >> 4) & 0x1) { OS_REG_RMW_FIELD(ah, AR_PHY_TPC_19, AR_PHY_TPC_19_ALPHA_THERM, temp_slope); + } + if (((eep->base_eep_header.txrx_mask & 0xf0) >> 4) & 0x2) { OS_REG_RMW_FIELD(ah, AR_SCORPION_PHY_TPC_19_B1, AR_PHY_TPC_19_ALPHA_THERM, temp_slope_1); + } + if (((eep->base_eep_header.txrx_mask & 0xf0) >> 4) & 0x4) { OS_REG_RMW_FIELD(ah, AR_SCORPION_PHY_TPC_19_B2, AR_PHY_TPC_19_ALPHA_THERM, temp_slope_2); + } } }else { /* If temp compensation is not enabled, set all registers to 0*/ + if (((eep->base_eep_header.txrx_mask & 0xf0) >> 4) & 0x1) { OS_REG_RMW_FIELD(ah, AR_PHY_TPC_19, AR_PHY_TPC_19_ALPHA_THERM, 0); + } + if (((eep->base_eep_header.txrx_mask & 0xf0) >> 4) & 0x2) { OS_REG_RMW_FIELD(ah, AR_SCORPION_PHY_TPC_19_B1, AR_PHY_TPC_19_ALPHA_THERM, 0); + } + if (((eep->base_eep_header.txrx_mask & 0xf0) >> 4) & 0x4) { OS_REG_RMW_FIELD(ah, AR_SCORPION_PHY_TPC_19_B2, AR_PHY_TPC_19_ALPHA_THERM, 0); + } } } OS_REG_RMW_FIELD(ah, @@ -4392,7 +4424,7 @@ HAL_BOOL ar9300_thermometer_apply(struct if (!AR_SREV_HORNET(ah) && !AR_SREV_POSEIDON(ah)) { OS_REG_RMW_FIELD(ah, AR_PHY_65NM_CH1_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR, 0); - if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah)) { + if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah) && !AR_SREV_HONEYBEE(ah) ) { OS_REG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR, 0); } @@ -4402,7 +4434,7 @@ HAL_BOOL ar9300_thermometer_apply(struct if (!AR_SREV_HORNET(ah) && !AR_SREV_POSEIDON(ah)) { OS_REG_RMW_FIELD(ah, AR_PHY_65NM_CH1_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON, 0); - if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah)) { + if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah) && !AR_SREV_HONEYBEE(ah) ) { OS_REG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON, 0); } @@ -4413,7 +4445,7 @@ HAL_BOOL ar9300_thermometer_apply(struct if (!AR_SREV_HORNET(ah) && !AR_SREV_POSEIDON(ah)) { OS_REG_RMW_FIELD(ah, AR_PHY_65NM_CH1_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR, 1); - if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah)) { + if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah) && !AR_SREV_HONEYBEE(ah) ) { OS_REG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON_OVR, 1); } @@ -4424,7 +4456,7 @@ HAL_BOOL ar9300_thermometer_apply(struct if (!AR_SREV_HORNET(ah) && !AR_SREV_POSEIDON(ah)) { OS_REG_RMW_FIELD(ah, AR_PHY_65NM_CH1_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON, 0); - if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah)) { + if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah) && !AR_SREV_HONEYBEE(ah) ) { OS_REG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON, 0); } @@ -4435,7 +4467,7 @@ HAL_BOOL ar9300_thermometer_apply(struct if (!AR_SREV_HORNET(ah) && !AR_SREV_POSEIDON(ah)) { OS_REG_RMW_FIELD(ah, AR_PHY_65NM_CH1_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON, 1); - if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah)) { + if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah) && !AR_SREV_HONEYBEE(ah) ) { OS_REG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON, 0); } @@ -4446,7 +4478,7 @@ HAL_BOOL ar9300_thermometer_apply(struct if (!AR_SREV_HORNET(ah) && !AR_SREV_POSEIDON(ah)) { OS_REG_RMW_FIELD(ah, AR_PHY_65NM_CH1_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON, 0); - if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah)) { + if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah) && !AR_SREV_HONEYBEE(ah) ) { OS_REG_RMW_FIELD(ah, AR_PHY_65NM_CH2_RXTX4, AR_PHY_65NM_CH0_RXTX4_THERM_ON, 1); } @@ -4476,9 +4508,8 @@ HAL_BOOL ar9300_tuning_caps_apply(struct if ((eep->base_eep_header.feature_enable & 0x40) >> 6) { tuning_caps_params &= 0x7f; - /* XXX TODO: ath9k skips it for Wasp and Honeybee/AR9531, not Poseidon */ - if (AR_SREV_POSEIDON(ah) || AR_SREV_WASP(ah)) { - return AH_TRUE; + if (AR_SREV_POSEIDON(ah) || AR_SREV_WASP(ah) || AR_SREV_HONEYBEE(ah)) { + return true; } else if (AR_SREV_HORNET(ah)) { OS_REG_RMW_FIELD(ah, AR_HORNET_CH0_XTAL, AR_OSPREY_CHO_XTAL_CAPINDAC, @@ -4515,7 +4546,7 @@ HAL_BOOL ar9300_xpa_timing_control_apply u_int8_t xpa_timing_control; ar9300_eeprom_t *eep = &AH9300(ah)->ah_eeprom; if ((eep->base_eep_header.feature_enable & 0x80) >> 7) { - if (AR_SREV_OSPREY(ah) || AR_SREV_AR9580(ah) || AR_SREV_WASP(ah)) { + if (AR_SREV_OSPREY(ah) || AR_SREV_AR9580(ah) || AR_SREV_WASP(ah) || AR_SREV_HONEYBEE(ah)) { if (is_2ghz) { xpa_timing_control = eep->modal_header_2g.tx_frame_to_xpa_on; OS_REG_RMW_FIELD(ah, @@ -4586,7 +4617,7 @@ ar9300_eeprom_set_board_values(struct at /* wait for Poseidon internal regular turnning */ /* for Hornet we move it before initPLL to avoid an access issue */ /* Function not used when EMULATION. */ - if (!AR_SREV_HORNET(ah) && !AR_SREV_WASP(ah)) { + if (!AR_SREV_HORNET(ah) && !AR_SREV_WASP(ah) && !AR_SREV_HONEYBEE(ah)) { ar9300_internal_regulator_apply(ah); } Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h Sun Nov 29 05:42:49 2015 (r291436) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h Sun Nov 29 05:47:52 2015 (r291437) @@ -61,6 +61,9 @@ #ifdef AH_SUPPORT_QCA9550 #define AH_SUPPORT_SCORPION 1 #endif /* AH_SUPPORT_QCA9550 */ +#ifdef AH_SUPPORT_QCA9530 +#define AH_SUPPORT_HONEYBEE 1 +#endif /* AH_SUPPORT_QCA9530 */ #define FIX_NOISE_FLOOR 1 /* XXX this needs to be removed! No atomics in the HAL! */ Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radar.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radar.c Sun Nov 29 05:42:49 2015 (r291436) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radar.c Sun Nov 29 05:47:52 2015 (r291437) @@ -578,7 +578,7 @@ ar9300_handle_radar_bb_panic(struct ath_ /* EV92527: we do not need a reset if we see this signature */ HALDEBUG(ah, HAL_DEBUG_DFS, "%s: BB Panic -- 0x1300000a\n", __func__); return AH_TRUE; - } else if (AR_SREV_WASP(ah) && (status == 0x04000409)) { + } else if ((AR_SREV_WASP(ah) || AR_SREV_HONEYBEE(ah)) && (status == 0x04000409)) { return AH_TRUE; } else { if (ar9300_get_capability(ah, HAL_CAP_LDPCWAR, 0, AH_NULL) == HAL_OK && Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c Sun Nov 29 05:42:49 2015 (r291436) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c Sun Nov 29 05:47:52 2015 (r291437) @@ -134,7 +134,7 @@ ar9300_set_channel(struct ath_hal *ah, s channel_sel = (freq * 4) / 120; channel_frac = (((freq * 4) % 120) * 0x20000) / 120; channel_sel = (channel_sel << 17) | (channel_frac); - } else if (AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah)) { + } else if (AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah) || AR_SREV_HONEYBEE(ah)) { u_int32_t channel_frac; if (clk_25mhz) { /* @@ -143,7 +143,7 @@ ar9300_set_channel(struct ath_hal *ah, s * ndiv = ((chan_mhz * 4) / 3) / freq_ref; * chansel = int(ndiv), chanfrac = (ndiv - chansel) * 0x20000 */ - if (AR_SREV_SCORPION(ah)) { + if (AR_SREV_SCORPION(ah) || AR_SREV_HONEYBEE(ah)) { /* Doubler is off for Scorpion */ channel_sel = (freq * 4) / 75; channel_frac = (((freq * 4) % 75) * 0x20000) / 75; Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv.c Sun Nov 29 05:42:49 2015 (r291436) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_recv.c Sun Nov 29 05:47:52 2015 (r291437) @@ -228,7 +228,7 @@ ar9300_set_rx_filter(struct ath_hal *ah, { u_int32_t phybits; - if (AR_SREV_SCORPION(ah)) { + if (AR_SREV_SCORPION(ah) || AR_SREV_HONEYBEE(ah)) { /* Enable Rx for 4 address frames */ bits |= AR_RX_4ADDRESS; } Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Sun Nov 29 05:42:49 2015 (r291436) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c Sun Nov 29 05:47:52 2015 (r291437) @@ -288,7 +288,7 @@ ar9300_upload_noise_floor(struct ath_hal */ if (AR_SREV_HORNET(ah) || AR_SREV_POSEIDON(ah) || AR_SREV_APHRODITE(ah)) { chainmask = 0x01; - } else if (AR_SREV_WASP(ah) || AR_SREV_JUPITER(ah)) { + } else if (AR_SREV_WASP(ah) || AR_SREV_JUPITER(ah) || AR_SREV_HONEYBEE(ah)) { chainmask = 0x03; } else { chainmask = 0x07; @@ -1476,7 +1476,7 @@ ar9300_init_pll(struct ath_hal *ah, stru OS_REG_WRITE(ah, AR_RTC_PLL_CONTROL, 0x142c); OS_DELAY(1000); - } else if (AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah)) { + } else if (AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah) || AR_SREV_HONEYBEE(ah)) { #define SRIF_PLL 1 u_int32_t regdata, pll2_divint, pll2_divfrac; @@ -1492,9 +1492,15 @@ ar9300_init_pll(struct ath_hal *ah, stru pll2_divint = 0x1c; pll2_divfrac = 0xa3d7; #else - pll2_divint = 0x54; - pll2_divfrac = 0x1eb85; - refdiv = 3; + if (AR_SREV_HONEYBEE(ah)) { + pll2_divint = 0x1c; + pll2_divfrac = 0xa3d2; + refdiv = 1; + } else { + pll2_divint = 0x54; + pll2_divfrac = 0x1eb85; + refdiv = 3; + } #endif } else { #ifndef SRIF_PLL @@ -1520,7 +1526,11 @@ ar9300_init_pll(struct ath_hal *ah, stru OS_DELAY(1000); do { regdata = OS_REG_READ(ah, AR_PHY_PLL_MODE); - regdata = regdata | (0x1 << 16); + if (AR_SREV_HONEYBEE(ah)) { + regdata = regdata | (0x1 << 22); + } else { + regdata = regdata | (0x1 << 16); + } OS_REG_WRITE(ah, AR_PHY_PLL_MODE, regdata); /* PWD_PLL set to 1 */ OS_DELAY(100); /* override int, frac, refdiv */ @@ -1540,6 +1550,12 @@ ar9300_init_pll(struct ath_hal *ah, stru if (AR_SREV_WASP(ah)) { regdata = (regdata & 0x80071fff) | (0x1 << 30) | (0x1 << 13) | (0x4 << 26) | (0x18 << 19); + } else if (AR_SREV_HONEYBEE(ah)) { + /* + * Kd=10, Ki=2, Outdiv=1, Local PLL=0, Phase Shift=4 + */ + regdata = (regdata & 0x01c00fff) | + (0x1 << 31) | (0x2 << 29) | (0xa << 25) | (0x1 << 19) | (0x6 << 12); } else { regdata = (regdata & 0x80071fff) | (0x3 << 30) | (0x1 << 13) | (0x4 << 26) | (0x60 << 19); @@ -1548,7 +1564,11 @@ ar9300_init_pll(struct ath_hal *ah, stru /* Ki, Kd, Local PLL, Outdiv */ OS_REG_WRITE(ah, AR_PHY_PLL_MODE, regdata); regdata = OS_REG_READ(ah, AR_PHY_PLL_MODE); - regdata = (regdata & 0xfffeffff); + if (AR_SREV_HONEYBEE(ah)) { + regdata = (regdata & 0xffbfffff); + } else { + regdata = (regdata & 0xfffeffff); + } OS_REG_WRITE(ah, AR_PHY_PLL_MODE, regdata); /* PWD_PLL set to 0 */ OS_DELAY(1000); if (AR_SREV_WASP(ah)) { @@ -1617,6 +1637,7 @@ ar9300_init_pll(struct ath_hal *ah, stru OS_REG_WRITE(ah, AR_RTC_SLEEP_CLK, AR_RTC_FORCE_DERIVED_CLK | AR_RTC_PCIE_RST_PWDN_EN); + /* XXX TODO: honeybee? */ if (AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah)) { if (clk_25mhz) { OS_REG_WRITE(ah, @@ -1950,6 +1971,9 @@ ar9300_phy_disable(struct ath_hal *ah) /* Turn off JMPST led */ REG_WRITE(ATH_GPIO_OUT, (REG_READ(ATH_GPIO_OUT) | (0x1 << 15))); } + else if (AR_SREV_HONEYBEE(ah)) { + REG_WRITE(ATH_GPIO_OE, (REG_READ(ATH_GPIO_OE) | (0x1 << 12))); + } #undef REG_READ #undef REG_WRITE #endif @@ -2207,7 +2231,7 @@ ar9300_load_nf(struct ath_hal *ah, int16 */ if (AR_SREV_HORNET(ah) || AR_SREV_POSEIDON(ah) || AR_SREV_APHRODITE(ah)) { chainmask = 0x9; - } else if (AR_SREV_WASP(ah) || AR_SREV_JUPITER(ah)) { + } else if (AR_SREV_WASP(ah) || AR_SREV_JUPITER(ah) || AR_SREV_HONEYBEE(ah)) { chainmask = 0x1b; } else { chainmask = 0x3F; @@ -2395,7 +2419,7 @@ ar9300_calibration(struct ath_hal *ah, s HALDEBUG(ah, HAL_DEBUG_CALIBRATE, "%s: Chain 1 Rx IQ Cal Correction 0x%08x\n", __func__, OS_REG_READ(ah, AR_PHY_RX_IQCAL_CORR_B1)); - if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah)) { + if (!AR_SREV_WASP(ah) && !AR_SREV_JUPITER(ah) && !AR_SREV_HONEYBEE(ah)) { HALDEBUG(ah, HAL_DEBUG_CALIBRATE, "%s: Chain 2 Rx IQ Cal Correction 0x%08x\n", __func__, OS_REG_READ(ah, AR_PHY_RX_IQCAL_CORR_B2)); @@ -2855,6 +2879,7 @@ ar9300_process_ini(struct ath_hal *ah, s } } modes_index = 1; + freq_index = 1; break; case CHANNEL_A_HT40PLUS: @@ -2869,6 +2894,7 @@ ar9300_process_ini(struct ath_hal *ah, s } } modes_index = 2; + freq_index = 1; break; case CHANNEL_PUREG: @@ -2876,20 +2902,27 @@ ar9300_process_ini(struct ath_hal *ah, s case CHANNEL_B: if (AR_SREV_SCORPION(ah)){ modes_txgaintable_index = 8; - } + }else if (AR_SREV_HONEYBEE(ah)){ + modes_txgaintable_index = 1; + } modes_index = 4; + freq_index = 2; break; case CHANNEL_G_HT40PLUS: case CHANNEL_G_HT40MINUS: if (AR_SREV_SCORPION(ah)){ modes_txgaintable_index = 7; + }else if (AR_SREV_HONEYBEE(ah)){ + modes_txgaintable_index = 1; } modes_index = 3; + freq_index = 2; break; case CHANNEL_108G: modes_index = 5; + freq_index = 2; break; default: @@ -2930,11 +2963,15 @@ ar9300_process_ini(struct ath_hal *ah, s } else if (IEEE80211_IS_CHAN_HT40U(chan) || IEEE80211_IS_CHAN_HT40D(chan)) { if (AR_SREV_SCORPION(ah)){ modes_txgaintable_index = 7; + } else if (AR_SREV_HONEYBEE(ah)){ + modes_txgaintable_index = 1; } modes_index = 3; } else if (IEEE80211_IS_CHAN_HT20(chan) || IEEE80211_IS_CHAN_G(chan) || IEEE80211_IS_CHAN_B(chan) || IEEE80211_IS_CHAN_PUREG(chan)) { if (AR_SREV_SCORPION(ah)){ modes_txgaintable_index = 8; + } else if (AR_SREV_HONEYBEE(ah)){ + modes_txgaintable_index = 1; } modes_index = 4; } else @@ -3045,7 +3082,7 @@ ar9300_process_ini(struct ath_hal *ah, s /* Write txgain Array Parameters */ - if (AR_SREV_SCORPION(ah)) { + if (AR_SREV_SCORPION(ah) || AR_SREV_HONEYBEE(ah)) { REG_WRITE_ARRAY(&ahp->ah_ini_modes_txgain, modes_txgaintable_index, reg_writes); }else{ @@ -3510,7 +3547,7 @@ ar9300_init_cal_internal(struct ath_hal /* Hornet: 1 x 1 */ ahp->ah_rx_cal_chainmask = 0x1; ahp->ah_tx_cal_chainmask = 0x1; - } else if (AR_SREV_WASP(ah) || AR_SREV_JUPITER(ah)) { + } else if (AR_SREV_WASP(ah) || AR_SREV_JUPITER(ah) || AR_SREV_HONEYBEE(ah)) { /* Wasp/Jupiter: 2 x 2 */ ahp->ah_rx_cal_chainmask = 0x3; ahp->ah_tx_cal_chainmask = 0x3; @@ -4069,7 +4106,7 @@ ar9300_init_bb(struct ath_hal *ah, struc /* * There is an issue if the AP starts the calibration before * the base band timeout completes. This could result in the - * rx_clear AH_FALSE triggering. As a workaround we add delay an + * rx_clear false triggering. As a workaround we add delay an * extra BASE_ACTIVATE_DELAY usecs to ensure this condition * does not happen. */ @@ -4438,6 +4475,7 @@ ar9300_reset(struct ath_hal *ah, HAL_OPM #ifdef ATH_FORCE_PPM u_int32_t save_force_val, tmp_reg; #endif + u_int8_t clk_25mhz = AH9300(ah)->clk_25mhz; HAL_BOOL stopped, cal_ret; HAL_BOOL apply_last_iqcorr = AH_FALSE; @@ -4449,7 +4487,7 @@ ar9300_reset(struct ath_hal *ah, HAL_OPM /* * Set the status to "ok" by default to cover the cases - * where we return AH_FALSE without going to "bad" + * where we return false without going to "bad" */ HALASSERT(status); *status = HAL_OK; @@ -4792,6 +4830,18 @@ ar9300_reset(struct ath_hal *ah, HAL_OPM if (ecode != HAL_OK) { goto bad; } + + /* + * Configuring WMAC PLL values for 25/40 MHz + */ + if(AR_SREV_WASP(ah) || AR_SREV_HONEYBEE(ah) || AR_SREV_SCORPION(ah) ) { + if(clk_25mhz) { + OS_REG_WRITE(ah, AR_RTC_DERIVED_RTC_CLK, (0x17c << 1)); // 32KHz sleep clk + } else { + OS_REG_WRITE(ah, AR_RTC_DERIVED_RTC_CLK, (0x261 << 1)); // 32KHz sleep clk + } + OS_DELAY(100); + } ahp->ah_immunity_on = AH_FALSE; @@ -5147,14 +5197,14 @@ ar9300_reset(struct ath_hal *ah, HAL_OPM * For big endian systems turn on swapping for descriptors */ #if AH_BYTE_ORDER == AH_BIG_ENDIAN - if (AR_SREV_HORNET(ah) || AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah)) { + if (AR_SREV_HORNET(ah) || AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah) || AR_SREV_HONEYBEE(ah)) { OS_REG_RMW(ah, AR_CFG, AR_CFG_SWTB | AR_CFG_SWRB, 0); } else { ar9300_init_cfg_reg(ah); } #endif - if ( AR_SREV_OSPREY(ah) || AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah)) { + if ( AR_SREV_OSPREY(ah) || AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah) || AR_SREV_HONEYBEE(ah) ) { OS_REG_RMW(ah, AR_CFG_LED, AR_CFG_LED_ASSOC_CTL, AR_CFG_LED_ASSOC_CTL); } @@ -5189,6 +5239,10 @@ ar9300_reset(struct ath_hal *ah, HAL_OPM REG_WRITE(ATH_GPIO_OE, (( REG_READ(ATH_GPIO_OE) & (~(0x1 << 12) )) | (0x1 << 13))); } } + else if (AR_SREV_HONEYBEE(ah)) { + REG_WRITE(ATH_GPIO_OUT_FUNCTION3, ( REG_READ(ATH_GPIO_OUT_FUNCTION3) & (~(0xff))) | (0x32) ); + REG_WRITE(ATH_GPIO_OE, (( REG_READ(ATH_GPIO_OE) & (~(0x1 << 12) )))); + } #undef REG_READ #undef REG_WRITE #endif Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300reg.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300reg.h Sun Nov 29 05:42:49 2015 (r291436) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300reg.h Sun Nov 29 05:47:52 2015 (r291437) @@ -2945,6 +2945,7 @@ enum { #define AR_SREV_VERSION_WASP 0x300 /* XXX: Check Wasp version number */ #define AR_SREV_VERSION_SCORPION 0x400 #define AR_SREV_VERSION_POSEIDON 0x240 +#define AR_SREV_VERSION_HONEYBEE 0x500 #define AR_SREV_VERSION_APHRODITE 0x2C0 #define AR_SREV_REVISION_OSPREY_10 0 /* Osprey 1.0 */ @@ -2972,6 +2973,10 @@ enum { #define AR_SREV_REVISION_JUPITER_20 2 /* Jupiter 2.0 */ #define AR_SREV_REVISION_JUPITER_21 3 /* Jupiter 2.1 */ +#define AR_SREV_REVISION_HONEYBEE_10 0 /* Honeybee 1.0 */ +#define AR_SREV_REVISION_HONEYBEE_11 1 /* Honeybee 1.1 */ +#define AR_SREV_REVISION_HONEYBEE_MASK 0xf /* Honeybee revision mask */ + #define AR_SREV_REVISION_APHRODITE_10 0 /* Aphrodite 1.0 */ #if defined(AH_SUPPORT_OSPREY) @@ -3000,7 +3005,7 @@ enum { /* NOTE: When adding chips newer than Peacock, add chip check here. */ #define AR_SREV_AR9580_10_OR_LATER(_ah) \ - (AR_SREV_AR9580(_ah)) + (AR_SREV_AR9580(_ah) || AR_SREV_SCORPION(_ah) || AR_SREV_HONEYBEE(_ah)) #define AR_SREV_JUPITER(_ah) \ ((AH_PRIVATE((_ah))->ah_macVersion == AR_SREV_VERSION_JUPITER)) @@ -3061,6 +3066,21 @@ enum { #define AR_SREV_WASP(_ah) 0 #endif /* #if defined(AH_SUPPORT_WASP) */ +#if defined(AH_SUPPORT_HONEYBEE) +#define AR_SREV_HONEYBEE(_ah) \ + ((AH_PRIVATE((_ah))->ah_macVersion == AR_SREV_VERSION_HONEYBEE)) +#define AR_SREV_HONEYBEE_10(_ah) \ + ((AH_PRIVATE((_ah))->ah_macVersion == AR_SREV_VERSION_HONEYBEE) && \ + (AH_PRIVATE((_ah))->ah_macRev == AR_SREV_REVISION_HONEYBEE_10)) +#define AR_SREV_HONEYBEE_11(_ah) \ + ((AH_PRIVATE((_ah))->ah_macVersion == AR_SREV_VERSION_HONEYBEE) && \ + (AH_PRIVATE((_ah))->ah_macRev == AR_SREV_REVISION_HONEYBEE_11)) +#else +#define AR_SREV_HONEYBEE(_ah) 0 +#define AR_SREV_HONEYBEE_10(_ah) 0 +#define AR_SREV_HONEYBEE_11(_ah) 0 +#endif /* #if defined(AH_SUPPORT_HONEYBEE) */ + #define AR_SREV_WASP_10(_ah) \ ((AH_PRIVATE((_ah))->ah_macVersion == AR_SREV_VERSION_WASP) && \ (AH_PRIVATE((_ah))->ah_macRev == AR_SREV_REVISION_WASP_10)) @@ -3103,7 +3123,7 @@ enum { #define AR_SREV_POSEIDON_OR_LATER(_ah) \ (AH_PRIVATE((_ah))->ah_macVersion >= AR_SREV_VERSION_POSEIDON) -#define AR_SREV_SOC(_ah) (AR_SREV_HORNET(_ah) || AR_SREV_POSEIDON(_ah) || AR_SREV_WASP(_ah)) +#define AR_SREV_SOC(_ah) (AR_SREV_HORNET(_ah) || AR_SREV_POSEIDON(_ah) || AR_SREV_WASP(_ah) || AR_SREV_HONEYBEE(_ah)) /* * Mask used to construct AAD for CCMP-AES * Cisco spec defined bits 0-3 as mask From owner-svn-src-all@freebsd.org Sun Nov 29 05:49:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2D09A3BFA1; Sun, 29 Nov 2015 05:49:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A35CE1C1E; Sun, 29 Nov 2015 05:49:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAT5nn1J054807; Sun, 29 Nov 2015 05:49:49 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAT5nnRE054804; Sun, 29 Nov 2015 05:49:49 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511290549.tAT5nnRE054804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 29 Nov 2015 05:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291438 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 05:49:51 -0000 Author: adrian Date: Sun Nov 29 05:49:49 2015 New Revision: 291438 URL: https://svnweb.freebsd.org/changeset/base/291438 Log: Add support for the integrated wifi for the QCA953x base config and AP143. Tested: * AP143 reference design board Modified: head/sys/mips/conf/AP143.hints head/sys/mips/conf/QCA953X_BASE head/sys/mips/conf/QCA953X_BASE.hints Modified: head/sys/mips/conf/AP143.hints ============================================================================== --- head/sys/mips/conf/AP143.hints Sun Nov 29 05:47:52 2015 (r291437) +++ head/sys/mips/conf/AP143.hints Sun Nov 29 05:49:49 2015 (r291438) @@ -24,6 +24,10 @@ hint.arge.1.phymask=0x0 # No directly m hint.arge.1.media=1000 hint.arge.1.fduplex=1 +# ath0: Where the ART is - last 64k in the flash +hint.ath.0.eepromaddr=0x1fff0000 +hint.ath.0.eepromsize=16384 + # The AP121 4MB flash layout: # # bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs Modified: head/sys/mips/conf/QCA953X_BASE ============================================================================== --- head/sys/mips/conf/QCA953X_BASE Sun Nov 29 05:47:52 2015 (r291437) +++ head/sys/mips/conf/QCA953X_BASE Sun Nov 29 05:49:49 2015 (r291438) @@ -100,7 +100,7 @@ option AH_DEBUG_ALQ device ath_ar9300 # AR9330 HAL; no need for the others option AH_DEBUG option AH_SUPPORT_AR5416 # 11n HAL support -option AH_SUPPORT_AR9330 # Chipset support +option AH_SUPPORT_QCA9530 # Chipset support option AH_AR5416_INTERRUPT_MITIGATION device mii Modified: head/sys/mips/conf/QCA953X_BASE.hints ============================================================================== --- head/sys/mips/conf/QCA953X_BASE.hints Sun Nov 29 05:47:52 2015 (r291437) +++ head/sys/mips/conf/QCA953X_BASE.hints Sun Nov 29 05:49:49 2015 (r291438) @@ -50,9 +50,7 @@ hint.ath.0.maddr=0x18100000 hint.ath.0.msize=0x20000 hint.ath.0.irq=0 hint.ath.0.vendor_id=0x168c -# XXX for now this is 0x00ff because there's no HAL support -# yet for honeybee. -hint.ath.0.device_id=0x00ff +hint.ath.0.device_id=0x003d # Set this to define where the ath calibration data # should be fetched from in physical memory. # hint.ath.0.eepromaddr=0x1fff1000 From owner-svn-src-all@freebsd.org Sun Nov 29 06:14:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2AF7A3C3C3; Sun, 29 Nov 2015 06:14:52 +0000 (UTC) (envelope-from deischen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BEE9164A; Sun, 29 Nov 2015 06:14:52 +0000 (UTC) (envelope-from deischen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAT6Epvx063419; Sun, 29 Nov 2015 06:14:51 GMT (envelope-from deischen@FreeBSD.org) Received: (from deischen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAT6EpkF063417; Sun, 29 Nov 2015 06:14:51 GMT (envelope-from deischen@FreeBSD.org) Message-Id: <201511290614.tAT6EpkF063417@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: deischen set sender to deischen@FreeBSD.org using -f From: Daniel Eischen Date: Sun, 29 Nov 2015 06:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291439 - head/lib/librt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 06:14:52 -0000 Author: deischen Date: Sun Nov 29 06:14:51 2015 New Revision: 291439 URL: https://svnweb.freebsd.org/changeset/base/291439 Log: Unbreak symbol versioning. I have no idea when it was broken, but it's been at least a few months if not a year or more. Added: head/lib/librt/Symbol.map (contents, props changed) Deleted: head/lib/librt/Version.map Modified: head/lib/librt/Makefile Modified: head/lib/librt/Makefile ============================================================================== --- head/lib/librt/Makefile Sun Nov 29 05:49:49 2015 (r291438) +++ head/lib/librt/Makefile Sun Nov 29 06:14:51 2015 (r291439) @@ -17,7 +17,8 @@ SRCS+= aio.c mq.c sigev_thread.c timer.c PRECIOUSLIB= -VERSION_MAP= ${.CURDIR}/Version.map +VERSION_DEF=${.CURDIR}/../libc/Versions.def +SYMBOL_MAPS=${.CURDIR}/Symbol.map .if ${MK_TESTS} != "no" SUBDIR+= tests Added: head/lib/librt/Symbol.map ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/librt/Symbol.map Sun Nov 29 06:14:51 2015 (r291439) @@ -0,0 +1,69 @@ +/* + * $FreeBSD$ + */ + +FBSD_1.0 { + aio_read; + aio_write; + aio_return; + aio_waitcomplete; + aio_fsync; + mq_open; + mq_close; + mq_notify; + mq_getattr; + mq_setattr; + mq_timedreceive; + mq_timedsend; + mq_unlink; + mq_send; + mq_receive; + timer_create; + timer_delete; + timer_gettime; + timer_settime; + timer_getoverrun; +}; + +FBSDprivate_1.0 { + _aio_read; + _aio_write; + _aio_return; + _aio_waitcomplete; + _aio_fsync; + __aio_read; + __aio_write; + __aio_return; + __aio_waitcomplete; + __aio_fsync; + _mq_open; + _mq_close; + _mq_notify; + _mq_getattr; + _mq_setattr; + _mq_timedreceive; + _mq_timedsend; + _mq_unlink; + _mq_send; + _mq_receive; + __mq_open; + __mq_close; + __mq_notify; + __mq_getattr; + __mq_setattr; + __mq_timedreceive; + __mq_timedsend; + __mq_unlink; + __mq_send; + __mq_receive; + _timer_create; + _timer_delete; + _timer_gettime; + _timer_settime; + _timer_getoverrun; + __timer_create; + __timer_delete; + __timer_gettime; + __timer_settime; + __timer_getoverrun; +}; From owner-svn-src-all@freebsd.org Sun Nov 29 06:16:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D964A3C42B; Sun, 29 Nov 2015 06:16:27 +0000 (UTC) (envelope-from deischen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE1AB18E3; Sun, 29 Nov 2015 06:16:26 +0000 (UTC) (envelope-from deischen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAT6GQLB063514; Sun, 29 Nov 2015 06:16:26 GMT (envelope-from deischen@FreeBSD.org) Received: (from deischen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAT6GQqq063513; Sun, 29 Nov 2015 06:16:26 GMT (envelope-from deischen@FreeBSD.org) Message-Id: <201511290616.tAT6GQqq063513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: deischen set sender to deischen@FreeBSD.org using -f From: Daniel Eischen Date: Sun, 29 Nov 2015 06:16:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291440 - head/tests/sys/mqueue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 06:16:27 -0000 Author: deischen Date: Sun Nov 29 06:16:25 2015 New Revision: 291440 URL: https://svnweb.freebsd.org/changeset/base/291440 Log: Disable a couple of tests, perhaps temporarily, since they use private symbols that are not exported from librt. Modified: head/tests/sys/mqueue/Makefile Modified: head/tests/sys/mqueue/Makefile ============================================================================== --- head/tests/sys/mqueue/Makefile Sun Nov 29 06:14:51 2015 (r291439) +++ head/tests/sys/mqueue/Makefile Sun Nov 29 06:16:25 2015 (r291440) @@ -10,8 +10,8 @@ CFLAGS+= -I${SRCTOP}/tests PROGS+= mqtest1 PROGS+= mqtest2 -PROGS+= mqtest3 -PROGS+= mqtest4 +#PROGS+= mqtest3 +#PROGS+= mqtest4 PROGS+= mqtest5 LDADD+= -lrt From owner-svn-src-all@freebsd.org Sun Nov 29 06:40:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47EFEA3C7DF; Sun, 29 Nov 2015 06:40:11 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FAA21589; Sun, 29 Nov 2015 06:40:10 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAT6eAed069465; Sun, 29 Nov 2015 06:40:10 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAT6eAEq069464; Sun, 29 Nov 2015 06:40:10 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201511290640.tAT6eAEq069464@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 29 Nov 2015 06:40:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291441 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 06:40:11 -0000 Author: nwhitehorn Date: Sun Nov 29 06:40:09 2015 New Revision: 291441 URL: https://svnweb.freebsd.org/changeset/base/291441 Log: Fix build with new binutils. This gets a working kernel with GCC 5.2 and binutils 2.24. Without this, the self-relocation code in locore64.S was failing due to a misaligned TOC section. MFC after: 2 weeks Modified: head/sys/conf/ldscript.powerpc64 Modified: head/sys/conf/ldscript.powerpc64 ============================================================================== --- head/sys/conf/ldscript.powerpc64 Sun Nov 29 06:16:25 2015 (r291440) +++ head/sys/conf/ldscript.powerpc64 Sun Nov 29 06:40:09 2015 (r291441) @@ -69,6 +69,7 @@ SECTIONS .toc1 : ALIGN(8) { *(.toc1) } .opd : ALIGN(8) { KEEP (*(.opd)) } .branch_lt : ALIGN(8) { *(.branch_lt) } + . = ALIGN(4096); .got : ALIGN(8) { __tocbase = .; *(.got .toc) } .dynamic : { *(.dynamic) } From owner-svn-src-all@freebsd.org Sun Nov 29 07:16:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5980DA3CFEB; Sun, 29 Nov 2015 07:16:10 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33596125E; Sun, 29 Nov 2015 07:16:10 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAT7G90d082677; Sun, 29 Nov 2015 07:16:09 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAT7G8vc082671; Sun, 29 Nov 2015 07:16:08 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201511290716.tAT7G8vc082671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 29 Nov 2015 07:16:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291442 - in head/sys/powerpc: aim include powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 07:16:10 -0000 Author: nwhitehorn Date: Sun Nov 29 07:16:08 2015 New Revision: 291442 URL: https://svnweb.freebsd.org/changeset/base/291442 Log: Make ELFv2 powerpc64 kernels build and run. Loader support will come in a separate commit. Modified: head/sys/powerpc/aim/locore64.S head/sys/powerpc/include/asm.h head/sys/powerpc/powerpc/exec_machdep.c head/sys/powerpc/powerpc/swtch64.S head/sys/powerpc/powerpc/vm_machdep.c Modified: head/sys/powerpc/aim/locore64.S ============================================================================== --- head/sys/powerpc/aim/locore64.S Sun Nov 29 06:40:09 2015 (r291441) +++ head/sys/powerpc/aim/locore64.S Sun Nov 29 07:16:08 2015 (r291442) @@ -65,6 +65,10 @@ #include #include +#ifdef _CALL_ELF +.abiversion _CALL_ELF +#endif + /* Locate the per-CPU data structure */ #define GET_CPUINFO(r) \ mfsprg0 r Modified: head/sys/powerpc/include/asm.h ============================================================================== --- head/sys/powerpc/include/asm.h Sun Nov 29 06:40:09 2015 (r291441) +++ head/sys/powerpc/include/asm.h Sun Nov 29 07:16:08 2015 (r291442) @@ -87,7 +87,9 @@ .tc name[TC],name #endif -#if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1) +#ifdef __powerpc64__ + +#if !defined(_CALL_ELF) || _CALL_ELF == 1 #define _ENTRY(name) \ .section ".text"; \ .p2align 2; \ @@ -100,6 +102,17 @@ .p2align 4; \ TYPE_ENTRY(name) \ DOT_LABEL(name): +#else +#define _ENTRY(name) \ + .text; \ + .p2align 4; \ + .globl name; \ + .type name,@function; \ +name: \ + addis %r2, %r12, (.TOC.-name)@ha; \ + addi %r2, %r2, (.TOC.-name)@l; \ + .localentry name, .-name; +#endif #define _END(name) \ .long 0; \ Modified: head/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/exec_machdep.c Sun Nov 29 06:40:09 2015 (r291441) +++ head/sys/powerpc/powerpc/exec_machdep.c Sun Nov 29 07:16:08 2015 (r291442) @@ -972,11 +972,12 @@ cpu_set_upcall(struct thread *td, struct cf->cf_arg1 = (register_t)tf; pcb2->pcb_sp = (register_t)cf; - #ifdef __powerpc64__ + #if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1) pcb2->pcb_lr = ((register_t *)fork_trampoline)[0]; pcb2->pcb_toc = ((register_t *)fork_trampoline)[1]; #else pcb2->pcb_lr = (register_t)fork_trampoline; + pcb2->pcb_context[0] = pcb2->pcb_lr; #endif pcb2->pcb_cpu.aim.usr_vsid = 0; Modified: head/sys/powerpc/powerpc/swtch64.S ============================================================================== --- head/sys/powerpc/powerpc/swtch64.S Sun Nov 29 06:40:09 2015 (r291441) +++ head/sys/powerpc/powerpc/swtch64.S Sun Nov 29 07:16:08 2015 (r291442) @@ -65,6 +65,10 @@ #include #include +#ifdef _CALL_ELF +.abiversion _CALL_ELF +#endif + TOC_ENTRY(blocked_lock) /* Modified: head/sys/powerpc/powerpc/vm_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/vm_machdep.c Sun Nov 29 06:40:09 2015 (r291441) +++ head/sys/powerpc/powerpc/vm_machdep.c Sun Nov 29 07:16:08 2015 (r291442) @@ -143,7 +143,7 @@ cpu_fork(struct thread *td1, struct proc cf = (struct callframe *)tf - 1; memset(cf, 0, sizeof(struct callframe)); - #ifdef __powerpc64__ + #if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1) cf->cf_toc = ((register_t *)fork_return)[1]; #endif cf->cf_func = (register_t)fork_return; @@ -152,11 +152,12 @@ cpu_fork(struct thread *td1, struct proc pcb->pcb_sp = (register_t)cf; KASSERT(pcb->pcb_sp % 16 == 0, ("stack misaligned")); - #ifdef __powerpc64__ + #if defined(__powerpc64__) && (!defined(_CALL_ELF) || _CALL_ELF == 1) pcb->pcb_lr = ((register_t *)fork_trampoline)[0]; pcb->pcb_toc = ((register_t *)fork_trampoline)[1]; #else pcb->pcb_lr = (register_t)fork_trampoline; + pcb->pcb_context[0] = pcb->pcb_lr; #endif #ifdef AIM pcb->pcb_cpu.aim.usr_vsid = 0; From owner-svn-src-all@freebsd.org Sun Nov 29 11:28:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D538AA3C889; Sun, 29 Nov 2015 11:28:05 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8530610B0; Sun, 29 Nov 2015 11:28:05 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATBS4q0058157; Sun, 29 Nov 2015 11:28:04 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATBS48l058154; Sun, 29 Nov 2015 11:28:04 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201511291128.tATBS48l058154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Sun, 29 Nov 2015 11:28:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291444 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 11:28:05 -0000 Author: mmel Date: Sun Nov 29 11:28:04 2015 New Revision: 291444 URL: https://svnweb.freebsd.org/changeset/base/291444 Log: AHCI: Fix AHCI driver for ARM. On ARM, we must ensure proper interdevice write ordering. The AHCI interrupt status register must be updated in HW before registers in interrupt controller. Unfortunately, only way how we can do it is readback. Discussed with: mav Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D4240 Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sun Nov 29 07:20:30 2015 (r291443) +++ head/sys/dev/ahci/ahci.c Sun Nov 29 11:28:04 2015 (r291444) @@ -483,6 +483,7 @@ ahci_intr(void *data) /* AHCI declares level triggered IS. */ if (!(ctlr->quirks & AHCI_Q_EDGEIS)) ATA_OUTL(ctlr->r_mem, AHCI_IS, is); + ATA_RBL(ctlr->r_mem, AHCI_IS); } /* @@ -501,6 +502,7 @@ ahci_intr_one(void *data) ctlr->interrupt[unit].function(arg); /* AHCI declares level triggered IS. */ ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); + ATA_RBL(ctlr->r_mem, AHCI_IS); } static void @@ -516,6 +518,7 @@ ahci_intr_one_edge(void *data) ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit); if ((arg = ctlr->interrupt[unit].argument)) ctlr->interrupt[unit].function(arg); + ATA_RBL(ctlr->r_mem, AHCI_IS); } struct resource * Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Sun Nov 29 07:20:30 2015 (r291443) +++ head/sys/dev/ahci/ahci.h Sun Nov 29 11:28:04 2015 (r291444) @@ -562,6 +562,20 @@ enum ahci_err_type { #define ATA_OUTSL_STRM(res, offset, addr, count) \ bus_write_multi_stream_4((res), (offset), (addr), (count)) +/* + * On some platforms, we must ensure proper interdevice write ordering. + * The AHCI interrupt status register must be updated in HW before + * registers in interrupt controller. + * Unfortunately, only way how we can do it is readback. + * + * Currently, only ARM is known to have this issue. + */ +#if defined(__arm__) +#define ATA_RBL(res, offset) \ + bus_read_4((res), (offset)) +#else +#define ATA_RBL(res, offset) +#endif #define AHCI_Q_NOFORCE 0x00000001 #define AHCI_Q_NOPMP 0x00000002 From owner-svn-src-all@freebsd.org Sun Nov 29 11:30:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D2C0A3C8F6; Sun, 29 Nov 2015 11:30:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38F67144D; Sun, 29 Nov 2015 11:30:18 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATBUHWm058291; Sun, 29 Nov 2015 11:30:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATBUHFN058290; Sun, 29 Nov 2015 11:30:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201511291130.tATBUHFN058290@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 29 Nov 2015 11:30:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291445 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 11:30:18 -0000 Author: trasz Date: Sun Nov 29 11:30:17 2015 New Revision: 291445 URL: https://svnweb.freebsd.org/changeset/base/291445 Log: User and group identifiers the rctl(8) utility receives from the kernel are always in numeric form; don't try to resolve them by names. This speeds up rule listing with large rulesets by about 50%. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c ============================================================================== --- head/usr.bin/rctl/rctl.c Sun Nov 29 11:28:04 2015 (r291444) +++ head/usr.bin/rctl/rctl.c Sun Nov 29 11:30:17 2015 (r291445) @@ -193,7 +193,7 @@ humanize_ids(char *rule) struct passwd *pwd; struct group *grp; const char *subject, *textid, *rest; - char *humanized; + char *end, *humanized; subject = strsep(&rule, ":"); textid = strsep(&rule, ":"); @@ -206,12 +206,16 @@ humanize_ids(char *rule) /* Replace numerical user and group ids with names. */ if (strcasecmp(subject, "user") == 0) { - id = parse_user(textid); + id = strtod(textid, &end); + if ((size_t)(end - textid) != strlen(textid)) + errx(1, "malformed uid '%s'", textid); pwd = getpwuid(id); if (pwd != NULL) textid = pwd->pw_name; } else if (strcasecmp(subject, "group") == 0) { - id = parse_group(textid); + id = strtod(textid, &end); + if ((size_t)(end - textid) != strlen(textid)) + errx(1, "malformed gid '%s'", textid); grp = getgrgid(id); if (grp != NULL) textid = grp->gr_name; From owner-svn-src-all@freebsd.org Sun Nov 29 11:37:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C603A3CAD8; Sun, 29 Nov 2015 11:37:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50EF11A74; Sun, 29 Nov 2015 11:37:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATBbPEN061122; Sun, 29 Nov 2015 11:37:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATBbPj0061121; Sun, 29 Nov 2015 11:37:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511291137.tATBbPj0061121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 29 Nov 2015 11:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291446 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 11:37:26 -0000 Author: kib Date: Sun Nov 29 11:37:25 2015 New Revision: 291446 URL: https://svnweb.freebsd.org/changeset/base/291446 Log: Minor cleanup. Systematically use ANSI C functions definitions. Correct type of the flags argument to the dev_pager_putpages() function. Use vm_pager_free_nonreq(). Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/device_pager.c Modified: head/sys/vm/device_pager.c ============================================================================== --- head/sys/vm/device_pager.c Sun Nov 29 11:30:17 2015 (r291445) +++ head/sys/vm/device_pager.c Sun Nov 29 11:37:25 2015 (r291446) @@ -60,10 +60,8 @@ static vm_object_t dev_pager_alloc(void vm_ooffset_t, struct ucred *); static void dev_pager_dealloc(vm_object_t); static int dev_pager_getpages(vm_object_t, vm_page_t *, int, int); -static void dev_pager_putpages(vm_object_t, vm_page_t *, int, - boolean_t, int *); -static boolean_t dev_pager_haspage(vm_object_t, vm_pindex_t, int *, - int *); +static void dev_pager_putpages(vm_object_t, vm_page_t *, int, int, int *); +static boolean_t dev_pager_haspage(vm_object_t, vm_pindex_t, int *, int *); static void dev_pager_free_page(vm_object_t object, vm_page_t m); /* list of device pager objects */ @@ -101,8 +99,9 @@ static struct cdev_pager_ops old_dev_pag }; static void -dev_pager_init() +dev_pager_init(void) { + TAILQ_INIT(&dev_pager_object_list); mtx_init(&dev_pager_mtx, "dev_pager list", NULL, MTX_DEF); } @@ -233,8 +232,7 @@ dev_pager_free_page(vm_object_t object, } static void -dev_pager_dealloc(object) - vm_object_t object; +dev_pager_dealloc(vm_object_t object) { vm_page_t m; @@ -261,7 +259,7 @@ dev_pager_dealloc(object) static int dev_pager_getpages(vm_object_t object, vm_page_t *ma, int count, int reqpage) { - int error, i; + int error; VM_OBJECT_ASSERT_WLOCKED(object); error = object->un_pager.devp.ops->cdev_pg_fault(object, @@ -269,13 +267,7 @@ dev_pager_getpages(vm_object_t object, v VM_OBJECT_ASSERT_WLOCKED(object); - for (i = 0; i < count; i++) { - if (i != reqpage) { - vm_page_lock(ma[i]); - vm_page_free(ma[i]); - vm_page_unlock(ma[i]); - } - } + vm_pager_free_nonreq(object, ma, reqpage, count, TRUE); if (error == VM_PAGER_OK) { KASSERT((object->type == OBJT_DEVICE && @@ -362,24 +354,18 @@ old_dev_pager_fault(vm_object_t object, } static void -dev_pager_putpages(object, m, count, sync, rtvals) - vm_object_t object; - vm_page_t *m; - int count; - boolean_t sync; - int *rtvals; +dev_pager_putpages(vm_object_t object, vm_page_t *m, int count, int flags, + int *rtvals) { panic("dev_pager_putpage called"); } static boolean_t -dev_pager_haspage(object, pindex, before, after) - vm_object_t object; - vm_pindex_t pindex; - int *before; - int *after; +dev_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before, + int *after) { + if (before != NULL) *before = 0; if (after != NULL) From owner-svn-src-all@freebsd.org Sun Nov 29 12:01:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA7B6A3C46F; Sun, 29 Nov 2015 12:01:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9218B18B1; Sun, 29 Nov 2015 12:01:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATC1ar7069773; Sun, 29 Nov 2015 12:01:36 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATC1aTb069771; Sun, 29 Nov 2015 12:01:36 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201511291201.tATC1aTb069771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 29 Nov 2015 12:01:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291447 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 12:01:37 -0000 Author: trasz Date: Sun Nov 29 12:01:36 2015 New Revision: 291447 URL: https://svnweb.freebsd.org/changeset/base/291447 Log: Rewrite the rctl(8) utility to make it possible to add multiple rules in a single run. This speeds up operation with large rulesets. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.8 head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.8 ============================================================================== --- head/usr.bin/rctl/rctl.8 Sun Nov 29 11:37:25 2015 (r291446) +++ head/usr.bin/rctl/rctl.8 Sun Nov 29 12:01:36 2015 (r291447) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 5, 2015 +.Dd November 29, 2015 .Dt RCTL 8 .Os .Sh NAME @@ -35,22 +35,22 @@ .Nm .Op Fl h .Op Fl n -.Op Ar filter +.Op Ar filter Ar ... .Nm .Fl a -.Ar rule +.Ar rule Ar ... .Nm .Fl l .Op Fl h .Op Fl n -.Ar filter +.Ar filter Ar ... .Nm .Fl r -.Ar filter +.Ar filter Ar ... .Nm .Fl u .Op Fl h -.Ar filter +.Ar filter Ar ... .Pp .Nm requires the kernel to be compiled with: Modified: head/usr.bin/rctl/rctl.c ============================================================================== --- head/usr.bin/rctl/rctl.c Sun Nov 29 11:37:25 2015 (r291446) +++ head/usr.bin/rctl/rctl.c Sun Nov 29 12:01:36 2015 (r291447) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -50,97 +51,60 @@ __FBSDID("$FreeBSD$"); #define RCTL_DEFAULT_BUFSIZE 128 * 1024 -static id_t -parse_user(const char *s) +static int +parse_user(const char *s, id_t *uidp) { - id_t id; char *end; struct passwd *pwd; pwd = getpwnam(s); - if (pwd != NULL) - return (pwd->pw_uid); + if (pwd != NULL) { + *uidp = pwd->pw_uid; + return (0); + } - if (!isnumber(s[0])) - errx(1, "uknown user '%s'", s); + if (!isnumber(s[0])) { + warnx("uknown user '%s'", s); + return (1); + } - id = strtod(s, &end); - if ((size_t)(end - s) != strlen(s)) - errx(1, "trailing characters after numerical id"); + *uidp = strtod(s, &end); + if ((size_t)(end - s) != strlen(s)) { + warnx("trailing characters after numerical id"); + return (1); + } - return (id); + return (0); } -static id_t -parse_group(const char *s) +static int +parse_group(const char *s, id_t *gidp) { - id_t id; char *end; struct group *grp; grp = getgrnam(s); - if (grp != NULL) - return (grp->gr_gid); - - if (!isnumber(s[0])) - errx(1, "uknown group '%s'", s); - - id = strtod(s, &end); - if ((size_t)(end - s) != strlen(s)) - errx(1, "trailing characters after numerical id"); - - return (id); -} - -/* - * This routine replaces user/group name with numeric id. - */ -static char * -resolve_ids(char *rule) -{ - id_t id; - const char *subject, *textid, *rest; - char *resolved; - - subject = strsep(&rule, ":"); - textid = strsep(&rule, ":"); - if (textid == NULL) - errx(1, "error in rule specification -- no subject"); - if (rule != NULL) - rest = rule; - else - rest = ""; - - if (strcasecmp(subject, "u") == 0) - subject = "user"; - else if (strcasecmp(subject, "g") == 0) - subject = "group"; - else if (strcasecmp(subject, "p") == 0) - subject = "process"; - else if (strcasecmp(subject, "l") == 0 || - strcasecmp(subject, "c") == 0 || - strcasecmp(subject, "class") == 0) - subject = "loginclass"; - else if (strcasecmp(subject, "j") == 0) - subject = "jail"; + if (grp != NULL) { + *gidp = grp->gr_gid; + return (0); + } - if (strcasecmp(subject, "user") == 0 && strlen(textid) > 0) { - id = parse_user(textid); - asprintf(&resolved, "%s:%d:%s", subject, (int)id, rest); - } else if (strcasecmp(subject, "group") == 0 && strlen(textid) > 0) { - id = parse_group(textid); - asprintf(&resolved, "%s:%d:%s", subject, (int)id, rest); - } else - asprintf(&resolved, "%s:%s:%s", subject, textid, rest); + if (!isnumber(s[0])) { + warnx("uknown group '%s'", s); + return (1); + } - if (resolved == NULL) - err(1, "asprintf"); + *gidp = strtod(s, &end); + if ((size_t)(end - s) != strlen(s)) { + warnx("trailing characters after numerical id"); + return (1); + } - return (resolved); + return (0); } /* - * This routine replaces "human-readable" number with its expanded form. + * Replace human-readable number with its expanded form. */ static char * expand_amount(char *rule) @@ -150,8 +114,10 @@ expand_amount(char *rule) char *copy, *expanded; copy = strdup(rule); - if (copy == NULL) - err(1, "strdup"); + if (copy == NULL) { + warn("strdup"); + return (NULL); + } subject = strsep(©, ":"); subject_id = strsep(©, ":"); @@ -170,8 +136,11 @@ expand_amount(char *rule) assert(resource != NULL); assert(action != NULL); - if (expand_number(amount, &num)) - err(1, "expand_number"); + if (expand_number(amount, &num)) { + warnx("invalid numeric value '%s'", amount); + free(copy); + return (NULL); + } if (per == NULL) asprintf(&expanded, "%s:%s:%s:%s=%ju", subject, subject_id, @@ -180,12 +149,72 @@ expand_amount(char *rule) asprintf(&expanded, "%s:%s:%s:%s=%ju/%s", subject, subject_id, resource, action, (uintmax_t)num, per); - if (expanded == NULL) - err(1, "asprintf"); + if (expanded == NULL) { + warn("asprintf"); + free(copy); + return (NULL); + } return (expanded); } + +static char * +expand_rule(char *rule, bool resolve_ids) +{ + id_t id; + const char *subject, *textid, *rest; + char *resolved; + int error; + + subject = strsep(&rule, ":"); + textid = strsep(&rule, ":"); + if (textid == NULL) { + warnx("error in rule specification -- no subject"); + return (NULL); + } + if (rule != NULL) + rest = rule; + else + rest = ""; + + if (strcasecmp(subject, "u") == 0) + subject = "user"; + else if (strcasecmp(subject, "g") == 0) + subject = "group"; + else if (strcasecmp(subject, "p") == 0) + subject = "process"; + else if (strcasecmp(subject, "l") == 0 || + strcasecmp(subject, "c") == 0 || + strcasecmp(subject, "class") == 0) + subject = "loginclass"; + else if (strcasecmp(subject, "j") == 0) + subject = "jail"; + + if (resolve_ids && + strcasecmp(subject, "user") == 0 && strlen(textid) > 0) { + error = parse_user(textid, &id); + if (error != 0) + return (NULL); + asprintf(&resolved, "%s:%d:%s", subject, (int)id, rest); + } else if (resolve_ids && + strcasecmp(subject, "group") == 0 && strlen(textid) > 0) { + error = parse_group(textid, &id); + if (error != 0) + return (NULL); + asprintf(&resolved, "%s:%d:%s", subject, (int)id, rest); + } else { + asprintf(&resolved, "%s:%s:%s", subject, textid, rest); + } + + if (resolved == NULL) { + warn("asprintf"); + return (NULL); + } + + return (expand_amount(resolved)); +} + static char * humanize_ids(char *rule) { @@ -330,8 +359,8 @@ enosys(void) errx(1, "RACCT/RCTL present, but disabled; enable using kern.racct.enable=1 tunable"); } -static void -add_rule(char *rule) +static int +add_rule(const char *rule) { int error; @@ -339,13 +368,14 @@ add_rule(char *rule) if (error != 0) { if (errno == ENOSYS) enosys(); - err(1, "rctl_add_rule"); + warn("rctl_add_rule"); } - free(rule); + + return (error); } -static void -show_limits(char *filter, int hflag, int nflag) +static int +show_limits(const char *filter, int hflag, int nflag) { int error; char *outbuf = NULL; @@ -362,17 +392,18 @@ show_limits(char *filter, int hflag, int if (error && errno != ERANGE) { if (errno == ENOSYS) enosys(); - err(1, "rctl_get_limits"); + warn("rctl_get_limits"); } } while (error && errno == ERANGE); print_rules(outbuf, hflag, nflag); - free(filter); free(outbuf); + + return (error); } -static void -remove_rule(char *filter) +static int +remove_rule(const char *filter) { int error; @@ -380,9 +411,10 @@ remove_rule(char *filter) if (error != 0) { if (errno == ENOSYS) enosys(); - err(1, "rctl_remove_rule"); + warn("rctl_remove_rule"); } - free(filter); + + return (error); } static char * @@ -419,8 +451,8 @@ humanize_usage_amount(char *usage) /* * Query the kernel about a resource usage and print it out. */ -static void -show_usage(char *filter, int hflag) +static int +show_usage(const char *filter, int hflag) { int error; char *outbuf = NULL, *tmp; @@ -437,7 +469,7 @@ show_usage(char *filter, int hflag) if (error && errno != ERANGE) { if (errno == ENOSYS) enosys(); - err(1, "rctl_get_racct"); + warn("rctl_get_racct"); } } while (error && errno == ERANGE); @@ -451,15 +483,16 @@ show_usage(char *filter, int hflag) printf("%s\n", tmp); } - free(filter); free(outbuf); + + return (error); } /* * Query the kernel about resource limit rules and print them out. */ -static void -show_rules(char *filter, int hflag, int nflag) +static int +show_rules(const char *filter, int hflag, int nflag) { int error; char *outbuf = NULL; @@ -480,12 +513,14 @@ show_rules(char *filter, int hflag, int if (error && errno != ERANGE) { if (errno == ENOSYS) enosys(); - err(1, "rctl_get_rules"); + warn("rctl_get_rules"); } } while (error && errno == ERANGE); print_rules(outbuf, hflag, nflag); free(outbuf); + + return (error); } static void @@ -503,30 +538,27 @@ main(int argc __unused, char **argv __un int ch, aflag = 0, hflag = 0, nflag = 0, lflag = 0, rflag = 0, uflag = 0; char *rule = NULL; + int i, cumulated_error; - while ((ch = getopt(argc, argv, "a:hl:nr:u:")) != -1) { + while ((ch = getopt(argc, argv, "ahlnru")) != -1) { switch (ch) { case 'a': aflag = 1; - rule = strdup(optarg); break; case 'h': hflag = 1; break; case 'l': lflag = 1; - rule = strdup(optarg); break; case 'n': nflag = 1; break; case 'r': rflag = 1; - rule = strdup(optarg); break; case 'u': uflag = 1; - rule = strdup(optarg); break; case '?': @@ -537,44 +569,55 @@ main(int argc __unused, char **argv __un argc -= optind; argv += optind; + + if (aflag + lflag + rflag + uflag > 1) + errx(1, "at most one of -a, -l, -r, or -u may be specified"); - if (argc > 1) - usage(); - - if (rule == NULL) { - if (argc == 1) - rule = strdup(argv[0]); - else + if (argc == 0) { + if (aflag + lflag + rflag + uflag == 0) { rule = strdup("::"); + show_rules(rule, hflag, nflag); + + return (0); + } + + usage(); } - if (aflag + lflag + rflag + uflag + argc > 1) - errx(1, "only one flag or argument may be specified " - "at the same time"); + cumulated_error = 0; - rule = resolve_ids(rule); - rule = expand_amount(rule); + for (i = 0; i < argc; i++) { + rule = argv[i]; - if (aflag) { - add_rule(rule); - return (0); - } + /* + * Skip resolving if passed -n _and_ -a. Ignore -n otherwise, + * so we can still do "rctl -n u:root" and see the rules without + * resolving the UID. + */ + if (aflag != 0 && nflag != 0) + rule = expand_rule(rule, false); + else + rule = expand_rule(rule, true); - if (lflag) { - show_limits(rule, hflag, nflag); - return (0); - } + if (rule == NULL) { + cumulated_error++; + continue; + } - if (rflag) { - remove_rule(rule); - return (0); - } + if (aflag) { + cumulated_error += add_rule(rule); + } else if (lflag) { + cumulated_error += show_limits(rule, hflag, nflag); + } else if (rflag) { + cumulated_error += remove_rule(rule); + } else if (uflag) { + cumulated_error += show_usage(rule, hflag); + } else { + cumulated_error += show_rules(rule, hflag, nflag); + } - if (uflag) { - show_usage(rule, hflag); - return (0); + free(rule); } - show_rules(rule, hflag, nflag); - return (0); + return (cumulated_error); } From owner-svn-src-all@freebsd.org Sun Nov 29 12:09:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70640A3C5A3; Sun, 29 Nov 2015 12:09:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F0E51BE5; Sun, 29 Nov 2015 12:09:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATC9CWv070062; Sun, 29 Nov 2015 12:09:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATC9Cjk070061; Sun, 29 Nov 2015 12:09:12 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201511291209.tATC9Cjk070061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 29 Nov 2015 12:09:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291448 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 12:09:13 -0000 Author: trasz Date: Sun Nov 29 12:09:12 2015 New Revision: 291448 URL: https://svnweb.freebsd.org/changeset/base/291448 Log: Handle asprintf(3) errors in a standards-compliant way. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c ============================================================================== --- head/usr.bin/rctl/rctl.c Sun Nov 29 12:01:36 2015 (r291447) +++ head/usr.bin/rctl/rctl.c Sun Nov 29 12:09:12 2015 (r291448) @@ -112,6 +112,7 @@ expand_amount(char *rule) uint64_t num; const char *subject, *subject_id, *resource, *action, *amount, *per; char *copy, *expanded; + int ret; copy = strdup(rule); if (copy == NULL) { @@ -142,14 +143,15 @@ expand_amount(char *rule) return (NULL); } - if (per == NULL) - asprintf(&expanded, "%s:%s:%s:%s=%ju", subject, subject_id, - resource, action, (uintmax_t)num); - else - asprintf(&expanded, "%s:%s:%s:%s=%ju/%s", subject, subject_id, - resource, action, (uintmax_t)num, per); + if (per == NULL) { + ret = asprintf(&expanded, "%s:%s:%s:%s=%ju", + subject, subject_id, resource, action, (uintmax_t)num); + } else { + ret = asprintf(&expanded, "%s:%s:%s:%s=%ju/%s", + subject, subject_id, resource, action, (uintmax_t)num, per); + } - if (expanded == NULL) { + if (ret <= 0) { warn("asprintf"); free(copy); return (NULL); @@ -165,7 +167,7 @@ expand_rule(char *rule, bool resolve_ids id_t id; const char *subject, *textid, *rest; char *resolved; - int error; + int error, ret; subject = strsep(&rule, ":"); textid = strsep(&rule, ":"); @@ -196,18 +198,18 @@ expand_rule(char *rule, bool resolve_ids error = parse_user(textid, &id); if (error != 0) return (NULL); - asprintf(&resolved, "%s:%d:%s", subject, (int)id, rest); + ret = asprintf(&resolved, "%s:%d:%s", subject, (int)id, rest); } else if (resolve_ids && strcasecmp(subject, "group") == 0 && strlen(textid) > 0) { error = parse_group(textid, &id); if (error != 0) return (NULL); - asprintf(&resolved, "%s:%d:%s", subject, (int)id, rest); + ret = asprintf(&resolved, "%s:%d:%s", subject, (int)id, rest); } else { - asprintf(&resolved, "%s:%s:%s", subject, textid, rest); + ret = asprintf(&resolved, "%s:%s:%s", subject, textid, rest); } - if (resolved == NULL) { + if (ret <= 0) { warn("asprintf"); return (NULL); } @@ -223,6 +225,7 @@ humanize_ids(char *rule) struct group *grp; const char *subject, *textid, *rest; char *end, *humanized; + int ret; subject = strsep(&rule, ":"); textid = strsep(&rule, ":"); @@ -250,9 +253,8 @@ humanize_ids(char *rule) textid = grp->gr_name; } - asprintf(&humanized, "%s:%s:%s", subject, textid, rest); - - if (humanized == NULL) + ret = asprintf(&humanized, "%s:%s:%s", subject, textid, rest); + if (ret <= 0) err(1, "asprintf"); return (humanized); @@ -279,6 +281,7 @@ humanize_amount(char *rule) int64_t num; const char *subject, *subject_id, *resource, *action, *amount, *per; char *copy, *humanized, buf[6]; + int ret; copy = strdup(rule); if (copy == NULL) @@ -306,14 +309,15 @@ humanize_amount(char *rule) HN_DECIMAL | HN_NOSPACE) == -1) err(1, "humanize_number"); - if (per == NULL) - asprintf(&humanized, "%s:%s:%s:%s=%s", subject, subject_id, - resource, action, buf); - else - asprintf(&humanized, "%s:%s:%s:%s=%s/%s", subject, subject_id, - resource, action, buf, per); + if (per == NULL) { + ret = asprintf(&humanized, "%s:%s:%s:%s=%s", + subject, subject_id, resource, action, buf); + } else { + ret = asprintf(&humanized, "%s:%s:%s:%s=%s/%s", + subject, subject_id, resource, action, buf, per); + } - if (humanized == NULL) + if (ret <= 0) err(1, "asprintf"); return (humanized); @@ -423,6 +427,7 @@ humanize_usage_amount(char *usage) int64_t num; const char *resource, *amount; char *copy, *humanized, buf[6]; + int ret; copy = strdup(usage); if (copy == NULL) @@ -441,8 +446,8 @@ humanize_usage_amount(char *usage) return (usage); } - asprintf(&humanized, "%s=%s", resource, buf); - if (humanized == NULL) + ret = asprintf(&humanized, "%s=%s", resource, buf); + if (ret <= 0) err(1, "asprintf"); return (humanized); From owner-svn-src-all@freebsd.org Sun Nov 29 12:21:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DFA5A3C85E; Sun, 29 Nov 2015 12:21:04 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF9EA11CC; Sun, 29 Nov 2015 12:21:03 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATCL2Ae075100; Sun, 29 Nov 2015 12:21:02 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATCL2vp075099; Sun, 29 Nov 2015 12:21:02 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201511291221.tATCL2vp075099@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 29 Nov 2015 12:21:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291449 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 12:21:04 -0000 Author: trasz Date: Sun Nov 29 12:21:02 2015 New Revision: 291449 URL: https://svnweb.freebsd.org/changeset/base/291449 Log: Fix some memory management problems. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c ============================================================================== --- head/usr.bin/rctl/rctl.c Sun Nov 29 12:09:12 2015 (r291448) +++ head/usr.bin/rctl/rctl.c Sun Nov 29 12:21:02 2015 (r291449) @@ -111,10 +111,10 @@ expand_amount(char *rule) { uint64_t num; const char *subject, *subject_id, *resource, *action, *amount, *per; - char *copy, *expanded; + char *copy, *expanded, *tofree; int ret; - copy = strdup(rule); + tofree = copy = strdup(rule); if (copy == NULL) { warn("strdup"); return (NULL); @@ -128,7 +128,7 @@ expand_amount(char *rule) per = copy; if (amount == NULL || strlen(amount) == 0) { - free(copy); + free(tofree); return (rule); } @@ -139,7 +139,7 @@ expand_amount(char *rule) if (expand_number(amount, &num)) { warnx("invalid numeric value '%s'", amount); - free(copy); + free(tofree); return (NULL); } @@ -153,10 +153,11 @@ expand_amount(char *rule) if (ret <= 0) { warn("asprintf"); - free(copy); + free(tofree); return (NULL); } + free(tofree); return (expanded); } @@ -280,10 +281,10 @@ humanize_amount(char *rule) { int64_t num; const char *subject, *subject_id, *resource, *action, *amount, *per; - char *copy, *humanized, buf[6]; + char *copy, *humanized, buf[6], *tofree; int ret; - copy = strdup(rule); + tofree = copy = strdup(rule); if (copy == NULL) err(1, "strdup"); @@ -296,7 +297,7 @@ humanize_amount(char *rule) if (amount == NULL || strlen(amount) == 0 || str2int64(amount, &num) != 0) { - free(copy); + free(tofree); return (rule); } @@ -320,6 +321,7 @@ humanize_amount(char *rule) if (ret <= 0) err(1, "asprintf"); + free(tofree); return (humanized); } @@ -426,10 +428,10 @@ humanize_usage_amount(char *usage) { int64_t num; const char *resource, *amount; - char *copy, *humanized, buf[6]; + char *copy, *humanized, buf[6], *tofree; int ret; - copy = strdup(usage); + tofree = copy = strdup(usage); if (copy == NULL) err(1, "strdup"); @@ -442,7 +444,7 @@ humanize_usage_amount(char *usage) if (str2int64(amount, &num) != 0 || humanize_number(buf, sizeof(buf), num, "", HN_AUTOSCALE, HN_DECIMAL | HN_NOSPACE) == -1) { - free(copy); + free(tofree); return (usage); } @@ -450,6 +452,7 @@ humanize_usage_amount(char *usage) if (ret <= 0) err(1, "asprintf"); + free(tofree); return (humanized); } @@ -460,7 +463,7 @@ static int show_usage(const char *filter, int hflag) { int error; - char *outbuf = NULL, *tmp; + char *copy, *outbuf = NULL, *tmp; size_t outbuflen = RCTL_DEFAULT_BUFSIZE / 4; do { @@ -478,7 +481,8 @@ show_usage(const char *filter, int hflag } } while (error && errno == ERANGE); - while ((tmp = strsep(&outbuf, ",")) != NULL) { + copy = outbuf; + while ((tmp = strsep(©, ",")) != NULL) { if (tmp[0] == '\0') break; /* XXX */ From owner-svn-src-all@freebsd.org Sun Nov 29 12:23:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3EB07A3C8C1; Sun, 29 Nov 2015 12:23:10 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CAA1143F; Sun, 29 Nov 2015 12:23:09 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATCN9ah075828; Sun, 29 Nov 2015 12:23:09 GMT (envelope-from uqs@FreeBSD.org) Received: (from uqs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATCN9E1075827; Sun, 29 Nov 2015 12:23:09 GMT (envelope-from uqs@FreeBSD.org) Message-Id: <201511291223.tATCN9E1075827@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: uqs set sender to uqs@FreeBSD.org using -f From: Ulrich Spoerlein Date: Sun, 29 Nov 2015 12:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291450 - head/sys/modules/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 12:23:10 -0000 Author: uqs Date: Sun Nov 29 12:23:08 2015 New Revision: 291450 URL: https://svnweb.freebsd.org/changeset/base/291450 Log: Fix make depend Modified: head/sys/modules/uart/Makefile Modified: head/sys/modules/uart/Makefile ============================================================================== --- head/sys/modules/uart/Makefile Sun Nov 29 12:21:02 2015 (r291449) +++ head/sys/modules/uart/Makefile Sun Nov 29 12:23:08 2015 (r291450) @@ -34,6 +34,6 @@ SRCS= uart_bus_acpi.c ${uart_bus_ebus} u SRCS+= bus_if.h card_if.h device_if.h isa_if.h ${ofw_bus_if} pci_if.h \ power_if.h pccarddevs.h serdev_if.h -SRCS+= opt_platform.h +SRCS+= opt_platform.h opt_uart.h .include From owner-svn-src-all@freebsd.org Sun Nov 29 12:33:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8610FA3CBCA; Sun, 29 Nov 2015 12:33:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47AD71A80; Sun, 29 Nov 2015 12:33:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATCXuFW078754; Sun, 29 Nov 2015 12:33:56 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATCXuPv078753; Sun, 29 Nov 2015 12:33:56 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201511291233.tATCXuPv078753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 29 Nov 2015 12:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291451 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 12:33:57 -0000 Author: trasz Date: Sun Nov 29 12:33:56 2015 New Revision: 291451 URL: https://svnweb.freebsd.org/changeset/base/291451 Log: Simplify rule retrieval and improve error handling. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c ============================================================================== --- head/usr.bin/rctl/rctl.c Sun Nov 29 12:23:08 2015 (r291450) +++ head/usr.bin/rctl/rctl.c Sun Nov 29 12:33:56 2015 (r291451) @@ -387,20 +387,24 @@ show_limits(const char *filter, int hfla char *outbuf = NULL; size_t outbuflen = RCTL_DEFAULT_BUFSIZE / 4; - do { + for (;;) { outbuflen *= 4; outbuf = realloc(outbuf, outbuflen); if (outbuf == NULL) err(1, "realloc"); + error = rctl_get_limits(filter, strlen(filter) + 1, + outbuf, outbuflen); + if (error == 0) + break; + if (errno == ERANGE) + continue; + if (errno == ENOSYS) + enosys(); + warn("rctl_get_limits"); + free(outbuf); - error = rctl_get_limits(filter, strlen(filter) + 1, outbuf, - outbuflen); - if (error && errno != ERANGE) { - if (errno == ENOSYS) - enosys(); - warn("rctl_get_limits"); - } - } while (error && errno == ERANGE); + return (error); + } print_rules(outbuf, hflag, nflag); free(outbuf); @@ -466,20 +470,24 @@ show_usage(const char *filter, int hflag char *copy, *outbuf = NULL, *tmp; size_t outbuflen = RCTL_DEFAULT_BUFSIZE / 4; - do { + for (;;) { outbuflen *= 4; outbuf = realloc(outbuf, outbuflen); if (outbuf == NULL) err(1, "realloc"); + error = rctl_get_racct(filter, strlen(filter) + 1, + outbuf, outbuflen); + if (error == 0) + break; + if (errno == ERANGE) + continue; + if (errno == ENOSYS) + enosys(); + warn("rctl_get_racct"); + free(outbuf); - error = rctl_get_racct(filter, strlen(filter) + 1, outbuf, - outbuflen); - if (error && errno != ERANGE) { - if (errno == ENOSYS) - enosys(); - warn("rctl_get_racct"); - } - } while (error && errno == ERANGE); + return (error); + } copy = outbuf; while ((tmp = strsep(©, ",")) != NULL) { @@ -512,19 +520,23 @@ show_rules(const char *filter, int hflag else filterlen = 0; - do { + for (;;) { outbuflen *= 4; outbuf = realloc(outbuf, outbuflen); if (outbuf == NULL) err(1, "realloc"); - error = rctl_get_rules(filter, filterlen, outbuf, outbuflen); - if (error && errno != ERANGE) { - if (errno == ENOSYS) - enosys(); - warn("rctl_get_rules"); - } - } while (error && errno == ERANGE); + if (error == 0) + break; + if (errno == ERANGE) + continue; + if (errno == ENOSYS) + enosys(); + warn("rctl_get_rules"); + free(outbuf); + + return (error); + } print_rules(outbuf, hflag, nflag); free(outbuf); From owner-svn-src-all@freebsd.org Sun Nov 29 13:14:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0C33A3B468; Sun, 29 Nov 2015 13:14:46 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8B9C1969; Sun, 29 Nov 2015 13:14:46 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATDEjPI090470; Sun, 29 Nov 2015 13:14:45 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATDEjuj090469; Sun, 29 Nov 2015 13:14:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201511291314.tATDEjuj090469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 29 Nov 2015 13:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291452 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 13:14:47 -0000 Author: trasz Date: Sun Nov 29 13:14:45 2015 New Revision: 291452 URL: https://svnweb.freebsd.org/changeset/base/291452 Log: Improve error reporting to clearly show problematic rules. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c ============================================================================== --- head/usr.bin/rctl/rctl.c Sun Nov 29 12:33:56 2015 (r291451) +++ head/usr.bin/rctl/rctl.c Sun Nov 29 13:14:45 2015 (r291452) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #define RCTL_DEFAULT_BUFSIZE 128 * 1024 static int -parse_user(const char *s, id_t *uidp) +parse_user(const char *s, id_t *uidp, const char *unexpanded_rule) { char *end; struct passwd *pwd; @@ -64,13 +64,15 @@ parse_user(const char *s, id_t *uidp) } if (!isnumber(s[0])) { - warnx("uknown user '%s'", s); + warnx("malformed rule '%s': uknown user '%s'", + unexpanded_rule, s); return (1); } *uidp = strtod(s, &end); if ((size_t)(end - s) != strlen(s)) { - warnx("trailing characters after numerical id"); + warnx("malformed rule '%s': trailing characters " + "after numerical id", unexpanded_rule); return (1); } @@ -78,7 +80,7 @@ parse_user(const char *s, id_t *uidp) } static int -parse_group(const char *s, id_t *gidp) +parse_group(const char *s, id_t *gidp, const char *unexpanded_rule) { char *end; struct group *grp; @@ -90,13 +92,15 @@ parse_group(const char *s, id_t *gidp) } if (!isnumber(s[0])) { - warnx("uknown group '%s'", s); + warnx("malformed rule '%s': uknown group '%s'", + unexpanded_rule, s); return (1); } *gidp = strtod(s, &end); if ((size_t)(end - s) != strlen(s)) { - warnx("trailing characters after numerical id"); + warnx("malformed rule '%s': trailing characters " + "after numerical id", unexpanded_rule); return (1); } @@ -107,30 +111,22 @@ parse_group(const char *s, id_t *gidp) * Replace human-readable number with its expanded form. */ static char * -expand_amount(char *rule) +expand_amount(char *rule, const char *unexpanded_rule) { uint64_t num; const char *subject, *subject_id, *resource, *action, *amount, *per; - char *copy, *expanded, *tofree; + char *expanded; int ret; - tofree = copy = strdup(rule); - if (copy == NULL) { - warn("strdup"); - return (NULL); - } - - subject = strsep(©, ":"); - subject_id = strsep(©, ":"); - resource = strsep(©, ":"); - action = strsep(©, "=/"); - amount = strsep(©, "/"); - per = copy; + subject = strsep(&rule, ":"); + subject_id = strsep(&rule, ":"); + resource = strsep(&rule, ":"); + action = strsep(&rule, "=/"); + amount = strsep(&rule, "/"); + per = rule; - if (amount == NULL || strlen(amount) == 0) { - free(tofree); + if (amount == NULL || strlen(amount) == 0) return (rule); - } assert(subject != NULL); assert(subject_id != NULL); @@ -138,8 +134,8 @@ expand_amount(char *rule) assert(action != NULL); if (expand_number(amount, &num)) { - warnx("invalid numeric value '%s'", amount); - free(tofree); + warnx("malformed rule '%s': invalid numeric value '%s'", + unexpanded_rule, amount); return (NULL); } @@ -153,31 +149,34 @@ expand_amount(char *rule) if (ret <= 0) { warn("asprintf"); - free(tofree); return (NULL); } - free(tofree); return (expanded); } - static char * -expand_rule(char *rule, bool resolve_ids) +expand_rule(const char *rule, bool resolve_ids) { id_t id; const char *subject, *textid, *rest; - char *resolved; + char *copy, *expanded, *resolved, *tofree; int error, ret; - subject = strsep(&rule, ":"); - textid = strsep(&rule, ":"); + tofree = copy = strdup(rule); + if (copy == NULL) { + warn("strdup"); + return (NULL); + } + + subject = strsep(©, ":"); + textid = strsep(©, ":"); if (textid == NULL) { - warnx("error in rule specification -- no subject"); + warnx("malformed rule '%s': missing subject", rule); return (NULL); } - if (rule != NULL) - rest = rule; + if (copy != NULL) + rest = copy; else rest = ""; @@ -196,15 +195,19 @@ expand_rule(char *rule, bool resolve_ids if (resolve_ids && strcasecmp(subject, "user") == 0 && strlen(textid) > 0) { - error = parse_user(textid, &id); - if (error != 0) + error = parse_user(textid, &id, rule); + if (error != 0) { + free(tofree); return (NULL); + } ret = asprintf(&resolved, "%s:%d:%s", subject, (int)id, rest); } else if (resolve_ids && strcasecmp(subject, "group") == 0 && strlen(textid) > 0) { - error = parse_group(textid, &id); - if (error != 0) + error = parse_group(textid, &id, rule); + if (error != 0) { + free(tofree); return (NULL); + } ret = asprintf(&resolved, "%s:%d:%s", subject, (int)id, rest); } else { ret = asprintf(&resolved, "%s:%s:%s", subject, textid, rest); @@ -212,10 +215,16 @@ expand_rule(char *rule, bool resolve_ids if (ret <= 0) { warn("asprintf"); + free(tofree); return (NULL); } - return (expand_amount(resolved)); + free(tofree); + + expanded = expand_amount(resolved, rule); + free(resolved); + + return (expanded); } static char * @@ -366,7 +375,7 @@ enosys(void) } static int -add_rule(const char *rule) +add_rule(const char *rule, const char *unexpanded_rule) { int error; @@ -374,14 +383,15 @@ add_rule(const char *rule) if (error != 0) { if (errno == ENOSYS) enosys(); - warn("rctl_add_rule"); + warn("failed to add rule '%s'", unexpanded_rule); } return (error); } static int -show_limits(const char *filter, int hflag, int nflag) +show_limits(const char *filter, const char *unexpanded_rule, + int hflag, int nflag) { int error; char *outbuf = NULL; @@ -400,7 +410,7 @@ show_limits(const char *filter, int hfla continue; if (errno == ENOSYS) enosys(); - warn("rctl_get_limits"); + warn("failed to get limits for '%s'", unexpanded_rule); free(outbuf); return (error); @@ -413,7 +423,7 @@ show_limits(const char *filter, int hfla } static int -remove_rule(const char *filter) +remove_rule(const char *filter, const char *unexpanded_rule) { int error; @@ -421,7 +431,7 @@ remove_rule(const char *filter) if (error != 0) { if (errno == ENOSYS) enosys(); - warn("rctl_remove_rule"); + warn("failed to remove rule '%s'", unexpanded_rule); } return (error); @@ -464,7 +474,7 @@ humanize_usage_amount(char *usage) * Query the kernel about a resource usage and print it out. */ static int -show_usage(const char *filter, int hflag) +show_usage(const char *filter, const char *unexpanded_rule, int hflag) { int error; char *copy, *outbuf = NULL, *tmp; @@ -483,7 +493,8 @@ show_usage(const char *filter, int hflag continue; if (errno == ENOSYS) enosys(); - warn("rctl_get_racct"); + warn("failed to show resource consumption for '%s'", + unexpanded_rule); free(outbuf); return (error); @@ -509,7 +520,8 @@ show_usage(const char *filter, int hflag * Query the kernel about resource limit rules and print them out. */ static int -show_rules(const char *filter, int hflag, int nflag) +show_rules(const char *filter, const char *unexpanded_rule, + int hflag, int nflag) { int error; char *outbuf = NULL; @@ -532,7 +544,7 @@ show_rules(const char *filter, int hflag continue; if (errno == ENOSYS) enosys(); - warn("rctl_get_rules"); + warn("failed to show rules for '%s'", unexpanded_rule); free(outbuf); return (error); @@ -558,8 +570,8 @@ main(int argc __unused, char **argv __un { int ch, aflag = 0, hflag = 0, nflag = 0, lflag = 0, rflag = 0, uflag = 0; - char *rule = NULL; - int i, cumulated_error; + char *rule = NULL, *unexpanded_rule; + int i, cumulated_error, error; while ((ch = getopt(argc, argv, "ahlnru")) != -1) { switch (ch) { @@ -597,7 +609,7 @@ main(int argc __unused, char **argv __un if (argc == 0) { if (aflag + lflag + rflag + uflag == 0) { rule = strdup("::"); - show_rules(rule, hflag, nflag); + show_rules(rule, rule, hflag, nflag); return (0); } @@ -608,7 +620,7 @@ main(int argc __unused, char **argv __un cumulated_error = 0; for (i = 0; i < argc; i++) { - rule = argv[i]; + unexpanded_rule = argv[i]; /* * Skip resolving if passed -n _and_ -a. Ignore -n otherwise, @@ -616,27 +628,37 @@ main(int argc __unused, char **argv __un * resolving the UID. */ if (aflag != 0 && nflag != 0) - rule = expand_rule(rule, false); + rule = expand_rule(unexpanded_rule, false); else - rule = expand_rule(rule, true); + rule = expand_rule(unexpanded_rule, true); if (rule == NULL) { cumulated_error++; continue; } + /* + * The reason for passing the unexpanded_rule is to make + * it easier for the user to search for the problematic + * rule in the passed input. + */ if (aflag) { - cumulated_error += add_rule(rule); + error = add_rule(rule, unexpanded_rule); } else if (lflag) { - cumulated_error += show_limits(rule, hflag, nflag); + error = show_limits(rule, unexpanded_rule, + hflag, nflag); } else if (rflag) { - cumulated_error += remove_rule(rule); + error = remove_rule(rule, unexpanded_rule); } else if (uflag) { - cumulated_error += show_usage(rule, hflag); + error = show_usage(rule, unexpanded_rule, hflag); } else { - cumulated_error += show_rules(rule, hflag, nflag); + error = show_rules(rule, unexpanded_rule, + hflag, nflag); } + if (error != 0) + cumulated_error++; + free(rule); } From owner-svn-src-all@freebsd.org Sun Nov 29 14:27:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A077A3B3F3; Sun, 29 Nov 2015 14:27:01 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EDA012C8; Sun, 29 Nov 2015 14:27:01 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATER0As011246; Sun, 29 Nov 2015 14:27:00 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATER0lb011244; Sun, 29 Nov 2015 14:27:00 GMT (envelope-from des@FreeBSD.org) Message-Id: <201511291427.tATER0lb011244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Sun, 29 Nov 2015 14:27:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291453 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 14:27:01 -0000 Author: des Date: Sun Nov 29 14:26:59 2015 New Revision: 291453 URL: https://svnweb.freebsd.org/changeset/base/291453 Log: Use .netrc for HTTP sites and proxies, not just FTP. PR: 193740 Submitted by: TEUBEL György MFC after: 1 week Modified: head/lib/libfetch/fetch.3 head/lib/libfetch/http.c Modified: head/lib/libfetch/fetch.3 ============================================================================== --- head/lib/libfetch/fetch.3 Sun Nov 29 13:14:45 2015 (r291452) +++ head/lib/libfetch/fetch.3 Sun Nov 29 14:26:59 2015 (r291453) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 25, 2015 +.Dd November 29, 2015 .Dt FETCH 3 .Os .Sh NAME @@ -631,11 +631,11 @@ If defined but empty, no User-Agent head .It Ev NETRC Specifies a file to use instead of .Pa ~/.netrc -to look up login names and passwords for FTP sites. +to look up login names and passwords for FTP and HTTP sites as well as +HTTP proxies. See .Xr ftp 1 for a description of the file format. -This feature is experimental. .It Ev NO_PROXY Either a single asterisk, which disables the use of proxies altogether, or a comma- or whitespace-separated list of hosts for Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Sun Nov 29 13:14:45 2015 (r291452) +++ head/lib/libfetch/http.c Sun Nov 29 14:26:59 2015 (r291453) @@ -1658,6 +1658,9 @@ http_request_body(struct url *URL, const http_seterr(HTTP_NEED_PROXY_AUTH); goto ouch; } + } else if (fetch_netrc_auth(purl) == 0) { + aparams.user = strdup(purl->user); + aparams.password = strdup(purl->pwd); } http_authorize(conn, "Proxy-Authorization", &proxy_challenges, &aparams, url); @@ -1685,6 +1688,11 @@ http_request_body(struct url *URL, const http_seterr(HTTP_NEED_AUTH); goto ouch; } + } else if (fetch_netrc_auth(url) == 0) { + aparams.user = url->user ? + strdup(url->user) : strdup(""); + aparams.password = url->pwd ? + strdup(url->pwd) : strdup(""); } else if (fetchAuthMethod && fetchAuthMethod(url) == 0) { aparams.user = strdup(url->user); From owner-svn-src-all@freebsd.org Sun Nov 29 14:44:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 545B9A3BA84; Sun, 29 Nov 2015 14:44:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28D62103E; Sun, 29 Nov 2015 14:44:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATEif5i017200; Sun, 29 Nov 2015 14:44:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATEifoa017199; Sun, 29 Nov 2015 14:44:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511291444.tATEifoa017199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 29 Nov 2015 14:44:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291454 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 14:44:42 -0000 Author: kib Date: Sun Nov 29 14:44:40 2015 New Revision: 291454 URL: https://svnweb.freebsd.org/changeset/base/291454 Log: MFC r289895: Reduce the amount of calls to VOP_BMAP() made from the local vnode pager. MFC r291157, r291158: Include the pages before/after the requested page, that fit into the reqblock, into the calculation of the size of run of pages. Tested by: pho Modified: stable/10/sys/vm/vnode_pager.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vnode_pager.c ============================================================================== --- stable/10/sys/vm/vnode_pager.c Sun Nov 29 14:26:59 2015 (r291453) +++ stable/10/sys/vm/vnode_pager.c Sun Nov 29 14:44:40 2015 (r291454) @@ -696,26 +696,22 @@ vnode_pager_generic_getpages(vp, m, byte int reqpage; { vm_object_t object; - vm_offset_t kva; - off_t foff, tfoff, nextoff; - int i, j, size, bsize, first; - daddr_t firstaddr, reqblock; struct bufobj *bo; - int runpg; - int runend; struct buf *bp; struct mount *mp; - int count; - int error; - - object = vp->v_object; - count = bytecount / PAGE_SIZE; + vm_offset_t kva; + daddr_t firstaddr, reqblock; + off_t foff, nextoff, tfoff, pib; + int pbefore, pafter, i, size, bsize, first, last; + int count, error, before, after, secmask; KASSERT(vp->v_type != VCHR && vp->v_type != VBLK, ("vnode_pager_generic_getpages does not support devices")); if (vp->v_iflag & VI_DOOMED) - return VM_PAGER_BAD; + return (VM_PAGER_BAD); + object = vp->v_object; + count = bytecount / PAGE_SIZE; bsize = vp->v_mount->mnt_stat.f_iosize; /* get the UNDERLYING device for the file with VOP_BMAP() */ @@ -729,7 +725,8 @@ vnode_pager_generic_getpages(vp, m, byte /* * if we can't bmap, use old VOP code */ - error = VOP_BMAP(vp, foff / bsize, &bo, &reqblock, NULL, NULL); + error = VOP_BMAP(vp, IDX_TO_OFF(m[reqpage]->pindex) / bsize, &bo, + &reqblock, &after, &before); if (error == EOPNOTSUPP) { VM_OBJECT_WLOCK(object); @@ -772,7 +769,7 @@ vnode_pager_generic_getpages(vp, m, byte VM_OBJECT_WUNLOCK(object); PCPU_INC(cnt.v_vnodein); PCPU_INC(cnt.v_vnodepgsin); - return vnode_pager_input_smlfs(object, m[reqpage]); + return (vnode_pager_input_smlfs(object, m[reqpage])); } /* @@ -807,79 +804,40 @@ vnode_pager_generic_getpages(vp, m, byte m[reqpage]->valid = 0; VM_OBJECT_WUNLOCK(object); - /* - * here on direct device I/O - */ - firstaddr = -1; - - /* - * calculate the run that includes the required page - */ - for (first = 0, i = 0; i < count; i = runend) { - if (vnode_pager_addr(vp, IDX_TO_OFF(m[i]->pindex), &firstaddr, - &runpg) != 0) { - VM_OBJECT_WLOCK(object); - for (; i < count; i++) - if (i != reqpage) { - vm_page_lock(m[i]); - vm_page_free(m[i]); - vm_page_unlock(m[i]); - } - VM_OBJECT_WUNLOCK(object); - return (VM_PAGER_ERROR); - } - if (firstaddr == -1) { - VM_OBJECT_WLOCK(object); - if (i == reqpage && foff < object->un_pager.vnp.vnp_size) { - panic("vnode_pager_getpages: unexpected missing page: firstaddr: %jd, foff: 0x%jx%08jx, vnp_size: 0x%jx%08jx", - (intmax_t)firstaddr, (uintmax_t)(foff >> 32), - (uintmax_t)foff, - (uintmax_t) - (object->un_pager.vnp.vnp_size >> 32), - (uintmax_t)object->un_pager.vnp.vnp_size); - } + pib = IDX_TO_OFF(m[reqpage]->pindex) % bsize; + pbefore = ((daddr_t)before * bsize + pib) / PAGE_SIZE; + pafter = ((daddr_t)(after + 1) * bsize - pib) / PAGE_SIZE - 1; + first = reqpage < pbefore ? 0 : reqpage - pbefore; + last = reqpage + pafter >= count ? count - 1 : reqpage + pafter; + if (first > 0 || last + 1 < count) { + VM_OBJECT_WLOCK(object); + for (i = 0; i < first; i++) { vm_page_lock(m[i]); vm_page_free(m[i]); vm_page_unlock(m[i]); - VM_OBJECT_WUNLOCK(object); - runend = i + 1; - first = runend; - continue; } - runend = i + runpg; - if (runend <= reqpage) { - VM_OBJECT_WLOCK(object); - for (j = i; j < runend; j++) { - vm_page_lock(m[j]); - vm_page_free(m[j]); - vm_page_unlock(m[j]); - } - VM_OBJECT_WUNLOCK(object); - } else { - if (runpg < (count - first)) { - VM_OBJECT_WLOCK(object); - for (i = first + runpg; i < count; i++) { - vm_page_lock(m[i]); - vm_page_free(m[i]); - vm_page_unlock(m[i]); - } - VM_OBJECT_WUNLOCK(object); - count = first + runpg; - } - break; + for (i = last + 1; i < count; i++) { + vm_page_lock(m[i]); + vm_page_free(m[i]); + vm_page_unlock(m[i]); } - first = runend; + VM_OBJECT_WUNLOCK(object); } /* - * the first and last page have been calculated now, move input pages - * to be zero based... + * here on direct device I/O */ - if (first != 0) { - m += first; - count -= first; - reqpage -= first; - } + firstaddr = reqblock; + firstaddr += pib / DEV_BSIZE; + firstaddr -= IDX_TO_OFF(reqpage - first) / DEV_BSIZE; + + /* + * The first and last page have been calculated now, move + * input pages to be zero based, and adjust the count. + */ + m += first; + reqpage -= first; + count = last - first + 1; /* * calculate the file virtual address for the transfer @@ -898,13 +856,11 @@ vnode_pager_generic_getpages(vp, m, byte /* * round up physical size for real devices. */ - if (1) { - int secmask = bo->bo_bsize - 1; - KASSERT(secmask < PAGE_SIZE && secmask > 0, - ("vnode_pager_generic_getpages: sector size %d too large", - secmask + 1)); - size = (size + secmask) & ~secmask; - } + secmask = bo->bo_bsize - 1; + KASSERT(secmask < PAGE_SIZE && secmask > 0, + ("vnode_pager_generic_getpages: sector size %d too large", + secmask + 1)); + size = (size + secmask) & ~secmask; bp = getpbuf(&vnode_pbuf_freecnt); kva = (vm_offset_t)bp->b_data; @@ -1040,7 +996,7 @@ vnode_pager_putpages(vm_object_t object, /* * Force synchronous operation if we are extremely low on memory * to prevent a low-memory deadlock. VOP operations often need to - * allocate more memory to initiate the I/O ( i.e. do a BMAP + * allocate more memory to initiate the I/O ( i.e. do a BMAP * operation ). The swapper handles the case by limiting the amount * of asynchronous I/O, but that sort of solution doesn't scale well * for the vnode pager without a lot of work. From owner-svn-src-all@freebsd.org Sun Nov 29 16:28:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 02718A3B89B; Sun, 29 Nov 2015 16:28:42 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD6791030; Sun, 29 Nov 2015 16:28:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATGSeZE046479; Sun, 29 Nov 2015 16:28:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATGSeKm046474; Sun, 29 Nov 2015 16:28:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201511291628.tATGSeKm046474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Nov 2015 16:28:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291455 - in head: etc/mtree lib/libclang_rt lib/libclang_rt/include tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 16:28:42 -0000 Author: dim Date: Sun Nov 29 16:28:40 2015 New Revision: 291455 URL: https://svnweb.freebsd.org/changeset/base/291455 Log: Install the public sanitizer headers. These are useful for programs that want to directly interface with sanitizer internals. Added: head/lib/libclang_rt/include/ head/lib/libclang_rt/include/Makefile (contents, props changed) Modified: head/etc/mtree/BSD.usr.dist head/lib/libclang_rt/Makefile head/lib/libclang_rt/Makefile.inc head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Sun Nov 29 14:44:40 2015 (r291454) +++ head/etc/mtree/BSD.usr.dist Sun Nov 29 16:28:40 2015 (r291455) @@ -21,6 +21,8 @@ clang 3.7.0 include + sanitizer + .. .. lib freebsd Modified: head/lib/libclang_rt/Makefile ============================================================================== --- head/lib/libclang_rt/Makefile Sun Nov 29 14:44:40 2015 (r291454) +++ head/lib/libclang_rt/Makefile Sun Nov 29 16:28:40 2015 (r291455) @@ -3,7 +3,8 @@ .include .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -SUBDIR+= asan\ +SUBDIR+= include\ + asan\ asan-preinit\ asan_cxx\ safestack\ Modified: head/lib/libclang_rt/Makefile.inc ============================================================================== --- head/lib/libclang_rt/Makefile.inc Sun Nov 29 14:44:40 2015 (r291454) +++ head/lib/libclang_rt/Makefile.inc Sun Nov 29 16:28:40 2015 (r291455) @@ -5,7 +5,8 @@ CRTARCH=${MACHINE_CPUARCH:C/amd64/x86_64/} CRTSRC=${.CURDIR}/../../../contrib/compiler-rt -LIBDIR=/usr/lib/clang/3.7.0/lib/freebsd +CLANGDIR=/usr/lib/clang/3.7.0 +LIBDIR=${CLANGDIR}/lib/freebsd NO_PIC= MK_PROFILE=no Added: head/lib/libclang_rt/include/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libclang_rt/include/Makefile Sun Nov 29 16:28:40 2015 (r291455) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.include + +.PATH: ${CRTSRC}/include/sanitizer + +INCSDIR=${CLANGDIR}/include/sanitizer + +INCS= allocator_interface.h\ + asan_interface.h\ + common_interface_defs.h\ + coverage_interface.h\ + dfsan_interface.h\ + linux_syscall_hooks.h\ + lsan_interface.h\ + msan_interface.h\ + tsan_interface_atomic.h + +.include Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 29 14:44:40 2015 (r291454) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Nov 29 16:28:40 2015 (r291455) @@ -1048,6 +1048,16 @@ OLD_FILES+=usr/bin/clang++ OLD_FILES+=usr/bin/clang-cpp OLD_FILES+=usr/bin/clang-tblgen OLD_FILES+=usr/bin/tblgen +OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/3.7.0/include/sanitizer/tsan_interface_atomic.h +OLD_DIRS+=usr/lib/clang/3.7.0/include/sanitizer OLD_FILES+=usr/lib/clang/3.7.0/include/__stddef_max_align_t.h OLD_FILES+=usr/lib/clang/3.7.0/include/__wmmintrin_aes.h OLD_FILES+=usr/lib/clang/3.7.0/include/__wmmintrin_pclmul.h From owner-svn-src-all@freebsd.org Sun Nov 29 17:14:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D9A8A3C5D6; Sun, 29 Nov 2015 17:14:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 489301B5A; Sun, 29 Nov 2015 17:14:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATHE5bR062170; Sun, 29 Nov 2015 17:14:05 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATHE5Ip062169; Sun, 29 Nov 2015 17:14:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511291714.tATHE5Ip062169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 29 Nov 2015 17:14:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291456 - stable/10/sys/dev/ata/chipsets X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 17:14:06 -0000 Author: mav Date: Sun Nov 29 17:14:05 2015 New Revision: 291456 URL: https://svnweb.freebsd.org/changeset/base/291456 Log: MFC r290855: Increase reset assertion time from 10 to 100us. On my own tests I see no effect from this change, but I also can't reproduce the reported problem in general. PR: 127391 PR: 204554 Submitted by: satz@iranger.com Modified: stable/10/sys/dev/ata/chipsets/ata-intel.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/10/sys/dev/ata/chipsets/ata-intel.c Sun Nov 29 16:28:40 2015 (r291455) +++ stable/10/sys/dev/ata/chipsets/ata-intel.c Sun Nov 29 17:14:05 2015 (r291456) @@ -422,7 +422,7 @@ ata_intel_reset(device_t dev) mask |= (1 << smap[1]); pci_write_config(parent, 0x92, pci_read_config(parent, 0x92, 2) & ~mask, 2); - DELAY(10); + DELAY(100); pci_write_config(parent, 0x92, pci_read_config(parent, 0x92, 2) | mask, 2); From owner-svn-src-all@freebsd.org Sun Nov 29 17:14:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2DFFA3C642; Sun, 29 Nov 2015 17:14:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADD891CD4; Sun, 29 Nov 2015 17:14:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATHEkGu062269; Sun, 29 Nov 2015 17:14:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATHEkAc062268; Sun, 29 Nov 2015 17:14:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511291714.tATHEkAc062268@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 29 Nov 2015 17:14:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291457 - stable/9/sys/dev/ata/chipsets X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 17:14:48 -0000 Author: mav Date: Sun Nov 29 17:14:46 2015 New Revision: 291457 URL: https://svnweb.freebsd.org/changeset/base/291457 Log: MFC r290855: Increase reset assertion time from 10 to 100us. On my own tests I see no effect from this change, but I also can't reproduce the reported problem in general. PR: 127391 PR: 204554 Submitted by: satz@iranger.com Modified: stable/9/sys/dev/ata/chipsets/ata-intel.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/9/sys/dev/ata/chipsets/ata-intel.c Sun Nov 29 17:14:05 2015 (r291456) +++ stable/9/sys/dev/ata/chipsets/ata-intel.c Sun Nov 29 17:14:46 2015 (r291457) @@ -494,7 +494,7 @@ ata_intel_reset(device_t dev) mask |= (1 << smap[1]); pci_write_config(parent, 0x92, pci_read_config(parent, 0x92, 2) & ~mask, 2); - DELAY(10); + DELAY(100); pci_write_config(parent, 0x92, pci_read_config(parent, 0x92, 2) | mask, 2); From owner-svn-src-all@freebsd.org Sun Nov 29 17:35:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A87AA3CAB6; Sun, 29 Nov 2015 17:35:55 +0000 (UTC) (envelope-from jason.unovitch@gmail.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ECA1F15B5; Sun, 29 Nov 2015 17:35:54 +0000 (UTC) (envelope-from jason.unovitch@gmail.com) Received: by ioir85 with SMTP id r85so152450352ioi.1; Sun, 29 Nov 2015 09:35:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=bua9HSveQmXB1zOxkw42aYJh4y9u11KN++FqCu1RuOE=; b=ZgW3ItlJnZ6d6WetXPKL6U24I/vcJsPNGMLYdejx1HY0PKDCYiXFqhNKgG+uqHMmEm zPpHF5CfI9IfjKMl82WE2huFZCOr8XJJnk28CiW8BUmczt/62YB5UIcoTbRt0Vo+T34a 2y9rEZHdKrGiTu7WimWwOaSxy/Dl/OoLqJYE6NEafh7U7a558cab8VLxYiuP8xIJ1o3Z 9JcFB+Y7FLWZ6H8kO/qhoGKAxcjK5TWm2F8W++LJ21CqEEQ8a+1Y1/rfhB0Qj64OGFLa FFbqxjkhArP0HD904QLC/Xi1EswTcQfRRaabrq038ewcuM5ygbEoj7dQOyDhAmWauPIO 4zLA== MIME-Version: 1.0 X-Received: by 10.107.130.167 with SMTP id m39mr55739192ioi.18.1448818554359; Sun, 29 Nov 2015 09:35:54 -0800 (PST) Received: by 10.36.43.23 with HTTP; Sun, 29 Nov 2015 09:35:54 -0800 (PST) In-Reply-To: <201511291427.tATER0lb011244@repo.freebsd.org> References: <201511291427.tATER0lb011244@repo.freebsd.org> Date: Sun, 29 Nov 2015 12:35:54 -0500 Message-ID: Subject: Re: svn commit: r291453 - head/lib/libfetch From: Jason Unovitch To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 17:35:55 -0000 On Sun, Nov 29, 2015 at 9:27 AM, Dag-Erling Sm=C3=B8rgrav = wrote: > Author: des > Date: Sun Nov 29 14:26:59 2015 > New Revision: 291453 > URL: https://svnweb.freebsd.org/changeset/base/291453 > > Log: > Use .netrc for HTTP sites and proxies, not just FTP. > > PR: 193740 > Submitted by: TEUBEL Gy=C3=B6rgy > MFC after: 1 week > > Modified: > head/lib/libfetch/fetch.3 > head/lib/libfetch/http.c > Modified: head/lib/libfetch/http.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libfetch/http.c Sun Nov 29 13:14:45 2015 (r291452) > +++ head/lib/libfetch/http.c Sun Nov 29 14:26:59 2015 (r291453) > @@ -1658,6 +1658,9 @@ http_request_body(struct url *URL, const > http_seterr(HTTP_NEED_PROXY_AUTH)= ; > goto ouch; > } > + } else if (fetch_netrc_auth(purl) =3D=3D 0) { > + aparams.user =3D strdup(purl->user); > + aparams.password =3D strdup(purl->pwd); > } > http_authorize(conn, "Proxy-Authorization", > &proxy_challenges, &aparams, url); > @@ -1685,6 +1688,11 @@ http_request_body(struct url *URL, const > http_seterr(HTTP_NEED_AUTH); > goto ouch; > } > + } else if (fetch_netrc_auth(url) =3D=3D 0) { > + aparams.user =3D url->user ? > + strdup(url->user) : strdup(""); > + aparams.password =3D url->pwd ? > + strdup(url->pwd) : strdup(""); > } else if (fetchAuthMethod && > fetchAuthMethod(url) =3D=3D 0) { > aparams.user =3D strdup(url->user); > _______________________________________________ `make buildworld` fails after this commit: /usr/src/head/lib/libfetch/http.c:1692:25: error: address of array 'url->user' will always evaluate to 'true' [-Werro r,-Wpointer-bool-conversion] aparams.user =3D url->user ? ~~~~~^~~~ ~ /usr/src/head/lib/libfetch/http.c:1694:29: error: address of array 'url->pwd' will always evaluate to 'true' [-Werror ,-Wpointer-bool-conversion] aparams.password =3D url->pwd ? From owner-svn-src-all@freebsd.org Sun Nov 29 18:14:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76210A22363; Sun, 29 Nov 2015 18:14:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AEB3189F; Sun, 29 Nov 2015 18:14:19 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATIEJF7079799; Sun, 29 Nov 2015 18:14:19 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATIEJP5079798; Sun, 29 Nov 2015 18:14:19 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511291814.tATIEJP5079798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 29 Nov 2015 18:14:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291458 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 18:14:20 -0000 Author: adrian Date: Sun Nov 29 18:14:18 2015 New Revision: 291458 URL: https://svnweb.freebsd.org/changeset/base/291458 Log: add missing initvals. Sorry y'all. Added: head/sys/contrib/dev/ath/ath_hal/ar9300/ar953x.ini Added: head/sys/contrib/dev/ath/ath_hal/ar9300/ar953x.ini ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar953x.ini Sun Nov 29 18:14:18 2015 (r291458) @@ -0,0 +1,1420 @@ +/* + * Copyright (c) 2013 Qualcomm Atheros Inc. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ + +#define INI_VERSION_AR953X "$Id$" +static const u_int32_t qca953xCommon_wo_xlna_rx_gain_bounds_honeybee_1p0[][5] = { +/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + { 0x00009e44, 0xfe321e27, 0xfe321e27, 0xfe291e27, 0xfe291e27 }, + { 0x00009e48, 0x5030201a, 0x5030201a, 0x50302012, 0x50302012 }, +}; + +static const u_int32_t qca953x_honeybee_1p0_mac_postamble_emulation[][5] = { +/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + { 0x00008014, 0x10f810f8, 0x10f810f8, 0x10f810f8, 0x10f810f8 }, + { 0x0000801c, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017, 0x0e8d8017 }, +}; + +static const u_int32_t qca953x_honeybee_1p0_tx_gain_table_baseband_postamble_emulation[][5] = { +/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + { 0x0000a410, 0x000000d5, 0x000000d5, 0x000000d5, 0x000000d5 }, + { 0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x0000a504, 0x00004002, 0x00004002, 0x00004002, 0x00004002 }, + { 0x0000a508, 0x00008004, 0x00008004, 0x00008004, 0x00008004 }, + { 0x0000a510, 0x0001000c, 0x0001000c, 0x0001000c, 0x0001000c }, + { 0x0000a514, 0x0001420b, 0x0001420b, 0x0001420b, 0x0001420b }, + { 0x0000a518, 0x0001824a, 0x0001824a, 0x0001824a, 0x0001824a }, + { 0x0000a51c, 0x0001c44a, 0x0001c44a, 0x0001c44a, 0x0001c44a }, + { 0x0000a520, 0x0002064a, 0x0002064a, 0x0002064a, 0x0002064a }, + { 0x0000a524, 0x0002484a, 0x0002484a, 0x0002484a, 0x0002484a }, + { 0x0000a528, 0x00028a4a, 0x00028a4a, 0x00028a4a, 0x00028a4a }, + { 0x0000a52c, 0x00030e4a, 0x00030e4a, 0x00030e4a, 0x00030e4a }, + { 0x0000a530, 0x00030e4a, 0x00030e4a, 0x00030e4a, 0x00030e4a }, + { 0x0000a534, 0x00034e8a, 0x00034e8a, 0x00034e8a, 0x00034e8a }, +}; + +static const u_int32_t qca953xModes_no_xpa_tx_gain_table_honeybee_1p1[][2] = { +/* Addr allmodes */ + { 0x0000a2dc, 0xffd5f552 }, + { 0x0000a2e0, 0xffe60664 }, + { 0x0000a2e4, 0xfff80780 }, + { 0x0000a2e8, 0xfffff800 }, + { 0x0000a410, 0x000050de }, + { 0x0000a500, 0x00000061 }, + { 0x0000a504, 0x04000063 }, + { 0x0000a508, 0x08000065 }, + { 0x0000a50c, 0x0c000261 }, + { 0x0000a510, 0x10000263 }, + { 0x0000a514, 0x14000265 }, + { 0x0000a518, 0x18000482 }, + { 0x0000a51c, 0x1b000484 }, + { 0x0000a520, 0x1f000486 }, + { 0x0000a524, 0x240008c2 }, + { 0x0000a528, 0x28000cc1 }, + { 0x0000a52c, 0x2d000ce3 }, + { 0x0000a530, 0x31000ce5 }, + { 0x0000a534, 0x350010e5 }, + { 0x0000a538, 0x360012e5 }, + { 0x0000a53c, 0x380014e5 }, + { 0x0000a540, 0x3b0018e5 }, + { 0x0000a544, 0x3d001d04 }, + { 0x0000a548, 0x3e001d05 }, + { 0x0000a54c, 0x40001d07 }, + { 0x0000a550, 0x42001f27 }, + { 0x0000a554, 0x43001f67 }, + { 0x0000a558, 0x46001fe7 }, + { 0x0000a55c, 0x47001f2b }, + { 0x0000a560, 0x49001f0d }, + { 0x0000a564, 0x4b001ed2 }, + { 0x0000a568, 0x4c001ed4 }, + { 0x0000a56c, 0x4e001f15 }, + { 0x0000a570, 0x4f001ff6 }, + { 0x0000a574, 0x4f001ff6 }, + { 0x0000a578, 0x4f001ff6 }, + { 0x0000a57c, 0x4f001ff6 }, + { 0x0000a600, 0x00000000 }, + { 0x0000a604, 0x00000000 }, + { 0x0000a608, 0x00000000 }, + { 0x0000a60c, 0x00804201 }, + { 0x0000a610, 0x01008201 }, + { 0x0000a614, 0x0180c402 }, + { 0x0000a618, 0x0180c603 }, + { 0x0000a61c, 0x0180c603 }, + { 0x0000a620, 0x01c10603 }, + { 0x0000a624, 0x01c10704 }, + { 0x0000a628, 0x02c18b05 }, + { 0x0000a62c, 0x02c14c07 }, + { 0x0000a630, 0x01008704 }, + { 0x0000a634, 0x01c10402 }, + { 0x0000a638, 0x0301cc07 }, + { 0x0000a63c, 0x0301cc07 }, + { 0x0000b2dc, 0xffd5f552 }, + { 0x0000b2e0, 0xffe60664 }, + { 0x0000b2e4, 0xfff80780 }, + { 0x0000b2e8, 0xfffff800 }, + { 0x00016044, 0x049242db }, + { 0x00016048, 0x6c927a70 }, + { 0x00016444, 0x049242db }, + { 0x00016448, 0x6c927a70 }, +}; + +static const u_int32_t qca953x_honeybee_1p0_baseband_postamble_emulation[][5] = { +/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + { 0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, + { 0x00009e3c, 0xcfa10821, 0xcfa10821, 0xcfa10821, 0xcfa10821 }, + { 0x00009e44, 0x005c0000, 0x005c0000, 0x005c0000, 0x005c0000 }, + { 0x0000a258, 0x02020200, 0x02020200, 0x02020200, 0x02020200 }, + { 0x0000a25c, 0x00000e0e, 0x00000e0e, 0x00000e0e, 0x00000e0e }, + { 0x0000a28c, 0x00011111, 0x00011111, 0x00011111, 0x00011111 }, + { 0x0000a2c4, 0x00148d18, 0x00148d18, 0x00148d20, 0x00148d20 }, + { 0x0000a2d8, 0xf999a801, 0xf999a801, 0xf999a80d, 0xf999a80d }, + { 0x0000a50c, 0x0000c00a, 0x0000c00a, 0x0000c00a, 0x0000c00a }, + { 0x0000a538, 0x00038e8c, 0x00038e8c, 0x00038e8c, 0x00038e8c }, + { 0x0000a53c, 0x0003cecc, 0x0003cecc, 0x0003cecc, 0x0003cecc }, + { 0x0000a540, 0x00040ed4, 0x00040ed4, 0x00040ed4, 0x00040ed4 }, + { 0x0000a544, 0x00044edc, 0x00044edc, 0x00044edc, 0x00044edc }, + { 0x0000a548, 0x00048ede, 0x00048ede, 0x00048ede, 0x00048ede }, + { 0x0000a54c, 0x0004cf1e, 0x0004cf1e, 0x0004cf1e, 0x0004cf1e }, + { 0x0000a550, 0x00050f5e, 0x00050f5e, 0x00050f5e, 0x00050f5e }, + { 0x0000a554, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e }, + { 0x0000a558, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e }, + { 0x0000a55c, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e }, + { 0x0000a560, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e }, + { 0x0000a564, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e }, + { 0x0000a568, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e }, + { 0x0000a56c, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e }, + { 0x0000a570, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e }, + { 0x0000a574, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e }, + { 0x0000a578, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e }, + { 0x0000a57c, 0x00054f9e, 0x00054f9e, 0x00054f9e, 0x00054f9e }, + { 0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, +}; + +static const u_int32_t qca953xCommon_wo_xlna_rx_gain_table_honeybee_1p0[][2] = { +/* Addr allmodes */ + { 0x0000a000, 0x00010000 }, + { 0x0000a004, 0x00030002 }, + { 0x0000a008, 0x00050004 }, + { 0x0000a00c, 0x00810080 }, + { 0x0000a010, 0x00830082 }, + { 0x0000a014, 0x01810180 }, + { 0x0000a018, 0x01830182 }, + { 0x0000a01c, 0x01850184 }, + { 0x0000a020, 0x01890188 }, + { 0x0000a024, 0x018b018a }, + { 0x0000a028, 0x018d018c }, + { 0x0000a02c, 0x03820190 }, + { 0x0000a030, 0x03840383 }, + { 0x0000a034, 0x03880385 }, + { 0x0000a038, 0x038a0389 }, + { 0x0000a03c, 0x038c038b }, + { 0x0000a040, 0x0390038d }, + { 0x0000a044, 0x03920391 }, + { 0x0000a048, 0x03940393 }, + { 0x0000a04c, 0x03960395 }, + { 0x0000a050, 0x00000000 }, + { 0x0000a054, 0x00000000 }, + { 0x0000a058, 0x00000000 }, + { 0x0000a05c, 0x00000000 }, + { 0x0000a060, 0x00000000 }, + { 0x0000a064, 0x00000000 }, + { 0x0000a068, 0x00000000 }, + { 0x0000a06c, 0x00000000 }, + { 0x0000a070, 0x00000000 }, + { 0x0000a074, 0x00000000 }, + { 0x0000a078, 0x00000000 }, + { 0x0000a07c, 0x00000000 }, + { 0x0000a080, 0x29292929 }, + { 0x0000a084, 0x29292929 }, + { 0x0000a088, 0x29292929 }, + { 0x0000a08c, 0x29292929 }, + { 0x0000a090, 0x22292929 }, + { 0x0000a094, 0x1d1d2222 }, + { 0x0000a098, 0x0c111117 }, + { 0x0000a09c, 0x00030303 }, + { 0x0000a0a0, 0x00000000 }, + { 0x0000a0a4, 0x00000000 }, + { 0x0000a0a8, 0x00000000 }, + { 0x0000a0ac, 0x00000000 }, + { 0x0000a0b0, 0x00000000 }, + { 0x0000a0b4, 0x00000000 }, + { 0x0000a0b8, 0x00000000 }, + { 0x0000a0bc, 0x00000000 }, + { 0x0000a0c0, 0x001f0000 }, + { 0x0000a0c4, 0x01000101 }, + { 0x0000a0c8, 0x011e011f }, + { 0x0000a0cc, 0x011c011d }, + { 0x0000a0d0, 0x02030204 }, + { 0x0000a0d4, 0x02010202 }, + { 0x0000a0d8, 0x021f0200 }, + { 0x0000a0dc, 0x0302021e }, + { 0x0000a0e0, 0x03000301 }, + { 0x0000a0e4, 0x031e031f }, + { 0x0000a0e8, 0x0402031d }, + { 0x0000a0ec, 0x04000401 }, + { 0x0000a0f0, 0x041e041f }, + { 0x0000a0f4, 0x0502041d }, + { 0x0000a0f8, 0x05000501 }, + { 0x0000a0fc, 0x051e051f }, + { 0x0000a100, 0x06010602 }, + { 0x0000a104, 0x061f0600 }, + { 0x0000a108, 0x061d061e }, + { 0x0000a10c, 0x07020703 }, + { 0x0000a110, 0x07000701 }, + { 0x0000a114, 0x00000000 }, + { 0x0000a118, 0x00000000 }, + { 0x0000a11c, 0x00000000 }, + { 0x0000a120, 0x00000000 }, + { 0x0000a124, 0x00000000 }, + { 0x0000a128, 0x00000000 }, + { 0x0000a12c, 0x00000000 }, + { 0x0000a130, 0x00000000 }, + { 0x0000a134, 0x00000000 }, + { 0x0000a138, 0x00000000 }, + { 0x0000a13c, 0x00000000 }, + { 0x0000a140, 0x001f0000 }, + { 0x0000a144, 0x01000101 }, + { 0x0000a148, 0x011e011f }, + { 0x0000a14c, 0x011c011d }, + { 0x0000a150, 0x02030204 }, + { 0x0000a154, 0x02010202 }, + { 0x0000a158, 0x021f0200 }, + { 0x0000a15c, 0x0302021e }, + { 0x0000a160, 0x03000301 }, + { 0x0000a164, 0x031e031f }, + { 0x0000a168, 0x0402031d }, + { 0x0000a16c, 0x04000401 }, + { 0x0000a170, 0x041e041f }, + { 0x0000a174, 0x0502041d }, + { 0x0000a178, 0x05000501 }, + { 0x0000a17c, 0x051e051f }, + { 0x0000a180, 0x06010602 }, + { 0x0000a184, 0x061f0600 }, + { 0x0000a188, 0x061d061e }, + { 0x0000a18c, 0x07020703 }, + { 0x0000a190, 0x07000701 }, + { 0x0000a194, 0x00000000 }, + { 0x0000a198, 0x00000000 }, + { 0x0000a19c, 0x00000000 }, + { 0x0000a1a0, 0x00000000 }, + { 0x0000a1a4, 0x00000000 }, + { 0x0000a1a8, 0x00000000 }, + { 0x0000a1ac, 0x00000000 }, + { 0x0000a1b0, 0x00000000 }, + { 0x0000a1b4, 0x00000000 }, + { 0x0000a1b8, 0x00000000 }, + { 0x0000a1bc, 0x00000000 }, + { 0x0000a1c0, 0x00000000 }, + { 0x0000a1c4, 0x00000000 }, + { 0x0000a1c8, 0x00000000 }, + { 0x0000a1cc, 0x00000000 }, + { 0x0000a1d0, 0x00000000 }, + { 0x0000a1d4, 0x00000000 }, + { 0x0000a1d8, 0x00000000 }, + { 0x0000a1dc, 0x00000000 }, + { 0x0000a1e0, 0x00000000 }, + { 0x0000a1e4, 0x00000000 }, + { 0x0000a1e8, 0x00000000 }, + { 0x0000a1ec, 0x00000000 }, + { 0x0000a1f0, 0x00000396 }, + { 0x0000a1f4, 0x00000396 }, + { 0x0000a1f8, 0x00000396 }, + { 0x0000a1fc, 0x00000196 }, + { 0x0000b000, 0x00010000 }, + { 0x0000b004, 0x00030002 }, + { 0x0000b008, 0x00050004 }, + { 0x0000b00c, 0x00810080 }, + { 0x0000b010, 0x00830082 }, + { 0x0000b014, 0x01810180 }, + { 0x0000b018, 0x01830182 }, + { 0x0000b01c, 0x01850184 }, + { 0x0000b020, 0x02810280 }, + { 0x0000b024, 0x02830282 }, + { 0x0000b028, 0x02850284 }, + { 0x0000b02c, 0x02890288 }, + { 0x0000b030, 0x028b028a }, + { 0x0000b034, 0x0388028c }, + { 0x0000b038, 0x038a0389 }, + { 0x0000b03c, 0x038c038b }, + { 0x0000b040, 0x0390038d }, + { 0x0000b044, 0x03920391 }, + { 0x0000b048, 0x03940393 }, + { 0x0000b04c, 0x03960395 }, + { 0x0000b050, 0x00000000 }, + { 0x0000b054, 0x00000000 }, + { 0x0000b058, 0x00000000 }, + { 0x0000b05c, 0x00000000 }, + { 0x0000b060, 0x00000000 }, + { 0x0000b064, 0x00000000 }, + { 0x0000b068, 0x00000000 }, + { 0x0000b06c, 0x00000000 }, + { 0x0000b070, 0x00000000 }, + { 0x0000b074, 0x00000000 }, + { 0x0000b078, 0x00000000 }, + { 0x0000b07c, 0x00000000 }, + { 0x0000b080, 0x32323232 }, + { 0x0000b084, 0x2f2f3232 }, + { 0x0000b088, 0x23282a2d }, + { 0x0000b08c, 0x1c1e2123 }, + { 0x0000b090, 0x14171919 }, + { 0x0000b094, 0x0e0e1214 }, + { 0x0000b098, 0x03050707 }, + { 0x0000b09c, 0x00030303 }, + { 0x0000b0a0, 0x00000000 }, + { 0x0000b0a4, 0x00000000 }, + { 0x0000b0a8, 0x00000000 }, + { 0x0000b0ac, 0x00000000 }, + { 0x0000b0b0, 0x00000000 }, + { 0x0000b0b4, 0x00000000 }, + { 0x0000b0b8, 0x00000000 }, + { 0x0000b0bc, 0x00000000 }, + { 0x0000b0c0, 0x003f0020 }, + { 0x0000b0c4, 0x00400041 }, + { 0x0000b0c8, 0x0140005f }, + { 0x0000b0cc, 0x0160015f }, + { 0x0000b0d0, 0x017e017f }, + { 0x0000b0d4, 0x02410242 }, + { 0x0000b0d8, 0x025f0240 }, + { 0x0000b0dc, 0x027f0260 }, + { 0x0000b0e0, 0x0341027e }, + { 0x0000b0e4, 0x035f0340 }, + { 0x0000b0e8, 0x037f0360 }, + { 0x0000b0ec, 0x04400441 }, + { 0x0000b0f0, 0x0460045f }, + { 0x0000b0f4, 0x0541047f }, + { 0x0000b0f8, 0x055f0540 }, + { 0x0000b0fc, 0x057f0560 }, + { 0x0000b100, 0x06400641 }, + { 0x0000b104, 0x0660065f }, + { 0x0000b108, 0x067e067f }, + { 0x0000b10c, 0x07410742 }, + { 0x0000b110, 0x075f0740 }, + { 0x0000b114, 0x077f0760 }, + { 0x0000b118, 0x07800781 }, + { 0x0000b11c, 0x07a0079f }, + { 0x0000b120, 0x07c107bf }, + { 0x0000b124, 0x000007c0 }, + { 0x0000b128, 0x00000000 }, + { 0x0000b12c, 0x00000000 }, + { 0x0000b130, 0x00000000 }, + { 0x0000b134, 0x00000000 }, + { 0x0000b138, 0x00000000 }, + { 0x0000b13c, 0x00000000 }, + { 0x0000b140, 0x003f0020 }, + { 0x0000b144, 0x00400041 }, + { 0x0000b148, 0x0140005f }, + { 0x0000b14c, 0x0160015f }, + { 0x0000b150, 0x017e017f }, + { 0x0000b154, 0x02410242 }, + { 0x0000b158, 0x025f0240 }, + { 0x0000b15c, 0x027f0260 }, + { 0x0000b160, 0x0341027e }, + { 0x0000b164, 0x035f0340 }, + { 0x0000b168, 0x037f0360 }, + { 0x0000b16c, 0x04400441 }, + { 0x0000b170, 0x0460045f }, + { 0x0000b174, 0x0541047f }, + { 0x0000b178, 0x055f0540 }, + { 0x0000b17c, 0x057f0560 }, + { 0x0000b180, 0x06400641 }, + { 0x0000b184, 0x0660065f }, + { 0x0000b188, 0x067e067f }, + { 0x0000b18c, 0x07410742 }, + { 0x0000b190, 0x075f0740 }, + { 0x0000b194, 0x077f0760 }, + { 0x0000b198, 0x07800781 }, + { 0x0000b19c, 0x07a0079f }, + { 0x0000b1a0, 0x07c107bf }, + { 0x0000b1a4, 0x000007c0 }, + { 0x0000b1a8, 0x00000000 }, + { 0x0000b1ac, 0x00000000 }, + { 0x0000b1b0, 0x00000000 }, + { 0x0000b1b4, 0x00000000 }, + { 0x0000b1b8, 0x00000000 }, + { 0x0000b1bc, 0x00000000 }, + { 0x0000b1c0, 0x00000000 }, + { 0x0000b1c4, 0x00000000 }, + { 0x0000b1c8, 0x00000000 }, + { 0x0000b1cc, 0x00000000 }, + { 0x0000b1d0, 0x00000000 }, + { 0x0000b1d4, 0x00000000 }, + { 0x0000b1d8, 0x00000000 }, + { 0x0000b1dc, 0x00000000 }, + { 0x0000b1e0, 0x00000000 }, + { 0x0000b1e4, 0x00000000 }, + { 0x0000b1e8, 0x00000000 }, + { 0x0000b1ec, 0x00000000 }, + { 0x0000b1f0, 0x00000396 }, + { 0x0000b1f4, 0x00000396 }, + { 0x0000b1f8, 0x00000396 }, + { 0x0000b1fc, 0x00000196 }, +}; + +static const u_int32_t qca953xModes_no_xpa_low_power_tx_gain_table_honeybee_1p1[][2] = { +/* Addr allmodes */ + { 0x0000a2dc, 0xfff55592 }, + { 0x0000a2e0, 0xfff99924 }, + { 0x0000a2e4, 0xfffe1e00 }, + { 0x0000a2e8, 0xffffe000 }, + { 0x0000a410, 0x000050d6 }, + { 0x0000a500, 0x00000069 }, + { 0x0000a504, 0x0400006b }, + { 0x0000a508, 0x0800006d }, + { 0x0000a50c, 0x0c000269 }, + { 0x0000a510, 0x1000026b }, + { 0x0000a514, 0x1400026d }, + { 0x0000a518, 0x18000669 }, + { 0x0000a51c, 0x1c00066b }, + { 0x0000a520, 0x1d000a68 }, + { 0x0000a524, 0x21000a6a }, + { 0x0000a528, 0x25000a6c }, + { 0x0000a52c, 0x29000a6e }, + { 0x0000a530, 0x2d0012a9 }, + { 0x0000a534, 0x310012ab }, + { 0x0000a538, 0x350012ad }, + { 0x0000a53c, 0x39001b0a }, + { 0x0000a540, 0x3d001b0c }, + { 0x0000a544, 0x41001b0e }, + { 0x0000a548, 0x43001bae }, + { 0x0000a54c, 0x45001914 }, + { 0x0000a550, 0x47001916 }, + { 0x0000a554, 0x49001b96 }, + { 0x0000a558, 0x49001b96 }, + { 0x0000a55c, 0x49001b96 }, + { 0x0000a560, 0x49001b96 }, + { 0x0000a564, 0x49001b96 }, + { 0x0000a568, 0x49001b96 }, + { 0x0000a56c, 0x49001b96 }, + { 0x0000a570, 0x49001b96 }, + { 0x0000a574, 0x49001b96 }, + { 0x0000a578, 0x49001b96 }, + { 0x0000a57c, 0x49001b96 }, + { 0x0000a600, 0x00000000 }, + { 0x0000a604, 0x00000000 }, + { 0x0000a608, 0x00000000 }, + { 0x0000a60c, 0x00000000 }, + { 0x0000a610, 0x00000000 }, + { 0x0000a614, 0x00000000 }, + { 0x0000a618, 0x00804201 }, + { 0x0000a61c, 0x01408201 }, + { 0x0000a620, 0x01408502 }, + { 0x0000a624, 0x01408502 }, + { 0x0000a628, 0x01408502 }, + { 0x0000a62c, 0x01408502 }, + { 0x0000a630, 0x01408502 }, + { 0x0000a634, 0x01408502 }, + { 0x0000a638, 0x01408502 }, + { 0x0000a63c, 0x01408502 }, + { 0x0000b2dc, 0xfff55592 }, + { 0x0000b2e0, 0xfff99924 }, + { 0x0000b2e4, 0xfffe1e00 }, + { 0x0000b2e8, 0xffffe000 }, + { 0x00016044, 0x044922db }, + { 0x00016048, 0x6c927a70 }, + { 0x00016444, 0x044922db }, + { 0x00016448, 0x6c927a70 }, +}; + +static const u_int32_t qca953xModes_fast_clock_honeybee_1p0[][3] = { +/* Addr 5G_HT20 5G_HT40 */ + { 0x00001030, 0x00000268, 0x000004d0 }, + { 0x00001070, 0x0000018c, 0x00000318 }, + { 0x000010b0, 0x00000fd0, 0x00001fa0 }, + { 0x00008014, 0x044c044c, 0x08980898 }, + { 0x0000801c, 0x148ec02b, 0x148ec057 }, + { 0x00008318, 0x000044c0, 0x00008980 }, + { 0x00009e00, 0x0372131c, 0x0372131c }, + { 0x0000a230, 0x0000000b, 0x00000016 }, + { 0x0000a254, 0x00000898, 0x00001130 }, +}; + +static const u_int32_t qca953xCommon_rx_gain_bounds_honeybee_1p0[][5] = { +/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + { 0x00009e44, 0xfe321e27, 0xfe321e27, 0xfe291e27, 0xfe291e27 }, + { 0x00009e48, 0x5030201a, 0x5030201a, 0x50302018, 0x50302018 }, +}; + +static const u_int32_t qca953x_honeybee_1p0_baseband_core[][2] = { +/* Addr allmodes */ + { 0x00009800, 0xafe68e30 }, + { 0x00009804, 0xfd14e000 }, + { 0x00009808, 0x9c0a9f6b }, + { 0x0000980c, 0x04900000 }, + { 0x00009814, 0x0280c00a }, + { 0x00009818, 0x00000000 }, + { 0x0000981c, 0x00020028 }, + { 0x00009834, 0x6400a190 }, + { 0x00009838, 0x0108ecff }, + { 0x0000983c, 0x14000600 }, + { 0x00009880, 0x201fff00 }, + { 0x00009884, 0x00001042 }, + { 0x000098a4, 0x00200400 }, + { 0x000098b0, 0x32840bbe }, + { 0x000098bc, 0x00000002 }, + { 0x000098d0, 0x004b6a8e }, + { 0x000098d4, 0x00000820 }, + { 0x000098dc, 0x00000000 }, + { 0x000098f0, 0x00000000 }, + { 0x000098f4, 0x00000000 }, + { 0x00009c04, 0xff55ff55 }, + { 0x00009c08, 0x0320ff55 }, + { 0x00009c0c, 0x00000000 }, + { 0x00009c10, 0x00000000 }, + { 0x00009c14, 0x00046384 }, + { 0x00009c18, 0x05b6b440 }, + { 0x00009c1c, 0x00b6b440 }, + { 0x00009d00, 0xc080a333 }, + { 0x00009d04, 0x40206c10 }, + { 0x00009d08, 0x009c4060 }, + { 0x00009d0c, 0x9883800a }, + { 0x00009d10, 0x01884061 }, + { 0x00009d14, 0x00c0040b }, + { 0x00009d18, 0x00000000 }, + { 0x00009e08, 0x0038230c }, + { 0x00009e24, 0x990bb515 }, + { 0x00009e28, 0x0c6f0000 }, + { 0x00009e30, 0x06336f77 }, + { 0x00009e34, 0x6af6532f }, + { 0x00009e38, 0x0cc80c00 }, + { 0x00009e40, 0x0d261820 }, + { 0x00009e4c, 0x00001004 }, + { 0x00009e50, 0x00ff03f1 }, + { 0x00009fc0, 0x813e4788 }, + { 0x00009fc4, 0x0001efb5 }, + { 0x00009fcc, 0x40000014 }, + { 0x00009fd0, 0x01193b91 }, + { 0x0000a20c, 0x00000000 }, + { 0x0000a220, 0x00000000 }, + { 0x0000a224, 0x00000000 }, + { 0x0000a228, 0x10002310 }, + { 0x0000a23c, 0x00000000 }, + { 0x0000a244, 0x0c000000 }, + { 0x0000a248, 0x00000140 }, + { 0x0000a2a0, 0x00000007 }, + { 0x0000a2c0, 0x00000007 }, + { 0x0000a2c8, 0x00000000 }, + { 0x0000a2d4, 0x00000000 }, + { 0x0000a2ec, 0x00000000 }, + { 0x0000a2f0, 0x00000000 }, + { 0x0000a2f4, 0x00000000 }, + { 0x0000a2f8, 0x00000000 }, + { 0x0000a344, 0x00000000 }, + { 0x0000a34c, 0x00000000 }, + { 0x0000a350, 0x0000a000 }, + { 0x0000a364, 0x00000000 }, + { 0x0000a370, 0x00000000 }, + { 0x0000a390, 0x00000001 }, + { 0x0000a394, 0x00000444 }, + { 0x0000a398, 0x1f020503 }, + { 0x0000a39c, 0x29180c03 }, + { 0x0000a3a0, 0x9a8b6844 }, + { 0x0000a3a4, 0x000000ff }, + { 0x0000a3a8, 0x6a6a6a6a }, + { 0x0000a3ac, 0x6a6a6a6a }, + { 0x0000a3b0, 0x00c8641a }, + { 0x0000a3b4, 0x0000001a }, + { 0x0000a3b8, 0x0088642a }, + { 0x0000a3bc, 0x000001fa }, + { 0x0000a3c0, 0x20202020 }, + { 0x0000a3c4, 0x22222220 }, + { 0x0000a3c8, 0x20200020 }, + { 0x0000a3cc, 0x20202020 }, + { 0x0000a3d0, 0x20202020 }, + { 0x0000a3d4, 0x20202020 }, + { 0x0000a3d8, 0x20202020 }, + { 0x0000a3dc, 0x20202020 }, + { 0x0000a3e0, 0x20202020 }, + { 0x0000a3e4, 0x20202020 }, + { 0x0000a3e8, 0x20202020 }, + { 0x0000a3ec, 0x20202020 }, + { 0x0000a3f0, 0x00000000 }, + { 0x0000a3f4, 0x00000000 }, + { 0x0000a3f8, 0x0c9bd380 }, + { 0x0000a3fc, 0x000f0f01 }, + { 0x0000a400, 0x8fa91f01 }, + { 0x0000a404, 0x00000000 }, + { 0x0000a408, 0x0e79e5c6 }, + { 0x0000a40c, 0x00820820 }, + { 0x0000a414, 0x1ce42108 }, + { 0x0000a418, 0x2d001dce }, + { 0x0000a41c, 0x1ce73908 }, + { 0x0000a420, 0x000001ce }, + { 0x0000a424, 0x1ce738e7 }, + { 0x0000a428, 0x000001ce }, + { 0x0000a42c, 0x1ce739ce }, + { 0x0000a430, 0x1ce739ce }, + { 0x0000a434, 0x00000000 }, + { 0x0000a438, 0x00001801 }, + { 0x0000a43c, 0x00100000 }, + { 0x0000a444, 0x00000000 }, + { 0x0000a448, 0x05000080 }, + { 0x0000a44c, 0x00000001 }, + { 0x0000a450, 0x00010000 }, + { 0x0000a458, 0x00000000 }, + { 0x0000a644, 0xbfad9d74 }, + { 0x0000a648, 0x0048060a }, + { 0x0000a64c, 0x00003c37 }, + { 0x0000a670, 0x03020100 }, + { 0x0000a674, 0x09080504 }, + { 0x0000a678, 0x0d0c0b0a }, + { 0x0000a67c, 0x13121110 }, + { 0x0000a680, 0x31301514 }, + { 0x0000a684, 0x35343332 }, + { 0x0000a688, 0x00000036 }, + { 0x0000a690, 0x08000838 }, + { 0x0000a7cc, 0x00000000 }, + { 0x0000a7d0, 0x00000000 }, + { 0x0000a7d4, 0x00000004 }, + { 0x0000a7dc, 0x00000000 }, + { 0x0000a8d0, 0x004b6a8e }, + { 0x0000a8d4, 0x00000820 }, + { 0x0000a8dc, 0x00000000 }, + { 0x0000a8f0, 0x00000000 }, + { 0x0000a8f4, 0x00000000 }, + { 0x0000b2d0, 0x00000080 }, + { 0x0000b2d4, 0x00000000 }, + { 0x0000b2ec, 0x00000000 }, + { 0x0000b2f0, 0x00000000 }, + { 0x0000b2f4, 0x00000000 }, + { 0x0000b2f8, 0x00000000 }, + { 0x0000b408, 0x0e79e5c0 }, + { 0x0000b40c, 0x00820820 }, + { 0x0000b420, 0x00000000 }, +}; + +static const u_int32_t qca953x_honeybee_1p0_radio_postamble[][5] = { +/* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */ + { 0x00016098, 0xd2dd5554, 0xd2dd5554, 0xc4128f5c, 0xc4128f5c }, + { 0x0001609c, 0x0a566f3a, 0x0a566f3a, 0x0fd08f25, 0x0fd08f25 }, + { 0x000160ac, 0xa4647c00, 0xa4647c00, 0x24646800, 0x24646800 }, + { 0x000160b0, 0x01885f52, 0x01885f52, 0x00fe7f46, 0x00fe7f46 }, + { 0x00016104, 0xb7a00001, 0xb7a00001, 0xfff80005, 0xfff80005 }, + { 0x0001610c, 0xc0000000, 0xc0000000, 0x00000000, 0x00000000 }, + { 0x00016140, 0x10804008, 0x10804008, 0x50804000, 0x50804000 }, + { 0x00016504, 0xb7a00001, 0xb7a00001, 0xfff80001, 0xfff80001 }, + { 0x0001650c, 0xc0000000, 0xc0000000, 0x00000000, 0x00000000 }, + { 0x00016540, 0x10804008, 0x10804008, 0x50804000, 0x50804000 }, +}; + +static const u_int32_t qca953x_honeybee_1p0_radio_core[][2] = { +/* Addr allmodes */ + { 0x00016000, 0x36db6db6 }, + { 0x00016004, 0x6db6db40 }, + { 0x00016008, 0x73f00000 }, + { 0x0001600c, 0x00000000 }, + { 0x00016040, 0x3f80fff8 }, + { 0x0001604c, 0x000f0278 }, + { 0x00016050, 0x8036db6c }, + { 0x00016054, 0x6db60000 }, + { 0x00016080, 0x00080000 }, + { 0x00016084, 0x0e48048c }, + { 0x00016088, 0x14214514 }, + { 0x0001608c, 0x119f080a }, + { 0x00016090, 0x24926490 }, + { 0x00016094, 0x00000000 }, + { 0x000160a0, 0xc2108ffe }, + { 0x000160a4, 0x812fc370 }, + { 0x000160a8, 0x423c8000 }, + { 0x000160b4, 0x92480080 }, + { 0x000160c0, 0x006db6d8 }, + { 0x000160c4, 0x24b6db6c }, + { 0x000160c8, 0x6db6db6c }, + { 0x000160cc, 0x6db6fb7c }, + { 0x000160d0, 0x6db6da44 }, + { 0x00016100, 0x07ff8001 }, + { 0x00016108, 0x00080010 }, + { 0x00016144, 0x01884080 }, + { 0x00016148, 0x000080d8 }, + { 0x00016280, 0x01000901 }, + { 0x00016284, 0x15d30000 }, + { 0x00016288, 0x00318000 }, + { 0x0001628c, 0x50000000 }, + { 0x00016380, 0x00000000 }, + { 0x00016384, 0x00000000 }, + { 0x00016388, 0x00800700 }, + { 0x0001638c, 0x00800700 }, + { 0x00016390, 0x00800700 }, + { 0x00016394, 0x00000000 }, + { 0x00016398, 0x00000000 }, + { 0x0001639c, 0x00000000 }, + { 0x000163a0, 0x00000001 }, + { 0x000163a4, 0x00000001 }, + { 0x000163a8, 0x00000000 }, + { 0x000163ac, 0x00000000 }, + { 0x000163b0, 0x00000000 }, + { 0x000163b4, 0x00000000 }, + { 0x000163b8, 0x00000000 }, + { 0x000163bc, 0x00000000 }, + { 0x000163c0, 0x000000a0 }, + { 0x000163c4, 0x000c0000 }, + { 0x000163c8, 0x14021402 }, + { 0x000163cc, 0x00001402 }, + { 0x000163d0, 0x00000000 }, + { 0x000163d4, 0x00000000 }, + { 0x00016400, 0x36db6db6 }, + { 0x00016404, 0x6db6db40 }, + { 0x00016408, 0x73f00000 }, + { 0x0001640c, 0x00000000 }, + { 0x00016440, 0x3f80fff8 }, + { 0x0001644c, 0x000f0278 }, + { 0x00016450, 0x8036db6c }, + { 0x00016454, 0x6db60000 }, + { 0x00016500, 0x07ff8001 }, + { 0x00016508, 0x00080010 }, + { 0x00016544, 0x01884080 }, + { 0x00016548, 0x000080d8 }, + { 0x00016780, 0x00000000 }, + { 0x00016784, 0x00000000 }, + { 0x00016788, 0x00800700 }, + { 0x0001678c, 0x00800700 }, + { 0x00016790, 0x00800700 }, + { 0x00016794, 0x00000000 }, + { 0x00016798, 0x00000000 }, + { 0x0001679c, 0x00000000 }, + { 0x000167a0, 0x00000001 }, + { 0x000167a4, 0x00000001 }, + { 0x000167a8, 0x00000000 }, + { 0x000167ac, 0x00000000 }, + { 0x000167b0, 0x00000000 }, + { 0x000167b4, 0x00000000 }, + { 0x000167b8, 0x00000000 }, + { 0x000167bc, 0x00000000 }, + { 0x000167c0, 0x000000a0 }, + { 0x000167c4, 0x000c0000 }, + { 0x000167c8, 0x14021402 }, + { 0x000167cc, 0x00001402 }, + { 0x000167d0, 0x00000000 }, + { 0x000167d4, 0x00000000 }, +}; + +static const u_int32_t qca953xCommon_rx_gain_table_honeybee_1p0[][2] = { +/* Addr allmodes */ + { 0x0000a000, 0x00010000 }, + { 0x0000a004, 0x00030002 }, + { 0x0000a008, 0x00050004 }, + { 0x0000a00c, 0x00810080 }, + { 0x0000a010, 0x00830082 }, + { 0x0000a014, 0x01810180 }, + { 0x0000a018, 0x01830182 }, + { 0x0000a01c, 0x01850184 }, + { 0x0000a020, 0x01890188 }, + { 0x0000a024, 0x018b018a }, + { 0x0000a028, 0x018d018c }, + { 0x0000a02c, 0x01910190 }, + { 0x0000a030, 0x01930192 }, + { 0x0000a034, 0x01950194 }, + { 0x0000a038, 0x038a0196 }, + { 0x0000a03c, 0x038c038b }, + { 0x0000a040, 0x0390038d }, + { 0x0000a044, 0x03920391 }, + { 0x0000a048, 0x03940393 }, + { 0x0000a04c, 0x03960395 }, + { 0x0000a050, 0x00000000 }, + { 0x0000a054, 0x00000000 }, + { 0x0000a058, 0x00000000 }, + { 0x0000a05c, 0x00000000 }, + { 0x0000a060, 0x00000000 }, + { 0x0000a064, 0x00000000 }, + { 0x0000a068, 0x00000000 }, + { 0x0000a06c, 0x00000000 }, + { 0x0000a070, 0x00000000 }, + { 0x0000a074, 0x00000000 }, + { 0x0000a078, 0x00000000 }, + { 0x0000a07c, 0x00000000 }, + { 0x0000a080, 0x22222229 }, + { 0x0000a084, 0x1d1d1d1d }, + { 0x0000a088, 0x1d1d1d1d }, + { 0x0000a08c, 0x1d1d1d1d }, + { 0x0000a090, 0x171d1d1d }, + { 0x0000a094, 0x11111717 }, + { 0x0000a098, 0x00030311 }, + { 0x0000a09c, 0x00000000 }, + { 0x0000a0a0, 0x00000000 }, + { 0x0000a0a4, 0x00000000 }, + { 0x0000a0a8, 0x00000000 }, + { 0x0000a0ac, 0x00000000 }, + { 0x0000a0b0, 0x00000000 }, + { 0x0000a0b4, 0x00000000 }, + { 0x0000a0b8, 0x00000000 }, + { 0x0000a0bc, 0x00000000 }, + { 0x0000a0c0, 0x001f0000 }, + { 0x0000a0c4, 0x01000101 }, + { 0x0000a0c8, 0x011e011f }, + { 0x0000a0cc, 0x011c011d }, + { 0x0000a0d0, 0x02030204 }, + { 0x0000a0d4, 0x02010202 }, + { 0x0000a0d8, 0x021f0200 }, + { 0x0000a0dc, 0x0302021e }, + { 0x0000a0e0, 0x03000301 }, + { 0x0000a0e4, 0x031e031f }, + { 0x0000a0e8, 0x0402031d }, + { 0x0000a0ec, 0x04000401 }, + { 0x0000a0f0, 0x041e041f }, + { 0x0000a0f4, 0x0502041d }, + { 0x0000a0f8, 0x05000501 }, + { 0x0000a0fc, 0x051e051f }, + { 0x0000a100, 0x06010602 }, + { 0x0000a104, 0x061f0600 }, + { 0x0000a108, 0x061d061e }, + { 0x0000a10c, 0x07020703 }, + { 0x0000a110, 0x07000701 }, + { 0x0000a114, 0x00000000 }, + { 0x0000a118, 0x00000000 }, + { 0x0000a11c, 0x00000000 }, + { 0x0000a120, 0x00000000 }, + { 0x0000a124, 0x00000000 }, + { 0x0000a128, 0x00000000 }, + { 0x0000a12c, 0x00000000 }, + { 0x0000a130, 0x00000000 }, + { 0x0000a134, 0x00000000 }, + { 0x0000a138, 0x00000000 }, + { 0x0000a13c, 0x00000000 }, + { 0x0000a140, 0x001f0000 }, + { 0x0000a144, 0x01000101 }, + { 0x0000a148, 0x011e011f }, + { 0x0000a14c, 0x011c011d }, + { 0x0000a150, 0x02030204 }, + { 0x0000a154, 0x02010202 }, + { 0x0000a158, 0x021f0200 }, + { 0x0000a15c, 0x0302021e }, + { 0x0000a160, 0x03000301 }, + { 0x0000a164, 0x031e031f }, + { 0x0000a168, 0x0402031d }, + { 0x0000a16c, 0x04000401 }, + { 0x0000a170, 0x041e041f }, + { 0x0000a174, 0x0502041d }, + { 0x0000a178, 0x05000501 }, + { 0x0000a17c, 0x051e051f }, + { 0x0000a180, 0x06010602 }, + { 0x0000a184, 0x061f0600 }, + { 0x0000a188, 0x061d061e }, + { 0x0000a18c, 0x07020703 }, + { 0x0000a190, 0x07000701 }, + { 0x0000a194, 0x00000000 }, + { 0x0000a198, 0x00000000 }, + { 0x0000a19c, 0x00000000 }, + { 0x0000a1a0, 0x00000000 }, + { 0x0000a1a4, 0x00000000 }, + { 0x0000a1a8, 0x00000000 }, + { 0x0000a1ac, 0x00000000 }, + { 0x0000a1b0, 0x00000000 }, + { 0x0000a1b4, 0x00000000 }, + { 0x0000a1b8, 0x00000000 }, + { 0x0000a1bc, 0x00000000 }, + { 0x0000a1c0, 0x00000000 }, + { 0x0000a1c4, 0x00000000 }, + { 0x0000a1c8, 0x00000000 }, + { 0x0000a1cc, 0x00000000 }, + { 0x0000a1d0, 0x00000000 }, + { 0x0000a1d4, 0x00000000 }, + { 0x0000a1d8, 0x00000000 }, + { 0x0000a1dc, 0x00000000 }, + { 0x0000a1e0, 0x00000000 }, + { 0x0000a1e4, 0x00000000 }, + { 0x0000a1e8, 0x00000000 }, + { 0x0000a1ec, 0x00000000 }, + { 0x0000a1f0, 0x00000396 }, + { 0x0000a1f4, 0x00000396 }, + { 0x0000a1f8, 0x00000396 }, + { 0x0000a1fc, 0x00000196 }, + { 0x0000b000, 0x00010000 }, + { 0x0000b004, 0x00030002 }, + { 0x0000b008, 0x00050004 }, + { 0x0000b00c, 0x00810080 }, + { 0x0000b010, 0x00830082 }, + { 0x0000b014, 0x01810180 }, + { 0x0000b018, 0x01830182 }, + { 0x0000b01c, 0x01850184 }, + { 0x0000b020, 0x02810280 }, + { 0x0000b024, 0x02830282 }, + { 0x0000b028, 0x02850284 }, + { 0x0000b02c, 0x02890288 }, + { 0x0000b030, 0x028b028a }, + { 0x0000b034, 0x0388028c }, + { 0x0000b038, 0x038a0389 }, + { 0x0000b03c, 0x038c038b }, + { 0x0000b040, 0x0390038d }, + { 0x0000b044, 0x03920391 }, + { 0x0000b048, 0x03940393 }, + { 0x0000b04c, 0x03960395 }, + { 0x0000b050, 0x00000000 }, + { 0x0000b054, 0x00000000 }, + { 0x0000b058, 0x00000000 }, + { 0x0000b05c, 0x00000000 }, + { 0x0000b060, 0x00000000 }, + { 0x0000b064, 0x00000000 }, + { 0x0000b068, 0x00000000 }, + { 0x0000b06c, 0x00000000 }, + { 0x0000b070, 0x00000000 }, + { 0x0000b074, 0x00000000 }, + { 0x0000b078, 0x00000000 }, + { 0x0000b07c, 0x00000000 }, + { 0x0000b080, 0x23232323 }, + { 0x0000b084, 0x21232323 }, + { 0x0000b088, 0x19191c1e }, + { 0x0000b08c, 0x12141417 }, + { 0x0000b090, 0x07070e0e }, + { 0x0000b094, 0x03030305 }, + { 0x0000b098, 0x00000003 }, + { 0x0000b09c, 0x00000000 }, + { 0x0000b0a0, 0x00000000 }, + { 0x0000b0a4, 0x00000000 }, + { 0x0000b0a8, 0x00000000 }, + { 0x0000b0ac, 0x00000000 }, + { 0x0000b0b0, 0x00000000 }, + { 0x0000b0b4, 0x00000000 }, + { 0x0000b0b8, 0x00000000 }, + { 0x0000b0bc, 0x00000000 }, + { 0x0000b0c0, 0x003f0020 }, + { 0x0000b0c4, 0x00400041 }, + { 0x0000b0c8, 0x0140005f }, + { 0x0000b0cc, 0x0160015f }, + { 0x0000b0d0, 0x017e017f }, + { 0x0000b0d4, 0x02410242 }, + { 0x0000b0d8, 0x025f0240 }, + { 0x0000b0dc, 0x027f0260 }, + { 0x0000b0e0, 0x0341027e }, + { 0x0000b0e4, 0x035f0340 }, + { 0x0000b0e8, 0x037f0360 }, + { 0x0000b0ec, 0x04400441 }, + { 0x0000b0f0, 0x0460045f }, + { 0x0000b0f4, 0x0541047f }, + { 0x0000b0f8, 0x055f0540 }, + { 0x0000b0fc, 0x057f0560 }, + { 0x0000b100, 0x06400641 }, + { 0x0000b104, 0x0660065f }, + { 0x0000b108, 0x067e067f }, + { 0x0000b10c, 0x07410742 }, + { 0x0000b110, 0x075f0740 }, + { 0x0000b114, 0x077f0760 }, + { 0x0000b118, 0x07800781 }, + { 0x0000b11c, 0x07a0079f }, + { 0x0000b120, 0x07c107bf }, + { 0x0000b124, 0x000007c0 }, + { 0x0000b128, 0x00000000 }, + { 0x0000b12c, 0x00000000 }, + { 0x0000b130, 0x00000000 }, + { 0x0000b134, 0x00000000 }, + { 0x0000b138, 0x00000000 }, + { 0x0000b13c, 0x00000000 }, + { 0x0000b140, 0x003f0020 }, + { 0x0000b144, 0x00400041 }, + { 0x0000b148, 0x0140005f }, + { 0x0000b14c, 0x0160015f }, + { 0x0000b150, 0x017e017f }, + { 0x0000b154, 0x02410242 }, + { 0x0000b158, 0x025f0240 }, + { 0x0000b15c, 0x027f0260 }, + { 0x0000b160, 0x0341027e }, + { 0x0000b164, 0x035f0340 }, + { 0x0000b168, 0x037f0360 }, + { 0x0000b16c, 0x04400441 }, + { 0x0000b170, 0x0460045f }, + { 0x0000b174, 0x0541047f }, + { 0x0000b178, 0x055f0540 }, + { 0x0000b17c, 0x057f0560 }, + { 0x0000b180, 0x06400641 }, + { 0x0000b184, 0x0660065f }, + { 0x0000b188, 0x067e067f }, + { 0x0000b18c, 0x07410742 }, + { 0x0000b190, 0x075f0740 }, + { 0x0000b194, 0x077f0760 }, + { 0x0000b198, 0x07800781 }, + { 0x0000b19c, 0x07a0079f }, + { 0x0000b1a0, 0x07c107bf }, + { 0x0000b1a4, 0x000007c0 }, + { 0x0000b1a8, 0x00000000 }, + { 0x0000b1ac, 0x00000000 }, + { 0x0000b1b0, 0x00000000 }, + { 0x0000b1b4, 0x00000000 }, + { 0x0000b1b8, 0x00000000 }, + { 0x0000b1bc, 0x00000000 }, + { 0x0000b1c0, 0x00000000 }, + { 0x0000b1c4, 0x00000000 }, + { 0x0000b1c8, 0x00000000 }, + { 0x0000b1cc, 0x00000000 }, + { 0x0000b1d0, 0x00000000 }, + { 0x0000b1d4, 0x00000000 }, + { 0x0000b1d8, 0x00000000 }, + { 0x0000b1dc, 0x00000000 }, + { 0x0000b1e0, 0x00000000 }, + { 0x0000b1e4, 0x00000000 }, + { 0x0000b1e8, 0x00000000 }, + { 0x0000b1ec, 0x00000000 }, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Nov 29 21:01:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D6A2A3BF37; Sun, 29 Nov 2015 21:01:04 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 323E31840; Sun, 29 Nov 2015 21:01:04 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATL13au028081; Sun, 29 Nov 2015 21:01:03 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATL12sd028077; Sun, 29 Nov 2015 21:01:02 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201511292101.tATL12sd028077@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 29 Nov 2015 21:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291459 - in head/sys: fs/nfs fs/nfsclient ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 21:01:04 -0000 Author: mckusick Date: Sun Nov 29 21:01:02 2015 New Revision: 291459 URL: https://svnweb.freebsd.org/changeset/base/291459 Log: For performance reasons, it is useful to have a single string used as the name of a filesystem when setting it as the first parameter to the getnewvnode() function. Most filesystems call getnewvnode from just one place so can use a literal string as the first parameter. However, NFS calls getnewvnode from two places, so we create a global constant string that can be used by the two instances. This change also collapses two instances of getnewvnode() in the UFS filesystem to a single call. Reviewed by: kib Tested by: Peter Holm Modified: head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clnode.c head/sys/fs/nfsclient/nfs_clport.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Sun Nov 29 18:14:18 2015 (r291458) +++ head/sys/fs/nfs/nfsport.h Sun Nov 29 21:01:02 2015 (r291459) @@ -964,6 +964,13 @@ struct nfsreq { #define NFSVNO_DELEGOK(v) (1) #endif +/* + * Name used by getnewvnode() to describe filesystem, "nfs". + * For perfomance reasons it is useful to have the same string + * used in both places that call getnewvnode(). + */ +extern const char nfs_vnode_tag[]; + #endif /* _KERNEL */ #endif /* _NFS_NFSPORT_H */ Modified: head/sys/fs/nfsclient/nfs_clnode.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clnode.c Sun Nov 29 18:14:18 2015 (r291458) +++ head/sys/fs/nfsclient/nfs_clnode.c Sun Nov 29 21:01:02 2015 (r291459) @@ -64,6 +64,8 @@ MALLOC_DECLARE(M_NEWNFSREQ); uma_zone_t newnfsnode_zone; +const char nfs_vnode_tag[] = "nfs"; + static void nfs_freesillyrename(void *arg, __unused int pending); void @@ -122,7 +124,7 @@ ncl_nget(struct mount *mntp, u_int8_t *f } np = uma_zalloc(newnfsnode_zone, M_WAITOK | M_ZERO); - error = getnewvnode("nfs", mntp, &newnfs_vnodeops, &nvp); + error = getnewvnode(nfs_vnode_tag, mntp, &newnfs_vnodeops, &nvp); if (error) { uma_zfree(newnfsnode_zone, np); return (error); @@ -330,4 +332,3 @@ ncl_invalcaches(struct vnode *vp) KDTRACE_NFS_ATTRCACHE_FLUSH_DONE(vp); mtx_unlock(&np->n_mtx); } - Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Sun Nov 29 18:14:18 2015 (r291458) +++ head/sys/fs/nfsclient/nfs_clport.c Sun Nov 29 21:01:02 2015 (r291459) @@ -210,7 +210,7 @@ nfscl_nget(struct mount *mntp, struct vn } np = uma_zalloc(newnfsnode_zone, M_WAITOK | M_ZERO); - error = getnewvnode("nfs", mntp, &newnfs_vnodeops, &nvp); + error = getnewvnode(nfs_vnode_tag, mntp, &newnfs_vnodeops, &nvp); if (error) { uma_zfree(newnfsnode_zone, np); FREE((caddr_t)nfhp, M_NFSFH); Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sun Nov 29 18:14:18 2015 (r291458) +++ head/sys/ufs/ffs/ffs_vfsops.c Sun Nov 29 21:01:02 2015 (r291459) @@ -1670,10 +1670,8 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags ip = uma_zalloc(uma_inode, M_WAITOK | M_ZERO); /* Allocate a new vnode/inode. */ - if (fs->fs_magic == FS_UFS1_MAGIC) - error = getnewvnode("ufs", mp, &ffs_vnodeops1, &vp); - else - error = getnewvnode("ufs", mp, &ffs_vnodeops2, &vp); + error = getnewvnode("ufs", mp, fs->fs_magic == FS_UFS1_MAGIC ? + &ffs_vnodeops1 : &ffs_vnodeops2, &vp); if (error) { *vpp = NULL; uma_zfree(uma_inode, ip); From owner-svn-src-all@freebsd.org Sun Nov 29 21:42:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 509FDA3C9DB; Sun, 29 Nov 2015 21:42:27 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1105611CC; Sun, 29 Nov 2015 21:42:27 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATLgQpu042924; Sun, 29 Nov 2015 21:42:26 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATLgQW0042923; Sun, 29 Nov 2015 21:42:26 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201511292142.tATLgQW0042923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Sun, 29 Nov 2015 21:42:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291460 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 21:42:27 -0000 Author: mckusick Date: Sun Nov 29 21:42:26 2015 New Revision: 291460 URL: https://svnweb.freebsd.org/changeset/base/291460 Log: As the kernel allocates and frees vnodes, it fully initializes them on every allocation and fully releases them on every free. These are not trivial costs: it starts by zeroing a large structure then initializes a mutex, a lock manager lock, an rw lock, four lists, and six pointers. And looking at vfs.vnodes_created, these operations are being done millions of times an hour on a busy machine. As a performance optimization, this code update uses the uma_init and uma_fini routines to do these initializations and cleanups only as the vnodes enter and leave the vnode_zone. With this change the initializations are only done kern.maxvnodes times at system startup and then only rarely again. The frees are done only if the vnode_zone shrinks which never happens in practice. For those curious about the avoided work, look at the vnode_init() and vnode_fini() functions in kern/vfs_subr.c to see the code that has been removed from the main vnode allocation/free path. Reviewed by: kib Tested by: Peter Holm Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Nov 29 21:01:02 2015 (r291459) +++ head/sys/kern/vfs_subr.c Sun Nov 29 21:42:26 2015 (r291460) @@ -346,6 +346,66 @@ PCTRIE_DEFINE(BUF, buf, b_lblkno, buf_tr #ifndef MAXVNODES_MAX #define MAXVNODES_MAX (512 * 1024 * 1024 / 64) /* 8M */ #endif + +/* + * Initialize a vnode as it first enters the zone. + */ +static int +vnode_init(void *mem, int size, int flags) +{ + struct vnode *vp; + struct bufobj *bo; + + vp = mem; + bzero(vp, size); + /* + * Setup locks. + */ + vp->v_vnlock = &vp->v_lock; + mtx_init(&vp->v_interlock, "vnode interlock", NULL, MTX_DEF); + /* + * By default, don't allow shared locks unless filesystems opt-in. + */ + lockinit(vp->v_vnlock, PVFS, "vnode", VLKTIMEOUT, + LK_NOSHARE | LK_IS_VNODE); + /* + * Initialize bufobj. + */ + bo = &vp->v_bufobj; + bo->__bo_vnode = vp; + rw_init(BO_LOCKPTR(bo), "bufobj interlock"); + bo->bo_private = vp; + TAILQ_INIT(&bo->bo_clean.bv_hd); + TAILQ_INIT(&bo->bo_dirty.bv_hd); + /* + * Initialize namecache. + */ + LIST_INIT(&vp->v_cache_src); + TAILQ_INIT(&vp->v_cache_dst); + /* + * Initialize rangelocks. + */ + rangelock_init(&vp->v_rl); + return (0); +} + +/* + * Free a vnode when it is cleared from the zone. + */ +static void +vnode_fini(void *mem, int size) +{ + struct vnode *vp; + struct bufobj *bo; + + vp = mem; + rangelock_destroy(&vp->v_rl); + lockdestroy(vp->v_vnlock); + mtx_destroy(&vp->v_interlock); + bo = &vp->v_bufobj; + rw_destroy(BO_LOCKPTR(bo)); +} + static void vntblinit(void *dummy __unused) { @@ -379,7 +439,7 @@ vntblinit(void *dummy __unused) TAILQ_INIT(&vnode_free_list); mtx_init(&vnode_free_list_mtx, "vnode_free_list", NULL, MTX_DEF); vnode_zone = uma_zcreate("VNODE", sizeof (struct vnode), NULL, NULL, - NULL, NULL, UMA_ALIGN_PTR, 0); + vnode_init, vnode_fini, UMA_ALIGN_PTR, 0); vnodepoll_zone = uma_zcreate("VNODEPOLL", sizeof (struct vpollinfo), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); /* @@ -1223,8 +1283,8 @@ getnewvnode(const char *tag, struct moun struct vnode **vpp) { struct vnode *vp; - struct bufobj *bo; struct thread *td; + struct lock_object *lo; static int cyclecount; int error; @@ -1271,40 +1331,42 @@ getnewvnode(const char *tag, struct moun mtx_unlock(&vnode_free_list_mtx); alloc: atomic_add_long(&vnodes_created, 1); - vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK|M_ZERO); + vp = (struct vnode *) uma_zalloc(vnode_zone, M_WAITOK); /* - * Setup locks. - */ - vp->v_vnlock = &vp->v_lock; - mtx_init(&vp->v_interlock, "vnode interlock", NULL, MTX_DEF); - /* - * By default, don't allow shared locks unless filesystems - * opt-in. - */ - lockinit(vp->v_vnlock, PVFS, tag, VLKTIMEOUT, LK_NOSHARE | LK_IS_VNODE); - /* - * Initialize bufobj. + * Locks are given the generic name "vnode" when created. + * Follow the historic practice of using the filesystem + * name when they allocated, e.g., "zfs", "ufs", "nfs, etc. + * + * Locks live in a witness group keyed on their name. Thus, + * when a lock is renamed, it must also move from the witness + * group of its old name to the witness group of its new name. + * + * The change only needs to be made when the vnode moves + * from one filesystem type to another. We ensure that each + * filesystem use a single static name pointer for its tag so + * that we can compare pointers rather than doing a strcmp(). */ - bo = &vp->v_bufobj; - bo->__bo_vnode = vp; - rw_init(BO_LOCKPTR(bo), "bufobj interlock"); - bo->bo_ops = &buf_ops_bio; - bo->bo_private = vp; - TAILQ_INIT(&bo->bo_clean.bv_hd); - TAILQ_INIT(&bo->bo_dirty.bv_hd); + lo = &vp->v_vnlock->lock_object; + if (lo->lo_name != tag) { + lo->lo_name = tag; + WITNESS_DESTROY(lo); + WITNESS_INIT(lo, tag); + } /* - * Initialize namecache. + * By default, don't allow shared locks unless filesystems opt-in. */ - LIST_INIT(&vp->v_cache_src); - TAILQ_INIT(&vp->v_cache_dst); + vp->v_vnlock->lock_object.lo_flags |= LK_NOSHARE; /* * Finalize various vnode identity bits. */ + KASSERT(vp->v_object == NULL, ("stale v_object %p", vp)); + KASSERT(vp->v_lockf == NULL, ("stale v_lockf %p", vp)); + KASSERT(vp->v_pollinfo == NULL, ("stale v_pollinfo %p", vp)); vp->v_type = VNON; vp->v_tag = tag; vp->v_op = vops; v_init_counters(vp); - vp->v_data = NULL; + vp->v_bufobj.bo_ops = &buf_ops_bio; #ifdef MAC mac_vnode_init(vp); if (mp != NULL && (mp->mnt_flag & MNT_MULTILABEL) == 0) @@ -1313,11 +1375,10 @@ alloc: printf("NULL mp in getnewvnode()\n"); #endif if (mp != NULL) { - bo->bo_bsize = mp->mnt_stat.f_iosize; + vp->v_bufobj.bo_bsize = mp->mnt_stat.f_iosize; if ((mp->mnt_kern_flag & MNTK_NOKNOTE) != 0) vp->v_vflag |= VV_NOKNOTE; } - rangelock_init(&vp->v_rl); /* * For the filesystems which do not use vfs_hash_insert(), @@ -2683,6 +2744,12 @@ _vdrop(struct vnode *vp, bool locked) } /* * The vnode has been marked for destruction, so free it. + * + * The vnode will be returned to the zone where it will + * normally remain until it is needed for another vnode. We + * need to cleanup (or verify that the cleanup has already + * been done) any residual data left from its current use + * so as not to contaminate the freshly allocated vnode. */ CTR2(KTR_VFS, "%s: destroying the vnode %p", __func__, vp); atomic_subtract_long(&numvnodes, 1); @@ -2707,16 +2774,17 @@ _vdrop(struct vnode *vp, bool locked) #ifdef MAC mac_vnode_destroy(vp); #endif - if (vp->v_pollinfo != NULL) + if (vp->v_pollinfo != NULL) { destroy_vpollinfo(vp->v_pollinfo); + vp->v_pollinfo = NULL; + } #ifdef INVARIANTS /* XXX Elsewhere we detect an already freed vnode via NULL v_op. */ vp->v_op = NULL; #endif - rangelock_destroy(&vp->v_rl); - lockdestroy(vp->v_vnlock); - mtx_destroy(&vp->v_interlock); - rw_destroy(BO_LOCKPTR(bo)); + vp->v_iflag = 0; + vp->v_vflag = 0; + bo->bo_flag = 0; uma_zfree(vnode_zone, vp); } @@ -3081,6 +3149,7 @@ vgonel(struct vnode *vp) * Clear the advisory locks and wake up waiting threads. */ (void)VOP_ADVLOCKPURGE(vp); + vp->v_lockf = NULL; /* * Delete from old mount point vnode list. */ From owner-svn-src-all@freebsd.org Sun Nov 29 22:37:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 017BEA3C4BA; Sun, 29 Nov 2015 22:37:50 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C333A1D41; Sun, 29 Nov 2015 22:37:49 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tATMbmIM057297; Sun, 29 Nov 2015 22:37:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tATMbmER057296; Sun, 29 Nov 2015 22:37:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201511292237.tATMbmER057296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 29 Nov 2015 22:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291461 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 22:37:50 -0000 Author: dim Date: Sun Nov 29 22:37:48 2015 New Revision: 291461 URL: https://svnweb.freebsd.org/changeset/base/291461 Log: Fix buildworld after r291453, similar to r284346: url->user and url->pwd are arrays, so they can never be NULL. Reported by: many Pointy hat to: des Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Sun Nov 29 21:42:26 2015 (r291460) +++ head/lib/libfetch/http.c Sun Nov 29 22:37:48 2015 (r291461) @@ -1689,10 +1689,8 @@ http_request_body(struct url *URL, const goto ouch; } } else if (fetch_netrc_auth(url) == 0) { - aparams.user = url->user ? - strdup(url->user) : strdup(""); - aparams.password = url->pwd ? - strdup(url->pwd) : strdup(""); + aparams.user = strdup(url->user); + aparams.password = strdup(url->pwd); } else if (fetchAuthMethod && fetchAuthMethod(url) == 0) { aparams.user = strdup(url->user); From owner-svn-src-all@freebsd.org Sun Nov 29 22:39:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BDBCA3C540; Sun, 29 Nov 2015 22:39:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5E61D1F06; Sun, 29 Nov 2015 22:39:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::e81c:127:3e7b:39b6] (unknown [IPv6:2001:7b8:3a7:0:e81c:127:3e7b:39b6]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 1995B335FB; Sun, 29 Nov 2015 23:39:44 +0100 (CET) Subject: Re: svn commit: r291453 - head/lib/libfetch Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Content-Type: multipart/signed; boundary="Apple-Mail=_E57B482F-12C1-45CD-BD65-1D7EA79FD5ED"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.6b2 From: Dimitry Andric In-Reply-To: Date: Sun, 29 Nov 2015 23:39:35 +0100 Cc: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <0BD9830A-9592-46AD-B626-4E75948C8A2A@FreeBSD.org> References: <201511291427.tATER0lb011244@repo.freebsd.org> To: Jason Unovitch X-Mailer: Apple Mail (2.3096.5) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 22:39:47 -0000 --Apple-Mail=_E57B482F-12C1-45CD-BD65-1D7EA79FD5ED Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 29 Nov 2015, at 18:35, Jason Unovitch = wrote: >=20 > On Sun, Nov 29, 2015 at 9:27 AM, Dag-Erling Sm=C3=B8rgrav = wrote: >> Author: des >> Date: Sun Nov 29 14:26:59 2015 >> New Revision: 291453 >> URL: https://svnweb.freebsd.org/changeset/base/291453 ... > `make buildworld` fails after this commit: >=20 > /usr/src/head/lib/libfetch/http.c:1692:25: error: address of array > 'url->user' will always evaluate to 'true' [-Werro > r,-Wpointer-bool-conversion] > aparams.user =3D url->user ? > ~~~~~^~~~ ~ > /usr/src/head/lib/libfetch/http.c:1694:29: error: address of array > 'url->pwd' will always evaluate to 'true' [-Werror > ,-Wpointer-bool-conversion] > aparams.password =3D url->pwd ? This should now be fixed by r291461. -Dimitry --Apple-Mail=_E57B482F-12C1-45CD-BD65-1D7EA79FD5ED Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.28 iEYEARECAAYFAlZbfq8ACgkQsF6jCi4glqNiRACeNGyL7yFUafQBmpBYampgbDPD uWsAoO7m2fYeqC+/mubj4alfWqeteU/N =ImJM -----END PGP SIGNATURE----- --Apple-Mail=_E57B482F-12C1-45CD-BD65-1D7EA79FD5ED-- From owner-svn-src-all@freebsd.org Mon Nov 30 02:23:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 841E0A33BD3; Mon, 30 Nov 2015 02:23:57 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59A11131E; Mon, 30 Nov 2015 02:23:57 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU2Numb026295; Mon, 30 Nov 2015 02:23:56 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU2Num5026293; Mon, 30 Nov 2015 02:23:56 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201511300223.tAU2Num5026293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 30 Nov 2015 02:23:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291462 - in head/sys: conf powerpc/mpc85xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 02:23:57 -0000 Author: jhibbits Date: Mon Nov 30 02:23:56 2015 New Revision: 291462 URL: https://svnweb.freebsd.org/changeset/base/291462 Log: Add Freescale QorIQ GPIO driver. Still missing interrupt support, to come later. Sponsored by: Alex Perez/Inertial Computing Added: head/sys/powerpc/mpc85xx/qoriq_gpio.c (contents, props changed) Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun Nov 29 22:37:48 2015 (r291461) +++ head/sys/conf/files.powerpc Mon Nov 30 02:23:56 2015 (r291462) @@ -142,6 +142,7 @@ powerpc/mpc85xx/mpc85xx_gpio.c optional powerpc/mpc85xx/platform_mpc85xx.c optional mpc85xx | qoriq_dpaa powerpc/mpc85xx/pci_mpc85xx.c optional pci mpc85xx | pci qoriq_dpaa powerpc/mpc85xx/pci_mpc85xx_pcib.c optional pci mpc85xx | pci qoriq_dpaa +powerpc/mpc85xx/qoriq_gpio.c optional mpc85xx gpio | qoriq_dpaa gpio powerpc/ofw/ofw_machdep.c standard powerpc/ofw/ofw_pci.c optional pci powerpc/ofw/ofw_pcibus.c optional pci Added: head/sys/powerpc/mpc85xx/qoriq_gpio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/mpc85xx/qoriq_gpio.c Mon Nov 30 02:23:56 2015 (r291462) @@ -0,0 +1,309 @@ +/*- + * Copyright (c) 2015 Justin Hibbits + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "gpio_if.h" + +#define MAXPIN (31) + +#define VALID_PIN(u) ((u) >= 0 && (u) <= MAXPIN) + +#define GPIO_LOCK(sc) mtx_lock(&(sc)->sc_mtx) +#define GPIO_UNLOCK(sc) mtx_unlock(&(sc)->sc_mtx) +#define GPIO_LOCK_INIT(sc) \ + mtx_init(&(sc)->sc_mtx, device_get_nameunit((sc)->dev), \ + "gpio", MTX_DEF) +#define GPIO_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); + +#define GPIO_GPDIR 0x0 +#define GPIO_GPODR 0x4 +#define GPIO_GPDAT 0x8 +#define GPIO_GPIER 0xc +#define GPIO_GPIMR 0x10 +#define GPIO_GPICR 0x14 + + +struct qoriq_gpio_softc { + device_t dev; + device_t busdev; + struct mtx sc_mtx; + struct resource *sc_mem; /* Memory resource */ +}; + +static device_t +qoriq_gpio_get_bus(device_t dev) +{ + struct qoriq_gpio_softc *sc; + + sc = device_get_softc(dev); + + return (sc->busdev); +} + +static int +qoriq_gpio_pin_max(device_t dev, int *maxpin) +{ + + *maxpin = MAXPIN; + return (0); +} + +/* Get a specific pin's capabilities. */ +static int +qoriq_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) +{ + + if (!VALID_PIN(pin)) + return (EINVAL); + + *caps = (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | GPIO_PIN_OPENDRAIN); + + return (0); +} + +/* Get a specific pin's name. */ +static int +qoriq_gpio_pin_getname(device_t dev, uint32_t pin, char *name) +{ + + if (!VALID_PIN(pin)) + return (EINVAL); + + snprintf(name, GPIOMAXNAME, "qoriq_gpio%d.%d", + device_get_unit(dev), pin); + name[GPIOMAXNAME-1] = '\0'; + + return (0); +} + +/* Set flags for the pin. */ +static int +qoriq_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) +{ + struct qoriq_gpio_softc *sc = device_get_softc(dev); + uint32_t reg; + + if (!VALID_PIN(pin)) + return (EINVAL); + + if ((flags & (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) == + (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT)) + return (EINVAL); + + GPIO_LOCK(sc); + if (flags & GPIO_PIN_INPUT) { + reg = bus_read_4(sc->sc_mem, GPIO_GPDIR); + reg &= ~(1 << (31 - pin)); + bus_write_4(sc->sc_mem, GPIO_GPDIR, reg); + } + else if (flags & GPIO_PIN_OUTPUT) { + reg = bus_read_4(sc->sc_mem, GPIO_GPDIR); + reg |= (1 << (31 - pin)); + bus_write_4(sc->sc_mem, GPIO_GPDIR, reg); + reg = bus_read_4(sc->sc_mem, GPIO_GPODR); + if (flags & GPIO_PIN_OPENDRAIN) + reg |= (1 << (31 - pin)); + else + reg &= ~(1 << (31 - pin)); + bus_write_4(sc->sc_mem, GPIO_GPODR, reg); + } + GPIO_UNLOCK(sc); + return (0); +} + +/* Set a specific output pin's value. */ +static int +qoriq_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) +{ + struct qoriq_gpio_softc *sc = device_get_softc(dev); + uint32_t outvals; + uint8_t pinbit; + + if (!VALID_PIN(pin) || value > 1) + return (EINVAL); + + GPIO_LOCK(sc); + pinbit = 31 - pin; + + outvals = bus_read_4(sc->sc_mem, GPIO_GPDAT); + outvals &= ~(1 << pinbit); + outvals |= (value << pinbit); + bus_write_4(sc->sc_mem, 0, outvals); + + GPIO_UNLOCK(sc); + + return (0); +} + +/* Get a specific pin's input value. */ +static int +qoriq_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *value) +{ + struct qoriq_gpio_softc *sc = device_get_softc(dev); + + if (!VALID_PIN(pin)) + return (EINVAL); + + *value = (bus_read_4(sc->sc_mem, GPIO_GPDAT) >> (31 - pin)) & 1; + + return (0); +} + +/* Toggle a pin's output value. */ +static int +qoriq_gpio_pin_toggle(device_t dev, uint32_t pin) +{ + struct qoriq_gpio_softc *sc = device_get_softc(dev); + uint32_t val; + + if (!VALID_PIN(pin)) + return (EINVAL); + + GPIO_LOCK(sc); + + val = bus_read_4(sc->sc_mem, GPIO_GPDAT); + val ^= (1 << (31 - pin)); + bus_write_4(sc->sc_mem, 0, val); + + GPIO_UNLOCK(sc); + + return (0); +} + +static int +qoriq_gpio_probe(device_t dev) +{ + + if (!ofw_bus_is_compatible(dev, "fsl,qoriq-gpio")) + return (ENXIO); + + device_set_desc(dev, "Freescale QorIQ GPIO driver"); + + return (0); +} + +static int qoriq_gpio_detach(device_t dev); + +static int +qoriq_gpio_attach(device_t dev) +{ + struct qoriq_gpio_softc *sc = device_get_softc(dev); + int rid; + + sc->dev = dev; + + GPIO_LOCK_INIT(sc); + + /* Allocate memory. */ + rid = 0; + sc->sc_mem = bus_alloc_resource_any(dev, + SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->sc_mem == NULL) { + device_printf(dev, "Can't allocate memory for device output port"); + qoriq_gpio_detach(dev); + return (ENOMEM); + } + + sc->busdev = gpiobus_attach_bus(dev); + if (sc->busdev == NULL) { + qoriq_gpio_detach(dev); + return (ENOMEM); + } + + OF_device_register_xref(OF_xref_from_node(ofw_bus_get_node(dev)), dev); + + return (0); +} + +static int +qoriq_gpio_detach(device_t dev) +{ + struct qoriq_gpio_softc *sc = device_get_softc(dev); + + gpiobus_detach_bus(dev); + + if (sc->sc_mem != NULL) { + /* Release output port resource. */ + bus_release_resource(dev, SYS_RES_MEMORY, + rman_get_rid(sc->sc_mem), sc->sc_mem); + } + + GPIO_LOCK_DESTROY(sc); + + return (0); +} + +static device_method_t qoriq_gpio_methods[] = { + /* device_if */ + DEVMETHOD(device_probe, qoriq_gpio_probe), + DEVMETHOD(device_attach, qoriq_gpio_attach), + DEVMETHOD(device_detach, qoriq_gpio_detach), + + /* GPIO protocol */ + DEVMETHOD(gpio_get_bus, qoriq_gpio_get_bus), + DEVMETHOD(gpio_pin_max, qoriq_gpio_pin_max), + DEVMETHOD(gpio_pin_getname, qoriq_gpio_pin_getname), + DEVMETHOD(gpio_pin_getcaps, qoriq_gpio_pin_getcaps), + DEVMETHOD(gpio_pin_get, qoriq_gpio_pin_get), + DEVMETHOD(gpio_pin_set, qoriq_gpio_pin_set), + DEVMETHOD(gpio_pin_setflags, qoriq_gpio_pin_setflags), + DEVMETHOD(gpio_pin_toggle, qoriq_gpio_pin_toggle), + + DEVMETHOD_END +}; + +static driver_t qoriq_gpio_driver = { + "gpio", + qoriq_gpio_methods, + sizeof(struct qoriq_gpio_softc), +}; +static devclass_t qoriq_gpio_devclass; + +EARLY_DRIVER_MODULE(qoriq_gpio, simplebus, qoriq_gpio_driver, + qoriq_gpio_devclass, NULL, NULL, + BUS_PASS_RESOURCE + BUS_PASS_ORDER_MIDDLE); From owner-svn-src-all@freebsd.org Mon Nov 30 02:40:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB4A8A33F17; Mon, 30 Nov 2015 02:40:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 969B21980; Mon, 30 Nov 2015 02:40:42 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU2efWR029434; Mon, 30 Nov 2015 02:40:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU2efnn029432; Mon, 30 Nov 2015 02:40:41 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201511300240.tAU2efnn029432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 30 Nov 2015 02:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291463 - in head/sys/powerpc: include powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 02:40:43 -0000 Author: jhibbits Date: Mon Nov 30 02:40:41 2015 New Revision: 291463 URL: https://svnweb.freebsd.org/changeset/base/291463 Log: Print machine check address for Book-E. Bits in mcsr indicate if the address is valid, and whether it's a physical address or effective address. Sponsored by: Alex Perez/Inertial Computing Modified: head/sys/powerpc/include/spr.h head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Mon Nov 30 02:23:56 2015 (r291462) +++ head/sys/powerpc/include/spr.h Mon Nov 30 02:40:41 2015 (r291463) @@ -652,7 +652,9 @@ #elif defined(BOOKE) +#define SPR_MCARU 0x239 /* ..8 Machine Check Address register upper bits */ #define SPR_MCSR 0x23c /* ..8 Machine Check Syndrome register */ +#define SPR_MCAR 0x23d /* ..8 Machine Check Address register */ #define SPR_ESR 0x003e /* ..8 Exception Syndrome Register */ #define ESR_PIL 0x08000000 /* Program interrupt - illegal */ Modified: head/sys/powerpc/powerpc/trap.c ============================================================================== --- head/sys/powerpc/powerpc/trap.c Mon Nov 30 02:23:56 2015 (r291462) +++ head/sys/powerpc/powerpc/trap.c Mon Nov 30 02:40:41 2015 (r291463) @@ -401,6 +401,9 @@ static void printtrap(u_int vector, struct trapframe *frame, int isfatal, int user) { uint16_t ver; +#ifdef BOOKE + vm_paddr_t pa; +#endif printf("\n"); printf("%s %s trap:\n", isfatal ? "fatal" : "handled", @@ -429,7 +432,10 @@ printtrap(u_int vector, struct trapframe printf(" msssr0 = 0x%lx\n", (u_long)mfspr(SPR_MSSSR0)); #elif defined(BOOKE) - printf(" mcsr = 0x%lx\n", (u_long)mfspr(SPR_MCSR)); + pa = mfspr(SPR_MCARU); + pa = (pa << 32) | mfspr(SPR_MCAR); + printf(" mcsr = 0x%lx\n", (u_long)mfspr(SPR_MCSR)); + printf(" mcar = 0x%jx\n", (uintmax_t)pa); #endif break; } From owner-svn-src-all@freebsd.org Mon Nov 30 04:01:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 699E1A3BE55; Mon, 30 Nov 2015 04:01:28 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C88F1C00; Mon, 30 Nov 2015 04:01:28 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by pabfh17 with SMTP id fh17so175728948pab.0; Sun, 29 Nov 2015 20:01:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:reply-to:subject:references:to:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=arpVEtuACI74/3D365i86KpReSIGm1l0UZxpdFcICwE=; b=cEqFlTgReXxMuSmK3ulXDl+L8VvSIh1c/ibL0LQVahssX01njqrYZP0H9wybHNJfDT 2KSCPsaXR6w3H2QDAEW+cfA6PSGYUJSg2nhd6kk3+PNMFfDQB+IQ9M/0yfHqBvRJ3r36 PdxWr6Uz0gXOG6ZIysN2lG8Opqh/14MqCIvGYaTWrHCD1yDS79Y6ejfbDe3MEnrxnPVi w38FnZ/kdAu1wWkpwiKysNdKP4TlBcvaeX2PvbB2HF1hUq+hyKEAZnSJQkERouw/geKY 3EVpBXEtQmrVJoLUc9kkIPyn09sflvfGmFVfowK/qfecMaGye9m/gKqbk0Kv0v624G8z NRpA== X-Received: by 10.98.73.147 with SMTP id r19mr68325895pfi.39.1448856087861; Sun, 29 Nov 2015 20:01:27 -0800 (PST) Received: from ?IPv6:2001:44b8:31ae:7b01:8c9:9bca:33f3:dd9? (2001-44b8-31ae-7b01-08c9-9bca-33f3-0dd9.static.ipv6.internode.on.net. [2001:44b8:31ae:7b01:8c9:9bca:33f3:dd9]) by smtp.gmail.com with ESMTPSA id c20sm47512934pfd.17.2015.11.29.20.01.25 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 29 Nov 2015 20:01:27 -0800 (PST) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r291460 - head/sys/kern References: <201511292142.tATLgQW0042923@repo.freebsd.org> To: Kirk McKusick , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Kubilay Kocak Message-ID: <565BCA11.4090600@FreeBSD.org> Date: Mon, 30 Nov 2015 15:01:21 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Thunderbird/42.0 MIME-Version: 1.0 In-Reply-To: <201511292142.tATLgQW0042923@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 04:01:28 -0000 On 30/11/2015 8:42 AM, Kirk McKusick wrote: > Author: mckusick > Date: Sun Nov 29 21:42:26 2015 > New Revision: 291460 > URL: https://svnweb.freebsd.org/changeset/base/291460 > > Log: > As the kernel allocates and frees vnodes, it fully initializes them > on every allocation and fully releases them on every free. These > are not trivial costs: it starts by zeroing a large structure then > initializes a mutex, a lock manager lock, an rw lock, four lists, > and six pointers. And looking at vfs.vnodes_created, these operations > are being done millions of times an hour on a busy machine. > > As a performance optimization, this code update uses the uma_init > and uma_fini routines to do these initializations and cleanups only > as the vnodes enter and leave the vnode_zone. With this change the > initializations are only done kern.maxvnodes times at system startup > and then only rarely again. The frees are done only if the vnode_zone > shrinks which never happens in practice. For those curious about the > avoided work, look at the vnode_init() and vnode_fini() functions in > kern/vfs_subr.c to see the code that has been removed from the main > vnode allocation/free path. > > Reviewed by: kib > Tested by: Peter Holm > > Modified: > head/sys/kern/vfs_subr.c > Kirk, Very interesting. Any estimation / expectation on the performance impact^W benefit of this, and in what scenario's / use-cases it might be particularly beneficial? Any benchmarks or tests you can share? ./koobs From owner-svn-src-all@freebsd.org Mon Nov 30 04:41:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26F30A3C5AF; Mon, 30 Nov 2015 04:41:52 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB9FD1A75; Mon, 30 Nov 2015 04:41:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU4fpci066528; Mon, 30 Nov 2015 04:41:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU4foZb066520; Mon, 30 Nov 2015 04:41:50 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511300441.tAU4foZb066520@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 30 Nov 2015 04:41:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291464 - in head/lib: . lib80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 04:41:52 -0000 Author: adrian Date: Mon Nov 30 04:41:50 2015 New Revision: 291464 URL: https://svnweb.freebsd.org/changeset/base/291464 Log: Add lib80211, a small (but hopefully soon to grow) set of library routines to interface with net80211. This is all from the ifconfig program; the duplicate code from ifconfig will be removed when it starts using this API. Differential Revision: https://reviews.freebsd.org/D4290 Added: head/lib/lib80211/ head/lib/lib80211/Makefile (contents, props changed) head/lib/lib80211/lib80211.3 (contents, props changed) head/lib/lib80211/lib80211_ioctl.c (contents, props changed) head/lib/lib80211/lib80211_ioctl.h (contents, props changed) head/lib/lib80211/lib80211_regdomain.c (contents, props changed) head/lib/lib80211/lib80211_regdomain.h (contents, props changed) Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Nov 30 02:40:41 2015 (r291463) +++ head/lib/Makefile Mon Nov 30 04:41:50 2015 (r291464) @@ -71,6 +71,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libmp} \ libmt \ ${_libnandfs} \ + lib80211 \ libnetbsd \ ${_libnetgraph} \ ${_libngatm} \ Added: head/lib/lib80211/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/lib80211/Makefile Mon Nov 30 04:41:50 2015 (r291464) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +LIB= 80211 +SHLIBDIR?= /lib +SHLIB_MAJOR= 1 +SRCS= lib80211_regdomain.c lib80211_ioctl.c + +INCSDIR= ${INCLUDEDIR}/lib80211/ +INCS= lib80211_regdomain.h lib80211_ioctl.h + +MAN= lib80211.3 + +CFLAGS+=-I${.CURDIR} + +.include Added: head/lib/lib80211/lib80211.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/lib80211/lib80211.3 Mon Nov 30 04:41:50 2015 (r291464) @@ -0,0 +1,118 @@ +.\" Copyright (c) 2015 Adrian Chadd. +.\" 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$ +.\" +.Dd November 24, 2015 +.Dt 80211 3 +.Os +.Sh NAME +.Nm lib80211_alloc_regdata , +.Nm lib80211_free_regdata , +.Nm lib80211_regdomain_readconfig , +.Nm lib80211_regdomain_cleanup , +.Nm lib80211_regdomain_findbysku , +.Nm lib80211_regdomain_findbyname , +.Nm lib80211_country_findbycc , +.Nm lib80211_country_findbyname +.Nd manage net80211 configuration and regulatory database. +.Sh LIBRARY +.Lb lib80211 +.Sh SYNOPSIS +.In lib80211/lib80211_regdomain.h +.In lib80211/lib80211_ioctl.h +.Ft struct regdata * +.Fn lib80211_alloc_regdata void +.Ft void +.Fn lib80211_free_regdata "struct regdata *reg" +.Ft int +.Fn lib80211_regdomain_readconfig "struct regdata *reg" "const void *config" "size_t size" +.Ft void +.Fn lib80211_regdomain_cleanup "struct regdata *reg" +.Ft const struct regdomain * +.Fn lib80211_regdomain_findbysku "const struct regdata *reg" "enumRegDomainCode" +.Ft const struct regdomain * +.Fn lib80211_regdomain_findbyname "const struct regdata *reg" "const char *sku" +.Ft const struct country * +.Fn lib80211_country_findbycc "const struct regdata *reg" "enum ISOCountryCode" +.Ft const struct country * +.Fn lib80211_country_findbyname "const struct regdata *reg" "const char *cc" +.Sh DESCRIPTION +The +.Nm lib80211 +library is an interface to the +.Xr net80211 4 +infrastructure. +It implements wrappers around the +.Xr net80211 4 +ioctl command, as well as providing a convenient API to access the regulatory +database. +.Pp +The +.Fn lib80211_alloc_regdata +and +.Fn lib80211_free_regdata +function allocates / frees a regdata structure to store regulatory domain +information in. +.Pp +The +.Fn lib80211_regdomain_readconfig +and +.Fn lib80211_regdomain_cleanup +functions read in the regulatory database XML configuration and free it when +finished. +.Pp +The +.Fn lib80211_regdomain_findbysku +and +.Fn lib80211_regdomain_findbyname +functions lookup a regulatory domain entry by SKU enum and SKU name +respectively. +.Pp +The +.Fn lib80211_country_findbycc +and +.Fn lib80211_country_findbyname +functions lookup a country information entry by ISO country enum and +ISO country code string respectively. +.Sh RETURN VALUES +The +.Fn lib80211_alloc_regdata , +.Fn lib80211_regdomain_readconfig , +.Fn lib80211_regdomain_findbysku , +.Fn lib80211_regdomain_findbyname , +.Fn lib80211_country_findbycc , +.Fn lib80211_country_findbyname +return NULL upon error. + +.Sh SEE ALSO +.Xr ifconfig 8 , +.Xr net80211 4 +.Sh HISTORY +The +.Nm lib80211 +library first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An Adrian Chadd Added: head/lib/lib80211/lib80211_ioctl.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/lib80211/lib80211_ioctl.c Mon Nov 30 04:41:50 2015 (r291464) @@ -0,0 +1,159 @@ +/* + * Copyright 2001 The Aerospace Corporation. 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. + * 3. The name of The Aerospace Corporation may not be used to endorse or + * promote products derived from this software. + * + * THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION ``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 AEROSPACE CORPORATION 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$ + */ + +/*- + * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, + * NASA Ames Research Center. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* NB: for offsetof */ + +#include "lib80211_ioctl.h" + +/* + * These implement basic net80211 accessor methods to wrap the IOCTL + * calls. + */ + +int +lib80211_get80211(int s, const char *name, int type, void *data, int len) +{ + struct ieee80211req ireq; + + (void) memset(&ireq, 0, sizeof(ireq)); + (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); + ireq.i_type = type; + ireq.i_data = data; + ireq.i_len = len; + return ioctl(s, SIOCG80211, &ireq); +} + +int +lib80211_get80211len(int s, const char *name, int type, void *data, int len, int *plen) +{ + struct ieee80211req ireq; + + (void) memset(&ireq, 0, sizeof(ireq)); + (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); + ireq.i_type = type; + ireq.i_len = len; + assert(ireq.i_len == len); /* NB: check for 16-bit truncation */ + ireq.i_data = data; + if (ioctl(s, SIOCG80211, &ireq) < 0) + return -1; + *plen = ireq.i_len; + return 0; +} + +int +lib80211_get80211val(int s, const char *name, int type, int *val) +{ + struct ieee80211req ireq; + + (void) memset(&ireq, 0, sizeof(ireq)); + (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); + ireq.i_type = type; + if (ioctl(s, SIOCG80211, &ireq) < 0) + return -1; + *val = ireq.i_val; + return 0; +} + +int +lib80211_set80211(int s, const char *name, int type, int val, int len, void *data) +{ + struct ieee80211req ireq; + + (void) memset(&ireq, 0, sizeof(ireq)); + (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); + ireq.i_type = type; + ireq.i_val = val; + ireq.i_len = len; + assert(ireq.i_len == len); /* NB: check for 16-bit truncation */ + ireq.i_data = data; + if (ioctl(s, SIOCS80211, &ireq) < 0) + return (-1); + return (0); +} + Added: head/lib/lib80211/lib80211_ioctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/lib80211/lib80211_ioctl.h Mon Nov 30 04:41:50 2015 (r291464) @@ -0,0 +1,71 @@ +/* + * Copyright 2001 The Aerospace Corporation. 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. + * 3. The name of The Aerospace Corporation may not be used to endorse or + * promote products derived from this software. + * + * THIS SOFTWARE IS PROVIDED BY THE AEROSPACE CORPORATION ``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 AEROSPACE CORPORATION 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$ + */ + +/*- + * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, + * NASA Ames Research Center. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + */ + +#ifndef __LIB80211_IOCTL_H__ +#define __LIB80211_IOCTL_H__ + +extern int lib80211_get80211(int s, const char *name, int type, void *data, + int len); +extern int lib80211_get80211len(int s, const char *name, int type, void *data, + int len, int *plen); +extern int lib80211_get80211val(int s, const char *name, int type, int *val); +extern int lib80211_set80211(int s, const char *name, int type, int val, + int len, void *data); + +#endif /* __LIB80211_IOCTL_H__ */ Added: head/lib/lib80211/lib80211_regdomain.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/lib80211/lib80211_regdomain.c Mon Nov 30 04:41:50 2015 (r291464) @@ -0,0 +1,707 @@ +/*- + * Copyright (c) 2008 Sam Leffler, Errno Consulting + * 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 ``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 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. + */ +#ifndef lint +static const char rcsid[] = "$FreeBSD$"; +#endif /* not lint */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include "lib80211_regdomain.h" + +#include + +#define MAXLEVEL 20 + +struct mystate { + XML_Parser parser; + struct regdata *rdp; + struct regdomain *rd; /* current domain */ + struct netband *netband; /* current netband */ + struct freqband *freqband; /* current freqband */ + struct country *country; /* current country */ + netband_head *curband; /* current netband list */ + int level; + struct sbuf *sbuf[MAXLEVEL]; + int nident; +}; + +struct ident { + const void *id; + void *p; + enum { DOMAIN, COUNTRY, FREQBAND } type; +}; + +static void +start_element(void *data, const char *name, const char **attr) +{ +#define iseq(a,b) (strcasecmp(a,b) == 0) + struct mystate *mt; + const void *id, *ref, *mode; + int i; + + mt = data; + if (++mt->level == MAXLEVEL) { + /* XXX force parser to abort */ + return; + } + mt->sbuf[mt->level] = sbuf_new_auto(); + id = ref = mode = NULL; + for (i = 0; attr[i] != NULL; i += 2) { + if (iseq(attr[i], "id")) { + id = attr[i+1]; + } else if (iseq(attr[i], "ref")) { + ref = attr[i+1]; + } else if (iseq(attr[i], "mode")) { + mode = attr[i+1]; + } else + printf("%*.*s[%s = %s]\n", mt->level + 1, + mt->level + 1, "", attr[i], attr[i+1]); + } + if (iseq(name, "rd") && mt->rd == NULL) { + if (mt->country == NULL) { + mt->rd = calloc(1, sizeof(struct regdomain)); + mt->rd->name = strdup(id); + mt->nident++; + LIST_INSERT_HEAD(&mt->rdp->domains, mt->rd, next); + } else + mt->country->rd = (void *)strdup(ref); + return; + } + if (iseq(name, "defcc") && mt->rd != NULL) { + mt->rd->cc = (void *)strdup(ref); + return; + } + if (iseq(name, "netband") && mt->curband == NULL && mt->rd != NULL) { + if (mode == NULL) { + warnx("no mode for netband at line %ld", + XML_GetCurrentLineNumber(mt->parser)); + return; + } + if (iseq(mode, "11b")) + mt->curband = &mt->rd->bands_11b; + else if (iseq(mode, "11g")) + mt->curband = &mt->rd->bands_11g; + else if (iseq(mode, "11a")) + mt->curband = &mt->rd->bands_11a; + else if (iseq(mode, "11ng")) + mt->curband = &mt->rd->bands_11ng; + else if (iseq(mode, "11na")) + mt->curband = &mt->rd->bands_11na; + else + warnx("unknown mode \"%s\" at line %ld", + __DECONST(char *, mode), + XML_GetCurrentLineNumber(mt->parser)); + return; + } + if (iseq(name, "band") && mt->netband == NULL) { + if (mt->curband == NULL) { + warnx("band without enclosing netband at line %ld", + XML_GetCurrentLineNumber(mt->parser)); + return; + } + mt->netband = calloc(1, sizeof(struct netband)); + LIST_INSERT_HEAD(mt->curband, mt->netband, next); + return; + } + if (iseq(name, "freqband") && mt->freqband == NULL && mt->netband != NULL) { + /* XXX handle inlines and merge into table? */ + if (mt->netband->band != NULL) { + warnx("duplicate freqband at line %ld ignored", + XML_GetCurrentLineNumber(mt->parser)); + /* XXX complain */ + } else + mt->netband->band = (void *)strdup(ref); + return; + } + + if (iseq(name, "country") && mt->country == NULL) { + mt->country = calloc(1, sizeof(struct country)); + mt->country->isoname = strdup(id); + mt->country->code = NO_COUNTRY; + mt->nident++; + LIST_INSERT_HEAD(&mt->rdp->countries, mt->country, next); + return; + } + + if (iseq(name, "freqband") && mt->freqband == NULL) { + mt->freqband = calloc(1, sizeof(struct freqband)); + mt->freqband->id = strdup(id); + mt->nident++; + LIST_INSERT_HEAD(&mt->rdp->freqbands, mt->freqband, next); + return; + } +#undef iseq +} + +static int +decode_flag(struct mystate *mt, const char *p, int len) +{ +#define iseq(a,b) (strcasecmp(a,b) == 0) + static const struct { + const char *name; + int len; + uint32_t value; + } flags[] = { +#define FLAG(x) { #x, sizeof(#x)-1, x } + FLAG(IEEE80211_CHAN_A), + FLAG(IEEE80211_CHAN_B), + FLAG(IEEE80211_CHAN_G), + FLAG(IEEE80211_CHAN_HT20), + FLAG(IEEE80211_CHAN_HT40), + FLAG(IEEE80211_CHAN_ST), + FLAG(IEEE80211_CHAN_TURBO), + FLAG(IEEE80211_CHAN_PASSIVE), + FLAG(IEEE80211_CHAN_DFS), + FLAG(IEEE80211_CHAN_CCK), + FLAG(IEEE80211_CHAN_OFDM), + FLAG(IEEE80211_CHAN_2GHZ), + FLAG(IEEE80211_CHAN_5GHZ), + FLAG(IEEE80211_CHAN_DYN), + FLAG(IEEE80211_CHAN_GFSK), + FLAG(IEEE80211_CHAN_GSM), + FLAG(IEEE80211_CHAN_STURBO), + FLAG(IEEE80211_CHAN_HALF), + FLAG(IEEE80211_CHAN_QUARTER), + FLAG(IEEE80211_CHAN_HT40U), + FLAG(IEEE80211_CHAN_HT40D), + FLAG(IEEE80211_CHAN_4MSXMIT), + FLAG(IEEE80211_CHAN_NOADHOC), + FLAG(IEEE80211_CHAN_NOHOSTAP), + FLAG(IEEE80211_CHAN_11D), + FLAG(IEEE80211_CHAN_FHSS), + FLAG(IEEE80211_CHAN_PUREG), + FLAG(IEEE80211_CHAN_108A), + FLAG(IEEE80211_CHAN_108G), +#undef FLAG + { "ECM", 3, REQ_ECM }, + { "INDOOR", 6, REQ_INDOOR }, + { "OUTDOOR", 7, REQ_OUTDOOR }, + }; + unsigned int i; + + for (i = 0; i < nitems(flags); i++) + if (len == flags[i].len && iseq(p, flags[i].name)) + return flags[i].value; + warnx("unknown flag \"%.*s\" at line %ld ignored", + len, p, XML_GetCurrentLineNumber(mt->parser)); + return 0; +#undef iseq +} + +static void +end_element(void *data, const char *name) +{ +#define iseq(a,b) (strcasecmp(a,b) == 0) + struct mystate *mt; + int len; + char *p; + + mt = data; + sbuf_finish(mt->sbuf[mt->level]); + p = sbuf_data(mt->sbuf[mt->level]); + len = sbuf_len(mt->sbuf[mt->level]); + + /* ... */ + if (iseq(name, "freqstart") && mt->freqband != NULL) { + mt->freqband->freqStart = strtoul(p, NULL, 0); + goto done; + } + if (iseq(name, "freqend") && mt->freqband != NULL) { + mt->freqband->freqEnd = strtoul(p, NULL, 0); + goto done; + } + if (iseq(name, "chanwidth") && mt->freqband != NULL) { + mt->freqband->chanWidth = strtoul(p, NULL, 0); + goto done; + } + if (iseq(name, "chansep") && mt->freqband != NULL) { + mt->freqband->chanSep = strtoul(p, NULL, 0); + goto done; + } + if (iseq(name, "flags")) { + if (mt->freqband != NULL) + mt->freqband->flags |= decode_flag(mt, p, len); + else if (mt->netband != NULL) + mt->netband->flags |= decode_flag(mt, p, len); + else { + warnx("flags without freqband or netband at line %ld ignored", + XML_GetCurrentLineNumber(mt->parser)); + } + goto done; + } + + /* ... */ + if (iseq(name, "name") && mt->rd != NULL) { + mt->rd->name = strdup(p); + goto done; + } + if (iseq(name, "sku") && mt->rd != NULL) { + mt->rd->sku = strtoul(p, NULL, 0); + goto done; + } + if (iseq(name, "netband") && mt->rd != NULL) { + mt->curband = NULL; + goto done; + } + + /* ... */ + if (iseq(name, "freqband") && mt->netband != NULL) { + /* XXX handle inline freqbands */ + goto done; + } + if (iseq(name, "maxpower") && mt->netband != NULL) { + mt->netband->maxPower = strtoul(p, NULL, 0); + goto done; + } + if (iseq(name, "maxpowerdfs") && mt->netband != NULL) { + mt->netband->maxPowerDFS = strtoul(p, NULL, 0); + goto done; + } + if (iseq(name, "maxantgain") && mt->netband != NULL) { + mt->netband->maxAntGain = strtoul(p, NULL, 0); + goto done; + } + + /* ... */ + if (iseq(name, "isocc") && mt->country != NULL) { + mt->country->code = strtoul(p, NULL, 0); + goto done; + } + if (iseq(name, "name") && mt->country != NULL) { + mt->country->name = strdup(p); + goto done; + } + + if (len != 0) { + warnx("unexpected XML token \"%s\" data \"%s\" at line %ld", + name, p, XML_GetCurrentLineNumber(mt->parser)); + /* XXX goto done? */ + } + /* */ + if (iseq(name, "freqband") && mt->freqband != NULL) { + /* XXX must have start/end frequencies */ + /* XXX must have channel width/sep */ + mt->freqband = NULL; + goto done; + } + /* */ + if (iseq(name, "rd") && mt->rd != NULL) { + mt->rd = NULL; + goto done; + } + /* */ + if (iseq(name, "band") && mt->netband != NULL) { + if (mt->netband->band == NULL) { + warnx("no freqbands for band at line %ld", + XML_GetCurrentLineNumber(mt->parser)); + } + if (mt->netband->maxPower == 0) { + warnx("no maxpower for band at line %ld", + XML_GetCurrentLineNumber(mt->parser)); + } + /* default max power w/ DFS to max power */ + if (mt->netband->maxPowerDFS == 0) + mt->netband->maxPowerDFS = mt->netband->maxPower; + mt->netband = NULL; + goto done; + } + /* */ + if (iseq(name, "netband") && mt->netband != NULL) { + mt->curband = NULL; + goto done; + } + /* */ + if (iseq(name, "country") && mt->country != NULL) { + /* XXX NO_COUNTRY should be in the net80211 country enum */ + if ((int) mt->country->code == NO_COUNTRY) { + warnx("no ISO cc for country at line %ld", + XML_GetCurrentLineNumber(mt->parser)); + } + if (mt->country->name == NULL) { + warnx("no name for country at line %ld", + XML_GetCurrentLineNumber(mt->parser)); + } + if (mt->country->rd == NULL) { + warnx("no regdomain reference for country at line %ld", + XML_GetCurrentLineNumber(mt->parser)); + } + mt->country = NULL; + goto done; + } +done: + sbuf_delete(mt->sbuf[mt->level]); + mt->sbuf[mt->level--] = NULL; +#undef iseq +} + +static void +char_data(void *data, const XML_Char *s, int len) +{ + struct mystate *mt; + const char *b, *e; + + mt = data; + + b = s; + e = s + len-1; + for (; isspace(*b) && b < e; b++) + ; + for (; isspace(*e) && e > b; e++) + ; + if (e != b || (*b != '\0' && !isspace(*b))) + sbuf_bcat(mt->sbuf[mt->level], b, e-b+1); +} + +static void * +findid(struct regdata *rdp, const void *id, int type) +{ + struct ident *ip; + + for (ip = rdp->ident; ip->id != NULL; ip++) + if ((int) ip->type == type && strcasecmp(ip->id, id) == 0) + return ip->p; + return NULL; +} + +/* + * Parse an regdomain XML configuration and build the internal representation. + */ +int +lib80211_regdomain_readconfig(struct regdata *rdp, const void *p, size_t len) +{ + struct mystate *mt; + struct regdomain *dp; + struct country *cp; + struct freqband *fp; + struct netband *nb; + const void *id; + int i, errors; + + memset(rdp, 0, sizeof(struct regdata)); + mt = calloc(1, sizeof(struct mystate)); + if (mt == NULL) + return ENOMEM; + /* parse the XML input */ + mt->rdp = rdp; + mt->parser = XML_ParserCreate(NULL); + XML_SetUserData(mt->parser, mt); + XML_SetElementHandler(mt->parser, start_element, end_element); + XML_SetCharacterDataHandler(mt->parser, char_data); + if (XML_Parse(mt->parser, p, len, 1) != XML_STATUS_OK) { + warnx("%s: %s at line %ld", __func__, + XML_ErrorString(XML_GetErrorCode(mt->parser)), + XML_GetCurrentLineNumber(mt->parser)); + return -1; + } + XML_ParserFree(mt->parser); + + /* setup the identifer table */ + rdp->ident = calloc(sizeof(struct ident), mt->nident + 1); + if (rdp->ident == NULL) + return ENOMEM; + free(mt); + + errors = 0; + i = 0; + LIST_FOREACH(dp, &rdp->domains, next) { + rdp->ident[i].id = dp->name; + rdp->ident[i].p = dp; + rdp->ident[i].type = DOMAIN; + i++; + } + LIST_FOREACH(fp, &rdp->freqbands, next) { + rdp->ident[i].id = fp->id; + rdp->ident[i].p = fp; + rdp->ident[i].type = FREQBAND; + i++; + } + LIST_FOREACH(cp, &rdp->countries, next) { + rdp->ident[i].id = cp->isoname; + rdp->ident[i].p = cp; + rdp->ident[i].type = COUNTRY; + i++; + } + + /* patch references */ + LIST_FOREACH(dp, &rdp->domains, next) { + if (dp->cc != NULL) { + id = dp->cc; + dp->cc = findid(rdp, id, COUNTRY); + if (dp->cc == NULL) { + warnx("undefined country \"%s\"", + __DECONST(char *, id)); + errors++; + } + free(__DECONST(char *, id)); + } + LIST_FOREACH(nb, &dp->bands_11b, next) { + id = findid(rdp, nb->band, FREQBAND); + if (id == NULL) { + warnx("undefined 11b band \"%s\"", + __DECONST(char *, nb->band)); + errors++; + } + nb->band = id; + } + LIST_FOREACH(nb, &dp->bands_11g, next) { + id = findid(rdp, nb->band, FREQBAND); + if (id == NULL) { + warnx("undefined 11g band \"%s\"", + __DECONST(char *, nb->band)); + errors++; + } + nb->band = id; + } + LIST_FOREACH(nb, &dp->bands_11a, next) { + id = findid(rdp, nb->band, FREQBAND); + if (id == NULL) { + warnx("undefined 11a band \"%s\"", + __DECONST(char *, nb->band)); + errors++; + } + nb->band = id; + } + LIST_FOREACH(nb, &dp->bands_11ng, next) { + id = findid(rdp, nb->band, FREQBAND); + if (id == NULL) { + warnx("undefined 11ng band \"%s\"", + __DECONST(char *, nb->band)); + errors++; + } + nb->band = id; + } + LIST_FOREACH(nb, &dp->bands_11na, next) { + id = findid(rdp, nb->band, FREQBAND); + if (id == NULL) { + warnx("undefined 11na band \"%s\"", + __DECONST(char *, nb->band)); + errors++; + } + nb->band = id; + } + } + LIST_FOREACH(cp, &rdp->countries, next) { + id = cp->rd; + cp->rd = findid(rdp, id, DOMAIN); + if (cp->rd == NULL) { + warnx("undefined country \"%s\"", + __DECONST(char *, id)); + errors++; + } + free(__DECONST(char *, id)); + } + + return errors ? EINVAL : 0; +} + +static void +cleanup_bands(netband_head *head) +{ + struct netband *nb; + + for (;;) { + nb = LIST_FIRST(head); + if (nb == NULL) + break; + free(nb); + } +} + +/* + * Cleanup state/resources for a previously parsed regdomain database. + */ +void +lib80211_regdomain_cleanup(struct regdata *rdp) +{ + + free(rdp->ident); + rdp->ident = NULL; + for (;;) { + struct regdomain *dp = LIST_FIRST(&rdp->domains); + if (dp == NULL) + break; + LIST_REMOVE(dp, next); + cleanup_bands(&dp->bands_11b); + cleanup_bands(&dp->bands_11g); + cleanup_bands(&dp->bands_11a); + cleanup_bands(&dp->bands_11ng); + cleanup_bands(&dp->bands_11na); + if (dp->name != NULL) + free(__DECONST(char *, dp->name)); + } + for (;;) { + struct country *cp = LIST_FIRST(&rdp->countries); + if (cp == NULL) + break; + LIST_REMOVE(cp, next); + if (cp->name != NULL) + free(__DECONST(char *, cp->name)); + free(cp); + } + for (;;) { + struct freqband *fp = LIST_FIRST(&rdp->freqbands); + if (fp == NULL) + break; + LIST_REMOVE(fp, next); + free(fp); + } +} + +struct regdata * +lib80211_alloc_regdata(void) +{ + struct regdata *rdp; + struct stat sb; + void *xml; + int fd; + + rdp = calloc(1, sizeof(struct regdata)); + + fd = open(_PATH_REGDOMAIN, O_RDONLY); + if (fd < 0) { +#ifdef DEBUG + warn("%s: open(%s)", __func__, _PATH_REGDOMAIN); +#endif + free(rdp); + return NULL; + } + if (fstat(fd, &sb) < 0) { +#ifdef DEBUG + warn("%s: fstat(%s)", __func__, _PATH_REGDOMAIN); +#endif + close(fd); + free(rdp); + return NULL; + } + xml = mmap(NULL, sb.st_size, PROT_READ, MAP_PRIVATE, fd, 0); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Nov 30 04:59:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CFB0A3C910; Mon, 30 Nov 2015 04:59:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2ECBC130A; Mon, 30 Nov 2015 04:59:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU4x191069945; Mon, 30 Nov 2015 04:59:01 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU4x1qG069944; Mon, 30 Nov 2015 04:59:01 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511300459.tAU4x1qG069944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 30 Nov 2015 04:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291465 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 04:59:02 -0000 Author: adrian Date: Mon Nov 30 04:59:01 2015 New Revision: 291465 URL: https://svnweb.freebsd.org/changeset/base/291465 Log: Add lib80211 to include path. (This commit was missing from my lib80211 commit.) Modified: head/etc/mtree/BSD.include.dist Modified: head/etc/mtree/BSD.include.dist ============================================================================== --- head/etc/mtree/BSD.include.dist Mon Nov 30 04:41:50 2015 (r291464) +++ head/etc/mtree/BSD.include.dist Mon Nov 30 04:59:01 2015 (r291465) @@ -241,6 +241,8 @@ .. krb5 .. + lib80211 + .. libmilter .. libxo From owner-svn-src-all@freebsd.org Mon Nov 30 05:51:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50915A312B4; Mon, 30 Nov 2015 05:51:16 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16E4C18DF; Mon, 30 Nov 2015 05:51:16 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU5pFKg085966; Mon, 30 Nov 2015 05:51:15 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU5pELW085961; Mon, 30 Nov 2015 05:51:14 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201511300551.tAU5pELW085961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 30 Nov 2015 05:51:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291466 - in head/sys: net netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 05:51:16 -0000 Author: melifaro Date: Mon Nov 30 05:51:14 2015 New Revision: 291466 URL: https://svnweb.freebsd.org/changeset/base/291466 Log: Add new rt_foreach_fib_walk_del() function for deleting route entries by filter function instead of picking into routing table details in each consumer. Remove now-unused rt_expunge() (eliminating last external RTF_RNH_LOCKED user). This simplifies future nexthops/mulitipath changes and rtrequest1_fib() locking refactoring. Actual changes: Add "rt_chain" field to permit rte grouping while doing batched delete from routing table (thus growing rte 200->208 on amd64). Add "rti_filter" / "rti_filterdata" / "rti_spare" fields to rt_addrinfo to pass filter function to various routing subsystems in standard way. Convert all rt_expunge() customers to new rt_addinfo-based api and eliminate rt_expunge(). Modified: head/sys/net/route.c head/sys/net/route.h head/sys/netinet/in_rmx.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_rtr.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Mon Nov 30 04:59:01 2015 (r291465) +++ head/sys/net/route.c Mon Nov 30 05:51:14 2015 (r291466) @@ -139,7 +139,14 @@ static VNET_DEFINE(uma_zone_t, rtzone); static int rtrequest1_fib_change(struct radix_node_head *, struct rt_addrinfo *, struct rtentry **, u_int); static void rt_setmetrics(const struct rt_addrinfo *, struct rtentry *); -static int rt_ifdelroute(struct rtentry *rt, void *arg); +static int rt_ifdelroute(const struct rtentry *rt, void *arg); +static struct rtentry *rt_unlinkrte(struct radix_node_head *rnh, + struct rt_addrinfo *info, int *perror); +static void rt_notifydelete(struct rtentry *rt, struct rt_addrinfo *info); +#ifdef RADIX_MPATH +static struct radix_node *rt_mpath_unlink(struct radix_node_head *rnh, + struct rt_addrinfo *info, struct rtentry *rto, int *perror); +#endif struct if_mtuinfo { @@ -237,6 +244,7 @@ rtentry_ctor(void *mem, int size, void * bzero(rt, offsetof(struct rtentry, rt_endzero)); counter_u64_zero(rt->rt_pksent); + rt->rt_chain = NULL; return (0); } @@ -867,6 +875,108 @@ rt_foreach_fib_walk(int af, rt_setwarg_t } } +struct rt_delinfo +{ + struct rt_addrinfo info; + struct radix_node_head *rnh; + struct rtentry *head; +}; + +/* + * Conditionally unlinks @rn from radix tree based + * on info data passed in @arg. + */ +static int +rt_checkdelroute(struct radix_node *rn, void *arg) +{ + struct rt_delinfo *di; + struct rt_addrinfo *info; + struct rtentry *rt; + int error; + + di = (struct rt_delinfo *)arg; + rt = (struct rtentry *)rn; + info = &di->info; + error = 0; + + info->rti_info[RTAX_DST] = rt_key(rt); + info->rti_info[RTAX_NETMASK] = rt_mask(rt); + info->rti_info[RTAX_GATEWAY] = rt->rt_gateway; + + rt = rt_unlinkrte(di->rnh, info, &error); + if (rt == NULL) { + /* Either not allowed or not matched. Skip entry */ + return (0); + } + + /* Entry was unlinked. Add to the list and return */ + rt->rt_chain = di->head; + di->head = rt; + + return (0); +} + +/* + * Iterates over all existing fibs in system. + * Deletes each element for which @filter_f function returned + * non-zero value. + * If @af is not AF_UNSPEC, iterates over fibs in particular + * address family. + */ +void +rt_foreach_fib_walk_del(int af, rt_filter_f_t *filter_f, void *arg) +{ + struct radix_node_head *rnh; + struct rt_delinfo di; + struct rtentry *rt; + uint32_t fibnum; + int i, start, end; + + bzero(&di, sizeof(di)); + di.info.rti_filter = filter_f; + di.info.rti_filterdata = arg; + + for (fibnum = 0; fibnum < rt_numfibs; fibnum++) { + /* Do we want some specific family? */ + if (af != AF_UNSPEC) { + start = af; + end = af; + } else { + start = 1; + end = AF_MAX; + } + + for (i = start; i <= end; i++) { + rnh = rt_tables_get_rnh(fibnum, i); + if (rnh == NULL) + continue; + di.rnh = rnh; + + RADIX_NODE_HEAD_LOCK(rnh); + rnh->rnh_walktree(rnh, rt_checkdelroute, &di); + RADIX_NODE_HEAD_UNLOCK(rnh); + + if (di.head == NULL) + continue; + + /* We might have something to reclaim */ + while (di.head != NULL) { + rt = di.head; + di.head = rt->rt_chain; + rt->rt_chain = NULL; + + /* TODO std rt -> rt_addrinfo export */ + di.info.rti_info[RTAX_DST] = rt_key(rt); + di.info.rti_info[RTAX_NETMASK] = rt_mask(rt); + + rt_notifydelete(rt, &di.info); + RTFREE_LOCKED(rt); + } + + } + } +} + /* * Delete Routes for a Network Interface * @@ -882,10 +992,9 @@ rt_foreach_fib_walk(int af, rt_setwarg_t * errno failed - reason indicated */ static int -rt_ifdelroute(struct rtentry *rt, void *arg) +rt_ifdelroute(const struct rtentry *rt, void *arg) { struct ifnet *ifp = arg; - int err; if (rt->rt_ifp != ifp) return (0); @@ -897,14 +1006,7 @@ rt_ifdelroute(struct rtentry *rt, void * if ((rt->rt_flags & RTF_UP) == 0) return (0); - err = rtrequest_fib(RTM_DELETE, rt_key(rt), rt->rt_gateway, - rt_mask(rt), - rt->rt_flags | RTF_RNH_LOCKED | RTF_PINNED, - (struct rtentry **) NULL, rt->rt_fibnum); - if (err != 0) - log(LOG_WARNING, "rt_ifdelroute: error %d\n", err); - - return (0); + return (1); } /* @@ -917,9 +1019,105 @@ void rt_flushifroutes(struct ifnet *ifp) { - rt_foreach_fib_walk(AF_UNSPEC, NULL, rt_ifdelroute, ifp); + rt_foreach_fib_walk_del(AF_UNSPEC, rt_ifdelroute, ifp); +} + +/* + * Conditionally unlinks rtentry matching data inside @info from @rnh. + * Returns unlinked, locked and referenced @rtentry on success, + * Returns NULL and sets @perror to: + * ESRCH - if prefix was not found, + * EADDRINUSE - if trying to delete PINNED route without appropriate flag. + * ENOENT - if supplied filter function returned 0 (not matched). + */ +static struct rtentry * +rt_unlinkrte(struct radix_node_head *rnh, struct rt_addrinfo *info, int *perror) +{ + struct sockaddr *dst, *netmask; + struct rtentry *rt; + struct radix_node *rn; + + dst = info->rti_info[RTAX_DST]; + netmask = info->rti_info[RTAX_NETMASK]; + + rt = (struct rtentry *)rnh->rnh_lookup(dst, netmask, rnh); + if (rt == NULL) { + *perror = ESRCH; + return (NULL); + } + + if ((info->rti_flags & RTF_PINNED) == 0) { + /* Check if target route can be deleted */ + if (rt->rt_flags & RTF_PINNED) { + *perror = EADDRINUSE; + return (NULL); + } + } + + if (info->rti_filter != NULL) { + if (info->rti_filter(rt, info->rti_filterdata) == 0) { + /* Not matched */ + *perror = ENOENT; + return (NULL); + } + + /* + * Filter function requested rte deletion. + * Ease the caller work by filling in remaining info + * from that particular entry. + */ + info->rti_info[RTAX_GATEWAY] = rt->rt_gateway; + } + + /* + * Remove the item from the tree and return it. + * Complain if it is not there and do no more processing. + */ + *perror = ESRCH; +#ifdef RADIX_MPATH + if (rn_mpath_capable(rnh)) + rn = rt_mpath_unlink(rnh, info, rt, perror); + else +#endif + rn = rnh->rnh_deladdr(dst, netmask, rnh); + if (rn == NULL) + return (NULL); + + if (rn->rn_flags & (RNF_ACTIVE | RNF_ROOT)) + panic ("rtrequest delete"); + + rt = RNTORT(rn); + RT_LOCK(rt); + RT_ADDREF(rt); + + *perror = 0; + + return (rt); +} + +static void +rt_notifydelete(struct rtentry *rt, struct rt_addrinfo *info) +{ + struct ifaddr *ifa; + + rt->rt_flags &= ~RTF_UP; + + /* + * give the protocol a chance to keep things in sync. + */ + ifa = rt->rt_ifa; + if (ifa != NULL && ifa->ifa_rtrequest != NULL) + ifa->ifa_rtrequest(RTM_DELETE, rt, info); + + /* + * One more rtentry floating around that is not + * linked to the routing table. rttrash will be decremented + * when RTFREE(rt) is eventually called. + */ + V_rttrash++; } + /* * These (questionable) definitions of apparent local variables apply * to the next two functions. XXXXXX!!! @@ -975,87 +1173,6 @@ rt_getifa_fib(struct rt_addrinfo *info, return (error); } -/* - * Expunges references to a route that's about to be reclaimed. - * The route must be locked. - */ -int -rt_expunge(struct radix_node_head *rnh, struct rtentry *rt) -{ -#if !defined(RADIX_MPATH) - struct radix_node *rn; -#else - struct rt_addrinfo info; - int fib; - struct rtentry *rt0; -#endif - struct ifaddr *ifa; - int error = 0; - - RT_LOCK_ASSERT(rt); - RADIX_NODE_HEAD_LOCK_ASSERT(rnh); - -#ifdef RADIX_MPATH - fib = rt->rt_fibnum; - bzero(&info, sizeof(info)); - info.rti_ifp = rt->rt_ifp; - info.rti_flags = RTF_RNH_LOCKED; - info.rti_info[RTAX_DST] = rt_key(rt); - info.rti_info[RTAX_GATEWAY] = rt->rt_ifa->ifa_addr; - - RT_UNLOCK(rt); - error = rtrequest1_fib(RTM_DELETE, &info, &rt0, fib); - - if (error == 0 && rt0 != NULL) { - rt = rt0; - RT_LOCK(rt); - } else if (error != 0) { - RT_LOCK(rt); - return (error); - } -#else - /* - * Remove the item from the tree; it should be there, - * but when callers invoke us blindly it may not (sigh). - */ - rn = rnh->rnh_deladdr(rt_key(rt), rt_mask(rt), rnh); - if (rn == NULL) { - error = ESRCH; - goto bad; - } - KASSERT((rn->rn_flags & (RNF_ACTIVE | RNF_ROOT)) == 0, - ("unexpected flags 0x%x", rn->rn_flags)); - KASSERT(rt == RNTORT(rn), - ("lookup mismatch, rt %p rn %p", rt, rn)); -#endif /* RADIX_MPATH */ - - rt->rt_flags &= ~RTF_UP; - - /* - * Give the protocol a chance to keep things in sync. - */ - if ((ifa = rt->rt_ifa) && ifa->ifa_rtrequest) { - struct rt_addrinfo info; - - bzero((caddr_t)&info, sizeof(info)); - info.rti_flags = rt->rt_flags; - info.rti_info[RTAX_DST] = rt_key(rt); - info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; - info.rti_info[RTAX_NETMASK] = rt_mask(rt); - ifa->ifa_rtrequest(RTM_DELETE, rt, &info); - } - - /* - * one more rtentry floating around that is not - * linked to the routing table. - */ - V_rttrash++; -#if !defined(RADIX_MPATH) -bad: -#endif - return (error); -} - static int if_updatemtu_cb(struct radix_node *rn, void *arg) { @@ -1172,26 +1289,32 @@ rt_print(char *buf, int buflen, struct r #endif #ifdef RADIX_MPATH -static int -rn_mpath_update(int req, struct rt_addrinfo *info, - struct radix_node_head *rnh, struct rtentry **ret_nrt) +/* + * Deletes key for single-path routes, unlinks rtentry with + * gateway specified in @info from multi-path routes. + * + * Returnes unlinked entry. In case of failure, returns NULL + * and sets @perror to ESRCH. + */ +static struct radix_node * +rt_mpath_unlink(struct radix_node_head *rnh, struct rt_addrinfo *info, + struct rtentry *rto, int *perror) { /* * if we got multipath routes, we require users to specify * a matching RTAX_GATEWAY. */ - struct rtentry *rt, *rto = NULL; + struct rtentry *rt; // *rto = NULL; struct radix_node *rn; - int error = 0; + struct sockaddr *gw; - rn = rnh->rnh_lookup(dst, netmask, rnh); - if (rn == NULL) - return (ESRCH); - rto = rt = RNTORT(rn); + gw = info->rti_info[RTAX_GATEWAY]; + rt = rt_mpath_matchgate(rto, gw); + if (rt == NULL) { + *perror = ESRCH; + return (NULL); + } - rt = rt_mpath_matchgate(rt, gateway); - if (rt == NULL) - return (ESRCH); /* * this is the first entry in the chain */ @@ -1214,67 +1337,31 @@ rn_mpath_update(int req, struct rt_addri * check the case when there is only * one route in the chain. */ - if (gateway && - (rt->rt_gateway->sa_len != gateway->sa_len || - memcmp(rt->rt_gateway, gateway, gateway->sa_len))) - error = ESRCH; - else { - /* - * remove from tree before returning it - * to the caller - */ - rn = rnh->rnh_deladdr(dst, netmask, rnh); - KASSERT(rt == RNTORT(rn), ("radix node disappeared")); - goto gwdelete; + if (gw && + (rt->rt_gateway->sa_len != gw->sa_len || + memcmp(rt->rt_gateway, gw, gw->sa_len))) { + *perror = ESRCH; + return (NULL); } - } + /* * use the normal delete code to remove * the first entry */ - if (req != RTM_DELETE) - goto nondelete; - - error = ENOENT; - goto done; + rn = rnh->rnh_deladdr(dst, netmask, rnh); + *perror = 0; + return (rn); } /* * if the entry is 2nd and on up */ - if ((req == RTM_DELETE) && !rt_mpath_deldup(rto, rt)) + if (rt_mpath_deldup(rto, rt) == 0) panic ("rtrequest1: rt_mpath_deldup"); -gwdelete: - RT_LOCK(rt); - RT_ADDREF(rt); - if (req == RTM_DELETE) { - rt->rt_flags &= ~RTF_UP; - /* - * One more rtentry floating around that is not - * linked to the routing table. rttrash will be decremented - * when RTFREE(rt) is eventually called. - */ - V_rttrash++; - } - -nondelete: - if (req != RTM_DELETE) - panic("unrecognized request %d", req); - - - /* - * If the caller wants it, then it can have it, - * but it's up to it to free the rtentry as we won't be - * doing it. - */ - if (ret_nrt) { - *ret_nrt = rt; - RT_UNLOCK(rt); - } else - RTFREE_LOCKED(rt); -done: - return (error); + *perror = 0; + rn = (struct radix_node *)rt; + return (rn); } #endif @@ -1330,52 +1417,12 @@ rtrequest1_fib(int req, struct rt_addrin rt_maskedcopy(dst, (struct sockaddr *)&mdst, netmask); dst = (struct sockaddr *)&mdst; } -#ifdef RADIX_MPATH - if (rn_mpath_capable(rnh)) { - error = rn_mpath_update(req, info, rnh, ret_nrt); - /* - * "bad" holds true for the success case - * as well - */ - if (error != ENOENT) - goto bad; - error = 0; - } -#endif - if ((flags & RTF_PINNED) == 0) { - /* Check if target route can be deleted */ - rt = (struct rtentry *)rnh->rnh_lookup(dst, - netmask, rnh); - if ((rt != NULL) && (rt->rt_flags & RTF_PINNED)) - senderr(EADDRINUSE); - } - /* - * Remove the item from the tree and return it. - * Complain if it is not there and do no more processing. - */ - rn = rnh->rnh_deladdr(dst, netmask, rnh); - if (rn == NULL) - senderr(ESRCH); - if (rn->rn_flags & (RNF_ACTIVE | RNF_ROOT)) - panic ("rtrequest delete"); - rt = RNTORT(rn); - RT_LOCK(rt); - RT_ADDREF(rt); - rt->rt_flags &= ~RTF_UP; - - /* - * give the protocol a chance to keep things in sync. - */ - if ((ifa = rt->rt_ifa) && ifa->ifa_rtrequest) - ifa->ifa_rtrequest(RTM_DELETE, rt, info); + rt = rt_unlinkrte(rnh, info, &error); + if (error != 0) + goto bad; - /* - * One more rtentry floating around that is not - * linked to the routing table. rttrash will be decremented - * when RTFREE(rt) is eventually called. - */ - V_rttrash++; + rt_notifydelete(rt, info); /* * If the caller wants it, then it can have it, Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Mon Nov 30 04:59:01 2015 (r291465) +++ head/sys/net/route.h Mon Nov 30 05:51:14 2015 (r291466) @@ -128,6 +128,7 @@ struct rtentry { #define rt_endzero rt_pksent counter_u64_t rt_pksent; /* packets sent using this route */ struct mtx rt_mtx; /* mutex for routing entry */ + struct rtentry *rt_chain; /* pointer to next rtentry to delete */ }; #endif /* _KERNEL || _WANT_RTENTRY */ @@ -259,14 +260,19 @@ struct rt_msghdr { #define RTAX_BRD 7 /* for NEWADDR, broadcast or p-p dest addr */ #define RTAX_MAX 8 /* size of array to allocate */ +typedef int rt_filter_f_t(const struct rtentry *, void *); + struct rt_addrinfo { - int rti_addrs; - struct sockaddr *rti_info[RTAX_MAX]; - int rti_flags; - struct ifaddr *rti_ifa; - struct ifnet *rti_ifp; - u_long rti_mflags; - struct rt_metrics *rti_rmx; + int rti_addrs; /* Route RTF_ flags */ + int rti_flags; /* Route RTF_ flags */ + struct sockaddr *rti_info[RTAX_MAX]; /* Sockaddr data */ + struct ifaddr *rti_ifa; /* value of rt_ifa addr */ + struct ifnet *rti_ifp; /* route interface */ + rt_filter_f_t *rti_filter; /* filter function */ + void *rti_filterdata; /* filter paramenters */ + u_long rti_mflags; /* metrics RTV_ flags */ + u_long rti_spare; /* Will be used for fib */ + struct rt_metrics *rti_rmx; /* Pointer to route metrics */ }; /* @@ -383,6 +389,7 @@ void rt_updatemtu(struct ifnet *); typedef int rt_walktree_f_t(struct rtentry *, void *); typedef void rt_setwarg_t(struct radix_node_head *, uint32_t, int, void *); void rt_foreach_fib_walk(int af, rt_setwarg_t *, rt_walktree_f_t *, void *); +void rt_foreach_fib_walk_del(int af, rt_filter_f_t *filter_f, void *arg); void rt_flushifroutes(struct ifnet *ifp); /* XXX MRT COMPAT VERSIONS THAT SET UNIVERSE to 0 */ Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Mon Nov 30 04:59:01 2015 (r291465) +++ head/sys/netinet/in_rmx.c Mon Nov 30 05:51:14 2015 (r291466) @@ -150,56 +150,22 @@ in_detachhead(void **head, int off) * plug back in. */ struct in_ifadown_arg { - struct radix_node_head *rnh; struct ifaddr *ifa; int del; }; static int -in_ifadownkill(struct rtentry *rt, void *xap) +in_ifadownkill(const struct rtentry *rt, void *xap) { struct in_ifadown_arg *ap = xap; - RT_LOCK(rt); - if (rt->rt_ifa == ap->ifa && - (ap->del || !(rt->rt_flags & RTF_STATIC))) { - /* - * Aquire a reference so that it can later be freed - * as the refcount would be 0 here in case of at least - * ap->del. - */ - RT_ADDREF(rt); - /* - * Disconnect it from the tree and permit protocols - * to cleanup. - */ - rt_expunge(ap->rnh, rt); - /* - * At this point it is an rttrash node, and in case - * the above is the only reference we must free it. - * If we do not noone will have a pointer and the - * rtentry will be leaked forever. - * In case someone else holds a reference, we are - * fine as we only decrement the refcount. In that - * case if the other entity calls RT_REMREF, we - * will still be leaking but at least we tried. - */ - RTFREE_LOCKED(rt); + if (rt->rt_ifa != ap->ifa) return (0); - } - RT_UNLOCK(rt); - return 0; -} - -static void -in_setifarnh(struct radix_node_head *rnh, uint32_t fibnum, int af, - void *_arg) -{ - struct in_ifadown_arg *arg; - arg = (struct in_ifadown_arg *)_arg; + if ((rt->rt_flags & RTF_STATIC) != 0 && ap->del == 0) + return (0); - arg->rnh = rnh; + return (1); } void @@ -213,7 +179,7 @@ in_ifadown(struct ifaddr *ifa, int delet arg.ifa = ifa; arg.del = delete; - rt_foreach_fib_walk(AF_INET, in_setifarnh, in_ifadownkill, &arg); + rt_foreach_fib_walk_del(AF_INET, in_ifadownkill, &arg); ifa->ifa_flags &= ~IFA_ROUTE; /* XXXlocking? */ } Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Mon Nov 30 04:59:01 2015 (r291465) +++ head/sys/netinet6/nd6.c Mon Nov 30 05:51:14 2015 (r291466) @@ -1307,6 +1307,15 @@ nd6_free(struct llentry *ln, int gc) llentry_free(ln); } +static int +nd6_isdynrte(const struct rtentry *rt, void *xap) +{ + + if (rt->rt_flags == (RTF_UP | RTF_HOST | RTF_DYNAMIC)) + return (1); + + return (0); +} /* * Remove the rtentry for the given llentry, * both of which were installed by a redirect. @@ -1315,26 +1324,16 @@ static void nd6_free_redirect(const struct llentry *ln) { int fibnum; - struct rtentry *rt; - struct radix_node_head *rnh; struct sockaddr_in6 sin6; + struct rt_addrinfo info; lltable_fill_sa_entry(ln, (struct sockaddr *)&sin6); - for (fibnum = 0; fibnum < rt_numfibs; fibnum++) { - rnh = rt_tables_get_rnh(fibnum, AF_INET6); - if (rnh == NULL) - continue; + memset(&info, 0, sizeof(info)); + info.rti_info[RTAX_DST] = (struct sockaddr *)&sin6; + info.rti_filter = nd6_isdynrte; - RADIX_NODE_HEAD_LOCK(rnh); - rt = in6_rtalloc1((struct sockaddr *)&sin6, 0, - RTF_RNH_LOCKED, fibnum); - if (rt) { - if (rt->rt_flags == (RTF_UP | RTF_HOST | RTF_DYNAMIC)) - rt_expunge(rnh, rt); - RTFREE_LOCKED(rt); - } - RADIX_NODE_HEAD_UNLOCK(rnh); - } + for (fibnum = 0; fibnum < rt_numfibs; fibnum++) + rtrequest1_fib(RTM_DELETE, &info, NULL, fibnum); } /* Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Mon Nov 30 04:59:01 2015 (r291465) +++ head/sys/netinet6/nd6_rtr.c Mon Nov 30 05:51:14 2015 (r291466) @@ -88,7 +88,7 @@ static void in6_init_address_ltimes(stru static int nd6_prefix_onlink(struct nd_prefix *); static int nd6_prefix_offlink(struct nd_prefix *); -static int rt6_deleteroute(struct rtentry *, void *); +static int rt6_deleteroute(const struct rtentry *, void *); VNET_DECLARE(int, nd6_recalc_reachtm_interval); #define V_nd6_recalc_reachtm_interval VNET(nd6_recalc_reachtm_interval) @@ -2073,11 +2073,11 @@ rt6_flush(struct in6_addr *gateway, stru return; /* XXX Do we really need to walk any but the default FIB? */ - rt_foreach_fib_walk(AF_INET6, NULL, rt6_deleteroute, (void *)gateway); + rt_foreach_fib_walk_del(AF_INET6, rt6_deleteroute, (void *)gateway); } static int -rt6_deleteroute(struct rtentry *rt, void *arg) +rt6_deleteroute(const struct rtentry *rt, void *arg) { #define SIN6(s) ((struct sockaddr_in6 *)s) struct in6_addr *gate = (struct in6_addr *)arg; @@ -2104,8 +2104,7 @@ rt6_deleteroute(struct rtentry *rt, void if ((rt->rt_flags & RTF_HOST) == 0) return (0); - return (in6_rtrequest(RTM_DELETE, rt_key(rt), rt->rt_gateway, - rt_mask(rt), rt->rt_flags | RTF_RNH_LOCKED, NULL, rt->rt_fibnum)); + return (1); #undef SIN6 } From owner-svn-src-all@freebsd.org Mon Nov 30 05:59:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67E7BA31470; Mon, 30 Nov 2015 05:59:23 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DADA1CD8; Mon, 30 Nov 2015 05:59:23 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU5xM2m088091; Mon, 30 Nov 2015 05:59:22 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU5xMIo088090; Mon, 30 Nov 2015 05:59:22 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201511300559.tAU5xMIo088090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 30 Nov 2015 05:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291467 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 05:59:23 -0000 Author: melifaro Date: Mon Nov 30 05:59:22 2015 New Revision: 291467 URL: https://svnweb.freebsd.org/changeset/base/291467 Log: Move flowtable rte checks to separate function. Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Mon Nov 30 05:51:14 2015 (r291466) +++ head/sys/net/route.c Mon Nov 30 05:59:22 2015 (r291467) @@ -1365,6 +1365,68 @@ rt_mpath_unlink(struct radix_node_head * } #endif +#ifdef FLOWTABLE +static struct rtentry * +rt_flowtable_check_route(struct radix_node_head *rnh, struct rt_addrinfo *info) +{ + struct radix_node *rn; + struct rtentry *rt0; + + rt0 = NULL; + /* "flow-table" only supports IPv6 and IPv4 at the moment. */ + switch (dst->sa_family) { +#ifdef INET6 + case AF_INET6: +#endif +#ifdef INET + case AF_INET: +#endif +#if defined(INET6) || defined(INET) + rn = rnh->rnh_matchaddr(dst, rnh); + if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) { + struct sockaddr *mask; + u_char *m, *n; + int len; + + /* + * compare mask to see if the new route is + * more specific than the existing one + */ + rt0 = RNTORT(rn); + RT_LOCK(rt0); + RT_ADDREF(rt0); + RT_UNLOCK(rt0); + /* + * A host route is already present, so + * leave the flow-table entries as is. + */ + if (rt0->rt_flags & RTF_HOST) { + RTFREE(rt0); + rt0 = NULL; + } else if (!(flags & RTF_HOST) && netmask) { + mask = rt_mask(rt0); + len = mask->sa_len; + m = (u_char *)mask; + n = (u_char *)netmask; + while (len-- > 0) { + if (*n != *m) + break; + n++; + m++; + } + if (len == 0 || (*n < *m)) { + RTFREE(rt0); + rt0 = NULL; + } + } + } +#endif/* INET6 || INET */ + } + + return (rt0); +} +#endif + int rtrequest1_fib(int req, struct rt_addrinfo *info, struct rtentry **ret_nrt, u_int fibnum) @@ -1508,56 +1570,7 @@ rtrequest1_fib(int req, struct rt_addrin #endif #ifdef FLOWTABLE - rt0 = NULL; - /* "flow-table" only supports IPv6 and IPv4 at the moment. */ - switch (dst->sa_family) { -#ifdef INET6 - case AF_INET6: -#endif -#ifdef INET - case AF_INET: -#endif -#if defined(INET6) || defined(INET) - rn = rnh->rnh_matchaddr(dst, rnh); - if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) { - struct sockaddr *mask; - u_char *m, *n; - int len; - - /* - * compare mask to see if the new route is - * more specific than the existing one - */ - rt0 = RNTORT(rn); - RT_LOCK(rt0); - RT_ADDREF(rt0); - RT_UNLOCK(rt0); - /* - * A host route is already present, so - * leave the flow-table entries as is. - */ - if (rt0->rt_flags & RTF_HOST) { - RTFREE(rt0); - rt0 = NULL; - } else if (!(flags & RTF_HOST) && netmask) { - mask = rt_mask(rt0); - len = mask->sa_len; - m = (u_char *)mask; - n = (u_char *)netmask; - while (len-- > 0) { - if (*n != *m) - break; - n++; - m++; - } - if (len == 0 || (*n < *m)) { - RTFREE(rt0); - rt0 = NULL; - } - } - } -#endif/* INET6 || INET */ - } + rt0 = rt_flowtable_check_route(rnh, info); #endif /* FLOWTABLE */ /* XXX mtu manipulation will be done in rnh_addaddr -- itojun */ From owner-svn-src-all@freebsd.org Mon Nov 30 06:02:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2154DA315D9; Mon, 30 Nov 2015 06:02:37 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E34021046; Mon, 30 Nov 2015 06:02:36 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU62a6x090816; Mon, 30 Nov 2015 06:02:36 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU62aTm090815; Mon, 30 Nov 2015 06:02:36 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201511300602.tAU62aTm090815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 30 Nov 2015 06:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291468 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 06:02:37 -0000 Author: melifaro Date: Mon Nov 30 06:02:35 2015 New Revision: 291468 URL: https://svnweb.freebsd.org/changeset/base/291468 Log: Remove in_setifarnh definition. Modified: head/sys/netinet/in_rmx.c Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Mon Nov 30 05:59:22 2015 (r291467) +++ head/sys/netinet/in_rmx.c Mon Nov 30 06:02:35 2015 (r291468) @@ -53,9 +53,6 @@ extern int in_inithead(void **head, int extern int in_detachhead(void **head, int off); #endif -static void in_setifarnh(struct radix_node_head *rnh, uint32_t fibnum, - int af, void *_arg); - /* * Do what we need to do when inserting a route. */ From owner-svn-src-all@freebsd.org Mon Nov 30 06:27:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F344EA3197D; Mon, 30 Nov 2015 06:27:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C45A31881; Mon, 30 Nov 2015 06:27:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU6Qxrk096730; Mon, 30 Nov 2015 06:26:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU6Qx9n096727; Mon, 30 Nov 2015 06:26:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511300626.tAU6Qx9n096727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 30 Nov 2015 06:26:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291469 - in head/sys: contrib/dev/ath/ath_hal/ar9300 dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 06:27:01 -0000 Author: adrian Date: Mon Nov 30 06:26:59 2015 New Revision: 291469 URL: https://svnweb.freebsd.org/changeset/base/291469 Log: fix ht/40 configuration for ar9331 (hornet). The synth programming here requires the real centre frequency, which for HT20 channels is the normal channel, but HT40 is /not/ the primary channel. Everything else was using 'freq', which is the correct centre frequency, but the hornet config was using 'ichan' to do the lookup which was also the primary channel. So, modify the HAL call that does the mapping to take a frequency in MHz and return the channel number. Tested: * Carambola 2, AR9331, tested both HT/20 and HT/40 operation. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c Mon Nov 30 06:02:35 2015 (r291468) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c Mon Nov 30 06:26:59 2015 (r291469) @@ -99,7 +99,6 @@ ar9300_set_channel(struct ath_hal *ah, s ar9300_get_channel_centers(ah, chan, ¢ers); freq = centers.synth_center; - if (freq < 4800) { /* 2 GHz, fractional mode */ b_mode = 1; /* 2 GHz */ @@ -116,7 +115,19 @@ ar9300_set_channel(struct ath_hal *ah, s #endif uint32_t i; - i = ath_hal_mhz2ieee_2ghz(ah, ichan); + /* + * Pay close attention to this bit! + * + * We need to map the actual desired synth frequency to + * one of the channel select array entries. + * + * For HT20, it'll align with the channel we select. + * + * For HT40 though it won't - the centre frequency + * will not be the frequency of chan->ic_freq or ichan->freq; + * it needs to be whatever frequency maps to 'freq'. + */ + i = ath_hal_mhz2ieee_2ghz(ah, freq); HALASSERT(i > 0 && i <= 14); if (clk_25mhz) { channel_sel = ar9300_chansel_xtal_25M[i - 1]; Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Mon Nov 30 06:02:35 2015 (r291468) +++ head/sys/dev/ath/ath_hal/ah.c Mon Nov 30 06:26:59 2015 (r291469) @@ -1431,15 +1431,15 @@ ath_hal_EepromDataRead(struct ath_hal *a * This is the unmapped frequency which is programmed into the hardware. */ int -ath_hal_mhz2ieee_2ghz(struct ath_hal *ah, HAL_CHANNEL_INTERNAL *ichan) +ath_hal_mhz2ieee_2ghz(struct ath_hal *ah, int freq) { - if (ichan->channel == 2484) + if (freq == 2484) return 14; - if (ichan->channel < 2484) - return ((int) ichan->channel - 2407) / 5; + if (freq < 2484) + return ((int) freq - 2407) / 5; else - return 15 + ((ichan->channel - 2512) / 20); + return 15 + ((freq - 2512) / 20); } /* Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Mon Nov 30 06:02:35 2015 (r291468) +++ head/sys/dev/ath/ath_hal/ah_internal.h Mon Nov 30 06:26:59 2015 (r291469) @@ -1031,7 +1031,7 @@ ath_hal_getantennaallowed(struct ath_hal /* * Map the given 2GHz channel to an IEEE number. */ -extern int ath_hal_mhz2ieee_2ghz(struct ath_hal *, HAL_CHANNEL_INTERNAL *); +extern int ath_hal_mhz2ieee_2ghz(struct ath_hal *, int freq); /* * Clear the channel survey data. From owner-svn-src-all@freebsd.org Mon Nov 30 06:34:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E256A31C18; Mon, 30 Nov 2015 06:34:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC1B31C15; Mon, 30 Nov 2015 06:34:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU6YHRt099455; Mon, 30 Nov 2015 06:34:17 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU6YHHY099453; Mon, 30 Nov 2015 06:34:17 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511300634.tAU6YHHY099453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 30 Nov 2015 06:34:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291470 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 06:34:18 -0000 Author: adrian Date: Mon Nov 30 06:34:16 2015 New Revision: 291470 URL: https://svnweb.freebsd.org/changeset/base/291470 Log: Convert ifconfig to use lib80211. * remove regdomain.[ch] - it's now part of lib80211. * convert ifieee80211.c to use the ioctl routines in lib80211 and implement the "error? exit" wrapper behaviour the callers expect. Deleted: head/sbin/ifconfig/regdomain.c head/sbin/ifconfig/regdomain.h Modified: head/sbin/ifconfig/Makefile head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/Makefile ============================================================================== --- head/sbin/ifconfig/Makefile Mon Nov 30 06:26:59 2015 (r291469) +++ head/sbin/ifconfig/Makefile Mon Nov 30 06:34:16 2015 (r291470) @@ -37,8 +37,8 @@ SRCS+= ifgif.c # GIF reversed header w SRCS+= sfp.c # SFP/SFP+ information LIBADD+= m -SRCS+= ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support -LIBADD+= bsdxml sbuf +SRCS+= ifieee80211.c # SIOC[GS]IEEE80211 support +LIBADD+= bsdxml sbuf 80211 SRCS+= carp.c # SIOC[GS]VH support SRCS+= ifgroup.c # ... Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Mon Nov 30 06:26:59 2015 (r291469) +++ head/sbin/ifconfig/ifieee80211.c Mon Nov 30 06:34:16 2015 (r291470) @@ -90,7 +90,9 @@ #include /* NB: for offsetof */ #include "ifconfig.h" -#include "regdomain.h" + +#include +#include #ifndef IEEE80211_FIXED_RATE_NONE #define IEEE80211_FIXED_RATE_NONE 0xff @@ -4886,60 +4888,31 @@ end: static int get80211(int s, int type, void *data, int len) { - struct ieee80211req ireq; - (void) memset(&ireq, 0, sizeof(ireq)); - (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); - ireq.i_type = type; - ireq.i_data = data; - ireq.i_len = len; - return ioctl(s, SIOCG80211, &ireq); + return (lib80211_get80211(s, name, type, data, len)); } static int get80211len(int s, int type, void *data, int len, int *plen) { - struct ieee80211req ireq; - (void) memset(&ireq, 0, sizeof(ireq)); - (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); - ireq.i_type = type; - ireq.i_len = len; - assert(ireq.i_len == len); /* NB: check for 16-bit truncation */ - ireq.i_data = data; - if (ioctl(s, SIOCG80211, &ireq) < 0) - return -1; - *plen = ireq.i_len; - return 0; + return (lib80211_get80211len(s, name, type, data, len, plen)); } static int get80211val(int s, int type, int *val) { - struct ieee80211req ireq; - (void) memset(&ireq, 0, sizeof(ireq)); - (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); - ireq.i_type = type; - if (ioctl(s, SIOCG80211, &ireq) < 0) - return -1; - *val = ireq.i_val; - return 0; + return (lib80211_get80211val(s, name, type, val)); } static void set80211(int s, int type, int val, int len, void *data) { - struct ieee80211req ireq; + int ret; - (void) memset(&ireq, 0, sizeof(ireq)); - (void) strncpy(ireq.i_name, name, sizeof(ireq.i_name)); - ireq.i_type = type; - ireq.i_val = val; - ireq.i_len = len; - assert(ireq.i_len == len); /* NB: check for 16-bit truncation */ - ireq.i_data = data; - if (ioctl(s, SIOCS80211, &ireq) < 0) + ret = lib80211_set80211(s, name, type, val, len, data); + if (ret < 0) err(1, "SIOCS80211"); } From owner-svn-src-all@freebsd.org Mon Nov 30 06:56:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39044A3C022; Mon, 30 Nov 2015 06:56:27 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEFE61533; Mon, 30 Nov 2015 06:56:26 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU6uQ8H005699; Mon, 30 Nov 2015 06:56:26 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU6uQd5005698; Mon, 30 Nov 2015 06:56:26 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511300656.tAU6uQd5005698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 30 Nov 2015 06:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291471 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 06:56:27 -0000 Author: adrian Date: Mon Nov 30 06:56:25 2015 New Revision: 291471 URL: https://svnweb.freebsd.org/changeset/base/291471 Log: Add missing lib declaration. Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Mon Nov 30 06:34:16 2015 (r291470) +++ head/share/mk/src.libnames.mk Mon Nov 30 06:56:25 2015 (r291471) @@ -50,6 +50,7 @@ _INTERNALLIBS= \ _LIBRARIES= \ ${_PRIVATELIBS} \ ${_INTERNALLIBS} \ + 80211 \ alias \ archive \ asn1 \ From owner-svn-src-all@freebsd.org Mon Nov 30 08:02:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C45EA3A04E; Mon, 30 Nov 2015 08:02:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C829C198A; Mon, 30 Nov 2015 08:02:53 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU82qA7026314; Mon, 30 Nov 2015 08:02:52 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU82qNl026313; Mon, 30 Nov 2015 08:02:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511300802.tAU82qNl026313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 30 Nov 2015 08:02:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291472 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 08:02:54 -0000 Author: ngie Date: Mon Nov 30 08:02:52 2015 New Revision: 291472 URL: https://svnweb.freebsd.org/changeset/base/291472 Log: Fix the build ichan is only used if AH_DEBUG_ALQ if defined Pointyhat to: adrian Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c Mon Nov 30 06:56:25 2015 (r291471) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c Mon Nov 30 08:02:52 2015 (r291472) @@ -86,7 +86,9 @@ ar9300_set_channel(struct ath_hal *ah, s u_int8_t clk_25mhz = AH9300(ah)->clk_25mhz; CHAN_CENTERS centers; int load_synth_channel; +#ifdef AH_DEBUG_ALQ HAL_CHANNEL_INTERNAL *ichan = ath_hal_checkchannel(ah, chan); +#endif /* * Put this behind AH_DEBUG_ALQ for now until the Hornet From owner-svn-src-all@freebsd.org Mon Nov 30 09:02:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EB48A3C231; Mon, 30 Nov 2015 09:02:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67B9E1AB3; Mon, 30 Nov 2015 09:02:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU92SP6044025; Mon, 30 Nov 2015 09:02:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU92S6u044024; Mon, 30 Nov 2015 09:02:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201511300902.tAU92S6u044024@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 30 Nov 2015 09:02:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291479 - head/tools/bsdbox X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 09:02:29 -0000 Author: adrian Date: Mon Nov 30 09:02:28 2015 New Revision: 291479 URL: https://svnweb.freebsd.org/changeset/base/291479 Log: add missing lib80211 include. Modified: head/tools/bsdbox/Makefile.net Modified: head/tools/bsdbox/Makefile.net ============================================================================== --- head/tools/bsdbox/Makefile.net Mon Nov 30 08:57:19 2015 (r291478) +++ head/tools/bsdbox/Makefile.net Mon Nov 30 09:02:28 2015 (r291479) @@ -21,6 +21,7 @@ CRUNCH_LIBS+= -lmemstat -lnetgraph # ifconfig CRUNCH_PROGS_sbin+= ifconfig +CRUNCH_SHLIBS+= -l80211 # wlan stuff CRUNCH_PROGS_usr.sbin+= wlandebug From owner-svn-src-all@freebsd.org Mon Nov 30 09:13:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08450A3C5C4; Mon, 30 Nov 2015 09:13:06 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C17CC128A; Mon, 30 Nov 2015 09:13:05 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU9D4FI046947; Mon, 30 Nov 2015 09:13:04 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU9D4n0046946; Mon, 30 Nov 2015 09:13:04 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201511300913.tAU9D4n0046946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Mon, 30 Nov 2015 09:13:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291480 - stable/10/sbin/dumpon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 09:13:06 -0000 Author: smh Date: Mon Nov 30 09:13:04 2015 New Revision: 291480 URL: https://svnweb.freebsd.org/changeset/base/291480 Log: MFC r291207: Fix dumpon compatibility with dumpdev kenv Sponsored by: Multiplay Modified: stable/10/sbin/dumpon/dumpon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/dumpon/dumpon.c ============================================================================== --- stable/10/sbin/dumpon/dumpon.c Mon Nov 30 09:02:28 2015 (r291479) +++ stable/10/sbin/dumpon/dumpon.c Mon Nov 30 09:13:04 2015 (r291480) @@ -152,16 +152,31 @@ main(int argc, char *argv[]) usage(); if (strcmp(argv[0], "off") != 0) { - fd = open(argv[0], O_RDONLY); + char tmp[PATH_MAX]; + char *dumpdev; + + if (strncmp(argv[0], _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) { + dumpdev = argv[0]; + } else { + i = snprintf(tmp, PATH_MAX, "%s%s", _PATH_DEV, argv[0]); + if (i < 0) { + err(EX_OSERR, "%s", argv[0]); + } else if (i >= PATH_MAX) { + errno = EINVAL; + err(EX_DATAERR, "%s", argv[0]); + } + dumpdev = tmp; + } + fd = open(dumpdev, O_RDONLY); if (fd < 0) - err(EX_OSFILE, "%s", argv[0]); - check_size(fd, argv[0]); + err(EX_OSFILE, "%s", dumpdev); + check_size(fd, dumpdev); u = 0; i = ioctl(fd, DIOCSKERNELDUMP, &u); u = 1; i = ioctl(fd, DIOCSKERNELDUMP, &u); if (i == 0 && verbose) - printf("kernel dumps on %s\n", argv[0]); + printf("kernel dumps on %s\n", dumpdev); } else { fd = open(_PATH_DEVNULL, O_RDONLY); if (fd < 0) From owner-svn-src-all@freebsd.org Mon Nov 30 09:24:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11B1CA3C963; Mon, 30 Nov 2015 09:24:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9E231B45; Mon, 30 Nov 2015 09:24:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAU9OCoi049790; Mon, 30 Nov 2015 09:24:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAU9OC7o049788; Mon, 30 Nov 2015 09:24:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201511300924.tAU9OC7o049788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 30 Nov 2015 09:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291481 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 09:24:14 -0000 Author: hselasky Date: Mon Nov 30 09:24:12 2015 New Revision: 291481 URL: https://svnweb.freebsd.org/changeset/base/291481 Log: Add more functions and types to the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/file.h head/sys/compat/linuxkpi/common/include/linux/workqueue.h Modified: head/sys/compat/linuxkpi/common/include/linux/file.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/file.h Mon Nov 30 09:13:04 2015 (r291480) +++ head/sys/compat/linuxkpi/common/include/linux/file.h Mon Nov 30 09:24:12 2015 (r291481) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -125,6 +125,21 @@ get_unused_fd(void) return fd; } +static inline int +get_unused_fd_flags(int flags) +{ + struct file *file; + int error; + int fd; + + error = falloc(curthread, &file, &fd, flags); + if (error) + return -error; + /* drop the extra reference */ + fdrop(file, curthread); + return fd; +} + static inline struct linux_file * alloc_file(int mode, const struct file_operations *fops) { Modified: head/sys/compat/linuxkpi/common/include/linux/workqueue.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/workqueue.h Mon Nov 30 09:13:04 2015 (r291480) +++ head/sys/compat/linuxkpi/common/include/linux/workqueue.h Mon Nov 30 09:24:12 2015 (r291481) @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,6 +48,8 @@ struct work_struct { void (*fn)(struct work_struct *); }; +typedef __typeof(((struct work_struct *)0)->fn) work_func_t; + struct delayed_work { struct work_struct work; struct callout timer; From owner-svn-src-all@freebsd.org Mon Nov 30 10:17:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15E81A3C97F; Mon, 30 Nov 2015 10:17:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D344A1AD4; Mon, 30 Nov 2015 10:17:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUAHDFm064942; Mon, 30 Nov 2015 10:17:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUAHDpc064941; Mon, 30 Nov 2015 10:17:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511301017.tAUAHDpc064941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 30 Nov 2015 10:17:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291485 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 10:17:15 -0000 Author: kib Date: Mon Nov 30 10:17:13 2015 New Revision: 291485 URL: https://svnweb.freebsd.org/changeset/base/291485 Log: Remove unneeded instructions. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/support.S Modified: head/sys/arm64/arm64/support.S ============================================================================== --- head/sys/arm64/arm64/support.S Mon Nov 30 10:04:13 2015 (r291484) +++ head/sys/arm64/arm64/support.S Mon Nov 30 10:17:13 2015 (r291485) @@ -60,7 +60,6 @@ ENTRY(casueword32) b.ne 2f /* Not equal, exit */ stxr w5, w3, [x0] /* Store the new data */ cbnz w5, 1b /* Retry on failure */ - ldrb w0, [x0] /* Try loading the data */ 2: SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */ str w4, [x2] /* Store the read data */ mov x0, #0 /* Success */ @@ -81,7 +80,6 @@ ENTRY(casueword) b.ne 2f /* Not equal, exit */ stxr w5, x3, [x0] /* Store the new data */ cbnz w5, 1b /* Retry on failure */ - ldrb w0, [x0] /* Try loading the data */ 2: SET_FAULT_HANDLER(xzr, x5) /* Reset the fault handler */ str x4, [x2] /* Store the read data */ mov x0, #0 /* Success */ From owner-svn-src-all@freebsd.org Mon Nov 30 10:18:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1BDAA3C9EF; Mon, 30 Nov 2015 10:18:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6ABD21C57; Mon, 30 Nov 2015 10:18:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUAIFwe065017; Mon, 30 Nov 2015 10:18:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUAIFI9065016; Mon, 30 Nov 2015 10:18:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201511301018.tAUAIFI9065016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 30 Nov 2015 10:18:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291486 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 10:18:16 -0000 Author: kib Date: Mon Nov 30 10:18:15 2015 New Revision: 291486 URL: https://svnweb.freebsd.org/changeset/base/291486 Log: Shorten conditional branch code. Reviewed by: andrew Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/exception.S Modified: head/sys/arm64/arm64/exception.S ============================================================================== --- head/sys/arm64/arm64/exception.S Mon Nov 30 10:17:13 2015 (r291485) +++ head/sys/arm64/arm64/exception.S Mon Nov 30 10:18:15 2015 (r291486) @@ -116,8 +116,7 @@ __FBSDID("$FreeBSD$"); mov x3, #((TDF_ASTPENDING|TDF_NEEDRESCHED) >> 8) lsl x3, x3, #8 and x2, x2, x3 - cmp x2, #0 - b.eq 2f + cbz x2, 2f /* Restore interrupts */ msr daif, x19 From owner-svn-src-all@freebsd.org Mon Nov 30 13:20:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51220A24F7A; Mon, 30 Nov 2015 13:20:50 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A18B1B6C; Mon, 30 Nov 2015 13:20:50 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUDKnsr017267; Mon, 30 Nov 2015 13:20:49 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUDKnOm017266; Mon, 30 Nov 2015 13:20:49 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511301320.tAUDKnOm017266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 30 Nov 2015 13:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291487 - stable/9/sys/modules/sfxge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 13:20:50 -0000 Author: arybchik Date: Mon Nov 30 13:20:49 2015 New Revision: 291487 URL: https://svnweb.freebsd.org/changeset/base/291487 Log: MFC r283679 sfxge: do not use DEBUG_FLAGS to enable extra debug checks DEBUG_FLAGS are set to DEBUG option value when kernel is built. For example, it is -g in GENERIC config to have debug symbols. Also DEBUG_FLAGS are used to determine if ctfconvert should keep debug symbols. Since we redefined DEBUG_FLAGS, debug symbols were always missing. ctfconvert complains about it during kernel build. It is incorrect to append DEBUG_FLAGS, since if DEBUG has no -g (or similar), we'll have no debug symbols and ctfconvert will complain. If it incorrect to always have -g in our DEBUG_FLAGS, since debug symbols presence should be controllable by kernel config. So, just add disabled by default addition of -DDEBUG=1 to CFLAGS. PR: 163775 Sponsored by: Solarflare Communications, Inc. Modified: stable/9/sys/modules/sfxge/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/modules/sfxge/Makefile ============================================================================== --- stable/9/sys/modules/sfxge/Makefile Mon Nov 30 10:18:15 2015 (r291486) +++ stable/9/sys/modules/sfxge/Makefile Mon Nov 30 13:20:49 2015 (r291487) @@ -20,6 +20,7 @@ SRCS+= efx_vpd.c efx_wol.c SRCS+= siena_mac.c siena_nic.c siena_nvram.c siena_phy.c SRCS+= siena_sram.c siena_vpd.c -DEBUG_FLAGS= -g -DDEBUG=1 +# Extra debug checks +#CFLAGS += -DDEBUG=1 .include From owner-svn-src-all@freebsd.org Mon Nov 30 13:27:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EFD30A3B1E2; Mon, 30 Nov 2015 13:27:41 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFEA1107C; Mon, 30 Nov 2015 13:27:41 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUDRevk020102; Mon, 30 Nov 2015 13:27:40 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUDReuF020101; Mon, 30 Nov 2015 13:27:40 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201511301327.tAUDReuF020101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 30 Nov 2015 13:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291488 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 13:27:42 -0000 Author: arybchik Date: Mon Nov 30 13:27:40 2015 New Revision: 291488 URL: https://svnweb.freebsd.org/changeset/base/291488 Log: sfxge: avoid TSO packets collapses bacause of not 2K aligned data Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4310 Modified: head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Mon Nov 30 13:20:49 2015 (r291487) +++ head/sys/dev/sfxge/sfxge_tx.h Mon Nov 30 13:27:40 2015 (r291488) @@ -51,11 +51,13 @@ /* Maximum number of DMA segments needed to map an mbuf chain. With * TSO, the mbuf length may be just over 64K, divided into 2K mbuf - * clusters. (The chain could be longer than this initially, but can - * be shortened with m_collapse().) + * clusters taking into account that the first may be not 2K cluster + * boundary aligned. + * The chain could be longer than this initially, but can be shortened + * with m_collapse(). */ #define SFXGE_TX_MAPPING_MAX_SEG \ - (1 + howmany(SFXGE_TSO_MAX_SIZE, MCLBYTES)) + (1 + howmany(SFXGE_TSO_MAX_SIZE, MCLBYTES) + 1) /* * Buffer mapping flags. From owner-svn-src-all@freebsd.org Mon Nov 30 13:46:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22C60A3B92B; Mon, 30 Nov 2015 13:46:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E41BD1DF8; Mon, 30 Nov 2015 13:46:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUDkNLj025750; Mon, 30 Nov 2015 13:46:23 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUDkNpa025749; Mon, 30 Nov 2015 13:46:23 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201511301346.tAUDkNpa025749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 30 Nov 2015 13:46:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291489 - stable/10/sys/netsmb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 13:46:24 -0000 Author: rmacklem Date: Mon Nov 30 13:46:22 2015 New Revision: 291489 URL: https://svnweb.freebsd.org/changeset/base/291489 Log: MFC: r290959 When the smbfs iod thread (smb_iod_thread()) is shutting down, smb_iod_destroy() would call smb_iod_request(). This call could return as soon as the wakeup(evp) in smb_iod_main() call is done and then could destroy the mutexes. This caused a race with the rest of smb_iod_main()s use of these mutexes. A crash reported on freebsd-stable@ by Christian Kratzer was diagnosed as a use of one of these mutexes after it was destroyed. This patch moves destruction of the mutexes from smb_iod_destroy() to the end of smb_iod_thread(), so that they aren't destroyed before the thread is done with them. Christian comfirmed that the patch stopped the crashes from happening. Modified: stable/10/sys/netsmb/smb_iod.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netsmb/smb_iod.c ============================================================================== --- stable/10/sys/netsmb/smb_iod.c Mon Nov 30 13:27:40 2015 (r291488) +++ stable/10/sys/netsmb/smb_iod.c Mon Nov 30 13:46:22 2015 (r291489) @@ -659,6 +659,11 @@ smb_iod_thread(void *arg) break; tsleep(&iod->iod_flags, PWAIT, "90idle", iod->iod_sleeptimo); } + + /* We can now safely destroy the mutexes and free the iod structure. */ + smb_sl_destroy(&iod->iod_rqlock); + smb_sl_destroy(&iod->iod_evlock); + free(iod, M_SMBIOD); mtx_unlock(&Giant); kproc_exit(0); } @@ -695,9 +700,6 @@ int smb_iod_destroy(struct smbiod *iod) { smb_iod_request(iod, SMBIOD_EV_SHUTDOWN | SMBIOD_EV_SYNC, NULL); - smb_sl_destroy(&iod->iod_rqlock); - smb_sl_destroy(&iod->iod_evlock); - free(iod, M_SMBIOD); return 0; } From owner-svn-src-all@freebsd.org Mon Nov 30 14:35:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2742A3C5A7; Mon, 30 Nov 2015 14:35:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C6511ADA; Mon, 30 Nov 2015 14:35:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUEZZFG041023; Mon, 30 Nov 2015 14:35:35 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUEZZLW041022; Mon, 30 Nov 2015 14:35:35 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201511301435.tAUEZZLW041022@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 30 Nov 2015 14:35:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291490 - stable/9/sys/netsmb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 14:35:36 -0000 Author: rmacklem Date: Mon Nov 30 14:35:35 2015 New Revision: 291490 URL: https://svnweb.freebsd.org/changeset/base/291490 Log: MFC: r290959 When the smbfs iod thread (smb_iod_thread()) is shutting down, smb_iod_destroy() would call smb_iod_request(). This call could return as soon as the wakeup(evp) in smb_iod_main() call is done and then could destroy the mutexes. This caused a race with the rest of smb_iod_main()s use of these mutexes. A crash reported on freebsd-stable@ by Christian Kratzer was diagnosed as a use of one of these mutexes after it was destroyed. This patch moves destruction of the mutexes from smb_iod_destroy() to the end of smb_iod_thread(), so that they aren't destroyed before the thread is done with them. Christian comfirmed that the patch stopped the crashes from happening. Modified: stable/9/sys/netsmb/smb_iod.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netsmb/smb_iod.c ============================================================================== --- stable/9/sys/netsmb/smb_iod.c Mon Nov 30 13:46:22 2015 (r291489) +++ stable/9/sys/netsmb/smb_iod.c Mon Nov 30 14:35:35 2015 (r291490) @@ -659,6 +659,11 @@ smb_iod_thread(void *arg) break; tsleep(&iod->iod_flags, PWAIT, "90idle", iod->iod_sleeptimo); } + + /* We can now safely destroy the mutexes and free the iod structure. */ + smb_sl_destroy(&iod->iod_rqlock); + smb_sl_destroy(&iod->iod_evlock); + free(iod, M_SMBIOD); mtx_unlock(&Giant); kproc_exit(0); } @@ -695,9 +700,6 @@ int smb_iod_destroy(struct smbiod *iod) { smb_iod_request(iod, SMBIOD_EV_SHUTDOWN | SMBIOD_EV_SYNC, NULL); - smb_sl_destroy(&iod->iod_rqlock); - smb_sl_destroy(&iod->iod_evlock); - free(iod, M_SMBIOD); return 0; } From owner-svn-src-all@freebsd.org Mon Nov 30 16:34:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D59FA3DF9C; Mon, 30 Nov 2015 16:34:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AC1D10B6; Mon, 30 Nov 2015 16:34:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUGYDx8080198; Mon, 30 Nov 2015 16:34:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUGYDtC080197; Mon, 30 Nov 2015 16:34:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201511301634.tAUGYDtC080197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 30 Nov 2015 16:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291491 - head/rescue/rescue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 16:34:14 -0000 Author: ngie Date: Mon Nov 30 16:34:13 2015 New Revision: 291491 URL: https://svnweb.freebsd.org/changeset/base/291491 Log: Fix the build after ifconfig was converted over to lib80211 in r291470 Reported by: jenkins, O. Hartmann Pointyhat to: adrian Modified: head/rescue/rescue/Makefile Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Mon Nov 30 14:35:35 2015 (r291490) +++ head/rescue/rescue/Makefile Mon Nov 30 16:34:13 2015 (r291491) @@ -120,7 +120,7 @@ CRUNCH_PROGS_usr.sbin+= zdb # crunchgen does not like C++ programs; this should be fixed someday # CRUNCH_PROGS+= devd -CRUNCH_LIBS+= -lalias -lcam -lncursesw -ldevstat -lipsec -llzma +CRUNCH_LIBS+= -l80211 -lalias -lcam -lncursesw -ldevstat -lipsec -llzma .if ${MK_ZFS} != "no" CRUNCH_LIBS+= -lavl -lzpool -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem .else From owner-svn-src-all@freebsd.org Mon Nov 30 16:41:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6CDE2A3C15D; Mon, 30 Nov 2015 16:41:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 59C241776; Mon, 30 Nov 2015 16:41:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from FreeBSD.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by freefall.freebsd.org (Postfix) with ESMTP id B34CF1945; Mon, 30 Nov 2015 16:41:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Date: Mon, 30 Nov 2015 16:41:21 +0000 From: Glen Barber To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291491 - head/rescue/rescue Message-ID: <20151130164121.GF1500@FreeBSD.org> References: <201511301634.tAUGYDtC080197@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IvGM3kKqwtniy32b" Content-Disposition: inline In-Reply-To: <201511301634.tAUGYDtC080197@repo.freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event X-PEKBAC-Definition: Problem Exists, Keyboard Between Admin/Computer User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 16:41:23 -0000 --IvGM3kKqwtniy32b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 30, 2015 at 04:34:13PM +0000, Garrett Cooper wrote: > Author: ngie > Date: Mon Nov 30 16:34:13 2015 > New Revision: 291491 > URL: https://svnweb.freebsd.org/changeset/base/291491 >=20 > Log: > Fix the build after ifconfig was converted over to lib80211 in r291470 > =20 Thank you. Glen --IvGM3kKqwtniy32b Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWXHwsAAoJEAMUWKVHj+KTETcP/1bqOUafp1BL5no2y7O9d6rk wp0ICrybMfjjiVoxtrI11p0XONg0mByMOXhucfkrNgxgTEDIiYNaSMkVO8O6+GZw XI4og++9pkXkJTh5Qo1Vfhy4WUrop1alDS1xtZAkfCdPzAHKkZiHEUQ+Y1TiuxVE 2TFL13/pR/1VY0dStt/mgqYbmdiFRlKCS8Mz0vIjD3Gllc4UYhMuWD7OnnjrUwFF l3/GKa9yYUj4qoDLzBKKBd8hbHMoNboHbD/fy3KZobigu7jLV4aAvCJR9seW2Rpw jFK2AjnFbFI047dhMReSuliPnDK3VN9NGaagI/9lD2TdIZrHmRrZ2fTWeLnPW3Z7 T8nbvb42WXcDp8S6/r2xjzmZZbYzSXyx+6y7QmrimPbwdwOdykvEtsNWKF018Y0x USd48tew401xxucmMNJ7rCfIeg2dsbL1VWVG5GOVVsoP6qCbeY9lM0bkY3sM2QmW Ik7skYGOIA6snFZ0uqbC8xtVdo4jRgEb99sqrSGiv6WC4CnOS8lW/lVixcB2al3V hcK0Q6ZauFSNnlLlKTLLuSGcN8apVo2xDBkGKT8+PyiJajJQuFkiLN2DDfA9m2T0 JeL2Hc+bkL0sdeO+qgOKcxnp2Wh8szTy/2C09h7W8kVUaQUoGYH7jpiAMVClgnq3 w3dWjcu3mSTfh5EObNC+ =ywSt -----END PGP SIGNATURE----- --IvGM3kKqwtniy32b-- From owner-svn-src-all@freebsd.org Mon Nov 30 17:09:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01B02A3C972; Mon, 30 Nov 2015 17:09:27 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D085A1AE5; Mon, 30 Nov 2015 17:09:26 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUH9PWH089515; Mon, 30 Nov 2015 17:09:25 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUH9P9E089512; Mon, 30 Nov 2015 17:09:25 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201511301709.tAUH9P9E089512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Mon, 30 Nov 2015 17:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291492 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 17:09:27 -0000 Author: mmel Date: Mon Nov 30 17:09:25 2015 New Revision: 291492 URL: https://svnweb.freebsd.org/changeset/base/291492 Log: ARM: create new memory attribute for writethrough cacheable memory. - add new TEX class for WT cacheable memory - export new TEX class to kernel as VM_MEMATTR_WT attribute - add new aliases VM_MEMATTR_WRITE_COMBINING and VM_MEMATTR_WRITE_BACK, it's used in DRM code Note: Only Cortex A8 supports WT caching in HW. On rest of Cortex CPUs, WT requests is treated as uncacheable. Approved by: kib (mentor) Modified: head/sys/arm/arm/pmap-v6-new.c head/sys/arm/include/pte-v6.h head/sys/arm/include/vm.h Modified: head/sys/arm/arm/pmap-v6-new.c ============================================================================== --- head/sys/arm/arm/pmap-v6-new.c Mon Nov 30 16:34:13 2015 (r291491) +++ head/sys/arm/arm/pmap-v6-new.c Mon Nov 30 17:09:25 2015 (r291492) @@ -388,14 +388,14 @@ pmap_debug(int level) static uint32_t tex_class[8] = { /* type inner cache outer cache */ - TEX(PRRR_MEM, NMRR_WB_WA, NMRR_WB_WA, 0), /* 0 - ATTR_WB_WA */ - TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 1 - ATTR_NOCACHE */ - TEX(PRRR_DEV, NMRR_NC, NMRR_NC, 0), /* 2 - ATTR_DEVICE */ - TEX(PRRR_SO, NMRR_NC, NMRR_NC, 0), /* 3 - ATTR_SO */ - TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 4 - NOT USED YET */ - TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 5 - NOT USED YET */ - TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 6 - NOT USED YET */ - TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 7 - NOT USED YET */ + TEX(PRRR_MEM, NMRR_WB_WA, NMRR_WB_WA, 0), /* 0 - ATTR_WB_WA */ + TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 1 - ATTR_NOCACHE */ + TEX(PRRR_DEV, NMRR_NC, NMRR_NC, 0), /* 2 - ATTR_DEVICE */ + TEX(PRRR_SO, NMRR_NC, NMRR_NC, 0), /* 3 - ATTR_SO */ + TEX(PRRR_MEM, NMRR_WT, NMRR_WT, 0), /* 4 - ATTR_WT */ + TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 5 - NOT USED YET */ + TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 6 - NOT USED YET */ + TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 7 - NOT USED YET */ }; #undef TEX Modified: head/sys/arm/include/pte-v6.h ============================================================================== --- head/sys/arm/include/pte-v6.h Mon Nov 30 16:34:13 2015 (r291491) +++ head/sys/arm/include/pte-v6.h Mon Nov 30 17:09:25 2015 (r291492) @@ -196,6 +196,7 @@ #define PTE2_ATTR_NOCACHE TEX2_CLASS_1 #define PTE2_ATTR_DEVICE TEX2_CLASS_2 #define PTE2_ATTR_SO TEX2_CLASS_3 +#define PTE2_ATTR_WT TEX2_CLASS_4 /* * Software defined bits for L1 descriptors * - L1_AP0 is used as page accessed bit Modified: head/sys/arm/include/vm.h ============================================================================== --- head/sys/arm/include/vm.h Mon Nov 30 16:34:13 2015 (r291491) +++ head/sys/arm/include/vm.h Mon Nov 30 17:09:25 2015 (r291492) @@ -32,14 +32,16 @@ #ifdef ARM_NEW_PMAP #include -#define VM_MEMATTR_WB_WA ((vm_memattr_t)PTE2_ATTR_WB_WA) -#define VM_MEMATTR_NOCACHE ((vm_memattr_t)PTE2_ATTR_NOCACHE) -#define VM_MEMATTR_DEVICE ((vm_memattr_t)PTE2_ATTR_DEVICE) -#define VM_MEMATTR_SO ((vm_memattr_t)PTE2_ATTR_SO) - -#define VM_MEMATTR_DEFAULT VM_MEMATTR_WB_WA -#define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_SO /*name is misused by DMA */ +#define VM_MEMATTR_WB_WA ((vm_memattr_t)PTE2_ATTR_WB_WA) +#define VM_MEMATTR_NOCACHE ((vm_memattr_t)PTE2_ATTR_NOCACHE) +#define VM_MEMATTR_DEVICE ((vm_memattr_t)PTE2_ATTR_DEVICE) +#define VM_MEMATTR_SO ((vm_memattr_t)PTE2_ATTR_SO) +#define VM_MEMATTR_WT ((vm_memattr_t)PTE2_ATTR_WT) +#define VM_MEMATTR_DEFAULT VM_MEMATTR_WB_WA +#define VM_MEMATTR_UNCACHEABLE VM_MEMATTR_SO /* misused by DMA */ +#define VM_MEMATTR_WRITE_COMBINING VM_MEMATTR_WT /* for DRM */ +#define VM_MEMATTR_WRITE_BACK VM_MEMATTR_WB_WA /* for DRM */ #else /* Memory attribute configuration. */ From owner-svn-src-all@freebsd.org Mon Nov 30 17:16:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B66CA3CB50; Mon, 30 Nov 2015 17:16:53 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03AC41EF9; Mon, 30 Nov 2015 17:16:52 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUHGqo1092247; Mon, 30 Nov 2015 17:16:52 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUHGqk4092246; Mon, 30 Nov 2015 17:16:52 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201511301716.tAUHGqk4092246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Mon, 30 Nov 2015 17:16:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291493 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 17:16:53 -0000 Author: avos Date: Mon Nov 30 17:16:51 2015 New Revision: 291493 URL: https://svnweb.freebsd.org/changeset/base/291493 Log: wpi: ignore ic_update_promisc() call when device is not running This change will fix kernel panic with uninitialized (zeroed) RXON structure. Tested with Intel 3945BG, IBSS mode. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4304 Modified: head/sys/dev/wpi/if_wpi.c Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Mon Nov 30 17:09:25 2015 (r291492) +++ head/sys/dev/wpi/if_wpi.c Mon Nov 30 17:16:51 2015 (r291493) @@ -3556,6 +3556,13 @@ wpi_update_promisc(struct ieee80211com * { struct wpi_softc *sc = ic->ic_softc; + WPI_LOCK(sc); + if (sc->sc_running == 0) { + WPI_UNLOCK(sc); + return; + } + WPI_UNLOCK(sc); + WPI_RXON_LOCK(sc); wpi_set_promisc(sc); From owner-svn-src-all@freebsd.org Mon Nov 30 17:28:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B625BA3CD7C for ; Mon, 30 Nov 2015 17:28:28 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (chez.mckusick.com [IPv6:2001:5a8:4:7e72:d250:99ff:fe57:4030]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BF08157F; Mon, 30 Nov 2015 17:28:28 +0000 (UTC) (envelope-from mckusick@mckusick.com) Received: from chez.mckusick.com (localhost [IPv6:::1]) by chez.mckusick.com (8.15.2/8.14.9) with ESMTP id tAUHSQjO021076; Mon, 30 Nov 2015 09:28:27 -0800 (PST) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201511301728.tAUHSQjO021076@chez.mckusick.com> From: Kirk McKusick To: koobs@FreeBSD.org Subject: Re: svn commit: r291460 - head/sys/kern cc: svn-src-all@freebsd.org In-reply-to: <565BCA11.4090600@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21074.1448904506.1@chez.mckusick.com> Date: Mon, 30 Nov 2015 09:28:26 -0800 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 17:28:28 -0000 > To: Kirk McKusick , src-committers@freebsd.org, > svn-src-all@freebsd.org, svn-src-head@freebsd.org > From: Kubilay Kocak > Subject: Re: svn commit: r291460 - head/sys/kern > Date: Mon, 30 Nov 2015 15:01:21 +1100 > > On 30/11/2015 8:42 AM, Kirk McKusick wrote: >> Author: mckusick >> Date: Sun Nov 29 21:42:26 2015 >> New Revision: 291460 >> URL: https://svnweb.freebsd.org/changeset/base/291460 >> >> Log: >> As the kernel allocates and frees vnodes, it fully initializes them >> on every allocation and fully releases them on every free. These >> are not trivial costs: it starts by zeroing a large structure then >> initializes a mutex, a lock manager lock, an rw lock, four lists, >> and six pointers. And looking at vfs.vnodes_created, these operations >> are being done millions of times an hour on a busy machine. >> >> As a performance optimization, this code update uses the uma_init >> and uma_fini routines to do these initializations and cleanups only >> as the vnodes enter and leave the vnode_zone. With this change the >> initializations are only done kern.maxvnodes times at system startup >> and then only rarely again. The frees are done only if the vnode_zone >> shrinks which never happens in practice. For those curious about the >> avoided work, look at the vnode_init() and vnode_fini() functions in >> kern/vfs_subr.c to see the code that has been removed from the main >> vnode allocation/free path. >> >> Reviewed by: kib >> Tested by: Peter Holm >> >> Modified: >> head/sys/kern/vfs_subr.c >> > > Kirk, > > Very interesting. > > Any estimation / expectation on the performance benefit of this, > and in what scenario's / use-cases it might be particularly > beneficial? Any benchmarks or tests you can share? > > ./koobs The senario in which it will be beneficial is one in which many files are being accessed (independent of filesystem type(s) on which they are being accessed). The key value to check is: sysctl vfs.vnodes_created This is the count of vnode creations that are no longer incurring the creation/free overhead. If this number is large and/or growing quickly, you are getting the savings. An example that will drive this number through the roof is: find / -type f -ls >/dev/null Most systems have enough vnodes that they can cache all the files that they access (see `sysctl kern.maxvnodes'). But when the cache is not big enough, this change will ease the pain of reallocating vnodes. Kirk McKusick From owner-svn-src-all@freebsd.org Mon Nov 30 17:35:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70FBCA3D0E8; Mon, 30 Nov 2015 17:35:51 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 237741BD3; Mon, 30 Nov 2015 17:35:51 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUHZoVs098344; Mon, 30 Nov 2015 17:35:50 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUHZogl098341; Mon, 30 Nov 2015 17:35:50 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201511301735.tAUHZogl098341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Mon, 30 Nov 2015 17:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291494 - in head: lib/libpmc sys/dev/hwpmc sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 17:35:51 -0000 Author: rrs Date: Mon Nov 30 17:35:49 2015 New Revision: 291494 URL: https://svnweb.freebsd.org/changeset/base/291494 Log: Add support for Intel Skylake and Intel Broadwell PMC's. The Broadwell PMC's have been tested on the Broadwell-Xeon with a hacked up version of pmcstudy -T. I still need to circle back and add in to pmcstudy all the new tests from the Broadwell Vtune guide (for the hacked up version I just made it so I could run the -T option). The Skylake CPU is not yet available (even though Intel is advertising it .. imagine that). The Skylake PMC's will need to be tested once we can get a sample skylake CPU :-) Sponsored by: Netflix Inc. Modified: head/lib/libpmc/libpmc.c head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_intel.c head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Mon Nov 30 17:16:51 2015 (r291493) +++ head/lib/libpmc/libpmc.c Mon Nov 30 17:35:49 2015 (r291494) @@ -217,6 +217,20 @@ static const struct pmc_event_descr hasw __PMC_EV_ALIAS_HASWELL_XEON() }; +static const struct pmc_event_descr broadwell_event_table[] = +{ + __PMC_EV_ALIAS_BROADWELL() +}; + +static const struct pmc_event_descr broadwell_xeon_event_table[] = +{ + __PMC_EV_ALIAS_BROADWELL_XEON() +}; + +static const struct pmc_event_descr skylake_event_table[] = +{ + __PMC_EV_ALIAS_SKYLAKE() +}; static const struct pmc_event_descr ivybridge_event_table[] = { @@ -258,6 +272,11 @@ static const struct pmc_event_descr hasw __PMC_EV_ALIAS_HASWELLUC() }; +static const struct pmc_event_descr broadwelluc_event_table[] = +{ + __PMC_EV_ALIAS_BROADWELLUC() +}; + static const struct pmc_event_descr sandybridgeuc_event_table[] = { __PMC_EV_ALIAS_SANDYBRIDGEUC() @@ -306,6 +325,9 @@ PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SO PMC_MDEP_TABLE(nehalem_ex, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(haswell, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(haswell_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(broadwell, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(broadwell_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(skylake, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(ivybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(ivybridge_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); @@ -358,6 +380,9 @@ PMC_CLASS_TABLE_DESC(corei7, IAP, corei7 PMC_CLASS_TABLE_DESC(nehalem_ex, IAP, nehalem_ex, iap); PMC_CLASS_TABLE_DESC(haswell, IAP, haswell, iap); PMC_CLASS_TABLE_DESC(haswell_xeon, IAP, haswell_xeon, iap); +PMC_CLASS_TABLE_DESC(broadwell, IAP, broadwell, iap); +PMC_CLASS_TABLE_DESC(broadwell_xeon, IAP, broadwell_xeon, iap); +PMC_CLASS_TABLE_DESC(skylake, IAP, skylake, iap); PMC_CLASS_TABLE_DESC(ivybridge, IAP, ivybridge, iap); PMC_CLASS_TABLE_DESC(ivybridge_xeon, IAP, ivybridge_xeon, iap); PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap); @@ -367,6 +392,7 @@ PMC_CLASS_TABLE_DESC(westmere_ex, IAP, w PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf); PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp); PMC_CLASS_TABLE_DESC(haswelluc, UCP, haswelluc, ucp); +PMC_CLASS_TABLE_DESC(broadwelluc, UCP, broadwelluc, ucp); PMC_CLASS_TABLE_DESC(sandybridgeuc, UCP, sandybridgeuc, ucp); PMC_CLASS_TABLE_DESC(westmereuc, UCP, westmereuc, ucp); #endif @@ -689,6 +715,12 @@ static struct pmc_event_alias core2_alia #define haswell_aliases_without_iaf core2_aliases_without_iaf #define haswell_xeon_aliases core2_aliases #define haswell_xeon_aliases_without_iaf core2_aliases_without_iaf +#define broadwell_aliases core2_aliases +#define broadwell_aliases_without_iaf core2_aliases_without_iaf +#define broadwell_xeon_aliases core2_aliases +#define broadwell_xeon_aliases_without_iaf core2_aliases_without_iaf +#define skylake_aliases core2_aliases +#define skylake_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_aliases core2_aliases #define ivybridge_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_xeon_aliases core2_aliases @@ -849,6 +881,7 @@ static struct pmc_masks iap_rsp_mask_sb_ NULLMASK }; +/* Broadwell is defined to use the same mask as Haswell */ static struct pmc_masks iap_rsp_mask_haswell[] = { PMCMASK(REQ_DMND_DATA_RD, (1ULL << 0)), PMCMASK(REQ_DMND_RFO, (1ULL << 1)), @@ -864,6 +897,36 @@ static struct pmc_masks iap_rsp_mask_has PMCMASK(RES_SUPPLIER_LLC_HITS, (1ULL << 20)), PMCMASK(RES_SUPPLIER_LLC_HITF, (1ULL << 21)), PMCMASK(RES_SUPPLIER_LOCAL, (1ULL << 22)), + /* + * For processor type 06_45H 22 is L4_HIT_LOCAL_L4 + * and 23, 24 and 25 are also defined. + */ + PMCMASK(RES_SNOOP_SNP_NONE, (1ULL << 31)), + PMCMASK(RES_SNOOP_SNP_NO_NEEDED,(1ULL << 32)), + PMCMASK(RES_SNOOP_SNP_MISS, (1ULL << 33)), + PMCMASK(RES_SNOOP_HIT_NO_FWD, (1ULL << 34)), + PMCMASK(RES_SNOOP_HIT_FWD, (1ULL << 35)), + PMCMASK(RES_SNOOP_HITM, (1ULL << 36)), + PMCMASK(RES_NON_DRAM, (1ULL << 37)), + NULLMASK +}; + +static struct pmc_masks iap_rsp_mask_skylake[] = { + PMCMASK(REQ_DMND_DATA_RD, (1ULL << 0)), + PMCMASK(REQ_DMND_RFO, (1ULL << 1)), + PMCMASK(REQ_DMND_IFETCH, (1ULL << 2)), + PMCMASK(REQ_PF_DATA_RD, (1ULL << 7)), + PMCMASK(REQ_PF_RFO, (1ULL << 8)), + PMCMASK(REQ_STRM_ST, (1ULL << 11)), + PMCMASK(REQ_OTHER, (1ULL << 15)), + PMCMASK(RES_ANY, (1ULL << 16)), + PMCMASK(RES_SUPPLIER_SUPP, (1ULL << 17)), + PMCMASK(RES_SUPPLIER_LLC_HITM, (1ULL << 18)), + PMCMASK(RES_SUPPLIER_LLC_HITE, (1ULL << 19)), + PMCMASK(RES_SUPPLIER_LLC_HITS, (1ULL << 20)), + PMCMASK(RES_SUPPLIER_L4_HIT, (1ULL << 22)), + PMCMASK(RES_SUPPLIER_DRAM, (1ULL << 26)), + PMCMASK(RES_SUPPLIER_SPL_HIT, (1ULL << 30)), PMCMASK(RES_SNOOP_SNP_NONE, (1ULL << 31)), PMCMASK(RES_SNOOP_SNP_NO_NEEDED,(1ULL << 32)), PMCMASK(RES_SNOOP_SNP_MISS, (1ULL << 33)), @@ -874,6 +937,7 @@ static struct pmc_masks iap_rsp_mask_has NULLMASK }; + static int iap_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) @@ -965,6 +1029,20 @@ iap_allocate_pmc(enum pmc_event pe, char n = pmc_parse_mask(iap_rsp_mask_haswell, p, &rsp); } else return (-1); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_BROADWELL || + cpu_info.pm_cputype == PMC_CPU_INTEL_BROADWELL_XEON) { + /* Broadwell is defined to use same mask as haswell */ + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask_haswell, p, &rsp); + } else + return (-1); + + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_SKYLAKE) { + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask_skylake, p, &rsp); + } else + return (-1); + } else return (-1); @@ -2917,6 +2995,18 @@ pmc_event_names_of_class(enum pmc_class ev = haswell_xeon_event_table; count = PMC_EVENT_TABLE_SIZE(haswell_xeon); break; + case PMC_CPU_INTEL_BROADWELL: + ev = broadwell_event_table; + count = PMC_EVENT_TABLE_SIZE(broadwell); + break; + case PMC_CPU_INTEL_BROADWELL_XEON: + ev = broadwell_xeon_event_table; + count = PMC_EVENT_TABLE_SIZE(broadwell_xeon); + break; + case PMC_CPU_INTEL_SKYLAKE: + ev = skylake_event_table; + count = PMC_EVENT_TABLE_SIZE(skylake); + break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; count = PMC_EVENT_TABLE_SIZE(ivybridge); @@ -2962,6 +3052,10 @@ pmc_event_names_of_class(enum pmc_class ev = haswelluc_event_table; count = PMC_EVENT_TABLE_SIZE(haswelluc); break; + case PMC_CPU_INTEL_BROADWELL: + ev = broadwelluc_event_table; + count = PMC_EVENT_TABLE_SIZE(broadwelluc); + break; case PMC_CPU_INTEL_SANDYBRIDGE: ev = sandybridgeuc_event_table; count = PMC_EVENT_TABLE_SIZE(sandybridgeuc); @@ -3281,6 +3375,17 @@ pmc_init(void) case PMC_CPU_INTEL_HASWELL_XEON: PMC_MDEP_INIT_INTEL_V2(haswell_xeon); break; + case PMC_CPU_INTEL_BROADWELL: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &broadwelluc_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(broadwell); + break; + case PMC_CPU_INTEL_BROADWELL_XEON: + PMC_MDEP_INIT_INTEL_V2(broadwell_xeon); + break; + case PMC_CPU_INTEL_SKYLAKE: + PMC_MDEP_INIT_INTEL_V2(skylake); + break; case PMC_CPU_INTEL_IVYBRIDGE: PMC_MDEP_INIT_INTEL_V2(ivybridge); break; @@ -3480,7 +3585,18 @@ _pmc_name_of_event(enum pmc_event pe, en ev = haswell_xeon_event_table; evfence = haswell_xeon_event_table + PMC_EVENT_TABLE_SIZE(haswell_xeon); break; - + case PMC_CPU_INTEL_BROADWELL: + ev = broadwell_event_table; + evfence = broadwell_event_table + PMC_EVENT_TABLE_SIZE(broadwell); + break; + case PMC_CPU_INTEL_BROADWELL_XEON: + ev = broadwell_xeon_event_table; + evfence = broadwell_xeon_event_table + PMC_EVENT_TABLE_SIZE(broadwell_xeon); + break; + case PMC_CPU_INTEL_SKYLAKE: + ev = skylake_event_table; + evfence = skylake_event_table + PMC_EVENT_TABLE_SIZE(skylake); + break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; evfence = ivybridge_event_table + PMC_EVENT_TABLE_SIZE(ivybridge); Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Mon Nov 30 17:16:51 2015 (r291493) +++ head/sys/dev/hwpmc/hwpmc_core.c Mon Nov 30 17:35:49 2015 (r291494) @@ -579,7 +579,9 @@ struct iap_event_descr { #define IAP_F_CAS (1 << 11) /* CPU: Atom Silvermont */ #define IAP_F_HWX (1 << 12) /* CPU: Haswell Xeon */ #define IAP_F_BW (1 << 13) /* CPU: Broadwell */ -#define IAP_F_FM (1 << 14) /* Fixed mask */ +#define IAP_F_BWX (1 << 14) /* CPU: Broadwell Xeon */ +#define IAP_F_SL (1 << 15) /* CPU: Skylake */ +#define IAP_F_FM (1 << 18) /* Fixed mask */ #define IAP_F_ALLCPUSCORE2 \ (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) @@ -623,11 +625,12 @@ static struct iap_event_descr iap_events IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | IAP_F_CAS), IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | - IAP_F_SBX | IAP_F_CAS | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_CAS | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), @@ -648,9 +651,11 @@ static struct iap_event_descr iap_events IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX), IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O | IAP_F_CAS), IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | @@ -664,7 +669,7 @@ static struct iap_event_descr iap_events IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), @@ -672,9 +677,11 @@ static struct iap_event_descr iap_events IAP_F_SBX), IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), @@ -682,11 +689,11 @@ static struct iap_event_descr iap_events IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(08H_10H, 0x08, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), @@ -705,23 +712,25 @@ static struct iap_event_descr iap_events IAPDESCR(0BH_10H, 0x0B, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | - IAP_F_WM), + IAP_F_WM | IAP_F_SL), IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | - IAP_F_IB | IAP_F_IBX | IAP_F_HWX), + IAPDESCR(0DH_03H, 0x0D, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | + IAP_F_IB | IAP_F_IBX | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(0DH_80H, 0x0D, 0x00, IAP_F_FM | IAP_F_SL), IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL), IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -771,7 +780,8 @@ static struct iap_event_descr iap_events IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | @@ -798,7 +808,7 @@ static struct iap_event_descr iap_events IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX ), IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), @@ -812,29 +822,40 @@ static struct iap_event_descr iap_events IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), + IAPDESCR(24H_38H, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_3FH, 0x24, 0x00, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_50H, 0x24, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_50H, 0x24, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_D8H, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL), + IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL), + IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_EFH, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL), IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX), @@ -867,7 +888,7 @@ static struct iap_event_descr iap_events IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(27H_50H, 0x27, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(27H_50H, 0x27, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -895,10 +916,10 @@ static struct iap_event_descr iap_events IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), @@ -914,11 +935,11 @@ static struct iap_event_descr iap_events IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_CAS | IAP_F_HWX), + IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_CAS | IAP_F_HWX), - IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_SL), IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -959,22 +980,24 @@ static struct iap_event_descr iap_events IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(48H_01H, 0x48, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_SL), IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), + IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(49H_10H, 0x49, 0x1, IAP_F_FM | IAP_F_I7 | IAP_F_WM | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_60H, 0x49, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW | @@ -988,9 +1011,9 @@ static struct iap_event_descr iap_events IAPDESCR(4CH_00H, 0x4C, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(4CH_01H, 0x4C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(4CH_02H, 0x4C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(4DH_01H, 0x4D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -1004,10 +1027,11 @@ static struct iap_event_descr iap_events IAPDESCR(4FH_02H, 0x4F, 0x02, IAP_F_FM | IAP_F_I7O), IAPDESCR(4FH_04H, 0x4F, 0x04, IAP_F_FM | IAP_F_I7O), IAPDESCR(4FH_08H, 0x4F, 0x08, IAP_F_FM | IAP_F_I7O), - IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM), + IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(51H_01H, 0x51, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(51H_02H, 0x51, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(51H_04H, 0x51, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | @@ -1020,15 +1044,15 @@ static struct iap_event_descr iap_events IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(59H_20H, 0x59, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(59H_20H, 0x59, 0x1, IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_40H, 0x59, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_80H, 0x59, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1038,27 +1062,32 @@ static struct iap_event_descr iap_events IAPDESCR(5BH_4FH, 0x5B, 0x4F, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(5CH_01H, 0x5C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(5CH_02H, 0x5C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(5EH_01H, 0x5E, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(5FH_01H, 0x5F, 0x01, IAP_F_FM | IAP_F_IB ), /* IB not in manual */ IAPDESCR(5FH_04H, 0x5F, 0x04, IAP_F_IBX | IAP_F_IB), IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(60H_01H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(60H_02H, 0x60, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(60H_04H, 0x60, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(60H_08H, 0x60, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(60H_02H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(60H_04H, 0x60, 0x01, IAP_F_FM |IAP_F_I7O | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(60H_08H, 0x60, 0x01, IAP_F_FM |IAP_F_I7O | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(60H_10H, 0x7, 0x00, IAP_F_SL), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), + IAPDESCR(61H_00H, 0x61, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(62H, 0x62, IAP_M_AGENT, IAP_F_ALLCPUSCORE2), @@ -1068,9 +1097,11 @@ static struct iap_event_descr iap_events IAP_F_CA | IAP_F_CC2), IAPDESCR(63H, 0x63, IAP_M_CORE, IAP_F_CC), IAPDESCR(63H_01H, 0x63, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX ), IAPDESCR(63H_02H, 0x63, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(64H, 0x64, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(64H_40H, 0x64, 0x40, IAP_F_FM | IAP_F_CC), @@ -1112,29 +1143,27 @@ static struct iap_event_descr iap_events IAPDESCR(78H, 0x78, IAP_M_CORE | IAP_M_SNOOPTYPE, IAP_F_CA | IAP_F_CC2), IAPDESCR(79H_02H, 0x79, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(79H_04H, 0x79, 0x04, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(79H_08H, 0x79, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(79H_10H, 0x79, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(79H_04H, 0x79, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(79H_08H, 0x79, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_BW | IAP_F_BWX), + IAPDESCR(79H_10H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + + IAPDESCR(79H_18H, 0x79, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(79H_20H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_24H, 0x79, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_20H, 0x79, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - - IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_30H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), - IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(7AH, 0x7A, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1151,10 +1180,11 @@ static struct iap_event_descr iap_events IAPDESCR(80H_01H, 0x80, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), - IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_IBX), + IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | + IAP_F_IBX | IAP_F_SL), /* SL may have a spec bug two with same entry no cmask */ IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(81H_01H, 0x81, 0x01, IAP_F_FM | IAP_F_I7O), @@ -1167,20 +1197,23 @@ static struct iap_event_descr iap_events IAPDESCR(82H_12H, 0x82, 0x12, IAP_F_FM | IAP_F_CC2), IAPDESCR(82H_40H, 0x82, 0x40, IAP_F_FM | IAP_F_CC2), - IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SL), + IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SL), IAPDESCR(85H_00H, 0x85, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(85H_01H, 0x85, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(85H_02H, 0x85, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(85H_04H, 0x85, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(85H_0EH, 0x85, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(85H_0EH, 0x85, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(85H_10H, 0x85, 0x10, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(85H_40H, 0x85, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(85H_60H, 0x85, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(85H_80H, 0x85, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), @@ -1189,7 +1222,8 @@ static struct iap_event_descr iap_events IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(87H_01H, 0x87, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(87H_02H, 0x87, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(87H_04H, 0x87, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), @@ -1197,18 +1231,19 @@ static struct iap_event_descr iap_events IAPDESCR(87H_0FH, 0x87, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_07H, 0x88, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_30H, 0x88, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_41H, 0x88, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_80H, 0x88, 0x0, IAP_F_FM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_81H, 0x88, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_82H, 0x88, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | @@ -1222,21 +1257,22 @@ static struct iap_event_descr iap_events IAPDESCR(88H_A0H, 0x88, 0xA0, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_FFH, 0x88, 0xFF, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_02H, 0x89, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_07H, 0x89, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_30H, 0x89, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_41H, 0x89, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_80H, 0x89, 0x0, IAP_F_FM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_81H, 0x89, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_82H, 0x89, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | @@ -1250,7 +1286,7 @@ static struct iap_event_descr iap_events IAPDESCR(89H_A0H, 0x89, 0xA0, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_FFH, 0x89, 0xFF, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), @@ -1268,43 +1304,53 @@ static struct iap_event_descr iap_events IAPDESCR(97H_00H, 0x97, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(98H_00H, 0x98, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(9CH_01H, 0x9C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(9CH_01H, 0x9C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A0H_00H, 0xA0, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(A1H_01H, 0xA1, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_02H, 0xA1, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_04H, 0xA1, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_08H, 0xA1, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_0CH, 0xA1, 0x0C, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(A1H_10H, 0xA1, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_30H, 0xA1, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(A1H_40H, 0xA1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_80H, 0xA1, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A2H_00H, 0xA2, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(A2H_01H, 0xA2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A2H_02H, 0xA2, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(A2H_04H, 0xA2, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(A2H_08H, 0xA2, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A2H_10H, 0xA2, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(A2H_20H, 0xA2, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(A2H_40H, 0xA2, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | @@ -1312,17 +1358,30 @@ static struct iap_event_descr iap_events IAPDESCR(A2H_80H, 0xA2, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(A3H_01H, 0xA3, 0x01, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX), - IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX), - IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB), - IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_IBX | IAP_F_HW | IAP_F_IB | IAP_F_HWX), - IAPDESCR(A3H_0CH, 0xA3, 0x08, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(A3H_01H, 0xA3, 0x02, IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | + IAP_F_HWX | IAP_F_SL), + IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | + IAP_F_HWX | IAP_F_SL), + IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_SL), + IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(A3H_06H, 0xA3, 0x06, IAP_F_FM | IAP_F_SL), + IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_IBX | IAP_F_HW | IAP_F_IB | IAP_F_HWX | + IAP_F_SL), + IAPDESCR(A3H_0CH, 0xA3, 0x0C, IAP_F_FM | IAP_F_HW | IAP_F_HW | IAP_F_SL), + IAPDESCR(A3H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL), + IAPDESCR(A3H_14H, 0xA3, 0x14, IAP_F_FM | IAP_F_SL), + + IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAPDESCR(A6H_02H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_04H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_08H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_10H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_40H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM ), IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | - IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), IAPDESCR(AAH_02H, 0xAA, 0x02, IAP_F_FM | IAP_F_CA), @@ -1332,35 +1391,40 @@ static struct iap_event_descr iap_events IAPDESCR(ABH_01H, 0xAB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(ABH_02H, 0xAB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(ACH_02H, 0xAC, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(ACH_02H, 0xAC, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_SL), IAPDESCR(ACH_08H, 0xAC, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(ACH_0AH, 0xAC, 0x0A, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(AEH_01H, 0xAE, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B0H_01H, 0xB0, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B0H_02H, 0xB0, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B0H_04H, 0xB0, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B0H_08H, 0xB0, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SL), IAPDESCR(B0H_20H, 0xB0, 0x20, IAP_F_FM | IAP_F_I7O), IAPDESCR(B0H_40H, 0xB0, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O | IAP_F_SL), IAPDESCR(B1H_00H, 0xB1, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B1H_01H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(B1H_02H, 0xB1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(B1H_02H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B1H_04H, 0xB1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_08H, 0xB1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_10H, 0xB1, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1399,7 +1463,7 @@ static struct iap_event_descr iap_events IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | - IAP_F_HWX), + IAP_F_HWX |IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B7H_02H, 0xB7, 0x02, IAP_F_CAS), IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1410,19 +1474,20 @@ static struct iap_event_descr iap_events IAPDESCR(BAH_02H, 0xBA, 0x02, IAP_F_FM | IAP_F_I7O), IAPDESCR(BBH_01H, 0xBB, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(BCH_11H, 0xBC, 0x11, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_12H, 0xBC, 0x12, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_14H, 0xBC, 0x14, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_18H, 0xBC, 0x18, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_21H, 0xBC, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_22H, 0xBC, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_24H, 0xBC, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(BCH_11H, 0xBC, 0x11, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_12H, 0xBC, 0x12, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_14H, 0xBC, 0x14, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_18H, 0xBC, 0x18, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_21H, 0xBC, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_22H, 0xBC, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_24H, 0xBC, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(BCH_28H, 0xBC, 0x28, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(BDH_01H, 0xBD, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL), /* spec bug SL? */ IAPDESCR(BDH_20H, 0xBD, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), @@ -1430,12 +1495,12 @@ static struct iap_event_descr iap_events IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), - IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(C0H_01H, 0xC0, 0x0a, IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_BW | IAP_F_BWX), IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), IAPDESCR(C0H_08H, 0xC0, 0x08, IAP_F_FM | IAP_F_CC2E), @@ -1444,22 +1509,23 @@ static struct iap_event_descr iap_events IAPDESCR(C1H_01H, 0xC1, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C1H_02H, 0xC1, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(C1H_08H, 0xC1, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_10H, 0xC1, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_20H, 0xC1, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(C1H_40H, 0xC1, 0x40, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(C1H_3FH, 0xC1, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(C1H_40H, 0xC1, 0x40, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_80H, 0xC1, 0x80, IAP_F_IB | IAP_F_IBX), IAPDESCR(C1H_FEH, 0xC1, 0xFE, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_00H, 0xC2, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), IAPDESCR(C2H_07H, 0xC2, 0x07, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -1469,41 +1535,41 @@ static struct iap_event_descr iap_events *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Nov 30 18:05:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A93C6A3D5B6; Mon, 30 Nov 2015 18:05:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7315D197F; Mon, 30 Nov 2015 18:05:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iofh3 with SMTP id h3so183263270iof.3; Mon, 30 Nov 2015 10:05:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=uYtM+QCusn0OLuznMJsioWuK27iAO5N4WZXvGj0zo3o=; b=o0MSZzMF7xneXKlI5sWQ1GZx2/4lD6nybi9abTQZvWHVzrkhhRe0hR5JFZyXLA3Dw/ SniugA6BKDBmra05TUY1F8OdKhjFUe2KYrDhNsssDmmBZeB8+yavT/+6UDEwXNUj1I5K MF2WbXdjYmH52IcFoLc8bfIhhP3SJyWYRQhVC/iPU4a7B1ha5gp3beyyMdnuOts0m18Y kWxtdZCrWQt2mV5B220qlSOJdyC8LyfKCCHDq5orJ2b+bcZ25Sq0h3pDFYz4/tw2T48a 9smD34eEipt94bHOKPSCqefoGxSmxEDxjojZyIWqgTM32aZ4+0PihNDkpAd/droMY4L6 5kSA== MIME-Version: 1.0 X-Received: by 10.107.11.147 with SMTP id 19mr56203300iol.165.1448906702872; Mon, 30 Nov 2015 10:05:02 -0800 (PST) Received: by 10.36.217.196 with HTTP; Mon, 30 Nov 2015 10:05:02 -0800 (PST) In-Reply-To: <20151130164121.GF1500@FreeBSD.org> References: <201511301634.tAUGYDtC080197@repo.freebsd.org> <20151130164121.GF1500@FreeBSD.org> Date: Mon, 30 Nov 2015 10:05:02 -0800 Message-ID: Subject: Re: svn commit: r291491 - head/rescue/rescue From: Adrian Chadd To: Glen Barber Cc: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 18:05:03 -0000 Thanks! I dunno how I missed this :( -a On 30 November 2015 at 08:41, Glen Barber wrote: > On Mon, Nov 30, 2015 at 04:34:13PM +0000, Garrett Cooper wrote: >> Author: ngie >> Date: Mon Nov 30 16:34:13 2015 >> New Revision: 291491 >> URL: https://svnweb.freebsd.org/changeset/base/291491 >> >> Log: >> Fix the build after ifconfig was converted over to lib80211 in r291470 >> > > Thank you. > > Glen > From owner-svn-src-all@freebsd.org Mon Nov 30 18:06:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DADCBA3D65B; Mon, 30 Nov 2015 18:06:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A6E621C7B; Mon, 30 Nov 2015 18:06:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by iofh3 with SMTP id h3so183302103iof.3; Mon, 30 Nov 2015 10:06:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=YiAQIaAgAKErmtMQkK1z2L/+WuSK7DZjRLziXLyx6FY=; b=bn7dOBDIpO4NoNR4Jk2hKwPmONykywvK1k6COKH37hMN+E4WV+WL50HoQraisuZf/H sDc5PNJHrbE8mvuPe+Y2WnZhunOvMOLB4QVMjvUB71C/t7/5ZkKpBho3/focQDNMZokz 9em+RVcEzKkMu3SA0NHnumokBNK/Qw8zNXe0Hy07I+86Twrv22f0tuxaon/sDD73zd2L P1JSTeXp5gTVX/VRv7qdmGRW+a6RSHQxKRXEXW/PNBj22sPJbE3o0ecLmdRtA5ORNpRN XU2npwnZFbB28wFaYRpY5+QBlxgBLtLik5ei3eD5oyclaELRONifRl2hV3AjIt+Yb5Ql RLJA== MIME-Version: 1.0 X-Received: by 10.107.10.199 with SMTP id 68mr57379953iok.75.1448906772113; Mon, 30 Nov 2015 10:06:12 -0800 (PST) Received: by 10.36.217.196 with HTTP; Mon, 30 Nov 2015 10:06:12 -0800 (PST) In-Reply-To: <201511301709.tAUH9P9E089512@repo.freebsd.org> References: <201511301709.tAUH9P9E089512@repo.freebsd.org> Date: Mon, 30 Nov 2015 10:06:12 -0800 Message-ID: Subject: Re: svn commit: r291492 - in head/sys/arm: arm include From: Adrian Chadd To: Michal Meloun Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 18:06:13 -0000 Hiya! What's the semantics of this? The mips24k/mips74k cores support a kind of write combining but only within a cache line - ie, it buffers writes to the same cache line, then the first non-cacheline access flushes it out. It's for things like accelerated framebuffer writes. Is this similar to what you've just added? -a From owner-svn-src-all@freebsd.org Mon Nov 30 19:17:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2370CA3C156; Mon, 30 Nov 2015 19:17:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E29A11F19; Mon, 30 Nov 2015 19:16:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUJGw0F027378; Mon, 30 Nov 2015 19:16:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUJGweP027377; Mon, 30 Nov 2015 19:16:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511301916.tAUJGweP027377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 30 Nov 2015 19:16:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291495 - head/lib/clang X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 19:17:00 -0000 Author: bdrewery Date: Mon Nov 30 19:16:58 2015 New Revision: 291495 URL: https://svnweb.freebsd.org/changeset/base/291495 Log: libllvmmirparser and libllvmlibdriver are only used in usr.bin/clang/llc and usr.bin/clang/llvm-ar, respectively, when MK_CLANG_EXTRAS is yes. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/clang/Makefile Modified: head/lib/clang/Makefile ============================================================================== --- head/lib/clang/Makefile Mon Nov 30 17:35:49 2015 (r291494) +++ head/lib/clang/Makefile Mon Nov 30 19:16:58 2015 (r291495) @@ -41,12 +41,10 @@ SUBDIR= libclanganalysis \ libllvmipa \ libllvmipo \ libllvmirreader \ - libllvmlibdriver \ libllvmlinker \ libllvmmc \ libllvmmcdisassembler \ libllvmmcparser \ - libllvmmirparser \ libllvmobjcarcopts \ libllvmobject \ libllvmoption \ @@ -97,7 +95,9 @@ SUBDIR= libclanganalysis \ .if ${MK_CLANG_EXTRAS} != "no" SUBDIR+=libllvmdebuginfodwarf \ libllvmdebuginfopdb \ + libllvmlibdriver \ libllvmlto \ + libllvmmirparser \ libllvmorcjit \ libllvmpasses .endif # MK_CLANG_EXTRAS From owner-svn-src-all@freebsd.org Mon Nov 30 21:01:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3A92A3D781; Mon, 30 Nov 2015 21:01:27 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id D65281168; Mon, 30 Nov 2015 21:01:27 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id CE4D01897; Mon, 30 Nov 2015 21:01:27 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 74141189F7; Mon, 30 Nov 2015 21:01:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id AMrH-pzvGkwt; Mon, 30 Nov 2015 21:01:24 +0000 (UTC) Subject: Re: svn commit: r290840 - head/etc DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 3F871189F2 To: Ian Lepore , Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, gjb@FreeBSD.org References: <201511150304.tAF34dD2062713@repo.freebsd.org> <1447597638.1254.16.camel@freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <565CB930.2060504@FreeBSD.org> Date: Mon, 30 Nov 2015 13:01:36 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1447597638.1254.16.camel@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PjE4BTg0JEUUwRwt2Vid85Oa1KkoJp46u" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:01:28 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PjE4BTg0JEUUwRwt2Vid85Oa1KkoJp46u Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 11/15/2015 6:27 AM, Ian Lepore wrote: > On Sun, 2015-11-15 at 03:04 +0000, Garrett Cooper wrote: >> Author: ngie >> Date: Sun Nov 15 03:04:39 2015 >> New Revision: 290840 >> URL: https://svnweb.freebsd.org/changeset/base/290840 >> >> Log: >> Setup the symlink to /sys to mirror one's current source, e.g. if >> my source >> tree was /usr/src/svn, /sys would point to usr/src/svn >> =20 >> This fixes the assumption that the source tree will always exist at >> ${DESTDIR}/usr/src >> =20 >> MFC after: 1 week >> PR: 76362 >> Reported by: Scot Hetzel >> Sponsored by: EMC / Isilon Storage Division >> >> Modified: >> head/etc/Makefile >> >> Modified: head/etc/Makefile >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> =3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- head/etc/Makefile Sun Nov 15 01:50:17 2015 (r290839 >> ) >> +++ head/etc/Makefile Sun Nov 15 03:04:39 2015 (r290840 >> ) >> @@ -408,7 +408,7 @@ distrib-dirs: ${MTREES:N/*} distrib-clea >> ${METALOG.add} ; \ >> done; true >> .endif >> - ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys >> + ${INSTALL_SYMLINK} ${SRCTOP:C/^\///}/sys ${DESTDIR}/sys >> .if ${MK_MAN} !=3D "no" >> cd ${DESTDIR}${SHAREDIR}/man; \ >> for mandir in man*; do \ >> >=20 > This might make some sense if DESTDIR is empty or /, but with most uses= > of non-empty DESTDIR this is just going to make a symlink to some > random place that likely won't even exist on the running system. If > source code is later installed to that DESTDIR as well, the /sys link > will just be broken in a way that's likely to lead to very confusing > errors. >=20 I have concerns this may break the install image that re@ (or other parties) produce as well since it may have a broken /sys link if not built from /usr/src. Looking at the freebsd-update kernel I see "root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC" which means that the freebsd-upate one should be fine. Not sure about other images. In general I think this is wrong. For meta mode staging I am tempted to disable this, but that's no different than non-meta mode really for images. I don't like the symlink at all, but having it point to usr/src is at least only 1 symlink that needs to be setup to fix all assumptions (usr/src -> /real/src), rather than now having up to 2 symlinks that need fixing. --=20 Regards, Bryan Drewery --PjE4BTg0JEUUwRwt2Vid85Oa1KkoJp46u Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWXLkwAAoJEDXXcbtuRpfPd5oIANOZgQwAwIGtiA6sf6UxpSot S8G6RhI4XXcY640vtTVIPZRw1B62jYdKep2IHgcnb4Z5uSZayvE5B6OJ6WaDXT9q Rvkn6EmJ2IBYiHXVNuwvn0qqW2PzdE0ah5V3c8Bs+sm5Q2wWdGyZVvvRq6vZOU5i sKzFAbvHDgIJkDYT9LGyUMbygKRKfp0xp7yoFSTkp4NTurdKJdMhhanZwcFWFQ/u VN6PhyjJMrmlyBBq0nZ6xK5fsi3/R35Xl8va25fKTVqIT3OMwT2MN1o/LBhy0f/t pw72IPTmcN6afLt2wTYK81stbuOKUQnHUOojk1hsnYogGYweb0h8J1Aut1zPslU= =duzm -----END PGP SIGNATURE----- --PjE4BTg0JEUUwRwt2Vid85Oa1KkoJp46u-- From owner-svn-src-all@freebsd.org Mon Nov 30 21:16:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46EEEA3DA27; Mon, 30 Nov 2015 21:16:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1430C1C57; Mon, 30 Nov 2015 21:16:28 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULGRHb063484; Mon, 30 Nov 2015 21:16:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULGRXb063483; Mon, 30 Nov 2015 21:16:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302116.tAULGRXb063483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291496 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:16:28 -0000 Author: mav Date: Mon Nov 30 21:16:26 2015 New Revision: 291496 URL: https://svnweb.freebsd.org/changeset/base/291496 Log: MFC r291383: Fix panic when trying to sort unsupported command in OOA queue. Handle unsupported commands as not conflicting/blocking. Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Mon Nov 30 19:16:58 2015 (r291495) +++ stable/10/sys/cam/ctl/ctl.c Mon Nov 30 21:16:26 2015 (r291496) @@ -11093,6 +11093,8 @@ ctl_check_for_blockage(struct ctl_lun *l __func__, pending_entry->seridx, pending_io->scsiio.cdb[0], pending_io->scsiio.cdb[1], pending_io)); ooa_entry = ctl_get_cmd_entry(&ooa_io->scsiio, NULL); + if (ooa_entry->seridx == CTL_SERIDX_INVLD) + return (CTL_ACTION_PASS); /* Unsupported command in OOA queue */ KASSERT(ooa_entry->seridx < CTL_SERIDX_COUNT, ("%s: Invalid seridx %d for ooa CDB %02x %02x @ %p", __func__, ooa_entry->seridx, ooa_io->scsiio.cdb[0], From owner-svn-src-all@freebsd.org Mon Nov 30 21:23:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78D24A3DC40; Mon, 30 Nov 2015 21:23:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38A981279; Mon, 30 Nov 2015 21:23:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULNVCM066342; Mon, 30 Nov 2015 21:23:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULNVKc066339; Mon, 30 Nov 2015 21:23:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302123.tAULNVKc066339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:23:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291497 - in stable/10/sys/cam: ata scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:23:32 -0000 Author: mav Date: Mon Nov 30 21:23:30 2015 New Revision: 291497 URL: https://svnweb.freebsd.org/changeset/base/291497 Log: MFC r289138: Remove legacy CHS geometry from dmesg and unify capacity outputs. Modified: stable/10/sys/cam/ata/ata_da.c stable/10/sys/cam/scsi/scsi_cd.c stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ata/ata_da.c ============================================================================== --- stable/10/sys/cam/ata/ata_da.c Mon Nov 30 21:16:26 2015 (r291496) +++ stable/10/sys/cam/ata/ata_da.c Mon Nov 30 21:23:30 2015 (r291497) @@ -1370,12 +1370,9 @@ adaregister(struct cam_periph *periph, v dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), - "%juMB (%ju %u byte sectors: %dH %dS/T %dC)", - (uintmax_t)(((uintmax_t)dp->secsize * - dp->sectors) / (1024*1024)), - (uintmax_t)dp->sectors, - dp->secsize, dp->heads, - dp->secs_per_track, dp->cylinders); + "%juMB (%ju %u byte sectors)", + ((uintmax_t)dp->secsize * dp->sectors) / (1024 * 1024), + (uintmax_t)dp->sectors, dp->secsize); xpt_announce_periph(periph, announce_buf); xpt_announce_quirks(periph, softc->quirks, ADA_Q_BIT_STRING); if (legacy_id >= 0) Modified: stable/10/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_cd.c Mon Nov 30 21:16:26 2015 (r291496) +++ stable/10/sys/cam/scsi/scsi_cd.c Mon Nov 30 21:23:30 2015 (r291497) @@ -1084,11 +1084,11 @@ cddone(struct cam_periph *periph, union if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP || (error = cderror(done_ccb, CAM_RETRY_SELTO, SF_RETRY_UA | SF_NO_PRINT)) == 0) { - snprintf(announce_buf, sizeof(announce_buf), - "cd present [%lu x %lu byte records]", - cdp->disksize, (u_long)cdp->blksize); - + "%juMB (%ju %u byte sectors)", + ((uintmax_t)cdp->disksize * cdp->blksize) / + (1024 * 1024), + (uintmax_t)cdp->disksize, cdp->blksize); } else { if (error == ERESTART) { /* Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Mon Nov 30 21:16:26 2015 (r291496) +++ stable/10/sys/cam/scsi/scsi_da.c Mon Nov 30 21:23:30 2015 (r291497) @@ -3156,13 +3156,10 @@ dadone(struct cam_periph *periph, union lbp = (lalba & SRC16_LBPME_A); dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), - "%juMB (%ju %u byte sectors: %dH %dS/T " - "%dC)", (uintmax_t) - (((uintmax_t)dp->secsize * - dp->sectors) / (1024*1024)), - (uintmax_t)dp->sectors, - dp->secsize, dp->heads, - dp->secs_per_track, dp->cylinders); + "%juMB (%ju %u byte sectors)", + ((uintmax_t)dp->secsize * dp->sectors) / + (1024 * 1024), + (uintmax_t)dp->sectors, dp->secsize); } } else { int error; From owner-svn-src-all@freebsd.org Mon Nov 30 21:28:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB9FEA3DDB4; Mon, 30 Nov 2015 21:28:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87F7817A7; Mon, 30 Nov 2015 21:28:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULSrWe066707; Mon, 30 Nov 2015 21:28:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULSrU8066702; Mon, 30 Nov 2015 21:28:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302128.tAULSrU8066702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:28:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291498 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:28:54 -0000 Author: mav Date: Mon Nov 30 21:28:53 2015 New Revision: 291498 URL: https://svnweb.freebsd.org/changeset/base/291498 Log: MFC r290104: Improve/fix loop scanning routine. For the most of chips (except anscient ones) port handlers have no relation to port IDs. In such situation old code scanning first 125 handlers was quite naive. Instead of doing that, send to chip single request to get full list of port handlers available on specific virtual port and scan only them. Old code had problems with case of several virtual ports enabled, when port handlers allocated from global address space could easily go above 125. This change was successfully tested on 23xx, 24xx and 25xx chips in loop mode with 4 virtual initiator ports, each seing 50 virtual target ports. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/isp_library.h stable/10/sys/dev/isp/ispmbox.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:23:30 2015 (r291497) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:28:53 2015 (r291498) @@ -119,6 +119,7 @@ static int isp_plogx(ispsoftc_t *, int, static int isp_port_login(ispsoftc_t *, uint16_t, uint32_t); static int isp_port_logout(ispsoftc_t *, uint16_t, uint32_t); static int isp_getpdb(ispsoftc_t *, int, uint16_t, isp_pdb_t *, int); +static int isp_gethandles(ispsoftc_t *, int, uint16_t *, int *, int, int); static void isp_dump_chip_portdb(ispsoftc_t *, int, int); static uint64_t isp_get_wwn(ispsoftc_t *, int, int, int); static int isp_fclink_test(ispsoftc_t *, int, int); @@ -2587,7 +2588,7 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui if (dolock) { FC_SCRATCH_RELEASE(isp, chan); } - return (mbs.param[0]); + return (mbs.param[0] | (mbs.param[1] << 16)); } if (IS_24XX(isp)) { isp_get_pdb_24xx(isp, fcp->isp_scratch, &un.bill); @@ -2618,6 +2619,78 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui return (0); } +static int +isp_gethandles(ispsoftc_t *isp, int chan, uint16_t *handles, int *num, + int dolock, int loop) +{ + fcparam *fcp = FCPARAM(isp, chan); + mbreg_t mbs; + isp_pnhle_21xx_t el1, *elp1; + isp_pnhle_23xx_t el3, *elp3; + isp_pnhle_24xx_t el4, *elp4; + int i, j; + uint32_t p; + uint16_t h; + + MBSINIT(&mbs, MBOX_GET_ID_LIST, MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR, 250000); + if (IS_24XX(isp)) { + mbs.param[2] = DMA_WD1(fcp->isp_scdma); + mbs.param[3] = DMA_WD0(fcp->isp_scdma); + mbs.param[6] = DMA_WD3(fcp->isp_scdma); + mbs.param[7] = DMA_WD2(fcp->isp_scdma); + mbs.param[8] = ISP_FC_SCRLEN; + mbs.param[9] = chan; + } else { + mbs.ibits = (1 << 1)|(1 << 2)|(1 << 3)|(1 << 6); + mbs.param[1] = DMA_WD1(fcp->isp_scdma); + mbs.param[2] = DMA_WD0(fcp->isp_scdma); + mbs.param[3] = DMA_WD3(fcp->isp_scdma); + mbs.param[6] = DMA_WD2(fcp->isp_scdma); + } + if (dolock) { + if (FC_SCRATCH_ACQUIRE(isp, chan)) { + isp_prt(isp, ISP_LOGERR, sacq); + return (-1); + } + } + MEMORYBARRIER(isp, SYNC_SFORDEV, 0, ISP_FC_SCRLEN, chan); + isp_mboxcmd(isp, &mbs); + if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { + if (dolock) { + FC_SCRATCH_RELEASE(isp, chan); + } + return (mbs.param[0] | (mbs.param[1] << 16)); + } + elp1 = fcp->isp_scratch; + elp3 = fcp->isp_scratch; + elp4 = fcp->isp_scratch; + for (i = 0, j = 0; i < mbs.param[1] && j < *num; i++) { + if (IS_24XX(isp)) { + isp_get_pnhle_24xx(isp, &elp4[i], &el4); + p = el4.pnhle_port_id_lo | + (el4.pnhle_port_id_hi << 16); + h = el4.pnhle_handle; + } else if (IS_23XX(isp)) { + isp_get_pnhle_23xx(isp, &elp3[i], &el3); + p = el3.pnhle_port_id_lo | + (el3.pnhle_port_id_hi << 16); + h = el3.pnhle_handle; + } else { /* 21xx */ + isp_get_pnhle_21xx(isp, &elp1[i], &el1); + p = el1.pnhle_port_id_lo | + ((el1.pnhle_port_id_hi_handle & 0xff) << 16); + h = el1.pnhle_port_id_hi_handle >> 8; + } + if (loop && (p >> 8) != (fcp->isp_portid >> 8)) + continue; + handles[j++] = h; + } + *num = j; + if (dolock) + FC_SCRATCH_RELEASE(isp, chan); + return (0); +} + static void isp_dump_chip_portdb(ispsoftc_t *isp, int chan, int dolock) { @@ -3106,79 +3179,68 @@ isp_scan_loop(ispsoftc_t *isp, int chan) { fcportdb_t *lp, tmp; fcparam *fcp = FCPARAM(isp, chan); - int i; + int i, idx, lim, r; isp_pdb_t pdb; - uint16_t handle, lim = 0; + uint16_t handles[LOCAL_LOOP_LIM]; + uint16_t handle; if (fcp->isp_fwstate < FW_READY || fcp->isp_loopstate < LOOP_PDB_RCVD) { return (-1); } - if (fcp->isp_loopstate > LOOP_SCANNING_LOOP) { return (0); } - - /* - * Check our connection topology. - * - * If we're a public or private loop, we scan 0..125 as handle values. - * The firmware has (typically) peformed a PLOGI for us. We skip this - * step if we're a ISP_24XX in NP-IV mode. - * - * If we're a N-port connection, we treat this is a short loop (0..1). - */ - switch (fcp->isp_topo) { - case TOPO_NL_PORT: - lim = LOCAL_LOOP_LIM; - break; - case TOPO_FL_PORT: - if (IS_24XX(isp) && isp->isp_nchan > 1) { - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Skipping Local Loop Scan", chan); - fcp->isp_loopstate = LOOP_LSCAN_DONE; - return (0); - } - lim = LOCAL_LOOP_LIM; - break; - case TOPO_N_PORT: - lim = 2; - break; - default: - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d no loop topology to scan", chan); + if (fcp->isp_topo != TOPO_NL_PORT && fcp->isp_topo != TOPO_FL_PORT && + fcp->isp_topo != TOPO_N_PORT) { + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d no loop topology to scan", chan); fcp->isp_loopstate = LOOP_LSCAN_DONE; return (0); } fcp->isp_loopstate = LOOP_SCANNING_LOOP; - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop 0..%d", chan, lim-1); + lim = LOCAL_LOOP_LIM; + r = isp_gethandles(isp, chan, handles, &lim, 1, 1); + if (r != 0) { + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d getting list of handles failed with %x", chan, r); +fail: + ISP_MARK_PORTDB(isp, chan, 1); + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d FC scan loop DONE (bad)", chan); + return (-1); + } + + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop -- %d ports", + chan, lim); /* * Run through the list and get the port database info for each one. */ - for (handle = 0; handle < lim; handle++) { - int r; + for (idx = 0; idx < lim; idx++) { + handle = handles[idx]; + /* * Don't scan "special" ids. */ - if (handle >= FL_ID && handle <= SNS_ID) { - continue; - } if (ISP_CAP_2KLOGIN(isp)) { - if (handle >= NPH_RESERVED && handle <= NPH_IP_BCST) { + if (handle >= NPH_RESERVED - isp->isp_nchan) + continue; + } else { + if (handle >= FL_ID && handle <= SNS_ID) continue; - } } + /* * In older cards with older f/w GET_PORT_DATABASE has been * known to hang. This trick gets around that problem. */ if (IS_2100(isp) || IS_2200(isp)) { uint64_t node_wwn = isp_get_wwn(isp, chan, handle, 1); - if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); - return (-1); - } + if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) + goto fail; if (node_wwn == INI_NONE) { continue; } @@ -3192,19 +3254,13 @@ isp_scan_loop(ispsoftc_t *isp, int chan) isp_prt(isp, ISP_LOGDEBUG1, "Chan %d FC scan loop handle %d returned %x", chan, handle, r); - if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { - ISP_MARK_PORTDB(isp, chan, 1); - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); - return (-1); - } + if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) + goto fail; continue; } - if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { - ISP_MARK_PORTDB(isp, chan, 1); - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); - return (-1); - } + if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) + goto fail; /* * On *very* old 2100 firmware we would end up sometimes @@ -3214,10 +3270,9 @@ isp_scan_loop(ispsoftc_t *isp, int chan) */ if (IS_2100(isp) && pdb.handle != handle) { isp_prt(isp, ISP_LOGWARN, - "Chan %d cannot synchronize port database", chan); - ISP_MARK_PORTDB(isp, chan, 1); - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); - return (-1); + "Chan %d getpdb() returned wrong handle %x != %x", + chan, pdb.handle, handle); + goto fail; } /* @@ -3273,9 +3328,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) "Chan %d [%d] not probational/zombie (0x%x)", chan, FC_PORTDB_TGT(isp, chan, lp), lp->state); isp_dump_portdb(isp, chan); - ISP_MARK_PORTDB(isp, chan, 1); - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE (bad)", chan); - return (-1); + goto fail; } /* @@ -3561,7 +3614,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha loopid = FL_ID; } r = isp_getpdb(isp, chan, loopid, &pdb, 0); - if (r == MBOX_NOT_LOGGED_IN) { + if ((r & 0xffff) == MBOX_NOT_LOGGED_IN) { isp_dump_chip_portdb(isp, chan, 0); } if (r) { @@ -7096,7 +7149,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x07, 0x03), /* 0x1d: MBOX_GET_DEV_QUEUE_STATUS */ ISP_FC_OPMAP(0x00, 0x00), /* 0x1e: */ ISP_FC_OPMAP(0x01, 0x07), /* 0x1f: MBOX_GET_FIRMWARE_STATUS */ - ISP_FC_OPMAP_HALF(0x2, 0x01, 0x0, 0xcf), /* 0x20: MBOX_GET_LOOP_ID */ + ISP_FC_OPMAP_HALF(0x2, 0x01, 0x7e, 0xcf), /* 0x20: MBOX_GET_LOOP_ID */ ISP_FC_OPMAP(0x00, 0x00), /* 0x21: */ ISP_FC_OPMAP(0x01, 0x07), /* 0x22: MBOX_GET_RETRY_COUNT */ ISP_FC_OPMAP(0x00, 0x00), /* 0x23: */ @@ -7181,14 +7234,14 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x0f, 0x0f), /* 0x72: MBOX_INIT_LIP_LOGIN */ ISP_FC_OPMAP(0x00, 0x00), /* 0x73: */ ISP_FC_OPMAP(0x07, 0x01), /* 0x74: LOGIN LOOP PORT */ - ISP_FC_OPMAP(0xcf, 0x03), /* 0x75: GET PORT/NODE NAME LIST */ + ISP_FC_OPMAP_HALF(0x03, 0xcf, 0x00, 0x07), /* 0x75: GET PORT/NODE NAME LIST */ ISP_FC_OPMAP(0x4f, 0x01), /* 0x76: SET VENDOR ID */ ISP_FC_OPMAP(0xcd, 0x01), /* 0x77: INITIALIZE IP MAILBOX */ ISP_FC_OPMAP(0x00, 0x00), /* 0x78: */ ISP_FC_OPMAP(0x00, 0x00), /* 0x79: */ ISP_FC_OPMAP(0x00, 0x00), /* 0x7a: */ ISP_FC_OPMAP(0x00, 0x00), /* 0x7b: */ - ISP_FC_OPMAP(0x4f, 0x03), /* 0x7c: Get ID List */ + ISP_FC_OPMAP_HALF(0x03, 0x4f, 0x00, 0x07), /* 0x7c: Get ID List */ ISP_FC_OPMAP(0xcf, 0x01), /* 0x7d: SEND LFA */ ISP_FC_OPMAP(0x0f, 0x01) /* 0x7e: LUN RESET */ }; Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:23:30 2015 (r291497) +++ stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:28:53 2015 (r291498) @@ -1646,6 +1646,44 @@ isp_get_pdb_24xx(ispsoftc_t *isp, isp_pd } } +void +isp_get_pnhle_21xx(ispsoftc_t *isp, isp_pnhle_21xx_t *src, isp_pnhle_21xx_t *dst) +{ + + ISP_IOXGET_16(isp, &src->pnhle_port_id_lo, dst->pnhle_port_id_lo); + ISP_IOXGET_16(isp, &src->pnhle_port_id_hi_handle, dst->pnhle_port_id_hi_handle); +} + +void +isp_get_pnhle_23xx(ispsoftc_t *isp, isp_pnhle_23xx_t *src, isp_pnhle_23xx_t *dst) +{ + + ISP_IOXGET_16(isp, &src->pnhle_port_id_lo, dst->pnhle_port_id_lo); + ISP_IOXGET_16(isp, &src->pnhle_port_id_hi, dst->pnhle_port_id_hi); + ISP_IOXGET_16(isp, &src->pnhle_handle, dst->pnhle_handle); +} + +void +isp_get_pnhle_24xx(ispsoftc_t *isp, isp_pnhle_24xx_t *src, isp_pnhle_24xx_t *dst) +{ + + ISP_IOXGET_16(isp, &src->pnhle_port_id_lo, dst->pnhle_port_id_lo); + ISP_IOXGET_16(isp, &src->pnhle_port_id_hi, dst->pnhle_port_id_hi); + ISP_IOXGET_16(isp, &src->pnhle_handle, dst->pnhle_handle); + ISP_IOXGET_16(isp, &src->pnhle_reserved, dst->pnhle_reserved); +} + +void +isp_get_pnnle(ispsoftc_t *isp, isp_pnnle_t *src, isp_pnnle_t *dst) +{ + int i; + + for (i = 0; i < 8; i++) + ISP_IOXGET_8(isp, &src->pnnle_name[i], dst->pnnle_name[i]); + ISP_IOXGET_16(isp, &src->pnnle_handle, dst->pnnle_handle); + ISP_IOXGET_16(isp, &src->pnnle_reserved, dst->pnnle_reserved); +} + /* * PLOGI/LOGO IOCB canonicalization */ Modified: stable/10/sys/dev/isp/isp_library.h ============================================================================== --- stable/10/sys/dev/isp/isp_library.h Mon Nov 30 21:23:30 2015 (r291497) +++ stable/10/sys/dev/isp/isp_library.h Mon Nov 30 21:28:53 2015 (r291498) @@ -123,6 +123,10 @@ void isp_put_vp_modify(ispsoftc_t *, vp_ void isp_get_vp_modify(ispsoftc_t *, vp_modify_t *, vp_modify_t *); void isp_get_pdb_21xx(ispsoftc_t *, isp_pdb_21xx_t *, isp_pdb_21xx_t *); void isp_get_pdb_24xx(ispsoftc_t *, isp_pdb_24xx_t *, isp_pdb_24xx_t *); +void isp_get_pnhle_21xx(ispsoftc_t *, isp_pnhle_21xx_t *, isp_pnhle_21xx_t *); +void isp_get_pnhle_23xx(ispsoftc_t *, isp_pnhle_23xx_t *, isp_pnhle_23xx_t *); +void isp_get_pnhle_24xx(ispsoftc_t *, isp_pnhle_24xx_t *, isp_pnhle_24xx_t *); +void isp_get_pnnle(ispsoftc_t *, isp_pnnle_t *, isp_pnnle_t *); void isp_get_ridacq(ispsoftc_t *, isp_ridacq_t *, isp_ridacq_t *); void isp_get_plogx(ispsoftc_t *, isp_plogx_t *, isp_plogx_t *); void isp_put_plogx(ispsoftc_t *, isp_plogx_t *, isp_plogx_t *); Modified: stable/10/sys/dev/isp/ispmbox.h ============================================================================== --- stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:23:30 2015 (r291497) +++ stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:28:53 2015 (r291498) @@ -156,6 +156,8 @@ #define MBOX_SEND_CHANGE_REQUEST 0x0070 #define MBOX_FABRIC_LOGOUT 0x0071 #define MBOX_INIT_LIP_LOGIN 0x0072 +#define MBOX_GET_PORT_NODE_NAME_LIST 0x0075 +#define MBOX_GET_ID_LIST 0x007C #define MBOX_LUN_RESET 0x007E #define MBOX_DRIVER_HEARTBEAT 0x005B @@ -1342,6 +1344,40 @@ typedef struct { } isp_pdb_t; /* + * Port/Node Name List Element + */ +typedef struct { + uint8_t pnnle_name[8]; + uint16_t pnnle_handle; + uint16_t pnnle_reserved; +} isp_pnnle_t; + +#define PNNL_OPTIONS_NODE_NAMES (1<<0) +#define PNNL_OPTIONS_PORT_DATA (1<<2) +#define PNNL_OPTIONS_INITIATORS (1<<3) + +/* + * Port and N-Port Handle List Element + */ +typedef struct { + uint16_t pnhle_port_id_lo; + uint16_t pnhle_port_id_hi_handle; +} isp_pnhle_21xx_t; + +typedef struct { + uint16_t pnhle_port_id_lo; + uint16_t pnhle_port_id_hi; + uint16_t pnhle_handle; +} isp_pnhle_23xx_t; + +typedef struct { + uint16_t pnhle_port_id_lo; + uint16_t pnhle_port_id_hi; + uint16_t pnhle_handle; + uint16_t pnhle_reserved; +} isp_pnhle_24xx_t; + +/* * Port Database Changed Async Event information for 24XX cards */ #define PDB24XX_AE_OK 0x00 From owner-svn-src-all@freebsd.org Mon Nov 30 21:29:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 127FFA3DDFD; Mon, 30 Nov 2015 21:29:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5F9D1921; Mon, 30 Nov 2015 21:29:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULTcxh066788; Mon, 30 Nov 2015 21:29:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULTcgG066786; Mon, 30 Nov 2015 21:29:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302129.tAULTcgG066786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:29:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291499 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:29:40 -0000 Author: mav Date: Mon Nov 30 21:29:38 2015 New Revision: 291499 URL: https://svnweb.freebsd.org/changeset/base/291499 Log: MFC r290118: Change the way how target mode is enabled on 23xx chips. Without docs I am not completely sure about this, but on my tests new method works better then previous, at least with our latest firmware. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:28:53 2015 (r291498) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:29:38 2015 (r291499) @@ -1895,7 +1895,7 @@ isp_fibre_init(ispsoftc_t *isp) icbp->icb_logintime = ICB_LOGIN_TOV; #ifdef ISP_TARGET_MODE - if (ISP_FW_NEWER_THAN(isp, 3, 25, 0) && (icbp->icb_fwoptions & ICBOPT_TGT_ENABLE)) { + if (IS_23XX(isp) && (icbp->icb_fwoptions & ICBOPT_TGT_ENABLE)) { icbp->icb_lunenables = 0xffff; icbp->icb_ccnt = DFLT_CMND_CNT; icbp->icb_icnt = DFLT_INOT_CNT; Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:28:53 2015 (r291498) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:29:38 2015 (r291499) @@ -1414,7 +1414,8 @@ isp_enable_deferred(ispsoftc_t *isp, int ISP_GET_PC(isp, bus, tm_luns_enabled, luns_already_enabled); isp_prt(isp, ISP_LOGTINFO, "%s: bus %d lun %u luns_enabled %d", __func__, bus, lun, luns_already_enabled); - if (IS_24XX(isp) || (IS_FC(isp) && luns_already_enabled)) { + if (IS_23XX(isp) || IS_24XX(isp) || + (IS_FC(isp) && luns_already_enabled)) { status = CAM_REQ_CMP; } else { int cmd_cnt, not_cnt; @@ -1485,7 +1486,7 @@ isp_disable_lun(ispsoftc_t *isp, union c /* * If we're a 24XX card, we're done. */ - if (IS_24XX(isp)) { + if (IS_23XX(isp) || IS_24XX(isp)) { status = CAM_REQ_CMP; goto done; } @@ -1501,7 +1502,7 @@ isp_disable_lun(ispsoftc_t *isp, union c if (isp_lun_cmd(isp, RQSTYPE_ENABLE_LUN, bus, lun, 0, 0)) { status = CAM_RESRC_UNAVAIL; } else { - mtx_sleep(ccb, &isp->isp_lock, PRIBIO, "isp_disable_lun", 0); + mtx_sleep(&status, &isp->isp_lock, PRIBIO, "isp_disable_lun", 0); } isp->isp_osinfo.rptr = NULL; done: From owner-svn-src-all@freebsd.org Mon Nov 30 21:30:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15C63A3DE73; Mon, 30 Nov 2015 21:30:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4FE01A77; Mon, 30 Nov 2015 21:30:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULUJp6066883; Mon, 30 Nov 2015 21:30:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULUIOB066880; Mon, 30 Nov 2015 21:30:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302130.tAULUIOB066880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291500 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:30:20 -0000 Author: mav Date: Mon Nov 30 21:30:18 2015 New Revision: 291500 URL: https://svnweb.freebsd.org/changeset/base/291500 Log: MFC r290147: Fix and improve error masking and reporting. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/ispmbox.h stable/10/sys/dev/isp/ispreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:29:38 2015 (r291499) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:30:18 2015 (r291500) @@ -2562,7 +2562,8 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui isp_pdb_24xx_t bill; } un; - MBSINIT(&mbs, MBOX_GET_PORT_DB, MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR, 250000); + MBSINIT(&mbs, MBOX_GET_PORT_DB, + MBLOGALL & ~MBLOGMASK(MBOX_COMMAND_PARAM_ERROR), 250000); if (IS_24XX(isp)) { mbs.ibits = (1 << 9)|(1 << 10); mbs.param[1] = id; @@ -2632,7 +2633,7 @@ isp_gethandles(ispsoftc_t *isp, int chan uint32_t p; uint16_t h; - MBSINIT(&mbs, MBOX_GET_ID_LIST, MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR, 250000); + MBSINIT(&mbs, MBOX_GET_ID_LIST, MBLOGALL, 250000); if (IS_24XX(isp)) { mbs.param[2] = DMA_WD1(fcp->isp_scdma); mbs.param[3] = DMA_WD0(fcp->isp_scdma); @@ -2726,7 +2727,8 @@ isp_get_wwn(ispsoftc_t *isp, int chan, i fcp->isp_loopstate < LOOP_PDB_RCVD) { return (wwn); } - MBSINIT(&mbs, MBOX_GET_PORT_NAME, MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR, 500000); + MBSINIT(&mbs, MBOX_GET_PORT_NAME, + MBLOGALL & ~MBLOGMASK(MBOX_COMMAND_PARAM_ERROR), 500000); if (ISP_CAP_2KLOGIN(isp)) { mbs.param[1] = loopid; if (nodename) { @@ -4920,7 +4922,8 @@ isp_control(ispsoftc_t *isp, ispctl_t ct } else { mbs.param[1] = (chan << 15) | (tgt << 8) | XS_LUN(xs); } - MBSINIT(&mbs, MBOX_ABORT, MBLOGALL & ~MBOX_COMMAND_ERROR, 0); + MBSINIT(&mbs, MBOX_ABORT, + MBLOGALL & ~MBLOGMASK(MBOX_COMMAND_ERROR), 0); mbs.param[2] = handle; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { @@ -7431,7 +7434,7 @@ isp_mboxcmd_qnw(ispsoftc_t *isp, mbreg_t static void isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mbp) { - const char *cname, *xname; + const char *cname, *xname, *sname; char tname[16], mname[16]; unsigned int ibits, obits, box, opcode; @@ -7541,57 +7544,58 @@ isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mb isp->isp_mboxbsy = 0; MBOX_RELEASE(isp); - out: - if (mbp->logval == 0 || opcode == MBOX_EXEC_FIRMWARE) { +out: + if (mbp->logval == 0 || mbp->param[0] == MBOX_COMMAND_COMPLETE) + return; + + if ((mbp->param[0] & 0xbfe0) == 0 && + (mbp->logval & MBLOGMASK(mbp->param[0])) == 0) return; - } - /* - * Just to be chatty here... - */ xname = NULL; + sname = ""; switch (mbp->param[0]) { - case MBOX_COMMAND_COMPLETE: - break; case MBOX_INVALID_COMMAND: - if (mbp->logval & MBLOGMASK(MBOX_COMMAND_COMPLETE)) { - xname = "INVALID COMMAND"; - } + xname = "INVALID COMMAND"; break; case MBOX_HOST_INTERFACE_ERROR: - if (mbp->logval & MBLOGMASK(MBOX_HOST_INTERFACE_ERROR)) { - xname = "HOST INTERFACE ERROR"; - } + xname = "HOST INTERFACE ERROR"; break; case MBOX_TEST_FAILED: - if (mbp->logval & MBLOGMASK(MBOX_TEST_FAILED)) { - xname = "TEST FAILED"; - } + xname = "TEST FAILED"; break; case MBOX_COMMAND_ERROR: - if (mbp->logval & MBLOGMASK(MBOX_COMMAND_ERROR)) { - xname = "COMMAND ERROR"; - } + xname = "COMMAND ERROR"; + ISP_SNPRINTF(mname, sizeof(mname), " subcode 0x%x", + mbp->param[1]); + sname = mname; break; case MBOX_COMMAND_PARAM_ERROR: - if (mbp->logval & MBLOGMASK(MBOX_COMMAND_PARAM_ERROR)) { - xname = "COMMAND PARAMETER ERROR"; - } - break; - case MBOX_LOOP_ID_USED: - if (mbp->logval & MBLOGMASK(MBOX_LOOP_ID_USED)) { - xname = "LOOP ID ALREADY IN USE"; - } + xname = "COMMAND PARAMETER ERROR"; break; case MBOX_PORT_ID_USED: - if (mbp->logval & MBLOGMASK(MBOX_PORT_ID_USED)) { - xname = "PORT ID ALREADY IN USE"; - } + xname = "PORT ID ALREADY IN USE"; + break; + case MBOX_LOOP_ID_USED: + xname = "LOOP ID ALREADY IN USE"; break; case MBOX_ALL_IDS_USED: - if (mbp->logval & MBLOGMASK(MBOX_ALL_IDS_USED)) { - xname = "ALL LOOP IDS IN USE"; - } + xname = "ALL LOOP IDS IN USE"; + break; + case MBOX_NOT_LOGGED_IN: + xname = "NOT LOGGED IN"; + break; + case MBOX_LINK_DOWN_ERROR: + xname = "LINK DOWN ERROR"; + break; + case MBOX_LOOPBACK_ERROR: + xname = "LOOPBACK ERROR"; + break; + case MBOX_CHECKSUM_ERROR: + xname = "CHECKSUM ERROR"; + break; + case MBOX_INVALID_PRODUCT_KEY: + xname = "INVALID PRODUCT KEY"; break; case MBOX_REGS_BUSY: xname = "REGISTERS BUSY"; @@ -7605,8 +7609,8 @@ isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mb break; } if (xname) { - isp_prt(isp, ISP_LOGALL, "Mailbox Command '%s' failed (%s)", - cname, xname); + isp_prt(isp, ISP_LOGALL, "Mailbox Command '%s' failed (%s%s)", + cname, xname, sname); } } Modified: stable/10/sys/dev/isp/ispmbox.h ============================================================================== --- stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:29:38 2015 (r291499) +++ stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:30:18 2015 (r291500) @@ -191,13 +191,17 @@ #define MBOX_LOOP_ID_USED 0x4008 #define MBOX_ALL_IDS_USED 0x4009 #define MBOX_NOT_LOGGED_IN 0x400A +#define MBOX_LINK_DOWN_ERROR 0x400B +#define MBOX_LOOPBACK_ERROR 0x400C +#define MBOX_CHECKSUM_ERROR 0x4010 +#define MBOX_INVALID_PRODUCT_KEY 0x4020 /* pseudo mailbox completion codes */ #define MBOX_REGS_BUSY 0x6000 /* registers in use */ #define MBOX_TIMEOUT 0x6001 /* command timed out */ -#define MBLOGALL 0x000f -#define MBLOGNONE 0x0000 -#define MBLOGMASK(x) ((x) & 0xf) +#define MBLOGALL 0xffffffff +#define MBLOGNONE 0x00000000 +#define MBLOGMASK(x) (1 << (((x) - 1) & 0x1f)) /* * Asynchronous event status codes Modified: stable/10/sys/dev/isp/ispreg.h ============================================================================== --- stable/10/sys/dev/isp/ispreg.h Mon Nov 30 21:29:38 2015 (r291499) +++ stable/10/sys/dev/isp/ispreg.h Mon Nov 30 21:30:18 2015 (r291500) @@ -453,11 +453,9 @@ typedef struct { uint32_t obits; /* bits to add for register copyout */ uint32_t ibitm; /* bits to mask for register copyin */ uint32_t obitm; /* bits to mask for register copyout */ - uint32_t - lineno : 16, - : 12, - logval : 4; + uint32_t logval; /* Bitmask of status codes to log */ uint32_t timeout; + uint32_t lineno; const char *func; } mbreg_t; #define MBSINIT(mbxp, code, loglev, timo) \ From owner-svn-src-all@freebsd.org Mon Nov 30 21:30:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB2ADA3DEC3; Mon, 30 Nov 2015 21:30:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A83021C27; Mon, 30 Nov 2015 21:30:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULUuqH068893; Mon, 30 Nov 2015 21:30:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULUu0i068892; Mon, 30 Nov 2015 21:30:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302130.tAULUu0i068892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:30:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291501 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:30:58 -0000 Author: mav Date: Mon Nov 30 21:30:56 2015 New Revision: 291501 URL: https://svnweb.freebsd.org/changeset/base/291501 Log: MFC r290159: Remove reset delays for which I see neither explanation nor need. Modified: stable/10/sys/dev/isp/isp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:30:18 2015 (r291500) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:30:56 2015 (r291501) @@ -1011,33 +1011,15 @@ isp_reset(ispsoftc_t *isp, int do_load_d } } - /* - * Give it a chance to finish starting up. - * Give the 24XX more time. - */ - if (IS_24XX(isp)) { - ISP_DELAY(500000); + if (IS_SCSI(isp)) { /* - * Check to see if the 24XX firmware really started. + * Set CLOCK RATE, but only if asked to. */ - if (mbs.param[1] == 0xdead) { - isp_prt(isp, ISP_LOGERR, "f/w didn't *really* start"); - ISP_RESET0(isp); - return; - } - } else { - ISP_DELAY(250000); - if (IS_SCSI(isp)) { - /* - * Set CLOCK RATE, but only if asked to. - */ - if (isp->isp_clock) { - mbs.param[0] = MBOX_SET_CLOCK_RATE; - mbs.param[1] = isp->isp_clock; - mbs.logval = MBLOGNONE; - isp_mboxcmd(isp, &mbs); - /* we will try not to care if this fails */ - } + if (isp->isp_clock) { + MBSINIT(&mbs, MBOX_SET_CLOCK_RATE, MBLOGALL, 0); + mbs.param[1] = isp->isp_clock; + isp_mboxcmd(isp, &mbs); + /* we will try not to care if this fails */ } } From owner-svn-src-all@freebsd.org Mon Nov 30 21:31:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D23FEA3DFC4; Mon, 30 Nov 2015 21:31:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CDD71EAF; Mon, 30 Nov 2015 21:31:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULVYTU068971; Mon, 30 Nov 2015 21:31:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULVYSm068970; Mon, 30 Nov 2015 21:31:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302131.tAULVYSm068970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291502 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:31:35 -0000 Author: mav Date: Mon Nov 30 21:31:34 2015 New Revision: 291502 URL: https://svnweb.freebsd.org/changeset/base/291502 Log: MFC r290160: Remove some unneeded code. Modified: stable/10/sys/dev/isp/isp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:30:56 2015 (r291501) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:31:34 2015 (r291502) @@ -2279,10 +2279,6 @@ isp_mark_portdb(ispsoftc_t *isp, int cha fcportdb_t *lp; int i; - if (chan < 0 || chan >= isp->isp_nchan) { - isp_prt(isp, ISP_LOGWARN, "isp_mark_portdb: bad channel %d", chan); - return; - } for (i = 0; i < MAX_FC_TARG; i++) { lp = &fcp->portdb[i]; switch (lp->state) { From owner-svn-src-all@freebsd.org Mon Nov 30 21:32:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9540AA3D013; Mon, 30 Nov 2015 21:32:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70D4F1059; Mon, 30 Nov 2015 21:32:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULWCjf069056; Mon, 30 Nov 2015 21:32:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULWCJD069054; Mon, 30 Nov 2015 21:32:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302132.tAULWCJD069054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291503 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:32:13 -0000 Author: mav Date: Mon Nov 30 21:32:12 2015 New Revision: 291503 URL: https://svnweb.freebsd.org/changeset/base/291503 Log: MFC r290504: Make ISP_SLEEP() really sleep instead of spinning. While there, simplify the wait logic. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:31:34 2015 (r291502) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:32:12 2015 (r291503) @@ -2756,12 +2756,13 @@ static int isp_fclink_test(ispsoftc_t *isp, int chan, int usdelay) { mbreg_t mbs; - int count, check_for_fabric, r; + int check_for_fabric, r; uint8_t lwfs; int loopid; fcparam *fcp; fcportdb_t *lp; isp_pdb_t pdb; + NANOTIME_T hra, hrb; fcp = FCPARAM(isp, chan); @@ -2772,13 +2773,8 @@ isp_fclink_test(ispsoftc_t *isp, int cha * Wait up to N microseconds for F/W to go to a ready state. */ lwfs = FW_CONFIG_WAIT; - count = 0; - while (count < usdelay) { - uint64_t enano; - uint32_t wrk; - NANOTIME_T hra, hrb; - - GET_NANOTIME(&hra); + GET_NANOTIME(&hra); + do { isp_fw_state(isp, chan); if (lwfs != fcp->isp_fwstate) { isp_prt(isp, ISP_LOGCONFIG|ISP_LOG_SANCFG, "Chan %d Firmware State <%s->%s>", chan, isp_fc_fw_statename((int)lwfs), isp_fc_fw_statename((int)fcp->isp_fwstate)); @@ -2787,46 +2783,9 @@ isp_fclink_test(ispsoftc_t *isp, int cha if (fcp->isp_fwstate == FW_READY) { break; } + ISP_SLEEP(isp, 1000); GET_NANOTIME(&hrb); - - /* - * Get the elapsed time in nanoseconds. - * Always guaranteed to be non-zero. - */ - enano = NANOTIME_SUB(&hrb, &hra); - - isp_prt(isp, ISP_LOGDEBUG1, "usec%d: 0x%lx->0x%lx enano 0x%x%08x", count, (long) GET_NANOSEC(&hra), (long) GET_NANOSEC(&hrb), (uint32_t)(enano >> 32), (uint32_t)(enano)); - - /* - * If the elapsed time is less than 1 millisecond, - * delay a period of time up to that millisecond of - * waiting. - * - * This peculiar code is an attempt to try and avoid - * invoking uint64_t math support functions for some - * platforms where linkage is a problem. - */ - if (enano < (1000 * 1000)) { - count += 1000; - enano = (1000 * 1000) - enano; - while (enano > (uint64_t) 4000000000U) { - ISP_SLEEP(isp, 4000000); - enano -= (uint64_t) 4000000000U; - } - wrk = enano; - wrk /= 1000; - ISP_SLEEP(isp, wrk); - } else { - while (enano > (uint64_t) 4000000000U) { - count += 4000000; - enano -= (uint64_t) 4000000000U; - } - wrk = enano; - count += (wrk / 1000); - } - } - - + } while (NANOTIME_SUB(&hrb, &hra) / 1000 < usdelay); /* * If we haven't gone to 'ready' state, return. Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Mon Nov 30 21:31:34 2015 (r291502) +++ stable/10/sys/dev/isp/isp_freebsd.h Mon Nov 30 21:32:12 2015 (r291503) @@ -399,8 +399,14 @@ struct isposinfo { #define ISP_MEMZERO(a, b) memset(a, 0, b) #define ISP_MEMCPY memcpy #define ISP_SNPRINTF snprintf -#define ISP_DELAY DELAY -#define ISP_SLEEP(isp, x) DELAY(x) +#define ISP_DELAY(x) DELAY(x) +#if __FreeBSD_version < 1000029 +#define ISP_SLEEP(isp, x) msleep(&(isp)->isp_osinfo.lock, \ + &(isp)->isp_osinfo.lock, 0, "isp_sleep", ((x) + tick - 1) / tick) +#else +#define ISP_SLEEP(isp, x) msleep_sbt(&(isp)->isp_osinfo.lock, \ + &(isp)->isp_osinfo.lock, 0, "isp_sleep", (x) * SBT_1US, 0, 0) +#endif #define ISP_MIN imin From owner-svn-src-all@freebsd.org Mon Nov 30 21:32:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA367A3D059; Mon, 30 Nov 2015 21:32:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B36F11227; Mon, 30 Nov 2015 21:32:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULWq3O069627; Mon, 30 Nov 2015 21:32:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULWqBw069626; Mon, 30 Nov 2015 21:32:52 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302132.tAULWqBw069626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291504 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:32:54 -0000 Author: mav Date: Mon Nov 30 21:32:52 2015 New Revision: 291504 URL: https://svnweb.freebsd.org/changeset/base/291504 Log: MFC r290506: Specify VP when sending a marker. Modified: stable/10/sys/dev/isp/isp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:32:12 2015 (r291503) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:32:52 2015 (r291504) @@ -4434,6 +4434,7 @@ isp_start(XS_T *xs) m->mrk_header.rqs_entry_count = 1; m->mrk_header.rqs_entry_type = RQSTYPE_MARKER; m->mrk_modifier = SYNC_ALL; + m->mrk_vphdl = XS_CHANNEL(xs); isp_put_marker_24xx(isp, m, qep); } else { isp_marker_t *m = (isp_marker_t *) reqp; From owner-svn-src-all@freebsd.org Mon Nov 30 21:33:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2644A3D0BB; Mon, 30 Nov 2015 21:33:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63F35137D; Mon, 30 Nov 2015 21:33:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULXUFb069721; Mon, 30 Nov 2015 21:33:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULXUke069719; Mon, 30 Nov 2015 21:33:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302133.tAULXUke069719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:33:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291505 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:33:31 -0000 Author: mav Date: Mon Nov 30 21:33:30 2015 New Revision: 291505 URL: https://svnweb.freebsd.org/changeset/base/291505 Log: MFC r290507: Rework r290504. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:32:52 2015 (r291504) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:33:30 2015 (r291505) @@ -2774,7 +2774,7 @@ isp_fclink_test(ispsoftc_t *isp, int cha */ lwfs = FW_CONFIG_WAIT; GET_NANOTIME(&hra); - do { + while (1) { isp_fw_state(isp, chan); if (lwfs != fcp->isp_fwstate) { isp_prt(isp, ISP_LOGCONFIG|ISP_LOG_SANCFG, "Chan %d Firmware State <%s->%s>", chan, isp_fc_fw_statename((int)lwfs), isp_fc_fw_statename((int)fcp->isp_fwstate)); @@ -2783,9 +2783,11 @@ isp_fclink_test(ispsoftc_t *isp, int cha if (fcp->isp_fwstate == FW_READY) { break; } - ISP_SLEEP(isp, 1000); GET_NANOTIME(&hrb); - } while (NANOTIME_SUB(&hrb, &hra) / 1000 < usdelay); + if ((NANOTIME_SUB(&hrb, &hra) / 1000 + 1000 >= usdelay)) + break; + ISP_SLEEP(isp, 1000); + } /* * If we haven't gone to 'ready' state, return. Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Mon Nov 30 21:32:52 2015 (r291504) +++ stable/10/sys/dev/isp/isp_freebsd.h Mon Nov 30 21:33:30 2015 (r291505) @@ -401,10 +401,10 @@ struct isposinfo { #define ISP_SNPRINTF snprintf #define ISP_DELAY(x) DELAY(x) #if __FreeBSD_version < 1000029 -#define ISP_SLEEP(isp, x) msleep(&(isp)->isp_osinfo.lock, \ +#define ISP_SLEEP(isp, x) msleep(&(isp)->isp_osinfo.is_exiting, \ &(isp)->isp_osinfo.lock, 0, "isp_sleep", ((x) + tick - 1) / tick) #else -#define ISP_SLEEP(isp, x) msleep_sbt(&(isp)->isp_osinfo.lock, \ +#define ISP_SLEEP(isp, x) msleep_sbt(&(isp)->isp_osinfo.is_exiting, \ &(isp)->isp_osinfo.lock, 0, "isp_sleep", (x) * SBT_1US, 0, 0) #endif From owner-svn-src-all@freebsd.org Mon Nov 30 21:34:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F39FBA3D122; Mon, 30 Nov 2015 21:34:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0C0B1547; Mon, 30 Nov 2015 21:34:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULYHuU069803; Mon, 30 Nov 2015 21:34:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULYHRj069801; Mon, 30 Nov 2015 21:34:17 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302134.tAULYHRj069801@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:34:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291506 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:34:19 -0000 Author: mav Date: Mon Nov 30 21:34:17 2015 New Revision: 291506 URL: https://svnweb.freebsd.org/changeset/base/291506 Log: MFC r290830: Fix/improve CRN tracking. Modified: stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:33:30 2015 (r291505) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:34:17 2015 (r291506) @@ -4249,16 +4249,9 @@ isp_action(struct cam_sim *sim, union cc break; #endif case XPT_RESET_DEV: /* BDR the specified SCSI device */ - { - struct isp_fc *fc; - bus = cam_sim_bus(xpt_path_sim(ccb->ccb_h.path)); tgt = ccb->ccb_h.target_id; tgt |= (bus << 16); - if (IS_FC(isp)) - fc = ISP_FC_PC(isp, bus); - else - fc = NULL; error = isp_control(isp, ISPCTL_RESET_DEV, bus, tgt); if (error) { @@ -4269,14 +4262,13 @@ isp_action(struct cam_sim *sim, union cc * Reference Number, because the target will expect * that we re-start the CRN at 1 after a reset. */ - if (fc != NULL) - isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); + if (IS_FC(isp)) + isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); ccb->ccb_h.status = CAM_REQ_CMP; } xpt_done(ccb); break; - } case XPT_ABORT: /* Abort the specified CCB */ { union ccb *accb = ccb->cab.abort_ccb; @@ -4854,7 +4846,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Starting Loop Down Timer @ %lu", (unsigned long) time_uptime); } } - isp_fcp_reset_crn(fc, /*tgt*/0, /*tgt_set*/ 0); + isp_fcp_reset_crn(isp, bus, /*tgt*/0, /*tgt_set*/ 0); isp_prt(isp, ISP_LOGINFO, "Chan %d: %s", bus, msg); break; @@ -4887,7 +4879,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm if ((FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) && (lp->prli_word3 & PRLI_WD3_TARGET_FUNCTION)) { lp->is_target = 1; - isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); + isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); isp_make_here(isp, lp, bus, tgt); } if ((FCPARAM(isp, bus)->role & ISP_ROLE_TARGET) && @@ -4917,11 +4909,11 @@ changed: (lp->new_prli_word3 & PRLI_WD3_TARGET_FUNCTION))) { lp->is_target = !lp->is_target; if (lp->is_target) { - isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); + isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); isp_make_here(isp, lp, bus, tgt); } else { isp_make_gone(isp, lp, bus, tgt); - isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); + isp_fcp_reset_crn(isp, bus, tgt, /*tgt_set*/ 1); } } if (lp->is_initiator != @@ -5490,23 +5482,23 @@ isp_common_dmateardown(ispsoftc_t *isp, * (needed for events like a LIP). */ void -isp_fcp_reset_crn(struct isp_fc *fc, uint32_t tgt, int tgt_set) +isp_fcp_reset_crn(ispsoftc_t *isp, int chan, uint32_t tgt, int tgt_set) { - int i; + struct isp_fc *fc = ISP_FC_PC(isp, chan); struct isp_nexus *nxp; + int i; if (tgt_set == 0) - isp_prt(fc->isp, ISP_LOG_SANCFG, "resetting CRN on all targets"); + isp_prt(isp, ISP_LOGDEBUG0, + "Chan %d resetting CRN on all targets", chan); else - isp_prt(fc->isp, ISP_LOG_SANCFG, "resetting CRN target %u", tgt); + isp_prt(isp, ISP_LOGDEBUG0, + "Chan %d resetting CRN on target %u", chan, tgt); for (i = 0; i < NEXUS_HASH_WIDTH; i++) { - nxp = fc->nexus_hash[i]; - while (nxp) { - if ((tgt_set != 0) && (tgt == nxp->tgt)) + for (nxp = fc->nexus_hash[i]; nxp != NULL; nxp = nxp->next) { + if (tgt_set == 0 || tgt == nxp->tgt) nxp->crnseed = 0; - - nxp = nxp->next; } } } @@ -5550,15 +5542,11 @@ isp_fcp_next_crn(ispsoftc_t *isp, uint8_ nxp->next = fc->nexus_hash[idx]; fc->nexus_hash[idx] = nxp; } - if (nxp) { - if (nxp->crnseed == 0) - nxp->crnseed = 1; - if (cmd) - PISP_PCMD(cmd)->crn = nxp->crnseed; - *crnp = nxp->crnseed++; - return (0); - } - return (-1); + if (nxp->crnseed == 0) + nxp->crnseed = 1; + PISP_PCMD(cmd)->crn = nxp->crnseed; + *crnp = nxp->crnseed++; + return (0); } /* Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Mon Nov 30 21:33:30 2015 (r291505) +++ stable/10/sys/dev/isp/isp_freebsd.h Mon Nov 30 21:34:17 2015 (r291506) @@ -745,7 +745,7 @@ int isp_fc_scratch_acquire(ispsoftc_t *, int isp_mstohz(int); void isp_platform_intr(void *); void isp_common_dmateardown(ispsoftc_t *, struct ccb_scsiio *, uint32_t); -void isp_fcp_reset_crn(struct isp_fc *, uint32_t, int); +void isp_fcp_reset_crn(ispsoftc_t *, int, uint32_t, int); int isp_fcp_next_crn(ispsoftc_t *, uint8_t *, XS_T *); /* From owner-svn-src-all@freebsd.org Mon Nov 30 21:35:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FE92A3D16D; Mon, 30 Nov 2015 21:35:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0D0A17B4; Mon, 30 Nov 2015 21:35:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULZ3xU069891; Mon, 30 Nov 2015 21:35:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULZ3oR069888; Mon, 30 Nov 2015 21:35:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302135.tAULZ3oR069888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291507 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:35:05 -0000 Author: mav Date: Mon Nov 30 21:35:03 2015 New Revision: 291507 URL: https://svnweb.freebsd.org/changeset/base/291507 Log: MFC r290978: Add real initial support for RQSTYPE_RPT_ID_ACQ. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/ispmbox.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:34:17 2015 (r291506) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:35:03 2015 (r291507) @@ -6192,6 +6192,9 @@ isp_parse_async_fc(ispsoftc_t *isp, uint static int isp_handle_other_response(ispsoftc_t *isp, int type, isphdr_t *hp, uint32_t *optrp) { + isp_ridacq_t rid; + int chan, c; + switch (type) { case RQSTYPE_STATUS_CONT: isp_prt(isp, ISP_LOG_WARN1, "Ignored Continuation Response"); @@ -6199,6 +6202,23 @@ isp_handle_other_response(ispsoftc_t *is case RQSTYPE_MARKER: isp_prt(isp, ISP_LOG_WARN1, "Marker Response"); return (1); + case RQSTYPE_RPT_ID_ACQ: + isp_get_ridacq(isp, (isp_ridacq_t *)hp, &rid); + if (rid.ridacq_format == 0) { + for (chan = 0; chan < isp->isp_nchan; chan++) { + fcparam *fcp = FCPARAM(isp, chan); + if (fcp->role == ISP_ROLE_NONE) + continue; + c = (chan == 0) ? 127 : (chan - 1); + if (rid.ridacq_map[c / 16] & (1 << (c % 16))) + isp_async(isp, ISPASYNC_CHANGE_NOTIFY, + chan, ISPASYNC_CHANGE_OTHER); + } + } else { + isp_async(isp, ISPASYNC_CHANGE_NOTIFY, + rid.ridacq_vp_index, ISPASYNC_CHANGE_OTHER); + } + return (1); case RQSTYPE_ATIO: case RQSTYPE_CTIO: case RQSTYPE_ENABLE_LUN: @@ -6219,15 +6239,6 @@ isp_handle_other_response(ispsoftc_t *is } #endif /* FALLTHROUGH */ - case RQSTYPE_RPT_ID_ACQ: - if (IS_24XX(isp)) { - isp_ridacq_t rid; - isp_get_ridacq(isp, (isp_ridacq_t *)hp, &rid); - if (rid.ridacq_format == 0) { - } - return (1); - } - /* FALLTHROUGH */ case RQSTYPE_REQUEST: default: ISP_DELAY(100); Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:34:17 2015 (r291506) +++ stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:35:03 2015 (r291507) @@ -1733,6 +1733,10 @@ isp_get_ridacq(ispsoftc_t *isp, isp_rida int i; isp_get_hdr(isp, &src->ridacq_hdr, &dst->ridacq_hdr); ISP_IOXGET_32(isp, &src->ridacq_handle, dst->ridacq_handle); + ISP_IOXGET_8(isp, &src->ridacq_vp_acquired, dst->ridacq_vp_acquired); + ISP_IOXGET_8(isp, &src->ridacq_vp_setup, dst->ridacq_vp_setup); + ISP_IOXGET_8(isp, &src->ridacq_vp_index, dst->ridacq_vp_index); + ISP_IOXGET_8(isp, &src->ridacq_vp_status, dst->ridacq_vp_status); ISP_IOXGET_16(isp, &src->ridacq_vp_port_lo, dst->ridacq_vp_port_lo); ISP_IOXGET_8(isp, &src->ridacq_vp_port_hi, dst->ridacq_vp_port_hi); ISP_IOXGET_8(isp, &src->ridacq_format, dst->ridacq_format); @@ -1742,17 +1746,6 @@ isp_get_ridacq(ispsoftc_t *isp, isp_rida for (i = 0; i < sizeof (src->ridacq_reserved1) / sizeof (src->ridacq_reserved1[0]); i++) { ISP_IOXGET_16(isp, &src->ridacq_reserved1[i], dst->ridacq_reserved1[i]); } - if (dst->ridacq_format == 0) { - ISP_IOXGET_8(isp, &src->un.type0.ridacq_vp_acquired, dst->un.type0.ridacq_vp_acquired); - ISP_IOXGET_8(isp, &src->un.type0.ridacq_vp_setup, dst->un.type0.ridacq_vp_setup); - ISP_IOXGET_16(isp, &src->un.type0.ridacq_reserved0, dst->un.type0.ridacq_reserved0); - } else if (dst->ridacq_format == 1) { - ISP_IOXGET_16(isp, &src->un.type1.ridacq_vp_count, dst->un.type1.ridacq_vp_count); - ISP_IOXGET_8(isp, &src->un.type1.ridacq_vp_index, dst->un.type1.ridacq_vp_index); - ISP_IOXGET_8(isp, &src->un.type1.ridacq_vp_status, dst->un.type1.ridacq_vp_status); - } else { - ISP_MEMZERO(&dst->un, sizeof (dst->un)); - } } Modified: stable/10/sys/dev/isp/ispmbox.h ============================================================================== --- stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:34:17 2015 (r291506) +++ stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:35:03 2015 (r291507) @@ -1485,18 +1485,10 @@ typedef struct { typedef struct { isphdr_t ridacq_hdr; uint32_t ridacq_handle; - union { - struct { - uint8_t ridacq_vp_acquired; - uint8_t ridacq_vp_setup; - uint16_t ridacq_reserved0; - } type0; /* type 0 */ - struct { - uint16_t ridacq_vp_count; - uint8_t ridacq_vp_index; - uint8_t ridacq_vp_status; - } type1; /* type 1 */ - } un; + uint8_t ridacq_vp_acquired; + uint8_t ridacq_vp_setup; + uint8_t ridacq_vp_index; + uint8_t ridacq_vp_status; uint16_t ridacq_vp_port_lo; uint8_t ridacq_vp_port_hi; uint8_t ridacq_format; /* 0 or 1 */ @@ -1506,8 +1498,11 @@ typedef struct { #define RIDACQ_STS_COMPLETE 0 #define RIDACQ_STS_UNACQUIRED 1 -#define RIDACQ_STS_CHANGED 20 - +#define RIDACQ_STS_CHANGED 2 +#define RIDACQ_STS_SNS_TIMEOUT 3 +#define RIDACQ_STS_SNS_REJECTED 4 +#define RIDACQ_STS_SCR_TIMEOUT 5 +#define RIDACQ_STS_SCR_REJECTED 6 /* * Simple Name Server Data Structures From owner-svn-src-all@freebsd.org Mon Nov 30 21:35:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 719ABA3D1C1; Mon, 30 Nov 2015 21:35:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33A8F192C; Mon, 30 Nov 2015 21:35:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULZh6D069968; Mon, 30 Nov 2015 21:35:43 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULZh1x069966; Mon, 30 Nov 2015 21:35:43 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302135.tAULZh1x069966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291508 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:35:44 -0000 Author: mav Date: Mon Nov 30 21:35:43 2015 New Revision: 291508 URL: https://svnweb.freebsd.org/changeset/base/291508 Log: MFC r290980: Make firmware handle virtual ports SNS logins for us. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_library.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:35:03 2015 (r291507) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:35:43 2015 (r291508) @@ -2187,7 +2187,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) size_t amt = 0; uint8_t *off; - vpinfo.vp_global_options = 0; + vpinfo.vp_global_options = ICB2400_VPGOPT_GEN_RIDA; if (ISP_CAP_VP0(isp)) { vpinfo.vp_global_options |= ICB2400_VPGOPT_VP0_DECOUPLE; vpinfo.vp_count = isp->isp_nchan; @@ -2207,7 +2207,8 @@ isp_fibre_init_2400(ispsoftc_t *isp) ISP_MEMZERO(&pi, sizeof (pi)); fcp2 = FCPARAM(isp, chan); if (fcp2->role != ISP_ROLE_NONE) { - pi.vp_port_options = ICB2400_VPOPT_ENABLED; + pi.vp_port_options = ICB2400_VPOPT_ENABLED | + ICB2400_VPOPT_ENA_SNSLOGIN; if (fcp2->role & ISP_ROLE_INITIATOR) pi.vp_port_options |= ICB2400_VPOPT_INI_ENABLE; if ((fcp2->role & ISP_ROLE_TARGET) == 0) @@ -2914,16 +2915,7 @@ isp_fclink_test(ispsoftc_t *isp, int cha } else { fcp->isp_fabric_params = 0; } - if (chan) { - fcp->isp_sns_hdl = NPH_RESERVED - chan; - r = isp_plogx(isp, chan, fcp->isp_sns_hdl, SNS_PORT_ID, PLOGX_FLG_CMD_PLOGI | PLOGX_FLG_COND_PLOGI | PLOGX_FLG_SKIP_PRLI, 0); - if (r) { - isp_prt(isp, ISP_LOGWARN, "%s: Chan %d cannot log into SNS", __func__, chan); - return (-1); - } - } else { - fcp->isp_sns_hdl = NPH_SNS_ID; - } + fcp->isp_sns_hdl = NPH_SNS_ID; r = isp_register_fc4_type_24xx(isp, chan); } else { fcp->isp_sns_hdl = SNS_ID; @@ -3167,7 +3159,7 @@ fail: * Don't scan "special" ids. */ if (ISP_CAP_2KLOGIN(isp)) { - if (handle >= NPH_RESERVED - isp->isp_nchan) + if (handle >= NPH_RESERVED) continue; } else { if (handle >= FL_ID && handle <= SNS_ID) @@ -4276,7 +4268,7 @@ isp_next_handle(ispsoftc_t *isp, uint16_ handle = *ohp; if (ISP_CAP_2KLOGIN(isp)) { minh = 0; - maxh = NPH_RESERVED - isp->isp_nchan; /* Reserve for SNS */ + maxh = NPH_RESERVED; } else { minh = SNS_ID + 1; maxh = NPH_MAX - 1; Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:35:03 2015 (r291507) +++ stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:35:43 2015 (r291508) @@ -604,7 +604,8 @@ isp_fc_enable_vp(ispsoftc_t *isp, int ch vp->vp_mod_cnt = 1; vp->vp_mod_idx0 = chan; vp->vp_mod_cmd = VP_MODIFY_ENA; - vp->vp_mod_ports[0].options = ICB2400_VPOPT_ENABLED; + vp->vp_mod_ports[0].options = ICB2400_VPOPT_ENABLED | + ICB2400_VPOPT_ENA_SNSLOGIN; if (fcp->role & ISP_ROLE_INITIATOR) { vp->vp_mod_ports[0].options |= ICB2400_VPOPT_INI_ENABLE; } From owner-svn-src-all@freebsd.org Mon Nov 30 21:36:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD18AA3D212; Mon, 30 Nov 2015 21:36:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A9D61A83; Mon, 30 Nov 2015 21:36:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULaNnS070053; Mon, 30 Nov 2015 21:36:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULaNJ2070052; Mon, 30 Nov 2015 21:36:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302136.tAULaNJ2070052@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291509 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:36:24 -0000 Author: mav Date: Mon Nov 30 21:36:23 2015 New Revision: 291509 URL: https://svnweb.freebsd.org/changeset/base/291509 Log: MFC r290981: Off-by-one correctiont to r290980. Modified: stable/10/sys/dev/isp/isp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:35:43 2015 (r291508) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:36:23 2015 (r291509) @@ -4268,7 +4268,7 @@ isp_next_handle(ispsoftc_t *isp, uint16_ handle = *ohp; if (ISP_CAP_2KLOGIN(isp)) { minh = 0; - maxh = NPH_RESERVED; + maxh = NPH_RESERVED - 1; } else { minh = SNS_ID + 1; maxh = NPH_MAX - 1; From owner-svn-src-all@freebsd.org Mon Nov 30 21:37:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07D6BA3D26E; Mon, 30 Nov 2015 21:37:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C53AB1C0B; Mon, 30 Nov 2015 21:37:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULbNFw070147; Mon, 30 Nov 2015 21:37:23 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULbMCg070144; Mon, 30 Nov 2015 21:37:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302137.tAULbMCg070144@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:37:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291510 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:37:24 -0000 Author: mav Date: Mon Nov 30 21:37:22 2015 New Revision: 291510 URL: https://svnweb.freebsd.org/changeset/base/291510 Log: MFC r290993, r290994: Unify and cleanup FC ports scan. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:36:23 2015 (r291509) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:37:22 2015 (r291510) @@ -64,12 +64,6 @@ __FBSDID("$FreeBSD$"); * General defines */ #define MBOX_DELAY_COUNT 1000000 / 100 -#define ISP_MARK_PORTDB(a, b, c) \ - do { \ - isp_prt(isp, ISP_LOG_SANCFG, \ - "Chan %d ISP_MARK_PORTDB@LINE %d", (b), __LINE__); \ - isp_mark_portdb((a), (b), (c)); \ - } while (0) /* * Local static data @@ -132,7 +126,7 @@ static int isp_login_device(ispsoftc_t * static int isp_register_fc4_type(ispsoftc_t *, int); static int isp_register_fc4_type_24xx(ispsoftc_t *, int); static uint16_t isp_next_handle(ispsoftc_t *, uint16_t *); -static void isp_fw_state(ispsoftc_t *, int); +static int isp_fw_state(ispsoftc_t *, int); static void isp_mboxcmd_qnw(ispsoftc_t *, mbreg_t *, int); static void isp_mboxcmd(ispsoftc_t *, mbreg_t *); @@ -149,6 +143,19 @@ static void isp_parse_nvram_12160(ispsof static void isp_parse_nvram_2100(ispsoftc_t *, uint8_t *); static void isp_parse_nvram_2400(ispsoftc_t *, uint8_t *); +static void +isp_change_fw_state(ispsoftc_t *isp, int chan, int state) +{ + fcparam *fcp = FCPARAM(isp, chan); + + if (fcp->isp_fwstate == state) + return; + isp_prt(isp, ISP_LOGCONFIG|ISP_LOG_SANCFG, + "Chan %d Firmware state <%s->%s>", chan, + isp_fc_fw_statename(fcp->isp_fwstate), isp_fc_fw_statename(state)); + fcp->isp_fwstate = state; +} + /* * Reset Hardware. * @@ -1267,8 +1274,9 @@ isp_reset(ispsoftc_t *isp, int do_load_d isp->isp_nchan = 1; } } - for (i = 0; i < isp->isp_nchan; i++) { - isp_fw_state(isp, i); + if (IS_FC(isp)) { + for (i = 0; i < isp->isp_nchan; i++) + isp_change_fw_state(isp, i, FW_CONFIG_WAIT); } if (isp->isp_dead) { isp_shutdown(isp); @@ -2577,7 +2585,10 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui pdb->portid = BITS2WORD_24XX(un.bill.pdb_portid_bits); ISP_MEMCPY(pdb->portname, un.bill.pdb_portname, 8); ISP_MEMCPY(pdb->nodename, un.bill.pdb_nodename, 8); - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d handle 0x%x Port 0x%06x flags 0x%x curstate %x", chan, id, pdb->portid, un.bill.pdb_flags, un.bill.pdb_curstate); + isp_prt(isp, ISP_LOGDEBUG1, + "Chan %d handle 0x%x Port 0x%06x flags 0x%x curstate %x", + chan, id, pdb->portid, un.bill.pdb_flags, + un.bill.pdb_curstate); if (un.bill.pdb_curstate < PDB2400_STATE_PLOGI_DONE || un.bill.pdb_curstate > PDB2400_STATE_LOGGED_IN) { mbs.param[0] = MBOX_NOT_LOGGED_IN; if (dolock) { @@ -2592,6 +2603,8 @@ isp_getpdb(ispsoftc_t *isp, int chan, ui pdb->portid = BITS2WORD(un.fred.pdb_portid_bits); ISP_MEMCPY(pdb->portname, un.fred.pdb_portname, 8); ISP_MEMCPY(pdb->nodename, un.fred.pdb_nodename, 8); + isp_prt(isp, ISP_LOGDEBUG1, + "Chan %d handle 0x%x Port 0x%06x", chan, id, pdb->portid); } if (dolock) { FC_SCRATCH_RELEASE(isp, chan); @@ -2699,13 +2712,8 @@ static uint64_t isp_get_wwn(ispsoftc_t *isp, int chan, int loopid, int nodename) { uint64_t wwn = INI_NONE; - fcparam *fcp = FCPARAM(isp, chan); mbreg_t mbs; - if (fcp->isp_fwstate < FW_READY || - fcp->isp_loopstate < LOOP_PDB_RCVD) { - return (wwn); - } MBSINIT(&mbs, MBOX_GET_PORT_NAME, MBLOGALL & ~MBLOGMASK(MBOX_COMMAND_PARAM_ERROR), 500000); if (ISP_CAP_2KLOGIN(isp)) { @@ -2758,7 +2766,6 @@ isp_fclink_test(ispsoftc_t *isp, int cha { mbreg_t mbs; int check_for_fabric, r; - uint8_t lwfs; int loopid; fcparam *fcp; fcportdb_t *lp; @@ -2767,20 +2774,21 @@ isp_fclink_test(ispsoftc_t *isp, int cha fcp = FCPARAM(isp, chan); - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC Link Test Entry", chan); - ISP_MARK_PORTDB(isp, chan, 1); + /* Mark port database entries for following scan. */ + isp_mark_portdb(isp, chan, 1); + + if (fcp->isp_loopstate >= LOOP_LTEST_DONE) + return (0); + + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC link test", chan); + fcp->isp_loopstate = LOOP_TESTING_LINK; /* * Wait up to N microseconds for F/W to go to a ready state. */ - lwfs = FW_CONFIG_WAIT; GET_NANOTIME(&hra); while (1) { - isp_fw_state(isp, chan); - if (lwfs != fcp->isp_fwstate) { - isp_prt(isp, ISP_LOGCONFIG|ISP_LOG_SANCFG, "Chan %d Firmware State <%s->%s>", chan, isp_fc_fw_statename((int)lwfs), isp_fc_fw_statename((int)fcp->isp_fwstate)); - lwfs = fcp->isp_fwstate; - } + isp_change_fw_state(isp, chan, isp_fw_state(isp, chan)); if (fcp->isp_fwstate == FW_READY) { break; } @@ -2794,7 +2802,9 @@ isp_fclink_test(ispsoftc_t *isp, int cha * If we haven't gone to 'ready' state, return. */ if (fcp->isp_fwstate != FW_READY) { - isp_prt(isp, ISP_LOG_SANCFG, "%s: chan %d not at FW_READY state", __func__, chan); + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Firmware is not ready (%s)", + chan, isp_fc_fw_statename(fcp->isp_fwstate)); return (-1); } @@ -2860,7 +2870,7 @@ isp_fclink_test(ispsoftc_t *isp, int cha } if (alpa_map[i] && fcp->isp_loopid != i) { isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d deriving loopid %d from AL_PA map (AL_PA 0x%x) and ignoring returned value %d (AL_PA 0x%x)", + "Chan %d Deriving loopid %d from AL_PA map (AL_PA 0x%x) and ignoring returned value %d (AL_PA 0x%x)", chan, i, alpa_map[i], fcp->isp_loopid, alpa); fcp->isp_loopid = i; } @@ -2953,11 +2963,12 @@ not_on_fabric: } } + fcp->isp_loopstate = LOOP_LTEST_DONE; /* * Announce ourselves, too. */ isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGCONFIG, topology, chan, (uint32_t) (fcp->isp_wwpn >> 32), (uint32_t) fcp->isp_wwpn, fcp->isp_portid, fcp->isp_loopid, isp_fc_toponame(fcp)); - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC Link Test Complete", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC link test done", chan); return (0); } @@ -2967,19 +2978,10 @@ not_on_fabric: * At this point, we've scanned the local loop (if any) and the fabric * and performed fabric logins on all new devices. * - * Our task here is to go through our port database and remove any entities + * Our task here is to go through our port database removing any entities * that are still marked probational (issuing PLOGO for ones which we had - * PLOGI'd into) or are dead. - * - * Our task here is to also check policy to decide whether devices which - * have *changed* in some way should still be kept active. For example, - * if a device has just changed PortID, we can either elect to treat it - * as an old device or as a newly arrived device (and notify the outer - * layer appropriately). - * - * We also do initiator map target id assignment here for new initiator - * devices and refresh old ones ot make sure that they point to the correct - * entities. + * PLOGI'd into) or are dead, and notifying upper layers about new/changed + * devices. */ static int isp_pdb_sync(ispsoftc_t *isp, int chan) @@ -2988,44 +2990,14 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) fcportdb_t *lp; uint16_t dbidx; - if (fcp->isp_loopstate == LOOP_READY) { - return (0); - } - - /* - * Make sure we're okay for doing this right now. - */ - if (fcp->isp_loopstate != LOOP_PDB_RCVD && - fcp->isp_loopstate != LOOP_FSCAN_DONE && - fcp->isp_loopstate != LOOP_LSCAN_DONE) { - isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: bad loopstate %d", - fcp->isp_loopstate); + if (fcp->isp_loopstate < LOOP_FSCAN_DONE) { return (-1); } - - if (fcp->isp_topo == TOPO_FL_PORT || - fcp->isp_topo == TOPO_NL_PORT || - fcp->isp_topo == TOPO_N_PORT) { - if (fcp->isp_loopstate < LOOP_LSCAN_DONE) { - if (isp_scan_loop(isp, chan) != 0) { - isp_prt(isp, ISP_LOGWARN, - "isp_pdb_sync: isp_scan_loop failed"); - return (-1); - } - } - } - - if (fcp->isp_topo == TOPO_F_PORT || fcp->isp_topo == TOPO_FL_PORT) { - if (fcp->isp_loopstate < LOOP_FSCAN_DONE) { - if (isp_scan_fabric(isp, chan) != 0) { - isp_prt(isp, ISP_LOGWARN, - "isp_pdb_sync: isp_scan_fabric failed"); - return (-1); - } - } + if (fcp->isp_loopstate > LOOP_SYNCING_PDB) { + return (0); } - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Synchronizing PDBs", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC PDB sync", chan); fcp->isp_loopstate = LOOP_SYNCING_PDB; @@ -3101,6 +3073,7 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) */ fcp->loop_seen_once = 1; fcp->isp_loopstate = LOOP_READY; + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC PDB sync done", chan); return (0); } @@ -3117,36 +3090,34 @@ isp_scan_loop(ispsoftc_t *isp, int chan) uint16_t handles[LOCAL_LOOP_LIM]; uint16_t handle; - if (fcp->isp_fwstate < FW_READY || - fcp->isp_loopstate < LOOP_PDB_RCVD) { + if (fcp->isp_loopstate < LOOP_LTEST_DONE) { return (-1); } if (fcp->isp_loopstate > LOOP_SCANNING_LOOP) { return (0); } + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC loop scan", chan); if (fcp->isp_topo != TOPO_NL_PORT && fcp->isp_topo != TOPO_FL_PORT && fcp->isp_topo != TOPO_N_PORT) { isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d no loop topology to scan", chan); + "Chan %d FC loop scan done (no loop)", chan); fcp->isp_loopstate = LOOP_LSCAN_DONE; return (0); } - fcp->isp_loopstate = LOOP_SCANNING_LOOP; lim = LOCAL_LOOP_LIM; r = isp_gethandles(isp, chan, handles, &lim, 1, 1); if (r != 0) { isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d getting list of handles failed with %x", chan, r); + "Chan %d Getting list of handles failed with %x", chan, r); fail: - ISP_MARK_PORTDB(isp, chan, 1); isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d FC scan loop DONE (bad)", chan); + "Chan %d FC loop scan done (bad)", chan); return (-1); } - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop -- %d ports", + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Got %d handles", chan, lim); /* @@ -3172,8 +3143,12 @@ fail: */ if (IS_2100(isp) || IS_2200(isp)) { uint64_t node_wwn = isp_get_wwn(isp, chan, handle, 1); - if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) - goto fail; + if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { +abort: + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d FC loop scan done (abort)", chan); + return (-1); + } if (node_wwn == INI_NONE) { continue; } @@ -3185,15 +3160,15 @@ fail: r = isp_getpdb(isp, chan, handle, &pdb, 1); if (r != 0) { isp_prt(isp, ISP_LOGDEBUG1, - "Chan %d FC scan loop handle %d returned %x", + "Chan %d FC Scan Loop handle %d returned %x", chan, handle, r); if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) - goto fail; + goto abort; continue; } if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) - goto fail; + goto abort; /* * On *very* old 2100 firmware we would end up sometimes @@ -3279,7 +3254,9 @@ fail: lp->new_portid = tmp.portid; lp->new_prli_word3 = tmp.prli_word3; lp->state = FC_PORTDB_STATE_PENDING_VALID; - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Loop Port 0x%06x@0x%04x Pending Valid", chan, tmp.portid, tmp.handle); + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Loop port 0x%06x@0x%04x now pending valid", + chan, tmp.portid, tmp.handle); continue; } @@ -3293,7 +3270,9 @@ fail: * Claim that this has changed and let somebody else * decide what to do. */ - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Loop Port 0x%06x@0x%04x changed", chan, tmp.portid, tmp.handle); + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Loop port 0x%06x@0x%04x changed", + chan, tmp.portid, tmp.handle); lp->state = FC_PORTDB_STATE_CHANGED; lp->new_portid = tmp.portid; lp->new_prli_word3 = tmp.prli_word3; @@ -3324,10 +3303,14 @@ fail: lp->handle = tmp.handle; lp->port_wwn = tmp.port_wwn; lp->node_wwn = tmp.node_wwn; - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Loop Port 0x%06x@0x%04x is New Entry", chan, tmp.portid, tmp.handle); + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Loop port 0x%06x@0x%04x is a new entry", + chan, tmp.portid, tmp.handle); } + if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) + goto abort; fcp->isp_loopstate = LOOP_LSCAN_DONE; - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC scan loop DONE", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC loop scan done", chan); return (0); } @@ -3513,28 +3496,33 @@ isp_scan_fabric(ispsoftc_t *isp, int cha int portidx, portlim, r; sns_gid_ft_rsp_t *rs0, *rs1; - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC Scan Fabric", chan); - if (fcp->isp_fwstate != FW_READY || fcp->isp_loopstate < LOOP_LSCAN_DONE) { + if (fcp->isp_loopstate < LOOP_LSCAN_DONE) { return (-1); } if (fcp->isp_loopstate > LOOP_SCANNING_FABRIC) { return (0); } + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC fabric scan", chan); if (fcp->isp_topo != TOPO_FL_PORT && fcp->isp_topo != TOPO_F_PORT) { fcp->isp_loopstate = LOOP_FSCAN_DONE; - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC Scan Fabric Done (no fabric)", chan); + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d FC fabric scan done (no fabric)", chan); return (0); } - fcp->isp_loopstate = LOOP_SCANNING_FABRIC; + if (FC_SCRATCH_ACQUIRE(isp, chan)) { isp_prt(isp, ISP_LOGERR, sacq); - ISP_MARK_PORTDB(isp, chan, 1); +fail: + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d FC fabric scan done (bad)", chan); return (-1); } if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { +abort: FC_SCRATCH_RELEASE(isp, chan); - ISP_MARK_PORTDB(isp, chan, 1); + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d FC fabric scan done (abort)", chan); return (-1); } @@ -3551,10 +3539,9 @@ isp_scan_fabric(ispsoftc_t *isp, int cha isp_dump_chip_portdb(isp, chan, 0); } if (r) { - fcp->isp_loopstate = LOOP_PDB_RCVD; + fcp->isp_loopstate = LOOP_LTEST_DONE; FC_SCRATCH_RELEASE(isp, chan); - ISP_MARK_PORTDB(isp, chan, 1); - return (-1); + goto fail; } if (IS_24XX(isp)) { @@ -3564,9 +3551,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha } if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { - FC_SCRATCH_RELEASE(isp, chan); - ISP_MARK_PORTDB(isp, chan, 1); - return (-1); + goto abort; } if (r > 0) { @@ -3574,7 +3559,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha FC_SCRATCH_RELEASE(isp, chan); return (0); } else if (r < 0) { - fcp->isp_loopstate = LOOP_PDB_RCVD; /* try again */ + fcp->isp_loopstate = LOOP_LTEST_DONE; /* try again */ FC_SCRATCH_RELEASE(isp, chan); return (0); } @@ -3584,9 +3569,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha rs1 = (sns_gid_ft_rsp_t *) ((uint8_t *)fcp->isp_scratch+OGPOFF); isp_get_gid_ft_response(isp, rs0, rs1, NGENT); if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { - FC_SCRATCH_RELEASE(isp, chan); - ISP_MARK_PORTDB(isp, chan, 1); - return (-1); + goto abort; } if (rs1->snscb_cthdr.ct_cmd_resp != LS_ACC) { int level; @@ -3631,7 +3614,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha } portlim = portidx + 1; isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d got %d ports back from name server", chan, portlim); + "Chan %d Got %d ports back from name server", chan, portlim); for (portidx = 0; portidx < portlim; portidx++) { int npidx; @@ -3686,35 +3669,19 @@ isp_scan_fabric(ispsoftc_t *isp, int cha if (portid == 0) { isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d skipping null PortID at idx %d", + "Chan %d Skipping null PortID at idx %d", chan, portidx); continue; } - /* - * Skip ourselves here and on other channels. If we're - * multi-id, we can't check the portids in other FCPARAM - * arenas because the resolutions here aren't synchronized. - * The best way to do this is to exclude looking at portids - * that have the same domain and area code as our own - * portid. - */ - if (ISP_CAP_MULTI_ID(isp) && isp->isp_nchan > 1) { - if ((portid >> 8) == (fcp->isp_portid >> 8)) { - isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d skip PortID 0x%06x", - chan, portid); - continue; - } - } else if (portid == fcp->isp_portid) { + if (portid == fcp->isp_portid) { isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d skip ourselves on @ PortID 0x%06x", - chan, portid); + "Chan %d Skipping our PortID 0x%06x", chan, portid); continue; } isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d Checking Fabric Port 0x%06x", chan, portid); + "Chan %d Checking fabric port 0x%06x", chan, portid); /* * We now search our Port Database for any @@ -3759,10 +3726,8 @@ isp_scan_fabric(ispsoftc_t *isp, int cha */ r = isp_getpdb(isp, chan, lp->handle, &pdb, 0); - if (fcp->isp_loopstate != LOOP_SCANNING_FABRIC) { - FC_SCRATCH_RELEASE(isp, chan); - ISP_MARK_PORTDB(isp, chan, 1); - return (-1); + if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { + goto abort; } if (r != 0) { lp->new_portid = portid; @@ -3806,19 +3771,14 @@ isp_scan_fabric(ispsoftc_t *isp, int cha &FCPARAM(isp, 0)->isp_lasthdl)) { lp->new_portid = portid; lp->state = FC_PORTDB_STATE_DEAD; - if (fcp->isp_loopstate != + if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { - FC_SCRATCH_RELEASE(isp, chan); - ISP_MARK_PORTDB(isp, chan, 1); - return (-1); + goto abort; } continue; } - if (fcp->isp_loopstate != - LOOP_SCANNING_FABRIC) { - FC_SCRATCH_RELEASE(isp, chan); - ISP_MARK_PORTDB(isp, chan, 1); - return (-1); + if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { + goto abort; } MAKE_WWN_FROM_NODE_NAME(wwnn, pdb.nodename); MAKE_WWN_FROM_NODE_NAME(wwpn, pdb.portname); @@ -3852,10 +3812,14 @@ isp_scan_fabric(ispsoftc_t *isp, int cha lp->new_portid = portid; lp->new_prli_word3 = nr; if (pdb.portid != lp->portid || nr != lp->prli_word3 || handle_changed) { - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Fabric Port 0x%06x changed", chan, portid); + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Fabric port 0x%06x changed", + chan, portid); lp->state = FC_PORTDB_STATE_CHANGED; } else { - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Fabric Port 0x%06x Now Pending Valid", chan, portid); + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Fabric port 0x%06x now pending valid", + chan, portid); lp->state = FC_PORTDB_STATE_PENDING_VALID; } continue; @@ -3922,17 +3886,13 @@ isp_scan_fabric(ispsoftc_t *isp, int cha */ if (isp_login_device(isp, chan, portid, &pdb, &FCPARAM(isp, 0)->isp_lasthdl)) { - if (fcp->isp_loopstate != LOOP_SCANNING_FABRIC) { - FC_SCRATCH_RELEASE(isp, chan); - ISP_MARK_PORTDB(isp, chan, 1); - return (-1); + if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { + goto abort; } continue; } - if (fcp->isp_loopstate != LOOP_SCANNING_FABRIC) { - FC_SCRATCH_RELEASE(isp, chan); - ISP_MARK_PORTDB(isp, chan, 1); - return (-1); + if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { + goto abort; } handle = pdb.handle; @@ -3964,7 +3924,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha lp->new_portid = portid; lp->new_prli_word3 = nr; lp->state = FC_PORTDB_STATE_NEW; - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Fabric Port 0x%06x is a New Entry", chan, portid); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Fabric port 0x%06x is a new entry", chan, portid); continue; } @@ -3993,21 +3953,20 @@ isp_scan_fabric(ispsoftc_t *isp, int cha lp->new_portid = portid; lp->new_prli_word3 = nr; if (lp->portid != portid || lp->prli_word3 != nr) { - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Zombie Fabric Port 0x%06x Now Changed", chan, portid); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Zombie fabric port 0x%06x now changed", chan, portid); lp->state = FC_PORTDB_STATE_CHANGED; } else { - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Zombie Fabric Port 0x%06x Now Pending Valid", chan, portid); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Zombie fabric port 0x%06x now pending valid", chan, portid); lp->state = FC_PORTDB_STATE_PENDING_VALID; } } - FC_SCRATCH_RELEASE(isp, chan); - if (fcp->isp_loopstate != LOOP_SCANNING_FABRIC) { - ISP_MARK_PORTDB(isp, chan, 1); - return (-1); + if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { + goto abort; } + FC_SCRATCH_RELEASE(isp, chan); fcp->isp_loopstate = LOOP_FSCAN_DONE; - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC Scan Fabric Done", chan); + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC fabric scan done", chan); return (0); } @@ -4359,7 +4318,7 @@ isp_start(XS_T *xs) /* * Try again later. */ - if (fcp->isp_fwstate != FW_READY || fcp->isp_loopstate != LOOP_READY) { + if (fcp->isp_loopstate != LOOP_READY) { return (CMD_RQLATER); } @@ -5850,7 +5809,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint isp->isp_dead = 1; isp->isp_state = ISP_CRASHED; FCPARAM(isp, chan)->isp_loopstate = LOOP_NIL; - FCPARAM(isp, chan)->isp_fwstate = FW_CONFIG_WAIT; + isp_change_fw_state(isp, chan, FW_CONFIG_WAIT); /* * Were we waiting for a mailbox command to complete? * If so, it's dead, so wake up the waiter. @@ -5923,10 +5882,8 @@ isp_parse_async_fc(ispsoftc_t *isp, uint continue; } - fcp->isp_fwstate = FW_CONFIG_WAIT; - fcp->isp_loopstate = LOOP_LIP_RCVD; + fcp->isp_loopstate = LOOP_NIL; ISP_SET_SENDMARKER(isp, chan, 1); - ISP_MARK_PORTDB(isp, chan, 1); isp_async(isp, ISPASYNC_LIP, chan); #ifdef ISP_TARGET_MODE if (isp_target_async(isp, chan, mbox)) { @@ -5982,10 +5939,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint } ISP_SET_SENDMARKER(isp, chan, 1); - - fcp->isp_fwstate = FW_CONFIG_WAIT; - fcp->isp_loopstate = LOOP_LIP_RCVD; - ISP_MARK_PORTDB(isp, chan, 1); isp_async(isp, ISPASYNC_LOOP_UP, chan); #ifdef ISP_TARGET_MODE if (isp_target_async(isp, chan, mbox)) { @@ -6008,10 +5961,9 @@ isp_parse_async_fc(ispsoftc_t *isp, uint } ISP_SET_SENDMARKER(isp, chan, 1); - fcp->isp_fwstate = FW_CONFIG_WAIT; fcp->isp_loopstate = LOOP_NIL; - ISP_MARK_PORTDB(isp, chan, 1); isp_async(isp, ISPASYNC_LOOP_DOWN, chan); + #ifdef ISP_TARGET_MODE if (isp_target_async(isp, chan, mbox)) { acked = 1; @@ -6033,9 +5985,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint } ISP_SET_SENDMARKER(isp, chan, 1); - fcp->isp_fwstate = FW_CONFIG_WAIT; fcp->isp_loopstate = LOOP_NIL; - ISP_MARK_PORTDB(isp, chan, 1); isp_async(isp, ISPASYNC_LOOP_RESET, chan); #ifdef ISP_TARGET_MODE if (isp_target_async(isp, chan, mbox)) { @@ -6067,9 +6017,8 @@ isp_parse_async_fc(ispsoftc_t *isp, uint if (fcp->role == ISP_ROLE_NONE) { continue; } - ISP_SET_SENDMARKER(isp, chan, 1); - fcp->isp_loopstate = LOOP_PDB_RCVD; - ISP_MARK_PORTDB(isp, chan, 1); + if (fcp->isp_loopstate > LOOP_LTEST_DONE) + fcp->isp_loopstate = LOOP_LTEST_DONE; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_PDB, nphdl, nlstate, reason); } break; @@ -6093,12 +6042,8 @@ isp_parse_async_fc(ispsoftc_t *isp, uint continue; } - if (fcp->isp_topo == TOPO_F_PORT) { + if (fcp->isp_loopstate > LOOP_LSCAN_DONE) fcp->isp_loopstate = LOOP_LSCAN_DONE; - } else { - fcp->isp_loopstate = LOOP_PDB_RCVD; - } - ISP_MARK_PORTDB(isp, chan, 1); isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_SNS); } break; @@ -6114,7 +6059,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint } chan = 0; mbox = ISP_READ(isp, OUTMAILBOX1); - ISP_MARK_PORTDB(isp, chan, 1); switch (mbox) { case ISP_CONN_LOOP: isp_prt(isp, ISP_LOGINFO, @@ -6143,10 +6087,9 @@ isp_parse_async_fc(ispsoftc_t *isp, uint "Unknown connection mode (0x%x)", mbox); break; } + ISP_SET_SENDMARKER(isp, chan, 1); + FCPARAM(isp, chan)->isp_loopstate = LOOP_NIL; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_OTHER); - FCPARAM(isp, chan)->sendmarker = 1; - FCPARAM(isp, chan)->isp_fwstate = FW_CONFIG_WAIT; - FCPARAM(isp, chan)->isp_loopstate = LOOP_LIP_RCVD; break; case ASYNC_RCV_ERR: @@ -7557,19 +7500,19 @@ out: } } -static void +static int isp_fw_state(ispsoftc_t *isp, int chan) { if (IS_FC(isp)) { mbreg_t mbs; - fcparam *fcp = FCPARAM(isp, chan); MBSINIT(&mbs, MBOX_GET_FW_STATE, MBLOGALL, 0); isp_mboxcmd(isp, &mbs); if (mbs.param[0] == MBOX_COMMAND_COMPLETE) { - fcp->isp_fwstate = mbs.param[1]; + return (mbs.param[1]); } } + return (FW_ERROR); } static void @@ -7939,7 +7882,7 @@ isp_reinit(ispsoftc_t *isp, int do_load_ isp_clear_commands(isp); if (IS_FC(isp)) { for (i = 0; i < isp->isp_nchan; i++) - ISP_MARK_PORTDB(isp, i, -1); + isp_mark_portdb(isp, i, -1); } return (res); } Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:36:23 2015 (r291509) +++ stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:37:22 2015 (r291510) @@ -400,31 +400,24 @@ isp_fc_runstate(ispsoftc_t *isp, int cha if (fcp->role == ISP_ROLE_NONE) { return (0); } - if (fcp->isp_fwstate < FW_READY || fcp->isp_loopstate < LOOP_PDB_RCVD) { - if (isp_control(isp, ISPCTL_FCLINK_TEST, chan, tval) != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: linktest failed for channel %d", chan); - return (-1); - } - if (fcp->isp_fwstate != FW_READY || fcp->isp_loopstate < LOOP_PDB_RCVD) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: f/w not ready for channel %d", chan); - return (-1); - } + if (isp_control(isp, ISPCTL_FCLINK_TEST, chan, tval) != 0) { + isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: linktest failed for channel %d", chan); + return (-1); } - if (isp_control(isp, ISPCTL_SCAN_LOOP, chan) != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: scan loop fails on channel %d", chan); - return (LOOP_PDB_RCVD); + isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: scan loop failed on channel %d", chan); + return (LOOP_LTEST_DONE); } if (isp_control(isp, ISPCTL_SCAN_FABRIC, chan) != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: scan fabric fails on channel %d", chan); + isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: scan fabric failed on channel %d", chan); return (LOOP_LSCAN_DONE); } if (isp_control(isp, ISPCTL_PDB_SYNC, chan) != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: pdb_sync fails on channel %d", chan); + isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: pdb_sync failed on channel %d", chan); return (LOOP_FSCAN_DONE); } - if (fcp->isp_fwstate != FW_READY || fcp->isp_loopstate != LOOP_READY) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: f/w not ready again on channel %d", chan); + if (fcp->isp_loopstate != LOOP_READY) { + isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: not ready again on channel %d", chan); return (-1); } return (0); @@ -536,7 +529,7 @@ isp_fc_fw_statename(int state) { switch (state) { case FW_CONFIG_WAIT: return "Config Wait"; - case FW_WAIT_AL_PA: return "Waiting for AL_PA"; + case FW_WAIT_LINK: return "Wait Link"; case FW_WAIT_LOGIN: return "Wait Login"; case FW_READY: return "Ready"; case FW_LOSS_OF_SYNC: return "Loss Of Sync"; @@ -552,9 +545,9 @@ isp_fc_loop_statename(int state) { switch (state) { case LOOP_NIL: return "NIL"; - case LOOP_LIP_RCVD: return "LIP Received"; - case LOOP_PDB_RCVD: return "PDB Received"; - case LOOP_SCANNING_LOOP: return "Scanning"; + case LOOP_TESTING_LINK: return "Testing Link"; + case LOOP_LTEST_DONE: return "Link Test Done"; + case LOOP_SCANNING_LOOP: return "Scanning Loop"; case LOOP_LSCAN_DONE: return "Loop Scan Done"; case LOOP_SCANNING_FABRIC: return "Scanning Fabric"; case LOOP_FSCAN_DONE: return "Fabric Scan Done"; @@ -568,7 +561,7 @@ const char * isp_fc_toponame(fcparam *fcp) { - if (fcp->isp_fwstate != FW_READY) { + if (fcp->isp_loopstate < LOOP_LTEST_DONE) { return "Unavailable"; } switch (fcp->isp_topo) { @@ -2527,7 +2520,8 @@ isp_find_chan_by_did(ispsoftc_t *isp, ui *cp = ISP_NOCHAN; for (chan = 0; chan < isp->isp_nchan; chan++) { fcparam *fcp = FCPARAM(isp, chan); - if ((fcp->role & ISP_ROLE_TARGET) == 0 || fcp->isp_fwstate != FW_READY || fcp->isp_loopstate < LOOP_PDB_RCVD) { + if ((fcp->role & ISP_ROLE_TARGET) == 0 || + fcp->isp_loopstate < LOOP_LTEST_DONE) { continue; } if (fcp->isp_portid == did) { Modified: stable/10/sys/dev/isp/ispvar.h ============================================================================== --- stable/10/sys/dev/isp/ispvar.h Mon Nov 30 21:36:23 2015 (r291509) +++ stable/10/sys/dev/isp/ispvar.h Mon Nov 30 21:37:22 2015 (r291510) @@ -482,7 +482,7 @@ typedef struct { } fcparam; #define FW_CONFIG_WAIT 0 -#define FW_WAIT_AL_PA 1 +#define FW_WAIT_LINK 1 #define FW_WAIT_LOGIN 2 #define FW_READY 3 #define FW_LOSS_OF_SYNC 4 @@ -491,8 +491,8 @@ typedef struct { #define FW_NON_PART 7 #define LOOP_NIL 0 -#define LOOP_LIP_RCVD 1 -#define LOOP_PDB_RCVD 2 +#define LOOP_TESTING_LINK 1 +#define LOOP_LTEST_DONE 2 #define LOOP_SCANNING_LOOP 3 #define LOOP_LSCAN_DONE 4 #define LOOP_SCANNING_FABRIC 5 @@ -861,10 +861,10 @@ void isp_done(XS_T *); * Update any operating parameters (speed, etc.) * ... ISPCTL_FCLINK_TEST, int channel); * Test FC link status on this channel - * ... ISPCTL_SCAN_FABRIC, int channel); - * Scan fabric on this channel * ... ISPCTL_SCAN_LOOP, int channel); * Scan local loop on this channel + * ... ISPCTL_SCAN_FABRIC, int channel); + * Scan fabric on this channel * ... ISPCTL_PDB_SYNC, int channel); * Synchronize port database on this channel * ... ISPCTL_SEND_LIP, int channel); @@ -881,12 +881,11 @@ void isp_done(XS_T *); * Change role of specified channel * * ISPCTL_PDB_SYNC is somewhat misnamed. It actually is the final step, in - * order, of ISPCTL_FCLINK_TEST, ISPCTL_SCAN_FABRIC, and ISPCTL_SCAN_LOOP. + * order, of ISPCTL_FCLINK_TEST, ISPCTL_SCAN_LOOP, and ISPCTL_SCAN_FABRIC. * The main purpose of ISPCTL_PDB_SYNC is to complete management of logging * and logging out of fabric devices (if one is on a fabric) and then marking * the 'loop state' as being ready to now be used for sending commands to - * devices. Originally fabric name server and local loop scanning were - * part of this function. It's now been separated to allow for finer control. + * devices. */ typedef enum { ISPCTL_RESET_BUS, From owner-svn-src-all@freebsd.org Mon Nov 30 21:38:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A080A3D2B5; Mon, 30 Nov 2015 21:38:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C4491D6C; Mon, 30 Nov 2015 21:38:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULc68h070234; Mon, 30 Nov 2015 21:38:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULc65b070229; Mon, 30 Nov 2015 21:38:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302138.tAULc65b070229@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:38:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291511 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:38:07 -0000 Author: mav Date: Mon Nov 30 21:38:05 2015 New Revision: 291511 URL: https://svnweb.freebsd.org/changeset/base/291511 Log: MFC r291000: Register our FC4 Features in SNS. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/isp_library.h stable/10/sys/dev/isp/isp_stds.h stable/10/sys/dev/isp/ispmbox.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:37:22 2015 (r291510) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:38:05 2015 (r291511) @@ -125,6 +125,7 @@ static int isp_scan_fabric(ispsoftc_t *, static int isp_login_device(ispsoftc_t *, int, uint32_t, isp_pdb_t *, uint16_t *); static int isp_register_fc4_type(ispsoftc_t *, int); static int isp_register_fc4_type_24xx(ispsoftc_t *, int); +static int isp_register_fc4_features_24xx(ispsoftc_t *, int); static uint16_t isp_next_handle(ispsoftc_t *, uint16_t *); static int isp_fw_state(ispsoftc_t *, int); static void isp_mboxcmd_qnw(ispsoftc_t *, mbreg_t *, int); @@ -2927,6 +2928,8 @@ isp_fclink_test(ispsoftc_t *isp, int cha } fcp->isp_sns_hdl = NPH_SNS_ID; r = isp_register_fc4_type_24xx(isp, chan); + if (r == 0) + isp_register_fc4_features_24xx(isp, chan); } else { fcp->isp_sns_hdl = SNS_ID; r = isp_register_fc4_type(isp, chan); @@ -4217,6 +4220,125 @@ isp_register_fc4_type_24xx(ispsoftc_t *i } } +static int +isp_register_fc4_features_24xx(ispsoftc_t *isp, int chan) +{ + mbreg_t mbs; + fcparam *fcp = FCPARAM(isp, chan); + union { + isp_ct_pt_t plocal; + rff_id_t clocal; + uint8_t q[QENTRY_LEN]; + } un; + isp_ct_pt_t *pt; + ct_hdr_t *ct; + rff_id_t *rp; + uint8_t *scp = fcp->isp_scratch; + + if (FC_SCRATCH_ACQUIRE(isp, chan)) { + isp_prt(isp, ISP_LOGERR, sacq); + return (-1); + } + + /* + * Build a Passthrough IOCB in memory. + */ + ISP_MEMZERO(un.q, QENTRY_LEN); + pt = &un.plocal; + pt->ctp_header.rqs_entry_count = 1; + pt->ctp_header.rqs_entry_type = RQSTYPE_CT_PASSTHRU; + pt->ctp_handle = 0xffffffff; + pt->ctp_nphdl = fcp->isp_sns_hdl; + pt->ctp_cmd_cnt = 1; + pt->ctp_vpidx = ISP_GET_VPIDX(isp, chan); + pt->ctp_time = 1; + pt->ctp_rsp_cnt = 1; + pt->ctp_rsp_bcnt = sizeof (ct_hdr_t); + pt->ctp_cmd_bcnt = sizeof (rff_id_t); + pt->ctp_dataseg[0].ds_base = DMA_LO32(fcp->isp_scdma+XTXOFF); + pt->ctp_dataseg[0].ds_basehi = DMA_HI32(fcp->isp_scdma+XTXOFF); + pt->ctp_dataseg[0].ds_count = sizeof (rff_id_t); + pt->ctp_dataseg[1].ds_base = DMA_LO32(fcp->isp_scdma+IGPOFF); + pt->ctp_dataseg[1].ds_basehi = DMA_HI32(fcp->isp_scdma+IGPOFF); + pt->ctp_dataseg[1].ds_count = sizeof (ct_hdr_t); + isp_put_ct_pt(isp, pt, (isp_ct_pt_t *) &scp[CTXOFF]); + if (isp->isp_dblev & ISP_LOGDEBUG1) { + isp_print_bytes(isp, "IOCB CT Request", QENTRY_LEN, pt); + } + + /* + * Build the CT header and command in memory. + * + * Note that the CT header has to end up as Big Endian format in memory. + */ + ISP_MEMZERO(&un.clocal, sizeof (un.clocal)); + ct = &un.clocal.rffid_hdr; + ct->ct_revision = CT_REVISION; + ct->ct_fcs_type = CT_FC_TYPE_FC; + ct->ct_fcs_subtype = CT_FC_SUBTYPE_NS; + ct->ct_cmd_resp = SNS_RFF_ID; + ct->ct_bcnt_resid = (sizeof (rff_id_t) - sizeof (ct_hdr_t)) >> 2; + rp = &un.clocal; + rp->rffid_portid[0] = fcp->isp_portid >> 16; + rp->rffid_portid[1] = fcp->isp_portid >> 8; + rp->rffid_portid[2] = fcp->isp_portid; + rp->rffid_fc4features = 0; + if (fcp->role & ISP_ROLE_TARGET) + rp->rffid_fc4features |= 1; + if (fcp->role & ISP_ROLE_INITIATOR) + rp->rffid_fc4features |= 2; + rp->rffid_fc4type = FC4_SCSI; + isp_put_rff_id(isp, rp, (rff_id_t *) &scp[XTXOFF]); + if (isp->isp_dblev & ISP_LOGDEBUG1) { + isp_print_bytes(isp, "CT Header", QENTRY_LEN, &scp[XTXOFF]); + } + + ISP_MEMZERO(&scp[ZTXOFF], sizeof (ct_hdr_t)); + + MBSINIT(&mbs, MBOX_EXEC_COMMAND_IOCB_A64, MBLOGALL, 1000000); + mbs.param[1] = QENTRY_LEN; + mbs.param[2] = DMA_WD1(fcp->isp_scdma + CTXOFF); + mbs.param[3] = DMA_WD0(fcp->isp_scdma + CTXOFF); + mbs.param[6] = DMA_WD3(fcp->isp_scdma + CTXOFF); + mbs.param[7] = DMA_WD2(fcp->isp_scdma + CTXOFF); + MEMORYBARRIER(isp, SYNC_SFORDEV, XTXOFF, 2 * QENTRY_LEN, chan); + isp_mboxcmd(isp, &mbs); + if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { + FC_SCRATCH_RELEASE(isp, chan); + return (-1); + } + MEMORYBARRIER(isp, SYNC_SFORCPU, ZTXOFF, QENTRY_LEN, chan); + pt = &un.plocal; + isp_get_ct_pt(isp, (isp_ct_pt_t *) &scp[ZTXOFF], pt); + if (isp->isp_dblev & ISP_LOGDEBUG1) { + isp_print_bytes(isp, "IOCB response", QENTRY_LEN, pt); + } + if (pt->ctp_status) { + FC_SCRATCH_RELEASE(isp, chan); + isp_prt(isp, ISP_LOGWARN, + "Chan %d Register FC4 Features CT Passthrough returned 0x%x", + chan, pt->ctp_status); + return (1); + } + + isp_get_ct_hdr(isp, (ct_hdr_t *) &scp[IGPOFF], ct); + FC_SCRATCH_RELEASE(isp, chan); + + if (ct->ct_cmd_resp == LS_RJT) { + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOG_WARN1, + "Chan %d Register FC4 Features rejected", chan); + return (-1); + } else if (ct->ct_cmd_resp == LS_ACC) { + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Register FC4 Features accepted", chan); + return (0); + } else { + isp_prt(isp, ISP_LOGWARN, + "Chan %d Register FC4 Features: 0x%x", chan, ct->ct_cmd_resp); + return (-1); + } +} + static uint16_t isp_next_handle(ispsoftc_t *isp, uint16_t *ohp) { Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:37:22 2015 (r291510) +++ stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:38:05 2015 (r291511) @@ -2157,6 +2157,20 @@ isp_put_rft_id(ispsoftc_t *isp, rft_id_t } void +isp_put_rff_id(ispsoftc_t *isp, rff_id_t *src, rff_id_t *dst) +{ + int i; + + isp_put_ct_hdr(isp, &src->rffid_hdr, &dst->rffid_hdr); + ISP_IOZPUT_8(isp, src->rffid_reserved, &dst->rffid_reserved); + for (i = 0; i < 3; i++) + ISP_IOZPUT_8(isp, src->rffid_portid[i], &dst->rffid_portid[i]); + ISP_IOZPUT_16(isp, src->rffid_reserved2, &dst->rffid_reserved2); + ISP_IOZPUT_8(isp, src->rffid_fc4features, &dst->rffid_fc4features); + ISP_IOZPUT_8(isp, src->rffid_fc4type, &dst->rffid_fc4type); +} + +void isp_get_ct_hdr(ispsoftc_t *isp, ct_hdr_t *src, ct_hdr_t *dst) { ISP_IOZGET_8(isp, &src->ct_revision, dst->ct_revision); Modified: stable/10/sys/dev/isp/isp_library.h ============================================================================== --- stable/10/sys/dev/isp/isp_library.h Mon Nov 30 21:37:22 2015 (r291510) +++ stable/10/sys/dev/isp/isp_library.h Mon Nov 30 21:38:05 2015 (r291511) @@ -148,6 +148,7 @@ void isp_get_fc_hdr(ispsoftc_t *, fc_hdr void isp_put_fc_hdr(ispsoftc_t *, fc_hdr_t *, fc_hdr_t *); void isp_get_fcp_cmnd_iu(ispsoftc_t *, fcp_cmnd_iu_t *, fcp_cmnd_iu_t *); void isp_put_rft_id(ispsoftc_t *, rft_id_t *, rft_id_t *); +void isp_put_rff_id(ispsoftc_t *, rff_id_t *, rff_id_t *); void isp_get_ct_hdr(ispsoftc_t *isp, ct_hdr_t *, ct_hdr_t *); void isp_put_ct_hdr(ispsoftc_t *isp, ct_hdr_t *, ct_hdr_t *); void isp_put_fcp_rsp_iu(ispsoftc_t *isp, fcp_rsp_iu_t *, fcp_rsp_iu_t *); Modified: stable/10/sys/dev/isp/isp_stds.h ============================================================================== --- stable/10/sys/dev/isp/isp_stds.h Mon Nov 30 21:37:22 2015 (r291510) +++ stable/10/sys/dev/isp/isp_stds.h Mon Nov 30 21:38:05 2015 (r291511) @@ -139,6 +139,20 @@ typedef struct { } rft_id_t; /* + * RFF_ID Requet CT_IU + * + * Source: INCITS 463-2010 Generic Services 6 Section 5.2.5.34 + */ +typedef struct { + ct_hdr_t rffid_hdr; + uint8_t rffid_reserved; + uint8_t rffid_portid[3]; + uint16_t rffid_reserved2; + uint8_t rffid_fc4features; + uint8_t rffid_fc4type; +} rff_id_t; + +/* * FCP Response IU and bits of interest * Source: NCITS T10, Project 1828D, Revision 02b (aka FCP4r02b) */ Modified: stable/10/sys/dev/isp/ispmbox.h ============================================================================== --- stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:37:22 2015 (r291510) +++ stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:38:05 2015 (r291511) @@ -1513,6 +1513,7 @@ typedef struct { #define SNS_GFF_ID 0x11F #define SNS_GID_FT 0x171 #define SNS_RFT_ID 0x217 +#define SNS_RFF_ID 0x21F typedef struct { uint16_t snscb_rblen; /* response buffer length (words) */ uint16_t snscb_reserved0; From owner-svn-src-all@freebsd.org Mon Nov 30 21:38:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12BA9A3D307; Mon, 30 Nov 2015 21:38:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA7051EEF; Mon, 30 Nov 2015 21:38:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULcpbb070317; Mon, 30 Nov 2015 21:38:51 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULcpnk070312; Mon, 30 Nov 2015 21:38:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302138.tAULcpnk070312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:38:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291512 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:38:53 -0000 Author: mav Date: Mon Nov 30 21:38:51 2015 New Revision: 291512 URL: https://svnweb.freebsd.org/changeset/base/291512 Log: MFC r291013: Remove some confusions between loopid and nphdl. Modern cards in most cases operate abstract port handles, that have no any relation to real loop IDs. Leave loopid used only where it really goes about local loop IDs. While there, fix few more cases where LUNs were still printed in decimal. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/isp_library.h stable/10/sys/dev/isp/isp_target.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:38:05 2015 (r291511) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:38:51 2015 (r291512) @@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$"); */ static const char fconf[] = "Chan %d PortDB[%d] changed:\n current =(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)\n database=(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)"; static const char notresp[] = "Not RESPONSE in RESPONSE Queue (type 0x%x) @ idx %d (next %d) nlooked %d"; -static const char topology[] = "Chan %d WWPN 0x%08x%08x PortID 0x%06x handle 0x%x, Connection '%s'"; +static const char topology[] = "Chan %d WWPN 0x%08x%08x PortID 0x%06x LoopID 0x%x Connection '%s'"; static const char bun[] = "bad underrun (count %d, resid %d, status %s)"; static const char lipd[] = "Chan %d LIP destroyed %d active commands"; static const char sacq[] = "unable to acquire scratch area"; @@ -2689,7 +2689,7 @@ static void isp_dump_chip_portdb(ispsoftc_t *isp, int chan, int dolock) { isp_pdb_t pdb; - int lim, loopid; + uint16_t lim, nphdl; isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGINFO, "Chan %d chip port dump", chan); if (ISP_CAP_2KLOGIN(isp)) { @@ -2697,20 +2697,20 @@ isp_dump_chip_portdb(ispsoftc_t *isp, in } else { lim = NPH_MAX; } - for (loopid = 0; loopid != lim; loopid++) { - if (isp_getpdb(isp, chan, loopid, &pdb, dolock)) { + for (nphdl = 0; nphdl != lim; nphdl++) { + if (isp_getpdb(isp, chan, nphdl, &pdb, dolock)) { continue; } - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGINFO, "Chan %d Loopid 0x%04x " + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGINFO, "Chan %d Handle 0x%04x " "PortID 0x%06x WWPN 0x%02x%02x%02x%02x%02x%02x%02x%02x", - chan, loopid, pdb.portid, pdb.portname[0], pdb.portname[1], + chan, nphdl, pdb.portid, pdb.portname[0], pdb.portname[1], pdb.portname[2], pdb.portname[3], pdb.portname[4], pdb.portname[5], pdb.portname[6], pdb.portname[7]); } } static uint64_t -isp_get_wwn(ispsoftc_t *isp, int chan, int loopid, int nodename) +isp_get_wwn(ispsoftc_t *isp, int chan, int nphdl, int nodename) { uint64_t wwn = INI_NONE; mbreg_t mbs; @@ -2718,14 +2718,14 @@ isp_get_wwn(ispsoftc_t *isp, int chan, i MBSINIT(&mbs, MBOX_GET_PORT_NAME, MBLOGALL & ~MBLOGMASK(MBOX_COMMAND_PARAM_ERROR), 500000); if (ISP_CAP_2KLOGIN(isp)) { - mbs.param[1] = loopid; + mbs.param[1] = nphdl; if (nodename) { mbs.param[10] = 1; } mbs.param[9] = chan; } else { mbs.ibitm = 3; - mbs.param[1] = loopid << 8; + mbs.param[1] = nphdl << 8; if (nodename) { mbs.param[1] |= 1; } @@ -2767,7 +2767,7 @@ isp_fclink_test(ispsoftc_t *isp, int cha { mbreg_t mbs; int check_for_fabric, r; - int loopid; + uint16_t nphdl; fcparam *fcp; fcportdb_t *lp; isp_pdb_t pdb; @@ -2880,12 +2880,12 @@ isp_fclink_test(ispsoftc_t *isp, int cha if (IS_24XX(isp)) { /* XXX SHOULDN'T THIS BE FOR 2K F/W? XXX */ - loopid = NPH_FL_ID; + nphdl = NPH_FL_ID; } else { - loopid = FL_ID; + nphdl = FL_ID; } if (check_for_fabric) { - r = isp_getpdb(isp, chan, loopid, &pdb, 1); + r = isp_getpdb(isp, chan, nphdl, &pdb, 1); if (r && (fcp->isp_topo == TOPO_F_PORT || fcp->isp_topo == TOPO_FL_PORT)) { isp_prt(isp, ISP_LOGWARN, "fabric topology but cannot get info about fabric controller (0x%x)", r); fcp->isp_topo = TOPO_PTP_STUB; @@ -3494,7 +3494,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha { fcparam *fcp = FCPARAM(isp, chan); uint32_t portid; - uint16_t handle, loopid; + uint16_t nphdl; isp_pdb_t pdb; int portidx, portlim, r; sns_gid_ft_rsp_t *rs0, *rs1; @@ -3533,11 +3533,11 @@ abort: * Make sure we still are logged into the fabric controller. */ if (IS_24XX(isp)) { /* XXX SHOULDN'T THIS BE TRUE FOR 2K F/W? XXX */ - loopid = NPH_FL_ID; + nphdl = NPH_FL_ID; } else { - loopid = FL_ID; + nphdl = FL_ID; } - r = isp_getpdb(isp, chan, loopid, &pdb, 0); + r = isp_getpdb(isp, chan, nphdl, &pdb, 0); if ((r & 0xffff) == MBOX_NOT_LOGGED_IN) { isp_dump_chip_portdb(isp, chan, 0); } @@ -3898,7 +3898,7 @@ abort: goto abort; } - handle = pdb.handle; + nphdl = pdb.handle; MAKE_WWN_FROM_NODE_NAME(wwnn, pdb.nodename); MAKE_WWN_FROM_NODE_NAME(wwpn, pdb.portname); nr = pdb.prli_word3; @@ -3921,7 +3921,7 @@ abort: if (dbidx == MAX_FC_TARG) { ISP_MEMZERO(lp, sizeof (fcportdb_t)); - lp->handle = handle; + lp->handle = nphdl; lp->node_wwn = wwnn; lp->port_wwn = wwpn; lp->new_portid = portid; @@ -3951,7 +3951,7 @@ abort: * are different, it maybe a changed device. */ lp = &fcp->portdb[dbidx]; - lp->handle = handle; + lp->handle = nphdl; lp->node_wwn = wwnn; lp->new_portid = portid; lp->new_prli_word3 = nr; @@ -4033,7 +4033,7 @@ isp_login_device(ispsoftc_t *isp, int ch i = lim; break; } else if ((r & 0xffff) == MBOX_LOOP_ID_USED) { - /* Try the next loop id. */ + /* Try the next handle. */ handle = isp_next_handle(isp, ohp); } else { /* Give up. */ Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:38:05 2015 (r291511) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:38:51 2015 (r291512) @@ -604,7 +604,7 @@ ispioctl(struct cdev *dev, u_long c, cad { int needmarker; struct isp_fc_tsk_mgmt *fct = (struct isp_fc_tsk_mgmt *) addr; - uint16_t loopid; + uint16_t nphdl; mbreg_t mbs; if (IS_SCSI(isp)) { @@ -618,7 +618,7 @@ ispioctl(struct cdev *dev, u_long c, cad } needmarker = retval = 0; - loopid = fct->loopid; + nphdl = fct->loopid; ISP_LOCK(isp); if (IS_24XX(isp)) { uint8_t local[QENTRY_LEN]; @@ -630,7 +630,7 @@ ispioctl(struct cdev *dev, u_long c, cad for (i = 0; i < MAX_FC_TARG; i++) { lp = &fcp->portdb[i]; - if (lp->handle == loopid) { + if (lp->handle == nphdl) { break; } } @@ -714,34 +714,34 @@ ispioctl(struct cdev *dev, u_long c, cad } else { MBSINIT(&mbs, 0, MBLOGALL, 0); if (ISP_CAP_2KLOGIN(isp) == 0) { - loopid <<= 8; + nphdl <<= 8; } switch (fct->action) { case IPT_CLEAR_ACA: mbs.param[0] = MBOX_CLEAR_ACA; - mbs.param[1] = loopid; + mbs.param[1] = nphdl; mbs.param[2] = fct->lun; break; case IPT_TARGET_RESET: mbs.param[0] = MBOX_TARGET_RESET; - mbs.param[1] = loopid; + mbs.param[1] = nphdl; needmarker = 1; break; case IPT_LUN_RESET: mbs.param[0] = MBOX_LUN_RESET; - mbs.param[1] = loopid; + mbs.param[1] = nphdl; mbs.param[2] = fct->lun; needmarker = 1; break; case IPT_CLEAR_TASK_SET: mbs.param[0] = MBOX_CLEAR_TASK_SET; - mbs.param[1] = loopid; + mbs.param[1] = nphdl; mbs.param[2] = fct->lun; needmarker = 1; break; case IPT_ABORT_TASK_SET: mbs.param[0] = MBOX_ABORT_TASK_SET; - mbs.param[1] = loopid; + mbs.param[1] = nphdl; mbs.param[2] = fct->lun; needmarker = 1; break; @@ -1107,7 +1107,7 @@ isp_dump_atpd(ispsoftc_t *isp, tstate_t const char *states[8] = { "Free", "ATIO", "CAM", "CTIO", "LAST_CTIO", "PDON", "?6", "7" }; for (atp = tptr->atpool; atp < &tptr->atpool[ATPDPSIZE]; atp++) { - xpt_print(tptr->owner, "ATP: [0x%x] origdlen %u bytes_xfrd %u lun %u nphdl 0x%04x s_id 0x%06x d_id 0x%06x oxid 0x%04x state %s\n", + xpt_print(tptr->owner, "ATP: [0x%x] origdlen %u bytes_xfrd %u lun %x nphdl 0x%04x s_id 0x%06x d_id 0x%06x oxid 0x%04x state %s\n", atp->tag, atp->orig_datalen, atp->bytes_xfered, atp->lun, atp->nphdl, atp->sid, atp->portid, atp->oxid, states[atp->state & 0x7]); } } @@ -2295,7 +2295,7 @@ isp_handle_platform_atio(ispsoftc_t *isp * should, in fact, get this, is in the case that we've * run out of ATIOS. */ - xpt_print(tptr->owner, "no %s for lun %d from initiator %d\n", (atp == NULL && atiop == NULL)? "ATIOs *or* ATPS" : + xpt_print(tptr->owner, "no %s for lun %x from initiator %d\n", (atp == NULL && atiop == NULL)? "ATIOs *or* ATPS" : ((atp == NULL)? "ATPs" : "ATIOs"), aep->at_lun, aep->at_iid); isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); if (atp) { @@ -2347,7 +2347,7 @@ isp_handle_platform_atio(ispsoftc_t *isp atp->cdb0 = atiop->cdb_io.cdb_bytes[0]; atp->tattr = aep->at_tag_type; atp->state = ATPD_STATE_CAM; - isp_prt(isp, ISP_LOGTDEBUG0, "ATIO[0x%x] CDB=0x%x lun %d", aep->at_tag_val, atp->cdb0, atp->lun); + isp_prt(isp, ISP_LOGTDEBUG0, "ATIO[0x%x] CDB=0x%x lun %x", aep->at_tag_val, atp->cdb0, atp->lun); rls_lun_statep(isp, tptr); } @@ -3103,8 +3103,8 @@ isp_handle_platform_notify_fc(ispsoftc_t case IN_ABORT_TASK: { tstate_t *tptr; - uint16_t lun; - uint32_t loopid, sid; + uint16_t nphdl, lun; + uint32_t sid; uint64_t wwn; atio_private_data_t *atp; fcportdb_t *lp; @@ -3119,11 +3119,11 @@ isp_handle_platform_notify_fc(ispsoftc_t lun = inp->in_lun; } if (ISP_CAP_2KLOGIN(isp)) { - loopid = ((in_fcentry_e_t *)inp)->in_iid; + nphdl = ((in_fcentry_e_t *)inp)->in_iid; } else { - loopid = inp->in_iid; + nphdl = inp->in_iid; } - if (isp_find_pdb_by_handle(isp, 0, loopid, &lp)) { + if (isp_find_pdb_by_handle(isp, 0, nphdl, &lp)) { wwn = lp->port_wwn; sid = lp->portid; } else { @@ -3134,7 +3134,7 @@ isp_handle_platform_notify_fc(ispsoftc_t if (tptr == NULL) { tptr = get_lun_statep(isp, 0, CAM_LUN_WILDCARD); if (tptr == NULL) { - isp_prt(isp, ISP_LOGWARN, "ABORT TASK for lun %u- but no tstate", lun); + isp_prt(isp, ISP_LOGWARN, "ABORT TASK for lun %x, but no tstate", lun); return; } } @@ -3159,7 +3159,7 @@ isp_handle_platform_notify_fc(ispsoftc_t nt->nt_hba = isp; nt->nt_tgt = FCPARAM(isp, 0)->isp_wwpn; nt->nt_wwn = wwn; - nt->nt_nphdl = loopid; + nt->nt_nphdl = nphdl; nt->nt_sid = sid; nt->nt_did = PORT_ANY; nt->nt_lun = lun; Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:38:05 2015 (r291511) +++ stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:38:51 2015 (r291512) @@ -2483,7 +2483,7 @@ isp_find_pdb_by_wwn(ispsoftc_t *isp, int #ifdef ISP_TARGET_MODE int -isp_find_pdb_by_handle(ispsoftc_t *isp, int chan, uint32_t handle, fcportdb_t **lptr) +isp_find_pdb_by_handle(ispsoftc_t *isp, int chan, uint16_t handle, fcportdb_t **lptr) { fcparam *fcp; int i; Modified: stable/10/sys/dev/isp/isp_library.h ============================================================================== --- stable/10/sys/dev/isp/isp_library.h Mon Nov 30 21:38:05 2015 (r291511) +++ stable/10/sys/dev/isp/isp_library.h Mon Nov 30 21:38:51 2015 (r291512) @@ -173,7 +173,7 @@ void isp_destroy_tgt_handle(ispsoftc_t * #endif int isp_find_pdb_by_wwn(ispsoftc_t *, int, uint64_t, fcportdb_t **); #ifdef ISP_TARGET_MODE -int isp_find_pdb_by_handle(ispsoftc_t *, int, uint32_t, fcportdb_t **); +int isp_find_pdb_by_handle(ispsoftc_t *, int, uint16_t, fcportdb_t **); int isp_find_pdb_by_sid(ispsoftc_t *, int, uint32_t, fcportdb_t **); void isp_find_chan_by_did(ispsoftc_t *, uint32_t, uint16_t *); void isp_add_wwn_entry(ispsoftc_t *, int, uint64_t, uint64_t, uint16_t, uint32_t, uint16_t); Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Mon Nov 30 21:38:05 2015 (r291511) +++ stable/10/sys/dev/isp/isp_target.c Mon Nov 30 21:38:51 2015 (r291512) @@ -52,8 +52,8 @@ __FBSDID("$FreeBSD$"); #endif #ifdef ISP_TARGET_MODE -static const char atiocope[] = "ATIO returned for lun %d because it was in the middle of Bus Device Reset on bus %d"; -static const char atior[] = "ATIO returned on for lun %d on from loopid %d because a Bus Reset occurred on bus %d"; +static const char atiocope[] = "ATIO returned for LUN %x because it was in the middle of Bus Device Reset on bus %d"; +static const char atior[] = "ATIO returned for LUN %x from handle 0x%x because a Bus Reset occurred on bus %d"; static const char rqo[] = "%s: Request Queue Overflow"; static void isp_got_msg(ispsoftc_t *, in_entry_t *); @@ -931,20 +931,20 @@ static void isp_got_msg_fc(ispsoftc_t *isp, in_fcentry_t *inp) { isp_notify_t notify; - static const char f1[] = "%s from N-port handle 0x%x lun %d seq 0x%x"; - static const char f2[] = "unknown %s 0x%x lun %d N-Port handle 0x%x task flags 0x%x seq 0x%x\n"; - uint16_t seqid, loopid; + static const char f1[] = "%s from N-port handle 0x%x lun %x seq 0x%x"; + static const char f2[] = "unknown %s 0x%x lun %x N-Port handle 0x%x task flags 0x%x seq 0x%x\n"; + uint16_t seqid, nphdl; ISP_MEMZERO(¬ify, sizeof (isp_notify_t)); notify.nt_hba = isp; notify.nt_wwn = INI_ANY; if (ISP_CAP_2KLOGIN(isp)) { notify.nt_nphdl = ((in_fcentry_e_t *)inp)->in_iid; - loopid = ((in_fcentry_e_t *)inp)->in_iid; + nphdl = ((in_fcentry_e_t *)inp)->in_iid; seqid = ((in_fcentry_e_t *)inp)->in_seqid; } else { notify.nt_nphdl = inp->in_iid; - loopid = inp->in_iid; + nphdl = inp->in_iid; seqid = inp->in_seqid; } notify.nt_sid = PORT_ANY; @@ -965,28 +965,28 @@ isp_got_msg_fc(ispsoftc_t *isp, in_fcent notify.nt_lreserved = inp; if (inp->in_status != IN_MSG_RECEIVED) { - isp_prt(isp, ISP_LOGINFO, f2, "immediate notify status", inp->in_status, notify.nt_lun, loopid, inp->in_task_flags, inp->in_seqid); + isp_prt(isp, ISP_LOGINFO, f2, "immediate notify status", inp->in_status, notify.nt_lun, nphdl, inp->in_task_flags, inp->in_seqid); isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inp); return; } if (inp->in_task_flags & TASK_FLAGS_ABORT_TASK_SET) { - isp_prt(isp, ISP_LOGINFO, f1, "ABORT TASK SET", loopid, notify.nt_lun, inp->in_seqid); + isp_prt(isp, ISP_LOGINFO, f1, "ABORT TASK SET", nphdl, notify.nt_lun, inp->in_seqid); notify.nt_ncode = NT_ABORT_TASK_SET; } else if (inp->in_task_flags & TASK_FLAGS_CLEAR_TASK_SET) { - isp_prt(isp, ISP_LOGINFO, f1, "CLEAR TASK SET", loopid, notify.nt_lun, inp->in_seqid); + isp_prt(isp, ISP_LOGINFO, f1, "CLEAR TASK SET", nphdl, notify.nt_lun, inp->in_seqid); notify.nt_ncode = NT_CLEAR_TASK_SET; } else if (inp->in_task_flags & TASK_FLAGS_LUN_RESET) { - isp_prt(isp, ISP_LOGINFO, f1, "LUN RESET", loopid, notify.nt_lun, inp->in_seqid); + isp_prt(isp, ISP_LOGINFO, f1, "LUN RESET", nphdl, notify.nt_lun, inp->in_seqid); notify.nt_ncode = NT_LUN_RESET; } else if (inp->in_task_flags & TASK_FLAGS_TARGET_RESET) { - isp_prt(isp, ISP_LOGINFO, f1, "TARGET RESET", loopid, notify.nt_lun, inp->in_seqid); + isp_prt(isp, ISP_LOGINFO, f1, "TARGET RESET", nphdl, notify.nt_lun, inp->in_seqid); notify.nt_ncode = NT_TARGET_RESET; } else if (inp->in_task_flags & TASK_FLAGS_CLEAR_ACA) { - isp_prt(isp, ISP_LOGINFO, f1, "CLEAR ACA", loopid, notify.nt_lun, inp->in_seqid); + isp_prt(isp, ISP_LOGINFO, f1, "CLEAR ACA", nphdl, notify.nt_lun, inp->in_seqid); notify.nt_ncode = NT_CLEAR_ACA; } else { - isp_prt(isp, ISP_LOGWARN, f2, "task flag", inp->in_status, notify.nt_lun, loopid, inp->in_task_flags, inp->in_seqid); + isp_prt(isp, ISP_LOGWARN, f2, "task flag", inp->in_status, notify.nt_lun, nphdl, inp->in_task_flags, inp->in_seqid); isp_async(isp, ISPASYNC_TARGET_NOTIFY_ACK, inp); return; } @@ -997,8 +997,8 @@ static void isp_got_tmf_24xx(ispsoftc_t *isp, at7_entry_t *aep) { isp_notify_t notify; - static const char f1[] = "%s from PortID 0x%06x lun %d seq 0x%08x"; - static const char f2[] = "unknown Task Flag 0x%x lun %d PortID 0x%x tag 0x%08x"; + static const char f1[] = "%s from PortID 0x%06x lun %x seq 0x%08x"; + static const char f2[] = "unknown Task Flag 0x%x lun %x PortID 0x%x tag 0x%08x"; uint16_t chan; uint32_t sid, did; @@ -1146,7 +1146,7 @@ isp_notify_ack(ispsoftc_t *isp, void *ar } else { isp_put_notify_ack_fc(isp, na, (na_fcentry_t *)outp); } - isp_prt(isp, ISP_LOGTDEBUG0, "notify ack loopid %u seqid %x flags %x tflags %x response %x", iid, na->na_seqid, + isp_prt(isp, ISP_LOGTDEBUG0, "notify ack handle %x seqid %x flags %x tflags %x response %x", iid, na->na_seqid, na->na_flags, na->na_task_flags, na->na_response); } else { na_entry_t *na = (na_entry_t *) storage; @@ -1166,7 +1166,7 @@ isp_notify_ack(ispsoftc_t *isp, void *ar na->na_header.rqs_entry_type = RQSTYPE_NOTIFY_ACK; na->na_header.rqs_entry_count = 1; isp_put_notify_ack(isp, na, (na_entry_t *)outp); - isp_prt(isp, ISP_LOGTDEBUG0, "notify ack loopid %u lun %u tgt %u seqid %x event %x", na->na_iid, na->na_lun, na->na_tgt, na->na_seqid, na->na_event); + isp_prt(isp, ISP_LOGTDEBUG0, "notify ack handle %x lun %x tgt %u seqid %x event %x", na->na_iid, na->na_lun, na->na_tgt, na->na_seqid, na->na_event); } ISP_TDQE(isp, "isp_notify_ack", isp->isp_reqidx, storage); ISP_SYNC_REQUEST(isp); @@ -1274,7 +1274,7 @@ isp_handle_atio(ispsoftc_t *isp, at_entr /* * ATIO rejected by the firmware due to disabled lun. */ - isp_prt(isp, ISP_LOGERR, "rejected ATIO for disabled lun %d", lun); + isp_prt(isp, ISP_LOGERR, "rejected ATIO for disabled lun %x", lun); break; case AT_NOCAP: /* @@ -1282,7 +1282,7 @@ isp_handle_atio(ispsoftc_t *isp, at_entr * We sent an ATIO that overflowed the firmware's * command resource count. */ - isp_prt(isp, ISP_LOGERR, "rejected ATIO for lun %d because of command count overflow", lun); + isp_prt(isp, ISP_LOGERR, "rejected ATIO for lun %x because of command count overflow", lun); break; case AT_BDR_MSG: @@ -1320,7 +1320,7 @@ isp_handle_atio(ispsoftc_t *isp, at_entr default: - isp_prt(isp, ISP_LOGERR, "Unknown ATIO status 0x%x from loopid %d for lun %d", aep->at_status, aep->at_iid, lun); + isp_prt(isp, ISP_LOGERR, "Unknown ATIO status 0x%x from handle %x for lun %x", aep->at_status, aep->at_iid, lun); (void) isp_target_put_atio(isp, aep); break; } @@ -1408,7 +1408,7 @@ isp_handle_atio2(ispsoftc_t *isp, at2_en default: - isp_prt(isp, ISP_LOGERR, "Unknown ATIO2 status 0x%x from loopid %d for lun %x", aep->at_status, iid, lun); + isp_prt(isp, ISP_LOGERR, "Unknown ATIO2 status 0x%x from handle %d for lun %x", aep->at_status, iid, lun); (void) isp_target_put_atio(isp, aep); break; } @@ -1483,7 +1483,7 @@ isp_handle_ctio(ispsoftc_t *isp, ct_entr * CTIO rejected by the firmware due to disabled lun. * "Cannot Happen". */ - isp_prt(isp, ISP_LOGERR, "Firmware rejected CTIO for disabled lun %d", ct->ct_lun); + isp_prt(isp, ISP_LOGERR, "Firmware rejected CTIO for disabled lun %x", ct->ct_lun); break; case CT_NOPATH: @@ -1493,7 +1493,7 @@ isp_handle_ctio(ispsoftc_t *isp, ct_entr * we tried to access the bus while a non-disconnecting * command is in process. */ - isp_prt(isp, ISP_LOGERR, "Firmware rejected CTIO for bad nexus %d/%d/%d", ct->ct_iid, ct->ct_tgt, ct->ct_lun); + isp_prt(isp, ISP_LOGERR, "Firmware rejected CTIO for bad nexus %d/%d/%x", ct->ct_iid, ct->ct_tgt, ct->ct_lun); break; case CT_RSELTMO: From owner-svn-src-all@freebsd.org Mon Nov 30 21:39:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FEB3A3D392; Mon, 30 Nov 2015 21:39:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A5A2112D; Mon, 30 Nov 2015 21:39:34 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULdXC2070487; Mon, 30 Nov 2015 21:39:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULdXC3070486; Mon, 30 Nov 2015 21:39:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302139.tAULdXC3070486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291513 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:39:34 -0000 Author: mav Date: Mon Nov 30 21:39:33 2015 New Revision: 291513 URL: https://svnweb.freebsd.org/changeset/base/291513 Log: MFC r291014: Simplify fabric tasting code. Except cosmetic changes this removes fabric ports from our port database. It is always firmware duty to manage them, so driver don't need to worry. Modified: stable/10/sys/dev/isp/isp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:38:51 2015 (r291512) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:39:33 2015 (r291513) @@ -2766,10 +2766,9 @@ static int isp_fclink_test(ispsoftc_t *isp, int chan, int usdelay) { mbreg_t mbs; - int check_for_fabric, r; + int r; uint16_t nphdl; fcparam *fcp; - fcportdb_t *lp; isp_pdb_t pdb; NANOTIME_T hra, hrb; @@ -2826,7 +2825,14 @@ isp_fclink_test(ispsoftc_t *isp, int cha } if (IS_2100(isp)) { - fcp->isp_topo = TOPO_NL_PORT; + /* + * Don't bother with fabric if we are using really old + * 2100 firmware. It's just not worth it. + */ + if (ISP_FW_NEWER_THAN(isp, 1, 15, 37)) + fcp->isp_topo = TOPO_FL_PORT; + else + fcp->isp_topo = TOPO_NL_PORT; } else { int topo = (int) mbs.param[6]; if (topo < TOPO_NL_PORT || topo > TOPO_PTP_STUB) { @@ -2836,22 +2842,6 @@ isp_fclink_test(ispsoftc_t *isp, int cha } fcp->isp_portid = mbs.param[2] | (mbs.param[3] << 16); - if (IS_2100(isp)) { - /* - * Don't bother with fabric if we are using really old - * 2100 firmware. It's just not worth it. - */ - if (ISP_FW_NEWER_THAN(isp, 1, 15, 37)) { - check_for_fabric = 1; - } else { - check_for_fabric = 0; - } - } else if (fcp->isp_topo == TOPO_FL_PORT || fcp->isp_topo == TOPO_F_PORT) { - check_for_fabric = 1; - } else { - check_for_fabric = 0; - } - /* * Check to make sure we got a valid loopid * The 24XX seems to mess this up for multiple channels. @@ -2878,54 +2868,22 @@ isp_fclink_test(ispsoftc_t *isp, int cha } } - - if (IS_24XX(isp)) { /* XXX SHOULDN'T THIS BE FOR 2K F/W? XXX */ - nphdl = NPH_FL_ID; - } else { - nphdl = FL_ID; - } - if (check_for_fabric) { + if (fcp->isp_topo == TOPO_F_PORT || fcp->isp_topo == TOPO_FL_PORT) { + nphdl = IS_24XX(isp) ? NPH_FL_ID : FL_ID; r = isp_getpdb(isp, chan, nphdl, &pdb, 1); - if (r && (fcp->isp_topo == TOPO_F_PORT || fcp->isp_topo == TOPO_FL_PORT)) { - isp_prt(isp, ISP_LOGWARN, "fabric topology but cannot get info about fabric controller (0x%x)", r); - fcp->isp_topo = TOPO_PTP_STUB; - } - } else { - r = -1; - } - if (r == 0) { - if (IS_2100(isp)) { - fcp->isp_topo = TOPO_FL_PORT; - } - if (pdb.portid == 0) { - /* - * Crock. - */ - fcp->isp_topo = TOPO_NL_PORT; + if (r != 0 || pdb.portid == 0) { + if (IS_2100(isp)) { + fcp->isp_topo = TOPO_NL_PORT; + } else { + isp_prt(isp, ISP_LOGWARN, + "fabric topology, but cannot get info about fabric controller (0x%x)", r); + fcp->isp_topo = TOPO_PTP_STUB; + } goto not_on_fabric; } - /* - * Save the Fabric controller's port database entry. - */ - lp = &fcp->portdb[FL_ID]; - lp->state = FC_PORTDB_STATE_PENDING_VALID; - MAKE_WWN_FROM_NODE_NAME(lp->node_wwn, pdb.nodename); - MAKE_WWN_FROM_NODE_NAME(lp->port_wwn, pdb.portname); - lp->prli_word3 = pdb.prli_word3; - lp->portid = pdb.portid; - lp->handle = pdb.handle; - lp->new_portid = lp->portid; - lp->new_prli_word3 = lp->prli_word3; if (IS_24XX(isp)) { - if (check_for_fabric) { - /* - * The mbs is still hanging out from the MBOX_GET_LOOP_ID above. - */ - fcp->isp_fabric_params = mbs.param[7]; - } else { - fcp->isp_fabric_params = 0; - } + fcp->isp_fabric_params = mbs.param[7]; fcp->isp_sns_hdl = NPH_SNS_ID; r = isp_register_fc4_type_24xx(isp, chan); if (r == 0) @@ -2938,11 +2896,9 @@ isp_fclink_test(ispsoftc_t *isp, int cha isp_prt(isp, ISP_LOGWARN|ISP_LOG_SANCFG, "%s: register fc4 type failed", __func__); return (-1); } - } else { -not_on_fabric: - fcp->portdb[FL_ID].state = FC_PORTDB_STATE_NIL; } +not_on_fabric: fcp->isp_gbspeed = 1; if (IS_23XX(isp) || IS_24XX(isp)) { MBSINIT(&mbs, MBOX_GET_SET_DATA_RATE, MBLOGALL, 3000000); @@ -3054,10 +3010,6 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) lp->prli_word3 = lp->new_prli_word3; lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_STAYED, chan, lp); - if (dbidx != FL_ID) { - lp->new_prli_word3 = 0; - lp->new_portid = 0; - } break; case FC_PORTDB_STATE_ZOMBIE: break; @@ -3532,11 +3484,7 @@ abort: /* * Make sure we still are logged into the fabric controller. */ - if (IS_24XX(isp)) { /* XXX SHOULDN'T THIS BE TRUE FOR 2K F/W? XXX */ - nphdl = NPH_FL_ID; - } else { - nphdl = FL_ID; - } + nphdl = IS_24XX(isp) ? NPH_FL_ID : FL_ID; r = isp_getpdb(isp, chan, nphdl, &pdb, 0); if ((r & 0xffff) == MBOX_NOT_LOGGED_IN) { isp_dump_chip_portdb(isp, chan, 0); @@ -3590,12 +3538,6 @@ abort: return (0); } - - /* - * If we get this far, we certainly still have the fabric controller. - */ - fcp->portdb[FL_ID].state = FC_PORTDB_STATE_PENDING_VALID; - /* * Go through the list and remove duplicate port ids. */ @@ -3840,10 +3782,6 @@ abort: dbidx = MAX_FC_TARG; for (lp = fcp->portdb; lp < &fcp->portdb[MAX_FC_TARG]; lp++) { - if (lp >= &fcp->portdb[FL_ID] && - lp <= &fcp->portdb[SNS_ID]) { - continue; - } if (lp->state == FC_PORTDB_STATE_NIL) { if (dbidx == MAX_FC_TARG) { dbidx = lp - fcp->portdb; @@ -3909,9 +3847,6 @@ abort: * WWNN/WWPN duple */ for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { - if (dbidx >= FL_ID && dbidx <= SNS_ID) { - continue; - } if ((fcp->portdb[dbidx].node_wwn == wwnn || fcp->portdb[dbidx].node_wwn == 0) && fcp->portdb[dbidx].port_wwn == wwpn) { From owner-svn-src-all@freebsd.org Mon Nov 30 21:40:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1BB1A3D407; Mon, 30 Nov 2015 21:40:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 606E712EC; Mon, 30 Nov 2015 21:40:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULeKFL070583; Mon, 30 Nov 2015 21:40:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULeKwI070581; Mon, 30 Nov 2015 21:40:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302140.tAULeKwI070581@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:40:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291514 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:40:22 -0000 Author: mav Date: Mon Nov 30 21:40:20 2015 New Revision: 291514 URL: https://svnweb.freebsd.org/changeset/base/291514 Log: MFC r291080: Another round of port scanner rewrite. This change simplifies and unifies port adding/updating for loop and fabric scanners. It also fixes problems with scanning restarts due to concurrent port databases changes. It also fixes many cosmetic issues. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/isp_library.h stable/10/sys/dev/isp/ispmbox.h stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:39:33 2015 (r291513) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:40:20 2015 (r291514) @@ -68,9 +68,7 @@ __FBSDID("$FreeBSD$"); /* * Local static data */ -static const char fconf[] = "Chan %d PortDB[%d] changed:\n current =(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)\n database=(0x%x@0x%06x 0x%08x%08x 0x%08x%08x)"; static const char notresp[] = "Not RESPONSE in RESPONSE Queue (type 0x%x) @ idx %d (next %d) nlooked %d"; -static const char topology[] = "Chan %d WWPN 0x%08x%08x PortID 0x%06x LoopID 0x%x Connection '%s'"; static const char bun[] = "bad underrun (count %d, resid %d, status %s)"; static const char lipd[] = "Chan %d LIP destroyed %d active commands"; static const char sacq[] = "unable to acquire scratch area"; @@ -108,7 +106,8 @@ static void isp_scsi_init(ispsoftc_t *); static void isp_scsi_channel_init(ispsoftc_t *, int); static void isp_fibre_init(ispsoftc_t *); static void isp_fibre_init_2400(ispsoftc_t *); -static void isp_mark_portdb(ispsoftc_t *, int, int); +static void isp_clear_portdb(ispsoftc_t *, int); +static void isp_mark_portdb(ispsoftc_t *, int); static int isp_plogx(ispsoftc_t *, int, uint16_t, uint32_t, int, int); static int isp_port_login(ispsoftc_t *, uint16_t, uint32_t); static int isp_port_logout(ispsoftc_t *, uint16_t, uint32_t); @@ -2283,7 +2282,7 @@ isp_fibre_init_2400(ispsoftc_t *isp) } static void -isp_mark_portdb(ispsoftc_t *isp, int chan, int disposition) +isp_clear_portdb(ispsoftc_t *isp, int chan) { fcparam *fcp = FCPARAM(isp, chan); fcportdb_t *lp; @@ -2292,30 +2291,41 @@ isp_mark_portdb(ispsoftc_t *isp, int cha for (i = 0; i < MAX_FC_TARG; i++) { lp = &fcp->portdb[i]; switch (lp->state) { - case FC_PORTDB_STATE_PROBATIONAL: case FC_PORTDB_STATE_DEAD: case FC_PORTDB_STATE_CHANGED: - case FC_PORTDB_STATE_PENDING_VALID: case FC_PORTDB_STATE_VALID: - if (disposition > 0) - lp->state = FC_PORTDB_STATE_PROBATIONAL; - else { - lp->state = FC_PORTDB_STATE_NIL; - isp_async(isp, ISPASYNC_DEV_GONE, chan, lp); - } - break; - case FC_PORTDB_STATE_ZOMBIE: + lp->state = FC_PORTDB_STATE_NIL; + isp_async(isp, ISPASYNC_DEV_GONE, chan, lp); break; case FC_PORTDB_STATE_NIL: case FC_PORTDB_STATE_NEW: - default: - ISP_MEMZERO(lp, sizeof(*lp)); lp->state = FC_PORTDB_STATE_NIL; break; + case FC_PORTDB_STATE_ZOMBIE: + break; + default: + panic("Don't know how to clear state %d\n", lp->state); } } } +static void +isp_mark_portdb(ispsoftc_t *isp, int chan) +{ + fcparam *fcp = FCPARAM(isp, chan); + fcportdb_t *lp; + int i; + + for (i = 0; i < MAX_FC_TARG; i++) { + lp = &fcp->portdb[i]; + if (lp->state == FC_PORTDB_STATE_NIL) + continue; + if ((lp->portid & 0xfffc00) == 0xfffc00) + continue; + fcp->portdb[i].probational = 1; + } +} + /* * Perform an IOCB PLOGI or LOGO via EXECUTE IOCB A64 for 24XX cards * or via FABRIC LOGIN/FABRIC LOGOUT for other cards. @@ -2333,6 +2343,9 @@ isp_plogx(ispsoftc_t *isp, int chan, uin const char *msg; char buf[64]; + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d PLOGX %s PortID 0x%06x nphdl 0x%x", + chan, (flags & PLOGX_FLG_CMD_MASK) == PLOGX_FLG_CMD_PLOGI ? + "Login":"Logout", portid, handle); if (!IS_24XX(isp)) { int action = flags & PLOGX_FLG_CMD_MASK; if (action == PLOGX_FLG_CMD_PLOGI) { @@ -2766,7 +2779,7 @@ static int isp_fclink_test(ispsoftc_t *isp, int chan, int usdelay) { mbreg_t mbs; - int r; + int i, r; uint16_t nphdl; fcparam *fcp; isp_pdb_t pdb; @@ -2774,8 +2787,8 @@ isp_fclink_test(ispsoftc_t *isp, int cha fcp = FCPARAM(isp, chan); - /* Mark port database entries for following scan. */ - isp_mark_portdb(isp, chan, 1); + /* Mark port database entries probational for following scan. */ + isp_mark_portdb(isp, chan); if (fcp->isp_loopstate >= LOOP_LTEST_DONE) return (0); @@ -2818,12 +2831,6 @@ isp_fclink_test(ispsoftc_t *isp, int cha return (-1); } - if (ISP_CAP_2KLOGIN(isp)) { - fcp->isp_loopid = mbs.param[1]; - } else { - fcp->isp_loopid = mbs.param[1] & 0xff; - } - if (IS_2100(isp)) { /* * Don't bother with fabric if we are using really old @@ -2842,30 +2849,17 @@ isp_fclink_test(ispsoftc_t *isp, int cha } fcp->isp_portid = mbs.param[2] | (mbs.param[3] << 16); - /* - * Check to make sure we got a valid loopid - * The 24XX seems to mess this up for multiple channels. - */ - if (fcp->isp_topo == TOPO_FL_PORT || fcp->isp_topo == TOPO_NL_PORT) { + if (!TOPO_IS_FABRIC(fcp->isp_topo)) { + fcp->isp_loopid = mbs.param[1] & 0xff; + } else if (fcp->isp_topo != TOPO_F_PORT) { uint8_t alpa = fcp->isp_portid; - if (alpa == 0) { - /* "Cannot Happen" */ - isp_prt(isp, ISP_LOGWARN, "Zero AL_PA for Loop Topology?"); - } else { - int i; - for (i = 0; alpa_map[i]; i++) { - if (alpa_map[i] == alpa) { - break; - } - } - if (alpa_map[i] && fcp->isp_loopid != i) { - isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d Deriving loopid %d from AL_PA map (AL_PA 0x%x) and ignoring returned value %d (AL_PA 0x%x)", - chan, i, alpa_map[i], fcp->isp_loopid, alpa); - fcp->isp_loopid = i; - } + for (i = 0; alpa_map[i]; i++) { + if (alpa_map[i] == alpa) + break; } + if (alpa_map[i]) + fcp->isp_loopid = i; } if (fcp->isp_topo == TOPO_F_PORT || fcp->isp_topo == TOPO_FL_PORT) { @@ -2899,6 +2893,7 @@ isp_fclink_test(ispsoftc_t *isp, int cha } not_on_fabric: + /* Get link speed. */ fcp->isp_gbspeed = 1; if (IS_23XX(isp) || IS_24XX(isp)) { MBSINIT(&mbs, MBOX_GET_SET_DATA_RATE, MBLOGALL, 3000000); @@ -2906,27 +2901,29 @@ not_on_fabric: /* mbs.param[2] undefined if we're just getting rate */ isp_mboxcmd(isp, &mbs); if (mbs.param[0] == MBOX_COMMAND_COMPLETE) { - if (mbs.param[1] == MBGSD_EIGHTGB) { - isp_prt(isp, ISP_LOGINFO, "Chan %d 8Gb link speed", chan); + if (mbs.param[1] == MBGSD_10GB) + fcp->isp_gbspeed = 10; + else if (mbs.param[1] == MBGSD_16GB) + fcp->isp_gbspeed = 16; + else if (mbs.param[1] == MBGSD_8GB) fcp->isp_gbspeed = 8; - } else if (mbs.param[1] == MBGSD_FOURGB) { - isp_prt(isp, ISP_LOGINFO, "Chan %d 4Gb link speed", chan); + else if (mbs.param[1] == MBGSD_4GB) fcp->isp_gbspeed = 4; - } else if (mbs.param[1] == MBGSD_TWOGB) { - isp_prt(isp, ISP_LOGINFO, "Chan %d 2Gb link speed", chan); + else if (mbs.param[1] == MBGSD_2GB) fcp->isp_gbspeed = 2; - } else if (mbs.param[1] == MBGSD_ONEGB) { - isp_prt(isp, ISP_LOGINFO, "Chan %d 1Gb link speed", chan); + else if (mbs.param[1] == MBGSD_1GB) fcp->isp_gbspeed = 1; - } } } fcp->isp_loopstate = LOOP_LTEST_DONE; - /* - * Announce ourselves, too. - */ - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGCONFIG, topology, chan, (uint32_t) (fcp->isp_wwpn >> 32), (uint32_t) fcp->isp_wwpn, fcp->isp_portid, fcp->isp_loopid, isp_fc_toponame(fcp)); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGCONFIG, + "Chan %d WWPN %016jx WWNN %016jx", + chan, (uintmax_t)fcp->isp_wwpn, (uintmax_t)fcp->isp_wwnn); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGCONFIG, + "Chan %d %dGb %s PortID 0x%06x LoopID 0x%02x", + chan, fcp->isp_gbspeed, isp_fc_toponame(fcp), fcp->isp_portid, + fcp->isp_loopid); isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC link test done", chan); return (0); } @@ -2963,13 +2960,11 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { lp = &fcp->portdb[dbidx]; - if (lp->state == FC_PORTDB_STATE_NIL || - lp->state == FC_PORTDB_STATE_VALID) { + if (lp->state == FC_PORTDB_STATE_NIL) continue; - } - + if (lp->probational && lp->state != FC_PORTDB_STATE_ZOMBIE) + lp->state = FC_PORTDB_STATE_DEAD; switch (lp->state) { - case FC_PORTDB_STATE_PROBATIONAL: case FC_PORTDB_STATE_DEAD: lp->state = FC_PORTDB_STATE_NIL; isp_async(isp, ISPASYNC_DEV_GONE, chan, lp); @@ -2979,36 +2974,23 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) PLOGX_FLG_CMD_LOGO | PLOGX_FLG_IMPLICIT | PLOGX_FLG_FREE_NPHDL, 0); - } else { - lp->autologin = 0; } - lp->new_prli_word3 = 0; - lp->new_portid = 0; /* * Note that we might come out of this with our state * set to FC_PORTDB_STATE_ZOMBIE. */ break; case FC_PORTDB_STATE_NEW: - lp->portid = lp->new_portid; - lp->prli_word3 = lp->new_prli_word3; lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_ARRIVED, chan, lp); - lp->new_prli_word3 = 0; - lp->new_portid = 0; break; case FC_PORTDB_STATE_CHANGED: lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_CHANGED, chan, lp); lp->portid = lp->new_portid; lp->prli_word3 = lp->new_prli_word3; - lp->new_prli_word3 = 0; - lp->new_portid = 0; break; - case FC_PORTDB_STATE_PENDING_VALID: - lp->portid = lp->new_portid; - lp->prli_word3 = lp->new_prli_word3; - lp->state = FC_PORTDB_STATE_VALID; + case FC_PORTDB_STATE_VALID: isp_async(isp, ISPASYNC_DEV_STAYED, chan, lp); break; case FC_PORTDB_STATE_ZOMBIE: @@ -3032,15 +3014,78 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) return (0); } +static void +isp_pdb_add_update(ispsoftc_t *isp, int chan, isp_pdb_t *pdb) +{ + fcportdb_t *lp; + uint64_t wwnn, wwpn; + + MAKE_WWN_FROM_NODE_NAME(wwnn, pdb->nodename); + MAKE_WWN_FROM_NODE_NAME(wwpn, pdb->portname); + + /* Search port database for the same WWPN. */ + if (isp_find_pdb_by_wwpn(isp, chan, wwpn, &lp)) { + if (!lp->probational) { + isp_prt(isp, ISP_LOGERR, + "Chan %d Port 0x%06x@0x%04x [%d] is not probational (0x%x)", + chan, lp->portid, lp->handle, + FC_PORTDB_TGT(isp, chan, lp), lp->state); + isp_dump_portdb(isp, chan); + return; + } + lp->probational = 0; + lp->node_wwn = wwnn; + + /* Old device, nothing new. */ + if (lp->portid == pdb->portid && + lp->handle == pdb->handle && + lp->prli_word3 == pdb->prli_word3) { + if (lp->state != FC_PORTDB_STATE_NEW) + lp->state = FC_PORTDB_STATE_VALID; + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Port 0x%06x@0x%04x is valid", + chan, pdb->portid, pdb->handle); + return; + } + + /* Something has changed. */ + lp->state = FC_PORTDB_STATE_CHANGED; + lp->handle = pdb->handle; + lp->new_portid = pdb->portid; + lp->new_prli_word3 = pdb->prli_word3; + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Port 0x%06x@0x%04x is changed", + chan, pdb->portid, pdb->handle); + return; + } + + /* It seems like a new port. Find an empty slot for it. */ + if (!isp_find_pdb_empty(isp, chan, &lp)) { + isp_prt(isp, ISP_LOGERR, "Chan %d out of portdb entries", chan); + return; + } + + ISP_MEMZERO(lp, sizeof (fcportdb_t)); + lp->autologin = 1; + lp->probational = 0; + lp->state = FC_PORTDB_STATE_NEW; + lp->portid = lp->new_portid = pdb->portid; + lp->prli_word3 = lp->new_prli_word3 = pdb->prli_word3; + lp->handle = pdb->handle; + lp->port_wwn = wwpn; + lp->node_wwn = wwnn; + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Port 0x%06x@0x%04x is new", + chan, pdb->portid, pdb->handle); +} + /* * Scan local loop for devices. */ static int isp_scan_loop(ispsoftc_t *isp, int chan) { - fcportdb_t *lp, tmp; fcparam *fcp = FCPARAM(isp, chan); - int i, idx, lim, r; + int idx, lim, r; isp_pdb_t pdb; uint16_t handles[LOCAL_LOOP_LIM]; uint16_t handle; @@ -3052,8 +3097,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) return (0); } isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC loop scan", chan); - if (fcp->isp_topo != TOPO_NL_PORT && fcp->isp_topo != TOPO_FL_PORT && - fcp->isp_topo != TOPO_N_PORT) { + if (TOPO_IS_FABRIC(fcp->isp_topo)) { isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC loop scan done (no loop)", chan); fcp->isp_loopstate = LOOP_LSCAN_DONE; @@ -3066,7 +3110,6 @@ isp_scan_loop(ispsoftc_t *isp, int chan) if (r != 0) { isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Getting list of handles failed with %x", chan, r); -fail: isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC loop scan done (bad)", chan); return (-1); @@ -3113,6 +3156,8 @@ abort: * Get the port database entity for this index. */ r = isp_getpdb(isp, chan, handle, &pdb, 1); + if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) + goto abort; if (r != 0) { isp_prt(isp, ISP_LOGDEBUG1, "Chan %d FC Scan Loop handle %d returned %x", @@ -3122,145 +3167,7 @@ abort: continue; } - if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) - goto abort; - - /* - * On *very* old 2100 firmware we would end up sometimes - * with the firmware returning the port database entry - * for something else. We used to restart this, but - * now we just punt. - */ - if (IS_2100(isp) && pdb.handle != handle) { - isp_prt(isp, ISP_LOGWARN, - "Chan %d getpdb() returned wrong handle %x != %x", - chan, pdb.handle, handle); - goto fail; - } - - /* - * Save the pertinent info locally. - */ - MAKE_WWN_FROM_NODE_NAME(tmp.node_wwn, pdb.nodename); - MAKE_WWN_FROM_NODE_NAME(tmp.port_wwn, pdb.portname); - tmp.prli_word3 = pdb.prli_word3; - tmp.portid = pdb.portid; - tmp.handle = pdb.handle; - - /* - * Check to make sure it's still a valid entry. The 24XX seems - * to return a portid but not a WWPN/WWNN or role for devices - * which shift on a loop. - */ - if (tmp.node_wwn == 0 || tmp.port_wwn == 0 || tmp.portid == 0) { - int a, b, c; - isp_prt(isp, ISP_LOGWARN, - "Chan %d bad pdb (WWNN %016jx, WWPN %016jx, PortID %06x, W3 0x%x, H 0x%x) @ handle 0x%x", - chan, tmp.node_wwn, tmp.port_wwn, tmp.portid, tmp.prli_word3, tmp.handle, handle); - a = (tmp.node_wwn == 0); - b = (tmp.port_wwn == 0); - c = (tmp.portid == 0); - if (a == 0 && b == 0) { - tmp.node_wwn = - isp_get_wwn(isp, chan, handle, 1); - tmp.port_wwn = - isp_get_wwn(isp, chan, handle, 0); - if (tmp.node_wwn && tmp.port_wwn) { - isp_prt(isp, ISP_LOGWARN, "DODGED!"); - goto cont; - } - } - isp_dump_portdb(isp, chan); - continue; - } - cont: - - /* - * Now search the entire port database - * for the same Port WWN. - */ - if (isp_find_pdb_by_wwn(isp, chan, tmp.port_wwn, &lp)) { - /* - * Okay- we've found a non-nil entry that matches. - * Check to make sure it's probational or a zombie. - */ - if (lp->state != FC_PORTDB_STATE_PROBATIONAL && - lp->state != FC_PORTDB_STATE_ZOMBIE && - lp->state != FC_PORTDB_STATE_VALID) { - isp_prt(isp, ISP_LOGERR, - "Chan %d [%d] not probational/zombie (0x%x)", - chan, FC_PORTDB_TGT(isp, chan, lp), lp->state); - isp_dump_portdb(isp, chan); - goto fail; - } - - /* - * Mark the device as something the f/w logs into - * automatically. - */ - lp->autologin = 1; - lp->node_wwn = tmp.node_wwn; - - /* - * Check to make see if really still the same - * device. If it is, we mark it pending valid. - */ - if (lp->portid == tmp.portid && lp->handle == tmp.handle && lp->prli_word3 == tmp.prli_word3) { - lp->new_portid = tmp.portid; - lp->new_prli_word3 = tmp.prli_word3; - lp->state = FC_PORTDB_STATE_PENDING_VALID; - isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d Loop port 0x%06x@0x%04x now pending valid", - chan, tmp.portid, tmp.handle); - continue; - } - - /* - * We can wipe out the old handle value - * here because it's no longer valid. - */ - lp->handle = tmp.handle; - - /* - * Claim that this has changed and let somebody else - * decide what to do. - */ - isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d Loop port 0x%06x@0x%04x changed", - chan, tmp.portid, tmp.handle); - lp->state = FC_PORTDB_STATE_CHANGED; - lp->new_portid = tmp.portid; - lp->new_prli_word3 = tmp.prli_word3; - continue; - } - - /* - * Ah. A new device entry. Find an empty slot - * for it and save info for later disposition. - */ - for (i = 0; i < MAX_FC_TARG; i++) { - if (fcp->portdb[i].state == FC_PORTDB_STATE_NIL) { - break; - } - } - if (i == MAX_FC_TARG) { - isp_prt(isp, ISP_LOGERR, - "Chan %d out of portdb entries", chan); - continue; - } - lp = &fcp->portdb[i]; - - ISP_MEMZERO(lp, sizeof (fcportdb_t)); - lp->autologin = 1; - lp->state = FC_PORTDB_STATE_NEW; - lp->new_portid = tmp.portid; - lp->new_prli_word3 = tmp.prli_word3; - lp->handle = tmp.handle; - lp->port_wwn = tmp.port_wwn; - lp->node_wwn = tmp.node_wwn; - isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d Loop port 0x%06x@0x%04x is a new entry", - chan, tmp.portid, tmp.handle); + isp_pdb_add_update(isp, chan, &pdb); } if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) goto abort; @@ -3359,10 +3266,6 @@ isp_gid_ft_ct_passthru(ispsoftc_t *isp, isp_prt(isp, ISP_LOGDEBUG0, "Chan %d scanning fabric (GID_FT) via CT", chan); - if (!IS_24XX(isp)) { - return (1); - } - /* * Build a Passthrough IOCB in memory. */ @@ -3445,6 +3348,7 @@ static int isp_scan_fabric(ispsoftc_t *isp, int chan) { fcparam *fcp = FCPARAM(isp, chan); + fcportdb_t *lp; uint32_t portid; uint16_t nphdl; isp_pdb_t pdb; @@ -3458,7 +3362,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha return (0); } isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC fabric scan", chan); - if (fcp->isp_topo != TOPO_FL_PORT && fcp->isp_topo != TOPO_F_PORT) { + if (!TOPO_IS_FABRIC(fcp->isp_topo)) { fcp->isp_loopstate = LOOP_FSCAN_DONE; isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC fabric scan done (no fabric)", chan); @@ -3495,16 +3399,13 @@ abort: goto fail; } - if (IS_24XX(isp)) { + /* Get list of port IDs from SNS. */ + if (IS_24XX(isp)) r = isp_gid_ft_ct_passthru(isp, chan); - } else { + else r = isp_gid_ft_sns(isp, chan); - } - - if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { + if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) goto abort; - } - if (r > 0) { fcp->isp_loopstate = LOOP_FSCAN_DONE; FC_SCRATCH_RELEASE(isp, chan); @@ -3519,9 +3420,8 @@ abort: rs0 = (sns_gid_ft_rsp_t *) ((uint8_t *)fcp->isp_scratch+IGPOFF); rs1 = (sns_gid_ft_rsp_t *) ((uint8_t *)fcp->isp_scratch+OGPOFF); isp_get_gid_ft_response(isp, rs0, rs1, NGENT); - if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { + if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) goto abort; - } if (rs1->snscb_cthdr.ct_cmd_resp != LS_ACC) { int level; if (rs1->snscb_cthdr.ct_reason == 9 && rs1->snscb_cthdr.ct_explanation == 7) { @@ -3538,21 +3438,11 @@ abort: return (0); } - /* - * Go through the list and remove duplicate port ids. - */ - - portlim = 0; - portidx = 0; + /* Check our buffer was big enough to get the full list. */ for (portidx = 0; portidx < NGENT-1; portidx++) { - if (rs1->snscb_ports[portidx].control & 0x80) { + if (rs1->snscb_ports[portidx].control & 0x80) break; - } } - - /* - * If we're not at the last entry, our list wasn't big enough. - */ if ((rs1->snscb_ports[portidx].control & 0x80) == 0) { isp_prt(isp, ISP_LOGWARN, "fabric too big for scratch area: increase ISP_FC_SCRLEN"); @@ -3561,6 +3451,7 @@ abort: isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Got %d ports back from name server", chan, portlim); + /* Go through the list and remove duplicate port ids. */ for (portidx = 0; portidx < portlim; portidx++) { int npidx; @@ -3603,55 +3494,34 @@ abort: */ for (portidx = 0; portidx < portlim; portidx++) { - fcportdb_t *lp; - uint64_t wwnn, wwpn; - int dbidx, nr; - - portid = - ((rs1->snscb_ports[portidx].portid[0]) << 16) | - ((rs1->snscb_ports[portidx].portid[1]) << 8) | - ((rs1->snscb_ports[portidx].portid[2])); - + portid = ((rs1->snscb_ports[portidx].portid[0]) << 16) | + ((rs1->snscb_ports[portidx].portid[1]) << 8) | + ((rs1->snscb_ports[portidx].portid[2])); + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Checking fabric port 0x%06x", chan, portid); if (portid == 0) { isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Skipping null PortID at idx %d", chan, portidx); continue; } - if (portid == fcp->isp_portid) { isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Skipping our PortID 0x%06x", chan, portid); continue; } - isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d Checking fabric port 0x%06x", chan, portid); - - /* - * We now search our Port Database for any - * probational entries with this PortID. We don't - * look for zombies here- only probational - * entries (we've already logged out of zombies). - */ - for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { - lp = &fcp->portdb[dbidx]; - - if (lp->state != FC_PORTDB_STATE_PROBATIONAL) { - continue; - } - if (lp->portid == portid) { - break; + /* Now search the entire port database for the same portid. */ + if (isp_find_pdb_by_portid(isp, chan, portid, &lp)) { + if (!lp->probational) { + isp_prt(isp, ISP_LOGERR, + "Chan %d Port 0x%06x@0x%04x [%d] is not probational (0x%x)", + chan, lp->portid, lp->handle, + FC_PORTDB_TGT(isp, chan, lp), lp->state); + FC_SCRATCH_RELEASE(isp, chan); + isp_dump_portdb(isp, chan); + goto fail; } - } - - /* - * We found a probational entry with this Port ID. - */ - if (dbidx < MAX_FC_TARG) { - int handle_changed = 0; - - lp = &fcp->portdb[dbidx]; /* * See if we're still logged into it. @@ -3667,241 +3537,38 @@ abort: * and leave the new portid and role in the * database entry for somebody further along to * decide what to do (policy choice). - * */ - r = isp_getpdb(isp, chan, lp->handle, &pdb, 0); - if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { + if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) goto abort; - } if (r != 0) { - lp->new_portid = portid; lp->state = FC_PORTDB_STATE_DEAD; - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Fabric PortID 0x%06x handle 0x%x is dead (%d)", chan, portid, lp->handle, r); - continue; - } - - - /* - * Check to make sure that handle, portid, WWPN and - * WWNN agree. If they don't, then the association - * between this PortID and the stated handle has been - * broken by the firmware. - */ - MAKE_WWN_FROM_NODE_NAME(wwnn, pdb.nodename); - MAKE_WWN_FROM_NODE_NAME(wwpn, pdb.portname); - if (pdb.handle != lp->handle || - pdb.portid != portid || - wwpn != lp->port_wwn || - (lp->node_wwn != 0 && wwnn != lp->node_wwn)) { isp_prt(isp, ISP_LOG_SANCFG, - fconf, chan, dbidx, pdb.handle, pdb.portid, - (uint32_t) (wwnn >> 32), (uint32_t) wwnn, - (uint32_t) (wwpn >> 32), (uint32_t) wwpn, - lp->handle, portid, - (uint32_t) (lp->node_wwn >> 32), - (uint32_t) lp->node_wwn, - (uint32_t) (lp->port_wwn >> 32), - (uint32_t) lp->port_wwn); - /* - * Try to re-login to this device using a - * new handle. If that fails, mark it dead. - * - * isp_login_device will check for handle and - * portid consistency after re-login. - * - */ - if ((fcp->role & ISP_ROLE_INITIATOR) == 0 || - isp_login_device(isp, chan, portid, &pdb, - &FCPARAM(isp, 0)->isp_lasthdl)) { - lp->new_portid = portid; - lp->state = FC_PORTDB_STATE_DEAD; - if (fcp->isp_loopstate < - LOOP_SCANNING_FABRIC) { - goto abort; - } - continue; - } - if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { - goto abort; - } - MAKE_WWN_FROM_NODE_NAME(wwnn, pdb.nodename); - MAKE_WWN_FROM_NODE_NAME(wwpn, pdb.portname); - if (wwpn != lp->port_wwn || - (lp->node_wwn != 0 && wwnn != lp->node_wwn)) { - isp_prt(isp, ISP_LOGWARN, "changed WWN" - " after relogin"); - lp->new_portid = portid; - lp->state = FC_PORTDB_STATE_DEAD; - continue; - } - - lp->handle = pdb.handle; - handle_changed++; + "Chan %d Port 0x%06x handle 0x%x is dead (%d)", + chan, portid, lp->handle, r); + goto relogin; } - nr = pdb.prli_word3; - - /* - * Check to see whether the portid and roles have - * stayed the same. If they have stayed the same, - * we believe that this is the same device and it - * hasn't become disconnected and reconnected, so - * mark it as pending valid. - * - * If they aren't the same, mark the device as a - * changed device and save the new port id and role - * and let somebody else decide. - */ - - lp->new_portid = portid; - lp->new_prli_word3 = nr; - if (pdb.portid != lp->portid || nr != lp->prli_word3 || handle_changed) { - isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d Fabric port 0x%06x changed", - chan, portid); - lp->state = FC_PORTDB_STATE_CHANGED; - } else { - isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d Fabric port 0x%06x now pending valid", - chan, portid); - lp->state = FC_PORTDB_STATE_PENDING_VALID; - } + isp_pdb_add_update(isp, chan, &pdb); continue; } +relogin: if ((fcp->role & ISP_ROLE_INITIATOR) == 0) continue; - /* - * Ah- a new entry. Search the database again for all non-NIL - * entries to make sure we never ever make a new database entry - * with the same port id. While we're at it, mark where the - * last free entry was. - */ - - dbidx = MAX_FC_TARG; - for (lp = fcp->portdb; lp < &fcp->portdb[MAX_FC_TARG]; lp++) { - if (lp->state == FC_PORTDB_STATE_NIL) { - if (dbidx == MAX_FC_TARG) { - dbidx = lp - fcp->portdb; - } - continue; - } - if (lp->state == FC_PORTDB_STATE_ZOMBIE) { - continue; - } - if (lp->portid == portid) { - break; - } - } - - if (lp < &fcp->portdb[MAX_FC_TARG]) { - isp_prt(isp, ISP_LOGWARN, "Chan %d PortID 0x%06x " - "already at %d handle %d state %d", - chan, portid, dbidx, lp->handle, lp->state); - continue; - } - - /* - * We should have the index of the first free entry seen. - */ - if (dbidx == MAX_FC_TARG) { - isp_prt(isp, ISP_LOGERR, - "port database too small to login PortID 0x%06x" - "- increase MAX_FC_TARG", portid); - continue; - } - - /* - * Otherwise, point to our new home. - */ - lp = &fcp->portdb[dbidx]; - - /* - * Try to see if we are logged into this device, - * and maybe log into it. - * - * isp_login_device will check for handle and - * portid consistency after login. - */ if (isp_login_device(isp, chan, portid, &pdb, &FCPARAM(isp, 0)->isp_lasthdl)) { - if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { + if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) goto abort; - } - continue; - } - if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { - goto abort; - } - - nphdl = pdb.handle; - MAKE_WWN_FROM_NODE_NAME(wwnn, pdb.nodename); - MAKE_WWN_FROM_NODE_NAME(wwpn, pdb.portname); - nr = pdb.prli_word3; - - /* - * And go through the database *one* more time to make sure - * that we do not make more than one entry that has the same - * WWNN/WWPN duple - */ - for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { - if ((fcp->portdb[dbidx].node_wwn == wwnn || - fcp->portdb[dbidx].node_wwn == 0) && - fcp->portdb[dbidx].port_wwn == wwpn) { - break; - } - } - - if (dbidx == MAX_FC_TARG) { - ISP_MEMZERO(lp, sizeof (fcportdb_t)); - lp->handle = nphdl; - lp->node_wwn = wwnn; - lp->port_wwn = wwpn; - lp->new_portid = portid; - lp->new_prli_word3 = nr; - lp->state = FC_PORTDB_STATE_NEW; - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Fabric port 0x%06x is a new entry", chan, portid); continue; } - if (fcp->portdb[dbidx].state != FC_PORTDB_STATE_ZOMBIE) { - isp_prt(isp, ISP_LOGWARN, - "Chan %d PortID 0x%x 0x%08x%08x/0x%08x%08x %ld " - "already at idx %d, state 0x%x", chan, portid, - (uint32_t) (wwnn >> 32), (uint32_t) wwnn, - (uint32_t) (wwpn >> 32), (uint32_t) wwpn, - (long) (lp - fcp->portdb), dbidx, - fcp->portdb[dbidx].state); - continue; - } - - /* - * We found a zombie entry that matches us. - * Revive it. We know that WWN and WWPN - * are the same. For fabric devices, we - * don't care that handle is different - * as we assign that. If role or portid - * are different, it maybe a changed device. - */ - lp = &fcp->portdb[dbidx]; - lp->handle = nphdl; - lp->node_wwn = wwnn; - lp->new_portid = portid; - lp->new_prli_word3 = nr; - if (lp->portid != portid || lp->prli_word3 != nr) { - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Zombie fabric port 0x%06x now changed", chan, portid); - lp->state = FC_PORTDB_STATE_CHANGED; - } else { - isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Zombie fabric port 0x%06x now pending valid", chan, portid); - lp->state = FC_PORTDB_STATE_PENDING_VALID; - } + isp_pdb_add_update(isp, chan, &pdb); } - if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) { + if (fcp->isp_loopstate < LOOP_SCANNING_FABRIC) goto abort; - } FC_SCRATCH_RELEASE(isp, chan); fcp->isp_loopstate = LOOP_FSCAN_DONE; isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC fabric scan done", chan); @@ -3925,27 +3592,26 @@ isp_login_device(ispsoftc_t *isp, int ch handle = isp_next_handle(isp, ohp); for (i = 0; i < lim; i++) { - /* - * See if we're still logged into something with - * this handle and that something agrees with this - * port id. - */ + if (FCPARAM(isp, chan)->isp_loopstate != LOOP_SCANNING_FABRIC) + return (-1); + + /* Check if this handle is free. */ r = isp_getpdb(isp, chan, handle, p, 0); - if (r == 0 && p->portid != portid) { - (void) isp_plogx(isp, chan, handle, portid, PLOGX_FLG_CMD_LOGO | PLOGX_FLG_IMPLICIT | PLOGX_FLG_FREE_NPHDL, 1); - } else if (r == 0) { + if (r == 0) { + if (p->portid != portid) { + /* This handle is busy, try next one. */ + handle = isp_next_handle(isp, ohp); + continue; + } break; } - if (FCPARAM(isp, chan)->isp_loopstate != LOOP_SCANNING_FABRIC) { + if (FCPARAM(isp, chan)->isp_loopstate != LOOP_SCANNING_FABRIC) return (-1); - } + /* * Now try and log into the device */ r = isp_plogx(isp, chan, handle, portid, PLOGX_FLG_CMD_PLOGI, 1); - if (FCPARAM(isp, chan)->isp_loopstate != LOOP_SCANNING_FABRIC) { - return (-1); - } if (r == 0) { break; } else if ((r & 0xffff) == MBOX_PORT_ID_USED) { @@ -3957,13 +3623,9 @@ isp_login_device(ispsoftc_t *isp, int ch if (isp_plogx(isp, chan, r >> 16, portid, PLOGX_FLG_CMD_LOGO | PLOGX_FLG_IMPLICIT | PLOGX_FLG_FREE_NPHDL, 1)) { isp_prt(isp, ISP_LOGERR, "baw... logout of %x failed", r >> 16); } - if (FCPARAM(isp, chan)->isp_loopstate != LOOP_SCANNING_FABRIC) { + if (FCPARAM(isp, chan)->isp_loopstate != LOOP_SCANNING_FABRIC) return (-1); - } r = isp_plogx(isp, chan, handle, portid, PLOGX_FLG_CMD_PLOGI, 1); - if (FCPARAM(isp, chan)->isp_loopstate != LOOP_SCANNING_FABRIC) { - return (-1); - } if (r != 0) i = lim; break; @@ -3988,9 +3650,6 @@ isp_login_device(ispsoftc_t *isp, int ch * is and that we also have the role it plays */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Nov 30 21:41:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 984D8A3D476; Mon, 30 Nov 2015 21:41:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5843A152E; Mon, 30 Nov 2015 21:41:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULf6XT072608; Mon, 30 Nov 2015 21:41:06 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULf6nj072605; Mon, 30 Nov 2015 21:41:06 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302141.tAULf6nj072605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291515 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:41:07 -0000 Author: mav Date: Mon Nov 30 21:41:06 2015 New Revision: 291515 URL: https://svnweb.freebsd.org/changeset/base/291515 Log: MFC r291092: Optimize SNS_GID_FT request scratch memory usage. Now with present 4K of scratch we can fetch up to 508 ports (16 more). Modified: stable/10/sys/dev/isp/isp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:40:20 2015 (r291514) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:41:06 2015 (r291515) @@ -3193,16 +3193,16 @@ abort: */ /* - * Take less than half of our scratch area to store Port IDs + * Take half of our scratch area to store Port IDs */ -#define GIDLEN ((ISP_FC_SCRLEN >> 1) - 16 - SNS_GID_FT_REQ_SIZE) +#define GIDLEN (ISP_FC_SCRLEN >> 1) #define NGENT ((GIDLEN - 16) >> 2) -#define IGPOFF (2 * QENTRY_LEN) +#define IGPOFF (0) #define OGPOFF (ISP_FC_SCRLEN >> 1) -#define ZTXOFF (ISP_FC_SCRLEN - (1 * QENTRY_LEN)) -#define CTXOFF (ISP_FC_SCRLEN - (2 * QENTRY_LEN)) -#define XTXOFF (ISP_FC_SCRLEN - (3 * QENTRY_LEN)) +#define XTXOFF (ISP_FC_SCRLEN - (3 * QENTRY_LEN)) /* CT request */ +#define CTXOFF (ISP_FC_SCRLEN - (2 * QENTRY_LEN)) /* Request IOCB */ +#define ZTXOFF (ISP_FC_SCRLEN - (1 * QENTRY_LEN)) /* Response IOCB */ static int isp_gid_ft_sns(ispsoftc_t *isp, int chan) @@ -3213,6 +3213,7 @@ isp_gid_ft_sns(ispsoftc_t *isp, int chan } un; fcparam *fcp = FCPARAM(isp, chan); sns_gid_ft_req_t *rq = &un._x; + uint8_t *scp = fcp->isp_scratch; mbreg_t mbs; isp_prt(isp, ISP_LOGDEBUG0, "Chan %d scanning fabric (GID_FT) via SNS", chan); @@ -3228,16 +3229,16 @@ isp_gid_ft_sns(ispsoftc_t *isp, int chan rq->snscb_mword_div_2 = NGENT; rq->snscb_fc4_type = FC4_SCSI; - isp_put_gid_ft_request(isp, rq, fcp->isp_scratch); + isp_put_gid_ft_request(isp, rq, (sns_gid_ft_req_t *)&scp[CTXOFF]); MEMORYBARRIER(isp, SYNC_SFORDEV, 0, SNS_GID_FT_REQ_SIZE, chan); MBSINIT(&mbs, MBOX_SEND_SNS, MBLOGALL, 10000000); mbs.param[0] = MBOX_SEND_SNS; mbs.param[1] = SNS_GID_FT_REQ_SIZE >> 1; - mbs.param[2] = DMA_WD1(fcp->isp_scdma); - mbs.param[3] = DMA_WD0(fcp->isp_scdma); - mbs.param[6] = DMA_WD3(fcp->isp_scdma); - mbs.param[7] = DMA_WD2(fcp->isp_scdma); + mbs.param[2] = DMA_WD1(fcp->isp_scdma + CTXOFF); + mbs.param[3] = DMA_WD0(fcp->isp_scdma + CTXOFF); + mbs.param[6] = DMA_WD3(fcp->isp_scdma + CTXOFF); + mbs.param[7] = DMA_WD2(fcp->isp_scdma + CTXOFF); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { if (mbs.param[0] == MBOX_INVALID_COMMAND) { @@ -3337,9 +3338,9 @@ isp_gid_ft_ct_passthru(ispsoftc_t *isp, chan, pt->ctp_status); return (-1); } - MEMORYBARRIER(isp, SYNC_SFORCPU, IGPOFF, GIDLEN + 16, chan); + MEMORYBARRIER(isp, SYNC_SFORCPU, IGPOFF, GIDLEN, chan); if (isp->isp_dblev & ISP_LOGDEBUG1) { - isp_print_bytes(isp, "CT response", GIDLEN+16, &scp[IGPOFF]); + isp_print_bytes(isp, "CT response", GIDLEN, &scp[IGPOFF]); } return (0); } From owner-svn-src-all@freebsd.org Mon Nov 30 21:41:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2978CA3D611; Mon, 30 Nov 2015 21:41:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAF2D1B41; Mon, 30 Nov 2015 21:41:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULfvjZ073529; Mon, 30 Nov 2015 21:41:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULfvM8073528; Mon, 30 Nov 2015 21:41:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302141.tAULfvM8073528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291516 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:41:58 -0000 Author: mav Date: Mon Nov 30 21:41:56 2015 New Revision: 291516 URL: https://svnweb.freebsd.org/changeset/base/291516 Log: MFC r291099: Some cosmetics for ancient cards. Modified: stable/10/sys/dev/isp/isp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:41:06 2015 (r291515) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:41:56 2015 (r291516) @@ -2508,7 +2508,7 @@ isp_port_login(ispsoftc_t *isp, uint16_t switch (mbs.param[0]) { case MBOX_PORT_ID_USED: - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOG_WARN1, "isp_port_login: portid 0x%06x already logged in as %u", portid, mbs.param[1]); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOG_WARN1, "isp_port_login: portid 0x%06x already logged in as 0x%x", portid, mbs.param[1]); return (MBOX_PORT_ID_USED | (mbs.param[1] << 16)); case MBOX_LOOP_ID_USED: @@ -5697,8 +5697,12 @@ isp_parse_async_fc(ispsoftc_t *isp, uint { int echan, nphdl, nlstate, reason; - nphdl = ISP_READ(isp, OUTMAILBOX1); - nlstate = ISP_READ(isp, OUTMAILBOX2); + if (IS_23XX(isp) || IS_24XX(isp)) { + nphdl = ISP_READ(isp, OUTMAILBOX1); + nlstate = ISP_READ(isp, OUTMAILBOX2); + } else { + nphdl = nlstate = 0xffff; + } if (IS_24XX(isp)) reason = ISP_READ(isp, OUTMAILBOX3) >> 8; else From owner-svn-src-all@freebsd.org Mon Nov 30 21:42:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E1ACA3D675; Mon, 30 Nov 2015 21:42:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A64E1D09; Mon, 30 Nov 2015 21:42:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULgacG073612; Mon, 30 Nov 2015 21:42:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULgaVL073607; Mon, 30 Nov 2015 21:42:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302142.tAULgaVL073607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291517 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:42:37 -0000 Author: mav Date: Mon Nov 30 21:42:35 2015 New Revision: 291517 URL: https://svnweb.freebsd.org/changeset/base/291517 Log: MFC r291144: Fix target mode with fabric for pre-24xx chips. For those chips we are not receiving login events, adding initiators based on ATIO requests. But there is no port ID in that structure, so in fabric mode we have to explicitly fetch it from firmware to be able to do normal scan after that. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:41:56 2015 (r291516) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:42:35 2015 (r291517) @@ -2320,7 +2320,8 @@ isp_mark_portdb(ispsoftc_t *isp, int cha lp = &fcp->portdb[i]; if (lp->state == FC_PORTDB_STATE_NIL) continue; - if ((lp->portid & 0xfffc00) == 0xfffc00) + if (lp->portid >= DOMAIN_CONTROLLER_BASE && + lp->portid <= DOMAIN_CONTROLLER_END) continue; fcp->portdb[i].probational = 1; } @@ -2787,9 +2788,6 @@ isp_fclink_test(ispsoftc_t *isp, int cha fcp = FCPARAM(isp, chan); - /* Mark port database entries probational for following scan. */ - isp_mark_portdb(isp, chan); - if (fcp->isp_loopstate >= LOOP_LTEST_DONE) return (0); @@ -3079,6 +3077,48 @@ isp_pdb_add_update(ispsoftc_t *isp, int } /* + * Fix port IDs for logged-in initiators on pre-2400 chips. + * For those chips we are not receiving login events, adding initiators + * based on ATIO requests, but there is no port ID in that structure. + */ +static void +isp_fix_portids(ispsoftc_t *isp, int chan) +{ + fcparam *fcp = FCPARAM(isp, chan); + isp_pdb_t pdb; + uint64_t wwpn; + int i, r; + + for (i = 0; i < MAX_FC_TARG; i++) { + fcportdb_t *lp = &fcp->portdb[i]; + + if (lp->state == FC_PORTDB_STATE_NIL || + lp->state == FC_PORTDB_STATE_ZOMBIE) + continue; + if (VALID_PORT(lp->portid)) + continue; + + r = isp_getpdb(isp, chan, lp->handle, &pdb, 1); + if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) + return; + if (r != 0) { + isp_prt(isp, ISP_LOGDEBUG1, + "Chan %d FC Scan Loop handle %d returned %x", + chan, lp->handle, r); + continue; + } + + MAKE_WWN_FROM_NODE_NAME(wwpn, pdb.portname); + if (lp->port_wwn != wwpn) + continue; + lp->portid = lp->new_portid = pdb.portid; + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Port 0x%06x@0x%04x is fixed", + chan, pdb.portid, pdb.handle); + } +} + +/* * Scan local loop for devices. */ static int @@ -3097,13 +3137,18 @@ isp_scan_loop(ispsoftc_t *isp, int chan) return (0); } isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC loop scan", chan); + fcp->isp_loopstate = LOOP_SCANNING_LOOP; if (TOPO_IS_FABRIC(fcp->isp_topo)) { + if (!IS_24XX(isp)) { + isp_fix_portids(isp, chan); + if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) + goto abort; + } isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC loop scan done (no loop)", chan); fcp->isp_loopstate = LOOP_LSCAN_DONE; return (0); } - fcp->isp_loopstate = LOOP_SCANNING_LOOP; lim = LOCAL_LOOP_LIM; r = isp_gethandles(isp, chan, handles, &lim, 1, 1); @@ -3121,6 +3166,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan) /* * Run through the list and get the port database info for each one. */ + isp_mark_portdb(isp, chan); for (idx = 0; idx < lim; idx++) { handle = handles[idx]; @@ -3162,8 +3208,6 @@ abort: isp_prt(isp, ISP_LOGDEBUG1, "Chan %d FC Scan Loop handle %d returned %x", chan, handle, r); - if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) - goto abort; continue; } @@ -3363,13 +3407,13 @@ isp_scan_fabric(ispsoftc_t *isp, int cha return (0); } isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC fabric scan", chan); + fcp->isp_loopstate = LOOP_SCANNING_FABRIC; if (!TOPO_IS_FABRIC(fcp->isp_topo)) { fcp->isp_loopstate = LOOP_FSCAN_DONE; isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC fabric scan done (no fabric)", chan); return (0); } - fcp->isp_loopstate = LOOP_SCANNING_FABRIC; if (FC_SCRATCH_ACQUIRE(isp, chan)) { isp_prt(isp, ISP_LOGERR, sacq); @@ -3493,7 +3537,7 @@ abort: * than one entry that has the same PortID or the same * WWNN/WWPN duple, we enter the device into our database. */ - + isp_mark_portdb(isp, chan); for (portidx = 0; portidx < portlim; portidx++) { portid = ((rs1->snscb_ports[portidx].portid[0]) << 16) | ((rs1->snscb_ports[portidx].portid[1]) << 8) | @@ -3502,13 +3546,13 @@ abort: "Chan %d Checking fabric port 0x%06x", chan, portid); if (portid == 0) { isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d Skipping null PortID at idx %d", + "Chan %d Port at idx %d is zero", chan, portidx); continue; } if (portid == fcp->isp_portid) { isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d Skipping our PortID 0x%06x", chan, portid); + "Chan %d Port 0x%06x is our", chan, portid); continue; } @@ -3555,8 +3599,11 @@ abort: } relogin: - if ((fcp->role & ISP_ROLE_INITIATOR) == 0) + if ((fcp->role & ISP_ROLE_INITIATOR) == 0) { + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d Port 0x%06x is not logged in", chan, portid); continue; + } if (isp_login_device(isp, chan, portid, &pdb, &FCPARAM(isp, 0)->isp_lasthdl)) { @@ -5850,11 +5897,14 @@ isp_handle_other_response(ispsoftc_t *is if (fcp->role == ISP_ROLE_NONE) continue; c = (chan == 0) ? 127 : (chan - 1); - if (rid.ridacq_map[c / 16] & (1 << (c % 16))) + if (rid.ridacq_map[c / 16] & (1 << (c % 16))) { + fcp->isp_loopstate = LOOP_NIL; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_OTHER); + } } } else { + FCPARAM(isp, rid.ridacq_vp_index)->isp_loopstate = LOOP_NIL; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, rid.ridacq_vp_index, ISPASYNC_CHANGE_OTHER); } Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:41:56 2015 (r291516) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:42:35 2015 (r291517) @@ -2342,7 +2342,7 @@ isp_handle_platform_atio(ispsoftc_t *isp atp->bytes_xfered = 0; atp->lun = aep->at_lun; atp->nphdl = aep->at_iid; - atp->portid = PORT_NONE; + atp->portid = PORT_ANY; atp->oxid = 0; atp->cdb0 = atiop->cdb_io.cdb_bytes[0]; atp->tattr = aep->at_tag_type; Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:41:56 2015 (r291516) +++ stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:42:35 2015 (r291517) @@ -2580,12 +2580,12 @@ isp_add_wwn_entry(ispsoftc_t *isp, int c * so log them verbosely and dump the whole port database. */ if ((VALID_INI(wwpn) && isp_find_pdb_by_wwpn(isp, chan, wwpn, &lp)) || - (s_id != PORT_NONE && isp_find_pdb_by_portid(isp, chan, s_id, &lp))) { + (VALID_PORT(s_id) && isp_find_pdb_by_portid(isp, chan, s_id, &lp))) { change = 0; lp->new_portid = lp->portid; lp->new_prli_word3 = lp->prli_word3; - if (s_id != PORT_NONE && lp->portid != s_id) { - if (lp->portid == PORT_NONE) { + if (VALID_PORT(s_id) && lp->portid != s_id) { + if (!VALID_PORT(lp->portid)) { isp_prt(isp, ISP_LOGTINFO, "Chan %d WWPN 0x%016llx handle 0x%x " "gets PortID 0x%06x", @@ -2804,13 +2804,13 @@ isp_del_wwn_entries(ispsoftc_t *isp, isp return; } } - if (mp->nt_wwn != INI_ANY) { + if (VALID_INI(mp->nt_wwn)) { if (isp_find_pdb_by_wwpn(isp, mp->nt_channel, mp->nt_wwn, &lp)) { isp_del_wwn_entry(isp, mp->nt_channel, lp->port_wwn, lp->handle, lp->portid); return; } } - if (mp->nt_sid != PORT_ANY && mp->nt_sid != PORT_NONE) { + if (VALID_PORT(mp->nt_sid)) { if (isp_find_pdb_by_portid(isp, mp->nt_channel, mp->nt_sid, &lp)) { isp_del_wwn_entry(isp, mp->nt_channel, lp->port_wwn, lp->handle, lp->portid); return; Modified: stable/10/sys/dev/isp/ispvar.h ============================================================================== --- stable/10/sys/dev/isp/ispvar.h Mon Nov 30 21:41:56 2015 (r291516) +++ stable/10/sys/dev/isp/ispvar.h Mon Nov 30 21:42:35 2015 (r291517) @@ -282,6 +282,7 @@ typedef struct { #define FABRIC_PORT_ID 0xFFFFFE #define PORT_ANY 0xFFFFFF #define PORT_NONE 0 +#define VALID_PORT(port) (port != PORT_NONE && port != PORT_ANY) #define DOMAIN_CONTROLLER_BASE 0xFFFC00 #define DOMAIN_CONTROLLER_END 0xFFFCFF From owner-svn-src-all@freebsd.org Mon Nov 30 21:43:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63AA6A3D6CA; Mon, 30 Nov 2015 21:43:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D0001E6D; Mon, 30 Nov 2015 21:43:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULhKbC073691; Mon, 30 Nov 2015 21:43:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULhKU4073690; Mon, 30 Nov 2015 21:43:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302143.tAULhKU4073690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:43:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291518 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:43:21 -0000 Author: mav Date: Mon Nov 30 21:43:20 2015 New Revision: 291518 URL: https://svnweb.freebsd.org/changeset/base/291518 Log: MFC r291147: Increase maximal value of vports tunable to 254. I am not sure this value is really viable yet, but that is what chips officially support in NPIV mode (in loop mode maximum is 125). Modified: stable/10/sys/dev/isp/isp_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_pci.c ============================================================================== --- stable/10/sys/dev/isp/isp_pci.c Mon Nov 30 21:42:35 2015 (r291517) +++ stable/10/sys/dev/isp/isp_pci.c Mon Nov 30 21:43:20 2015 (r291518) @@ -486,7 +486,7 @@ isp_get_generic_options(device_t dev, is } tval = -1; (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "vports", &tval); - if (tval > 0 && tval < 127) { + if (tval > 0 && tval <= 254) { isp_nvports = tval; } tval = 7; From owner-svn-src-all@freebsd.org Mon Nov 30 21:44:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EAABA3D70E; Mon, 30 Nov 2015 21:44:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E49171FE5; Mon, 30 Nov 2015 21:44:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULi4n4073788; Mon, 30 Nov 2015 21:44:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULi3s5073786; Mon, 30 Nov 2015 21:44:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302144.tAULi3s5073786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:44:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291519 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:44:05 -0000 Author: mav Date: Mon Nov 30 21:44:03 2015 New Revision: 291519 URL: https://svnweb.freebsd.org/changeset/base/291519 Log: MFC r291159: Add more mailbox command codes. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/ispmbox.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:43:20 2015 (r291518) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:44:03 2015 (r291519) @@ -6900,7 +6900,7 @@ static const uint32_t mbpfc[] = { */ static const char *fc_mbcmd_names[] = { - "NO-OP", + "NO-OP", /* 00h */ "LOAD RAM", "EXEC FIRMWARE", "DUMP RAM", @@ -6912,11 +6912,11 @@ static const char *fc_mbcmd_names[] = { "LOAD RAM (2100)", "DUMP RAM", "LOAD RISC RAM", - NULL, + "DUMP RISC RAM", "WRITE RAM WORD EXTENDED", "CHECK FIRMWARE", "READ RAM WORD EXTENDED", - "INIT REQUEST QUEUE", + "INIT REQUEST QUEUE", /* 10h */ "INIT RESULT QUEUE", "EXECUTE IOCB", "WAKE UP", @@ -6932,9 +6932,9 @@ static const char *fc_mbcmd_names[] = { "GET DEV QUEUE STATUS", NULL, "GET FIRMWARE STATUS", - "GET LOOP ID", + "GET LOOP ID", /* 20h */ NULL, - "GET RETRY COUNT", + "GET TIMEOUT PARAMS", NULL, NULL, NULL, @@ -6942,15 +6942,15 @@ static const char *fc_mbcmd_names[] = { NULL, "GET FIRMWARE OPTIONS", "GET PORT QUEUE PARAMS", + "GENERATE SYSTEM ERROR", NULL, NULL, NULL, NULL, NULL, - NULL, - NULL, - NULL, - "SET RETRY COUNT", + "WRITE SFP", /* 30h */ + "READ SFP", + "SET TIMEOUT PARAMS", NULL, NULL, NULL, @@ -6959,17 +6959,17 @@ static const char *fc_mbcmd_names[] = { "SET FIRMWARE OPTIONS", "SET PORT QUEUE PARAMS", NULL, + "SET FC LED CONF", NULL, + "RESTART NIC FIRMWARE", + "ACCESS CONTROL", NULL, - NULL, - NULL, - NULL, - "LOOP PORT BYPASS", + "LOOP PORT BYPASS", /* 40h */ "LOOP PORT ENABLE", "GET RESOURCE COUNT", "REQUEST NON PARTICIPATING MODE", - NULL, - NULL, + "DIAGNOSTIC ECHO TEST", + "DIAGNOSTIC LOOPBACK", NULL, "GET PORT DATABASE ENHANCED", "INIT FIRMWARE MULTI ID", @@ -6980,24 +6980,24 @@ static const char *fc_mbcmd_names[] = { NULL, NULL, NULL, + "GET FCF LIST", /* 50h */ + "GET DCBX PARAMETERS", NULL, - NULL, - NULL, - NULL, + "HOST MEMORY COPY", "EXECUTE IOCB A64", NULL, NULL, + "SEND RNID", NULL, - NULL, - NULL, - NULL, + "SET PARAMETERS", + "GET PARAMETERS", "DRIVER HEARTBEAT", - NULL, + "FIRMWARE HEARTBEAT", "GET/SET DATA RATE", + "SEND RNFT", NULL, - NULL, - "INIT FIRMWARE", - NULL, + "INIT FIRMWARE", /* 60h */ + "GET INIT CONTROL BLOCK", "INIT LIP", "GET FC-AL POSITION MAP", "GET PORT DATABASE", @@ -7009,10 +7009,10 @@ static const char *fc_mbcmd_names[] = { "GET PORT NAME", "GET LINK STATUS", "INIT LIP RESET", - NULL, + "GET LINK STATS & PRIVATE DATA CNTS", "SEND SNS", "FABRIC LOGIN", - "SEND CHANGE REQUEST", + "SEND CHANGE REQUEST", /* 70h */ "FABRIC LOGOUT", "INIT LIP LOGIN", NULL, @@ -7022,11 +7022,11 @@ static const char *fc_mbcmd_names[] = { "INITIALIZE IP MAILBOX", NULL, NULL, + "GET XGMAC STATS", NULL, - NULL, - "Get ID List", + "GET ID LIST", "SEND LFA", - "Lun RESET" + "LUN RESET" }; static void Modified: stable/10/sys/dev/isp/ispmbox.h ============================================================================== --- stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:43:20 2015 (r291518) +++ stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:44:03 2015 (r291519) @@ -48,7 +48,7 @@ #define MBOX_LOAD_RISC_RAM_2100 0x0009 /* a */ #define MBOX_LOAD_RISC_RAM 0x000b - /* c */ +#define MBOX_DUMP_RISC_RAM 0x000c #define MBOX_WRITE_RAM_WORD_EXTENDED 0x000d #define MBOX_CHECK_FIRMWARE 0x000e #define MBOX_READ_RAM_WORD_EXTENDED 0x000f @@ -122,22 +122,60 @@ #define MBOX_GET_TARGET_STATUS 0x0056 /* These are for the ISP2X00 FC cards */ +#define MBOX_WRITE_FC_SERDES_REG 0x0003 /* FC only */ +#define MBOX_READ_FC_SERDES_REG 0x0004 /* FC only */ +#define MBOX_GET_IO_STATUS 0x0012 +#define MBOX_SET_TRANSMIT_PARAMS 0x0019 +#define MBOX_SET_PORT_PARAMS 0x001a +#define MBOX_LOAD_OP_FW_PARAMS 0x001b +#define MBOX_INIT_MULTIPLE_QUEUE 0x001f #define MBOX_GET_LOOP_ID 0x0020 /* for 24XX cards, outgoing mailbox 7 has these values for F or FL topologies */ #define ISP24XX_INORDER 0x0100 #define ISP24XX_NPIV_SAN 0x0400 #define ISP24XX_VSAN_SAN 0x1000 #define ISP24XX_FC_SP_SAN 0x2000 - +#define MBOX_GET_TIMEOUT_PARAMS 0x0022 #define MBOX_GET_FIRMWARE_OPTIONS 0x0028 +#define MBOX_GENERATE_SYSTEM_ERROR 0x002a +#define MBOX_WRITE_SFP 0x0030 +#define MBOX_READ_SFP 0x0031 +#define MBOX_SET_TIMEOUT_PARAMS 0x0032 #define MBOX_SET_FIRMWARE_OPTIONS 0x0038 +#define MBOX_GET_SET_FC_LED_CONF 0x003b +#define MBOX_RESTART_NIC_FIRMWARE 0x003d /* FCoE only */ +#define MBOX_ACCESS_CONTROL 0x003e +#define MBOX_LOOP_PORT_BYPASS 0x0040 /* FC only */ +#define MBOX_LOOP_PORT_ENABLE 0x0041 /* FC only */ #define MBOX_GET_RESOURCE_COUNT 0x0042 #define MBOX_REQUEST_OFFLINE_MODE 0x0043 +#define MBOX_DIAGNOSTIC_ECHO_TEST 0x0044 +#define MBOX_DIAGNOSTIC_LOOPBACK 0x0045 #define MBOX_ENHANCED_GET_PDB 0x0047 #define MBOX_INIT_FIRMWARE_MULTI_ID 0x0048 /* 2400 only */ #define MBOX_GET_VP_DATABASE 0x0049 /* 2400 only */ #define MBOX_GET_VP_DATABASE_ENTRY 0x004a /* 2400 only */ +#define MBOX_GET_FCF_LIST 0x0050 /* FCoE only */ +#define MBOX_GET_DCBX_PARAMETERS 0x0051 /* FCoE only */ +#define MBOX_HOST_MEMORY_COPY 0x0053 #define MBOX_EXEC_COMMAND_IOCB_A64 0x0054 +#define MBOX_SEND_RNID 0x0057 +#define MBOX_SET_PARAMETERS 0x0059 +#define MBOX_GET_PARAMETERS 0x005a +#define MBOX_DRIVER_HEARTBEAT 0x005B /* FC only */ +#define MBOX_FW_HEARTBEAT 0x005C +#define MBOX_GET_SET_DATA_RATE 0x005D /* >=23XX only */ +#define MBGSD_GET_RATE 0 +#define MBGSD_SET_RATE 1 +#define MBGSD_SET_RATE_NOW 2 /* 24XX only */ +#define MBGSD_1GB 0x00 +#define MBGSD_2GB 0x01 +#define MBGSD_AUTO 0x02 +#define MBGSD_4GB 0x03 /* 24XX only */ +#define MBGSD_8GB 0x04 /* 25XX only */ +#define MBGSD_16GB 0x05 /* 26XX only */ +#define MBGSD_10GB 0x13 /* 26XX only */ +#define MBOX_SEND_RNFT 0x005e #define MBOX_INIT_FIRMWARE 0x0060 #define MBOX_GET_INIT_CONTROL_BLOCK 0x0061 #define MBOX_INIT_LIP 0x0062 @@ -151,30 +189,19 @@ #define MBOX_GET_PORT_NAME 0x006A #define MBOX_GET_LINK_STATUS 0x006B #define MBOX_INIT_LIP_RESET 0x006C +#define MBOX_GET_LINK_STAT_PR_DATA_CNT 0x006D #define MBOX_SEND_SNS 0x006E #define MBOX_FABRIC_LOGIN 0x006F #define MBOX_SEND_CHANGE_REQUEST 0x0070 #define MBOX_FABRIC_LOGOUT 0x0071 #define MBOX_INIT_LIP_LOGIN 0x0072 #define MBOX_GET_PORT_NODE_NAME_LIST 0x0075 +#define MBOX_SET_VENDOR_ID 0x0076 +#define MBOX_GET_XGMAC_STATS 0x007a #define MBOX_GET_ID_LIST 0x007C +#define MBOX_SEND_LFA 0x007d #define MBOX_LUN_RESET 0x007E -#define MBOX_DRIVER_HEARTBEAT 0x005B -#define MBOX_FW_HEARTBEAT 0x005C - -#define MBOX_GET_SET_DATA_RATE 0x005D /* 24XX/23XX only */ -#define MBGSD_GET_RATE 0 -#define MBGSD_SET_RATE 1 -#define MBGSD_SET_RATE_NOW 2 /* 24XX only */ -#define MBGSD_1GB 0x00 -#define MBGSD_2GB 0x01 -#define MBGSD_AUTO 0x02 -#define MBGSD_4GB 0x03 /* 24XX only */ -#define MBGSD_8GB 0x04 /* 25XX only */ -#define MBGSD_16GB 0x05 /* 26XX only */ -#define MBGSD_10GB 0x13 /* 26XX only */ - #define ISP2100_SET_PCI_PARAM 0x00ff #define MBOX_BUSY 0x04 From owner-svn-src-all@freebsd.org Mon Nov 30 21:44:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 256D9A3D76B; Mon, 30 Nov 2015 21:44:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDB30115E; Mon, 30 Nov 2015 21:44:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULid0A073861; Mon, 30 Nov 2015 21:44:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULicqu073859; Mon, 30 Nov 2015 21:44:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302144.tAULicqu073859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:44:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291520 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:44:40 -0000 Author: mav Date: Mon Nov 30 21:44:38 2015 New Revision: 291520 URL: https://svnweb.freebsd.org/changeset/base/291520 Log: MFC r291160: Add some more asynchronous event status codes. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/ispmbox.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:44:03 2015 (r291519) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:44:38 2015 (r291520) @@ -5800,7 +5800,10 @@ isp_parse_async_fc(ispsoftc_t *isp, uint ISPASYNC_CHANGE_SNS, portid); break; } - + case ASYNC_ERR_LOGGING_DISABLED: + isp_prt(isp, ISP_LOGWARN, "Error logging disabled (reason 0x%x)", + ISP_READ(isp, OUTMAILBOX1)); + break; case ASYNC_CONNMODE: /* * This only applies to 2100 amd 2200 cards @@ -5843,7 +5846,10 @@ isp_parse_async_fc(ispsoftc_t *isp, uint FCPARAM(isp, chan)->isp_loopstate = LOOP_NIL; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_OTHER); break; - + case ASYNC_P2P_INIT_ERR: + isp_prt(isp, ISP_LOGWARN, "P2P init error (reason 0x%x)", + ISP_READ(isp, OUTMAILBOX1)); + break; case ASYNC_RCV_ERR: if (IS_24XX(isp)) { isp_prt(isp, ISP_LOGWARN, "Receive Error"); @@ -5855,11 +5861,23 @@ isp_parse_async_fc(ispsoftc_t *isp, uint if (IS_24XX(isp)) { isp_prt(isp, ISP_LOGTDEBUG0, "LS_RJT sent"); break; - } else if (IS_2200(isp)) { + } else { isp_prt(isp, ISP_LOGTDEBUG0, "QFULL sent"); break; } - /* FALLTHROUGH */ + case ASYNC_FW_RESTART_COMPLETE: + isp_prt(isp, ISP_LOGDEBUG0, "FW restart complete"); + break; + case ASYNC_TEMPERATURE_ALERT: + isp_prt(isp, ISP_LOGERR, "Temperature alert (subcode 0x%x)", + ISP_READ(isp, OUTMAILBOX1)); + break; + case ASYNC_AUTOLOAD_FW_COMPLETE: + isp_prt(isp, ISP_LOGDEBUG0, "Autoload FW init complete"); + break; + case ASYNC_AUTOLOAD_FW_FAILURE: + isp_prt(isp, ISP_LOGERR, "Autoload FW init failure"); + break; default: isp_prt(isp, ISP_LOGWARN, "Unknown Async Code 0x%x", mbox); break; Modified: stable/10/sys/dev/isp/ispmbox.h ============================================================================== --- stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:44:03 2015 (r291519) +++ stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:44:38 2015 (r291520) @@ -246,14 +246,15 @@ #define ASYNC_HUNG_SCSI 0x800C #define ASYNC_KILLED_BUS 0x800D #define ASYNC_BUS_TRANSIT 0x800E /* LVD -> HVD, eg. */ -#define ASYNC_LIP_OCCURRED 0x8010 +#define ASYNC_LIP_OCCURRED 0x8010 /* FC only */ #define ASYNC_LOOP_UP 0x8011 #define ASYNC_LOOP_DOWN 0x8012 -#define ASYNC_LOOP_RESET 0x8013 +#define ASYNC_LOOP_RESET 0x8013 /* FC only */ #define ASYNC_PDB_CHANGED 0x8014 #define ASYNC_CHANGE_NOTIFY 0x8015 -#define ASYNC_LIP_F8 0x8016 -#define ASYNC_LIP_ERROR 0x8017 +#define ASYNC_LIP_F8 0x8016 /* FC only */ +#define ASYNC_LIP_ERROR 0x8017 /* FC only */ +#define ASYNC_AUTO_PLOGI_RJT 0x8018 #define ASYNC_SECURITY_UPDATE 0x801B #define ASYNC_CMD_CMPLT 0x8020 #define ASYNC_CTIO_DONE 0x8021 @@ -265,7 +266,8 @@ #define ASYNC_IP_RCVQ_LOW 0x8025 #define ASYNC_IP_RCVQ_EMPTY 0x8026 #define ASYNC_IP_RECV_DONE_ALIGNED 0x8027 -#define ASYNC_PTPMODE 0x8030 +#define ASYNC_ERR_LOGGING_DISABLED 0x8029 +#define ASYNC_PTPMODE 0x8030 /* FC only */ #define ASYNC_RIO16_1 0x8031 #define ASYNC_RIO16_2 0x8032 #define ASYNC_RIO16_3 0x8033 @@ -277,9 +279,25 @@ #define ISP_CONN_BADLIP 3 #define ISP_CONN_FATAL 4 #define ISP_CONN_LOOPBACK 5 +#define ASYNC_P2P_INIT_ERR 0x8037 #define ASYNC_RIOZIO_STALL 0x8040 /* there's a RIO/ZIO entry that hasn't been serviced */ #define ASYNC_RIO32_2_2200 0x8042 /* same as ASYNC_RIO32_2, but for 2100/2200 */ #define ASYNC_RCV_ERR 0x8048 +/* + * 2.01.31 2200 Only. Need Bit 13 in Mailbox 1 for Set Firmware Options + * mailbox command to enable this. + */ +#define ASYNC_QFULL_SENT 0x8049 +#define ASYNC_RJT_SENT 0x8049 /* 24XX only */ +#define ASYNC_SEL_CLASS2_P_RJT_SENT 0x804f +#define ASYNC_FW_RESTART_COMPLETE 0x8060 +#define ASYNC_TEMPERATURE_ALERT 0x8070 +#define ASYNC_INTER_DRIVER_COMP 0x8100 /* FCoE only */ +#define ASYNC_INTER_DRIVER_NOTIFY 0x8101 /* FCoE only */ +#define ASYNC_INTER_DRIVER_TIME_EXT 0x8102 /* FCoE only */ +#define ASYNC_NIC_FW_STATE_CHANGE 0x8200 /* FCoE only */ +#define ASYNC_AUTOLOAD_FW_COMPLETE 0x8400 +#define ASYNC_AUTOLOAD_FW_FAILURE 0x8401 /* * Firmware Options. There are a lot of them. @@ -303,20 +321,6 @@ #define IFCOPT3_NOPRLI (1 << 4) /* disable automatic sending of PRLI on local loops */ #define IFCOPT3_RNDASYNC (1 << 1) -/* - * 2.01.31 2200 Only. Need Bit 13 in Mailbox 1 for Set Firmware Options - * mailbox command to enable this. - */ -#define ASYNC_QFULL_SENT 0x8049 - -/* - * Needs to be enabled - */ -#define ASYNC_AUTO_PLOGI_RJT 0x8018 -/* - * 24XX only - */ -#define ASYNC_RJT_SENT 0x8049 /* * All IOCB Queue entries are this size From owner-svn-src-all@freebsd.org Mon Nov 30 21:45:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15074A3D80D; Mon, 30 Nov 2015 21:45:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD76E147E; Mon, 30 Nov 2015 21:45:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULjOnY073945; Mon, 30 Nov 2015 21:45:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULjO7F073944; Mon, 30 Nov 2015 21:45:24 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302145.tAULjO7F073944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291521 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:45:26 -0000 Author: mav Date: Mon Nov 30 21:45:24 2015 New Revision: 291521 URL: https://svnweb.freebsd.org/changeset/base/291521 Log: MFC r291161: Gracefully stop firmware before resetting chip when changing role. Modified: stable/10/sys/dev/isp/isp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:44:38 2015 (r291520) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:45:24 2015 (r291521) @@ -1338,11 +1338,32 @@ isp_reset(ispsoftc_t *isp, int do_load_d } /* + * Clean firmware shutdown. + */ +static int +isp_deinit(ispsoftc_t *isp) +{ + mbreg_t mbs; + + isp->isp_state = ISP_NILSTATE; + MBSINIT(&mbs, MBOX_STOP_FIRMWARE, MBLOGALL, 500000); + mbs.param[1] = 0; + mbs.param[2] = 0; + mbs.param[3] = 0; + mbs.param[4] = 0; + mbs.param[5] = 0; + mbs.param[6] = 0; + mbs.param[7] = 0; + mbs.param[8] = 0; + isp_mboxcmd(isp, &mbs); + return (mbs.param[0] == MBOX_COMMAND_COMPLETE ? 0 : mbs.param[0]); +} + +/* * Initialize Parameters of Hardware to a known state. * * Locks are held before coming here. */ - void isp_init(ispsoftc_t *isp) { @@ -6799,7 +6820,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x2f, 0x21), /* 0x11: MBOX_INIT_RES_QUEUE */ ISP_FC_OPMAP(0x0f, 0x01), /* 0x12: MBOX_EXECUTE_IOCB */ ISP_FC_OPMAP(0x03, 0x03), /* 0x13: MBOX_WAKE_UP */ - ISP_FC_OPMAP(0x01, 0xff), /* 0x14: MBOX_STOP_FIRMWARE */ + ISP_FC_OPMAP_HALF(0x1, 0xff, 0x0, 0x03), /* 0x14: MBOX_STOP_FIRMWARE */ ISP_FC_OPMAP(0x4f, 0x01), /* 0x15: MBOX_ABORT */ ISP_FC_OPMAP(0x07, 0x01), /* 0x16: MBOX_ABORT_DEVICE */ ISP_FC_OPMAP(0x07, 0x01), /* 0x17: MBOX_ABORT_TARGET */ @@ -7621,6 +7642,8 @@ isp_reinit(ispsoftc_t *isp, int do_load_ { int i, res = 0; + if (isp->isp_state == ISP_RUNSTATE) + isp_deinit(isp); if (isp->isp_state != ISP_RESETSTATE) isp_reset(isp, do_load_defaults); if (isp->isp_state != ISP_RESETSTATE) { From owner-svn-src-all@freebsd.org Mon Nov 30 21:46:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D5F6A3D882; Mon, 30 Nov 2015 21:46:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 146BB1642; Mon, 30 Nov 2015 21:46:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULkMLi074032; Mon, 30 Nov 2015 21:46:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULkMOU074031; Mon, 30 Nov 2015 21:46:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302146.tAULkMOU074031@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291522 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:46:23 -0000 Author: mav Date: Mon Nov 30 21:46:21 2015 New Revision: 291522 URL: https://svnweb.freebsd.org/changeset/base/291522 Log: MFC r291162: Generate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx. This makes port scanner fix absent port ID for added initiator. Modified: stable/10/sys/dev/isp/isp_freebsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:45:24 2015 (r291521) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:46:21 2015 (r291522) @@ -2354,6 +2354,7 @@ isp_handle_platform_atio(ispsoftc_t *isp static void isp_handle_platform_atio2(ispsoftc_t *isp, at2_entry_t *aep) { + fcparam *fcp; lun_id_t lun; fcportdb_t *lp; tstate_t *tptr; @@ -2374,6 +2375,7 @@ isp_handle_platform_atio2(ispsoftc_t *is return; } + fcp = FCPARAM(isp, 0); if (ISP_CAP_SCCFW(isp)) { lun = aep->at_scclun; #if __FreeBSD_version < 1000700 @@ -2444,7 +2446,7 @@ isp_handle_platform_atio2(ispsoftc_t *is SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); tptr->atio_count--; isp_prt(isp, ISP_LOGTDEBUG2, "Take FREE ATIO count now %d", tptr->atio_count); - atiop->ccb_h.target_id = FCPARAM(isp, 0)->isp_loopid; + atiop->ccb_h.target_id = fcp->isp_loopid; atiop->ccb_h.target_lun = lun; /* @@ -2467,6 +2469,10 @@ isp_handle_platform_atio2(ispsoftc_t *is (((uint64_t) aep->at_wwpn[3]) << 0); isp_add_wwn_entry(isp, 0, wwpn, INI_NONE, nphdl, PORT_ANY, 0); + if (fcp->isp_loopstate > LOOP_LTEST_DONE) + fcp->isp_loopstate = LOOP_LTEST_DONE; + isp_async(isp, ISPASYNC_CHANGE_NOTIFY, 0, + ISPASYNC_CHANGE_PDB, nphdl, 0x06, 0xff); isp_find_pdb_by_handle(isp, 0, nphdl, &lp); } atiop->init_id = FC_PORTDB_TGT(isp, 0, lp); From owner-svn-src-all@freebsd.org Mon Nov 30 21:47:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70A85A3D8D0; Mon, 30 Nov 2015 21:47:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E45D18C9; Mon, 30 Nov 2015 21:47:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULlBjj074115; Mon, 30 Nov 2015 21:47:11 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULlBVg074114; Mon, 30 Nov 2015 21:47:11 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302147.tAULlBVg074114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291523 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:47:12 -0000 Author: mav Date: Mon Nov 30 21:47:11 2015 New Revision: 291523 URL: https://svnweb.freebsd.org/changeset/base/291523 Log: MFC r291163: Explicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode. While later firmware always registers for RSCN requests, older one does it only in initiator mode. But in target mode there RSCN can be the only way to detect gone intiator. Modified: stable/10/sys/dev/isp/isp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:46:21 2015 (r291522) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:47:11 2015 (r291523) @@ -122,6 +122,7 @@ static int isp_gid_ft_sns(ispsoftc_t *, static int isp_gid_ft_ct_passthru(ispsoftc_t *, int); static int isp_scan_fabric(ispsoftc_t *, int); static int isp_login_device(ispsoftc_t *, int, uint32_t, isp_pdb_t *, uint16_t *); +static int isp_send_change_request(ispsoftc_t *, int); static int isp_register_fc4_type(ispsoftc_t *, int); static int isp_register_fc4_type_24xx(ispsoftc_t *, int); static int isp_register_fc4_features_24xx(ispsoftc_t *, int); @@ -2904,6 +2905,8 @@ isp_fclink_test(ispsoftc_t *isp, int cha } else { fcp->isp_sns_hdl = SNS_ID; r = isp_register_fc4_type(isp, chan); + if (r == 0 && fcp->role == ISP_ROLE_TARGET) + isp_send_change_request(isp, chan); } if (r) { isp_prt(isp, ISP_LOGWARN|ISP_LOG_SANCFG, "%s: register fc4 type failed", __func__); @@ -3733,6 +3736,18 @@ isp_login_device(ispsoftc_t *isp, int ch } static int +isp_send_change_request(ispsoftc_t *isp, int chan) +{ + mbreg_t mbs; + + MBSINIT(&mbs, MBOX_SEND_CHANGE_REQUEST, MBLOGALL, 500000); + mbs.param[1] = 0x03; + mbs.param[9] = chan; + isp_mboxcmd(isp, &mbs); + return (mbs.param[0] == MBOX_COMMAND_COMPLETE ? 0 : -1); +} + +static int isp_register_fc4_type(ispsoftc_t *isp, int chan) { fcparam *fcp = FCPARAM(isp, chan); @@ -5815,8 +5830,8 @@ isp_parse_async_fc(ispsoftc_t *isp, uint fcp = FCPARAM(isp, chan); if (fcp->role == ISP_ROLE_NONE) break; - if (fcp->isp_loopstate > LOOP_LSCAN_DONE) - fcp->isp_loopstate = LOOP_LSCAN_DONE; + if (fcp->isp_loopstate > LOOP_LTEST_DONE) + fcp->isp_loopstate = LOOP_LTEST_DONE; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_SNS, portid); break; @@ -6912,7 +6927,7 @@ static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x00, 0x00), /* 0x6d: */ ISP_FC_OPMAP(0xcf, 0x03), /* 0x6e: MBOX_SEND_SNS */ ISP_FC_OPMAP(0x0f, 0x07), /* 0x6f: MBOX_FABRIC_LOGIN */ - ISP_FC_OPMAP(0x03, 0x01), /* 0x70: MBOX_SEND_CHANGE_REQUEST */ + ISP_FC_OPMAP_HALF(0x02, 0x03, 0x00, 0x03), /* 0x70: MBOX_SEND_CHANGE_REQUEST */ ISP_FC_OPMAP(0x03, 0x03), /* 0x71: MBOX_FABRIC_LOGOUT */ ISP_FC_OPMAP(0x0f, 0x0f), /* 0x72: MBOX_INIT_LIP_LOGIN */ ISP_FC_OPMAP(0x00, 0x00), /* 0x73: */ From owner-svn-src-all@freebsd.org Mon Nov 30 21:52:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C48B8A3DAD5; Mon, 30 Nov 2015 21:52:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CAFD1D02; Mon, 30 Nov 2015 21:52:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULqJ4v076920; Mon, 30 Nov 2015 21:52:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULqJOf076919; Mon, 30 Nov 2015 21:52:19 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302152.tAULqJOf076919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291524 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:52:20 -0000 Author: mav Date: Mon Nov 30 21:52:19 2015 New Revision: 291524 URL: https://svnweb.freebsd.org/changeset/base/291524 Log: MFC r275374: Document ISP 2532 support and hint.isp.0.vports tunable. Modified: stable/10/share/man/man4/isp.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/isp.4 ============================================================================== --- stable/10/share/man/man4/isp.4 Mon Nov 30 21:47:11 2015 (r291523) +++ stable/10/share/man/man4/isp.4 Mon Nov 30 21:52:19 2015 (r291524) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 28, 2007 +.Dd December 1, 2014 .Dt ISP 4 .Os .Sh NAME @@ -136,6 +136,8 @@ Dell Branded version of the QLogic 2312 Qlogic 2422 Optical Fibre Channel PCI cards (4 Gigabit) .It Qlogic 2432 Qlogic 2432 Optical Fibre Channel PCIe cards (4 Gigabit) +.It Qlogic 2432 +Qlogic 2532 Optical Fibre Channel PCIe cards (8 Gigabit) .El .Sh CONFIGURATION OPTIONS Target mode support may be enabled with the @@ -197,6 +199,8 @@ A hint to define default role for isp in A hint value for a driver debug level (see the file .Pa /usr/src/sys/dev/isp/ispvar.h for the values. +.It Va hint.isp.0.vports +A hint to create specified number of additional virtual ports. .El .Sh SYSCTL OPTIONS .Bl -tag -width indent From owner-svn-src-all@freebsd.org Mon Nov 30 21:53:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11245A3DB8C; Mon, 30 Nov 2015 21:53:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1DE81EFE; Mon, 30 Nov 2015 21:53:25 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULrONs077010; Mon, 30 Nov 2015 21:53:24 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULrO5K077009; Mon, 30 Nov 2015 21:53:24 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201511302153.tAULrO5K077009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 30 Nov 2015 21:53:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291525 - head/gnu/usr.bin/gdb/kgdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:53:26 -0000 Author: jhb Date: Mon Nov 30 21:53:24 2015 New Revision: 291525 URL: https://svnweb.freebsd.org/changeset/base/291525 Log: Fix a double-semicolon typo in my libkvm changes. Submitted by: jmallett Modified: head/gnu/usr.bin/gdb/kgdb/trgt.c Modified: head/gnu/usr.bin/gdb/kgdb/trgt.c ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/trgt.c Mon Nov 30 21:52:19 2015 (r291524) +++ head/gnu/usr.bin/gdb/kgdb/trgt.c Mon Nov 30 21:53:24 2015 (r291525) @@ -88,7 +88,7 @@ kgdb_resolve_symbol(const char *name, kv return (1); *kva = SYMBOL_VALUE_ADDRESS (ms); - return (0);; + return (0); } static CORE_ADDR From owner-svn-src-all@freebsd.org Mon Nov 30 21:53:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC767A3DBB7; Mon, 30 Nov 2015 21:53:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9353C105F; Mon, 30 Nov 2015 21:53:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULrcu3077061; Mon, 30 Nov 2015 21:53:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULrcZ2077060; Mon, 30 Nov 2015 21:53:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302153.tAULrcZ2077060@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291526 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:53:39 -0000 Author: mav Date: Mon Nov 30 21:53:38 2015 New Revision: 291526 URL: https://svnweb.freebsd.org/changeset/base/291526 Log: MFC r290138, r290139: Some updates to isp(4) manual page. Modified: stable/10/share/man/man4/isp.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/isp.4 ============================================================================== --- stable/10/share/man/man4/isp.4 Mon Nov 30 21:53:24 2015 (r291525) +++ stable/10/share/man/man4/isp.4 Mon Nov 30 21:53:38 2015 (r291526) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 1, 2014 +.Dd October 29, 2015 .Dt ISP 4 .Os .Sh NAME @@ -60,8 +60,7 @@ devices. SCSI features include support for Ultra SCSI and wide mode transactions for .Tn SCSI , -Ultra2 LVD (for the ISP1080 and ISP1280), and Ultra3 LVD (for the -ISP12160). +Ultra2 LVD (ISP1080, ISP1280), and Ultra3 LVD (ISP12160). .Pp Fibre Channel support uses FCP SCSI profile for .Tn FibreChannel , @@ -69,15 +68,13 @@ and utilizes Class 3 and Class 2 connect 3 only, minor patches to the Qlogic 2200 to force Class 2 mode). Support is available for Public and Private loops, and for point-to-point connections (Qlogic 2200 only). -The newer 2-Gigabit cards (2300, 2312, 2322) and 4-Gigabit (2422, 2432) -are also supported. -Command tagging is -supported for all (in fact, +The newer 2-Gigabit cards (2300, 2312, 2322), 4-Gigabit (2422, 2432) +and 8-Gigabit (2532) are also supported. +Command tagging is supported for all (in fact, .Tn FibreChannel requires tagging). Fabric support is enabled by default for other than 2100 cards. -Fabric -support for 2100 cards has been so problematic and these cards are so +Fabric support for 2100 cards has been so problematic and these cards are so old now that it is just not worth your time to try it. .Sh FIRMWARE Firmware is available if the @@ -103,15 +100,16 @@ Qlogic 1020 Fast Wide and Differential F .It ISP1040 Qlogic 1040 Ultra Wide and Differential Ultra Wide PCI cards. Also known as the DEC KZPBA-CA (single ended) and KZPBA-CB (HVD differential). -.It Qlogic 1240 -Qlogic 1240 Dual Bus Ultra Wide and Differential Ultra Wide PCI -cards. .It Qlogic 1020 Qlogic 1020 SCSI cards. .It Qlogic 1040 Qlogic 1040 Ultra SCSI cards. .It Qlogic 1080 -Qlogic 1280 LVD Ultra2 Wide PCI cards. +Qlogic 1080 LVD Ultra2 Wide SCSI cards. +.It Qlogic 10160 +Qlogic 10160 LVD Ultra3 Wide PCI cards. +.It Qlogic 1240 +Qlogic 1240 Dual Bus Ultra Wide and Differential Ultra Wide PCI cards. .It Qlogic 1280 Qlogic 1280 Dual Bus LVD Ultra2 Wide PCI cards. .It Qlogic 12160 @@ -123,21 +121,21 @@ Loop (single, dual). Qlogic 2200 Copper and Optical Fibre Channel Arbitrated Loop PCI cards (single, dual, quad). .It Qlogic 2300 -Qlogic 2300 Optical Fibre Channel PCI cards. +Qlogic 2300 Optical 2Gb Fibre Channel PCI cards. .It Qlogic 2312 -Qlogic 2312 Optical Fibre Channel PCI cards. +Qlogic 2312 Optical 2Gb Fibre Channel PCI cards. .It Qlogic 234X -Qlogic 234X Optical Fibre Channel PCI cards (2312 chipset, single and dual attach). +Qlogic 234X Optical 2Gb Fibre Channel PCI cards (2312 chipset, single and dual attach). .It Qlogic 2322 -Qlogic 2322 Optical Fibre Channel PCIe cards. +Qlogic 2322 Optical 2Gb Fibre Channel PCIe cards. .It Qlogic 200 -Dell Branded version of the QLogic 2312 Fibre Channel PCI cards. +Dell branded version of the QLogic 2312. .It Qlogic 2422 -Qlogic 2422 Optical Fibre Channel PCI cards (4 Gigabit) -.It Qlogic 2432 -Qlogic 2432 Optical Fibre Channel PCIe cards (4 Gigabit) +Qlogic 2422 Optical 4Gb Fibre Channel PCI cards. .It Qlogic 2432 -Qlogic 2532 Optical Fibre Channel PCIe cards (8 Gigabit) +Qlogic 2432 Optical 4Gb Fibre Channel PCIe cards. +.It Qlogic 2532 +Qlogic 2532 Optical 8Gb Fibre Channel PCIe cards. .El .Sh CONFIGURATION OPTIONS Target mode support may be enabled with the @@ -230,13 +228,13 @@ This is the readonly World Wide Port Nam .Sh AUTHORS The .Nm -driver was written by Matthew Jacob originally for NetBSD at -NASA/Ames Research Center. +driver was written by +.An Matthew Jacob +originally for NetBSD at NASA/Ames Research Center. +Some later improvement was done by +.An Alexander Motin Aq Mt mav@FreeBSD.org . .Sh BUGS The driver currently ignores some NVRAM settings. .Pp -Target mode support is not completely reliable yet. -It works reasonably -well for Fibre Channel, somewhat well for Qlogic 1040 cards, but -does not yet work for the other cards (due to last minute unannounced -changes in firmware interfaces). +Target mode support works reasonably well for 23xx and above Fibre Channel +cards, but not really tested on older ones. From owner-svn-src-all@freebsd.org Mon Nov 30 21:54:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7965BA3DC22; Mon, 30 Nov 2015 21:54:29 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 402FF11C9; Mon, 30 Nov 2015 21:54:29 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULsSaU077148; Mon, 30 Nov 2015 21:54:28 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULsSqC077143; Mon, 30 Nov 2015 21:54:28 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201511302154.tAULsSqC077143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 30 Nov 2015 21:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291527 - in head/sys: fs/nfs fs/nfsserver nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:54:29 -0000 Author: rmacklem Date: Mon Nov 30 21:54:27 2015 New Revision: 291527 URL: https://svnweb.freebsd.org/changeset/base/291527 Log: Add kernel support to the NFS server for the "-manage-gids" option that will be added to the nfsuserd daemon in a future commit. It modifies the cache used by NFSv4 for name<-->id translation (both username/uid and group/gid) to support this. When "-manage-gids" is set, the server looks up each uid for the RPC and uses the list of groups cached in the server instead of the list of groups provided in the RPC request. The cached group list is acquired for the cache by the nfsuserd daemon via getgrouplist(3). This avoids the 16 groups limit for the list in the RPC request. Since the cache is now used for every RPC when "-manage-gids" is enabled, the code also modifies the cache to use a separate mutex for each hash list instead of a single global mutex. Suggested by: jpaetzel Tested by: jpaetzel MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs.h head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h head/sys/fs/nfs/nfsrvstate.h head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/nfs/nfssvc.h Modified: head/sys/fs/nfs/nfs.h ============================================================================== --- head/sys/fs/nfs/nfs.h Mon Nov 30 21:53:38 2015 (r291526) +++ head/sys/fs/nfs/nfs.h Mon Nov 30 21:54:27 2015 (r291527) @@ -96,12 +96,6 @@ #define NFSSESSIONHASHSIZE 20 /* Size of server session hash table */ #endif #define NFSSTATEHASHSIZE 10 /* Size of server stateid hash table */ -#ifndef NFSUSERHASHSIZE -#define NFSUSERHASHSIZE 30 /* Size of user id hash table */ -#endif -#ifndef NFSGROUPHASHSIZE -#define NFSGROUPHASHSIZE 5 /* Size of group id hash table */ -#endif #ifndef NFSCLDELEGHIGHWATER #define NFSCLDELEGHIGHWATER 10000 /* limit for client delegations */ #endif @@ -204,6 +198,18 @@ struct nfsd_idargs { int nid_usertimeout;/* User name timeout (minutes) */ u_char *nid_name; /* Name */ int nid_namelen; /* and its length */ + gid_t *nid_grps; /* and the list */ + int nid_ngroup; /* Size of groups list */ +}; + +struct nfsd_oidargs { + int nid_flag; /* Flags (see below) */ + uid_t nid_uid; /* user/group id */ + gid_t nid_gid; + int nid_usermax; /* Upper bound on user name cache */ + int nid_usertimeout;/* User name timeout (minutes) */ + u_char *nid_name; /* Name */ + int nid_namelen; /* and its length */ }; struct nfsd_clid { Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Mon Nov 30 21:53:38 2015 (r291526) +++ head/sys/fs/nfs/nfs_commonport.c Mon Nov 30 21:54:27 2015 (r291527) @@ -63,6 +63,7 @@ int nfs_numnfscbd = 0; int nfscl_debuglevel = 0; char nfsv4_callbackaddr[INET6_ADDRSTRLEN]; struct callout newnfsd_callout; +int nfsrv_lughashsize = 100; void (*nfsd_call_servertimer)(void) = NULL; void (*ncl_call_invalcaches)(struct vnode *) = NULL; @@ -79,6 +80,9 @@ SYSCTL_STRING(_vfs_nfs, OID_AUTO, callba "NFSv4 callback addr for server to use"); SYSCTL_INT(_vfs_nfs, OID_AUTO, debuglevel, CTLFLAG_RW, &nfscl_debuglevel, 0, "Debug level for NFS client"); +TUNABLE_INT("vfs.nfs.userhashsize", &nfsrv_lughashsize); +SYSCTL_INT(_vfs_nfs, OID_AUTO, userhashsize, CTLFLAG_RDTUN, &nfsrv_lughashsize, + 0, "Size of hash tables for uid/name mapping"); /* * Defines for malloc @@ -445,9 +449,25 @@ nfssvc_call(struct thread *p, struct nfs { int error = EINVAL; struct nfsd_idargs nid; + struct nfsd_oidargs onid; if (uap->flag & NFSSVC_IDNAME) { - error = copyin(uap->argp, (caddr_t)&nid, sizeof (nid)); + if ((uap->flag & NFSSVC_NEWSTRUCT) != 0) + error = copyin(uap->argp, &nid, sizeof(nid)); + else { + error = copyin(uap->argp, &onid, sizeof(onid)); + if (error == 0) { + nid.nid_flag = onid.nid_flag; + nid.nid_uid = onid.nid_uid; + nid.nid_gid = onid.nid_gid; + nid.nid_usermax = onid.nid_usermax; + nid.nid_usertimeout = onid.nid_usertimeout; + nid.nid_name = onid.nid_name; + nid.nid_namelen = onid.nid_namelen; + nid.nid_ngroup = 0; + nid.nid_grps = NULL; + } + } if (error) goto out; error = nfssvc_idname(&nid); Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Mon Nov 30 21:53:38 2015 (r291526) +++ head/sys/fs/nfs/nfs_commonsubs.c Mon Nov 30 21:54:27 2015 (r291527) @@ -44,6 +44,8 @@ __FBSDID("$FreeBSD$"); #include +#include + /* * Data items converted to xdr at startup, since they are constant * This is kinda hokey, but may save a little time doing byte swaps @@ -68,6 +70,7 @@ int ncl_mbuf_mlen = MLEN; int nfsd_enable_stringtouid = 0; NFSNAMEIDMUTEX; NFSSOCKMUTEX; +extern int nfsrv_lughashsize; /* * This array of structures indicates, for V4: @@ -154,11 +157,14 @@ static int nfsrv_usercnt = 0; static int nfsrv_dnsnamelen; static u_char *nfsrv_dnsname = NULL; static int nfsrv_usermax = 999999999; -static struct nfsuserhashhead nfsuserhash[NFSUSERHASHSIZE]; -static struct nfsuserhashhead nfsusernamehash[NFSUSERHASHSIZE]; -static struct nfsuserhashhead nfsgrouphash[NFSGROUPHASHSIZE]; -static struct nfsuserhashhead nfsgroupnamehash[NFSGROUPHASHSIZE]; -static struct nfsuserlruhead nfsuserlruhead; +struct nfsrv_lughash { + struct mtx mtx; + struct nfsuserhashhead lughead; +}; +static struct nfsrv_lughash *nfsuserhash; +static struct nfsrv_lughash *nfsusernamehash; +static struct nfsrv_lughash *nfsgrouphash; +static struct nfsrv_lughash *nfsgroupnamehash; /* * This static array indicates whether or not the RPC generates a large @@ -177,7 +183,7 @@ static void nfsv4_wanted(struct nfsv4loc static int nfsrv_cmpmixedcase(u_char *cp, u_char *cp2, int len); static int nfsrv_getuser(int procnum, uid_t uid, gid_t gid, char *name, NFSPROC_T *p); -static void nfsrv_removeuser(struct nfsusrgrp *usrp); +static void nfsrv_removeuser(struct nfsusrgrp *usrp, int isuser); static int nfsrv_getrefstr(struct nfsrv_descript *, u_char **, u_char **, int *, int *); static void nfsrv_refstrbigenough(int, u_char **, u_char **, int *); @@ -2548,18 +2554,17 @@ nfsv4_uidtostr(uid_t uid, u_char **cpp, u_char *cp = *cpp; uid_t tmp; int cnt, hasampersand, len = NFSV4_SMALLSTR, ret; + struct nfsrv_lughash *hp; cnt = 0; tryagain: - NFSLOCKNAMEID(); - if (nfsrv_dnsname) { + if (nfsrv_dnsnamelen > 0) { /* * Always map nfsrv_defaultuid to "nobody". */ if (uid == nfsrv_defaultuid) { i = nfsrv_dnsnamelen + 7; if (i > len) { - NFSUNLOCKNAMEID(); if (len > NFSV4_SMALLSTR) free(cp, M_NFSSTRING); cp = malloc(i, M_NFSSTRING, M_WAITOK); @@ -2571,11 +2576,12 @@ tryagain: NFSBCOPY("nobody@", cp, 7); cp += 7; NFSBCOPY(nfsrv_dnsname, cp, nfsrv_dnsnamelen); - NFSUNLOCKNAMEID(); return; } hasampersand = 0; - LIST_FOREACH(usrp, NFSUSERHASH(uid), lug_numhash) { + hp = NFSUSERHASH(uid); + mtx_lock(&hp->mtx); + TAILQ_FOREACH(usrp, &hp->lughead, lug_numhash) { if (usrp->lug_uid == uid) { if (usrp->lug_expiry < NFSD_MONOSEC) break; @@ -2595,7 +2601,7 @@ tryagain: i = usrp->lug_namelen + nfsrv_dnsnamelen + 1; if (i > len) { - NFSUNLOCKNAMEID(); + mtx_unlock(&hp->mtx); if (len > NFSV4_SMALLSTR) free(cp, M_NFSSTRING); cp = malloc(i, M_NFSSTRING, M_WAITOK); @@ -2610,20 +2616,19 @@ tryagain: *cp++ = '@'; NFSBCOPY(nfsrv_dnsname, cp, nfsrv_dnsnamelen); } - TAILQ_REMOVE(&nfsuserlruhead, usrp, lug_lru); - TAILQ_INSERT_TAIL(&nfsuserlruhead, usrp, lug_lru); - NFSUNLOCKNAMEID(); + TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); + TAILQ_INSERT_TAIL(&hp->lughead, usrp, + lug_numhash); + mtx_unlock(&hp->mtx); return; } } - NFSUNLOCKNAMEID(); + mtx_unlock(&hp->mtx); cnt++; ret = nfsrv_getuser(RPCNFSUSERD_GETUID, uid, (gid_t)0, NULL, p); if (ret == 0 && cnt < 2) goto tryagain; - } else { - NFSUNLOCKNAMEID(); } /* @@ -2647,6 +2652,52 @@ tryagain: } /* + * Get a credential for the uid with the server's group list. + * If none is found, just return the credential passed in after + * logging a warning message. + */ +struct ucred * +nfsrv_getgrpscred(struct ucred *oldcred) +{ + struct nfsusrgrp *usrp; + struct ucred *newcred; + int cnt, ret; + uid_t uid; + struct nfsrv_lughash *hp; + + cnt = 0; + uid = oldcred->cr_uid; +tryagain: + if (nfsrv_dnsnamelen > 0) { + hp = NFSUSERHASH(uid); + mtx_lock(&hp->mtx); + TAILQ_FOREACH(usrp, &hp->lughead, lug_numhash) { + if (usrp->lug_uid == uid) { + if (usrp->lug_expiry < NFSD_MONOSEC) + break; + if (usrp->lug_cred != NULL) { + newcred = crhold(usrp->lug_cred); + crfree(oldcred); + } else + newcred = oldcred; + TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); + TAILQ_INSERT_TAIL(&hp->lughead, usrp, + lug_numhash); + mtx_unlock(&hp->mtx); + return (newcred); + } + } + mtx_unlock(&hp->mtx); + cnt++; + ret = nfsrv_getuser(RPCNFSUSERD_GETUID, uid, (gid_t)0, + NULL, curthread); + if (ret == 0 && cnt < 2) + goto tryagain; + } + return (oldcred); +} + +/* * Convert a string to a uid. * If no conversion is possible return NFSERR_BADOWNER, otherwise * return 0. @@ -2664,6 +2715,7 @@ nfsv4_strtouid(struct nfsrv_descript *nd int cnt, ret; int error = 0; uid_t tuid; + struct nfsrv_lughash *hp, *hp2; if (len == 0) { error = NFSERR_BADOWNER; @@ -2693,49 +2745,55 @@ nfsv4_strtouid(struct nfsrv_descript *nd cnt = 0; tryagain: - NFSLOCKNAMEID(); - /* - * If an '@' is found and the domain name matches, search for the name - * with dns stripped off. - * Mixed case alpahbetics will match for the domain name, but all - * upper case will not. - */ - if (cnt == 0 && i < len && i > 0 && nfsrv_dnsname && - (len - 1 - i) == nfsrv_dnsnamelen && - !nfsrv_cmpmixedcase(cp, nfsrv_dnsname, nfsrv_dnsnamelen)) { - len -= (nfsrv_dnsnamelen + 1); - *(cp - 1) = '\0'; - } - - /* - * Check for the special case of "nobody". - */ - if (len == 6 && !NFSBCMP(str, "nobody", 6)) { - *uidp = nfsrv_defaultuid; - NFSUNLOCKNAMEID(); - error = 0; - goto out; - } - - LIST_FOREACH(usrp, NFSUSERNAMEHASH(str, len), lug_namehash) { - if (usrp->lug_namelen == len && - !NFSBCMP(usrp->lug_name, str, len)) { - if (usrp->lug_expiry < NFSD_MONOSEC) - break; - *uidp = usrp->lug_uid; - TAILQ_REMOVE(&nfsuserlruhead, usrp, lug_lru); - TAILQ_INSERT_TAIL(&nfsuserlruhead, usrp, lug_lru); - NFSUNLOCKNAMEID(); + if (nfsrv_dnsnamelen > 0) { + /* + * If an '@' is found and the domain name matches, search for + * the name with dns stripped off. + * Mixed case alpahbetics will match for the domain name, but + * all upper case will not. + */ + if (cnt == 0 && i < len && i > 0 && + (len - 1 - i) == nfsrv_dnsnamelen && + !nfsrv_cmpmixedcase(cp, nfsrv_dnsname, nfsrv_dnsnamelen)) { + len -= (nfsrv_dnsnamelen + 1); + *(cp - 1) = '\0'; + } + + /* + * Check for the special case of "nobody". + */ + if (len == 6 && !NFSBCMP(str, "nobody", 6)) { + *uidp = nfsrv_defaultuid; error = 0; goto out; } + + hp = NFSUSERNAMEHASH(str, len); + mtx_lock(&hp->mtx); + TAILQ_FOREACH(usrp, &hp->lughead, lug_namehash) { + if (usrp->lug_namelen == len && + !NFSBCMP(usrp->lug_name, str, len)) { + if (usrp->lug_expiry < NFSD_MONOSEC) + break; + hp2 = NFSUSERHASH(usrp->lug_uid); + mtx_lock(&hp2->mtx); + TAILQ_REMOVE(&hp2->lughead, usrp, lug_numhash); + TAILQ_INSERT_TAIL(&hp2->lughead, usrp, + lug_numhash); + *uidp = usrp->lug_uid; + mtx_unlock(&hp2->mtx); + mtx_unlock(&hp->mtx); + error = 0; + goto out; + } + } + mtx_unlock(&hp->mtx); + cnt++; + ret = nfsrv_getuser(RPCNFSUSERD_GETUSER, (uid_t)0, (gid_t)0, + str, p); + if (ret == 0 && cnt < 2) + goto tryagain; } - NFSUNLOCKNAMEID(); - cnt++; - ret = nfsrv_getuser(RPCNFSUSERD_GETUSER, (uid_t)0, (gid_t)0, - str, p); - if (ret == 0 && cnt < 2) - goto tryagain; error = NFSERR_BADOWNER; out: @@ -2758,18 +2816,17 @@ nfsv4_gidtostr(gid_t gid, u_char **cpp, u_char *cp = *cpp; gid_t tmp; int cnt, hasampersand, len = NFSV4_SMALLSTR, ret; + struct nfsrv_lughash *hp; cnt = 0; tryagain: - NFSLOCKNAMEID(); - if (nfsrv_dnsname) { + if (nfsrv_dnsnamelen > 0) { /* * Always map nfsrv_defaultgid to "nogroup". */ if (gid == nfsrv_defaultgid) { i = nfsrv_dnsnamelen + 8; if (i > len) { - NFSUNLOCKNAMEID(); if (len > NFSV4_SMALLSTR) free(cp, M_NFSSTRING); cp = malloc(i, M_NFSSTRING, M_WAITOK); @@ -2781,11 +2838,12 @@ tryagain: NFSBCOPY("nogroup@", cp, 8); cp += 8; NFSBCOPY(nfsrv_dnsname, cp, nfsrv_dnsnamelen); - NFSUNLOCKNAMEID(); return; } hasampersand = 0; - LIST_FOREACH(usrp, NFSGROUPHASH(gid), lug_numhash) { + hp = NFSGROUPHASH(gid); + mtx_lock(&hp->mtx); + TAILQ_FOREACH(usrp, &hp->lughead, lug_numhash) { if (usrp->lug_gid == gid) { if (usrp->lug_expiry < NFSD_MONOSEC) break; @@ -2805,7 +2863,7 @@ tryagain: i = usrp->lug_namelen + nfsrv_dnsnamelen + 1; if (i > len) { - NFSUNLOCKNAMEID(); + mtx_unlock(&hp->mtx); if (len > NFSV4_SMALLSTR) free(cp, M_NFSSTRING); cp = malloc(i, M_NFSSTRING, M_WAITOK); @@ -2820,20 +2878,19 @@ tryagain: *cp++ = '@'; NFSBCOPY(nfsrv_dnsname, cp, nfsrv_dnsnamelen); } - TAILQ_REMOVE(&nfsuserlruhead, usrp, lug_lru); - TAILQ_INSERT_TAIL(&nfsuserlruhead, usrp, lug_lru); - NFSUNLOCKNAMEID(); + TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); + TAILQ_INSERT_TAIL(&hp->lughead, usrp, + lug_numhash); + mtx_unlock(&hp->mtx); return; } } - NFSUNLOCKNAMEID(); + mtx_unlock(&hp->mtx); cnt++; ret = nfsrv_getuser(RPCNFSUSERD_GETGID, (uid_t)0, gid, NULL, p); if (ret == 0 && cnt < 2) goto tryagain; - } else { - NFSUNLOCKNAMEID(); } /* @@ -2874,6 +2931,7 @@ nfsv4_strtogid(struct nfsrv_descript *nd int cnt, ret; int error = 0; gid_t tgid; + struct nfsrv_lughash *hp, *hp2; if (len == 0) { error = NFSERR_BADOWNER; @@ -2903,47 +2961,53 @@ nfsv4_strtogid(struct nfsrv_descript *nd cnt = 0; tryagain: - NFSLOCKNAMEID(); - /* - * If an '@' is found and the dns name matches, search for the name - * with the dns stripped off. - */ - if (cnt == 0 && i < len && i > 0 && nfsrv_dnsname && - (len - 1 - i) == nfsrv_dnsnamelen && - !nfsrv_cmpmixedcase(cp, nfsrv_dnsname, nfsrv_dnsnamelen)) { - len -= (nfsrv_dnsnamelen + 1); - *(cp - 1) = '\0'; - } - - /* - * Check for the special case of "nogroup". - */ - if (len == 7 && !NFSBCMP(str, "nogroup", 7)) { - *gidp = nfsrv_defaultgid; - NFSUNLOCKNAMEID(); - error = 0; - goto out; - } - - LIST_FOREACH(usrp, NFSGROUPNAMEHASH(str, len), lug_namehash) { - if (usrp->lug_namelen == len && - !NFSBCMP(usrp->lug_name, str, len)) { - if (usrp->lug_expiry < NFSD_MONOSEC) - break; - *gidp = usrp->lug_gid; - TAILQ_REMOVE(&nfsuserlruhead, usrp, lug_lru); - TAILQ_INSERT_TAIL(&nfsuserlruhead, usrp, lug_lru); - NFSUNLOCKNAMEID(); + if (nfsrv_dnsnamelen > 0) { + /* + * If an '@' is found and the dns name matches, search for the + * name with the dns stripped off. + */ + if (cnt == 0 && i < len && i > 0 && + (len - 1 - i) == nfsrv_dnsnamelen && + !nfsrv_cmpmixedcase(cp, nfsrv_dnsname, nfsrv_dnsnamelen)) { + len -= (nfsrv_dnsnamelen + 1); + *(cp - 1) = '\0'; + } + + /* + * Check for the special case of "nogroup". + */ + if (len == 7 && !NFSBCMP(str, "nogroup", 7)) { + *gidp = nfsrv_defaultgid; error = 0; goto out; } + + hp = NFSGROUPNAMEHASH(str, len); + mtx_lock(&hp->mtx); + TAILQ_FOREACH(usrp, &hp->lughead, lug_namehash) { + if (usrp->lug_namelen == len && + !NFSBCMP(usrp->lug_name, str, len)) { + if (usrp->lug_expiry < NFSD_MONOSEC) + break; + hp2 = NFSGROUPHASH(usrp->lug_gid); + mtx_lock(&hp2->mtx); + TAILQ_REMOVE(&hp2->lughead, usrp, lug_numhash); + TAILQ_INSERT_TAIL(&hp2->lughead, usrp, + lug_numhash); + *gidp = usrp->lug_gid; + mtx_unlock(&hp2->mtx); + mtx_unlock(&hp->mtx); + error = 0; + goto out; + } + } + mtx_unlock(&hp->mtx); + cnt++; + ret = nfsrv_getuser(RPCNFSUSERD_GETGROUP, (uid_t)0, (gid_t)0, + str, p); + if (ret == 0 && cnt < 2) + goto tryagain; } - NFSUNLOCKNAMEID(); - cnt++; - ret = nfsrv_getuser(RPCNFSUSERD_GETGROUP, (uid_t)0, (gid_t)0, - str, p); - if (ret == 0 && cnt < 2) - goto tryagain; error = NFSERR_BADOWNER; out: @@ -3101,111 +3165,218 @@ APPLESTATIC int nfssvc_idname(struct nfsd_idargs *nidp) { struct nfsusrgrp *nusrp, *usrp, *newusrp; - struct nfsuserhashhead *hp; - int i; + struct nfsrv_lughash *hp_name, *hp_idnum, *thp; + int i, group_locked, groupname_locked, user_locked, username_locked; int error = 0; u_char *cp; + gid_t *grps; + struct ucred *cr; + static int onethread = 0; + static time_t lasttime = 0; if (nidp->nid_flag & NFSID_INITIALIZE) { - cp = (u_char *)malloc(nidp->nid_namelen + 1, - M_NFSSTRING, M_WAITOK); - error = copyin(CAST_USER_ADDR_T(nidp->nid_name), cp, - nidp->nid_namelen); - NFSLOCKNAMEID(); - if (nfsrv_dnsname) { + cp = malloc(nidp->nid_namelen + 1, M_NFSSTRING, M_WAITOK); + error = copyin(CAST_USER_ADDR_T(nidp->nid_name), cp, + nidp->nid_namelen); + if (error != 0) { + free(cp, M_NFSSTRING); + goto out; + } + if (atomic_cmpset_acq_int(&nfsrv_dnsnamelen, 0, 0) == 0) { + /* + * Free up all the old stuff and reinitialize hash + * lists. All mutexes for both lists must be locked, + * with the user/group name ones before the uid/gid + * ones, to avoid a LOR. + */ + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_lock(&nfsusernamehash[i].mtx); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_lock(&nfsuserhash[i].mtx); + for (i = 0; i < nfsrv_lughashsize; i++) + TAILQ_FOREACH_SAFE(usrp, + &nfsuserhash[i].lughead, lug_numhash, nusrp) + nfsrv_removeuser(usrp, 1); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_unlock(&nfsuserhash[i].mtx); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_unlock(&nfsusernamehash[i].mtx); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_lock(&nfsgroupnamehash[i].mtx); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_lock(&nfsgrouphash[i].mtx); + for (i = 0; i < nfsrv_lughashsize; i++) + TAILQ_FOREACH_SAFE(usrp, + &nfsgrouphash[i].lughead, lug_numhash, + nusrp) + nfsrv_removeuser(usrp, 0); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_unlock(&nfsgrouphash[i].mtx); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_unlock(&nfsgroupnamehash[i].mtx); + free(nfsrv_dnsname, M_NFSSTRING); + nfsrv_dnsname = NULL; + } + if (nfsuserhash == NULL) { + /* Allocate the hash tables. */ + nfsuserhash = malloc(sizeof(struct nfsrv_lughash) * + nfsrv_lughashsize, M_NFSUSERGROUP, M_WAITOK | + M_ZERO); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_init(&nfsuserhash[i].mtx, "nfsuidhash", + NULL, MTX_DEF | MTX_DUPOK); + nfsusernamehash = malloc(sizeof(struct nfsrv_lughash) * + nfsrv_lughashsize, M_NFSUSERGROUP, M_WAITOK | + M_ZERO); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_init(&nfsusernamehash[i].mtx, + "nfsusrhash", NULL, MTX_DEF | + MTX_DUPOK); + nfsgrouphash = malloc(sizeof(struct nfsrv_lughash) * + nfsrv_lughashsize, M_NFSUSERGROUP, M_WAITOK | + M_ZERO); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_init(&nfsgrouphash[i].mtx, "nfsgidhash", + NULL, MTX_DEF | MTX_DUPOK); + nfsgroupnamehash = malloc(sizeof(struct nfsrv_lughash) * + nfsrv_lughashsize, M_NFSUSERGROUP, M_WAITOK | + M_ZERO); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_init(&nfsgroupnamehash[i].mtx, + "nfsgrphash", NULL, MTX_DEF | MTX_DUPOK); + } + /* (Re)initialize the list heads. */ + for (i = 0; i < nfsrv_lughashsize; i++) + TAILQ_INIT(&nfsuserhash[i].lughead); + for (i = 0; i < nfsrv_lughashsize; i++) + TAILQ_INIT(&nfsusernamehash[i].lughead); + for (i = 0; i < nfsrv_lughashsize; i++) + TAILQ_INIT(&nfsgrouphash[i].lughead); + for (i = 0; i < nfsrv_lughashsize; i++) + TAILQ_INIT(&nfsgroupnamehash[i].lughead); + /* - * Free up all the old stuff and reinitialize hash lists. + * Put name in "DNS" string. */ - TAILQ_FOREACH_SAFE(usrp, &nfsuserlruhead, lug_lru, nusrp) { - nfsrv_removeuser(usrp); - } - free(nfsrv_dnsname, M_NFSSTRING); - nfsrv_dnsname = NULL; - } - TAILQ_INIT(&nfsuserlruhead); - for (i = 0; i < NFSUSERHASHSIZE; i++) - LIST_INIT(&nfsuserhash[i]); - for (i = 0; i < NFSGROUPHASHSIZE; i++) - LIST_INIT(&nfsgrouphash[i]); - for (i = 0; i < NFSUSERHASHSIZE; i++) - LIST_INIT(&nfsusernamehash[i]); - for (i = 0; i < NFSGROUPHASHSIZE; i++) - LIST_INIT(&nfsgroupnamehash[i]); - - /* - * Put name in "DNS" string. - */ - if (!error) { nfsrv_dnsname = cp; - nfsrv_dnsnamelen = nidp->nid_namelen; nfsrv_defaultuid = nidp->nid_uid; nfsrv_defaultgid = nidp->nid_gid; nfsrv_usercnt = 0; nfsrv_usermax = nidp->nid_usermax; - } - NFSUNLOCKNAMEID(); - if (error) - free(cp, M_NFSSTRING); - goto out; + atomic_store_rel_int(&nfsrv_dnsnamelen, nidp->nid_namelen); + goto out; } /* * malloc the new one now, so any potential sleep occurs before * manipulation of the lists. */ - MALLOC(newusrp, struct nfsusrgrp *, sizeof (struct nfsusrgrp) + - nidp->nid_namelen, M_NFSUSERGROUP, M_WAITOK); + newusrp = malloc(sizeof(struct nfsusrgrp) + nidp->nid_namelen, + M_NFSUSERGROUP, M_WAITOK | M_ZERO); error = copyin(CAST_USER_ADDR_T(nidp->nid_name), newusrp->lug_name, nidp->nid_namelen); + if (error == 0 && nidp->nid_ngroup > 0 && + (nidp->nid_flag & NFSID_ADDUID) != 0) { + grps = malloc(sizeof(gid_t) * nidp->nid_ngroup, M_TEMP, + M_WAITOK); + error = copyin(CAST_USER_ADDR_T(nidp->nid_grps), grps, + sizeof(gid_t) * nidp->nid_ngroup); + if (error == 0) { + /* + * Create a credential just like svc_getcred(), + * but using the group list provided. + */ + cr = crget(); + cr->cr_uid = cr->cr_ruid = cr->cr_svuid = nidp->nid_uid; + crsetgroups(cr, nidp->nid_ngroup, grps); + cr->cr_rgid = cr->cr_svgid = cr->cr_groups[0]; + cr->cr_prison = &prison0; + prison_hold(cr->cr_prison); +#ifdef MAC + mac_cred_associate_nfsd(cr); +#endif + newusrp->lug_cred = cr; + } + free(grps, M_TEMP); + } if (error) { - free((caddr_t)newusrp, M_NFSUSERGROUP); + free(newusrp, M_NFSUSERGROUP); goto out; } newusrp->lug_namelen = nidp->nid_namelen; - NFSLOCKNAMEID(); + /* + * The lock order is username[0]->[nfsrv_lughashsize - 1] followed + * by uid[0]->[nfsrv_lughashsize - 1], with the same for group. + * The flags user_locked, username_locked, group_locked and + * groupname_locked are set to indicate all of those hash lists are + * locked. hp_name != NULL and hp_idnum != NULL indicates that + * the respective one mutex is locked. + */ + user_locked = username_locked = group_locked = groupname_locked = 0; + hp_name = hp_idnum = NULL; + /* * Delete old entries, as required. */ if (nidp->nid_flag & (NFSID_DELUID | NFSID_ADDUID)) { - hp = NFSUSERHASH(nidp->nid_uid); - LIST_FOREACH_SAFE(usrp, hp, lug_numhash, nusrp) { + /* Must lock all username hash lists first, to avoid a LOR. */ + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_lock(&nfsusernamehash[i].mtx); + username_locked = 1; + hp_idnum = NFSUSERHASH(nidp->nid_uid); + mtx_lock(&hp_idnum->mtx); + TAILQ_FOREACH_SAFE(usrp, &hp_idnum->lughead, lug_numhash, + nusrp) { if (usrp->lug_uid == nidp->nid_uid) - nfsrv_removeuser(usrp); + nfsrv_removeuser(usrp, 1); } - } - if (nidp->nid_flag & (NFSID_DELUSERNAME | NFSID_ADDUSERNAME)) { - hp = NFSUSERNAMEHASH(newusrp->lug_name, newusrp->lug_namelen); - LIST_FOREACH_SAFE(usrp, hp, lug_namehash, nusrp) { + } else if (nidp->nid_flag & (NFSID_DELUSERNAME | NFSID_ADDUSERNAME)) { + hp_name = NFSUSERNAMEHASH(newusrp->lug_name, + newusrp->lug_namelen); + mtx_lock(&hp_name->mtx); + TAILQ_FOREACH_SAFE(usrp, &hp_name->lughead, lug_namehash, + nusrp) { if (usrp->lug_namelen == newusrp->lug_namelen && !NFSBCMP(usrp->lug_name, newusrp->lug_name, - usrp->lug_namelen)) - nfsrv_removeuser(usrp); - } - } - if (nidp->nid_flag & (NFSID_DELGID | NFSID_ADDGID)) { - hp = NFSGROUPHASH(nidp->nid_gid); - LIST_FOREACH_SAFE(usrp, hp, lug_numhash, nusrp) { + usrp->lug_namelen)) { + thp = NFSUSERHASH(usrp->lug_uid); + mtx_lock(&thp->mtx); + nfsrv_removeuser(usrp, 1); + mtx_unlock(&thp->mtx); + } + } + hp_idnum = NFSUSERHASH(nidp->nid_uid); + mtx_lock(&hp_idnum->mtx); + } else if (nidp->nid_flag & (NFSID_DELGID | NFSID_ADDGID)) { + /* Must lock all groupname hash lists first, to avoid a LOR. */ + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_lock(&nfsgroupnamehash[i].mtx); + groupname_locked = 1; + hp_idnum = NFSGROUPHASH(nidp->nid_gid); + mtx_lock(&hp_idnum->mtx); + TAILQ_FOREACH_SAFE(usrp, &hp_idnum->lughead, lug_numhash, + nusrp) { if (usrp->lug_gid == nidp->nid_gid) - nfsrv_removeuser(usrp); + nfsrv_removeuser(usrp, 0); } - } - if (nidp->nid_flag & (NFSID_DELGROUPNAME | NFSID_ADDGROUPNAME)) { - hp = NFSGROUPNAMEHASH(newusrp->lug_name, newusrp->lug_namelen); - LIST_FOREACH_SAFE(usrp, hp, lug_namehash, nusrp) { + } else if (nidp->nid_flag & (NFSID_DELGROUPNAME | NFSID_ADDGROUPNAME)) { + hp_name = NFSGROUPNAMEHASH(newusrp->lug_name, + newusrp->lug_namelen); + mtx_lock(&hp_name->mtx); + TAILQ_FOREACH_SAFE(usrp, &hp_name->lughead, lug_namehash, + nusrp) { if (usrp->lug_namelen == newusrp->lug_namelen && !NFSBCMP(usrp->lug_name, newusrp->lug_name, - usrp->lug_namelen)) - nfsrv_removeuser(usrp); + usrp->lug_namelen)) { + thp = NFSGROUPHASH(usrp->lug_gid); + mtx_lock(&thp->mtx); + nfsrv_removeuser(usrp, 0); + mtx_unlock(&thp->mtx); + } } - } - TAILQ_FOREACH_SAFE(usrp, &nfsuserlruhead, lug_lru, nusrp) { - if (usrp->lug_expiry < NFSD_MONOSEC) - nfsrv_removeuser(usrp); - } - while (nfsrv_usercnt >= nfsrv_usermax) { - usrp = TAILQ_FIRST(&nfsuserlruhead); - nfsrv_removeuser(usrp); + hp_idnum = NFSGROUPHASH(nidp->nid_gid); + mtx_lock(&hp_idnum->mtx); } /* @@ -3217,23 +3388,129 @@ nfssvc_idname(struct nfsd_idargs *nidp) newusrp->lug_expiry = NFSD_MONOSEC + 5; if (nidp->nid_flag & (NFSID_ADDUID | NFSID_ADDUSERNAME)) { newusrp->lug_uid = nidp->nid_uid; - LIST_INSERT_HEAD(NFSUSERHASH(newusrp->lug_uid), newusrp, - lug_numhash); - LIST_INSERT_HEAD(NFSUSERNAMEHASH(newusrp->lug_name, - newusrp->lug_namelen), newusrp, lug_namehash); - TAILQ_INSERT_TAIL(&nfsuserlruhead, newusrp, lug_lru); - nfsrv_usercnt++; + thp = NFSUSERHASH(newusrp->lug_uid); + mtx_assert(&thp->mtx, MA_OWNED); + TAILQ_INSERT_TAIL(&thp->lughead, newusrp, lug_numhash); + thp = NFSUSERNAMEHASH(newusrp->lug_name, newusrp->lug_namelen); + mtx_assert(&thp->mtx, MA_OWNED); + TAILQ_INSERT_TAIL(&thp->lughead, newusrp, lug_namehash); + atomic_add_int(&nfsrv_usercnt, 1); } else if (nidp->nid_flag & (NFSID_ADDGID | NFSID_ADDGROUPNAME)) { newusrp->lug_gid = nidp->nid_gid; - LIST_INSERT_HEAD(NFSGROUPHASH(newusrp->lug_gid), newusrp, - lug_numhash); - LIST_INSERT_HEAD(NFSGROUPNAMEHASH(newusrp->lug_name, - newusrp->lug_namelen), newusrp, lug_namehash); - TAILQ_INSERT_TAIL(&nfsuserlruhead, newusrp, lug_lru); - nfsrv_usercnt++; - } else - FREE((caddr_t)newusrp, M_NFSUSERGROUP); - NFSUNLOCKNAMEID(); + thp = NFSGROUPHASH(newusrp->lug_gid); + mtx_assert(&thp->mtx, MA_OWNED); + TAILQ_INSERT_TAIL(&thp->lughead, newusrp, lug_numhash); + thp = NFSGROUPNAMEHASH(newusrp->lug_name, newusrp->lug_namelen); + mtx_assert(&thp->mtx, MA_OWNED); + TAILQ_INSERT_TAIL(&thp->lughead, newusrp, lug_namehash); + atomic_add_int(&nfsrv_usercnt, 1); + } else { + if (newusrp->lug_cred != NULL) + crfree(newusrp->lug_cred); + free(newusrp, M_NFSUSERGROUP); + } + + /* + * Once per second, allow one thread to trim the cache. + */ + if (lasttime < NFSD_MONOSEC && + atomic_cmpset_acq_int(&onethread, 0, 1) != 0) { + /* + * First, unlock the single mutexes, so that all entries + * can be locked and any LOR is avoided. + */ + if (hp_name != NULL) { + mtx_unlock(&hp_name->mtx); + hp_name = NULL; + } + if (hp_idnum != NULL) { + mtx_unlock(&hp_idnum->mtx); + hp_idnum = NULL; + } + + if ((nidp->nid_flag & (NFSID_DELUID | NFSID_ADDUID | + NFSID_DELUSERNAME | NFSID_ADDUSERNAME)) != 0) { + if (username_locked == 0) { + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_lock(&nfsusernamehash[i].mtx); + username_locked = 1; + } + KASSERT(user_locked == 0, + ("nfssvc_idname: user_locked")); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_lock(&nfsuserhash[i].mtx); + user_locked = 1; + for (i = 0; i < nfsrv_lughashsize; i++) { + TAILQ_FOREACH_SAFE(usrp, + &nfsuserhash[i].lughead, lug_numhash, + nusrp) + if (usrp->lug_expiry < NFSD_MONOSEC) + nfsrv_removeuser(usrp, 1); + } + for (i = 0; i < nfsrv_lughashsize; i++) { + /* + * Trim the cache using an approximate LRU + * algorithm. This code deletes the least + * recently used entry on each hash list. + */ + if (nfsrv_usercnt <= nfsrv_usermax) + break; + usrp = TAILQ_FIRST(&nfsuserhash[i].lughead); + if (usrp != NULL) + nfsrv_removeuser(usrp, 1); + } + } else { + if (groupname_locked == 0) { + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_lock(&nfsgroupnamehash[i].mtx); + groupname_locked = 1; + } + KASSERT(group_locked == 0, + ("nfssvc_idname: group_locked")); + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_lock(&nfsgrouphash[i].mtx); + group_locked = 1; + for (i = 0; i < nfsrv_lughashsize; i++) { + TAILQ_FOREACH_SAFE(usrp, + &nfsgrouphash[i].lughead, lug_numhash, + nusrp) + if (usrp->lug_expiry < NFSD_MONOSEC) + nfsrv_removeuser(usrp, 0); + } + for (i = 0; i < nfsrv_lughashsize; i++) { + /* + * Trim the cache using an approximate LRU + * algorithm. This code deletes the least + * recently user entry on each hash list. + */ + if (nfsrv_usercnt <= nfsrv_usermax) + break; + usrp = TAILQ_FIRST(&nfsgrouphash[i].lughead); + if (usrp != NULL) + nfsrv_removeuser(usrp, 0); + } + } + lasttime = NFSD_MONOSEC; + atomic_store_rel_int(&onethread, 0); + } + + /* Now, unlock all locked mutexes. */ + if (hp_idnum != NULL) + mtx_unlock(&hp_idnum->mtx); + if (hp_name != NULL) + mtx_unlock(&hp_name->mtx); + if (user_locked != 0) + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_unlock(&nfsuserhash[i].mtx); + if (username_locked != 0) + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_unlock(&nfsusernamehash[i].mtx); + if (group_locked != 0) + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_unlock(&nfsgrouphash[i].mtx); + if (groupname_locked != 0) + for (i = 0; i < nfsrv_lughashsize; i++) + mtx_unlock(&nfsgroupnamehash[i].mtx); out: NFSEXITCODE(error); return (error); @@ -3243,15 +3520,29 @@ out: * Remove a user/group name element. */ static void -nfsrv_removeuser(struct nfsusrgrp *usrp) +nfsrv_removeuser(struct nfsusrgrp *usrp, int isuser) { + struct nfsrv_lughash *hp; - NFSNAMEIDREQUIRED(); - LIST_REMOVE(usrp, lug_numhash); - LIST_REMOVE(usrp, lug_namehash); - TAILQ_REMOVE(&nfsuserlruhead, usrp, lug_lru); - nfsrv_usercnt--; - FREE((caddr_t)usrp, M_NFSUSERGROUP); + if (isuser != 0) { + hp = NFSUSERHASH(usrp->lug_uid); + mtx_assert(&hp->mtx, MA_OWNED); + TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); + hp = NFSUSERNAMEHASH(usrp->lug_name, usrp->lug_namelen); + mtx_assert(&hp->mtx, MA_OWNED); + TAILQ_REMOVE(&hp->lughead, usrp, lug_namehash); + } else { + hp = NFSGROUPHASH(usrp->lug_gid); + mtx_assert(&hp->mtx, MA_OWNED); + TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); + hp = NFSGROUPNAMEHASH(usrp->lug_name, usrp->lug_namelen); + mtx_assert(&hp->mtx, MA_OWNED); + TAILQ_REMOVE(&hp->lughead, usrp, lug_namehash); + } + atomic_add_int(&nfsrv_usercnt, -1); + if (usrp->lug_cred != NULL) + crfree(usrp->lug_cred); + free(usrp, M_NFSUSERGROUP); } /* Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Mon Nov 30 21:53:38 2015 (r291526) +++ head/sys/fs/nfs/nfs_var.h Mon Nov 30 21:54:27 2015 (r291527) @@ -296,6 +296,7 @@ void nfsv4_setsequence(struct nfsmount * int nfsv4_sequencelookup(struct nfsmount *, struct nfsclsession *, int *, int *, uint32_t *, uint8_t *); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Nov 30 21:55:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E132A3DC93; Mon, 30 Nov 2015 21:55:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AF6213A9; Mon, 30 Nov 2015 21:55:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULtaDA077248; Mon, 30 Nov 2015 21:55:36 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULtaC2077244; Mon, 30 Nov 2015 21:55:36 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302155.tAULtaC2077244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:55:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291528 - in stable/10: share/man/man4 sys/dev/isp sys/dev/ispfw sys/modules/ispfw sys/modules/ispfw/isp_1040_it sys/modules/ispfw/isp_1080_it sys/modules/ispfw/isp_12160_it X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:55:37 -0000 Author: mav Date: Mon Nov 30 21:55:35 2015 New Revision: 291528 URL: https://svnweb.freebsd.org/changeset/base/291528 Log: MFC r291188: Rip off target mode support for parallel SCSI QLogic adapters. Hacks to enable target mode there complicated code, while didn't really work. And for outdated hardware fixing it is not really interesting. Initiator mode tested with Qlogic 1080 adapter is still working fine. Deleted: stable/10/sys/modules/ispfw/isp_1040_it/ stable/10/sys/modules/ispfw/isp_1080_it/ stable/10/sys/modules/ispfw/isp_12160_it/ Modified: stable/10/share/man/man4/isp.4 stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.h stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/isp_library.h stable/10/sys/dev/isp/isp_pci.c stable/10/sys/dev/isp/isp_sbus.c stable/10/sys/dev/isp/isp_target.c stable/10/sys/dev/isp/ispvar.h stable/10/sys/dev/ispfw/asm_1040.h stable/10/sys/dev/ispfw/asm_1080.h stable/10/sys/dev/ispfw/asm_12160.h stable/10/sys/dev/ispfw/ispfw.c stable/10/sys/modules/ispfw/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/isp.4 ============================================================================== --- stable/10/share/man/man4/isp.4 Mon Nov 30 21:54:27 2015 (r291527) +++ stable/10/share/man/man4/isp.4 Mon Nov 30 21:55:35 2015 (r291528) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 29, 2015 +.Dd November 22, 2015 .Dt ISP 4 .Os .Sh NAME @@ -60,31 +60,20 @@ devices. SCSI features include support for Ultra SCSI and wide mode transactions for .Tn SCSI , -Ultra2 LVD (ISP1080, ISP1280), and Ultra3 LVD (ISP12160). +Ultra2 LVD (1080, 1280), and Ultra3 LVD (10160, 12160). .Pp Fibre Channel support uses FCP SCSI profile for .Tn FibreChannel , -and utilizes Class 3 and Class 2 connections (Qlogic 2100 is Class -3 only, minor patches to the Qlogic 2200 to force Class 2 mode). -Support is available for Public and Private loops, and for -point-to-point connections (Qlogic 2200 only). +and utilizes Class 3 and Class 2 (2200 and later) connections. +Support is available for Public and Private loops, Point-to-Point +and Fabric connections. The newer 2-Gigabit cards (2300, 2312, 2322), 4-Gigabit (2422, 2432) -and 8-Gigabit (2532) are also supported. -Command tagging is supported for all (in fact, -.Tn FibreChannel -requires tagging). -Fabric support is enabled by default for other than 2100 cards. -Fabric support for 2100 cards has been so problematic and these cards are so -old now that it is just not worth your time to try it. +and 8-Gigabit (2532) are supported in both initiator and target modes. .Sh FIRMWARE -Firmware is available if the +Firmware loading is supported if the .Xr ispfw 4 -module is loaded during bootstrap (q.v.). -.Pp -It is -.Ar strongly -recommended that you use the firmware available -from +module is loaded. +It is strongly recommended that you use the firmware available from .Xr ispfw 4 as it is the most likely to have been tested with this driver. .Sh HARDWARE @@ -92,53 +81,47 @@ Cards supported by the .Nm driver include: .Bl -tag -width xxxxxx -offset indent -.It ISP1000 -SBus Fast Wide, Ultra Fast Wide cards, Single Ended or Differential -cards. -.It ISP1020 -Qlogic 1020 Fast Wide and Differential Fast Wide PCI cards. -.It ISP1040 -Qlogic 1040 Ultra Wide and Differential Ultra Wide PCI cards. -Also known as the DEC KZPBA-CA (single ended) and KZPBA-CB (HVD differential). +.It Qlogic 1000 +Fast Wide, Ultra Fast Wide cards, Single Ended or Differential SBus cards. .It Qlogic 1020 -Qlogic 1020 SCSI cards. +Fast Wide and Differential Fast Wide SCSI PCI cards. .It Qlogic 1040 -Qlogic 1040 Ultra SCSI cards. +Ultra Wide and Differential Ultra Wide SCSI PCI cards. +Also known as the DEC KZPBA-CA (single ended) and KZPBA-CB (HVD differential). .It Qlogic 1080 -Qlogic 1080 LVD Ultra2 Wide SCSI cards. +LVD Ultra2 Wide SCSI PCI cards. .It Qlogic 10160 -Qlogic 10160 LVD Ultra3 Wide PCI cards. +LVD Ultra3 Wide SCSI PCI cards. .It Qlogic 1240 -Qlogic 1240 Dual Bus Ultra Wide and Differential Ultra Wide PCI cards. +Dual Bus Ultra Wide and Differential Ultra Wide SCSI PCI cards. .It Qlogic 1280 -Qlogic 1280 Dual Bus LVD Ultra2 Wide PCI cards. +Dual Bus LVD Ultra2 Wide SCSI PCI cards. .It Qlogic 12160 -Qlogic 12160 Dual Bus LVD Ultra3 Wide PCI cards. +Dual Bus LVD Ultra3 Wide SCSI PCI cards. .It Qlogic 210X -Qlogic 2100 and 2100A Copper and Optical Fibre Channel Arbitrated -Loop (single, dual). +Copper and Optical Fibre Channel Arbitrated Loop PCI cards (single, dual). .It Qlogic 220X -Qlogic 2200 Copper and Optical Fibre Channel Arbitrated Loop PCI -cards (single, dual, quad). +Copper and Optical Fibre Channel Arbitrated Loop PCI cards (single, dual, quad). .It Qlogic 2300 -Qlogic 2300 Optical 2Gb Fibre Channel PCI cards. +Optical 2Gb Fibre Channel PCI cards. .It Qlogic 2312 -Qlogic 2312 Optical 2Gb Fibre Channel PCI cards. +Optical 2Gb Fibre Channel PCI cards. .It Qlogic 234X -Qlogic 234X Optical 2Gb Fibre Channel PCI cards (2312 chipset, single and dual attach). +Optical 2Gb Fibre Channel PCI cards (2312 chipset, single and dual attach). .It Qlogic 2322 -Qlogic 2322 Optical 2Gb Fibre Channel PCIe cards. +Optical 2Gb Fibre Channel PCIe cards. .It Qlogic 200 Dell branded version of the QLogic 2312. .It Qlogic 2422 -Qlogic 2422 Optical 4Gb Fibre Channel PCI cards. +Optical 4Gb Fibre Channel PCI cards. .It Qlogic 2432 -Qlogic 2432 Optical 4Gb Fibre Channel PCIe cards. +Optical 4Gb Fibre Channel PCIe cards. .It Qlogic 2532 -Qlogic 2532 Optical 8Gb Fibre Channel PCIe cards. +Optical 8Gb Fibre Channel PCIe cards. .El .Sh CONFIGURATION OPTIONS -Target mode support may be enabled with the +Target mode support for 23xx and above Fibre Channel adapters may be +enabled with the .Pp .Cd options ISP_TARGET_MODE .Pp @@ -192,7 +175,8 @@ cards in Local Loop topologies it is .Ar strongly recommended that you set this value to non-zero. .It Va hint.isp.0.role -A hint to define default role for isp instance (target, initiator, both). +A hint to define default role for isp instance (0 -- none, 1 -- target, +2 -- initiator, 3 -- both). .It Va hint.isp.0.debug A hint value for a driver debug level (see the file .Pa /usr/src/sys/dev/isp/ispvar.h @@ -236,5 +220,5 @@ Some later improvement was done by .Sh BUGS The driver currently ignores some NVRAM settings. .Pp -Target mode support works reasonably well for 23xx and above Fibre Channel -cards, but not really tested on older ones. +Fabric support for 2100 cards has been so problematic, and these cards are so +old now that it is just not worth your time to try it. Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:54:27 2015 (r291527) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:55:35 2015 (r291528) @@ -1089,12 +1089,8 @@ isp_reset(ispsoftc_t *isp, int do_load_d (((uint64_t) mbs.param[17]) << 48); } } - } else if (IS_SCSI(isp)) { -#ifndef ISP_TARGET_MODE - isp->isp_fwattr = ISP_FW_ATTR_TMODE; -#else + } else { isp->isp_fwattr = 0; -#endif } isp_prt(isp, ISP_LOGCONFIG, "Board Type %s, Chip Revision 0x%x, %s F/W Revision %d.%d.%d", @@ -1907,10 +1903,10 @@ isp_fibre_init(ispsoftc_t *isp) icbp->icb_logintime = ICB_LOGIN_TOV; #ifdef ISP_TARGET_MODE - if (IS_23XX(isp) && (icbp->icb_fwoptions & ICBOPT_TGT_ENABLE)) { + if (icbp->icb_fwoptions & ICBOPT_TGT_ENABLE) { icbp->icb_lunenables = 0xffff; - icbp->icb_ccnt = DFLT_CMND_CNT; - icbp->icb_icnt = DFLT_INOT_CNT; + icbp->icb_ccnt = 0xff; + icbp->icb_icnt = 0xff; icbp->icb_lunetimeout = ICB_LUN_ENABLE_TOV; } #endif @@ -4144,14 +4140,6 @@ isp_start(XS_T *xs) } } else { sdparam *sdp = SDPARAM(isp, XS_CHANNEL(xs)); - if ((sdp->role & ISP_ROLE_INITIATOR) == 0) { - isp_prt(isp, ISP_LOGDEBUG1, - "%d.%d.%jx I am not an initiator", - XS_CHANNEL(xs), target, (uintmax_t)XS_LUN(xs)); - XS_SETERR(xs, HBA_SELTIMEOUT); - return (CMD_COMPLETE); - } - if (isp->isp_state != ISP_RUNSTATE) { isp_prt(isp, ISP_LOGERR, "Adapter not at RUNSTATE"); XS_SETERR(xs, HBA_BOTCH); @@ -4759,21 +4747,17 @@ isp_control(ispsoftc_t *isp, ispctl_t ct return (r); } case ISPCTL_CHANGE_ROLE: - { - int role, r; - - va_start(ap, ctl); - chan = va_arg(ap, int); - role = va_arg(ap, int); - va_end(ap); if (IS_FC(isp)) { + int role, r; + + va_start(ap, ctl); + chan = va_arg(ap, int); + role = va_arg(ap, int); + va_end(ap); r = isp_fc_change_role(isp, chan, role); - } else { - SDPARAM(isp, chan)->role = role; - r = 0; + return (r); } - return (r); - } + break; default: isp_prt(isp, ISP_LOGERR, "Unknown Control Opcode 0x%x", ctl); break; @@ -7446,13 +7430,10 @@ isp_setdfltsdparm(ispsoftc_t *isp) sdparam *sdp, *sdp1; sdp = SDPARAM(isp, 0); - sdp->role = GET_DEFAULT_ROLE(isp, 0); - if (IS_DUALBUS(isp)) { + if (IS_DUALBUS(isp)) sdp1 = sdp + 1; - sdp1->role = GET_DEFAULT_ROLE(isp, 1); - } else { + else sdp1 = NULL; - } /* * Establish some default parameters. @@ -7586,7 +7567,7 @@ isp_setdfltfcparm(ispsoftc_t *isp, int c /* * Establish some default parameters. */ - fcp->role = GET_DEFAULT_ROLE(isp, chan); + fcp->role = DEFAULT_ROLE(isp, chan); fcp->isp_maxalloc = ICB_DFLT_ALLOC; fcp->isp_retry_delay = ICB_DFLT_RDELAY; fcp->isp_retry_count = ICB_DFLT_RCOUNT; Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:54:27 2015 (r291527) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:55:35 2015 (r291528) @@ -441,11 +441,13 @@ ispioctl(struct cdev *dev, u_long c, cad if (IS_FC(isp)) { *(int *)addr = FCPARAM(isp, chan)->role; } else { - *(int *)addr = SDPARAM(isp, chan)->role; + *(int *)addr = ISP_ROLE_INITIATOR; } retval = 0; break; case ISP_SETROLE: + if (IS_SCSI(isp)) + break; nr = *(int *)addr; chan = nr >> 8; if (chan < 0 || chan >= isp->isp_nchan) { @@ -458,10 +460,7 @@ ispioctl(struct cdev *dev, u_long c, cad break; } ISP_LOCK(isp); - if (IS_FC(isp)) - *(int *)addr = FCPARAM(isp, chan)->role; - else - *(int *)addr = SDPARAM(isp, chan)->role; + *(int *)addr = FCPARAM(isp, chan)->role; retval = isp_control(isp, ISPCTL_CHANGE_ROLE, chan, nr); ISP_UNLOCK(isp); retval = 0; @@ -774,18 +773,15 @@ isp_intr_enable(void *arg) int chan; ispsoftc_t *isp = arg; ISP_LOCK(isp); - for (chan = 0; chan < isp->isp_nchan; chan++) { - if (IS_FC(isp)) { + if (IS_FC(isp)) { + for (chan = 0; chan < isp->isp_nchan; chan++) { if (FCPARAM(isp, chan)->role != ISP_ROLE_NONE) { ISP_ENABLE_INTS(isp); break; } - } else { - if (SDPARAM(isp, chan)->role != ISP_ROLE_NONE) { - ISP_ENABLE_INTS(isp); - break; - } } + } else { + ISP_ENABLE_INTS(isp); } isp->isp_osinfo.ehook_active = 0; ISP_UNLOCK(isp); @@ -831,9 +827,6 @@ isp_free_pcmd(ispsoftc_t *isp, union ccb * Put the target mode functions here, because some are inlines */ #ifdef ISP_TARGET_MODE -static ISP_INLINE void isp_tmlock(ispsoftc_t *, const char *); -static ISP_INLINE void isp_tmunlk(ispsoftc_t *); -static ISP_INLINE int is_any_lun_enabled(ispsoftc_t *, int); static ISP_INLINE int is_lun_enabled(ispsoftc_t *, int, lun_id_t); static ISP_INLINE tstate_t *get_lun_statep(ispsoftc_t *, int, lun_id_t); static ISP_INLINE tstate_t *get_lun_statep_from_tag(ispsoftc_t *, int, uint32_t); @@ -848,23 +841,16 @@ static ISP_INLINE void isp_put_ntpd(isps static cam_status create_lun_state(ispsoftc_t *, int, struct cam_path *, tstate_t **); static void destroy_lun_state(ispsoftc_t *, tstate_t *); static void isp_enable_lun(ispsoftc_t *, union ccb *); -static cam_status isp_enable_deferred_luns(ispsoftc_t *, int); -static cam_status isp_enable_deferred(ispsoftc_t *, int, lun_id_t); static void isp_disable_lun(ispsoftc_t *, union ccb *); -static int isp_enable_target_mode(ispsoftc_t *, int); -static int isp_disable_target_mode(ispsoftc_t *, int); -static void isp_ledone(ispsoftc_t *, lun_entry_t *); static timeout_t isp_refire_putback_atio; static timeout_t isp_refire_notify_ack; static void isp_complete_ctio(union ccb *); static void isp_target_putback_atio(union ccb *); enum Start_Ctio_How { FROM_CAM, FROM_TIMER, FROM_SRR, FROM_CTIO_DONE }; static void isp_target_start_ctio(ispsoftc_t *, union ccb *, enum Start_Ctio_How); -static void isp_handle_platform_atio(ispsoftc_t *, at_entry_t *); static void isp_handle_platform_atio2(ispsoftc_t *, at2_entry_t *); static void isp_handle_platform_atio7(ispsoftc_t *, at7_entry_t *); static void isp_handle_platform_ctio(ispsoftc_t *, void *); -static void isp_handle_platform_notify_scsi(ispsoftc_t *, in_entry_t *); static void isp_handle_platform_notify_fc(ispsoftc_t *, in_fcentry_t *); static void isp_handle_platform_notify_24xx(ispsoftc_t *, in_fcentry_24xx_t *); static int isp_handle_platform_target_notify_ack(ispsoftc_t *, isp_notify_t *); @@ -872,40 +858,6 @@ static void isp_handle_platform_target_t static void isp_target_mark_aborted(ispsoftc_t *, union ccb *); static void isp_target_mark_aborted_early(ispsoftc_t *, tstate_t *, uint32_t); -static ISP_INLINE void -isp_tmlock(ispsoftc_t *isp, const char *msg) -{ - while (isp->isp_osinfo.tmbusy) { - isp->isp_osinfo.tmwanted = 1; - mtx_sleep(isp, &isp->isp_lock, PRIBIO, msg, 0); - } - isp->isp_osinfo.tmbusy = 1; -} - -static ISP_INLINE void -isp_tmunlk(ispsoftc_t *isp) -{ - isp->isp_osinfo.tmbusy = 0; - if (isp->isp_osinfo.tmwanted) { - isp->isp_osinfo.tmwanted = 0; - wakeup(isp); - } -} - -static ISP_INLINE int -is_any_lun_enabled(ispsoftc_t *isp, int bus) -{ - struct tslist *lhp; - int i; - - for (i = 0; i < LUN_HASH_SIZE; i++) { - ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); - if (SLIST_FIRST(lhp)) - return (1); - } - return (0); -} - static ISP_INLINE int is_lun_enabled(ispsoftc_t *isp, int bus, lun_id_t lun) { @@ -1222,233 +1174,59 @@ destroy_lun_state(ispsoftc_t *isp, tstat free(tptr, M_DEVBUF); } -/* - * Enable a lun. - */ static void isp_enable_lun(ispsoftc_t *isp, union ccb *ccb) { - tstate_t *tptr = NULL; - int bus, tm_enabled, target_role; + tstate_t *tptr; + int bus; target_id_t target; lun_id_t lun; + if (!IS_FC(isp) || !ISP_CAP_TMODE(isp) || !ISP_CAP_SCCFW(isp)) { + xpt_print(ccb->ccb_h.path, "Target mode is not supported\n"); + ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; + xpt_done(ccb); + return; + } /* - * We only support either a wildcard target/lun or a target ID of zero and a non-wildcard lun + * We only support either target and lun both wildcard + * or target and lun both non-wildcard. */ bus = XS_CHANNEL(ccb); target = ccb->ccb_h.target_id; lun = ccb->ccb_h.target_lun; ISP_PATH_PRT(isp, ISP_LOGTDEBUG0|ISP_LOGCONFIG, ccb->ccb_h.path, "enabling lun %jx\n", (uintmax_t)lun); - if (target == CAM_TARGET_WILDCARD && lun != CAM_LUN_WILDCARD) { - ccb->ccb_h.status = CAM_LUN_INVALID; - xpt_done(ccb); - return; - } - - if (target != CAM_TARGET_WILDCARD && lun == CAM_LUN_WILDCARD) { + if ((target == CAM_TARGET_WILDCARD) != (lun == CAM_LUN_WILDCARD)) { ccb->ccb_h.status = CAM_LUN_INVALID; xpt_done(ccb); return; } - if (isp->isp_dblev & ISP_LOGTDEBUG0) { - xpt_print(ccb->ccb_h.path, - "enabling lun 0x%jx on channel %d\n", (uintmax_t)lun, bus); - } - - /* - * Wait until we're not busy with the lun enables subsystem - */ - isp_tmlock(isp, "isp_enable_lun"); - - /* - * This is as a good a place as any to check f/w capabilities. - */ - - if (IS_FC(isp)) { - if (ISP_CAP_TMODE(isp) == 0) { - xpt_print(ccb->ccb_h.path, "firmware does not support target mode\n"); - ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; - goto done; - } - /* - * We *could* handle non-SCCLUN f/w, but we'd have to - * dork with our already fragile enable/disable code. - */ - if (ISP_CAP_SCCFW(isp) == 0) { - xpt_print(ccb->ccb_h.path, "firmware not SCCLUN capable\n"); - ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; - goto done; - } - - target_role = (FCPARAM(isp, bus)->role & ISP_ROLE_TARGET) != 0; - - } else { - target_role = (SDPARAM(isp, bus)->role & ISP_ROLE_TARGET) != 0; - } - /* - * Create the state pointer. - * It should not already exist. - */ + /* Create the state pointer. It should not already exist. */ tptr = get_lun_statep(isp, bus, lun); if (tptr) { ccb->ccb_h.status = CAM_LUN_ALRDY_ENA; - goto done; + xpt_done(ccb); + return; } ccb->ccb_h.status = create_lun_state(isp, bus, ccb->ccb_h.path, &tptr); if (ccb->ccb_h.status != CAM_REQ_CMP) { - goto done; - } - - /* - * We have a tricky maneuver to perform here. - * - * If target mode isn't already enabled here, - * *and* our current role includes target mode, - * we enable target mode here. - * - */ - ISP_GET_PC(isp, bus, tm_enabled, tm_enabled); - if (tm_enabled == 0 && target_role != 0) { - if (isp_enable_target_mode(isp, bus)) { - ccb->ccb_h.status = CAM_REQ_CMP_ERR; - destroy_lun_state(isp, tptr); - tptr = NULL; - goto done; - } - tm_enabled = 1; - } - - /* - * Now check to see whether this bus is in target mode already. - * - * If not, a later role change into target mode will finish the job. - */ - if (tm_enabled == 0) { - ISP_SET_PC(isp, bus, tm_enable_defer, 1); - ccb->ccb_h.status = CAM_REQ_CMP; - xpt_print(ccb->ccb_h.path, "Target Mode not enabled yet- lun enable deferred\n"); - goto done1; - } - - /* - * Enable the lun. - */ - ccb->ccb_h.status = isp_enable_deferred(isp, bus, lun); - -done: - if (ccb->ccb_h.status != CAM_REQ_CMP) { - if (tptr) { - destroy_lun_state(isp, tptr); - tptr = NULL; - } - } else { - tptr->enabled = 1; - } -done1: - if (tptr) { - rls_lun_statep(isp, tptr); + xpt_done(ccb); + return; } - /* - * And we're outta here.... - */ - isp_tmunlk(isp); + rls_lun_statep(isp, tptr); + ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); } -static cam_status -isp_enable_deferred_luns(ispsoftc_t *isp, int bus) -{ - tstate_t *tptr = NULL; - struct tslist *lhp; - int i, n; - - - ISP_GET_PC(isp, bus, tm_enabled, i); - if (i == 1) { - return (CAM_REQ_CMP); - } - ISP_GET_PC(isp, bus, tm_enable_defer, i); - if (i == 0) { - return (CAM_REQ_CMP); - } - /* - * If this succeeds, it will set tm_enable - */ - if (isp_enable_target_mode(isp, bus)) { - return (CAM_REQ_CMP_ERR); - } - isp_tmlock(isp, "isp_enable_deferred_luns"); - for (n = i = 0; i < LUN_HASH_SIZE; i++) { - ISP_GET_PC_ADDR(isp, bus, lun_hash[i], lhp); - SLIST_FOREACH(tptr, lhp, next) { - tptr->hold++; - if (tptr->enabled == 0) { - if (isp_enable_deferred(isp, bus, tptr->ts_lun) == CAM_REQ_CMP) { - tptr->enabled = 1; - n++; - } - } else { - n++; - } - tptr->hold--; - } - } - isp_tmunlk(isp); - if (n == 0) { - return (CAM_REQ_CMP_ERR); - } - ISP_SET_PC(isp, bus, tm_enable_defer, 0); - return (CAM_REQ_CMP); -} - -static cam_status -isp_enable_deferred(ispsoftc_t *isp, int bus, lun_id_t lun) -{ - cam_status status; - int luns_already_enabled; - - ISP_GET_PC(isp, bus, tm_luns_enabled, luns_already_enabled); - isp_prt(isp, ISP_LOGTINFO, "%s: bus %d lun %u luns_enabled %d", __func__, bus, lun, luns_already_enabled); - if (IS_23XX(isp) || IS_24XX(isp) || - (IS_FC(isp) && luns_already_enabled)) { - status = CAM_REQ_CMP; - } else { - int cmd_cnt, not_cnt; - - if (IS_23XX(isp)) { - cmd_cnt = DFLT_CMND_CNT; - not_cnt = DFLT_INOT_CNT; - } else { - cmd_cnt = 64; - not_cnt = 8; - } - status = CAM_REQ_INPROG; - isp->isp_osinfo.rptr = &status; - if (isp_lun_cmd(isp, RQSTYPE_ENABLE_LUN, bus, lun == CAM_LUN_WILDCARD? 0 : lun, cmd_cnt, not_cnt)) { - status = CAM_RESRC_UNAVAIL; - } else { - mtx_sleep(&status, &isp->isp_lock, PRIBIO, "isp_enable_deferred", 0); - } - isp->isp_osinfo.rptr = NULL; - } - if (status == CAM_REQ_CMP) { - ISP_SET_PC(isp, bus, tm_luns_enabled, 1); - isp_prt(isp, ISP_LOGCONFIG|ISP_LOGTINFO, "bus %d lun %u now enabled for target mode", bus, lun); - } - return (status); -} - static void isp_disable_lun(ispsoftc_t *isp, union ccb *ccb) { tstate_t *tptr = NULL; int bus; - cam_status status; target_id_t target; lun_id_t lun; @@ -1457,143 +1235,24 @@ isp_disable_lun(ispsoftc_t *isp, union c lun = ccb->ccb_h.target_lun; ISP_PATH_PRT(isp, ISP_LOGTDEBUG0|ISP_LOGCONFIG, ccb->ccb_h.path, "disabling lun %jx\n", (uintmax_t)lun); - if (target == CAM_TARGET_WILDCARD && lun != CAM_LUN_WILDCARD) { + if ((target == CAM_TARGET_WILDCARD) != (lun == CAM_LUN_WILDCARD)) { ccb->ccb_h.status = CAM_LUN_INVALID; xpt_done(ccb); return; } - if (target != CAM_TARGET_WILDCARD && lun == CAM_LUN_WILDCARD) { - ccb->ccb_h.status = CAM_LUN_INVALID; + /* Find the state pointer. */ + if ((tptr = get_lun_statep(isp, bus, lun)) == NULL) { + ccb->ccb_h.status = CAM_PATH_INVALID; xpt_done(ccb); return; } - /* - * See if we're busy disabling a lun now. - */ - isp_tmlock(isp, "isp_disable_lun"); - status = CAM_REQ_INPROG; - - /* - * Find the state pointer. - */ - if ((tptr = get_lun_statep(isp, bus, lun)) == NULL) { - status = CAM_PATH_INVALID; - goto done; - } - - /* - * If we're a 24XX card, we're done. - */ - if (IS_23XX(isp) || IS_24XX(isp)) { - status = CAM_REQ_CMP; - goto done; - } - - /* - * For SCC FW, we only deal with lun zero. - */ - if (IS_FC(isp) && lun > 0) { - status = CAM_REQ_CMP; - goto done; - } - isp->isp_osinfo.rptr = &status; - if (isp_lun_cmd(isp, RQSTYPE_ENABLE_LUN, bus, lun, 0, 0)) { - status = CAM_RESRC_UNAVAIL; - } else { - mtx_sleep(&status, &isp->isp_lock, PRIBIO, "isp_disable_lun", 0); - } - isp->isp_osinfo.rptr = NULL; -done: - if (status == CAM_REQ_CMP) { - tptr->enabled = 0; - if (is_any_lun_enabled(isp, bus) == 0) { - if (isp_disable_target_mode(isp, bus)) { - status = CAM_REQ_CMP_ERR; - } - } - } - ccb->ccb_h.status = status; - if (status == CAM_REQ_CMP) { - destroy_lun_state(isp, tptr); - xpt_print(ccb->ccb_h.path, "lun now disabled for target mode\n"); - } else { - if (tptr) - rls_lun_statep(isp, tptr); - } - isp_tmunlk(isp); + destroy_lun_state(isp, tptr); + ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); } -static int -isp_enable_target_mode(ispsoftc_t *isp, int bus) -{ - int tm_enabled; - - ISP_GET_PC(isp, bus, tm_enabled, tm_enabled); - if (tm_enabled != 0) { - return (0); - } - if (IS_SCSI(isp)) { - mbreg_t mbs; - MBSINIT(&mbs, MBOX_ENABLE_TARGET_MODE, MBLOGALL, 0); - mbs.param[0] = MBOX_ENABLE_TARGET_MODE; - mbs.param[1] = ENABLE_TARGET_FLAG|ENABLE_TQING_FLAG; - mbs.param[2] = bus << 7; - if (isp_control(isp, ISPCTL_RUN_MBOXCMD, &mbs) < 0 || mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, "Unable to enable Target Role on Bus %d", bus); - return (EIO); - } - } - ISP_SET_PC(isp, bus, tm_enabled, 1); - isp_prt(isp, ISP_LOGINFO, "Target Role enabled on Bus %d", bus); - return (0); -} - -static int -isp_disable_target_mode(ispsoftc_t *isp, int bus) -{ - int tm_enabled; - - ISP_GET_PC(isp, bus, tm_enabled, tm_enabled); - if (tm_enabled == 0) { - return (0); - } - if (IS_SCSI(isp)) { - mbreg_t mbs; - MBSINIT(&mbs, MBOX_ENABLE_TARGET_MODE, MBLOGALL, 0); - mbs.param[2] = bus << 7; - if (isp_control(isp, ISPCTL_RUN_MBOXCMD, &mbs) < 0 || mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_prt(isp, ISP_LOGERR, "Unable to disable Target Role on Bus %d", bus); - return (EIO); - } - } - ISP_SET_PC(isp, bus, tm_enabled, 0); - isp_prt(isp, ISP_LOGINFO, "Target Role disabled on Bus %d", bus); - return (0); -} - -static void -isp_ledone(ispsoftc_t *isp, lun_entry_t *lep) -{ - uint32_t *rptr; - - rptr = isp->isp_osinfo.rptr; - if (lep->le_status != LUN_OK) { - isp_prt(isp, ISP_LOGERR, "ENABLE/MODIFY LUN returned 0x%x", lep->le_status); - if (rptr) { - *rptr = CAM_REQ_CMP_ERR; - wakeup_one(rptr); - } - } else { - if (rptr) { - *rptr = CAM_REQ_CMP; - wakeup_one(rptr); - } - } -} - static void isp_target_start_ctio(ispsoftc_t *isp, union ccb *ccb, enum Start_Ctio_How how) { @@ -1891,7 +1550,7 @@ isp_target_start_ctio(ispsoftc_t *isp, u isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO7[0x%x] seq %u nc %d CDB0=%x sstatus=0x%x flags=0x%x xfrlen=%u off=%u", __func__, cto->ct_rxid, ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), atp->cdb0, cto->ct_scsi_status, cto->ct_flags, xfrlen, atp->bytes_xfered); } - } else if (IS_FC(isp)) { + } else { ct2_entry_t *cto = (ct2_entry_t *) local; if (isp->isp_osinfo.sixtyfourbit) @@ -2040,41 +1699,6 @@ isp_target_start_ctio(ispsoftc_t *isp, u } isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO2[%x] seq %u nc %d CDB0=%x scsi status %x flags %x resid %d xfrlen %u offset %u", __func__, cto->ct_rxid, ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), atp->cdb0, cso->scsi_status, cto->ct_flags, cto->ct_resid, cso->dxfer_len, atp->bytes_xfered); - } else { - ct_entry_t *cto = (ct_entry_t *) local; - - cto->ct_header.rqs_entry_type = RQSTYPE_CTIO; - cto->ct_header.rqs_entry_count = 1; - cto->ct_header.rqs_seqno |= ATPD_SEQ_NOTIFY_CAM; - ATPD_SET_SEQNO(cto, atp); - cto->ct_iid = cso->init_id; - cto->ct_iid |= XS_CHANNEL(ccb) << 7; - cto->ct_tgt = ccb->ccb_h.target_id; - cto->ct_lun = ccb->ccb_h.target_lun; - cto->ct_fwhandle = cso->tag_id; - if (atp->rxid) { - cto->ct_tag_val = atp->rxid; - cto->ct_flags |= CT_TQAE; - } - if (ccb->ccb_h.flags & CAM_DIS_DISCONNECT) { - cto->ct_flags |= CT_NODISC; - } - if (cso->dxfer_len == 0) { - cto->ct_flags |= CT_NO_DATA; - } else if ((cso->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { - cto->ct_flags |= CT_DATA_IN; - } else { - cto->ct_flags |= CT_DATA_OUT; - } - if (ccb->ccb_h.flags & CAM_SEND_STATUS) { - cto->ct_flags |= CT_SENDSTATUS|CT_CCINCR; - cto->ct_scsi_status = cso->scsi_status; - cto->ct_resid = atp->orig_datalen - atp->bytes_xfered - atp->bytes_in_transit - xfrlen; - isp_prt(isp, ISP_LOGTDEBUG0, "%s: CTIO[%x] seq %u nc %d scsi status %x resid %d tag_id %x", __func__, - cto->ct_fwhandle, ATPD_GET_SEQNO(cto), ATPD_GET_NCAM(cto), cso->scsi_status, cso->resid, cso->tag_id); - } - ccb->ccb_h.flags &= ~CAM_SEND_SENSE; - cto->ct_timeout = 10; } if (isp_get_pcmd(isp, ccb)) { @@ -2104,11 +1728,8 @@ isp_target_start_ctio(ispsoftc_t *isp, u if (IS_24XX(isp)) { ct7_entry_t *cto = (ct7_entry_t *) local; cto->ct_syshandle = handle; - } else if (IS_FC(isp)) { - ct2_entry_t *cto = (ct2_entry_t *) local; - cto->ct_syshandle = handle; } else { - ct_entry_t *cto = (ct_entry_t *) local; + ct2_entry_t *cto = (ct2_entry_t *) local; cto->ct_syshandle = handle; } @@ -2167,6 +1788,7 @@ isp_target_putback_atio(union ccb *ccb) ispsoftc_t *isp; struct ccb_scsiio *cso; void *qe; + at2_entry_t local, *at = &local; isp = XS_ISP(ccb); @@ -2180,38 +1802,22 @@ isp_target_putback_atio(union ccb *ccb) } memset(qe, 0, QENTRY_LEN); cso = &ccb->csio; - if (IS_FC(isp)) { - at2_entry_t local, *at = &local; - ISP_MEMZERO(at, sizeof (at2_entry_t)); - at->at_header.rqs_entry_type = RQSTYPE_ATIO2; - at->at_header.rqs_entry_count = 1; - if (ISP_CAP_SCCFW(isp)) { - at->at_scclun = (uint16_t) ccb->ccb_h.target_lun; + ISP_MEMZERO(at, sizeof (at2_entry_t)); + at->at_header.rqs_entry_type = RQSTYPE_ATIO2; + at->at_header.rqs_entry_count = 1; + if (ISP_CAP_SCCFW(isp)) { + at->at_scclun = (uint16_t) ccb->ccb_h.target_lun; #if __FreeBSD_version < 1000700 - if (at->at_scclun >= 256) - at->at_scclun |= 0x4000; + if (at->at_scclun >= 256) + at->at_scclun |= 0x4000; #endif - } else { - at->at_lun = (uint8_t) ccb->ccb_h.target_lun; - } - at->at_status = CT_OK; - at->at_rxid = cso->tag_id; - at->at_iid = cso->ccb_h.target_id; - isp_put_atio2(isp, at, qe); } else { - at_entry_t local, *at = &local; - ISP_MEMZERO(at, sizeof (at_entry_t)); - at->at_header.rqs_entry_type = RQSTYPE_ATIO; - at->at_header.rqs_entry_count = 1; - at->at_iid = cso->init_id; - at->at_iid |= XS_CHANNEL(ccb) << 7; - at->at_tgt = cso->ccb_h.target_id; - at->at_lun = cso->ccb_h.target_lun; - at->at_status = CT_OK; - at->at_tag_val = AT_GET_TAG(cso->tag_id); - at->at_handle = AT_GET_HANDLE(cso->tag_id); - isp_put_atio(isp, at, qe); + at->at_lun = (uint8_t) ccb->ccb_h.target_lun; } + at->at_status = CT_OK; + at->at_rxid = cso->tag_id; + at->at_iid = cso->ccb_h.target_id; + isp_put_atio2(isp, at, qe); ISP_TDQE(isp, "isp_target_putback_atio", isp->isp_reqidx, qe); ISP_SYNC_REQUEST(isp); isp_complete_ctio(ccb); @@ -2226,131 +1832,6 @@ isp_complete_ctio(union ccb *ccb) } } -/* - * Handle ATIO stuff that the generic code can't. - * This means handling CDBs. - */ - -static void -isp_handle_platform_atio(ispsoftc_t *isp, at_entry_t *aep) -{ - tstate_t *tptr; - int status, bus; - struct ccb_accept_tio *atiop; - atio_private_data_t *atp; - - /* - * The firmware status (except for the QLTM_SVALID bit) - * indicates why this ATIO was sent to us. - * - * If QLTM_SVALID is set, the firmware has recommended Sense Data. - * - * If the DISCONNECTS DISABLED bit is set in the flags field, - * we're still connected on the SCSI bus. - */ - status = aep->at_status; - if ((status & ~QLTM_SVALID) == AT_PHASE_ERROR) { - /* - * Bus Phase Sequence error. We should have sense data - * suggested by the f/w. I'm not sure quite yet what - * to do about this for CAM. - */ - isp_prt(isp, ISP_LOGWARN, "PHASE ERROR"); - isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); - return; - } - if ((status & ~QLTM_SVALID) != AT_CDB) { - isp_prt(isp, ISP_LOGWARN, "bad atio (0x%x) leaked to platform", status); - isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); - return; - } - - bus = GET_BUS_VAL(aep->at_iid); - tptr = get_lun_statep(isp, bus, aep->at_lun); - if (tptr == NULL) { - tptr = get_lun_statep(isp, bus, CAM_LUN_WILDCARD); - if (tptr == NULL) { - /* - * Because we can't autofeed sense data back with - * a command for parallel SCSI, we can't give back - * a CHECK CONDITION. We'll give back a BUSY status - * instead. This works out okay because the only - * time we should, in fact, get this, is in the - * case that somebody configured us without the - * blackhole driver, so they get what they deserve. - */ - isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); - return; - } - } - - atp = isp_get_atpd(isp, tptr, aep->at_handle); - atiop = (struct ccb_accept_tio *) SLIST_FIRST(&tptr->atios); - if (atiop == NULL || atp == NULL) { - /* - * Because we can't autofeed sense data back with - * a command for parallel SCSI, we can't give back - * a CHECK CONDITION. We'll give back a QUEUE FULL status - * instead. This works out okay because the only time we - * should, in fact, get this, is in the case that we've - * run out of ATIOS. - */ - xpt_print(tptr->owner, "no %s for lun %x from initiator %d\n", (atp == NULL && atiop == NULL)? "ATIOs *or* ATPS" : - ((atp == NULL)? "ATPs" : "ATIOs"), aep->at_lun, aep->at_iid); - isp_endcmd(isp, aep, SCSI_STATUS_BUSY, 0); - if (atp) { - isp_put_atpd(isp, tptr, atp); - } - rls_lun_statep(isp, tptr); - return; - } - atp->rxid = aep->at_tag_val; - atp->state = ATPD_STATE_ATIO; - SLIST_REMOVE_HEAD(&tptr->atios, sim_links.sle); - tptr->atio_count--; - ISP_PATH_PRT(isp, ISP_LOGTDEBUG2, atiop->ccb_h.path, "Take FREE ATIO count now %d\n", tptr->atio_count); - atiop->ccb_h.target_id = aep->at_tgt; - atiop->ccb_h.target_lun = aep->at_lun; - if (aep->at_flags & AT_NODISC) { - atiop->ccb_h.flags |= CAM_DIS_DISCONNECT; - } else { - atiop->ccb_h.flags &= ~CAM_DIS_DISCONNECT; - } - - if (status & QLTM_SVALID) { - size_t amt = ISP_MIN(QLTM_SENSELEN, sizeof (atiop->sense_data)); - atiop->sense_len = amt; - ISP_MEMCPY(&atiop->sense_data, aep->at_sense, amt); - } else { - atiop->sense_len = 0; - } - - atiop->init_id = GET_IID_VAL(aep->at_iid); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Nov 30 21:56:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C43BBA3DCFC; Mon, 30 Nov 2015 21:56:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E36E159C; Mon, 30 Nov 2015 21:56:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULuVvW077337; Mon, 30 Nov 2015 21:56:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULuVD7077331; Mon, 30 Nov 2015 21:56:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302156.tAULuVD7077331@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291529 - in stable/10: share/man/man4 sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:56:33 -0000 Author: mav Date: Mon Nov 30 21:56:31 2015 New Revision: 291529 URL: https://svnweb.freebsd.org/changeset/base/291529 Log: MFC r291209: Fix target mode support for Qlogic 2200 FC adapters. Now target mode works for all supported FC adapters except ancient 2100, which is not tested. Modified: stable/10/share/man/man4/isp.4 stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/isp_pci.c stable/10/sys/dev/isp/ispmbox.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/isp.4 ============================================================================== --- stable/10/share/man/man4/isp.4 Mon Nov 30 21:55:35 2015 (r291528) +++ stable/10/share/man/man4/isp.4 Mon Nov 30 21:56:31 2015 (r291529) @@ -1,7 +1,6 @@ -.\" $NetBSD: isp.4,v 1.5 1999/12/18 18:33:05 mjacob Exp $ -.\" -.\" Copyright (c) 1998, 1999, 2001 -.\" Matthew Jacob, for NASA/Ames Research Center +.\" Copyright (c) 2009-2015 Alexander Motin +.\" Copyright (c) 2006 Marcus Alves Grando +.\" Copyright (c) 1998-2001 Matthew Jacob, for NASA/Ames Research Center .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -25,8 +24,6 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" Additional Copyright (c) 2006 by Marcus Alves Grando -.\" .\" $FreeBSD$ .\" .Dd November 22, 2015 @@ -34,7 +31,7 @@ .Os .Sh NAME .Nm isp -.Nd Qlogic based SCSI and FibreChannel SCSI Host Adapters +.Nd Qlogic based SPI and FibreChannel SCSI Host Adapters .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your @@ -52,23 +49,19 @@ isp_load="YES" .Ed .Sh DESCRIPTION This driver provides access to -.Tn SCSI +.Tn SPI or .Tn FibreChannel -devices. +SCSI devices. .Pp -SCSI features include support for Ultra SCSI and wide mode transactions -for +SPI supports initiator mode for Ultra SCSI and wide mode transactions for .Tn SCSI , Ultra2 LVD (1080, 1280), and Ultra3 LVD (10160, 12160). .Pp -Fibre Channel support uses FCP SCSI profile for -.Tn FibreChannel , -and utilizes Class 3 and Class 2 (2200 and later) connections. +Fibre Channel supports initiator and target modes of FCP SCSI profile, +utilizing Class 3 and Class 2 (2200 and later) connections. Support is available for Public and Private loops, Point-to-Point and Fabric connections. -The newer 2-Gigabit cards (2300, 2312, 2322), 4-Gigabit (2422, 2432) -and 8-Gigabit (2532) are supported in both initiator and target modes. .Sh FIRMWARE Firmware loading is supported if the .Xr ispfw 4 @@ -120,8 +113,7 @@ Optical 4Gb Fibre Channel PCIe cards. Optical 8Gb Fibre Channel PCIe cards. .El .Sh CONFIGURATION OPTIONS -Target mode support for 23xx and above Fibre Channel adapters may be -enabled with the +Target mode support for Fibre Channel adapters may be enabled with the .Pp .Cd options ISP_TARGET_MODE .Pp Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:55:35 2015 (r291528) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:56:31 2015 (r291529) @@ -1733,7 +1733,12 @@ isp_fibre_init(ispsoftc_t *isp) icbp->icb_fwoptions &= ~ICBOPT_TGT_ENABLE; } - if (fcp->role & ISP_ROLE_INITIATOR) { + /* + * For some reason my 2200 does not generate ATIOs in target mode + * if initiator is disabled. Extra logins are better then target + * not working at all. + */ + if ((fcp->role & ISP_ROLE_INITIATOR) || IS_2100(isp) || IS_2200(isp)) { icbp->icb_fwoptions &= ~ICBOPT_INI_DISABLE; } else { icbp->icb_fwoptions |= ICBOPT_INI_DISABLE; @@ -1954,6 +1959,8 @@ isp_fibre_init(ispsoftc_t *isp) } isp_prt(isp, ISP_LOGDEBUG0, "isp_fibre_init: fwopt 0x%x xfwopt 0x%x zfwopt 0x%x", icbp->icb_fwoptions, icbp->icb_xfwoptions, icbp->icb_zfwoptions); + if (isp->isp_dblev & ISP_LOGDEBUG1) + isp_print_bytes(isp, "isp_fibre_init", sizeof (*icbp), icbp); isp_put_icb(isp, icbp, (isp_icb_t *)fcp->isp_scratch); @@ -1966,17 +1973,14 @@ isp_fibre_init(ispsoftc_t *isp) mbs.param[3] = DMA_WD0(fcp->isp_scdma); mbs.param[6] = DMA_WD3(fcp->isp_scdma); mbs.param[7] = DMA_WD2(fcp->isp_scdma); - mbs.logval = MBLOGALL; isp_prt(isp, ISP_LOGDEBUG0, "INIT F/W from %p (%08x%08x)", fcp->isp_scratch, (uint32_t) ((uint64_t)fcp->isp_scdma >> 32), (uint32_t) fcp->isp_scdma); MEMORYBARRIER(isp, SYNC_SFORDEV, 0, sizeof (*icbp), 0); isp_mboxcmd(isp, &mbs); FC_SCRATCH_RELEASE(isp, 0); - if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { - isp_print_bytes(isp, "isp_fibre_init", sizeof (*icbp), icbp); + if (mbs.param[0] != MBOX_COMMAND_COMPLETE) return; - } isp->isp_reqidx = 0; isp->isp_reqodx = 0; isp->isp_residx = 0; Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:55:35 2015 (r291528) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:56:31 2015 (r291529) @@ -4947,7 +4947,7 @@ isp_fcp_next_crn(ispsoftc_t *isp, uint8_ struct isp_nexus *nxp; int idx; - if (isp->isp_type < ISP_HA_FC_2300) + if (IS_2100(isp)) return (0); chan = XS_CHANNEL(cmd); Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:55:35 2015 (r291528) +++ stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:56:31 2015 (r291529) @@ -963,7 +963,8 @@ isp_put_request_t2(ispsoftc_t *isp, ispr ISP_IOXPUT_8(isp, src->req_target, &dst->req_target); ISP_IOXPUT_16(isp, src->req_scclun, &dst->req_scclun); ISP_IOXPUT_16(isp, src->req_flags, &dst->req_flags); - ISP_IOXPUT_16(isp, src->req_reserved, &dst->req_reserved); + ISP_IOXPUT_8(isp, src->req_crn, &dst->req_crn); + ISP_IOXPUT_8(isp, src->req_reserved, &dst->req_reserved); ISP_IOXPUT_16(isp, src->req_time, &dst->req_time); ISP_IOXPUT_16(isp, src->req_seg_count, &dst->req_seg_count); for (i = 0; i < ASIZE(src->req_cdb); i++) { @@ -985,7 +986,8 @@ isp_put_request_t2e(ispsoftc_t *isp, isp ISP_IOXPUT_16(isp, src->req_target, &dst->req_target); ISP_IOXPUT_16(isp, src->req_scclun, &dst->req_scclun); ISP_IOXPUT_16(isp, src->req_flags, &dst->req_flags); - ISP_IOXPUT_16(isp, src->req_reserved, &dst->req_reserved); + ISP_IOXPUT_8(isp, src->req_crn, &dst->req_crn); + ISP_IOXPUT_8(isp, src->req_reserved, &dst->req_reserved); ISP_IOXPUT_16(isp, src->req_time, &dst->req_time); ISP_IOXPUT_16(isp, src->req_seg_count, &dst->req_seg_count); for (i = 0; i < ASIZE(src->req_cdb); i++) { Modified: stable/10/sys/dev/isp/isp_pci.c ============================================================================== --- stable/10/sys/dev/isp/isp_pci.c Mon Nov 30 21:55:35 2015 (r291528) +++ stable/10/sys/dev/isp/isp_pci.c Mon Nov 30 21:56:31 2015 (r291529) @@ -1488,7 +1488,7 @@ imc(void *arg, bus_dma_segment_t *segs, segs->ds_addr += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(imushp->isp)); imushp->vbase += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(imushp->isp)); - if (imushp->isp->isp_type >= ISP_HA_FC_2300) { + if (imushp->isp->isp_type >= ISP_HA_FC_2200) { imushp->isp->isp_osinfo.ecmd_dma = segs->ds_addr; imushp->isp->isp_osinfo.ecmd_free = (isp_ecmd_t *)imushp->vbase; imushp->isp->isp_osinfo.ecmd_base = imushp->isp->isp_osinfo.ecmd_free; @@ -1627,7 +1627,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) len += ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp)); } #endif - if (isp->isp_type >= ISP_HA_FC_2300) { + if (isp->isp_type >= ISP_HA_FC_2200) { len += (N_XCMDS * XCMD_SIZE); } @@ -1689,7 +1689,7 @@ isp_pci_mbxdma(ispsoftc_t *isp) bus_dma_tag_destroy(fc->tdmat); goto bad; } - if (isp->isp_type >= ISP_HA_FC_2300) { + if (!IS_2100(isp)) { for (i = 0; i < INITIAL_NEXUS_COUNT; i++) { struct isp_nexus *n = malloc(sizeof (struct isp_nexus), M_DEVBUF, M_NOWAIT | M_ZERO); if (n == NULL) { Modified: stable/10/sys/dev/isp/ispmbox.h ============================================================================== --- stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:55:35 2015 (r291528) +++ stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:56:31 2015 (r291529) @@ -481,7 +481,8 @@ typedef struct { uint16_t req_target; uint16_t req_scclun; uint16_t req_flags; - uint16_t req_reserved; + uint8_t req_crn; + uint8_t req_reserved; uint16_t req_time; uint16_t req_seg_count; uint8_t req_cdb[16]; @@ -1010,6 +1011,7 @@ typedef struct { #define ICBZOPT_RATE_AUTO 0x8000 #define ICBZOPT_RATE_TWOGB 0x4000 #define ICBZOPT_50_OHM 0x2000 +#define ICBZOPT_NO_LOCAL_PLOGI 0x0080 #define ICBZOPT_ENA_OOF 0x0040 /* out of order frame handling */ #define ICBZOPT_RSPSZ_MASK 0x0030 #define ICBZOPT_RSPSZ_24 0x0000 From owner-svn-src-all@freebsd.org Mon Nov 30 21:57:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F097A3DD7E; Mon, 30 Nov 2015 21:57:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E13651814; Mon, 30 Nov 2015 21:57:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULvHX0077423; Mon, 30 Nov 2015 21:57:17 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULvGpr077418; Mon, 30 Nov 2015 21:57:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302157.tAULvGpr077418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291530 - in stable/10: share/man/man4 sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:57:18 -0000 Author: mav Date: Mon Nov 30 21:57:16 2015 New Revision: 291530 URL: https://svnweb.freebsd.org/changeset/base/291530 Log: MFC r291221: Remove "disable" hint, which duplicates system-wide "disabled". Modified: stable/10/share/man/man4/isp.4 stable/10/sys/dev/isp/isp_freebsd.h stable/10/sys/dev/isp/isp_pci.c stable/10/sys/dev/isp/isp_sbus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/isp.4 ============================================================================== --- stable/10/share/man/man4/isp.4 Mon Nov 30 21:56:31 2015 (r291529) +++ stable/10/share/man/man4/isp.4 Mon Nov 30 21:57:16 2015 (r291530) @@ -124,8 +124,6 @@ The following options are switchable by .Pp They are: .Bl -tag -width indent -.It Va hint.isp.0.disable -A hint value to disable driver in kernel. .It Va hint.isp.0.fwload_disable A hint value to disable loading of firmware .Xr ispfw 4 . Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Mon Nov 30 21:56:31 2015 (r291529) +++ stable/10/sys/dev/isp/isp_freebsd.h Mon Nov 30 21:57:16 2015 (r291530) @@ -311,7 +311,6 @@ struct isposinfo { timer_active : 1, autoconf : 1, ehook_active : 1, - disabled : 1, mbox_sleeping : 1, mbox_sleep_ok : 1, mboxcmd_done : 1, Modified: stable/10/sys/dev/isp/isp_pci.c ============================================================================== --- stable/10/sys/dev/isp/isp_pci.c Mon Nov 30 21:56:31 2015 (r291529) +++ stable/10/sys/dev/isp/isp_pci.c Mon Nov 30 21:57:16 2015 (r291530) @@ -456,16 +456,6 @@ isp_get_generic_options(device_t dev, is { int tval; - /* - * Figure out if we're supposed to skip this one. - */ - tval = 0; - if (resource_int_value(device_get_name(dev), device_get_unit(dev), "disable", &tval) == 0 && tval) { - device_printf(dev, "disabled at user request\n"); - isp->isp_osinfo.disabled = 1; - return; - } - tval = 0; if (resource_int_value(device_get_name(dev), device_get_unit(dev), "fwload_disable", &tval) == 0 && tval != 0) { isp->isp_confopts |= ISP_CFG_NORELOAD; @@ -710,16 +700,6 @@ isp_pci_attach(device_t dev) isp_get_generic_options(dev, isp); /* - * Check to see if options have us disabled - */ - if (isp->isp_osinfo.disabled) { - /* - * But return zero to preserve unit numbering - */ - return (0); - } - - /* * Get PCI options- which in this case are just mapping preferences. */ isp_get_pci_options(dev, &m1, &m2); Modified: stable/10/sys/dev/isp/isp_sbus.c ============================================================================== --- stable/10/sys/dev/isp/isp_sbus.c Mon Nov 30 21:56:31 2015 (r291529) +++ stable/10/sys/dev/isp/isp_sbus.c Mon Nov 30 21:57:16 2015 (r291530) @@ -155,19 +155,6 @@ isp_sbus_attach(device_t dev) sbs->sbus_dev = dev; sbs->sbus_mdvec = mdvec; - /* - * Figure out if we're supposed to skip this one. - * If we are, we actually go to ISP_ROLE_NONE. - */ - - tval = 0; - if (resource_int_value(device_get_name(dev), device_get_unit(dev), - "disable", &tval) == 0 && tval) { - device_printf(dev, "device is disabled\n"); - /* but return 0 so the !$)$)*!$*) unit isn't reused */ - return (0); - } - role = 0; if (resource_int_value(device_get_name(dev), device_get_unit(dev), "role", &role) == 0 && From owner-svn-src-all@freebsd.org Mon Nov 30 21:57:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9500A3DDEE; Mon, 30 Nov 2015 21:57:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C7451984; Mon, 30 Nov 2015 21:57:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULvsCf077505; Mon, 30 Nov 2015 21:57:54 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULvsaK077502; Mon, 30 Nov 2015 21:57:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302157.tAULvsaK077502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291531 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:57:55 -0000 Author: mav Date: Mon Nov 30 21:57:54 2015 New Revision: 291531 URL: https://svnweb.freebsd.org/changeset/base/291531 Log: MFC r291265: Rename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV. New name better repsents its meaning for modern chips. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_target.c stable/10/sys/dev/isp/ispmbox.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:57:16 2015 (r291530) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:57:54 2015 (r291531) @@ -5646,7 +5646,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint #endif break; case ASYNC_LIP_ERROR: - case ASYNC_LIP_F8: + case ASYNC_LIP_NOS_OLS_RECV: case ASYNC_LIP_OCCURRED: case ASYNC_PTPMODE: /* Modified: stable/10/sys/dev/isp/isp_target.c ============================================================================== --- stable/10/sys/dev/isp/isp_target.c Mon Nov 30 21:57:16 2015 (r291530) +++ stable/10/sys/dev/isp/isp_target.c Mon Nov 30 21:57:54 2015 (r291531) @@ -639,7 +639,7 @@ isp_target_async(ispsoftc_t *isp, int bu isp_async(isp, ISPASYNC_TARGET_NOTIFY, ¬ify); break; case ASYNC_LIP_ERROR: - case ASYNC_LIP_F8: + case ASYNC_LIP_NOS_OLS_RECV: case ASYNC_LIP_OCCURRED: case ASYNC_LOOP_RESET: isp_prt(isp, ISP_LOGTDEBUG0, "%s: LIP RESET", __func__); Modified: stable/10/sys/dev/isp/ispmbox.h ============================================================================== --- stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:57:16 2015 (r291530) +++ stable/10/sys/dev/isp/ispmbox.h Mon Nov 30 21:57:54 2015 (r291531) @@ -252,7 +252,7 @@ #define ASYNC_LOOP_RESET 0x8013 /* FC only */ #define ASYNC_PDB_CHANGED 0x8014 #define ASYNC_CHANGE_NOTIFY 0x8015 -#define ASYNC_LIP_F8 0x8016 /* FC only */ +#define ASYNC_LIP_NOS_OLS_RECV 0x8016 /* FC only */ #define ASYNC_LIP_ERROR 0x8017 /* FC only */ #define ASYNC_AUTO_PLOGI_RJT 0x8018 #define ASYNC_SECURITY_UPDATE 0x801B From owner-svn-src-all@freebsd.org Mon Nov 30 21:58:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EE2CA3DE82; Mon, 30 Nov 2015 21:58:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2BF91B83; Mon, 30 Nov 2015 21:58:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAULwqnb077596; Mon, 30 Nov 2015 21:58:52 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAULwpgl077590; Mon, 30 Nov 2015 21:58:51 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302158.tAULwpgl077590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 21:58:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291532 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 21:58:53 -0000 Author: mav Date: Mon Nov 30 21:58:51 2015 New Revision: 291532 URL: https://svnweb.freebsd.org/changeset/base/291532 Log: MFC r291365, r291369: One more round of port scanner rewrite. - Make scan aborted by event restart immediately and infinitely. - Improve handling of some loop events from firmware. - Remove loop down timer, adding its functionality to scanner thread. - Some more unification and simplification. Modified: stable/10/sys/dev/isp/isp.c stable/10/sys/dev/isp/isp_freebsd.c stable/10/sys/dev/isp/isp_freebsd.h stable/10/sys/dev/isp/isp_library.c stable/10/sys/dev/isp/isp_pci.c stable/10/sys/dev/isp/ispvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Mon Nov 30 21:57:54 2015 (r291531) +++ stable/10/sys/dev/isp/isp.c Mon Nov 30 21:58:51 2015 (r291532) @@ -2810,6 +2810,8 @@ isp_fclink_test(ispsoftc_t *isp, int cha fcp = FCPARAM(isp, chan); + if (fcp->isp_loopstate < LOOP_HAVE_LINK) + return (-1); if (fcp->isp_loopstate >= LOOP_LTEST_DONE) return (0); @@ -2825,15 +2827,13 @@ isp_fclink_test(ispsoftc_t *isp, int cha if (fcp->isp_fwstate == FW_READY) { break; } + if (fcp->isp_loopstate < LOOP_TESTING_LINK) + goto abort; GET_NANOTIME(&hrb); if ((NANOTIME_SUB(&hrb, &hra) / 1000 + 1000 >= usdelay)) break; ISP_SLEEP(isp, 1000); } - - /* - * If we haven't gone to 'ready' state, return. - */ if (fcp->isp_fwstate != FW_READY) { isp_prt(isp, ISP_LOG_SANCFG, "Chan %d Firmware is not ready (%s)", @@ -2938,6 +2938,12 @@ not_on_fabric: } } + if (fcp->isp_loopstate < LOOP_TESTING_LINK) { +abort: + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d FC link test aborted", chan); + return (1); + } fcp->isp_loopstate = LOOP_LTEST_DONE; isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGCONFIG, "Chan %d WWPN %016jx WWNN %016jx", @@ -2968,12 +2974,10 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) fcportdb_t *lp; uint16_t dbidx; - if (fcp->isp_loopstate < LOOP_FSCAN_DONE) { + if (fcp->isp_loopstate < LOOP_FSCAN_DONE) return (-1); - } - if (fcp->isp_loopstate > LOOP_SYNCING_PDB) { + if (fcp->isp_loopstate >= LOOP_READY) return (0); - } isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC PDB sync", chan); @@ -3025,12 +3029,12 @@ isp_pdb_sync(ispsoftc_t *isp, int chan) } } - /* - * If we get here, we've for sure seen not only a valid loop - * but know what is or isn't on it, so mark this for usage - * in isp_start. - */ - fcp->loop_seen_once = 1; + if (fcp->isp_loopstate < LOOP_SYNCING_PDB) { + isp_prt(isp, ISP_LOG_SANCFG, + "Chan %d FC PDB sync aborted", chan); + return (1); + } + fcp->isp_loopstate = LOOP_READY; isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC PDB sync done", chan); return (0); @@ -3154,12 +3158,11 @@ isp_scan_loop(ispsoftc_t *isp, int chan) uint16_t handles[LOCAL_LOOP_LIM]; uint16_t handle; - if (fcp->isp_loopstate < LOOP_LTEST_DONE) { + if (fcp->isp_loopstate < LOOP_LTEST_DONE) return (-1); - } - if (fcp->isp_loopstate > LOOP_SCANNING_LOOP) { + if (fcp->isp_loopstate >= LOOP_LSCAN_DONE) return (0); - } + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC loop scan", chan); fcp->isp_loopstate = LOOP_SCANNING_LOOP; if (TOPO_IS_FABRIC(fcp->isp_topo)) { @@ -3214,8 +3217,8 @@ isp_scan_loop(ispsoftc_t *isp, int chan) if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { abort: isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d FC loop scan done (abort)", chan); - return (-1); + "Chan %d FC loop scan aborted", chan); + return (1); } if (node_wwn == INI_NONE) { continue; @@ -3424,12 +3427,11 @@ isp_scan_fabric(ispsoftc_t *isp, int cha int portidx, portlim, r; sns_gid_ft_rsp_t *rs0, *rs1; - if (fcp->isp_loopstate < LOOP_LSCAN_DONE) { + if (fcp->isp_loopstate < LOOP_LSCAN_DONE) return (-1); - } - if (fcp->isp_loopstate > LOOP_SCANNING_FABRIC) { + if (fcp->isp_loopstate >= LOOP_FSCAN_DONE) return (0); - } + isp_prt(isp, ISP_LOG_SANCFG, "Chan %d FC fabric scan", chan); fcp->isp_loopstate = LOOP_SCANNING_FABRIC; if (!TOPO_IS_FABRIC(fcp->isp_topo)) { @@ -3450,8 +3452,8 @@ fail: abort: FC_SCRATCH_RELEASE(isp, chan); isp_prt(isp, ISP_LOG_SANCFG, - "Chan %d FC fabric scan done (abort)", chan); - return (-1); + "Chan %d FC fabric scan aborted", chan); + return (1); } /* @@ -3478,11 +3480,11 @@ abort: if (r > 0) { fcp->isp_loopstate = LOOP_FSCAN_DONE; FC_SCRATCH_RELEASE(isp, chan); - return (0); + return (-1); } else if (r < 0) { fcp->isp_loopstate = LOOP_LTEST_DONE; /* try again */ FC_SCRATCH_RELEASE(isp, chan); - return (0); + return (-1); } MEMORYBARRIER(isp, SYNC_SFORCPU, IGPOFF, GIDLEN, chan); @@ -3504,7 +3506,7 @@ abort: rs1->snscb_cthdr.ct_explanation); FC_SCRATCH_RELEASE(isp, chan); fcp->isp_loopstate = LOOP_FSCAN_DONE; - return (0); + return (-1); } /* Check our buffer was big enough to get the full list. */ @@ -5657,11 +5659,10 @@ isp_parse_async_fc(ispsoftc_t *isp, uint fcp = FCPARAM(isp, chan); int topo = fcp->isp_topo; - if (fcp->role == ISP_ROLE_NONE) { + if (fcp->role == ISP_ROLE_NONE) continue; - } - - fcp->isp_loopstate = LOOP_NIL; + if (fcp->isp_loopstate > LOOP_HAVE_LINK) + fcp->isp_loopstate = LOOP_HAVE_LINK; ISP_SET_SENDMARKER(isp, chan, 1); isp_async(isp, ISPASYNC_LIP, chan); #ifdef ISP_TARGET_MODE @@ -5714,6 +5715,9 @@ isp_parse_async_fc(ispsoftc_t *isp, uint fcp = FCPARAM(isp, chan); if (fcp->role == ISP_ROLE_NONE) continue; + fcp->isp_linkstate = 1; + if (fcp->isp_loopstate < LOOP_HAVE_LINK) + fcp->isp_loopstate = LOOP_HAVE_LINK; ISP_SET_SENDMARKER(isp, chan, 1); isp_async(isp, ISPASYNC_LOOP_UP, chan); #ifdef ISP_TARGET_MODE @@ -5734,6 +5738,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint if (fcp->role == ISP_ROLE_NONE) continue; ISP_SET_SENDMARKER(isp, chan, 1); + fcp->isp_linkstate = 0; fcp->isp_loopstate = LOOP_NIL; isp_async(isp, ISPASYNC_LOOP_DOWN, chan); #ifdef ISP_TARGET_MODE @@ -5754,7 +5759,8 @@ isp_parse_async_fc(ispsoftc_t *isp, uint if (fcp->role == ISP_ROLE_NONE) continue; ISP_SET_SENDMARKER(isp, chan, 1); - fcp->isp_loopstate = LOOP_NIL; + if (fcp->isp_loopstate > LOOP_HAVE_LINK) + fcp->isp_loopstate = LOOP_HAVE_LINK; isp_async(isp, ISPASYNC_LOOP_RESET, chan); #ifdef ISP_TARGET_MODE if (isp_target_async(isp, chan, mbox)) { @@ -5797,6 +5803,8 @@ isp_parse_async_fc(ispsoftc_t *isp, uint continue; if (fcp->isp_loopstate > LOOP_LTEST_DONE) fcp->isp_loopstate = LOOP_LTEST_DONE; + else if (fcp->isp_loopstate < LOOP_HAVE_LINK) + fcp->isp_loopstate = LOOP_HAVE_LINK; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_PDB, nphdl, nlstate, reason); } @@ -5820,6 +5828,8 @@ isp_parse_async_fc(ispsoftc_t *isp, uint break; if (fcp->isp_loopstate > LOOP_LTEST_DONE) fcp->isp_loopstate = LOOP_LTEST_DONE; + else if (fcp->isp_loopstate < LOOP_HAVE_LINK) + fcp->isp_loopstate = LOOP_HAVE_LINK; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_SNS, portid); break; @@ -5867,7 +5877,7 @@ isp_parse_async_fc(ispsoftc_t *isp, uint break; } ISP_SET_SENDMARKER(isp, chan, 1); - FCPARAM(isp, chan)->isp_loopstate = LOOP_NIL; + FCPARAM(isp, chan)->isp_loopstate = LOOP_HAVE_LINK; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_OTHER); break; case ASYNC_P2P_INIT_ERR: @@ -5939,16 +5949,29 @@ isp_handle_other_response(ispsoftc_t *is if (fcp->role == ISP_ROLE_NONE) continue; c = (chan == 0) ? 127 : (chan - 1); - if (rid.ridacq_map[c / 16] & (1 << (c % 16))) { - fcp->isp_loopstate = LOOP_NIL; + if (rid.ridacq_map[c / 16] & (1 << (c % 16)) || + chan == 0) { + fcp->isp_loopstate = LOOP_HAVE_LINK; isp_async(isp, ISPASYNC_CHANGE_NOTIFY, chan, ISPASYNC_CHANGE_OTHER); + } else { + fcp->isp_loopstate = LOOP_NIL; + isp_async(isp, ISPASYNC_LOOP_DOWN, + chan); } } } else { - FCPARAM(isp, rid.ridacq_vp_index)->isp_loopstate = LOOP_NIL; - isp_async(isp, ISPASYNC_CHANGE_NOTIFY, - rid.ridacq_vp_index, ISPASYNC_CHANGE_OTHER); + fcparam *fcp = FCPARAM(isp, rid.ridacq_vp_index); + if (rid.ridacq_vp_status == RIDACQ_STS_COMPLETE || + rid.ridacq_vp_status == RIDACQ_STS_CHANGED) { + fcp->isp_loopstate = LOOP_HAVE_LINK; + isp_async(isp, ISPASYNC_CHANGE_NOTIFY, + rid.ridacq_vp_index, ISPASYNC_CHANGE_OTHER); + } else { + fcp->isp_loopstate = LOOP_NIL; + isp_async(isp, ISPASYNC_LOOP_DOWN, + rid.ridacq_vp_index); + } } return (1); case RQSTYPE_ATIO: Modified: stable/10/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:57:54 2015 (r291531) +++ stable/10/sys/dev/isp/isp_freebsd.c Mon Nov 30 21:58:51 2015 (r291532) @@ -50,13 +50,13 @@ __FBSDID("$FreeBSD$"); MODULE_VERSION(isp, 1); MODULE_DEPEND(isp, cam, 1, 1, 1); int isp_announced = 0; -int isp_fabric_hysteresis = 5; int isp_loop_down_limit = 60; /* default loop down limit */ int isp_quickboot_time = 7; /* don't wait more than N secs for loop up */ int isp_gone_device_time = 30; /* grace time before reporting device lost */ static const char prom3[] = "Chan %d [%u] PortID 0x%06x Departed because of %s"; -static void isp_freeze_loopdown(ispsoftc_t *, int, char *); +static void isp_freeze_loopdown(ispsoftc_t *, int); +static void isp_loop_changed(ispsoftc_t *isp, int chan); static d_ioctl_t ispioctl; static void isp_intr_enable(void *); static void isp_cam_async(void *, uint32_t, struct cam_path *, void *); @@ -64,8 +64,6 @@ static void isp_poll(struct cam_sim *); static timeout_t isp_watchdog; static timeout_t isp_gdt; static task_fn_t isp_gdt_task; -static timeout_t isp_ldt; -static task_fn_t isp_ldt_task; static void isp_kthread(void *); static void isp_action(struct cam_sim *, union ccb *); static int isp_timer_count; @@ -168,25 +166,13 @@ isp_attach_chan(ispsoftc_t *isp, struct fc->isp = isp; fc->ready = 1; - callout_init_mtx(&fc->ldt, &isp->isp_osinfo.lock, 0); callout_init_mtx(&fc->gdt, &isp->isp_osinfo.lock, 0); - TASK_INIT(&fc->ltask, 1, isp_ldt_task, fc); TASK_INIT(&fc->gtask, 1, isp_gdt_task, fc); - - /* - * We start by being "loop down" if we have an initiator role - */ - if (fcp->role & ISP_ROLE_INITIATOR) { - isp_freeze_loopdown(isp, chan, "isp_attach"); - callout_reset(&fc->ldt, isp_quickboot_time * hz, isp_ldt, fc); - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Starting Initial Loop Down Timer @ %lu", (unsigned long) time_uptime); - } + isp_loop_changed(isp, chan); ISP_UNLOCK(isp); if (THREAD_CREATE(isp_kthread, fc, &fc->kproc, 0, 0, "%s: fc_thrd%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) { xpt_free_path(fc->path); ISP_LOCK(isp); - if (callout_active(&fc->ldt)) - callout_stop(&fc->ldt); xpt_bus_deregister(cam_sim_path(fc->sim)); ISP_UNLOCK(isp); cam_sim_free(fc->sim, FALSE); @@ -377,13 +363,13 @@ isp_detach(ispsoftc_t *isp) } static void -isp_freeze_loopdown(ispsoftc_t *isp, int chan, char *msg) +isp_freeze_loopdown(ispsoftc_t *isp, int chan) { if (IS_FC(isp)) { struct isp_fc *fc = ISP_FC_PC(isp, chan); if (fc->simqfrozen == 0) { isp_prt(isp, ISP_LOGDEBUG0, - "Chan %d %s -- freeze simq (loopdown)", chan, msg); + "Chan %d Freeze simq (loopdown)", chan); fc->simqfrozen = SIMQFRZ_LOOPDOWN; #if __FreeBSD_version >= 1000039 xpt_hold_boot(); @@ -391,7 +377,7 @@ isp_freeze_loopdown(ispsoftc_t *isp, int xpt_freeze_simq(fc->sim, 1); } else { isp_prt(isp, ISP_LOGDEBUG0, - "Chan %d %s -- mark frozen (loopdown)", chan, msg); + "Chan %d Mark simq frozen (loopdown)", chan); fc->simqfrozen |= SIMQFRZ_LOOPDOWN; } } @@ -405,7 +391,8 @@ isp_unfreeze_loopdown(ispsoftc_t *isp, i int wasfrozen = fc->simqfrozen & SIMQFRZ_LOOPDOWN; fc->simqfrozen &= ~SIMQFRZ_LOOPDOWN; if (wasfrozen && fc->simqfrozen == 0) { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d releasing simq", __func__, chan); + isp_prt(isp, ISP_LOGDEBUG0, + "Chan %d Release simq", chan); xpt_release_simq(fc->sim, 1); #if __FreeBSD_version >= 1000039 xpt_release_boot(); @@ -481,7 +468,7 @@ ispioctl(struct cdev *dev, u_long c, cad break; } ISP_LOCK(isp); - if (isp_fc_runstate(isp, chan, 5 * 1000000)) { + if (isp_fc_runstate(isp, chan, 5 * 1000000) != LOOP_READY) { retval = EIO; } else { retval = 0; @@ -3270,41 +3257,59 @@ isp_gdt_task(void *arg, int pending) } /* - * Loop Down Timer Function- when loop goes down, a timer is started and - * and after it expires we come here and take all probational devices that - * the OS knows about and the tell the OS that they've gone away. - * + * When loop goes down we remember the time and freeze CAM command queue. + * During some time period we are trying to reprobe the loop. But if we + * fail, we tell the OS that devices have gone away and drop the freeze. + * * We don't clear the devices out of our port database because, when loop * come back up, we have to do some actual cleanup with the chip at that * point (implicit PLOGO, e.g., to get the chip's port database state right). */ static void -isp_ldt(void *arg) +isp_loop_changed(ispsoftc_t *isp, int chan) { - struct isp_fc *fc = arg; - taskqueue_enqueue(taskqueue_thread, &fc->ltask); + fcparam *fcp = FCPARAM(isp, chan); + struct isp_fc *fc = ISP_FC_PC(isp, chan); + + if (fc->loop_down_time) + return; + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop changed", chan); + if (fcp->role & ISP_ROLE_INITIATOR) + isp_freeze_loopdown(isp, chan); + fc->loop_dead = 0; + fc->loop_down_time = time_uptime; + wakeup(fc); } static void -isp_ldt_task(void *arg, int pending) +isp_loop_up(ispsoftc_t *isp, int chan) { - struct isp_fc *fc = arg; - ispsoftc_t *isp = fc->isp; - int chan = fc - isp->isp_osinfo.pc.fc; + struct isp_fc *fc = ISP_FC_PC(isp, chan); + + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop is up", chan); + fc->loop_seen_once = 1; + fc->loop_dead = 0; + fc->loop_down_time = 0; + isp_unfreeze_loopdown(isp, chan); +} + +static void +isp_loop_dead(ispsoftc_t *isp, int chan) +{ + fcparam *fcp = FCPARAM(isp, chan); + struct isp_fc *fc = ISP_FC_PC(isp, chan); fcportdb_t *lp; struct ac_contract ac; struct ac_device_changed *adc; int dbidx, i; - ISP_LOCK(isp); - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop Down Timer expired @ %lu", chan, (unsigned long) time_uptime); - callout_deactivate(&fc->ldt); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Chan %d Loop is dead", chan); /* * Notify to the OS all targets who we now consider have departed. */ for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { - lp = &FCPARAM(isp, chan)->portdb[dbidx]; + lp = &fcp->portdb[dbidx]; if (lp->state == FC_PORTDB_STATE_NIL) continue; @@ -3347,14 +3352,8 @@ isp_ldt_task(void *arg, int pending) } isp_unfreeze_loopdown(isp, chan); - /* - * The loop down timer has expired. Wake up the kthread - * to notice that fact (or make it false). - */ fc->loop_dead = 1; - fc->loop_down_time = fc->loop_down_limit+1; - wakeup(fc); - ISP_UNLOCK(isp); + fc->loop_down_time = 0; } static void @@ -3363,15 +3362,18 @@ isp_kthread(void *arg) struct isp_fc *fc = arg; ispsoftc_t *isp = fc->isp; int chan = fc - isp->isp_osinfo.pc.fc; - int slp = 0; + int slp = 0, d; + int lb, lim; mtx_lock(&isp->isp_osinfo.lock); while (isp->isp_osinfo.is_exiting == 0) { - int lb, lim; - - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d checking FC state", __func__, chan); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, + "Chan %d Checking FC state", chan); lb = isp_fc_runstate(isp, chan, 250000); + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, + "Chan %d FC got to %s state", chan, + isp_fc_loop_statename(lb)); /* * Our action is different based upon whether we're supporting @@ -3381,87 +3383,44 @@ isp_kthread(void *arg) * * If not, we simply just wait for loop to come up. */ - if (lb && (FCPARAM(isp, chan)->role & ISP_ROLE_INITIATOR)) { - /* - * Increment loop down time by the last sleep interval - */ - fc->loop_down_time += slp; - - if (lb < 0) { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d FC loop not up (down count %d)", __func__, chan, fc->loop_down_time); - } else { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d FC got to %d (down count %d)", __func__, chan, lb, fc->loop_down_time); - } - + if (lb == LOOP_READY || lb < 0) { + slp = 0; + } else { /* * If we've never seen loop up and we've waited longer * than quickboot time, or we've seen loop up but we've * waited longer than loop_down_limit, give up and go * to sleep until loop comes up. */ - if (FCPARAM(isp, chan)->loop_seen_once == 0) { + if (fc->loop_seen_once == 0) lim = isp_quickboot_time; - } else { + else lim = fc->loop_down_limit; - } - if (fc->loop_down_time >= lim) { - isp_freeze_loopdown(isp, chan, "loop limit hit"); + d = time_uptime - fc->loop_down_time; + if (d >= lim) slp = 0; - } else if (fc->loop_down_time < 10) { + else if (d < 10) slp = 1; - } else if (fc->loop_down_time < 30) { + else if (d < 30) slp = 5; - } else if (fc->loop_down_time < 60) { + else if (d < 60) slp = 10; - } else if (fc->loop_down_time < 120) { + else if (d < 120) slp = 20; - } else { - slp = 30; - } - - } else if (lb) { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d FC Loop Down", __func__, chan); - fc->loop_down_time += slp; - if (fc->loop_down_time > 300) - slp = 0; else - slp = 60; - } else { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d FC state OK", __func__, chan); - fc->loop_down_time = 0; - slp = 0; + slp = 30; } - - /* - * If this is past the first loop up or the loop is dead and if we'd frozen the simq, unfreeze it - * now so that CAM can start sending us commands. - * - * If the FC state isn't okay yet, they'll hit that in isp_start which will freeze the queue again - * or kill the commands, as appropriate. - */ - - if (FCPARAM(isp, chan)->loop_seen_once || fc->loop_dead) { - isp_unfreeze_loopdown(isp, chan); + if (slp == 0) { + if (lb == LOOP_READY) + isp_loop_up(isp, chan); + else + isp_loop_dead(isp, chan); } - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d sleep time %d", __func__, chan, slp); - + isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, + "Chan %d sleep for %d seconds", chan, slp); msleep(fc, &isp->isp_osinfo.lock, PRIBIO, "ispf", slp * hz); - - /* - * If slp is zero, we're waking up for the first time after - * things have been okay. In this case, we set a deferral state - * for all commands and delay hysteresis seconds before starting - * the FC state evaluation. This gives the loop/fabric a chance - * to settle. - */ - if (slp == 0 && fc->hysteresis) { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "%s: Chan %d sleep hysteresis ticks %d", __func__, chan, fc->hysteresis * hz); - mtx_unlock(&isp->isp_osinfo.lock); - pause("ispt", fc->hysteresis * hz); - mtx_lock(&isp->isp_osinfo.lock); - } } fc->num_threads -= 1; mtx_unlock(&isp->isp_osinfo.lock); @@ -3471,7 +3430,7 @@ isp_kthread(void *arg) static void isp_action(struct cam_sim *sim, union ccb *ccb) { - int bus, tgt, ts, error, lim; + int bus, tgt, ts, error; ispsoftc_t *isp; struct ccb_trans_settings *cts; @@ -3535,26 +3494,13 @@ isp_action(struct cam_sim *sim, union cc break; case CMD_RQLATER: /* - * We get this result for FC devices if the loop state isn't ready yet - * or if the device in question has gone zombie on us. - * - * If we've never seen Loop UP at all, we requeue this request and wait - * for the initial loop up delay to expire. + * We get this result if the loop isn't ready + * or if the device in question has gone zombie. */ - lim = ISP_FC_PC(isp, bus)->loop_down_limit; - if (FCPARAM(isp, bus)->loop_seen_once == 0 || ISP_FC_PC(isp, bus)->loop_down_time >= lim) { - if (FCPARAM(isp, bus)->loop_seen_once == 0) { - isp_prt(isp, ISP_LOGDEBUG0, - "%d.%jx loop not seen yet @ %lu", - XS_TGT(ccb), (uintmax_t)XS_LUN(ccb), - (unsigned long) time_uptime); - } else { - isp_prt(isp, ISP_LOGDEBUG0, - "%d.%jx downtime (%d) > lim (%d)", - XS_TGT(ccb), (uintmax_t)XS_LUN(ccb), - ISP_FC_PC(isp, bus)->loop_down_time, - lim); - } + if (ISP_FC_PC(isp, bus)->loop_dead) { + isp_prt(isp, ISP_LOGDEBUG0, + "%d.%jx loop is dead", + XS_TGT(ccb), (uintmax_t)XS_LUN(ccb)); ccb->ccb_h.status = CAM_SEL_TIMEOUT; isp_done((struct ccb_scsiio *) ccb); break; @@ -4260,49 +4206,20 @@ isp_async(ispsoftc_t *isp, ispasync_t cm msg = "LOOP Reset"; /* FALLTHROUGH */ case ISPASYNC_LOOP_DOWN: - { if (msg == NULL) msg = "LOOP Down"; va_start(ap, cmd); bus = va_arg(ap, int); va_end(ap); - - FCPARAM(isp, bus)->isp_linkstate = 0; - - fc = ISP_FC_PC(isp, bus); - if (cmd == ISPASYNC_LOOP_DOWN && fc->ready) { - /* - * We don't do any simq freezing if we are only in target mode - */ - if (FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) { - if (fc->path) { - isp_freeze_loopdown(isp, bus, msg); - } - } - if (!callout_active(&fc->ldt)) { - callout_reset(&fc->ldt, fc->loop_down_limit * hz, isp_ldt, fc); - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Starting Loop Down Timer @ %lu", (unsigned long) time_uptime); - } - } isp_fcp_reset_crn(isp, bus, /*tgt*/0, /*tgt_set*/ 0); - - isp_prt(isp, ISP_LOGINFO, "Chan %d: %s", bus, msg); + isp_loop_changed(isp, bus); + isp_prt(isp, ISP_LOGINFO, "Chan %d %s", bus, msg); break; - } case ISPASYNC_LOOP_UP: va_start(ap, cmd); bus = va_arg(ap, int); va_end(ap); - fc = ISP_FC_PC(isp, bus); - /* - * Now we just note that Loop has come up. We don't - * actually do anything because we're waiting for a - * Change Notify before activating the FC cleanup - * thread to look at the state of the loop again. - */ - FCPARAM(isp, bus)->isp_linkstate = 1; - fc->loop_dead = 0; - fc->loop_down_time = 0; + isp_loop_changed(isp, bus); isp_prt(isp, ISP_LOGINFO, "Chan %d Loop UP", bus); break; case ISPASYNC_DEV_ARRIVED: @@ -4435,18 +4352,7 @@ changed: msg = "Other Change Notify"; isp_prt(isp, ISP_LOGINFO, "Chan %d %s", bus, msg); } - - /* - * If the loop down timer is running, cancel it. - */ - if (fc->ready && callout_active(&fc->ldt)) { - isp_prt(isp, ISP_LOG_SANCFG|ISP_LOGDEBUG0, "Stopping Loop Down Timer @ %lu", (unsigned long) time_uptime); - callout_stop(&fc->ldt); - } - if (FCPARAM(isp, bus)->role & ISP_ROLE_INITIATOR) { - isp_freeze_loopdown(isp, bus, msg); - } - wakeup(fc); + isp_loop_changed(isp, bus); break; } #ifdef ISP_TARGET_MODE Modified: stable/10/sys/dev/isp/isp_freebsd.h ============================================================================== --- stable/10/sys/dev/isp/isp_freebsd.h Mon Nov 30 21:57:54 2015 (r291531) +++ stable/10/sys/dev/isp/isp_freebsd.h Mon Nov 30 21:58:51 2015 (r291532) @@ -228,9 +228,9 @@ struct isp_fc { bus_dmamap_t tdmap; uint64_t def_wwpn; uint64_t def_wwnn; - uint32_t loop_down_time; - uint32_t loop_down_limit; - uint32_t gone_device_time; + time_t loop_down_time; + int loop_down_limit; + int gone_device_time; /* * Per target/lun info- just to keep a per-ITL nexus crn count */ @@ -239,15 +239,13 @@ struct isp_fc { uint32_t simqfrozen : 3, default_id : 8, - hysteresis : 8, def_role : 2, /* default role */ gdt_running : 1, loop_dead : 1, + loop_seen_once : 1, fcbsy : 1, ready : 1; - struct callout ldt; /* loop down timer */ struct callout gdt; /* gone device timer */ - struct task ltask; struct task gtask; #ifdef ISP_TARGET_MODE struct tslist lun_hash[LUN_HASH_SIZE]; @@ -698,7 +696,6 @@ extern uint64_t isp_default_wwn(ispsoftc * driver global data */ extern int isp_announced; -extern int isp_fabric_hysteresis; extern int isp_loop_down_limit; extern int isp_gone_device_time; extern int isp_quickboot_time; Modified: stable/10/sys/dev/isp/isp_library.c ============================================================================== --- stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:57:54 2015 (r291531) +++ stable/10/sys/dev/isp/isp_library.c Mon Nov 30 21:58:51 2015 (r291532) @@ -394,33 +394,31 @@ isp_print_bytes(ispsoftc_t *isp, const c int isp_fc_runstate(ispsoftc_t *isp, int chan, int tval) { - fcparam *fcp; + fcparam *fcp = FCPARAM(isp, chan); + int res; - fcp = FCPARAM(isp, chan); - if (fcp->role == ISP_ROLE_NONE) { - return (0); - } - if (isp_control(isp, ISPCTL_FCLINK_TEST, chan, tval) != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: linktest failed for channel %d", chan); +again: + if (fcp->role == ISP_ROLE_NONE) return (-1); - } - if (isp_control(isp, ISPCTL_SCAN_LOOP, chan) != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: scan loop failed on channel %d", chan); - return (LOOP_LTEST_DONE); - } - if (isp_control(isp, ISPCTL_SCAN_FABRIC, chan) != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: scan fabric failed on channel %d", chan); - return (LOOP_LSCAN_DONE); - } - if (isp_control(isp, ISPCTL_PDB_SYNC, chan) != 0) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: pdb_sync failed on channel %d", chan); - return (LOOP_FSCAN_DONE); - } - if (fcp->isp_loopstate != LOOP_READY) { - isp_prt(isp, ISP_LOG_SANCFG, "isp_fc_runstate: not ready again on channel %d", chan); - return (-1); - } - return (0); + res = isp_control(isp, ISPCTL_FCLINK_TEST, chan, tval); + if (res > 0) + goto again; + if (res < 0) + return (fcp->isp_loopstate); + res = isp_control(isp, ISPCTL_SCAN_LOOP, chan); + if (res > 0) + goto again; + if (res < 0) + return (fcp->isp_loopstate); + res = isp_control(isp, ISPCTL_SCAN_FABRIC, chan); + if (res > 0) + goto again; + if (res < 0) + return (fcp->isp_loopstate); + res = isp_control(isp, ISPCTL_PDB_SYNC, chan); + if (res > 0) + goto again; + return (fcp->isp_loopstate); } /* @@ -545,6 +543,7 @@ isp_fc_loop_statename(int state) { switch (state) { case LOOP_NIL: return "NIL"; + case LOOP_HAVE_LINK: return "Have Link"; case LOOP_TESTING_LINK: return "Testing Link"; case LOOP_LTEST_DONE: return "Link Test Done"; case LOOP_SCANNING_LOOP: return "Scanning Loop"; Modified: stable/10/sys/dev/isp/isp_pci.c ============================================================================== --- stable/10/sys/dev/isp/isp_pci.c Mon Nov 30 21:57:54 2015 (r291531) +++ stable/10/sys/dev/isp/isp_pci.c Mon Nov 30 21:58:51 2015 (r291532) @@ -638,16 +638,6 @@ isp_get_specific_options(device_t dev, i } } - tval = 0; - snprintf(name, sizeof(name), "%shysteresis", prefix); - (void) resource_int_value(device_get_name(dev), device_get_unit(dev), - "name", &tval); - if (tval >= 0 && tval < 256) { - ISP_FC_PC(isp, chan)->hysteresis = tval; - } else { - ISP_FC_PC(isp, chan)->hysteresis = isp_fabric_hysteresis; - } - tval = -1; snprintf(name, sizeof(name), "%sloop_down_limit", prefix); (void) resource_int_value(device_get_name(dev), device_get_unit(dev), Modified: stable/10/sys/dev/isp/ispvar.h ============================================================================== --- stable/10/sys/dev/isp/ispvar.h Mon Nov 30 21:57:54 2015 (r291531) +++ stable/10/sys/dev/isp/ispvar.h Mon Nov 30 21:58:51 2015 (r291532) @@ -438,10 +438,9 @@ typedef struct { int isp_loopstate; /* Loop State */ int isp_topo; /* Connection Type */ - uint32_t : 3, + uint32_t : 4, fctape_enabled : 1, sendmarker : 1, - loop_seen_once : 1, role : 2, isp_portid : 24; /* S_ID */ @@ -490,14 +489,15 @@ typedef struct { #define FW_NON_PART 7 #define LOOP_NIL 0 -#define LOOP_TESTING_LINK 1 -#define LOOP_LTEST_DONE 2 -#define LOOP_SCANNING_LOOP 3 -#define LOOP_LSCAN_DONE 4 -#define LOOP_SCANNING_FABRIC 5 -#define LOOP_FSCAN_DONE 6 -#define LOOP_SYNCING_PDB 7 -#define LOOP_READY 8 +#define LOOP_HAVE_LINK 1 +#define LOOP_TESTING_LINK 2 +#define LOOP_LTEST_DONE 3 +#define LOOP_SCANNING_LOOP 4 +#define LOOP_LSCAN_DONE 5 +#define LOOP_SCANNING_FABRIC 6 +#define LOOP_FSCAN_DONE 7 +#define LOOP_SYNCING_PDB 8 +#define LOOP_READY 9 #define TOPO_NL_PORT 0 #define TOPO_FL_PORT 1 From owner-svn-src-all@freebsd.org Mon Nov 30 22:09:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9615A3D0E6; Mon, 30 Nov 2015 22:09:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A57E211B5; Mon, 30 Nov 2015 22:09:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUM9twL080617; Mon, 30 Nov 2015 22:09:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUM9tb8080616; Mon, 30 Nov 2015 22:09:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302209.tAUM9tb8080616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 22:09:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291533 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 22:09:56 -0000 Author: mav Date: Mon Nov 30 22:09:55 2015 New Revision: 291533 URL: https://svnweb.freebsd.org/changeset/base/291533 Log: Use SPI name for parallel SCSI. Modified: head/share/man/man4/ispfw.4 Modified: head/share/man/man4/ispfw.4 ============================================================================== --- head/share/man/man4/ispfw.4 Mon Nov 30 21:58:51 2015 (r291532) +++ head/share/man/man4/ispfw.4 Mon Nov 30 22:09:55 2015 (r291533) @@ -22,12 +22,12 @@ .\" .\" $FreeBSD$ .\" -.Dd July 20, 2000 +.Dd November 30, 2015 .Dt ISPFW 4 .Os .Sh NAME .Nm ispfw -.Nd "Firmware Module for Qlogic based SCSI and FibreChannel SCSI Host Adapters" +.Nd "Firmware for Qlogic based SPI and FibreChannel SCSI Host Adapters" .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your @@ -44,7 +44,7 @@ ispfw_load="YES" .Ed .Sh DESCRIPTION This trivial driver provides access to firmware sets for the Qlogic -based SCSI and FibreChannel SCSI Host Adapters. +based SPI and FibreChannel SCSI Host Adapters. It may either be statically linked into the kernel, or loaded as a module. In either From owner-svn-src-all@freebsd.org Mon Nov 30 22:11:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2216AA3D196; Mon, 30 Nov 2015 22:11:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0D42156C; Mon, 30 Nov 2015 22:11:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUMBZ06083179; Mon, 30 Nov 2015 22:11:35 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUMBZMm083178; Mon, 30 Nov 2015 22:11:35 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201511302211.tAUMBZMm083178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 30 Nov 2015 22:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291534 - head/usr.sbin/nfsuserd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 22:11:36 -0000 Author: rmacklem Date: Mon Nov 30 22:11:34 2015 New Revision: 291534 URL: https://svnweb.freebsd.org/changeset/base/291534 Log: Add support for the "-manage-gids" option to the nfsuserd daemon. When this option is set, the NFS server uses the list of groups acquired via getgrouplist(3) for the uid instead of the list of groups in the RPC request. This can be used to avoid the 16 gid limit for the group list in the RPC request. Suggested by: jpaetzel Tested by: jpaetzel MFC after: 2 weeks Modified: head/usr.sbin/nfsuserd/nfsuserd.c Modified: head/usr.sbin/nfsuserd/nfsuserd.c ============================================================================== --- head/usr.sbin/nfsuserd/nfsuserd.c Mon Nov 30 22:09:55 2015 (r291533) +++ head/usr.sbin/nfsuserd/nfsuserd.c Mon Nov 30 22:11:34 2015 (r291534) @@ -92,7 +92,7 @@ uid_t defaultuid = (uid_t)32767; u_char *defaultgroup = "nogroup"; gid_t defaultgid = (gid_t)32767; int verbose = 0, im_a_slave = 0, nfsuserdcnt = -1, forcestart = 0; -int defusertimeout = DEFUSERTIMEOUT; +int defusertimeout = DEFUSERTIMEOUT, manage_gids = 0; pid_t slaves[MAXNFSUSERD]; int @@ -110,6 +110,8 @@ main(int argc, char *argv[]) char hostname[MAXHOSTNAMELEN + 1], *cp; struct addrinfo *aip, hints; static uid_t check_dups[MAXUSERMAX]; + gid_t grps[NGROUPS]; + int ngroup; if (modfind("nfscommon") < 0) { /* Not present in kernel, try loading it */ @@ -160,6 +162,8 @@ main(int argc, char *argv[]) verbose = 1; } else if (!strcmp(*argv, "-force")) { forcestart = 1; + } else if (!strcmp(*argv, "-manage-gids")) { + manage_gids = 1; } else if (!strcmp(*argv, "-usermax")) { if (argc == 1) usage(); @@ -297,12 +301,14 @@ main(int argc, char *argv[]) nid.nid_gid = defaultgid; nid.nid_name = dnsname; nid.nid_namelen = strlen(nid.nid_name); + nid.nid_ngroup = 0; + nid.nid_grps = NULL; nid.nid_flag = NFSID_INITIALIZE; #ifdef DEBUG printf("Initialize uid=%d gid=%d dns=%s\n", nid.nid_uid, nid.nid_gid, nid.nid_name); #else - error = nfssvc(NFSSVC_IDNAME, &nid); + error = nfssvc(NFSSVC_IDNAME | NFSSVC_NEWSTRUCT, &nid); if (error) errx(1, "Can't initialize nfs user/groups"); #endif @@ -316,11 +322,13 @@ main(int argc, char *argv[]) nid.nid_gid = grp->gr_gid; nid.nid_name = grp->gr_name; nid.nid_namelen = strlen(grp->gr_name); + nid.nid_ngroup = 0; + nid.nid_grps = NULL; nid.nid_flag = NFSID_ADDGID; #ifdef DEBUG printf("add gid=%d name=%s\n", nid.nid_gid, nid.nid_name); #else - error = nfssvc(NFSSVC_IDNAME, &nid); + error = nfssvc(NFSSVC_IDNAME | NFSSVC_NEWSTRUCT, &nid); if (error) errx(1, "Can't add group %s", grp->gr_name); #endif @@ -352,11 +360,23 @@ main(int argc, char *argv[]) nid.nid_uid = pwd->pw_uid; nid.nid_name = pwd->pw_name; nid.nid_namelen = strlen(pwd->pw_name); + if (manage_gids != 0) { + /* Get the group list for this user. */ + ngroup = NGROUPS; + if (getgrouplist(pwd->pw_name, pwd->pw_gid, grps, + &ngroup) < 0) + syslog(LOG_ERR, "Group list too small"); + nid.nid_ngroup = ngroup; + nid.nid_grps = grps; + } else { + nid.nid_ngroup = 0; + nid.nid_grps = NULL; + } nid.nid_flag = NFSID_ADDUID; #ifdef DEBUG printf("add uid=%d name=%s\n", nid.nid_uid, nid.nid_name); #else - error = nfssvc(NFSSVC_IDNAME, &nid); + error = nfssvc(NFSSVC_IDNAME | NFSSVC_NEWSTRUCT, &nid); if (error) errx(1, "Can't add user %s", pwd->pw_name); #endif @@ -439,6 +459,8 @@ nfsuserdsrv(struct svc_req *rqstp, SVCXP struct info info; struct nfsd_idargs nid; u_int32_t saddr; + gid_t grps[NGROUPS]; + int ngroup; /* * Only handle requests from 127.0.0.1 on a reserved port number. @@ -472,14 +494,28 @@ nfsuserdsrv(struct svc_req *rqstp, SVCXP nid.nid_usertimeout = defusertimeout; nid.nid_uid = pwd->pw_uid; nid.nid_name = pwd->pw_name; + if (manage_gids != 0) { + /* Get the group list for this user. */ + ngroup = NGROUPS; + if (getgrouplist(pwd->pw_name, pwd->pw_gid, + grps, &ngroup) < 0) + syslog(LOG_ERR, "Group list too small"); + nid.nid_ngroup = ngroup; + nid.nid_grps = grps; + } else { + nid.nid_ngroup = 0; + nid.nid_grps = NULL; + } } else { nid.nid_usertimeout = 5; nid.nid_uid = (uid_t)info.id; nid.nid_name = defaultuser; + nid.nid_ngroup = 0; + nid.nid_grps = NULL; } nid.nid_namelen = strlen(nid.nid_name); nid.nid_flag = NFSID_ADDUID; - error = nfssvc(NFSSVC_IDNAME, &nid); + error = nfssvc(NFSSVC_IDNAME | NFSSVC_NEWSTRUCT, &nid); if (error) { info.retval = error; syslog(LOG_ERR, "Can't add user %s\n", pwd->pw_name); @@ -509,8 +545,10 @@ nfsuserdsrv(struct svc_req *rqstp, SVCXP nid.nid_name = defaultgroup; } nid.nid_namelen = strlen(nid.nid_name); + nid.nid_ngroup = 0; + nid.nid_grps = NULL; nid.nid_flag = NFSID_ADDGID; - error = nfssvc(NFSSVC_IDNAME, &nid); + error = nfssvc(NFSSVC_IDNAME | NFSSVC_NEWSTRUCT, &nid); if (error) { info.retval = error; syslog(LOG_ERR, "Can't add group %s\n", @@ -541,8 +579,10 @@ nfsuserdsrv(struct svc_req *rqstp, SVCXP nid.nid_name = info.name; } nid.nid_namelen = strlen(nid.nid_name); + nid.nid_ngroup = 0; + nid.nid_grps = NULL; nid.nid_flag = NFSID_ADDUSERNAME; - error = nfssvc(NFSSVC_IDNAME, &nid); + error = nfssvc(NFSSVC_IDNAME | NFSSVC_NEWSTRUCT, &nid); if (error) { info.retval = error; syslog(LOG_ERR, "Can't add user %s\n", pwd->pw_name); @@ -572,8 +612,10 @@ nfsuserdsrv(struct svc_req *rqstp, SVCXP nid.nid_name = info.name; } nid.nid_namelen = strlen(nid.nid_name); + nid.nid_ngroup = 0; + nid.nid_grps = NULL; nid.nid_flag = NFSID_ADDGROUPNAME; - error = nfssvc(NFSSVC_IDNAME, &nid); + error = nfssvc(NFSSVC_IDNAME | NFSSVC_NEWSTRUCT, &nid); if (error) { info.retval = error; syslog(LOG_ERR, "Can't add group %s\n", @@ -679,5 +721,5 @@ usage(void) { errx(1, - "usage: nfsuserd [-usermax cache_size] [-usertimeout minutes] [-verbose] [-domain domain_name] [n]"); + "usage: nfsuserd [-usermax cache_size] [-usertimeout minutes] [-verbose] [-manage-gids] [-domain domain_name] [n]"); } From owner-svn-src-all@freebsd.org Mon Nov 30 22:16:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3070FA3D370; Mon, 30 Nov 2015 22:16:32 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D59E41A7E; Mon, 30 Nov 2015 22:16:31 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUMGUuF083493; Mon, 30 Nov 2015 22:16:30 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUMGUv6083492; Mon, 30 Nov 2015 22:16:30 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201511302216.tAUMGUv6083492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 30 Nov 2015 22:16:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291535 - head/usr.sbin/nfsuserd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 22:16:32 -0000 Author: rmacklem Date: Mon Nov 30 22:16:30 2015 New Revision: 291535 URL: https://svnweb.freebsd.org/changeset/base/291535 Log: Document the new "-manage-gids" option for the nfsuserd daemon. This is a content change. Suggested by: jpaetzel Tested by: jpaetzel MFC after: 2 weeks Modified: head/usr.sbin/nfsuserd/nfsuserd.8 Modified: head/usr.sbin/nfsuserd/nfsuserd.8 ============================================================================== --- head/usr.sbin/nfsuserd/nfsuserd.8 Mon Nov 30 22:11:34 2015 (r291534) +++ head/usr.sbin/nfsuserd/nfsuserd.8 Mon Nov 30 22:16:30 2015 (r291535) @@ -24,14 +24,14 @@ .\" .\" $FreeBSD$ .\" -.Dd April 25, 2009 +.Dd November 1, 2015 .Dt NFSUSERD 8 .Os .Sh NAME .Nm nfsuserd .Nd load user and group information into the kernel for .Tn NFSv4 -services +services plus support manage-gids for all NFS versions .Sh SYNOPSIS .Nm nfsuserd .Op Fl domain Ar domain_name @@ -39,11 +39,14 @@ services .Op Fl usermax Ar max_cache_size .Op Fl verbose .Op Fl force +.Op Fl manage-gids .Op Ar num_servers .Sh DESCRIPTION .Nm loads user and group information into the kernel for NFSv4. It must be running for NFSv4 to function correctly, either client or server. +It also provides support for manage-gids and must be running on the server if +this is being used for any version of NFS. .Pp Upon startup, it loads the machines DNS domain name, plus timeout and cache size limit into the kernel. It then preloads the cache with group @@ -79,6 +82,15 @@ When set, the server logs a bunch of inf This flag option must be set to restart the daemon after it has gone away abnormally and refuses to start, because it thinks nfsuserd is already running. +.It Fl manage-gids +This flag enables manage-gids for the NFS server +.Xr nfsd 8 . +When this is enabled, all NFS requests using +AUTH_SYS authentication take the uid from the RPC request +and uses the group list for that uid provided by +.Xr getgrouplist 3 +on the server instead of the list of groups provided in the RPC authenticator. +This can be used to avoid the 16 group limit for AUTH_SYS. .It Ar num_servers Specifies how many servers to create (max 20). The default of 4 may be sufficient. You should run enough servers, so that @@ -90,6 +102,7 @@ such as a process table entry and swap s .El .Sh SEE ALSO .Xr getgrent 3 , +.Xr getgrouplist 3 , .Xr getpwent 3 , .Xr nfsv4 4 , .Xr group 5 , @@ -103,7 +116,8 @@ utility was introduced with the NFSv4 ex The .Nm use -.Xr getgrent 3 +.Xr getgrent 3 , +.Xr getgrouplist 3 and .Xr getpwent 3 library calls to resolve requests and will hang if the servers handling From owner-svn-src-all@freebsd.org Mon Nov 30 22:29:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 895F3A3D533; Mon, 30 Nov 2015 22:29:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CDCC109D; Mon, 30 Nov 2015 22:29:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUMTC7x086515; Mon, 30 Nov 2015 22:29:12 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUMTCXw086512; Mon, 30 Nov 2015 22:29:12 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201511302229.tAUMTCXw086512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 30 Nov 2015 22:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291536 - in head/etc: defaults rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 22:29:13 -0000 Author: rmacklem Date: Mon Nov 30 22:29:11 2015 New Revision: 291536 URL: https://svnweb.freebsd.org/changeset/base/291536 Log: Add support for the new "-manage-gids" option for the nfsuserd daemon to the rc scripts. With these changes, setting nfs_server_managegids="YES" in /etc/rc.conf will enable this capability. Suggested by: jpaetzel Tested by: jpaetzel Reviewed by: rc (pending) MFC after: 2 weeks Modified: head/etc/defaults/rc.conf head/etc/rc.d/nfsd head/etc/rc.d/nfsuserd Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Mon Nov 30 22:16:30 2015 (r291535) +++ head/etc/defaults/rc.conf Mon Nov 30 22:29:11 2015 (r291536) @@ -326,6 +326,7 @@ nfs_client_enable="NO" # This host is a nfs_access_cache="60" # Client cache timeout in seconds nfs_server_enable="NO" # This host is an NFS server (or NO). nfs_server_flags="-u -t" # Flags to nfsd (if enabled). +nfs_server_managegids="NO" # The NFS server maps gids for AUTH_SYS (or NO). mountd_enable="NO" # Run mountd (or NO). mountd_flags="-r" # Flags to mountd (if NFS server enabled). weak_mountd_authentication="NO" # Allow non-root mount requests to be served. Modified: head/etc/rc.d/nfsd ============================================================================== --- head/etc/rc.d/nfsd Mon Nov 30 22:16:30 2015 (r291535) +++ head/etc/rc.d/nfsd Mon Nov 30 22:29:11 2015 (r291536) @@ -32,9 +32,13 @@ nfsd_precmd() sysctl vfs.nfsd.nfs_privport=0 > /dev/null fi + if checkyesno nfsv4_server_enable || \ + checkyesno nfs_server_managegids; then + force_depend nfsuserd || err 1 "Cannot run nfsuserd" + fi + if checkyesno nfsv4_server_enable; then sysctl vfs.nfsd.server_max_nfsvers=4 > /dev/null - force_depend nfsuserd || err 1 "Cannot run nfsuserd" else echo 'NFSv4 is disabled' sysctl vfs.nfsd.server_max_nfsvers=3 > /dev/null Modified: head/etc/rc.d/nfsuserd ============================================================================== --- head/etc/rc.d/nfsuserd Mon Nov 30 22:16:30 2015 (r291535) +++ head/etc/rc.d/nfsuserd Mon Nov 30 22:29:11 2015 (r291536) @@ -15,5 +15,14 @@ command="/usr/sbin/${name}" sig_stop="USR1" load_rc_config $name +start_precmd="nfsuserd_precmd" + +nfsuserd_precmd() +{ + if checkyesno nfs_server_managegids; then + rc_flags="-manage-gids ${nfsuserd_flags}" + fi + return 0 +} run_rc_command "$1" From owner-svn-src-all@freebsd.org Mon Nov 30 22:35:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E331A3D6EC; Mon, 30 Nov 2015 22:35:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 440AC17B9; Mon, 30 Nov 2015 22:35:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUMZrrH089431; Mon, 30 Nov 2015 22:35:53 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUMZrMH089430; Mon, 30 Nov 2015 22:35:53 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201511302235.tAUMZrMH089430@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 30 Nov 2015 22:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291537 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 22:35:54 -0000 Author: rmacklem Date: Mon Nov 30 22:35:53 2015 New Revision: 291537 URL: https://svnweb.freebsd.org/changeset/base/291537 Log: Bump __FreeBSD_version since r291527 changes the interface between the nfsd.ko and nfscommon.ko modules. As such, both modules need to be upgraded to-gether. Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Nov 30 22:29:11 2015 (r291536) +++ head/sys/sys/param.h Mon Nov 30 22:35:53 2015 (r291537) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100090 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100091 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Mon Nov 30 22:46:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1927FA3D91B; Mon, 30 Nov 2015 22:46:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D96471EDA; Mon, 30 Nov 2015 22:46:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUMkYfo092764; Mon, 30 Nov 2015 22:46:34 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUMkYaN092763; Mon, 30 Nov 2015 22:46:34 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201511302246.tAUMkYaN092763@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 30 Nov 2015 22:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291538 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 22:46:36 -0000 Author: rmacklem Date: Mon Nov 30 22:46:34 2015 New Revision: 291538 URL: https://svnweb.freebsd.org/changeset/base/291538 Log: Document the __FreeBSD_version bump done for r291527 in UPDATING. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Nov 30 22:35:53 2015 (r291537) +++ head/UPDATING Mon Nov 30 22:46:34 2015 (r291538) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20151130: + r291527 changed the internal interface between the nfsd.ko and + nfscommon.ko modules. As such, they must both be upgraded to-gether. + __FreeBSD_version has been bumped because of this. + 20151108: Add support for unicode collation strings leads to a change of order of files listed by ls(1) for example. To get back to the old From owner-svn-src-all@freebsd.org Mon Nov 30 22:53:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 068ACA3DAF5; Mon, 30 Nov 2015 22:53:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4413139F; Mon, 30 Nov 2015 22:53:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUMrfRv095837; Mon, 30 Nov 2015 22:53:41 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUMrf2e095836; Mon, 30 Nov 2015 22:53:41 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511302253.tAUMrf2e095836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 30 Nov 2015 22:53:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291539 - head/lib/clang X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 22:53:43 -0000 Author: bdrewery Date: Mon Nov 30 22:53:41 2015 New Revision: 291539 URL: https://svnweb.freebsd.org/changeset/base/291539 Log: Only DIRDEPS_BUILD should trigger this logic. Missed in r290816. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/clang/clang.build.mk Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Mon Nov 30 22:46:34 2015 (r291538) +++ head/lib/clang/clang.build.mk Mon Nov 30 22:53:41 2015 (r291539) @@ -39,7 +39,7 @@ CXXFLAGS.clang+= -stdlib=libc++ .PATH: ${LLVM_SRCS}/${SRCDIR} -.if ${MK_META_MODE} == "yes" +.if ${MK_DIRDEPS_BUILD} == "yes" .if empty(TOOLSDIR) || !exists(${TOOLSDIR}/usr/bin/clang-tblgen) .if ${MACHINE} == "host" && defined(BOOTSTRAPPING_TOOLS) .if !empty(LEGACY_TOOLS) && exists(${LEGACY_TOOLS}/usr/bin/tblgen) @@ -58,7 +58,7 @@ TOOLSDIR?= TBLGEN= ${TOOLSDIR}/usr/bin/tblgen CLANG_TBLGEN= ${TOOLSDIR}/usr/bin/clang-tblgen .endif -.endif # ${MK_META_MODE} == "yes" +.endif # ${MK_DIRDEPS_BUILD} == "yes" TBLGEN?= tblgen CLANG_TBLGEN?= clang-tblgen From owner-svn-src-all@freebsd.org Mon Nov 30 22:53:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE0F6A3DB2F; Mon, 30 Nov 2015 22:53:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B7A9158A; Mon, 30 Nov 2015 22:53:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUMrtJ3095895; Mon, 30 Nov 2015 22:53:55 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUMrtOw095894; Mon, 30 Nov 2015 22:53:55 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201511302253.tAUMrtOw095894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 30 Nov 2015 22:53:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291540 - head/targets/pseudo/bootstrap-tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 22:53:56 -0000 Author: bdrewery Date: Mon Nov 30 22:53:55 2015 New Revision: 291540 URL: https://svnweb.freebsd.org/changeset/base/291540 Log: META MODE: Fix bootstrap-tools after r291349. Now that OBJTOP is assumed to be proper, it needs to be overridden for the bootstrap-tools phase to ensure it is not kept as the top-level OBJTOP. Otherwise the libraries were not found during the bootstrap-tools phase. Sponsored by: EMC / Isilon Storage Division Modified: head/targets/pseudo/bootstrap-tools/Makefile Modified: head/targets/pseudo/bootstrap-tools/Makefile ============================================================================== --- head/targets/pseudo/bootstrap-tools/Makefile Mon Nov 30 22:53:41 2015 (r291539) +++ head/targets/pseudo/bootstrap-tools/Makefile Mon Nov 30 22:53:55 2015 (r291540) @@ -43,6 +43,9 @@ BSARGS= DESTDIR= \ MK_LLDB=no MK_TESTS=no \ MK_INCLUDES=yes +# Need to override these so OBJTOP uses are proper in the non-meta build. +BSARGS+= OBJTOP=${BTOOLSDIR}${SRCTOP} OBJROOT='$${OBJTOP}/' + DISTRIB_ENV= INSTALL="sh ${SRCTOP}/tools/install.sh" NO_FSCHG=1 MK_TESTS=no legacy: .MAKE .META mkdir -p ${LEGACY_TOOLS} @@ -72,11 +75,11 @@ BSTCENV= \ TARGET_ARCH=${HOST_MACHINE_ARCH} BSTCARGS= \ - ${BSARGS} \ + ${BSARGS:NDESTDIR=*:NOBJTOP=*:NOBJROOT=*} \ BUILD_DIRDEPS=yes \ -DWITH_STAGING \ -DWITH_TOOLSDIR # finally we build toolchain leveraging the above. bootstrap-toolchain: .MAKE cross-tools - ${BSTCENV} ${MAKE} -C ${.CURDIR:H:H} ${BSTCARGS:NDESTDIR=} toolchain + ${BSTCENV} ${MAKE} -C ${.CURDIR:H:H} ${BSTCARGS} toolchain From owner-svn-src-all@freebsd.org Mon Nov 30 22:58:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F005CA3DBAA; Mon, 30 Nov 2015 22:58:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 998B3186B; Mon, 30 Nov 2015 22:58:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUMwmDn096157; Mon, 30 Nov 2015 22:58:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUMwm3t096156; Mon, 30 Nov 2015 22:58:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302258.tAUMwm3t096156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 22:58:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291541 - stable/10/sys/dev/ispfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 22:58:50 -0000 Author: mav Date: Mon Nov 30 22:58:48 2015 New Revision: 291541 URL: https://svnweb.freebsd.org/changeset/base/291541 Log: MFC r289755: Remove residual verbosity. firmware_register() already reports errors. Modified: stable/10/sys/dev/ispfw/ispfw.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ispfw/ispfw.c ============================================================================== --- stable/10/sys/dev/ispfw/ispfw.c Mon Nov 30 22:53:55 2015 (r291540) +++ stable/10/sys/dev/ispfw/ispfw.c Mon Nov 30 22:58:48 2015 (r291541) @@ -126,43 +126,27 @@ static int isp_2500_loaded; #define ISPFW_VERSION 1 -#if !defined(KLD_MODULE) -#define ISPFW_KLD 0 -#else -#define ISPFW_KLD 1 -#endif - #define RMACRO(token) do { \ if (token##_loaded) \ break; \ if (firmware_register(#token, token##_risc_code, \ token##_risc_code[3] * sizeof(token##_risc_code[3]), \ - ISPFW_VERSION, NULL) == NULL) { \ - printf("%s: unable to register firmware <%s>\n", \ - MODULE_NAME, #token); \ + ISPFW_VERSION, NULL) == NULL) \ break; \ - } \ token##_loaded++; \ - if (bootverbose || ISPFW_KLD) \ - printf("%s: registered firmware <%s>\n", MODULE_NAME, \ - #token); \ } while (0) #define UMACRO(token) do { \ if (!token##_loaded) \ break; \ if (firmware_unregister(#token) != 0) { \ - printf("%s: unable to unregister firmware <%s>\n", \ - MODULE_NAME, #token); \ + error = EBUSY; \ break; \ } \ token##_loaded--; \ - if (bootverbose || ISPFW_KLD) \ - printf("%s: unregistered firmware <%s>\n", MODULE_NAME, \ - #token); \ } while (0) -static void +static int do_load_fw(void) { @@ -196,11 +180,13 @@ do_load_fw(void) #if defined(ISP_2500) RMACRO(isp_2500); #endif + return (0); } -static void +static int do_unload_fw(void) { + int error = 0; #if defined(ISP_1000) UMACRO(isp_1000); @@ -232,6 +218,7 @@ do_unload_fw(void) #if defined(ISP_2500) UMACRO(isp_2500); #endif + return (error); } static int @@ -240,17 +227,11 @@ module_handler(module_t mod, int what, v switch (what) { case MOD_LOAD: - do_load_fw(); - break; + return (do_load_fw()); case MOD_UNLOAD: - do_unload_fw(); - break; - case MOD_SHUTDOWN: - break; - default: - return (EOPNOTSUPP); + return (do_unload_fw()); } - return (0); + return (EOPNOTSUPP); } static moduledata_t ispfw_mod = { MODULE_NAME, module_handler, NULL From owner-svn-src-all@freebsd.org Mon Nov 30 22:59:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C993DA3DBFD; Mon, 30 Nov 2015 22:59:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E26219B9; Mon, 30 Nov 2015 22:59:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUMxWDx096235; Mon, 30 Nov 2015 22:59:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUMxW7t096234; Mon, 30 Nov 2015 22:59:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302259.tAUMxW7t096234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 22:59:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291542 - stable/10/sys/dev/ispfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 22:59:33 -0000 Author: mav Date: Mon Nov 30 22:59:32 2015 New Revision: 291542 URL: https://svnweb.freebsd.org/changeset/base/291542 Log: MFC r291132: Update firmware for QLogic 22xx from 2.02.06 to 2.02.08. Modified: stable/10/sys/dev/ispfw/asm_2200.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ispfw/asm_2200.h ============================================================================== --- stable/10/sys/dev/ispfw/asm_2200.h Mon Nov 30 22:58:48 2015 (r291541) +++ stable/10/sys/dev/ispfw/asm_2200.h Mon Nov 30 22:59:32 2015 (r291542) @@ -29,3976 +29,4291 @@ * * * --- ISP2200 Initiator/Target Firmware --- * * with Fabric support (Public Loop) and * - * with expanded LUN addressing. * + * with expanded LUN addressing for FCTAPE. * * * ************************************************************************/ /* - * Firmware Version 2.02.06 (08:39 Jun 26, 2003) + * Firmware Version 2.02.08 */ -static const u_int16_t isp_2200_risc_code[] = { - 0x0470, 0x0000, 0x0000, 0x96cf, 0x0000, 0x0002, 0x0002, 0x0006, - 0x0007, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, +static const uint16_t isp_2200_risc_code[] = { + 0x0470, 0x0000, 0x0000, 0xa52b, 0x0000, 0x0002, 0x0002, 0x0008, + 0x0017, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3232, 0x3030, 0x2046, 0x6972, 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, - 0x322e, 0x3032, 0x2e30, 0x3620, 0x2020, 0x2020, 0x2400, 0x20c1, - 0x0005, 0x2001, 0x017f, 0x2003, 0x0000, 0x20c9, 0xabff, 0x2091, - 0x2000, 0x2059, 0x0000, 0x2b78, 0x7823, 0x0004, 0x2089, 0x28ce, - 0x2051, 0xa700, 0x2a70, 0x2029, 0xc600, 0x2031, 0xffff, 0x2039, - 0xc5f5, 0x2021, 0x0200, 0x0804, 0x1468, 0x20a1, 0xa6cf, 0xa00e, - 0x20a9, 0x0731, 0x41a4, 0x3400, 0x7562, 0x7666, 0x775e, 0x746a, - 0x746e, 0x20a1, 0xae00, 0x7164, 0x810d, 0x810d, 0x810d, 0x810d, - 0xa18c, 0x000f, 0x2001, 0x000a, 0xa112, 0xa00e, 0x21a8, 0x41a4, + 0x322e, 0x3032, 0x2e30, 0x3820, 0x2020, 0x2020, 0x2400, 0x20c1, + 0x0005, 0x2001, 0x017f, 0x2003, 0x0000, 0x20c9, 0xbbff, 0x2091, + 0x2000, 0x2059, 0x0000, 0x2b78, 0x7823, 0x0004, 0x2089, 0x299f, + 0x2051, 0xb600, 0x2a70, 0x2029, 0xee00, 0x2031, 0xffff, 0x2039, + 0xede9, 0x2021, 0x0200, 0x0804, 0x146d, 0x20a1, 0xb52b, 0xa00e, + 0x20a9, 0x08d5, 0x41a4, 0x3400, 0x7562, 0x7666, 0x775e, 0x746a, + 0x746e, 0x20a1, 0xbe00, 0x7164, 0x810d, 0x810d, 0x810d, 0x810d, + 0xa18c, 0x000f, 0x2001, 0x000b, 0xa112, 0xa00e, 0x21a8, 0x41a4, 0x3400, 0x8211, 0x1dd8, 0x7164, 0x3400, 0xa102, 0x0120, 0x0218, - 0x20a8, 0xa00e, 0x41a4, 0x3800, 0xd08c, 0x01d8, 0x2009, 0xa700, + 0x20a8, 0xa00e, 0x41a4, 0x3800, 0xd08c, 0x01d8, 0x2009, 0xb600, 0x810d, 0x810d, 0x810d, 0x810d, 0xa18c, 0x000f, 0x2001, 0x0001, 0xa112, 0x20a1, 0x1000, 0xa00e, 0x21a8, 0x41a4, 0x8211, 0x1de0, - 0x2009, 0xa700, 0x3400, 0xa102, 0x0120, 0x0218, 0x20a8, 0xa00e, - 0x41a4, 0x080c, 0x1411, 0x080c, 0x1632, 0x080c, 0x17cf, 0x080c, - 0x1f20, 0x080c, 0x4b3f, 0x080c, 0x807c, 0x080c, 0x15bb, 0x080c, - 0x2e1a, 0x080c, 0x5c7a, 0x080c, 0x5235, 0x080c, 0x6675, 0x080c, - 0x248e, 0x080c, 0x68f6, 0x080c, 0x6273, 0x080c, 0x2348, 0x080c, - 0x245c, 0x2091, 0x3009, 0x7823, 0x0000, 0x1004, 0x10c5, 0x7820, + 0x2009, 0xb600, 0x3400, 0xa102, 0x0120, 0x0218, 0x20a8, 0xa00e, + 0x41a4, 0x080c, 0x1416, 0x080c, 0x1637, 0x080c, 0x17d4, 0x080c, + 0x1fbe, 0x080c, 0x4c72, 0x080c, 0x8646, 0x080c, 0x15c0, 0x080c, + 0x2ef9, 0x080c, 0x5dfc, 0x080c, 0x53b3, 0x080c, 0x6940, 0x080c, + 0x2545, 0x080c, 0x6bd3, 0x080c, 0x642d, 0x080c, 0x23ff, 0x080c, + 0x2513, 0x2091, 0x3009, 0x7823, 0x0000, 0x1004, 0x10c5, 0x7820, 0xa086, 0x0002, 0x1150, 0x7823, 0x4000, 0x0e04, 0x10bd, 0x781b, 0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2a70, 0x7003, 0x0000, - 0x2a70, 0x7000, 0xa08e, 0x0003, 0x1158, 0x080c, 0x3e49, 0x080c, - 0x2e41, 0x080c, 0x5cc8, 0x080c, 0x53e4, 0x080c, 0x66a0, 0x0c80, - 0x000b, 0x0c98, 0x10e4, 0x10e5, 0x1210, 0x10e2, 0x12dd, 0x140e, - 0x140f, 0x1410, 0x080c, 0x1515, 0x0005, 0x0126, 0x00f6, 0x2091, - 0x8000, 0x7000, 0xa086, 0x0001, 0x1904, 0x11ed, 0x080c, 0x1588, - 0x080c, 0x59c3, 0x0150, 0x080c, 0x59e9, 0x15c0, 0x2079, 0x0100, - 0x7828, 0xa085, 0x1800, 0x782a, 0x0488, 0x080c, 0x58fb, 0x7000, - 0xa086, 0x0001, 0x1904, 0x11ed, 0x708c, 0xa086, 0x0028, 0x1904, - 0x11ed, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827, - 0xffff, 0x7a28, 0xa295, 0x1e2f, 0x7a2a, 0x2011, 0x5896, 0x080c, - 0x6743, 0x2011, 0x5889, 0x080c, 0x67fb, 0x2011, 0x58d8, 0x080c, - 0x6743, 0x2011, 0x4a1c, 0x080c, 0x6743, 0x2011, 0x8030, 0x2019, - 0x0000, 0x708b, 0x0000, 0x080c, 0x1d8f, 0x00e8, 0x080c, 0x43cf, - 0x2079, 0x0100, 0x7844, 0xa005, 0x1904, 0x11ed, 0x2011, 0x4a1c, - 0x080c, 0x6743, 0x2011, 0x58d8, 0x080c, 0x6743, 0x080c, 0x1d8f, - 0x2001, 0xa98d, 0x2004, 0x780e, 0x7840, 0xa084, 0xfffb, 0x7842, - 0x2011, 0x8010, 0x73cc, 0x080c, 0x3e0d, 0x723c, 0xc284, 0x723e, - 0x2001, 0xa70c, 0x200c, 0xc1ac, 0x2102, 0x080c, 0x7bc8, 0x2011, - 0x0004, 0x080c, 0x932d, 0x080c, 0x5149, 0x080c, 0x59c3, 0x0158, - 0x080c, 0x4b28, 0x0140, 0x708b, 0x0001, 0x70c7, 0x0000, 0x080c, - 0x456c, 0x0804, 0x11ed, 0x080c, 0x51fd, 0x0120, 0x7a0c, 0xc2b4, - 0x7a0e, 0x0060, 0x7073, 0x0000, 0x080c, 0x95fa, 0x70d4, 0xd09c, - 0x1128, 0x70a0, 0xa005, 0x0110, 0x080c, 0x4b06, 0x70df, 0x0000, - 0x70db, 0x0000, 0x72d4, 0x080c, 0x59c3, 0x1178, 0x2011, 0x0000, - 0x0016, 0x080c, 0x284f, 0x2019, 0xa98f, 0x211a, 0x001e, 0x7053, - 0xffff, 0x7057, 0x00ef, 0x7077, 0x0000, 0x2079, 0xa752, 0x7804, - 0xd0ac, 0x0108, 0xc295, 0x72d6, 0x080c, 0x59c3, 0x0118, 0xa296, - 0x0004, 0x0548, 0x2011, 0x0001, 0x080c, 0x932d, 0x709b, 0x0000, - 0x709f, 0xffff, 0x7003, 0x0002, 0x2079, 0x0100, 0x7827, 0x0003, - 0x7828, 0xa085, 0x0003, 0x782a, 0x00fe, 0x080c, 0x2a1c, 0x2011, - 0x0005, 0x080c, 0x7d08, 0x080c, 0x6f08, 0x080c, 0x59c3, 0x0148, - 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x284f, 0x61e2, 0x001e, - 0x00ce, 0x012e, 0x0420, 0x709b, 0x0000, 0x709f, 0xffff, 0x7003, - 0x0002, 0x00f6, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0xa085, - 0x0003, 0x782a, 0x00fe, 0x2011, 0x0005, 0x080c, 0x7d08, 0x080c, - 0x6f08, 0x080c, 0x59c3, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, - 0x080c, 0x284f, 0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, - 0x00c6, 0x080c, 0x59c3, 0x1118, 0x20a9, 0x0100, 0x0010, 0x20a9, - 0x0082, 0x080c, 0x59c3, 0x1118, 0x2009, 0x0000, 0x0010, 0x2009, - 0x007e, 0x080c, 0x2ced, 0x8108, 0x1f04, 0x1201, 0x00ce, 0x7073, - 0x0000, 0x7074, 0xa084, 0x00ff, 0x7076, 0x70a3, 0x0000, 0x0005, - 0x0126, 0x2091, 0x8000, 0x7000, 0xa086, 0x0002, 0x1904, 0x12db, - 0x709c, 0xa086, 0xffff, 0x0130, 0x080c, 0x2a1c, 0x080c, 0x6f08, - 0x0804, 0x12db, 0x70d4, 0xd0ac, 0x1110, 0xd09c, 0x0540, 0xd084, - 0x0530, 0x0006, 0x0016, 0x2001, 0x0103, 0x2009, 0xa98d, 0x210c, - 0x2102, 0x001e, 0x000e, 0xd08c, 0x01d0, 0x70d8, 0xa086, 0xffff, - 0x0190, 0x080c, 0x2b6d, 0x080c, 0x6f08, 0x70d4, 0xd094, 0x1904, - 0x12db, 0x2011, 0x0001, 0x2019, 0x0000, 0x080c, 0x2ba5, 0x080c, - 0x6f08, 0x0804, 0x12db, 0x70dc, 0xa005, 0x1904, 0x12db, 0x7098, - 0xa005, 0x1904, 0x12db, 0x70d4, 0xd0a4, 0x0118, 0xd0b4, 0x0904, - 0x12db, 0x080c, 0x51fd, 0x1904, 0x12db, 0x2001, 0xa753, 0x2004, - 0xd0ac, 0x01c8, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x2009, 0x0000, - 0x0016, 0x080c, 0x4eb8, 0x1118, 0x6000, 0xd0ec, 0x1138, 0x001e, - 0x8108, 0x1f04, 0x1268, 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce, - 0x015e, 0x0804, 0x12db, 0x0006, 0x0016, 0x2001, 0x0103, 0x2009, - 0xa98d, 0x210c, 0x2102, 0x001e, 0x000e, 0x71a8, 0x81ff, 0x11b0, - 0xa006, 0x2009, 0x0200, 0x20a9, 0x0002, 0x20a1, 0xa9dd, 0x40a1, - 0x2009, 0x0700, 0x20a9, 0x0002, 0x20a1, 0xa9cd, 0x40a1, 0x7070, - 0x8007, 0x7174, 0x810f, 0x20a9, 0x0002, 0x40a1, 0x20a1, 0xa9d1, - 0x2009, 0x0000, 0x080c, 0x14fb, 0x2001, 0x0000, 0x810f, 0x20a9, - 0x0002, 0x40a1, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003, 0x709f, - 0xffff, 0x080c, 0x1581, 0xa006, 0x080c, 0x2727, 0x080c, 0x3e7f, - 0x00f6, 0x2079, 0x0100, 0x080c, 0x59e9, 0x0150, 0x080c, 0x59c3, - 0x7828, 0x0118, 0xa084, 0xe1ff, 0x0010, 0xa084, 0xffdf, 0x782a, - 0x00fe, 0x2001, 0xa9e0, 0x2004, 0xa086, 0x0005, 0x1120, 0x2011, - 0x0000, 0x080c, 0x7d08, 0x2011, 0x0000, 0x080c, 0x7d12, 0x080c, - 0x6f08, 0x080c, 0x6fbb, 0x012e, 0x0005, 0x0016, 0x0046, 0x00f6, - 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x2009, 0xa734, 0x2104, - 0xa005, 0x1110, 0x080c, 0x287b, 0x2009, 0x00f7, 0x080c, 0x4aef, - 0x7940, 0xa18c, 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, - 0x0040, 0xd19c, 0x0110, 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, - 0x7954, 0xd1ac, 0x1904, 0x134b, 0x080c, 0x59d5, 0x0158, 0x080c, - 0x59e9, 0x1128, 0x2001, 0xa99e, 0x2003, 0x0000, 0x0070, 0x080c, - 0x59cb, 0x0dc0, 0x2001, 0xa99e, 0x2003, 0xaaaa, 0x2001, 0xa99f, - 0x2003, 0x0001, 0x080c, 0x58fb, 0x0058, 0x080c, 0x59c3, 0x0140, - 0x2009, 0x00f8, 0x080c, 0x4aef, 0x7843, 0x0090, 0x7843, 0x0010, - 0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x59c3, 0x0138, - 0x7824, 0xd0ac, 0x1904, 0x13f5, 0x1f04, 0x132a, 0x0070, 0x7824, - 0x080c, 0x59df, 0x0118, 0xd0ac, 0x1904, 0x13f5, 0xa084, 0x1800, - 0x0d98, 0x7003, 0x0001, 0x0804, 0x13f5, 0x2001, 0x0001, 0x080c, - 0x2727, 0x0804, 0x1404, 0x7850, 0xa084, 0x0180, 0x7852, 0x782f, - 0x0020, 0x20a9, 0x0046, 0x1d04, 0x1353, 0x080c, 0x67e3, 0x1f04, - 0x1353, 0x7850, 0xa084, 0x0180, 0xa085, 0x0400, 0x7852, 0x782f, - 0x0000, 0x080c, 0x59d5, 0x0158, 0x080c, 0x59e9, 0x1128, 0x2001, - 0xa99e, 0x2003, 0x0000, 0x0070, 0x080c, 0x59cb, 0x0dc0, 0x2001, - 0xa99e, 0x2003, 0xaaaa, 0x2001, 0xa99f, 0x2003, 0x0001, 0x080c, - 0x58fb, 0x0020, 0x2009, 0x00f8, 0x080c, 0x4aef, 0x20a9, 0x000e, - 0xe000, 0x1f04, 0x1380, 0x7850, 0xa084, 0x0180, 0xa085, 0x1400, - 0x7852, 0x080c, 0x59c3, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, - 0x2021, 0xe678, 0x2019, 0xea60, 0x7820, 0xd09c, 0x1558, 0x080c, - 0x59c3, 0x05d8, 0x7824, 0xd0ac, 0x1904, 0x13f5, 0x080c, 0x59e9, - 0x1508, 0x0046, 0x2021, 0x0190, 0x8421, 0x1df0, 0x004e, 0x8421, - 0x11c8, 0x7827, 0x0048, 0x20a9, 0x01f4, 0x1d04, 0x13ad, 0x080c, - 0x67e3, 0x1f04, 0x13ad, 0x7824, 0xa084, 0x0068, 0x15c8, 0x2001, - 0xa99e, 0x2003, 0xaaaa, 0x2001, 0xa99f, 0x2003, 0x0001, 0x7003, - 0x0001, 0x0498, 0x1d04, 0x13c6, 0x080c, 0x67e3, 0x8319, 0x1960, - 0x2009, 0xa734, 0x2104, 0x8000, 0x200a, 0xa084, 0xfff0, 0x0120, - 0x200b, 0x0000, 0x080c, 0x287b, 0x00d8, 0x080c, 0x59d5, 0x1140, - 0xa4a2, 0x0064, 0x1128, 0x080c, 0x599a, 0x7003, 0x0001, 0x00a8, - 0x7827, 0x1800, 0xe000, 0xe000, 0x7824, 0x080c, 0x59df, 0x0110, - 0xd0ac, 0x1158, 0xa084, 0x1800, 0x09a8, 0x7003, 0x0001, 0x0028, - 0x2001, 0x0001, 0x080c, 0x2727, 0x0048, 0x2001, 0xa734, 0x2003, - 0x0000, 0x7827, 0x0048, 0x7828, 0xc09d, 0x782a, 0x7850, 0xa084, - 0x0180, 0xa085, 0x0400, 0x7852, 0x015e, 0x003e, 0x000e, 0x080c, - 0x1558, 0x012e, 0x00fe, 0x004e, 0x001e, 0x0005, 0x0005, 0x0005, - 0x0005, 0x2a70, 0x2061, 0xa9c0, 0x2063, 0x0002, 0x6007, 0x0002, - 0x600b, 0x0006, 0x600f, 0x0007, 0x2001, 0xa99e, 0x2003, 0x0000, - 0x708b, 0x0000, 0x2009, 0x0100, 0x2104, 0xa082, 0x0002, 0x0218, - 0x7053, 0xffff, 0x0010, 0x7053, 0x0000, 0x705b, 0xffff, 0x7073, - 0x0000, 0x7077, 0x0000, 0x080c, 0x95fa, 0x2061, 0xa98e, 0x6003, - 0x0909, 0x6007, 0x0000, 0x600b, 0x8800, 0x600f, 0x0200, 0x6013, - 0x00ff, 0x6017, 0x000f, 0x601b, 0x0000, 0x601f, 0x07d0, 0x2061, - 0xa996, 0x6003, 0x8000, 0x6007, 0x0000, 0x600b, 0x0000, 0x600f, - 0x0200, 0x6013, 0x00ff, 0x6017, 0x0000, 0x601b, 0x0001, 0x601f, - 0x0000, 0x2061, 0xa9b8, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, - 0x4943, 0x600f, 0x2020, 0x2001, 0xa728, 0x2003, 0x0000, 0x0005, - 0x04a0, 0x2011, 0x0000, 0x81ff, 0x0570, 0xa186, 0x0001, 0x1148, - 0x2031, 0x8fff, 0x2039, 0xba01, 0x2021, 0x0100, 0x2029, 0xba00, - 0x00e8, 0xa186, 0x0002, 0x1118, 0x2011, 0x0000, 0x00b8, 0xa186, - 0x0005, 0x1118, 0x2011, 0x0001, 0x0088, 0xa186, 0x0009, 0x1118, - 0x2011, 0x0002, 0x0058, 0xa186, 0x000a, 0x1118, 0x2011, 0x0002, - 0x0028, 0xa186, 0x0055, 0x1110, 0x2011, 0x0003, 0x3800, 0xa084, - 0xfffc, 0xa205, 0x20c0, 0x0804, 0x104d, 0xa00e, 0x2011, 0x0003, - 0x2019, 0x14a4, 0x0804, 0x14f5, 0x2019, 0xaaaa, 0x2061, 0xffff, - 0x2c14, 0x2362, 0xe000, 0xe000, 0x2c04, 0xa306, 0x2262, 0x1110, - 0xc1b5, 0xc1a5, 0x2011, 0x0000, 0x2019, 0x14b7, 0x04f0, 0x2019, - 0xaaaa, 0x2061, 0xffff, 0x2c14, 0x2362, 0xe000, 0xe000, 0x2c1c, - 0x2061, 0x7fff, 0xe000, 0xe000, 0x2c04, 0x2061, 0xffff, 0x2262, - 0xa306, 0x0110, 0xc18d, 0x0008, 0xc185, 0x2011, 0x0002, 0x2019, - 0x14d2, 0x0418, 0x2061, 0xffff, 0x2019, 0xaaaa, 0x2c14, 0x2362, - 0xe000, 0xe000, 0x2c04, 0x2262, 0xa306, 0x1180, 0x2c14, 0x2362, - 0xe000, 0xe000, 0x2c1c, 0x2061, 0x7fff, 0x2c04, 0x2061, 0xffff, - 0x2262, 0xa306, 0x1110, 0xc195, 0x0008, 0xc19d, 0x2011, 0x0001, - 0x2019, 0x14f3, 0x0010, 0x0804, 0x1469, 0x3800, 0xa084, 0xfffc, - 0xa205, 0x20c0, 0x0837, 0x2011, 0x0000, 0x080c, 0x4eb8, 0x1178, - 0x6004, 0xa0c4, 0x00ff, 0xa8c6, 0x0006, 0x0128, 0xa0c4, 0xff00, - 0xa8c6, 0x0600, 0x1120, 0xa186, 0x0080, 0x0108, 0x8210, 0x8108, - 0xa186, 0x0100, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, 0x0e04, - 0x1517, 0x0006, 0x0016, 0x2079, 0x0000, 0x7818, 0xd084, 0x1de8, - 0x001e, 0x792e, 0x000e, 0x782a, 0x000e, 0x7826, 0x3900, 0x783a, - 0x7823, 0x8002, 0x781b, 0x0001, 0x2091, 0x5000, 0x0126, 0x0156, - 0x0146, 0x20a9, 0x0010, 0x20a1, 0xaaff, 0x2091, 0x2000, 0x40a1, - 0x20a9, 0x0010, 0x2091, 0x2200, 0x40a1, 0x20a9, 0x0010, 0x2091, - 0x2400, 0x40a1, 0x20a9, 0x0010, 0x2091, 0x2600, 0x40a1, 0x20a9, - 0x0010, 0x2091, 0x2800, 0x40a1, 0x014e, 0x015e, 0x012e, 0x2079, - 0xa700, 0x7803, 0x0005, 0x2091, 0x4080, 0x04c9, 0x0cf8, 0x0005, - 0x0006, 0x080c, 0x15a3, 0x1518, 0x00f6, 0x2079, 0xa724, 0x2f04, - 0x8000, 0x207a, 0xa082, 0x000f, 0x0258, 0xa006, 0x207a, 0x2079, - 0xa726, 0x2f04, 0xa084, 0x0001, 0xa086, 0x0001, 0x207a, 0x0070, - 0x2079, 0xa726, 0x2f7c, 0x8fff, 0x1128, 0x2001, 0x0c03, 0x2003, - 0x0040, 0x0020, 0x2001, 0x0c03, 0x2003, 0x00c0, 0x00fe, 0x000e, - 0x0005, 0x0409, 0x1120, 0x2001, 0x0c03, 0x2003, 0x0080, 0x0005, - 0x00d1, 0x1120, 0x2001, 0x0c03, 0x2003, 0x0040, 0x0005, 0x0006, - 0x0091, 0x1178, 0x2001, 0x0c03, 0x2003, 0x0040, 0x2009, 0x0fff, - 0x00a1, 0x2001, 0x0c03, 0x2003, 0x0080, 0x2009, 0x0fff, 0x0069, - 0x0c88, 0x000e, 0x0005, 0x00c6, 0x2061, 0x0c00, 0x2c04, 0xa084, - 0x00ff, 0xa086, 0x00aa, 0x00ce, 0x0005, 0x0156, 0x0126, 0xa18c, - 0x0fff, 0x21a8, 0x1d04, 0x15b2, 0x2091, 0x6000, 0x1f04, 0x15b2, - 0x012e, 0x015e, 0x0005, 0x2071, 0xa700, 0x7160, 0x712e, 0x2021, - 0x0001, 0xa190, 0x0030, 0xa298, 0x0030, 0x0240, 0x7064, 0xa302, - 0x1228, 0x220a, 0x2208, 0x2310, 0x8420, 0x0ca8, 0x3800, 0xd08c, - 0x0148, 0x7064, 0xa086, 0xa700, 0x0128, 0x7067, 0xa700, 0x2011, - 0x1000, 0x0c48, 0x200b, 0x0000, 0x74b2, 0x74b6, 0x0005, 0x00e6, - 0x0126, 0x2091, 0x8000, 0x2071, 0xa700, 0x70b4, 0xa0ea, 0x0010, - 0x0268, 0x8001, 0x70b6, 0x702c, 0x2068, 0x2d04, 0x702e, 0x206b, - 0x0000, 0x6807, 0x0000, 0x012e, 0x00ee, 0x0005, 0xa06e, 0x0cd8, - 0x00e6, 0x2071, 0xa700, 0x0126, 0x2091, 0x8000, 0x70b4, 0x8001, - 0x0260, 0x70b6, 0x702c, 0x2068, 0x2d04, 0x702e, 0x206b, 0x0000, - 0x6807, 0x0000, 0x012e, 0x00ee, 0x0005, 0xa06e, 0x0cd8, 0x00e6, - 0x0126, 0x2091, 0x8000, 0x2071, 0xa700, 0x702c, 0x206a, 0x2d00, - 0x702e, 0x70b4, 0x8000, 0x70b6, 0x012e, 0x00ee, 0x0005, 0x8dff, - 0x0138, 0x6804, 0x6807, 0x0000, 0x0006, 0x0c49, 0x00de, 0x0cb8, - 0x0005, 0x00e6, 0x2071, 0xa700, 0x70b4, 0xa08a, 0x0010, 0xa00d, - 0x00ee, 0x0005, 0x00e6, 0x2071, 0xaa11, 0x7007, 0x0000, 0x701b, - 0x0000, 0x701f, 0x0000, 0x2071, 0x0000, 0x7010, 0xa085, 0x8004, - 0x7012, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, 0x2270, - 0x700b, 0x0000, 0x2071, 0xaa11, 0x7018, 0xa088, 0xaa1a, 0x220a, - 0x8000, 0xa084, 0x0007, 0x701a, 0x7004, 0xa005, 0x1128, 0x00f6, - 0x2079, 0x0010, 0x0089, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x00e6, - 0x2071, 0xaa11, 0x7004, 0xa005, 0x1128, 0x00f6, 0x2079, 0x0010, - 0x0019, 0x00fe, 0x00ee, 0x0005, 0x7000, 0x0002, 0x1672, 0x16d6, - 0x16f3, 0x16f3, 0x7018, 0x711c, 0xa106, 0x1118, 0x7007, 0x0000, - 0x0005, 0x00d6, 0xa180, 0xaa1a, 0x2004, 0x700a, 0x2068, 0x8108, - 0xa18c, 0x0007, 0x711e, 0x7803, 0x0026, 0x6824, 0x7832, 0x6828, - 0x7836, 0x682c, 0x783a, 0x6830, 0x783e, 0x6810, 0x700e, 0x680c, - 0x7016, 0x6804, 0x00de, 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, - 0x0005, 0x7007, 0x0002, 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, - 0x2011, 0x0040, 0xa182, 0x0040, 0x1210, 0x2110, 0xa006, 0x700e, - 0x7212, 0x8203, 0x7822, 0x7803, 0x0020, 0x7803, 0x0041, 0x002e, - 0x001e, 0x0005, 0x0016, 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, - 0x2098, 0x20a1, 0x0014, 0x7803, 0x0026, 0x710c, 0x2011, 0x0040, - 0xa182, 0x0040, 0x1210, 0x2110, 0xa006, 0x700e, 0x22a8, 0x53a6, - 0x8203, 0x7822, 0x7803, 0x0020, 0x3300, 0x7016, 0x7803, 0x0001, - 0x015e, 0x014e, 0x013e, 0x002e, 0x001e, 0x0005, 0x0136, 0x0146, - 0x0156, 0x2099, 0xa7fa, 0x20a1, 0x0018, 0x20a9, 0x0008, 0x53a3, - 0x7803, 0x0020, 0x0126, 0x2091, 0x8000, 0x7803, 0x0041, 0x7007, - 0x0003, 0x7000, 0xc084, 0x7002, 0x700b, 0xa7f5, 0x012e, 0x015e, - 0x014e, 0x013e, 0x0005, 0x0136, 0x0146, 0x0156, 0x2001, 0xa829, - 0x209c, 0x20a1, 0x0014, 0x7803, 0x0026, 0x2001, 0xa82a, 0x20ac, - 0x53a6, 0x2099, 0xa82b, 0x20a1, 0x0018, 0x20a9, 0x0008, 0x53a3, - 0x7803, 0x0020, 0x0126, 0x2091, 0x8000, 0x7803, 0x0001, 0x7007, - 0x0004, 0x7000, 0xc08c, 0x7002, 0x700b, 0xa826, 0x012e, 0x015e, - 0x014e, 0x013e, 0x0005, 0x0016, 0x00e6, 0x2071, 0xaa11, 0x00f6, - 0x2079, 0x0010, 0x7904, 0x7803, 0x0002, 0xd1fc, 0x0120, 0xa18c, - 0x0700, 0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x166c, - 0x1736, 0x1764, 0x178e, 0x17be, 0x1735, 0x0cf8, 0xa18c, 0x0700, - 0x1528, 0x0136, 0x0146, 0x0156, 0x7014, 0x20a0, 0x2099, 0x0014, - 0x7803, 0x0040, 0x7010, 0x20a8, 0x53a5, 0x3400, 0x7016, 0x015e, - 0x014e, 0x013e, 0x700c, 0xa005, 0x0570, 0x7830, 0x7832, 0x7834, - 0x7836, 0x080c, 0x169d, 0x0005, 0x7008, 0xa080, 0x0002, 0x2003, - 0x0100, 0x7007, 0x0000, 0x080c, 0x166c, 0x0005, 0x7008, 0xa080, - 0x0002, 0x2003, 0x0200, 0x0ca8, 0xa18c, 0x0700, 0x1150, 0x700c, - 0xa005, 0x0188, 0x7830, 0x7832, 0x7834, 0x7836, 0x080c, 0x16b2, - 0x0005, 0x7008, 0xa080, 0x0002, 0x2003, 0x0200, 0x7007, 0x0000, - 0x080c, 0x166c, 0x0005, 0x00d6, 0x7008, 0x2068, 0x7830, 0x6826, - 0x7834, 0x682a, 0x7838, 0x682e, 0x783c, 0x6832, 0x680b, 0x0100, - 0x00de, 0x7007, 0x0000, 0x080c, 0x166c, 0x0005, 0xa18c, 0x0700, - 0x1540, 0x0136, 0x0146, 0x0156, 0x2001, 0xa7f8, 0x2004, 0xa080, - 0x000d, 0x20a0, 0x2099, 0x0014, 0x7803, 0x0040, 0x20a9, 0x0020, - 0x53a5, 0x2001, 0xa7fa, 0x2004, 0xd0bc, 0x0148, 0x2001, 0xa803, - 0x2004, 0xa080, 0x000d, 0x20a0, 0x20a9, 0x0020, 0x53a5, 0x015e, - 0x014e, 0x013e, 0x7007, 0x0000, 0x080c, 0x5d5f, 0x080c, 0x166c, - 0x0005, 0x2011, 0x8003, 0x080c, 0x3e0d, 0x0cf8, 0xa18c, 0x0700, - 0x1148, 0x2001, 0xa828, 0x2003, 0x0100, 0x7007, 0x0000, 0x080c, - 0x166c, 0x0005, 0x2011, 0x8004, 0x080c, 0x3e0d, 0x0cf8, 0x0126, - 0x2091, 0x2200, 0x2079, 0x0030, 0x2071, 0xaa22, 0x7003, 0x0000, - 0x700f, 0xaa2e, 0x7013, 0xaa2e, 0x780f, 0x00f6, 0x7803, 0x0004, - 0x012e, 0x0005, 0x6934, 0xa184, 0x0007, 0x0002, 0x17ee, 0x182c, - 0x17ee, 0x17ee, 0x17ee, 0x1814, 0x17fb, 0x17f2, 0xa085, 0x0001, - 0x0804, 0x1846, 0x684c, 0xd0bc, 0x0dc8, 0x6860, 0x682e, 0x685c, - 0x682a, 0x6858, 0x04c8, 0xa18c, 0x00ff, 0xa186, 0x001e, 0x1d70, - 0x684c, 0xd0bc, 0x0d58, 0x6860, 0x682e, 0x685c, 0x682a, 0x6804, - 0x681a, 0xa080, 0x000d, 0x2004, 0xa084, 0x000f, 0xa080, 0x2263, - 0x2005, 0x6832, 0x6858, 0x0440, 0xa18c, 0x00ff, 0xa186, 0x0015, - 0x19a8, 0x684c, 0xd0ac, 0x0990, 0x6804, 0x681a, 0xa080, 0x000d, - 0x2004, 0xa084, 0x000f, 0xa080, 0x2263, 0x2005, 0x6832, 0xa006, - 0x682e, 0x682a, 0x6858, 0x0080, 0x684c, 0xd0ac, 0x0904, 0x17ee, - 0xa006, 0x682e, 0x682a, 0x6858, 0xa18c, 0x000f, 0xa188, 0x2263, - 0x210d, 0x6932, 0x2d08, 0x691a, 0x6826, 0x684c, 0xc0dd, 0x684e, - 0xa006, 0x680a, 0x697c, 0x6912, 0x6980, 0x6916, 0x0005, 0x684c, - 0xd0ac, 0x090c, 0x1515, 0x6833, 0x2260, 0x2d08, 0x691a, 0x6858, - 0x8001, 0x6826, 0x684c, 0xc0dd, 0x684e, 0xa006, 0x680a, 0x682e, - 0x682a, 0x697c, 0x6912, 0x6980, 0x6916, 0x0005, 0x20e1, 0x0007, - 0x20e1, 0x2000, 0x2001, 0x020a, 0x2004, 0x82ff, 0x01e8, 0xa280, - 0x0004, 0x00d6, 0x206c, 0x684c, 0xd0dc, 0x1190, 0xa280, 0x0007, - 0x2004, 0xa086, 0x000a, 0x1110, 0x0891, 0x0010, 0x080c, 0x17e2, - 0x0138, 0x00de, 0xa280, 0x0000, 0x2003, 0x0002, 0xa016, 0x0020, - 0x6808, 0x8000, 0x680a, 0x00de, 0x0126, 0x0046, 0x0036, 0x0026, - 0x2091, 0x2200, 0x002e, 0x003e, 0x004e, 0x7000, 0xa005, 0x01d0, - 0x710c, 0x220a, 0x8108, 0x230a, 0x8108, 0x240a, 0x8108, 0xa182, - 0xaa49, 0x0210, 0x2009, 0xaa2e, 0x710e, 0x7010, 0xa102, 0xa082, - 0x0009, 0x0118, 0xa080, 0x001b, 0x1118, 0x2009, 0x0138, 0x200a, - 0x012e, 0x0005, 0x7206, 0x2001, 0x18a8, 0x0006, 0x2260, 0x0804, - 0x19d4, 0x0126, 0x0026, 0x0036, 0x00c6, 0x0006, 0x2091, 0x2200, - 0x000e, 0x004e, 0x003e, 0x002e, 0x00d6, 0x00c6, 0x2460, 0x6110, - 0x2168, 0x6a62, 0x6b5e, 0xa005, 0x0904, 0x1909, 0x6808, 0xa005, - 0x0904, 0x1940, 0x7000, 0xa005, 0x1108, 0x0488, 0x700c, 0x7110, - 0xa106, 0x1904, 0x1948, 0x7004, 0xa406, 0x1548, 0x2001, 0x0005, - 0x2004, 0xd08c, 0x0168, 0x0046, 0x080c, 0x1ad8, 0x004e, 0x2460, - 0x6010, 0xa080, 0x0002, 0x2004, 0xa005, 0x0904, 0x1940, 0x0c10, - 0x2001, 0x0207, 0x2004, 0xd09c, 0x1d48, 0x7804, 0xa084, 0x6000, - 0x0120, 0xa086, 0x6000, 0x0108, 0x0c08, 0x7818, 0x6812, 0x781c, - 0x6816, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0x2060, 0x6100, - 0xa18e, 0x0004, 0x1904, 0x1948, 0x2009, 0x0048, 0x080c, 0x8101, - 0x04f8, 0x6808, 0xa005, 0x05a0, 0x7000, 0xa005, 0x0588, 0x700c, - 0x7110, 0xa106, 0x1118, 0x7004, 0xa406, 0x1550, 0x2001, 0x0005, - 0x2004, 0xd08c, 0x0160, 0x0046, 0x080c, 0x1ad8, 0x004e, 0x2460, - 0x6010, 0xa080, 0x0002, 0x2004, 0xa005, 0x01d0, 0x0c28, 0x2001, - 0x0207, 0x2004, 0xd09c, 0x1d50, 0x2001, 0x0005, 0x2004, 0xd08c, - 0x1d50, 0x7804, 0xa084, 0x6000, 0x0118, 0xa086, 0x6000, 0x19f0, - 0x7818, 0x6812, 0x781c, 0x6816, 0x7803, 0x0004, 0x7003, 0x0000, - 0x6100, 0xa18e, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, 0x8101, - 0x00ce, 0x00de, 0x012e, 0x0005, 0x00f6, 0x00e6, 0x0026, 0x0036, - 0x0046, 0x0056, 0x2071, 0xaa22, 0x7000, 0xa086, 0x0000, 0x0904, - 0x19b2, 0x7004, 0xac06, 0x1904, 0x19a4, 0x2079, 0x0030, 0x7000, - 0xa086, 0x0003, 0x0904, 0x19a4, 0x7804, 0xd0fc, 0x15c8, 0x20e1, - 0x6000, 0x2011, 0x0032, 0x2001, 0x0208, 0x200c, 0x2001, 0x0209, - 0x2004, 0xa106, 0x1d88, 0x8211, 0x1db0, 0x7804, 0xd0fc, 0x1540, - 0x080c, 0x1e14, 0x0026, 0x0056, 0x7803, 0x0004, 0x7804, 0xd0ac, - 0x1de8, 0x7803, 0x0002, 0x7803, 0x0009, 0x7003, 0x0003, 0x7007, - 0x0000, 0x005e, 0x002e, 0x2001, 0x015d, 0x2003, 0x0000, 0x080c, - 0x59c3, 0x1138, 0x0066, 0x2031, 0x0001, 0x080c, 0x5a45, 0x006e, - 0x0058, 0x2001, 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x0020, - 0x080c, 0x1ad8, 0x0804, 0x1954, 0x0156, 0x20a9, 0x0009, 0x2009, - 0xaa2e, 0x2104, 0xac06, 0x1108, 0x200a, 0xa188, 0x0003, 0x1f04, - 0x19a9, 0x015e, 0x005e, 0x004e, 0x003e, 0x002e, 0x00ee, 0x00fe, - 0x0005, 0x700c, 0x7110, 0xa106, 0x0904, 0x1a1b, 0x2104, 0x7006, - 0x2060, 0x8108, 0x211c, 0x8108, 0x2124, 0x8108, 0xa182, 0xaa49, - 0x0210, 0x2009, 0xaa2e, 0x7112, 0x700c, 0xa106, 0x1128, 0x080c, - 0x284f, 0x2001, 0x0138, 0x2102, 0x8cff, 0x0560, 0x6010, 0x2068, - 0x2d58, 0x6828, 0xa406, 0x1558, 0x682c, 0xa306, 0x1540, 0x684c, - 0xd0f4, 0x0128, 0x6817, 0xffff, 0x6813, 0xffff, 0x00d8, 0x6850, - 0xd0f4, 0x1130, 0x7803, 0x0004, 0x6810, 0x781a, 0x6814, 0x781e, - 0x6824, 0x2050, 0x6818, 0x2060, 0x6830, 0x2040, 0x6034, 0xa0cc, - 0x000f, 0x2009, 0x0011, 0x0411, 0x0118, 0x2009, 0x0001, 0x00f1, - 0x2d58, 0x0005, 0x080c, 0x1d83, 0x0904, 0x19b9, 0x0cd0, 0x601c, - 0xa08e, 0x0008, 0x09a0, 0xa08e, 0x000a, 0x0988, 0x2001, 0xa774, - 0x2004, 0xd0b4, 0x1120, 0x6817, 0x7fff, 0x6813, 0xffff, 0x080c, - 0x2283, 0x1d40, 0x0820, 0x7003, 0x0000, 0x0005, 0x8aff, 0x0904, - 0x1ab2, 0xa03e, 0x2730, 0xc9fc, 0x6850, 0xd0fc, 0x11b8, 0xd0f4, - 0x1528, 0x00d6, 0x2805, 0xac68, 0x2900, 0x0002, 0x1a70, 0x1a54, - 0x1a54, 0x1a70, 0x1a70, 0x1a68, 0x1a70, 0x1a54, 0x1a70, 0x1a59, - 0x1a59, 0x1a70, 0x1a70, 0x1a70, 0x1a60, 0x1a59, 0x7803, 0x0004, - 0xc0fc, 0x6852, 0x6b6c, 0x6a70, 0x6d1c, 0x6c20, 0x00d6, 0xd99c, - 0x0550, 0x2805, 0xac68, 0x6f08, 0x6e0c, 0x0430, 0xc0f4, 0x6852, - 0x6b6c, 0x6a70, 0x00d6, 0x0468, 0x6b08, 0x6a0c, 0x6d00, 0x6c04, - 0x00d0, 0x6b10, 0x6a14, 0x6d00, 0x6c04, 0x6f08, 0x6e0c, 0x00a0, - 0x00de, 0x00d6, 0x6834, 0xa084, 0x00ff, 0xa086, 0x001e, 0x1140, - 0x00de, 0x080c, 0x2225, 0x1904, 0x1a1e, 0xa00e, 0x0804, 0x1ab2, - 0x00de, 0x080c, 0x1515, 0xc9fd, 0x7b22, 0x7a26, 0x7d32, 0x7c36, - 0x7f3a, 0x7e3e, 0x7316, 0x721a, 0x751e, 0x7422, 0x7726, 0x762a, - 0x7902, 0x7100, 0x8108, 0x7102, 0x00de, 0x6828, 0xa300, 0x682a, - 0x682c, 0xa201, 0x682e, 0x8109, 0x2d08, 0x1500, 0xd9fc, 0x0160, - 0xc9fc, 0x080c, 0x2225, 0x01e8, 0x2805, 0xac68, 0x6800, 0xa506, - 0x11c0, 0x6804, 0xa406, 0x00a8, 0xc9fc, 0x080c, 0x2225, 0x0188, - 0x2805, 0xac68, 0x6800, 0xa506, 0x1160, 0x6804, 0xa406, 0x1148, - 0x6808, 0xa706, 0x1130, 0x680c, 0xa606, 0x0018, 0xc9fc, 0x080c, - 0x2225, 0x2168, 0x0005, 0x080c, 0x1515, 0x080c, 0x1ed3, 0x7004, - 0x2060, 0x00d6, 0x6010, 0x2068, 0x7003, 0x0000, 0x080c, 0x1da4, - 0x080c, 0x9327, 0x0170, 0x6808, 0x8001, 0x680a, 0x697c, 0x6912, - 0x6980, 0x6916, 0x682b, 0xffff, 0x682f, 0xffff, 0x6850, 0xc0bd, - 0x6852, 0x00de, 0x080c, 0x9057, 0x0804, 0x1cd5, 0x080c, 0x1515, - 0x0126, 0x2091, 0x2200, 0x0006, 0x0016, 0x2b68, 0x6818, 0x2060, - 0x7904, 0x7803, 0x0002, 0xa184, 0x0700, 0x1978, 0xa184, 0x0003, - 0xa086, 0x0003, 0x0d58, 0x7000, 0x0002, 0x1af5, 0x1afb, 0x1bee, - 0x1cb0, 0x1cc4, 0x1af5, 0x1af5, 0x1af5, 0x7804, 0xd09c, 0x1904, - 0x1cd5, 0x080c, 0x1515, 0x8001, 0x7002, 0xd1bc, 0x11a0, 0xd19c, - 0x1904, 0x1b7d, 0xd1dc, 0x1178, 0x8aff, 0x0904, 0x1b7d, 0x2009, - 0x0001, 0x080c, 0x1a1e, 0x0904, 0x1cd5, 0x2009, 0x0001, 0x080c, - 0x1a1e, 0x0804, 0x1cd5, 0x7803, 0x0004, 0x7003, 0x0000, 0xd1bc, - 0x1904, 0x1b67, 0x0026, 0x0036, 0x7c20, 0x7d24, 0x7e30, 0x7f34, - 0x7818, 0x6812, 0x781c, 0x6816, 0x2001, 0x0201, 0x2004, 0xa005, - 0x0140, 0x7808, 0xd0ec, 0x1128, 0x7803, 0x0009, 0x7003, 0x0004, - 0x0010, 0x080c, 0x1cd9, 0x6b28, 0x6a2c, 0x2400, 0x686e, 0xa31a, - 0x2500, 0x6872, 0xa213, 0x6b2a, 0x6a2e, 0x003e, 0x002e, 0x6e1e, - 0x6f22, 0x2500, 0xa405, 0x0128, 0x080c, 0x223b, 0x6850, 0xc0fd, - 0x6852, 0x2a00, 0x6826, 0x2c00, 0x681a, 0x2800, 0x6832, 0x6808, - 0x8001, 0x680a, 0x1148, 0x684c, 0xd0e4, 0x0130, 0x7004, 0x2060, - 0x2009, 0x0048, 0x080c, 0x8101, 0x7000, 0xa086, 0x0004, 0x0904, - 0x1cd5, 0x7003, 0x0000, 0x080c, 0x19b9, 0x0804, 0x1cd5, 0x0056, - 0x7d0c, 0xd5bc, 0x1110, 0x080c, 0xa667, 0x005e, 0x080c, 0x1da4, - 0x682b, 0xffff, 0x682f, 0xffff, 0x6808, 0x8001, 0x680a, 0x697c, - 0x791a, 0x6980, 0x791e, 0x0804, 0x1cd5, 0x7818, 0x6812, 0x7a1c, + 0x2a70, 0x7000, 0xa08e, 0x0003, 0x1158, 0x080c, 0x3f4f, 0x080c, + 0x2f20, 0x080c, 0x5e4a, 0x080c, 0x5562, 0x080c, 0x696b, 0x0c80, + 0x000b, 0x0c98, 0x10e4, 0x10e5, 0x1215, 0x10e2, 0x12e2, 0x1413, + 0x1414, 0x1415, 0x080c, 0x151a, 0x0005, 0x0126, 0x00f6, 0x2091, + 0x8000, 0x7000, 0xa086, 0x0001, 0x1904, 0x11f2, 0x080c, 0x158d, + 0x080c, 0x5b41, 0x0150, 0x080c, 0x5b67, 0x15c0, 0x2079, 0x0100, + 0x7828, 0xa085, 0x1800, 0x782a, 0x0488, 0x080c, 0x5a79, 0x7000, + 0xa086, 0x0001, 0x1904, 0x11f2, 0x708c, 0xa086, 0x0028, 0x1904, + 0x11f2, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827, + 0xffff, 0x7a28, 0xa295, 0x1e2f, 0x7a2a, 0x2011, 0x5a14, 0x080c, + 0x6a0e, 0x2011, 0x5a07, 0x080c, 0x6ace, 0x2011, 0x5a56, 0x080c, + 0x6a0e, 0x2011, 0x4b23, 0x080c, 0x6a0e, 0x2011, 0x8030, 0x2019, + 0x0000, 0x708b, 0x0000, 0x080c, 0x1e05, 0x00e8, 0x080c, 0x44d6, + 0x2079, 0x0100, 0x7844, 0xa005, 0x1904, 0x11f2, 0x2011, 0x4b23, + 0x080c, 0x6a0e, 0x2011, 0x5a56, 0x080c, 0x6a0e, 0x080c, 0x1e05, + 0x2001, 0xb88d, 0x2004, 0x780e, 0x7840, 0xa084, 0xfffb, 0x7842, + 0x2011, 0x8010, 0x73cc, 0x080c, 0x3f13, 0x723c, 0xc284, 0x723e, + 0x2001, 0xb60c, 0x200c, 0xc1ac, 0x2102, 0x080c, 0x7fbc, 0x2011, + 0x0004, 0x080c, 0x9d1c, 0x080c, 0x52bf, 0x080c, 0x5b41, 0x0158, + 0x080c, 0x4c4a, 0x0140, 0x708b, 0x0001, 0x70c7, 0x0000, 0x080c, + 0x4673, 0x0804, 0x11f2, 0x080c, 0x537b, 0x0120, 0x7a0c, 0xc2b4, + 0x7a0e, 0x0060, 0x7073, 0x0000, 0x080c, 0xa0c4, 0x70d4, 0xd09c, + 0x1128, 0x70a0, 0xa005, 0x0110, 0x080c, 0x4c28, 0x70df, 0x0000, + 0x70db, 0x0000, 0x72d4, 0x080c, 0x5b41, 0x1180, 0x2011, 0x0000, + 0x0016, 0x080c, 0x2920, 0x2019, 0xb88f, 0x211a, 0x001e, 0x7053, + 0xffff, 0x7057, 0x00ef, 0x7077, 0x0000, 0x0020, 0x2019, 0xb88f, + 0x201b, 0x0000, 0x2079, 0xb652, 0x7804, 0xd0ac, 0x0108, 0xc295, + 0x72d6, 0x080c, 0x5b41, 0x0118, 0xa296, 0x0004, 0x0548, 0x2011, + 0x0001, 0x080c, 0x9d1c, 0x709b, 0x0000, 0x709f, 0xffff, 0x7003, + 0x0002, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0xa085, 0x0003, + 0x782a, 0x00fe, 0x080c, 0x2aed, 0x2011, 0x0005, 0x080c, 0x80fc, + 0x080c, 0x71e5, 0x080c, 0x5b41, 0x0148, 0x00c6, 0x2061, 0x0100, + 0x0016, 0x080c, 0x2920, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420, + 0x709b, 0x0000, 0x709f, 0xffff, 0x7003, 0x0002, 0x00f6, 0x2079, + 0x0100, 0x7827, 0x0003, 0x7828, 0xa085, 0x0003, 0x782a, 0x00fe, + 0x2011, 0x0005, 0x080c, 0x80fc, 0x080c, 0x71e5, 0x080c, 0x5b41, + 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x2920, 0x61e2, + 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x080c, 0x5b41, + 0x1118, 0x20a9, 0x0100, 0x0010, 0x20a9, 0x0082, 0x080c, 0x5b41, + 0x1118, 0x2009, 0x0000, 0x0010, 0x2009, 0x007e, 0x080c, 0x2dcc, + 0x8108, 0x1f04, 0x1206, 0x00ce, 0x7073, 0x0000, 0x7074, 0xa084, + 0x00ff, 0x7076, 0x70a3, 0x0000, 0x0005, 0x0126, 0x2091, 0x8000, + 0x7000, 0xa086, 0x0002, 0x1904, 0x12e0, 0x709c, 0xa086, 0xffff, + 0x0130, 0x080c, 0x2aed, 0x080c, 0x71e5, 0x0804, 0x12e0, 0x70d4, + 0xd0ac, 0x1110, 0xd09c, 0x0540, 0xd084, 0x0530, 0x0006, 0x0016, + 0x2001, 0x0103, 0x2009, 0xb88d, 0x210c, 0x2102, 0x001e, 0x000e, + 0xd08c, 0x01d0, 0x70d8, 0xa086, 0xffff, 0x0190, 0x080c, 0x2c4c, + 0x080c, 0x71e5, 0x70d4, 0xd094, 0x1904, 0x12e0, 0x2011, 0x0001, + 0x2019, 0x0000, 0x080c, 0x2c84, 0x080c, 0x71e5, 0x0804, 0x12e0, + 0x70dc, 0xa005, 0x1904, 0x12e0, 0x7098, 0xa005, 0x1904, 0x12e0, + 0x70d4, 0xd0a4, 0x0118, 0xd0b4, 0x0904, 0x12e0, 0x080c, 0x537b, + 0x1904, 0x12e0, 0x2001, 0xb653, 0x2004, 0xd0ac, 0x01c8, 0x0156, + 0x00c6, 0x20a9, 0x007f, 0x2009, 0x0000, 0x0016, 0x080c, 0x501b, + 0x1118, 0x6000, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04, 0x126d, + 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804, 0x12e0, + 0x0006, 0x0016, 0x2001, 0x0103, 0x2009, 0xb88d, 0x210c, 0x2102, + 0x001e, 0x000e, 0x71a8, 0x81ff, 0x11b0, 0xa006, 0x2009, 0x0200, + 0x20a9, 0x0002, 0x20a1, 0xb8df, 0x40a1, 0x2009, 0x0700, 0x20a9, + 0x0002, 0x20a1, 0xb8cf, 0x40a1, 0x7070, 0x8007, 0x7174, 0x810f, + 0x20a9, 0x0002, 0x40a1, 0x20a1, 0xb8d3, 0x2009, 0x0000, 0x080c, + 0x1500, 0x2001, 0x0000, 0x810f, 0x20a9, 0x0002, 0x40a1, 0x7030, + 0xc08c, 0x7032, 0x7003, 0x0003, 0x709f, 0xffff, 0x080c, 0x1586, + 0xa006, 0x080c, 0x27f8, 0x080c, 0x3f85, 0x00f6, 0x2079, 0x0100, + 0x080c, 0x5b67, 0x0150, 0x080c, 0x5b41, 0x7828, 0x0118, 0xa084, + 0xe1ff, 0x0010, 0xa084, 0xffdf, 0x782a, 0x00fe, 0x2001, 0xb8e2, + 0x2004, 0xa086, 0x0005, 0x1120, 0x2011, 0x0000, 0x080c, 0x80fc, + 0x2011, 0x0000, 0x080c, 0x8106, 0x080c, 0x71e5, 0x080c, 0x72a2, + 0x012e, 0x0005, 0x0016, 0x0046, 0x00f6, 0x0126, 0x2091, 0x8000, + 0x2079, 0x0100, 0x2009, 0xb634, 0x2104, 0xa005, 0x1110, 0x080c, + 0x294c, 0x2009, 0x00f7, 0x080c, 0x4c11, 0x7940, 0xa18c, 0x0010, + 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040, 0xd19c, 0x0110, + 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, 0x7954, 0xd1ac, 0x1904, + 0x1350, 0x080c, 0x5b53, 0x0158, 0x080c, 0x5b67, 0x1128, 0x2001, + 0xb89e, 0x2003, 0x0000, 0x0070, 0x080c, 0x5b49, 0x0dc0, 0x2001, + 0xb89e, 0x2003, 0xaaaa, 0x2001, 0xb89f, 0x2003, 0x0001, 0x080c, + 0x5a79, 0x0058, 0x080c, 0x5b41, 0x0140, 0x2009, 0x00f8, 0x080c, + 0x4c11, 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, 0x09c4, 0x7820, + 0xd09c, 0x1138, 0x080c, 0x5b41, 0x0138, 0x7824, 0xd0ac, 0x1904, + 0x13fa, 0x1f04, 0x132f, 0x0070, 0x7824, 0x080c, 0x5b5d, 0x0118, + 0xd0ac, 0x1904, 0x13fa, 0xa084, 0x1800, 0x0d98, 0x7003, 0x0001, + 0x0804, 0x13fa, 0x2001, 0x0001, 0x080c, 0x27f8, 0x0804, 0x1409, + 0x7850, 0xa084, 0x0180, 0x7852, 0x782f, 0x0020, 0x20a9, 0x0046, + 0x1d04, 0x1358, 0x080c, 0x6ab6, 0x1f04, 0x1358, 0x7850, 0xa084, + 0x0180, 0xa085, 0x0400, 0x7852, 0x782f, 0x0000, 0x080c, 0x5b53, + 0x0158, 0x080c, 0x5b67, 0x1128, 0x2001, 0xb89e, 0x2003, 0x0000, + 0x0070, 0x080c, 0x5b49, 0x0dc0, 0x2001, 0xb89e, 0x2003, 0xaaaa, + 0x2001, 0xb89f, 0x2003, 0x0001, 0x080c, 0x5a79, 0x0020, 0x2009, + 0x00f8, 0x080c, 0x4c11, 0x20a9, 0x000e, 0xe000, 0x1f04, 0x1385, + 0x7850, 0xa084, 0x0180, 0xa085, 0x1400, 0x7852, 0x080c, 0x5b41, + 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678, 0x2019, + 0xea60, 0x7820, 0xd09c, 0x1558, 0x080c, 0x5b41, 0x05d8, 0x7824, + 0xd0ac, 0x1904, 0x13fa, 0x080c, 0x5b67, 0x1508, 0x0046, 0x2021, + 0x0190, 0x8421, 0x1df0, 0x004e, 0x8421, 0x11c8, 0x7827, 0x0048, + 0x20a9, 0x01f4, 0x1d04, 0x13b2, 0x080c, 0x6ab6, 0x1f04, 0x13b2, + 0x7824, 0xa084, 0x0068, 0x15c8, 0x2001, 0xb89e, 0x2003, 0xaaaa, + 0x2001, 0xb89f, 0x2003, 0x0001, 0x7003, 0x0001, 0x0498, 0x1d04, + 0x13cb, 0x080c, 0x6ab6, 0x8319, 0x1960, 0x2009, 0xb634, 0x2104, + 0x8000, 0x200a, 0xa084, 0xfff0, 0x0120, 0x200b, 0x0000, 0x080c, + 0x294c, 0x00d8, 0x080c, 0x5b53, 0x1140, 0xa4a2, 0x0064, 0x1128, + 0x080c, 0x5b18, 0x7003, 0x0001, 0x00a8, 0x7827, 0x1800, 0xe000, + 0xe000, 0x7824, 0x080c, 0x5b5d, 0x0110, 0xd0ac, 0x1158, 0xa084, + 0x1800, 0x09a8, 0x7003, 0x0001, 0x0028, 0x2001, 0x0001, 0x080c, + 0x27f8, 0x0048, 0x2001, 0xb634, 0x2003, 0x0000, 0x7827, 0x0048, + 0x7828, 0xc09d, 0x782a, 0x7850, 0xa084, 0x0180, 0xa085, 0x0400, + 0x7852, 0x015e, 0x003e, 0x000e, 0x080c, 0x155d, 0x012e, 0x00fe, + 0x004e, 0x001e, 0x0005, 0x0005, 0x0005, 0x0005, 0x2a70, 0x2061, + 0xb8c2, 0x2063, 0x0002, 0x6007, 0x0002, 0x600b, 0x0008, 0x600f, + 0x0017, 0x2001, 0xb89e, 0x2003, 0x0000, 0x708b, 0x0000, 0x2009, + 0x0100, 0x2104, 0xa082, 0x0002, 0x0218, 0x7053, 0xffff, 0x0010, + 0x7053, 0x0000, 0x705b, 0xffff, 0x7073, 0x0000, 0x7077, 0x0000, + 0x080c, 0xa0c4, 0x2061, 0xb88e, 0x6003, 0x0909, 0x6007, 0x0000, + 0x600b, 0x8800, 0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x000f, + 0x601b, 0x0000, 0x601f, 0x07d0, 0x2061, 0xb896, 0x6003, 0x8000, + 0x6007, 0x0000, 0x600b, 0x0000, 0x600f, 0x0200, 0x6013, 0x00ff, + 0x6017, 0x0000, 0x601b, 0x0001, 0x601f, 0x0000, 0x2061, 0xb8b9, + 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, + 0x2001, 0xb628, 0x2003, 0x0000, 0x0005, 0x04a0, 0x2011, 0x0000, + 0x81ff, 0x0570, 0xa186, 0x0001, 0x1148, 0x2031, 0x8fff, 0x2039, + 0xd601, 0x2021, 0x0100, 0x2029, 0xd600, 0x00e8, 0xa186, 0x0002, + 0x1118, 0x2011, 0x0000, 0x00b8, 0xa186, 0x0005, 0x1118, 0x2011, + 0x0001, 0x0088, 0xa186, 0x0009, 0x1118, 0x2011, 0x0002, 0x0058, + 0xa186, 0x000a, 0x1118, 0x2011, 0x0002, 0x0028, 0xa186, 0x0055, + 0x1110, 0x2011, 0x0003, 0x3800, 0xa084, 0xfffc, 0xa205, 0x20c0, + 0x0804, 0x104d, 0xa00e, 0x2011, 0x0003, 0x2019, 0x14a9, 0x0804, + 0x14fa, 0x2019, 0xaaaa, 0x2061, 0xffff, 0x2c14, 0x2362, 0xe000, + 0xe000, 0x2c04, 0xa306, 0x2262, 0x1110, 0xc1b5, 0xc1a5, 0x2011, + 0x0000, 0x2019, 0x14bc, 0x04f0, 0x2019, 0xaaaa, 0x2061, 0xffff, + 0x2c14, 0x2362, 0xe000, 0xe000, 0x2c1c, 0x2061, 0x7fff, 0xe000, + 0xe000, 0x2c04, 0x2061, 0xffff, 0x2262, 0xa306, 0x0110, 0xc18d, + 0x0008, 0xc185, 0x2011, 0x0002, 0x2019, 0x14d7, 0x0418, 0x2061, + 0xffff, 0x2019, 0xaaaa, 0x2c14, 0x2362, 0xe000, 0xe000, 0x2c04, + 0x2262, 0xa306, 0x1180, 0x2c14, 0x2362, 0xe000, 0xe000, 0x2c1c, + 0x2061, 0x7fff, 0x2c04, 0x2061, 0xffff, 0x2262, 0xa306, 0x1110, + 0xc195, 0x0008, 0xc19d, 0x2011, 0x0001, 0x2019, 0x14f8, 0x0010, + 0x0804, 0x146e, 0x3800, 0xa084, 0xfffc, 0xa205, 0x20c0, 0x0837, + 0x2011, 0x0000, 0x080c, 0x501b, 0x1178, 0x6004, 0xa0c4, 0x00ff, + 0xa8c6, 0x0006, 0x0128, 0xa0c4, 0xff00, 0xa8c6, 0x0600, 0x1120, + 0xa186, 0x0080, 0x0108, 0x8210, 0x8108, 0xa186, 0x0100, 0x1d50, + 0x2208, 0x0005, 0x2091, 0x8000, 0x0e04, 0x151c, 0x0006, 0x0016, + 0x2079, 0x0000, 0x7818, 0xd084, 0x1de8, 0x001e, 0x792e, 0x000e, + 0x782a, 0x000e, 0x7826, 0x3900, 0x783a, 0x7823, 0x8002, 0x781b, + 0x0001, 0x2091, 0x5000, 0x0126, 0x0156, 0x0146, 0x20a9, 0x0010, + 0x20a1, 0xba0d, 0x2091, 0x2000, 0x40a1, 0x20a9, 0x0010, 0x2091, + 0x2200, 0x40a1, 0x20a9, 0x0010, 0x2091, 0x2400, 0x40a1, 0x20a9, + 0x0010, 0x2091, 0x2600, 0x40a1, 0x20a9, 0x0010, 0x2091, 0x2800, + 0x40a1, 0x014e, 0x015e, 0x012e, 0x2079, 0xb600, 0x7803, 0x0005, + 0x2091, 0x4080, 0x04c9, 0x0cf8, 0x0005, 0x0006, 0x080c, 0x15a8, + 0x1518, 0x00f6, 0x2079, 0xb624, 0x2f04, 0x8000, 0x207a, 0xa082, + 0x000f, 0x0258, 0xa006, 0x207a, 0x2079, 0xb626, 0x2f04, 0xa084, + 0x0001, 0xa086, 0x0001, 0x207a, 0x0070, 0x2079, 0xb626, 0x2f7c, + 0x8fff, 0x1128, 0x2001, 0x0c03, 0x2003, 0x0040, 0x0020, 0x2001, + 0x0c03, 0x2003, 0x00c0, 0x00fe, 0x000e, 0x0005, 0x0409, 0x1120, + 0x2001, 0x0c03, 0x2003, 0x0080, 0x0005, 0x00d1, 0x1120, 0x2001, + 0x0c03, 0x2003, 0x0040, 0x0005, 0x0006, 0x0091, 0x1178, 0x2001, + 0x0c03, 0x2003, 0x0040, 0x2009, 0x0fff, 0x00a1, 0x2001, 0x0c03, + 0x2003, 0x0080, 0x2009, 0x0fff, 0x0069, 0x0c88, 0x000e, 0x0005, + 0x00c6, 0x2061, 0x0c00, 0x2c04, 0xa084, 0x00ff, 0xa086, 0x00aa, + 0x00ce, 0x0005, 0x0156, 0x0126, 0xa18c, 0x0fff, 0x21a8, 0x1d04, + 0x15b7, 0x2091, 0x6000, 0x1f04, 0x15b7, 0x012e, 0x015e, 0x0005, + 0x2071, 0xb600, 0x7160, 0x712e, 0x2021, 0x0001, 0xa190, 0x0030, + 0xa298, 0x0030, 0x0240, 0x7064, 0xa302, 0x1228, 0x220a, 0x2208, + 0x2310, 0x8420, 0x0ca8, 0x3800, 0xd08c, 0x0148, 0x7064, 0xa086, + 0xb600, 0x0128, 0x7067, 0xb600, 0x2011, 0x1000, 0x0c48, 0x200b, + 0x0000, 0x74b2, 0x74b6, 0x0005, 0x00e6, 0x0126, 0x2091, 0x8000, + 0x2071, 0xb600, 0x70b4, 0xa0ea, 0x0010, 0x0268, 0x8001, 0x70b6, + 0x702c, 0x2068, 0x2d04, 0x702e, 0x206b, 0x0000, 0x6807, 0x0000, + 0x012e, 0x00ee, 0x0005, 0xa06e, 0x0cd8, 0x00e6, 0x2071, 0xb600, + 0x0126, 0x2091, 0x8000, 0x70b4, 0x8001, 0x0260, 0x70b6, 0x702c, + 0x2068, 0x2d04, 0x702e, 0x206b, 0x0000, 0x6807, 0x0000, 0x012e, + 0x00ee, 0x0005, 0xa06e, 0x0cd8, 0x00e6, 0x0126, 0x2091, 0x8000, + 0x2071, 0xb600, 0x702c, 0x206a, 0x2d00, 0x702e, 0x70b4, 0x8000, + 0x70b6, 0x012e, 0x00ee, 0x0005, 0x8dff, 0x0138, 0x6804, 0x6807, + 0x0000, 0x0006, 0x0c49, 0x00de, 0x0cb8, 0x0005, 0x00e6, 0x2071, + 0xb600, 0x70b4, 0xa08a, 0x0010, 0xa00d, 0x00ee, 0x0005, 0x00e6, + 0x2071, 0xb913, 0x7007, 0x0000, 0x701b, 0x0000, 0x701f, 0x0000, + 0x2071, 0x0000, 0x7010, 0xa085, 0x8004, 0x7012, 0x00ee, 0x0005, + 0x0126, 0x2091, 0x8000, 0x00e6, 0x2270, 0x700b, 0x0000, 0x2071, + 0xb913, 0x7018, 0xa088, 0xb91c, 0x220a, 0x8000, 0xa084, 0x0007, + 0x701a, 0x7004, 0xa005, 0x1128, 0x00f6, 0x2079, 0x0010, 0x0089, + 0x00fe, 0x00ee, 0x012e, 0x0005, 0x00e6, 0x2071, 0xb913, 0x7004, + 0xa005, 0x1128, 0x00f6, 0x2079, 0x0010, 0x0019, 0x00fe, 0x00ee, + 0x0005, 0x7000, 0x0002, 0x1677, 0x16db, 0x16f8, 0x16f8, 0x7018, + 0x711c, 0xa106, 0x1118, 0x7007, 0x0000, 0x0005, 0x00d6, 0xa180, + 0xb91c, 0x2004, 0x700a, 0x2068, 0x8108, 0xa18c, 0x0007, 0x711e, + 0x7803, 0x0026, 0x6824, 0x7832, 0x6828, 0x7836, 0x682c, 0x783a, + 0x6830, 0x783e, 0x6810, 0x700e, 0x680c, 0x7016, 0x6804, 0x00de, + 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, 0x0005, 0x7007, 0x0002, + 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, 0x2011, 0x0040, 0xa182, + 0x0040, 0x1210, 0x2110, 0xa006, 0x700e, 0x7212, 0x8203, 0x7822, + 0x7803, 0x0020, 0x7803, 0x0041, 0x002e, 0x001e, 0x0005, 0x0016, + 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, 0x2098, 0x20a1, 0x0014, + 0x7803, 0x0026, 0x710c, 0x2011, 0x0040, 0xa182, 0x0040, 0x1210, + 0x2110, 0xa006, 0x700e, 0x22a8, 0x53a6, 0x8203, 0x7822, 0x7803, + 0x0020, 0x3300, 0x7016, 0x7803, 0x0001, 0x015e, 0x014e, 0x013e, + 0x002e, 0x001e, 0x0005, 0x0136, 0x0146, 0x0156, 0x2099, 0xb6fa, + 0x20a1, 0x0018, 0x20a9, 0x0008, 0x53a3, 0x7803, 0x0020, 0x0126, + 0x2091, 0x8000, 0x7803, 0x0041, 0x7007, 0x0003, 0x7000, 0xc084, + 0x7002, 0x700b, 0xb6f5, 0x012e, 0x015e, 0x014e, 0x013e, 0x0005, + 0x0136, 0x0146, 0x0156, 0x2001, 0xb729, 0x209c, 0x20a1, 0x0014, + 0x7803, 0x0026, 0x2001, 0xb72a, 0x20ac, 0x53a6, 0x2099, 0xb72b, + 0x20a1, 0x0018, 0x20a9, 0x0008, 0x53a3, 0x7803, 0x0020, 0x0126, + 0x2091, 0x8000, 0x7803, 0x0001, 0x7007, 0x0004, 0x7000, 0xc08c, + 0x7002, 0x700b, 0xb726, 0x012e, 0x015e, 0x014e, 0x013e, 0x0005, + 0x0016, 0x00e6, 0x2071, 0xb913, 0x00f6, 0x2079, 0x0010, 0x7904, + 0x7803, 0x0002, 0xd1fc, 0x0120, 0xa18c, 0x0700, 0x7004, 0x0023, + 0x00fe, 0x00ee, 0x001e, 0x0005, 0x1671, 0x173b, 0x1769, 0x1793, + 0x17c3, 0x173a, 0x0cf8, 0xa18c, 0x0700, 0x1528, 0x0136, 0x0146, + 0x0156, 0x7014, 0x20a0, 0x2099, 0x0014, 0x7803, 0x0040, 0x7010, + 0x20a8, 0x53a5, 0x3400, 0x7016, 0x015e, 0x014e, 0x013e, 0x700c, + 0xa005, 0x0570, 0x7830, 0x7832, 0x7834, 0x7836, 0x080c, 0x16a2, + 0x0005, 0x7008, 0xa080, 0x0002, 0x2003, 0x0100, 0x7007, 0x0000, + 0x080c, 0x1671, 0x0005, 0x7008, 0xa080, 0x0002, 0x2003, 0x0200, + 0x0ca8, 0xa18c, 0x0700, 0x1150, 0x700c, 0xa005, 0x0188, 0x7830, + 0x7832, 0x7834, 0x7836, 0x080c, 0x16b7, 0x0005, 0x7008, 0xa080, + 0x0002, 0x2003, 0x0200, 0x7007, 0x0000, 0x080c, 0x1671, 0x0005, + 0x00d6, 0x7008, 0x2068, 0x7830, 0x6826, 0x7834, 0x682a, 0x7838, + 0x682e, 0x783c, 0x6832, 0x680b, 0x0100, 0x00de, 0x7007, 0x0000, + 0x080c, 0x1671, 0x0005, 0xa18c, 0x0700, 0x1540, 0x0136, 0x0146, + 0x0156, 0x2001, 0xb6f8, 0x2004, 0xa080, 0x000d, 0x20a0, 0x2099, + 0x0014, 0x7803, 0x0040, 0x20a9, 0x0020, 0x53a5, 0x2001, 0xb6fa, + 0x2004, 0xd0bc, 0x0148, 0x2001, 0xb703, 0x2004, 0xa080, 0x000d, + 0x20a0, 0x20a9, 0x0020, 0x53a5, 0x015e, 0x014e, 0x013e, 0x7007, + 0x0000, 0x080c, 0x5ee1, 0x080c, 0x1671, 0x0005, 0x2011, 0x8003, + 0x080c, 0x3f13, 0x0cf8, 0xa18c, 0x0700, 0x1148, 0x2001, 0xb728, + 0x2003, 0x0100, 0x7007, 0x0000, 0x080c, 0x1671, 0x0005, 0x2011, + 0x8004, 0x080c, 0x3f13, 0x0cf8, 0x0126, 0x2091, 0x2200, 0x2079, + 0x0030, 0x2071, 0xb924, 0x7003, 0x0000, 0x700f, 0xb930, 0x7013, + 0xb930, 0x780f, 0x00f6, 0x7803, 0x0004, 0x012e, 0x0005, 0x6934, + 0xa184, 0x0007, 0x0002, 0x17f3, 0x1831, 0x17f3, 0x17f3, 0x17f3, + 0x1819, 0x1800, 0x17f7, 0xa085, 0x0001, 0x0804, 0x184b, 0x684c, + 0xd0bc, 0x0dc8, 0x6860, 0x682e, 0x685c, 0x682a, 0x6858, 0x04c8, + 0xa18c, 0x00ff, 0xa186, 0x001e, 0x1d70, 0x684c, 0xd0bc, 0x0d58, + 0x6860, 0x682e, 0x685c, 0x682a, 0x6804, 0x681a, 0xa080, 0x000d, + 0x2004, 0xa084, 0x000f, 0xa080, 0x2308, 0x2005, 0x6832, 0x6858, + 0x0440, 0xa18c, 0x00ff, 0xa186, 0x0015, 0x19a8, 0x684c, 0xd0ac, + 0x0990, 0x6804, 0x681a, 0xa080, 0x000d, 0x2004, 0xa084, 0x000f, + 0xa080, 0x2308, 0x2005, 0x6832, 0xa006, 0x682e, 0x682a, 0x6858, + 0x0080, 0x684c, 0xd0ac, 0x0904, 0x17f3, 0xa006, 0x682e, 0x682a, + 0x6858, 0xa18c, 0x000f, 0xa188, 0x2308, 0x210d, 0x6932, 0x2d08, + 0x691a, 0x6826, 0x684c, 0xc0dd, 0x684e, 0xa006, 0x680a, 0x697c, + 0x6912, 0x6980, 0x6916, 0x0005, 0x684c, 0xd0ac, 0x090c, 0x151a, + 0x6833, 0x2305, 0x2d08, 0x691a, 0x6858, 0x8001, 0x6826, 0x684c, + 0xc0dd, 0x684e, 0xa006, 0x680a, 0x682e, 0x682a, 0x697c, 0x6912, + 0x6980, 0x6916, 0x0005, 0x20e1, 0x0007, 0x20e1, 0x2000, 0x2001, + 0x020a, 0x2004, 0x82ff, 0x01e8, 0xa280, 0x0004, 0x00d6, 0x206c, + 0x684c, 0xd0dc, 0x1190, 0xa280, 0x0007, 0x2004, 0xa086, 0x000a, + 0x1110, 0x0891, 0x0010, 0x080c, 0x17e7, 0x0138, 0x00de, 0xa280, + 0x0000, 0x2003, 0x0002, 0xa016, 0x0020, 0x6808, 0x8000, 0x680a, + 0x00de, 0x0126, 0x0046, 0x0036, 0x0026, 0x2091, 0x2200, 0x002e, + 0x003e, 0x004e, 0x7000, 0xa005, 0x01d0, 0x710c, 0x220a, 0x8108, + 0x230a, 0x8108, 0x240a, 0x8108, 0xa182, 0xb94b, 0x0210, 0x2009, + 0xb930, 0x710e, 0x7010, 0xa102, 0xa082, 0x0009, 0x0118, 0xa080, + 0x001b, 0x1118, 0x2009, 0x0138, 0x200a, 0x012e, 0x0005, 0x7206, + 0x2001, 0x18ad, 0x0006, 0x2260, 0x0804, 0x19da, 0x0126, 0x0026, + 0x0036, 0x00c6, 0x0006, 0x2091, 0x2200, 0x000e, 0x004e, 0x003e, + 0x002e, 0x00d6, 0x00c6, 0x2460, 0x6110, 0x2168, 0x6a62, 0x6b5e, + 0xa005, 0x0904, 0x190f, 0x6808, 0xa005, 0x0904, 0x1946, 0x7000, + 0xa005, 0x1108, 0x0488, 0x700c, 0x7110, 0xa106, 0x1904, 0x194e, + 0x7004, 0xa406, 0x1548, 0x2001, 0x0005, 0x2004, 0xd08c, 0x0168, + 0x0046, 0x080c, 0x1b22, 0x004e, 0x2460, 0x6010, 0xa080, 0x0002, + 0x2004, 0xa005, 0x0904, 0x1946, 0x0c10, 0x2001, 0x0207, 0x2004, + 0xd09c, 0x1d48, 0x7804, 0xa084, 0x6000, 0x0120, 0xa086, 0x6000, + 0x0108, 0x0c08, 0x7818, 0x6812, 0x781c, 0x6816, 0x7803, 0x0004, + 0x7003, 0x0000, 0x7004, 0x2060, 0x6100, 0xa18e, 0x0004, 0x1904, + 0x194e, 0x2009, 0x0048, 0x080c, 0x86d3, 0x0804, 0x194e, 0x6808, + 0xa005, 0x05a0, 0x7000, 0xa005, 0x0588, 0x700c, 0x7110, 0xa106, + 0x1118, 0x7004, 0xa406, 0x1550, 0x2001, 0x0005, 0x2004, 0xd08c, + 0x0160, 0x0046, 0x080c, 0x1b22, 0x004e, 0x2460, 0x6010, 0xa080, + 0x0002, 0x2004, 0xa005, 0x01d0, 0x0c28, 0x2001, 0x0207, 0x2004, + 0xd09c, 0x1d50, 0x2001, 0x0005, 0x2004, 0xd08c, 0x1d50, 0x7804, + 0xa084, 0x6000, 0x0118, 0xa086, 0x6000, 0x19f0, 0x7818, 0x6812, + 0x781c, 0x6816, 0x7803, 0x0004, 0x7003, 0x0000, 0x6100, 0xa18e, + 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, 0x86d3, 0x00ce, 0x00de, + 0x012e, 0x0005, 0x00f6, 0x00e6, 0x0026, 0x0036, 0x0046, 0x0056, + 0x2071, 0xb924, 0x7000, 0xa086, 0x0000, 0x0904, 0x19b8, 0x7004, + 0xac06, 0x1904, 0x19aa, 0x2079, 0x0030, 0x7000, 0xa086, 0x0003, + 0x0904, 0x19aa, 0x7804, 0xd0fc, 0x15c8, 0x20e1, 0x6000, 0x2011, + 0x0032, 0x2001, 0x0208, 0x200c, 0x2001, 0x0209, 0x2004, 0xa106, + 0x1d88, 0x8211, 0x1db0, 0x7804, 0xd0fc, 0x1540, 0x080c, 0x1e8a, + 0x0026, 0x0056, 0x7803, 0x0004, 0x7804, 0xd0ac, 0x1de8, 0x7803, + 0x0002, 0x7803, 0x0009, 0x7003, 0x0003, 0x7007, 0x0000, 0x005e, + 0x002e, 0x2001, 0x015d, 0x2003, 0x0000, 0x080c, 0x5b41, 0x1138, + 0x0066, 0x2031, 0x0001, 0x080c, 0x5bc3, 0x006e, 0x0058, 0x2001, + 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x0020, 0x080c, 0x1b22, + 0x0804, 0x195a, 0x0156, 0x20a9, 0x0009, 0x2009, 0xb930, 0x2104, + 0xac06, 0x1108, 0x200a, 0xa188, 0x0003, 0x1f04, 0x19af, 0x015e, + 0x005e, 0x004e, 0x003e, 0x002e, 0x00ee, 0x00fe, 0x0005, 0x700c, + 0x7110, 0xa106, 0x0904, 0x1a4e, 0x2104, 0x7006, 0x2060, 0x8108, + 0x211c, 0x8108, 0x2124, 0x8108, 0xa182, 0xb94b, 0x0210, 0x2009, + 0xb930, 0x7112, 0x700c, 0xa106, 0x1128, 0x080c, 0x2920, 0x2001, + 0x0138, 0x2102, 0x8cff, 0x0598, 0x6010, 0x2068, 0x2d58, 0x6828, + 0xa406, 0x1590, 0x682c, 0xa306, 0x1578, 0x7004, 0x2060, 0x6020, + 0xc0d4, 0x6022, 0x684c, 0xd0f4, 0x0128, 0x6817, 0xffff, 0x6813, + 0xffff, 0x00e8, 0x6850, 0xd0f4, 0x1130, 0x7803, 0x0004, 0x6810, + 0x781a, 0x6814, 0x781e, 0x6824, 0x2050, 0x6818, 0x2060, 0x6830, + 0x2040, 0x6034, 0xa0cc, 0x000f, 0x2009, 0x0011, 0x080c, 0x1a51, + 0x0120, 0x2009, 0x0001, 0x080c, 0x1a51, 0x2d58, 0x0005, 0x080c, + 0x1df9, 0x0904, 0x19bf, 0x0cd0, 0x6020, 0xd0f4, 0x11e0, 0xd0d4, + 0x01b8, 0x6038, 0xa402, 0x6034, 0xa303, 0x0108, 0x1288, 0x643a, + 0x6336, 0x6c2a, 0x6b2e, 0x0046, 0x0036, 0x2400, 0x6c7c, 0xa402, + 0x6812, 0x2300, 0x6b80, 0xa303, 0x6816, 0x003e, 0x004e, 0x0018, + 0x080c, 0xa056, 0x09e0, 0x601c, 0xa08e, 0x0008, 0x0904, 0x19e5, + 0xa08e, 0x000a, 0x0904, 0x19e5, 0x2001, 0xb674, 0x2004, 0xd0b4, + 0x1140, 0x6018, 0x2004, 0xd0bc, 0x1120, 0x6817, 0x7fff, 0x6813, + 0xffff, 0x080c, 0x2328, 0x1918, 0x0804, 0x19e5, 0x7003, 0x0000, + 0x0005, 0x8aff, 0x0904, 0x1afc, 0xa03e, 0x2730, 0xc9fc, 0x6850, + 0xd0fc, 0x11b8, 0xd0f4, 0x1588, 0x00d6, 0x2805, 0xac68, 0x2900, + 0x0002, 0x1aba, 0x1a93, 0x1a93, 0x1aba, 0x1aba, 0x1ab2, 0x1aba, + 0x1a93, 0x1aba, 0x1a9b, 0x1a9b, 0x1aba, 0x1aba, 0x1aba, 0x1aaa, + 0x1a9b, 0x7803, 0x0004, 0xc0fc, 0x6852, 0x6b6c, 0x6a70, 0x6d1c, + 0x6c20, 0x00d6, 0xd99c, 0x0140, 0x2805, 0xac68, 0x6f08, 0x6e0c, + 0x080c, 0x23ed, 0x0120, 0x04d0, 0x080c, 0x23ed, 0x15b0, 0x6850, + 0xc0fd, 0x6852, 0x00de, 0xa006, 0x0005, 0xc0f4, 0x6852, 0x6b6c, + 0x6a70, 0x00d6, 0x04c0, 0x6b08, 0x6a0c, 0x6d00, 0x6c04, 0x080c, + 0x23ed, 0x0d80, 0x0410, 0x6b10, 0x6a14, 0x6d00, 0x6c04, 0x6f08, + 0x6e0c, 0x080c, 0x23ed, 0x0d30, 0x00c8, 0x6d00, 0x6c04, 0x6f08, + 0x6e0c, 0x00a0, 0x00de, 0x00d6, 0x6834, 0xa084, 0x00ff, 0xa086, + 0x001e, 0x1140, 0x00de, 0x080c, 0x22ca, 0x1904, 0x1a51, 0xa00e, + 0x0804, 0x1afc, 0x00de, 0x080c, 0x151a, 0xc9fd, 0x7b22, 0x7a26, + 0x7d32, 0x7c36, 0x7f3a, 0x7e3e, 0x7316, 0x721a, 0x751e, 0x7422, + 0x7726, 0x762a, 0x7902, 0x7100, 0x8108, 0x7102, 0x00de, 0x6828, + 0xa300, 0x682a, 0x682c, 0xa201, 0x682e, 0x8109, 0x2d08, 0x1500, + 0xd9fc, 0x0160, 0xc9fc, 0x080c, 0x22ca, 0x01e8, 0x2805, 0xac68, + 0x6800, 0xa506, 0x11c0, 0x6804, 0xa406, 0x00a8, 0xc9fc, 0x080c, + 0x22ca, 0x0188, 0x2805, 0xac68, 0x6800, 0xa506, 0x1160, 0x6804, + 0xa406, 0x1148, 0x6808, 0xa706, 0x1130, 0x680c, 0xa606, 0x0018, + 0xc9fc, 0x080c, 0x22ca, 0x2168, 0x0005, 0x080c, 0x151a, 0x080c, + 0x1f71, 0x7004, 0x2060, 0x00d6, 0x6010, 0x2068, 0x7003, 0x0000, + 0x080c, 0x1e1a, 0x080c, 0x9d16, 0x0170, 0x6808, 0x8001, 0x680a, + 0x697c, 0x6912, 0x6980, 0x6916, 0x682b, 0xffff, 0x682f, 0xffff, + 0x6850, 0xc0bd, 0x6852, 0x00de, 0x080c, 0x99e6, 0x0804, 0x1d47, + 0x080c, 0x151a, 0x0126, 0x2091, 0x2200, 0x0006, 0x0016, 0x2b68, + 0x6818, 0x2060, 0x7904, 0x7803, 0x0002, 0xa184, 0x0700, 0x1978, + 0xa184, 0x0003, 0xa086, 0x0003, 0x0d58, 0x7000, 0x0002, 0x1b3f, + 0x1b45, 0x1c56, 0x1d22, 0x1d36, 0x1b3f, 0x1b3f, 0x1b3f, 0x7804, + 0xd09c, 0x1904, 0x1d47, 0x080c, 0x151a, 0x8001, 0x7002, 0xd1bc, + 0x11a0, 0xd19c, 0x1904, 0x1bda, 0xd1dc, 0x1178, 0x8aff, 0x0904, + 0x1bda, 0x2009, 0x0001, 0x080c, 0x1a51, 0x0904, 0x1d47, 0x2009, + 0x0001, 0x080c, 0x1a51, 0x0804, 0x1d47, 0x7803, 0x0004, 0x7003, + 0x0000, 0xd1bc, 0x1904, 0x1bba, 0x0026, 0x0036, 0x7c20, 0x7d24, + 0x7e30, 0x7f34, 0x7818, 0x6812, 0x781c, 0x6816, 0x2001, 0x0201, + 0x2004, 0xa005, 0x0140, 0x7808, 0xd0ec, 0x1128, 0x7803, 0x0009, + 0x7003, 0x0004, 0x0010, 0x080c, 0x1d4b, 0x6b28, 0x6a2c, 0x2400, + 0x686e, 0xa31a, 0x2500, 0x6872, 0xa213, 0x6b2a, 0x6a2e, 0x00c6, + 0x7004, 0x2060, 0x6020, 0xd0f4, 0x1110, 0x633a, 0x6236, 0x00ce, + 0x003e, 0x002e, 0x6e1e, 0x6f22, 0x2500, 0xa405, 0x0128, 0x080c, + 0x22e0, 0x6850, 0xc0fd, 0x6852, 0x2a00, 0x6826, 0x2c00, 0x681a, + 0x2800, 0x6832, 0x6808, 0x8001, 0x680a, 0x1148, 0x684c, 0xd0e4, + 0x0130, 0x7004, 0x2060, 0x2009, 0x0048, 0x080c, 0x86d3, 0x7000, + 0xa086, 0x0004, 0x0904, 0x1d47, 0x7003, 0x0000, 0x080c, 0x19bf, + 0x0804, 0x1d47, 0x0056, 0x7d0c, 0xd5bc, 0x1110, 0x080c, 0xb4c3, + 0x005e, 0x080c, 0x1e1a, 0x00f6, 0x7004, 0x2078, 0x080c, 0x5377, + 0x0118, 0x7820, 0xc0f5, 0x7822, 0x00fe, 0x682b, 0xffff, 0x682f, + 0xffff, 0x6808, 0x8001, 0x680a, 0x697c, 0x791a, 0x6980, 0x791e, + 0x0804, 0x1d47, 0x7004, 0x00c6, 0x2060, 0x6020, 0x00ce, 0xd0f4, + 0x0120, 0x6808, 0x8001, 0x680a, 0x04c0, 0x7818, 0x6812, 0x7a1c, 0x6a16, 0xd19c, 0x0160, 0xa205, 0x0150, 0x7004, 0xa080, 0x0007, - 0x2004, 0xa084, 0xfffd, 0xa086, 0x0008, 0x1904, 0x1b13, 0x684c, + 0x2004, 0xa084, 0xfffd, 0xa086, 0x0008, 0x1904, 0x1b5d, 0x684c, 0xc0f5, 0x684e, 0x7814, 0xa005, 0x1520, 0x7003, 0x0000, 0x6808, 0x8001, 0x680a, 0x01a0, 0x7004, 0x2060, 0x601c, 0xa086, 0x000a, - 0x11a0, 0x0156, 0x20a9, 0x0009, 0x2009, 0xaa2e, 0x2104, 0xac06, - 0x1108, 0x200a, 0xa188, 0x0003, 0x1f04, 0x1ba6, 0x015e, 0x7004, - 0x2060, 0x2009, 0x0048, 0x080c, 0x8101, 0x080c, 0x19b9, 0x0804, - 0x1cd5, 0x7818, 0x6812, 0x781c, 0x6816, 0x7814, 0x7908, 0xa18c, - 0x0fff, 0xa192, 0x0841, 0x1a04, 0x1ab5, 0xa188, 0x0007, 0x8114, + 0x11a0, 0x0156, 0x20a9, 0x0009, 0x2009, 0xb930, 0x2104, 0xac06, + 0x1108, 0x200a, 0xa188, 0x0003, 0x1f04, 0x1c0e, 0x015e, 0x7004, + 0x2060, 0x2009, 0x0048, 0x080c, 0x86d3, 0x080c, 0x19bf, 0x0804, + 0x1d47, 0x7818, 0x6812, 0x781c, 0x6816, 0x7814, 0x7908, 0xa18c, + 0x0fff, 0xa192, 0x0841, 0x1a04, 0x1aff, 0xa188, 0x0007, 0x8114, 0x8214, 0x8214, 0xa10a, 0x8104, 0x8004, 0x8004, 0xa20a, 0x810b, - 0x810b, 0x810b, 0x080c, 0x1e3f, 0x7803, 0x0004, 0x780f, 0xffff, + 0x810b, 0x810b, 0x080c, 0x1eb5, 0x7803, 0x0004, 0x780f, 0xffff, 0x7803, 0x0001, 0x7804, 0xd0fc, 0x0de8, 0x7803, 0x0002, 0x7803, 0x0004, 0x780f, 0x00f6, 0x7004, 0x7007, 0x0000, 0x2060, 0x2009, - 0x0048, 0x080c, 0x8101, 0x080c, 0x1e95, 0x0838, 0x8001, 0x7002, - 0xd194, 0x01b0, 0x7804, 0xd0fc, 0x1904, 0x1c80, 0xd09c, 0x0138, - 0x7804, 0xd0fc, 0x1904, 0x1c80, 0xd09c, 0x1904, 0x1c84, 0x8aff, - 0x0904, 0x1cd5, 0x2009, 0x0001, 0x080c, 0x1a1e, 0x0804, 0x1cd5, - 0xa184, 0x0888, 0x1148, 0x8aff, 0x0904, 0x1cd5, 0x2009, 0x0001, - 0x080c, 0x1a1e, 0x0804, 0x1cd5, 0x7818, 0x6812, 0x7a1c, 0x6a16, - 0xa205, 0x0904, 0x1b8f, 0x7803, 0x0004, 0x7003, 0x0000, 0xd1bc, - 0x1904, 0x1c6c, 0x6834, 0xa084, 0x00ff, 0xa086, 0x0029, 0x1118, - 0xd19c, 0x1904, 0x1b8f, 0x0026, 0x0036, 0x7c20, 0x7d24, 0x7e30, + 0x0048, 0x080c, 0x86d3, 0x080c, 0x1f0b, 0x0838, 0x8001, 0x7002, + 0xd194, 0x01b0, 0x7804, 0xd0fc, 0x1904, 0x1cf2, 0xd09c, 0x0138, + 0x7804, 0xd0fc, 0x1904, 0x1cf2, 0xd09c, 0x1904, 0x1cf6, 0x8aff, + 0x0904, 0x1d47, 0x2009, 0x0001, 0x080c, 0x1a51, 0x0804, 0x1d47, + 0xa184, 0x0888, 0x1148, 0x8aff, 0x0904, 0x1d47, 0x2009, 0x0001, + 0x080c, 0x1a51, 0x0804, 0x1d47, 0x7818, 0x6812, 0x7a1c, 0x6a16, + 0xa205, 0x0904, 0x1bf7, 0x7803, 0x0004, 0x7003, 0x0000, 0xd1bc, + 0x1904, 0x1cd4, 0x6834, 0xa084, 0x00ff, 0xa086, 0x0029, 0x1118, + 0xd19c, 0x1904, 0x1bf7, 0x0026, 0x0036, 0x7c20, 0x7d24, 0x7e30, 0x7f34, 0x7818, 0x6812, 0x781c, 0x6816, 0x2001, 0x0201, 0x2004, 0xa005, 0x0140, 0x7808, 0xd0ec, 0x1128, 0x7803, 0x0009, 0x7003, - 0x0004, 0x0020, 0x0016, 0x080c, 0x1cd9, 0x001e, 0x6b28, 0x6a2c, - 0x080c, 0x223b, 0x00d6, 0x2805, 0xac68, 0x6034, 0xd09c, 0x1128, + 0x0004, 0x0020, 0x0016, 0x080c, 0x1d4b, 0x001e, 0x6b28, 0x6a2c, + 0x080c, 0x22e0, 0x00d6, 0x2805, 0xac68, 0x6034, 0xd09c, 0x1128, 0x6808, 0xa31a, 0x680c, 0xa213, 0x0020, 0x6810, 0xa31a, 0x6814, - 0xa213, 0x00de, 0xd194, 0x0904, 0x1b35, 0x2a00, 0x6826, 0x2c00, + 0xa213, 0x00de, 0xd194, 0x0904, 0x1b7f, 0x2a00, 0x6826, 0x2c00, 0x681a, 0x2800, 0x6832, 0x6808, 0x8001, 0x680a, 0x6b2a, 0x6a2e, - 0x003e, 0x002e, 0x0804, 0x1bb5, 0x0056, 0x7d0c, 0x080c, 0xa667, - 0x005e, 0x080c, 0x1da4, 0x682b, 0xffff, 0x682f, 0xffff, 0x6808, - 0x8001, 0x680a, 0x697c, 0x791a, 0x6980, 0x791e, 0x0804, 0x1cd5, - 0x7804, 0xd09c, 0x0904, 0x1ae0, 0x7c20, 0x7824, 0xa405, 0x1904, - 0x1ae0, 0x7818, 0x6812, 0x7c1c, 0x6c16, 0xa405, 0x1120, 0x7803, - 0x0002, 0x0804, 0x1b8f, 0x751c, 0x7420, 0x7724, 0x7628, 0x7014, - 0xa528, 0x7018, 0xa421, 0xa7b9, 0x0000, 0xa6b1, 0x0000, 0x7830, - 0xa506, 0x1150, 0x7834, 0xa406, 0x1138, 0x7838, 0xa706, 0x1120, - 0x783c, 0xa606, 0x0904, 0x1ae0, 0x7803, 0x0002, 0x0804, 0x1c1b, - 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0xa00d, 0x0150, 0x6808, - 0x8001, 0x680a, 0x1130, 0x7004, 0x2060, 0x2009, 0x0048, 0x080c, - 0x8101, 0x080c, 0x19b9, 0x0088, 0x7803, 0x0004, 0x7003, 0x0000, - 0x7004, 0x2060, 0x6010, 0xa005, 0x0da0, 0x2068, 0x6808, 0x8000, - 0x680a, 0x6c28, 0x6b2c, 0x080c, 0x19d4, 0x001e, 0x000e, 0x012e, - 0x0005, 0x700c, 0x7110, 0xa106, 0x0904, 0x1d77, 0x7004, 0x0016, - 0x210c, 0xa106, 0x001e, 0x0904, 0x1d77, 0x00d6, 0x00c6, 0x216c, - 0x2d00, 0xa005, 0x0904, 0x1d75, 0x681c, 0xa086, 0x0008, 0x0904, - 0x1d75, 0x6810, 0x2068, 0x6850, 0xd0fc, 0x05a8, 0x8108, 0x2104, - 0x6b2c, 0xa306, 0x1904, 0x1d75, 0x8108, 0x2104, 0x6a28, 0xa206, - 0x1904, 0x1d75, 0x6850, 0xc0fc, 0xc0f5, 0x6852, 0x686c, 0x7822, - 0x7016, 0x6870, 0x7826, 0x701a, 0x681c, 0x7832, 0x701e, 0x6820, - 0x7836, 0x7022, 0x6818, 0x2060, 0x6034, 0xd09c, 0x0168, 0x6830, - 0x2005, 0x00d6, 0xac68, 0x6808, 0x783a, 0x7026, 0x680c, 0x783e, - 0x702a, 0x00de, 0x0804, 0x1d6f, 0xa006, 0x783a, 0x783e, 0x7026, - 0x702a, 0x0804, 0x1d6f, 0x8108, 0x2104, 0xa005, 0x1904, 0x1d75, - 0x6b2c, 0xa306, 0x1904, 0x1d75, 0x8108, 0x2104, 0xa005, 0x15e8, - 0x6a28, 0xa206, 0x15d0, 0x6850, 0xc0f5, 0x6852, 0x6830, 0x2005, - 0x6918, 0xa160, 0xa180, 0x000d, 0x2004, 0xd09c, 0x11a0, 0x6008, - 0x7822, 0x7016, 0x686e, 0x600c, 0x7826, 0x701a, 0x6872, 0x6000, - 0x7832, 0x701e, 0x6004, 0x7836, 0x7022, 0xa006, 0x783a, 0x783e, - 0x7026, 0x702a, 0x00a0, 0x6010, 0x7822, 0x7016, 0x686e, 0x6014, - 0x7826, 0x701a, 0x6872, 0x6000, 0x7832, 0x701e, 0x6004, 0x7836, - 0x7022, 0x6008, 0x783a, 0x7026, 0x600c, 0x783e, 0x702a, 0x6810, - 0x781a, 0x6814, 0x781e, 0x7803, 0x0011, 0x00ce, 0x00de, 0x0005, - 0x2011, 0x0201, 0x2009, 0x003c, 0x2204, 0xa005, 0x1118, 0x8109, - 0x1dd8, 0x0005, 0x0005, 0x0ca1, 0x0118, 0x780c, 0xd0a4, 0x0120, - 0x00d9, 0xa085, 0x0001, 0x0010, 0x080c, 0x1e95, 0x0005, 0x0126, - 0x2091, 0x2200, 0x7000, 0xa086, 0x0003, 0x1160, 0x700c, 0x7110, - 0xa106, 0x0140, 0x080c, 0x28c0, 0x20e1, 0x9028, 0x700f, 0xaa2e, - 0x7013, 0xaa2e, 0x012e, 0x0005, 0x00c6, 0x080c, 0x59c3, 0x11b8, - 0x2001, 0x0160, 0x2003, 0x0000, 0x2001, 0x0138, 0x2003, 0x0000, - 0x2011, 0x00c8, 0xe000, 0xe000, 0x8211, 0x1de0, 0x04b1, 0x0066, - 0x2031, 0x0000, 0x080c, 0x5a45, 0x006e, 0x00ce, 0x0005, 0x080c, - 0x1e14, 0x080c, 0x28c0, 0x20e1, 0x9028, 0x700c, 0x7110, 0xa106, - 0x01c0, 0x2104, 0xa005, 0x0130, 0x2060, 0x6010, 0x2060, 0x6008, - 0x8001, 0x600a, 0xa188, 0x0003, 0xa182, 0xaa49, 0x0210, 0x2009, - 0xaa2e, 0x7112, 0x700c, 0xa106, 0x1d40, 0x080c, 0x284f, 0x2110, - 0x0c20, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001, 0x0160, 0x2502, - 0x2001, 0x0138, 0x2202, 0x00ce, 0x0005, 0x080c, 0x28c0, 0x20e1, - 0x9028, 0x2001, 0x015d, 0x2003, 0x0000, 0x00e6, 0x00c6, 0x0016, - 0x2071, 0xaa22, 0x700c, 0x7110, 0xa106, 0x0190, 0x2104, 0xa005, - 0x0130, 0x2060, 0x6010, 0x2060, 0x6008, 0x8001, 0x600a, 0xa188, - 0x0003, 0xa182, 0xaa49, 0x0210, 0x2009, 0xaa2e, 0x7112, 0x0c50, - 0x001e, 0x00ce, 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, 0x2003, - 0x0000, 0x2001, 0x0160, 0x202c, 0x2003, 0x0000, 0x080c, 0x59c3, - 0x1148, 0x2021, 0x0002, 0x1d04, 0x1e23, 0x2091, 0x6000, 0x8421, - 0x1dd0, 0x0005, 0x2021, 0xb015, 0x2001, 0x0141, 0x201c, 0xd3dc, - 0x1168, 0x2001, 0x0109, 0x201c, 0xa39c, 0x0048, 0x1138, 0x2001, - 0x0111, 0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70, 0x0005, 0x00e6, - 0x2071, 0x0200, 0x7808, 0xa084, 0xf000, 0xa10d, 0x0869, 0x2001, - 0x0105, 0x2004, 0xa084, 0x0003, 0x1130, 0x2001, 0xaa49, 0x2004, - 0xa086, 0x0000, 0x0548, 0xa026, 0x2019, 0xf000, 0x8319, 0x1148, - 0x2001, 0x012b, 0x2003, 0x95f5, 0x2001, 0x0129, 0x2003, 0x95f5, - 0x00d8, 0x2001, 0x0105, 0x2004, 0xa084, 0x0003, 0x1130, 0x2001, - 0xaa49, 0x2004, 0xa086, 0x0000, 0x0178, 0x2001, 0x0132, 0x2004, - 0xa436, 0x0110, 0x2020, 0x0c00, 0x2001, 0x0021, 0x2004, 0xd0fc, - 0x09e8, 0x080c, 0x20c8, 0x08c0, 0x20e1, 0x7000, 0x7324, 0x7420, - 0x7028, 0x7028, 0x7426, 0x7037, 0x0001, 0x810f, 0x712e, 0x702f, - 0x0100, 0x7037, 0x0008, 0x7326, 0x7422, 0x2001, 0x0160, 0x2502, - 0x2001, 0x0138, 0x2202, 0x00ee, 0x0005, 0x0026, 0x2001, 0x015d, - 0x2003, 0x0000, 0x7908, 0xa18c, 0x0fff, 0xa182, 0x0ffd, 0x0210, - 0x2009, 0x0000, 0xa190, 0x0007, 0xa294, 0x1ff8, 0x8214, 0x8214, - 0x8214, 0x2001, 0x020a, 0x82ff, 0x0140, 0x20e1, 0x6000, 0x200c, - 0x200c, 0x200c, 0x200c, 0x8211, 0x1dd0, 0x20e1, 0x7000, 0x200c, - 0x200c, 0x7003, 0x0000, 0x20e1, 0x6000, 0x2001, 0x0208, 0x200c, - 0x2001, 0x0209, 0x2004, 0xa106, 0x0158, 0x080c, 0x1d78, 0x0130, - 0x7908, 0xd1ec, 0x1128, 0x790c, 0xd1a4, 0x0960, 0x080c, 0x1da4, - 0xa006, 0x002e, 0x0005, 0x7803, 0x0004, 0x2009, 0x0064, 0x7804, - 0xd0ac, 0x0904, 0x1f1f, 0x8109, 0x1dd0, 0x2009, 0x0100, 0x210c, - 0xa18a, 0x0003, 0x0a0c, 0x1515, 0x080c, 0x21cf, 0x00e6, 0x00f6, - 0x2071, 0xaa11, 0x2079, 0x0010, 0x7004, 0xa086, 0x0000, 0x0538, - 0x7800, 0x0006, 0x7820, 0x0006, 0x7830, 0x0006, 0x7834, 0x0006, - 0x7838, 0x0006, 0x783c, 0x0006, 0x7803, 0x0004, 0xe000, 0xe000, - 0x2079, 0x0030, 0x7804, 0xd0ac, 0x190c, 0x1515, 0x2079, 0x0010, - 0x000e, 0x783e, 0x000e, 0x783a, 0x000e, 0x7836, 0x000e, 0x7832, - 0x000e, 0x7822, 0x000e, 0x7802, 0x00fe, 0x00ee, 0x0030, 0x00fe, - 0x00ee, 0x7804, 0xd0ac, 0x190c, 0x1515, 0x080c, 0x6fbb, 0x0005, - 0x00e6, 0x2071, 0xaa49, 0x7003, 0x0000, 0x00ee, 0x0005, 0x00d6, - 0xa280, 0x0004, 0x206c, 0x694c, 0xd1dc, 0x1904, 0x1f9d, 0x6934, - 0xa184, 0x0007, 0x0002, 0x1f3b, 0x1f88, 0x1f3b, 0x1f3b, 0x1f3b, - 0x1f6f, 0x1f4e, 0x1f3d, 0x080c, 0x1515, 0x684c, 0xd0b4, 0x0904, - 0x2085, 0x6860, 0x682e, 0x6816, 0x685c, 0x682a, 0x6812, 0x687c, - 0x680a, 0x6880, 0x680e, 0x6958, 0x0804, 0x1f90, 0x6834, 0xa084, - 0x00ff, 0xa086, 0x001e, 0x1d38, 0x684c, 0xd0b4, 0x0904, 0x2085, - 0x6860, 0x682e, 0x6816, 0x685c, 0x682a, 0x6812, 0x687c, 0x680a, - 0x6880, 0x680e, 0x6804, 0x681a, 0xa080, 0x000d, 0x2004, 0xa084, - 0x000f, 0xa080, 0x2263, 0x2005, 0x6832, 0x6958, 0x0450, 0xa18c, - 0x00ff, 0xa186, 0x0015, 0x1548, 0x684c, 0xd0b4, 0x0904, 0x2085, + 0x003e, 0x002e, 0x0804, 0x1c1d, 0x0056, 0x7d0c, 0x080c, 0xb4c3, + 0x005e, 0x080c, 0x1e1a, 0x00f6, 0x7004, 0x2078, 0x080c, 0x5377, + 0x0118, 0x7820, 0xc0f5, 0x7822, 0x00fe, 0x682b, 0xffff, 0x682f, + 0xffff, 0x6808, 0x8001, 0x680a, 0x697c, 0x791a, 0x6980, 0x791e, + 0x0804, 0x1d47, 0x7804, 0xd09c, 0x0904, 0x1b2a, 0x7c20, 0x7824, + 0xa405, 0x1904, 0x1b2a, 0x7818, 0x6812, 0x7c1c, 0x6c16, 0xa405, + 0x1120, 0x7803, 0x0002, 0x0804, 0x1bf7, 0x751c, 0x7420, 0x7724, + 0x7628, 0x7014, 0xa528, 0x7018, 0xa421, 0xa7b9, 0x0000, 0xa6b1, + 0x0000, 0x7830, 0xa506, 0x1150, 0x7834, 0xa406, 0x1138, 0x7838, + 0xa706, 0x1120, 0x783c, 0xa606, 0x0904, 0x1b2a, 0x7803, 0x0002, + 0x0804, 0x1c83, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0xa00d, + 0x0150, 0x6808, 0x8001, 0x680a, 0x1130, 0x7004, 0x2060, 0x2009, + 0x0048, 0x080c, 0x86d3, 0x080c, 0x19bf, 0x0088, 0x7803, 0x0004, + 0x7003, 0x0000, 0x7004, 0x2060, 0x6010, 0xa005, 0x0da0, 0x2068, + 0x6808, 0x8000, 0x680a, 0x6c28, 0x6b2c, 0x080c, 0x19da, 0x001e, + 0x000e, 0x012e, 0x0005, 0x700c, 0x7110, 0xa106, 0x0904, 0x1ded, + 0x7004, 0x0016, 0x210c, 0xa106, 0x001e, 0x0904, 0x1ded, 0x00d6, + 0x00c6, 0x216c, 0x2d00, 0xa005, 0x0904, 0x1deb, 0x681c, 0xa086, + 0x0008, 0x0904, 0x1deb, 0x6820, 0xd0d4, 0x1904, 0x1deb, 0x6810, + 0x2068, 0x6850, 0xd0fc, 0x05a8, 0x8108, 0x2104, 0x6b2c, 0xa306, + 0x1904, 0x1deb, 0x8108, 0x2104, 0x6a28, 0xa206, 0x1904, 0x1deb, + 0x6850, 0xc0fc, 0xc0f5, 0x6852, 0x686c, 0x7822, 0x7016, 0x6870, + 0x7826, 0x701a, 0x681c, 0x7832, 0x701e, 0x6820, 0x7836, 0x7022, + 0x6818, 0x2060, 0x6034, 0xd09c, 0x0168, 0x6830, 0x2005, 0x00d6, + 0xac68, 0x6808, 0x783a, 0x7026, 0x680c, 0x783e, 0x702a, 0x00de, + 0x0804, 0x1de5, 0xa006, 0x783a, 0x783e, 0x7026, 0x702a, 0x0804, + 0x1de5, 0x8108, 0x2104, 0xa005, 0x1904, 0x1deb, 0x6b2c, 0xa306, + 0x1904, 0x1deb, 0x8108, 0x2104, 0xa005, 0x15e8, 0x6a28, 0xa206, + 0x15d0, 0x6850, 0xc0f5, 0x6852, 0x6830, 0x2005, 0x6918, 0xa160, + 0xa180, 0x000d, 0x2004, 0xd09c, 0x11a0, 0x6008, 0x7822, 0x7016, + 0x686e, 0x600c, 0x7826, 0x701a, 0x6872, 0x6000, 0x7832, 0x701e, + 0x6004, 0x7836, 0x7022, 0xa006, 0x783a, 0x783e, 0x7026, 0x702a, + 0x00a0, 0x6010, 0x7822, 0x7016, 0x686e, 0x6014, 0x7826, 0x701a, + 0x6872, 0x6000, 0x7832, 0x701e, 0x6004, 0x7836, 0x7022, 0x6008, + 0x783a, 0x7026, 0x600c, 0x783e, 0x702a, 0x6810, 0x781a, 0x6814, + 0x781e, 0x7803, 0x0011, 0x00ce, 0x00de, 0x0005, 0x2011, 0x0201, + 0x2009, 0x003c, 0x2204, 0xa005, 0x1118, 0x8109, 0x1dd8, 0x0005, + 0x0005, 0x0ca1, 0x0118, 0x780c, 0xd0a4, 0x0120, 0x00d9, 0xa085, + 0x0001, 0x0010, 0x080c, 0x1f0b, 0x0005, 0x0126, 0x2091, 0x2200, + 0x7000, 0xa086, 0x0003, 0x1160, 0x700c, 0x7110, 0xa106, 0x0140, + 0x080c, 0x2991, 0x20e1, 0x9028, 0x700f, 0xb930, 0x7013, 0xb930, + 0x012e, 0x0005, 0x00c6, 0x080c, 0x5b41, 0x11b8, 0x2001, 0x0160, + 0x2003, 0x0000, 0x2001, 0x0138, 0x2003, 0x0000, 0x2011, 0x00c8, + 0xe000, 0xe000, 0x8211, 0x1de0, 0x04b1, 0x0066, 0x2031, 0x0000, + 0x080c, 0x5bc3, 0x006e, 0x00ce, 0x0005, 0x080c, 0x1e8a, 0x080c, + 0x2991, 0x20e1, 0x9028, 0x700c, 0x7110, 0xa106, 0x01c0, 0x2104, + 0xa005, 0x0130, 0x2060, 0x6010, 0x2060, 0x6008, 0x8001, 0x600a, + 0xa188, 0x0003, 0xa182, 0xb94b, 0x0210, 0x2009, 0xb930, 0x7112, + 0x700c, 0xa106, 0x1d40, 0x080c, 0x2920, 0x2110, 0x0c20, 0x2001, + 0x015d, 0x2003, 0x0000, 0x2001, 0x0160, 0x2502, 0x2001, 0x0138, + 0x2202, 0x00ce, 0x0005, 0x080c, 0x2991, 0x20e1, 0x9028, 0x2001, + 0x015d, 0x2003, 0x0000, 0x00e6, 0x00c6, 0x0016, 0x2071, 0xb924, + 0x700c, 0x7110, 0xa106, 0x0190, 0x2104, 0xa005, 0x0130, 0x2060, + 0x6010, 0x2060, 0x6008, 0x8001, 0x600a, 0xa188, 0x0003, 0xa182, + 0xb94b, 0x0210, 0x2009, 0xb930, 0x7112, 0x0c50, 0x001e, 0x00ce, + 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000, 0x2001, + 0x0160, 0x202c, 0x2003, 0x0000, 0x080c, 0x5b41, 0x1148, 0x2021, + 0x0002, 0x1d04, 0x1e99, 0x2091, 0x6000, 0x8421, 0x1dd0, 0x0005, + 0x2021, 0xb015, 0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168, 0x2001, + 0x0109, 0x201c, 0xa39c, 0x0048, 0x1138, 0x2001, 0x0111, 0x201c, + 0x83ff, 0x1110, 0x8421, 0x1d70, 0x0005, 0x00e6, 0x2071, 0x0200, + 0x7808, 0xa084, 0xf000, 0xa10d, 0x0869, 0x2001, 0x0105, 0x2004, + 0xa084, 0x0003, 0x1130, 0x2001, 0xb94b, 0x2004, 0xa086, 0x0000, + 0x0548, 0xa026, 0x2019, 0xf000, 0x8319, 0x1148, 0x2001, 0x012b, + 0x2003, 0x95f5, 0x2001, 0x0129, 0x2003, 0x95f5, 0x00d8, 0x2001, + 0x0105, 0x2004, 0xa084, 0x0003, 0x1130, 0x2001, 0xb94b, 0x2004, + 0xa086, 0x0000, 0x0178, 0x2001, 0x0132, 0x2004, 0xa436, 0x0110, + 0x2020, 0x0c00, 0x2001, 0x0021, 0x2004, 0xd0fc, 0x09e8, 0x080c, + 0x216d, 0x08c0, 0x20e1, 0x7000, 0x7324, 0x7420, 0x7028, 0x7028, + 0x7426, 0x7037, 0x0001, 0x810f, 0x712e, 0x702f, 0x0100, 0x7037, + 0x0008, 0x7326, 0x7422, 0x2001, 0x0160, 0x2502, 0x2001, 0x0138, + 0x2202, 0x00ee, 0x0005, 0x0026, 0x2001, 0x015d, 0x2003, 0x0000, + 0x7908, 0xa18c, 0x0fff, 0xa182, 0x0ffd, 0x0210, 0x2009, 0x0000, + 0xa190, 0x0007, 0xa294, 0x1ff8, 0x8214, 0x8214, 0x8214, 0x2001, + 0x020a, 0x82ff, 0x0140, 0x20e1, 0x6000, 0x200c, 0x200c, 0x200c, + 0x200c, 0x8211, 0x1dd0, 0x20e1, 0x7000, 0x200c, 0x200c, 0x7003, + 0x0000, 0x20e1, 0x6000, 0x2001, 0x0208, 0x200c, 0x2001, 0x0209, + 0x2004, 0xa106, 0x0158, 0x080c, 0x1dee, 0x0130, 0x7908, 0xd1ec, + 0x1128, 0x790c, 0xd1a4, 0x0960, 0x080c, 0x1e1a, 0xa006, 0x002e, + 0x0005, 0x00f6, 0x00e6, 0x0016, 0x0026, 0x2071, 0xb924, 0x2079, + 0x0030, 0x2011, 0x0050, 0x7000, 0xa086, 0x0000, 0x01a8, 0x8211, + 0x0188, 0x2001, 0x0005, 0x2004, 0xd08c, 0x0dc8, 0x7904, 0xa18c, + 0x0780, 0x0016, 0x080c, 0x1b22, 0x001e, 0x81ff, 0x1118, 0x2011, + 0x0050, 0x0c48, 0xa085, 0x0001, 0x002e, 0x001e, 0x00ee, 0x00fe, + 0x0005, 0x7803, 0x0004, 0x2009, 0x0064, 0x7804, 0xd0ac, 0x0904, + 0x1fbd, 0x8109, 0x1dd0, 0x2009, 0x0100, 0x210c, 0xa18a, 0x0003, + 0x0a0c, 0x151a, 0x080c, 0x2274, 0x00e6, 0x00f6, 0x2071, 0xb913, + 0x2079, 0x0010, 0x7004, 0xa086, 0x0000, 0x0538, 0x7800, 0x0006, + 0x7820, 0x0006, 0x7830, 0x0006, 0x7834, 0x0006, 0x7838, 0x0006, + 0x783c, 0x0006, 0x7803, 0x0004, 0xe000, 0xe000, 0x2079, 0x0030, + 0x7804, 0xd0ac, 0x190c, 0x151a, 0x2079, 0x0010, 0x000e, 0x783e, + 0x000e, 0x783a, 0x000e, 0x7836, 0x000e, 0x7832, 0x000e, 0x7822, + 0x000e, 0x7802, 0x00fe, 0x00ee, 0x0030, 0x00fe, 0x00ee, 0x7804, + 0xd0ac, 0x190c, 0x151a, 0x080c, 0x72a2, 0x0005, 0x00e6, 0x2071, + 0xb94b, 0x7003, 0x0000, 0x00ee, 0x0005, 0x00d6, 0xa280, 0x0004, + 0x206c, 0x694c, 0xd1dc, 0x1904, 0x203b, 0x6934, 0xa184, 0x0007, + 0x0002, 0x1fd9, 0x2026, 0x1fd9, 0x1fd9, 0x1fd9, 0x200d, 0x1fec, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Nov 30 23:00:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCAA3A3DC69; Mon, 30 Nov 2015 23:00:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 359CA1B0A; Mon, 30 Nov 2015 23:00:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUN0MsT096354; Mon, 30 Nov 2015 23:00:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUN0MZ9096352; Mon, 30 Nov 2015 23:00:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201511302300.tAUN0MZ9096352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 30 Nov 2015 23:00:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291543 - stable/10/sys/dev/ispfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 23:00:23 -0000 Author: mav Date: Mon Nov 30 23:00:22 2015 New Revision: 291543 URL: https://svnweb.freebsd.org/changeset/base/291543 Log: MFC r291143: Update Qlogic 23XX firmware from 3.03.26 to 3.03.28 Modified: stable/10/sys/dev/ispfw/asm_2300.h stable/10/sys/dev/ispfw/asm_2322.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ispfw/asm_2300.h ============================================================================== --- stable/10/sys/dev/ispfw/asm_2300.h Mon Nov 30 22:59:32 2015 (r291542) +++ stable/10/sys/dev/ispfw/asm_2300.h Mon Nov 30 23:00:22 2015 (r291543) @@ -27,21 +27,21 @@ /************************************************************************ * * - * --- ISP2300 Initiator/Target Firmware --- * - * with Fabric (Public Loop), Point-point, * - * expanded LUN addressing for FCTAPE, and 2K port logins * + * --- ISP2300 Initiator/Target Firmware --- * + * with Fabric (Public Loop), Point-point, * + * expanded LUN addressing for FCTAPE, and 2K port logins * * * ************************************************************************/ /* - * Firmware Version 3.03.26 (16:58 Aug 14, 2007) + * Firmware Version 3.03.28 */ static const uint16_t isp_2300_risc_code[] = { - 0x0470, 0x0000, 0x0000, 0xddef, 0x0000, 0x0003, 0x0003, 0x001a, - 0x0117, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, + 0x0470, 0x0000, 0x0000, 0xf4a2, 0x0000, 0x0003, 0x0003, 0x001c, + 0x0137, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972, 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, - 0x332e, 0x3033, 0x2e32, 0x3620, 0x2020, 0x2020, 0x2400, 0x20a9, + 0x332e, 0x3033, 0x2e32, 0x3820, 0x2020, 0x2020, 0x2400, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000, @@ -50,1007 +50,1067 @@ static const uint16_t isp_2300_risc_code 0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001, 0x0000, 0x20c1, 0x0004, 0x20c9, 0x1bff, 0x2059, 0x0000, 0x2b78, - 0x7883, 0x0004, 0x2089, 0x2c69, 0x2051, 0x1800, 0x2a70, 0x20e1, - 0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e51, 0x2029, + 0x7883, 0x0004, 0x2089, 0x2e49, 0x2051, 0x1800, 0x2a70, 0x20e1, + 0x0001, 0x20e9, 0x0001, 0x2009, 0x0000, 0x080c, 0x0e5a, 0x2029, 0x4d00, 0x2031, 0xffff, 0x2039, 0x4cd0, 0x2021, 0x0200, 0x20e9, 0x0001, 0x20a1, 0x0000, 0x20a9, 0x0800, 0x900e, 0x4104, 0x20e9, 0x0001, 0x20a1, 0x1000, 0x900e, 0x2001, 0x0cc0, 0x9084, 0x0fff, 0x20a8, 0x4104, 0x2001, 0x0000, 0x9086, 0x0000, 0x0120, 0x21a8, - 0x4104, 0x8001, 0x1de0, 0x756a, 0x766e, 0x7766, 0x7472, 0x7476, - 0x00e6, 0x2071, 0x1aac, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x716c, + 0x4104, 0x8001, 0x1de0, 0x756e, 0x7672, 0x776a, 0x7476, 0x747a, + 0x00e6, 0x2071, 0x1ad4, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x7170, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x000f, 0x2001, 0x0001, - 0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x716c, 0x3400, + 0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x7170, 0x3400, 0x8001, 0x9102, 0x0120, 0x0218, 0x20a8, 0x900e, 0x4104, 0x2009, 0x1800, 0x810d, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x001f, 0x2001, 0x0001, 0x9112, 0x20e9, 0x0001, 0x20a1, 0x0800, 0x900e, - 0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f25, 0x080c, - 0x5fc1, 0x080c, 0xa333, 0x080c, 0x10dc, 0x080c, 0x12c4, 0x080c, - 0x1ae1, 0x080c, 0x0d55, 0x080c, 0x1061, 0x080c, 0x3368, 0x080c, - 0x7660, 0x080c, 0x695d, 0x080c, 0x83d5, 0x080c, 0x23a4, 0x080c, - 0x874c, 0x080c, 0x7cf9, 0x080c, 0x21d9, 0x080c, 0x230d, 0x080c, - 0x2399, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, 0x091d, 0x7880, - 0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837, 0x4000, 0x7833, - 0x0010, 0x0e04, 0x0911, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, - 0x0089, 0x2004, 0xd084, 0x190c, 0x11a9, 0x2071, 0x1800, 0x7003, - 0x0000, 0x2071, 0x1800, 0x7000, 0x908e, 0x0003, 0x1168, 0x080c, - 0x4c32, 0x080c, 0x338f, 0x080c, 0x76d1, 0x080c, 0x6e62, 0x080c, - 0x8401, 0x080c, 0x2b72, 0x0c68, 0x000b, 0x0c88, 0x0940, 0x0941, - 0x0ade, 0x093e, 0x0b9e, 0x0d54, 0x0d54, 0x0d54, 0x080c, 0x0dc3, - 0x0005, 0x0126, 0x00f6, 0x2091, 0x8000, 0x7000, 0x9086, 0x0001, - 0x1904, 0x0ab1, 0x080c, 0x0e93, 0x080c, 0x7351, 0x0150, 0x080c, - 0x7374, 0x15b0, 0x2079, 0x0100, 0x7828, 0x9085, 0x1800, 0x782a, - 0x0478, 0x080c, 0x727e, 0x7000, 0x9086, 0x0001, 0x1904, 0x0ab1, - 0x7094, 0x9086, 0x0029, 0x1904, 0x0ab1, 0x080c, 0x83b5, 0x080c, - 0x83a7, 0x2079, 0x0100, 0x782f, 0x0008, 0x2001, 0x0161, 0x2003, - 0x0001, 0x7827, 0xffff, 0x7a28, 0x9295, 0x5e2f, 0x7a2a, 0x2011, - 0x71cd, 0x080c, 0x84c2, 0x2011, 0x71c0, 0x080c, 0x85e0, 0x2011, - 0x5e1c, 0x080c, 0x84c2, 0x2011, 0x8030, 0x901e, 0x7392, 0x04d0, - 0x080c, 0x56c4, 0x2079, 0x0100, 0x7844, 0x9005, 0x1904, 0x0ab1, - 0x2011, 0x5e1c, 0x080c, 0x84c2, 0x2011, 0x71cd, 0x080c, 0x84c2, - 0x2011, 0x71c0, 0x080c, 0x85e0, 0x2001, 0x0265, 0x2001, 0x0205, - 0x2003, 0x0000, 0x7840, 0x9084, 0xfffb, 0x7842, 0x2001, 0x1983, - 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, 0x080c, 0x5f69, - 0x00ce, 0x0804, 0x0ab1, 0x780f, 0x006b, 0x7a28, 0x080c, 0x7359, - 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, 0x7a2a, 0x2011, - 0x8010, 0x73d4, 0x2001, 0x1984, 0x2003, 0x0001, 0x080c, 0x2a17, - 0x080c, 0x4b6d, 0x7244, 0xc284, 0x7246, 0x2001, 0x180c, 0x200c, - 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0x9b9c, 0x2011, 0x0004, 0x080c, - 0xc1dd, 0x080c, 0x6758, 0x080c, 0x7351, 0x1120, 0x080c, 0x2a5b, - 0x02e0, 0x0400, 0x080c, 0x5f70, 0x0140, 0x7093, 0x0001, 0x70cf, - 0x0000, 0x080c, 0x5896, 0x0804, 0x0ab1, 0x080c, 0x5664, 0xd094, - 0x0188, 0x2011, 0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c, 0x5668, - 0xd0d4, 0x1118, 0x080c, 0x2a5b, 0x1270, 0x2011, 0x180c, 0x2204, - 0xc0bc, 0x00a8, 0x080c, 0x5668, 0xd0d4, 0x1db8, 0x2011, 0x180c, - 0x2204, 0xc0bd, 0x0060, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, - 0x080c, 0x6865, 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd, 0x2012, - 0x080c, 0x682b, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8, 0x707b, - 0x0000, 0x080c, 0x7351, 0x1130, 0x70ac, 0x9005, 0x1168, 0x080c, - 0xc617, 0x0050, 0x080c, 0xc617, 0x70d8, 0xd09c, 0x1128, 0x70ac, - 0x9005, 0x0110, 0x080c, 0x5f46, 0x70e3, 0x0000, 0x70df, 0x0000, - 0x70a3, 0x0000, 0x080c, 0x2a63, 0x0228, 0x2011, 0x0101, 0x2204, - 0xc0c4, 0x2012, 0x72d8, 0x080c, 0x7351, 0x1178, 0x9016, 0x0016, - 0x080c, 0x2820, 0x2019, 0x1949, 0x211a, 0x001e, 0x705b, 0xffff, - 0x705f, 0x00ef, 0x707f, 0x0000, 0x0020, 0x2019, 0x1949, 0x201b, - 0x0000, 0x2079, 0x185e, 0x7804, 0xd0ac, 0x0108, 0xc295, 0x72da, - 0x080c, 0x7351, 0x0118, 0x9296, 0x0004, 0x0548, 0x2011, 0x0001, - 0x080c, 0xc1dd, 0x70a7, 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, + 0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0f2e, 0x080c, + 0x62c2, 0x080c, 0xb4d2, 0x080c, 0x10f9, 0x080c, 0x131b, 0x080c, + 0x1c33, 0x080c, 0x0d5e, 0x080c, 0x106a, 0x080c, 0x3571, 0x080c, + 0x7b0e, 0x080c, 0x6d4b, 0x080c, 0x8cdb, 0x080c, 0x8972, 0x080c, + 0x2515, 0x080c, 0x95d8, 0x080c, 0x822e, 0x080c, 0x2346, 0x080c, + 0x247a, 0x080c, 0x250a, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, + 0x091f, 0x7880, 0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837, + 0x4000, 0x7833, 0x0010, 0x0e04, 0x0913, 0x2091, 0x5000, 0x2091, + 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x11c6, 0x2071, + 0x1800, 0x7003, 0x0000, 0x2071, 0x1800, 0x7000, 0x908e, 0x0003, + 0x1178, 0x080c, 0x4e84, 0x080c, 0x3598, 0x080c, 0x7b7f, 0x080c, + 0x72ed, 0x080c, 0x8dc2, 0x080c, 0x899e, 0x080c, 0x2d52, 0x0c58, + 0x000b, 0x0c78, 0x0944, 0x0945, 0x0ae2, 0x0942, 0x0ba7, 0x0d5d, + 0x0d5d, 0x0d5d, 0x080c, 0x0dcc, 0x0005, 0x0126, 0x00f6, 0x2091, + 0x8000, 0x7000, 0x9086, 0x0001, 0x1904, 0x0ab3, 0x080c, 0x0e9c, + 0x080c, 0x77ff, 0x0150, 0x080c, 0x7822, 0x15b0, 0x2079, 0x0100, + 0x7828, 0x9085, 0x1800, 0x782a, 0x0478, 0x080c, 0x772c, 0x7000, + 0x9086, 0x0001, 0x1904, 0x0ab3, 0x7098, 0x9086, 0x0029, 0x1904, + 0x0ab3, 0x080c, 0x8952, 0x080c, 0x8944, 0x2079, 0x0100, 0x782f, + 0x0008, 0x2001, 0x0161, 0x2003, 0x0001, 0x7827, 0xffff, 0x7a28, + 0x9295, 0x5e2f, 0x7a2a, 0x2011, 0x767b, 0x080c, 0x8a65, 0x2011, + 0x766e, 0x080c, 0x8b89, 0x2011, 0x611b, 0x080c, 0x8a65, 0x2011, + 0x8030, 0x901e, 0x7396, 0x04c0, 0x080c, 0x59bf, 0x2079, 0x0100, + 0x7844, 0x9005, 0x1904, 0x0ab3, 0x2011, 0x611b, 0x080c, 0x8a65, + 0x2011, 0x767b, 0x080c, 0x8a65, 0x2011, 0x766e, 0x080c, 0x8b89, + 0x2001, 0x0205, 0x2003, 0x0000, 0x7840, 0x9084, 0xfffb, 0x7842, + 0x2001, 0x19aa, 0x2004, 0x9005, 0x1140, 0x00c6, 0x2061, 0x0100, + 0x080c, 0x626a, 0x00ce, 0x0804, 0x0ab3, 0x780f, 0x006b, 0x7a28, + 0x080c, 0x7807, 0x0118, 0x9295, 0x5e2f, 0x0010, 0x9295, 0x402f, + 0x7a2a, 0x2011, 0x8010, 0x73d8, 0x2001, 0x19ab, 0x2003, 0x0001, + 0x080c, 0x2bf7, 0x080c, 0x4dbf, 0x7248, 0xc284, 0x724a, 0x2001, + 0x180c, 0x200c, 0xc1ac, 0xc1cc, 0x2102, 0x080c, 0xabfd, 0x2011, + 0x0004, 0x080c, 0xd404, 0x080c, 0x6aef, 0x080c, 0x77ff, 0x1120, + 0x080c, 0x2c3b, 0x02e0, 0x0400, 0x080c, 0x6271, 0x0140, 0x7097, + 0x0001, 0x70d3, 0x0000, 0x080c, 0x5b91, 0x0804, 0x0ab3, 0x080c, + 0x595f, 0xd094, 0x0188, 0x2011, 0x180c, 0x2204, 0xc0cd, 0x2012, + 0x080c, 0x5963, 0xd0d4, 0x1118, 0x080c, 0x2c3b, 0x1270, 0x2011, + 0x180c, 0x2204, 0xc0bc, 0x00a8, 0x080c, 0x5963, 0xd0d4, 0x1db8, + 0x2011, 0x180c, 0x2204, 0xc0bd, 0x0060, 0x2011, 0x180c, 0x2204, + 0xc0bd, 0x2012, 0x080c, 0x6c53, 0x1128, 0xd0a4, 0x0118, 0x2204, + 0xc0fd, 0x2012, 0x080c, 0x6c19, 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, + 0x00a8, 0x707f, 0x0000, 0x080c, 0x77ff, 0x1130, 0x70b0, 0x9005, + 0x1168, 0x080c, 0xd855, 0x0050, 0x080c, 0xd855, 0x70dc, 0xd09c, + 0x1128, 0x70b0, 0x9005, 0x0110, 0x080c, 0x6247, 0x70e7, 0x0000, + 0x70e3, 0x0000, 0x70a7, 0x0000, 0x080c, 0x2c43, 0x0228, 0x2011, + 0x0101, 0x2204, 0xc0c4, 0x2012, 0x72dc, 0x080c, 0x77ff, 0x1178, + 0x9016, 0x0016, 0x080c, 0x2a00, 0x2019, 0x1970, 0x211a, 0x001e, + 0x705f, 0xffff, 0x7063, 0x00ef, 0x7083, 0x0000, 0x0020, 0x2019, + 0x1970, 0x201b, 0x0000, 0x2079, 0x184a, 0x7804, 0xd0ac, 0x0108, + 0xc295, 0x72de, 0x080c, 0x77ff, 0x0118, 0x9296, 0x0004, 0x0548, + 0x2011, 0x0001, 0x080c, 0xd404, 0x70ab, 0x0000, 0x70af, 0xffff, + 0x7003, 0x0002, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, + 0x0003, 0x782a, 0x00fe, 0x080c, 0x30b6, 0x2011, 0x0005, 0x080c, + 0xad0c, 0x080c, 0x9ce8, 0x080c, 0x77ff, 0x0148, 0x00c6, 0x2061, + 0x0100, 0x0016, 0x080c, 0x2a00, 0x61e2, 0x001e, 0x00ce, 0x012e, + 0x0420, 0x70ab, 0x0000, 0x70af, 0xffff, 0x7003, 0x0002, 0x00f6, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, - 0x00fe, 0x080c, 0x2ed6, 0x2011, 0x0005, 0x080c, 0x9ca7, 0x080c, - 0x8e38, 0x080c, 0x7351, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, - 0x080c, 0x2820, 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420, 0x70a7, - 0x0000, 0x70ab, 0xffff, 0x7003, 0x0002, 0x00f6, 0x2079, 0x0100, - 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, 0x00fe, 0x2011, - 0x0005, 0x080c, 0x9ca7, 0x080c, 0x8e38, 0x080c, 0x7351, 0x0148, - 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x2820, 0x61e2, 0x001e, - 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x7351, - 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x7351, - 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x86ff, 0x0138, 0x9180, - 0x1000, 0x2004, 0x905d, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x31fe, - 0x8108, 0x1f04, 0x0ac5, 0x707b, 0x0000, 0x707c, 0x9084, 0x00ff, - 0x707e, 0x70af, 0x0000, 0x00be, 0x00ce, 0x0005, 0x00b6, 0x0126, - 0x2091, 0x8000, 0x7000, 0x9086, 0x0002, 0x1904, 0x0b9b, 0x70a8, - 0x9086, 0xffff, 0x0130, 0x080c, 0x2ed6, 0x080c, 0x8e38, 0x0804, - 0x0b9b, 0x70d8, 0xd0ac, 0x1110, 0xd09c, 0x0558, 0xd084, 0x0548, - 0x0006, 0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0xd08c, 0x0508, - 0x080c, 0x3261, 0x11d0, 0x70dc, 0x9086, 0xffff, 0x01b0, 0x080c, - 0x306e, 0x080c, 0x8e38, 0x70d8, 0xd094, 0x1904, 0x0b9b, 0x2011, - 0x0001, 0x080c, 0xc8ce, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, - 0x30a8, 0x080c, 0x8e38, 0x0804, 0x0b9b, 0x70e0, 0x9005, 0x1904, - 0x0b9b, 0x70a4, 0x9005, 0x1904, 0x0b9b, 0x70d8, 0xd0a4, 0x0118, - 0xd0b4, 0x0904, 0x0b9b, 0x080c, 0x682b, 0x1904, 0x0b9b, 0x080c, - 0x687e, 0x1904, 0x0b9b, 0x080c, 0x6865, 0x01c0, 0x0156, 0x00c6, - 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x64fc, 0x1118, 0xb800, - 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04, 0x0b3b, 0x00ce, 0x015e, - 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804, 0x0b9b, 0x0006, 0x2001, - 0x0103, 0x2003, 0x006b, 0x000e, 0x2011, 0x1990, 0x080c, 0x0f95, - 0x2011, 0x19aa, 0x080c, 0x0f95, 0x7030, 0xc08c, 0x7032, 0x7003, - 0x0003, 0x70ab, 0xffff, 0x080c, 0x0e75, 0x9006, 0x080c, 0x26b1, - 0x080c, 0x3261, 0x0118, 0x080c, 0x4d0a, 0x0050, 0x0036, 0x0046, - 0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4d24, 0x004e, 0x003e, - 0x00f6, 0x2079, 0x0100, 0x080c, 0x7374, 0x0150, 0x080c, 0x7351, - 0x7828, 0x0118, 0x9084, 0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, - 0x00fe, 0x2001, 0x19c5, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, - 0x0000, 0x080c, 0x9ca7, 0x2011, 0x0000, 0x080c, 0x9cb1, 0x080c, - 0x8e38, 0x080c, 0x8f0e, 0x012e, 0x00be, 0x0005, 0x0016, 0x0046, - 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x7904, 0x918c, - 0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x5f2f, 0x7940, 0x918c, - 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040, 0xd19c, - 0x0110, 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, 0x7954, 0xd1ac, - 0x1904, 0x0c2b, 0x2001, 0x1984, 0x2004, 0x9005, 0x1518, 0x080c, - 0x2ade, 0x1148, 0x2001, 0x0001, 0x080c, 0x2a46, 0x2001, 0x0001, - 0x080c, 0x2a29, 0x00b8, 0x080c, 0x2ae6, 0x1138, 0x9006, 0x080c, - 0x2a46, 0x9006, 0x080c, 0x2a29, 0x0068, 0x080c, 0x2aee, 0x1d50, - 0x2001, 0x1974, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x2854, - 0x0804, 0x0d0b, 0x080c, 0x7362, 0x0148, 0x080c, 0x7374, 0x1118, - 0x080c, 0x765b, 0x0050, 0x080c, 0x7359, 0x0dd0, 0x080c, 0x7656, - 0x080c, 0x764c, 0x080c, 0x727e, 0x0058, 0x080c, 0x7351, 0x0140, - 0x2009, 0x00f8, 0x080c, 0x5f2f, 0x7843, 0x0090, 0x7843, 0x0010, - 0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x7351, 0x0138, - 0x7824, 0xd0ac, 0x1904, 0x0d10, 0x1f04, 0x0c0a, 0x0070, 0x7824, - 0x080c, 0x736b, 0x0118, 0xd0ac, 0x1904, 0x0d10, 0x9084, 0x1800, - 0x0d98, 0x7003, 0x0001, 0x0804, 0x0d10, 0x2001, 0x0001, 0x080c, - 0x26b1, 0x0804, 0x0d23, 0x2001, 0x1984, 0x2004, 0x9005, 0x1518, - 0x080c, 0x2ade, 0x1148, 0x2001, 0x0001, 0x080c, 0x2a46, 0x2001, - 0x0001, 0x080c, 0x2a29, 0x00b8, 0x080c, 0x2ae6, 0x1138, 0x9006, - 0x080c, 0x2a46, 0x9006, 0x080c, 0x2a29, 0x0068, 0x080c, 0x2aee, - 0x1d50, 0x2001, 0x1974, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, - 0x2854, 0x0804, 0x0d0b, 0x7850, 0x9085, 0x0040, 0x7852, 0x7938, - 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2af6, 0x9085, 0x2000, - 0x7852, 0x793a, 0x20a9, 0x0046, 0x1d04, 0x0c64, 0x080c, 0x85c0, - 0x1f04, 0x0c64, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x7852, - 0x793a, 0x080c, 0x7362, 0x0148, 0x080c, 0x7374, 0x1118, 0x080c, - 0x765b, 0x0050, 0x080c, 0x7359, 0x0dd0, 0x080c, 0x7656, 0x080c, - 0x764c, 0x080c, 0x727e, 0x0020, 0x2009, 0x00f8, 0x080c, 0x5f2f, - 0x20a9, 0x0028, 0xa001, 0x1f04, 0x0c8a, 0x7850, 0x9085, 0x1400, - 0x7852, 0x080c, 0x7351, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, - 0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x85c0, 0x7820, 0xd09c, - 0x1588, 0x080c, 0x7351, 0x0904, 0x0cf0, 0x7824, 0xd0ac, 0x1904, - 0x0d10, 0x080c, 0x7374, 0x1530, 0x0046, 0x2021, 0x0320, 0x8421, - 0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2af6, 0x7824, 0x9084, - 0x1800, 0x1168, 0x9484, 0x0fff, 0x1140, 0x2001, 0x1810, 0x2004, - 0x9084, 0x9000, 0x0110, 0x080c, 0x0d31, 0x8421, 0x1158, 0x1d04, - 0x0ccb, 0x080c, 0x85c0, 0x080c, 0x7656, 0x080c, 0x764c, 0x7003, - 0x0001, 0x04f0, 0x8319, 0x1940, 0x1d04, 0x0cd8, 0x080c, 0x85c0, - 0x2009, 0x1977, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a, 0x1178, - 0x200b, 0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c, 0x2ad7, - 0x7924, 0x080c, 0x2af6, 0xd19c, 0x0110, 0x080c, 0x2a17, 0x00d8, - 0x080c, 0x7362, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c, 0x7329, - 0x7003, 0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, 0x2af6, 0x7824, - 0x080c, 0x736b, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800, 0x0950, - 0x7003, 0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x26b1, 0x0078, - 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d, 0x0002, - 0x7906, 0x7827, 0x0048, 0x7828, 0x9085, 0x0028, 0x782a, 0x7850, - 0x9085, 0x0400, 0x7852, 0x2001, 0x1984, 0x2003, 0x0000, 0x9006, - 0x78f2, 0x015e, 0x003e, 0x000e, 0x012e, 0x00fe, 0x004e, 0x001e, - 0x0005, 0x0006, 0x0016, 0x0036, 0x0046, 0x00b6, 0x00c6, 0x00d6, - 0x00e6, 0x00f6, 0x0156, 0x0069, 0x0d0c, 0x85c0, 0x015e, 0x00fe, - 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x001e, 0x000e, - 0x0005, 0x00e6, 0x2071, 0x189f, 0x7004, 0x9086, 0x0001, 0x1110, - 0x080c, 0x338f, 0x00ee, 0x0005, 0x0005, 0x2a70, 0x2061, 0x1988, - 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, 0x001a, 0x600f, 0x0117, - 0x2001, 0x1958, 0x900e, 0x2102, 0x7192, 0x2001, 0x0100, 0x2004, - 0x9082, 0x0002, 0x0218, 0x705b, 0xffff, 0x0008, 0x715a, 0x7063, - 0xffff, 0x717a, 0x717e, 0x080c, 0xc617, 0x70e7, 0x00c0, 0x2061, - 0x1948, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800, 0x600f, 0x0200, - 0x6013, 0x00ff, 0x6017, 0x000f, 0x611a, 0x601f, 0x07d0, 0x2061, - 0x1950, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f, 0x0200, 0x6013, - 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061, 0x1965, 0x6003, - 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, 0x2001, - 0x182b, 0x2102, 0x0005, 0x9016, 0x080c, 0x64fc, 0x1178, 0xb804, - 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4, 0xff00, 0x98c6, - 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210, 0x8108, 0x9186, - 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, 0x2079, 0x0000, - 0x000e, 0x00f6, 0x0010, 0x2091, 0x8000, 0x0e04, 0x0dc5, 0x0006, - 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000, 0x000e, 0x7882, - 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e, 0x7886, 0x3900, - 0x789a, 0x00d6, 0x2069, 0x0300, 0x6818, 0x78ae, 0x681c, 0x78b2, - 0x2001, 0x19e5, 0x2004, 0x78b6, 0x2001, 0x1a61, 0x2004, 0x78ba, - 0x6808, 0x78be, 0x00de, 0x7833, 0x0012, 0x2091, 0x5000, 0x0156, - 0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1a84, 0x7a08, - 0x226a, 0x2069, 0x1a85, 0x7a18, 0x226a, 0x8d68, 0x7a1c, 0x226a, - 0x782c, 0x2019, 0x1a92, 0x201a, 0x2019, 0x1a95, 0x9016, 0x7808, - 0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, 0x1aaa, - 0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, 0x2019, - 0x1a93, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, 0x2069, - 0x1a64, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, 0x8d68, - 0x8318, 0x1f04, 0x0e24, 0x002e, 0x003e, 0x00de, 0x015e, 0x2079, - 0x1800, 0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, - 0xd084, 0x0188, 0x2001, 0x19f8, 0x2004, 0x9005, 0x0130, 0x2001, - 0x008b, 0x2004, 0x9084, 0x8004, 0x0dd0, 0x2001, 0x008a, 0x2003, - 0x0002, 0x2003, 0x1001, 0x080c, 0x5673, 0x1108, 0x0099, 0x0cd8, - 0x0005, 0x918c, 0x03ff, 0x2001, 0x0003, 0x2004, 0x9084, 0x0600, - 0x1118, 0x918d, 0x2800, 0x0010, 0x918d, 0x2000, 0x2001, 0x017f, - 0x2102, 0x0005, 0x0026, 0x0126, 0x2011, 0x0080, 0x080c, 0x0eed, - 0x20a9, 0x0900, 0x080c, 0x0f0e, 0x2011, 0x0040, 0x080c, 0x0eed, - 0x20a9, 0x0900, 0x080c, 0x0f0e, 0x0c78, 0x0026, 0x080c, 0x0efa, - 0x1118, 0x2011, 0x0040, 0x0098, 0x2011, 0x010e, 0x2214, 0x9294, - 0x0007, 0x9296, 0x0007, 0x0118, 0x2011, 0xa880, 0x0010, 0x2011, - 0x6840, 0xd0e4, 0x70eb, 0x0000, 0x1120, 0x70eb, 0x0fa0, 0x080c, - 0x0eff, 0x002e, 0x0005, 0x0026, 0x080c, 0x0efa, 0x0128, 0xd0a4, - 0x1138, 0x2011, 0xcdd5, 0x0010, 0x2011, 0x0080, 0x080c, 0x0eff, - 0x002e, 0x0005, 0x0026, 0x70eb, 0x0000, 0x080c, 0x0efa, 0x1148, - 0x080c, 0x2aee, 0x1118, 0x2011, 0x8484, 0x0058, 0x2011, 0x8282, - 0x0040, 0x080c, 0x2aee, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, - 0xcac2, 0x080c, 0x0eff, 0x002e, 0x0005, 0x00e6, 0x0006, 0x2071, - 0x1800, 0xd0b4, 0x70e4, 0x1110, 0xc0e4, 0x0048, 0x0006, 0x3b00, - 0x9084, 0xff3f, 0x20d8, 0x000e, 0x70eb, 0x0000, 0xc0e5, 0x0079, - 0x000e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0xd0e4, 0x70e4, - 0x1110, 0xc0dc, 0x0008, 0xc0dd, 0x0011, 0x00ee, 0x0005, 0x70e6, - 0x7000, 0x9084, 0x0007, 0x000b, 0x0005, 0x0ebc, 0x0e93, 0x0e93, - 0x0e75, 0x0ea2, 0x0e93, 0x0e93, 0x0ea2, 0x0016, 0x3b08, 0x3a00, - 0x9104, 0x918d, 0x00c0, 0x21d8, 0x9084, 0xff3f, 0x9205, 0x20d0, - 0x001e, 0x0005, 0x2001, 0x1839, 0x2004, 0xd0dc, 0x0005, 0x9e86, - 0x1800, 0x190c, 0x0dc3, 0x70e4, 0xd0e4, 0x0108, 0xc2e5, 0x72e6, - 0xd0e4, 0x1118, 0x9294, 0x00c0, 0x0c01, 0x0005, 0x1d04, 0x0f0e, - 0x2091, 0x6000, 0x1f04, 0x0f0e, 0x0005, 0x890e, 0x810e, 0x810f, - 0x9194, 0x003f, 0x918c, 0xffc0, 0x0005, 0x0006, 0x2200, 0x914d, - 0x894f, 0x894d, 0x894d, 0x000e, 0x0005, 0x01d6, 0x0146, 0x0036, - 0x0096, 0x2061, 0x188e, 0x600b, 0x0000, 0x600f, 0x0000, 0x6003, - 0x0000, 0x6007, 0x0000, 0x2009, 0xffc0, 0x2105, 0x0006, 0x2001, - 0xaaaa, 0x200f, 0x2019, 0x5555, 0x9016, 0x2049, 0x0bff, 0xab02, - 0xa001, 0xa001, 0xa800, 0x9306, 0x1138, 0x2105, 0x9306, 0x0120, - 0x8210, 0x99c8, 0x0400, 0x0c98, 0x000e, 0x200f, 0x2001, 0x189e, - 0x928a, 0x000e, 0x1638, 0x928a, 0x0006, 0x2011, 0x0006, 0x1210, - 0x2011, 0x0000, 0x2202, 0x9006, 0x2008, 0x82ff, 0x01b0, 0x8200, - 0x600a, 0x600f, 0xffff, 0x6003, 0x0002, 0x6007, 0x0000, 0x0026, - 0x2019, 0x0010, 0x9280, 0x0001, 0x20e8, 0x21a0, 0x21a8, 0x4104, - 0x8319, 0x1de0, 0x8211, 0x1da0, 0x002e, 0x009e, 0x003e, 0x014e, - 0x01de, 0x0005, 0x2011, 0x000e, 0x08e8, 0x0016, 0x0026, 0x0096, - 0x3348, 0x080c, 0x0f15, 0x2100, 0x9300, 0x2098, 0x22e0, 0x009e, - 0x002e, 0x001e, 0x0036, 0x3518, 0x20a9, 0x0001, 0x4002, 0x8007, - 0x4004, 0x8319, 0x1dd8, 0x003e, 0x0005, 0x20e9, 0x0001, 0x71b4, - 0x81ff, 0x11c0, 0x9006, 0x2009, 0x0200, 0x20a9, 0x0002, 0x9298, - 0x0018, 0x23a0, 0x4001, 0x2009, 0x0700, 0x20a9, 0x0002, 0x9298, - 0x0008, 0x23a0, 0x4001, 0x7078, 0x8007, 0x717c, 0x810f, 0x20a9, - 0x0002, 0x4001, 0x9298, 0x000c, 0x23a0, 0x900e, 0x080c, 0x0da3, - 0x2001, 0x0000, 0x810f, 0x20a9, 0x0002, 0x4001, 0x0005, 0x89ff, - 0x0140, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x103f, 0x009e, - 0x0cb0, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x10b8, 0x090c, - 0x0dc3, 0x00ee, 0x0005, 0x0086, 0x00e6, 0x0006, 0x0026, 0x0036, - 0x0126, 0x2091, 0x8000, 0x00c9, 0x2071, 0x1800, 0x73bc, 0x702c, - 0x9016, 0x9045, 0x0158, 0x8210, 0x9906, 0x090c, 0x0dc3, 0x2300, - 0x9202, 0x0120, 0x1a0c, 0x0dc3, 0xa000, 0x0c98, 0x012e, 0x003e, - 0x002e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x0086, 0x00e6, 0x0006, - 0x0126, 0x2091, 0x8000, 0x2071, 0x1911, 0x7010, 0x9005, 0x0140, - 0x7018, 0x9045, 0x0128, 0x9906, 0x090c, 0x0dc3, 0xa000, 0x0cc8, - 0x012e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x00e6, 0x2071, 0x1800, - 0x0126, 0x2091, 0x8000, 0x70bc, 0x8001, 0x0270, 0x70be, 0x702c, - 0x2048, 0x9085, 0x0001, 0xa800, 0x702e, 0xa803, 0x0000, 0xa807, - 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8, 0x00e6, 0x0126, - 0x2091, 0x8000, 0x2071, 0x1800, 0x70bc, 0x90ca, 0x0040, 0x0268, - 0x8001, 0x70be, 0x702c, 0x2048, 0xa800, 0x702e, 0xa803, 0x0000, + 0x00fe, 0x2011, 0x0005, 0x080c, 0xad0c, 0x080c, 0x9ce8, 0x080c, + 0x77ff, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x2a00, + 0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, 0x00c6, 0x00f6, + 0x00b6, 0x080c, 0x77ff, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, + 0x0782, 0x080c, 0x77ff, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, + 0x86ff, 0x0138, 0x9180, 0x1000, 0x2004, 0x905d, 0x0110, 0xb800, + 0xd0bc, 0x090c, 0x3407, 0x8108, 0x1f04, 0x0ac8, 0x707f, 0x0000, + 0x7080, 0x9084, 0x00ff, 0x7082, 0x70b3, 0x0000, 0x00be, 0x00fe, + 0x00ce, 0x0005, 0x00b6, 0x0126, 0x2091, 0x8000, 0x7000, 0x9086, + 0x0002, 0x1904, 0x0ba4, 0x70ac, 0x9086, 0xffff, 0x0130, 0x080c, + 0x30b6, 0x080c, 0x9ce8, 0x0804, 0x0ba4, 0x70dc, 0xd0ac, 0x1110, + 0xd09c, 0x0580, 0xd084, 0x0570, 0x0006, 0x2001, 0x0103, 0x2003, + 0x002b, 0x000e, 0xd08c, 0x0530, 0x080c, 0x346a, 0x11d0, 0x70e0, + 0x9086, 0xffff, 0x01b0, 0x080c, 0x3272, 0x080c, 0x9ce8, 0x70dc, + 0xd094, 0x1904, 0x0ba4, 0x2011, 0x0001, 0x080c, 0xdb0c, 0x0110, + 0x2011, 0x0003, 0x901e, 0x080c, 0x32ac, 0x080c, 0x9ce8, 0x0804, + 0x0ba4, 0x70dc, 0xd0f4, 0x1110, 0xd094, 0x0d68, 0x70e4, 0x9005, + 0x1904, 0x0ba4, 0x70a8, 0x9005, 0x1904, 0x0ba4, 0x70dc, 0xd0a4, + 0x0118, 0xd0b4, 0x0904, 0x0ba4, 0x080c, 0x6c19, 0x1904, 0x0ba4, + 0x080c, 0x6c6c, 0x1904, 0x0ba4, 0x080c, 0x6c53, 0x01c0, 0x0156, + 0x00c6, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x6890, 0x1118, + 0xb800, 0xd0ec, 0x1138, 0x001e, 0x8108, 0x1f04, 0x0b44, 0x00ce, + 0x015e, 0x0028, 0x001e, 0x00ce, 0x015e, 0x0804, 0x0ba4, 0x0006, + 0x2001, 0x0103, 0x2003, 0x002b, 0x000e, 0x2011, 0x19b7, 0x080c, + 0x0f9e, 0x2011, 0x19d1, 0x080c, 0x0f9e, 0x7030, 0xc08c, 0x7032, + 0x7003, 0x0003, 0x70af, 0xffff, 0x080c, 0x0e7e, 0x9006, 0x080c, + 0x2891, 0x080c, 0x346a, 0x0118, 0x080c, 0x4f5c, 0x0050, 0x0036, + 0x0046, 0x2019, 0xffff, 0x2021, 0x0006, 0x080c, 0x4f76, 0x004e, + 0x003e, 0x00f6, 0x2079, 0x0100, 0x080c, 0x7822, 0x0150, 0x080c, + 0x77ff, 0x7828, 0x0118, 0x9084, 0xe1ff, 0x0010, 0x9084, 0xffdf, + 0x782a, 0x00fe, 0x2001, 0x19ec, 0x2004, 0x9086, 0x0005, 0x1120, + 0x2011, 0x0000, 0x080c, 0xad0c, 0x2011, 0x0000, 0x080c, 0xad16, + 0x080c, 0x9ce8, 0x080c, 0x9e03, 0x012e, 0x00be, 0x0005, 0x0016, + 0x0046, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x7904, + 0x918c, 0xfffd, 0x7906, 0x2009, 0x00f7, 0x080c, 0x6230, 0x7940, + 0x918c, 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040, + 0xd19c, 0x0110, 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, 0x7954, + 0xd1ac, 0x1904, 0x0c34, 0x2001, 0x19ab, 0x2004, 0x9005, 0x1518, + 0x080c, 0x2cbe, 0x1148, 0x2001, 0x0001, 0x080c, 0x2c26, 0x2001, + 0x0001, 0x080c, 0x2c09, 0x00b8, 0x080c, 0x2cc6, 0x1138, 0x9006, + 0x080c, 0x2c26, 0x9006, 0x080c, 0x2c09, 0x0068, 0x080c, 0x2cce, + 0x1d50, 0x2001, 0x199b, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, + 0x2a34, 0x0804, 0x0d14, 0x080c, 0x7810, 0x0148, 0x080c, 0x7822, + 0x1118, 0x080c, 0x7b09, 0x0050, 0x080c, 0x7807, 0x0dd0, 0x080c, + 0x7b04, 0x080c, 0x7afa, 0x080c, 0x772c, 0x0058, 0x080c, 0x77ff, + 0x0140, 0x2009, 0x00f8, 0x080c, 0x6230, 0x7843, 0x0090, 0x7843, + 0x0010, 0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x77ff, + 0x0138, 0x7824, 0xd0ac, 0x1904, 0x0d19, 0x1f04, 0x0c13, 0x0070, + 0x7824, 0x080c, 0x7819, 0x0118, 0xd0ac, 0x1904, 0x0d19, 0x9084, + 0x1800, 0x0d98, 0x7003, 0x0001, 0x0804, 0x0d19, 0x2001, 0x0001, + 0x080c, 0x2891, 0x0804, 0x0d2c, 0x2001, 0x19ab, 0x2004, 0x9005, + 0x1518, 0x080c, 0x2cbe, 0x1148, 0x2001, 0x0001, 0x080c, 0x2c26, + 0x2001, 0x0001, 0x080c, 0x2c09, 0x00b8, 0x080c, 0x2cc6, 0x1138, + 0x9006, 0x080c, 0x2c26, 0x9006, 0x080c, 0x2c09, 0x0068, 0x080c, + 0x2cce, 0x1d50, 0x2001, 0x199b, 0x2004, 0xd0fc, 0x0108, 0x0020, + 0x080c, 0x2a34, 0x0804, 0x0d14, 0x7850, 0x9085, 0x0040, 0x7852, + 0x7938, 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x2cd6, 0x9085, + 0x2000, 0x7852, 0x793a, 0x20a9, 0x0046, 0x1d04, 0x0c6d, 0x080c, + 0x8b69, 0x1f04, 0x0c6d, 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf, + 0x7852, 0x793a, 0x080c, 0x7810, 0x0148, 0x080c, 0x7822, 0x1118, + 0x080c, 0x7b09, 0x0050, 0x080c, 0x7807, 0x0dd0, 0x080c, 0x7b04, + 0x080c, 0x7afa, 0x080c, 0x772c, 0x0020, 0x2009, 0x00f8, 0x080c, + 0x6230, 0x20a9, 0x0028, 0xa001, 0x1f04, 0x0c93, 0x7850, 0x9085, + 0x1400, 0x7852, 0x080c, 0x77ff, 0x0120, 0x7843, 0x0090, 0x7843, + 0x0010, 0x2021, 0xe678, 0x2019, 0xea60, 0x0d0c, 0x8b69, 0x7820, + 0xd09c, 0x1588, 0x080c, 0x77ff, 0x0904, 0x0cf9, 0x7824, 0xd0ac, + 0x1904, 0x0d19, 0x080c, 0x7822, 0x1530, 0x0046, 0x2021, 0x0320, + 0x8421, 0x1df0, 0x004e, 0x7827, 0x1800, 0x080c, 0x2cd6, 0x7824, + 0x9084, 0x1800, 0x1168, 0x9484, 0x0fff, 0x1140, 0x2001, 0x1810, + 0x2004, 0x9084, 0x9000, 0x0110, 0x080c, 0x0d3a, 0x8421, 0x1158, + 0x1d04, 0x0cd4, 0x080c, 0x8b69, 0x080c, 0x7b04, 0x080c, 0x7afa, + 0x7003, 0x0001, 0x04f0, 0x8319, 0x1940, 0x1d04, 0x0ce1, 0x080c, + 0x8b69, 0x2009, 0x199e, 0x2104, 0x9005, 0x0118, 0x8001, 0x200a, + 0x1178, 0x200b, 0x000a, 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c, + 0x2cb7, 0x7924, 0x080c, 0x2cd6, 0xd19c, 0x0110, 0x080c, 0x2bf7, + 0x00d8, 0x080c, 0x7810, 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c, + 0x77d7, 0x7003, 0x0001, 0x00a8, 0x7827, 0x1800, 0x080c, 0x2cd6, + 0x7824, 0x080c, 0x7819, 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800, + 0x0950, 0x7003, 0x0001, 0x0028, 0x2001, 0x0001, 0x080c, 0x2891, + 0x0078, 0x2009, 0x180c, 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d, + 0x0002, 0x7906, 0x7827, 0x0048, 0x7828, 0x9085, 0x0028, 0x782a, + 0x7850, 0x9085, 0x0400, 0x7852, 0x2001, 0x19ab, 0x2003, 0x0000, + 0x9006, 0x78f2, 0x015e, 0x003e, 0x000e, 0x012e, 0x00fe, 0x004e, + 0x001e, 0x0005, 0x0006, 0x0016, 0x0036, 0x0046, 0x00b6, 0x00c6, + 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x0069, 0x0d0c, 0x8b69, 0x015e, + 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x004e, 0x003e, 0x001e, + 0x000e, 0x0005, 0x00e6, 0x2071, 0x18a1, 0x7004, 0x9086, 0x0001, + 0x1110, 0x080c, 0x3598, 0x00ee, 0x0005, 0x0005, 0x2a70, 0x2061, + 0x19af, 0x2063, 0x0003, 0x6007, 0x0003, 0x600b, 0x001c, 0x600f, + 0x0137, 0x2001, 0x197f, 0x900e, 0x2102, 0x7196, 0x2001, 0x0100, + 0x2004, 0x9082, 0x0002, 0x0218, 0x705f, 0xffff, 0x0008, 0x715e, + 0x7067, 0xffff, 0x717e, 0x7182, 0x080c, 0xd855, 0x70eb, 0x00c0, + 0x2061, 0x196f, 0x6003, 0x0909, 0x6106, 0x600b, 0x8800, 0x600f, + 0x0200, 0x6013, 0x00ff, 0x6017, 0x001f, 0x611a, 0x601f, 0x07d0, + 0x2061, 0x1977, 0x6003, 0x8000, 0x6106, 0x610a, 0x600f, 0x0200, + 0x6013, 0x00ff, 0x6116, 0x601b, 0x0001, 0x611e, 0x2061, 0x198c, + 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, + 0x2001, 0x182c, 0x2102, 0x0005, 0x9016, 0x080c, 0x6890, 0x1178, + 0xb804, 0x90c4, 0x00ff, 0x98c6, 0x0006, 0x0128, 0x90c4, 0xff00, + 0x98c6, 0x0600, 0x1120, 0x9186, 0x0080, 0x0108, 0x8210, 0x8108, + 0x9186, 0x0800, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, 0x2079, + 0x0000, 0x000e, 0x00f6, 0x0010, 0x2091, 0x8000, 0x0e04, 0x0dce, + 0x0006, 0x0016, 0x2001, 0x8002, 0x0006, 0x2079, 0x0000, 0x000e, + 0x7882, 0x7836, 0x001e, 0x798e, 0x000e, 0x788a, 0x000e, 0x7886, + 0x3900, 0x789a, 0x00d6, 0x2069, 0x0300, 0x6818, 0x78ae, 0x681c, + 0x78b2, 0x2001, 0x1a0c, 0x2004, 0x78b6, 0x2001, 0x1a89, 0x2004, + 0x78ba, 0x6808, 0x78be, 0x00de, 0x7833, 0x0012, 0x2091, 0x5000, + 0x0156, 0x00d6, 0x0036, 0x0026, 0x2079, 0x0300, 0x2069, 0x1aac, + 0x7a08, 0x226a, 0x2069, 0x1aad, 0x7a18, 0x226a, 0x8d68, 0x7a1c, + 0x226a, 0x782c, 0x2019, 0x1aba, 0x201a, 0x2019, 0x1abd, 0x9016, + 0x7808, 0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, + 0x1ad2, 0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, + 0x2019, 0x1abb, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, + 0x2069, 0x1a8c, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, + 0x8d68, 0x8318, 0x1f04, 0x0e2d, 0x002e, 0x003e, 0x00de, 0x015e, + 0x2079, 0x1800, 0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089, + 0x2004, 0xd084, 0x0188, 0x2001, 0x1a1f, 0x2004, 0x9005, 0x0130, + 0x2001, 0x008b, 0x2004, 0x9084, 0x8004, 0x0dd0, 0x2001, 0x008a, + 0x2003, 0x0002, 0x2003, 0x1001, 0x080c, 0x596e, 0x1108, 0x0099, + 0x0cd8, 0x0005, 0x918c, 0x03ff, 0x2001, 0x0003, 0x2004, 0x9084, + 0x0600, 0x1118, 0x918d, 0x2800, 0x0010, 0x918d, 0x2000, 0x2001, + 0x017f, 0x2102, 0x0005, 0x0026, 0x0126, 0x2011, 0x0080, 0x080c, + 0x0ef6, 0x20a9, 0x0900, 0x080c, 0x0f17, 0x2011, 0x0040, 0x080c, + 0x0ef6, 0x20a9, 0x0900, 0x080c, 0x0f17, 0x0c78, 0x0026, 0x080c, + 0x0f03, 0x1118, 0x2011, 0x0040, 0x0098, 0x2011, 0x010e, 0x2214, + 0x9294, 0x0007, 0x9296, 0x0007, 0x0118, 0x2011, 0xa880, 0x0010, + 0x2011, 0x6840, 0xd0e4, 0x70ef, 0x0000, 0x1120, 0x70ef, 0x0fa0, + 0x080c, 0x0f08, 0x002e, 0x0005, 0x0026, 0x080c, 0x0f03, 0x0128, + 0xd0a4, 0x1138, 0x2011, 0xcdd5, 0x0010, 0x2011, 0x0080, 0x080c, + 0x0f08, 0x002e, 0x0005, 0x0026, 0x70ef, 0x0000, 0x080c, 0x0f03, + 0x1148, 0x080c, 0x2cce, 0x1118, 0x2011, 0x8484, 0x0058, 0x2011, + 0x8282, 0x0040, 0x080c, 0x2cce, 0x1118, 0x2011, 0xcdc5, 0x0010, + 0x2011, 0xcac2, 0x080c, 0x0f08, 0x002e, 0x0005, 0x00e6, 0x0006, + 0x2071, 0x1800, 0xd0b4, 0x70e8, 0x1110, 0xc0e4, 0x0048, 0x0006, + 0x3b00, 0x9084, 0xff3f, 0x20d8, 0x000e, 0x70ef, 0x0000, 0xc0e5, + 0x0079, 0x000e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0xd0e4, + 0x70e8, 0x1110, 0xc0dc, 0x0008, 0xc0dd, 0x0011, 0x00ee, 0x0005, + 0x70ea, 0x7000, 0x9084, 0x0007, 0x000b, 0x0005, 0x0ec5, 0x0e9c, + 0x0e9c, 0x0e7e, 0x0eab, 0x0e9c, 0x0e9c, 0x0eab, 0x0016, 0x3b08, + 0x3a00, 0x9104, 0x918d, 0x00c0, 0x21d8, 0x9084, 0xff3f, 0x9205, + 0x20d0, 0x001e, 0x0005, 0x2001, 0x183a, 0x2004, 0xd0dc, 0x0005, + 0x9e86, 0x1800, 0x190c, 0x0dcc, 0x70e8, 0xd0e4, 0x0108, 0xc2e5, + 0x72ea, 0xd0e4, 0x1118, 0x9294, 0x00c0, 0x0c01, 0x0005, 0x1d04, + 0x0f17, 0x2091, 0x6000, 0x1f04, 0x0f17, 0x0005, 0x890e, 0x810e, + 0x810f, 0x9194, 0x003f, 0x918c, 0xffc0, 0x0005, 0x0006, 0x2200, + 0x914d, 0x894f, 0x894d, 0x894d, 0x000e, 0x0005, 0x01d6, 0x0146, + 0x0036, 0x0096, 0x2061, 0x1890, 0x600b, 0x0000, 0x600f, 0x0000, + 0x6003, 0x0000, 0x6007, 0x0000, 0x2009, 0xffc0, 0x2105, 0x0006, + 0x2001, 0xaaaa, 0x200f, 0x2019, 0x5555, 0x9016, 0x2049, 0x0bff, + 0xab02, 0xa001, 0xa001, 0xa800, 0x9306, 0x1138, 0x2105, 0x9306, + 0x0120, 0x8210, 0x99c8, 0x0400, 0x0c98, 0x000e, 0x200f, 0x2001, + 0x18a0, 0x928a, 0x000e, 0x1638, 0x928a, 0x0006, 0x2011, 0x0006, + 0x1210, 0x2011, 0x0000, 0x2202, 0x9006, 0x2008, 0x82ff, 0x01b0, + 0x8200, 0x600a, 0x600f, 0xffff, 0x6003, 0x0002, 0x6007, 0x0000, + 0x0026, 0x2019, 0x0010, 0x9280, 0x0001, 0x20e8, 0x21a0, 0x21a8, + 0x4104, 0x8319, 0x1de0, 0x8211, 0x1da0, 0x002e, 0x009e, 0x003e, + 0x014e, 0x01de, 0x0005, 0x2011, 0x000e, 0x08e8, 0x0016, 0x0026, + 0x0096, 0x3348, 0x080c, 0x0f1e, 0x2100, 0x9300, 0x2098, 0x22e0, + 0x009e, 0x002e, 0x001e, 0x0036, 0x3518, 0x20a9, 0x0001, 0x4002, + 0x8007, 0x4004, 0x8319, 0x1dd8, 0x003e, 0x0005, 0x20e9, 0x0001, + 0x71b8, 0x81ff, 0x11c0, 0x9006, 0x2009, 0x0200, 0x20a9, 0x0002, + 0x9298, 0x0018, 0x23a0, 0x4001, 0x2009, 0x0700, 0x20a9, 0x0002, + 0x9298, 0x0008, 0x23a0, 0x4001, 0x707c, 0x8007, 0x7180, 0x810f, + 0x20a9, 0x0002, 0x4001, 0x9298, 0x000c, 0x23a0, 0x900e, 0x080c, + 0x0dac, 0x2001, 0x0000, 0x810f, 0x20a9, 0x0002, 0x4001, 0x0005, + 0x89ff, 0x0140, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x1048, + 0x009e, 0x0cb0, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x10c1, + 0x090c, 0x0dcc, 0x00ee, 0x0005, 0x0086, 0x00e6, 0x0006, 0x0026, + 0x0036, 0x0126, 0x2091, 0x8000, 0x00c9, 0x2071, 0x1800, 0x73c0, + 0x702c, 0x9016, 0x9045, 0x0158, 0x8210, 0x9906, 0x090c, 0x0dcc, + 0x2300, 0x9202, 0x0120, 0x1a0c, 0x0dcc, 0xa000, 0x0c98, 0x012e, + 0x003e, 0x002e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x0086, 0x00e6, + 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x1913, 0x7010, 0x9005, + 0x0140, 0x7018, 0x9045, 0x0128, 0x9906, 0x090c, 0x0dcc, 0xa000, + 0x0cc8, 0x012e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x00e6, 0x2071, + 0x1800, 0x0126, 0x2091, 0x8000, 0x70c0, 0x8001, 0x0270, 0x70c2, + 0x702c, 0x2048, 0x9085, 0x0001, 0xa800, 0x702e, 0xa803, 0x0000, 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8, 0x00e6, - 0x0126, 0x2091, 0x8000, 0x0016, 0x890e, 0x810e, 0x810f, 0x9184, - 0x003f, 0xa862, 0x9184, 0xffc0, 0xa85e, 0x001e, 0x0020, 0x00e6, - 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, - 0x702e, 0x70bc, 0x8000, 0x70be, 0x080c, 0x83a7, 0x012e, 0x00ee, - 0x0005, 0x2071, 0x1800, 0x9026, 0x2009, 0x0000, 0x2049, 0x0400, - 0x2900, 0x702e, 0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, - 0x8420, 0x9886, 0x0440, 0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, - 0x2071, 0x188e, 0x7000, 0x9005, 0x11a0, 0x2001, 0x0534, 0xa802, - 0x2048, 0x2009, 0x4d00, 0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, - 0x0001, 0x8420, 0x9886, 0x0800, 0x0120, 0x2848, 0x9188, 0x0040, - 0x0c90, 0x2071, 0x188e, 0x7104, 0x7200, 0x82ff, 0x01d0, 0x7308, - 0x8318, 0x831f, 0x831b, 0x831b, 0x7312, 0x8319, 0x2001, 0x0800, - 0xa802, 0x2048, 0x8900, 0xa802, 0x2040, 0xa95e, 0xaa62, 0x8420, - 0x2300, 0x9906, 0x0130, 0x2848, 0x9188, 0x0040, 0x9291, 0x0000, - 0x0c88, 0xa803, 0x0000, 0x2071, 0x1800, 0x74ba, 0x74be, 0x0005, - 0x00e6, 0x0016, 0x9984, 0xfc00, 0x01e8, 0x908c, 0xf800, 0x1168, - 0x9982, 0x0400, 0x02b8, 0x9982, 0x0440, 0x0278, 0x9982, 0x0534, - 0x0288, 0x9982, 0x0800, 0x1270, 0x0040, 0x9982, 0x0800, 0x0250, - 0x2071, 0x188e, 0x7010, 0x9902, 0x1228, 0x9085, 0x0001, 0x001e, - 0x00ee, 0x0005, 0x9006, 0x0cd8, 0x00e6, 0x2071, 0x19f7, 0x7007, - 0x0000, 0x9006, 0x701e, 0x7022, 0x7002, 0x2071, 0x0000, 0x7010, - 0x9085, 0x8044, 0x7012, 0x2071, 0x0080, 0x9006, 0x20a9, 0x0040, - 0x7022, 0x1f04, 0x10f0, 0x702b, 0x0020, 0x00ee, 0x0005, 0x0126, - 0x2091, 0x8000, 0x00e6, 0xa073, 0x0000, 0x2071, 0x19f7, 0x701c, - 0x9088, 0x1a01, 0x280a, 0x8000, 0x9084, 0x003f, 0x701e, 0x7120, - 0x9106, 0x090c, 0x0dc3, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, - 0x0080, 0x00a9, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, - 0x8000, 0x00e6, 0x2071, 0x19f7, 0x7004, 0x9005, 0x1128, 0x00f6, - 0x2079, 0x0080, 0x0021, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004, - 0x9086, 0x0000, 0x1110, 0x7007, 0x0006, 0x7000, 0x0002, 0x1139, - 0x1137, 0x1137, 0x1137, 0x12b3, 0x12b3, 0x12b3, 0x12b3, 0x080c, - 0x0dc3, 0x701c, 0x7120, 0x9106, 0x1148, 0x792c, 0x9184, 0x0001, - 0x1120, 0xd1fc, 0x1110, 0x7007, 0x0000, 0x0005, 0x0096, 0x9180, - 0x1a01, 0x2004, 0x700a, 0x2048, 0x8108, 0x918c, 0x003f, 0x7122, - 0x782b, 0x0026, 0xa890, 0x7802, 0xa894, 0x7806, 0xa898, 0x780a, - 0xa89c, 0x780e, 0xa87c, 0x700e, 0xa874, 0x7016, 0xa878, 0x701a, - 0xa86c, 0x009e, 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, 0x0005, - 0x7007, 0x0002, 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, 0x2011, - 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x7212, - 0x8203, 0x7812, 0x782b, 0x0020, 0x782b, 0x0041, 0x002e, 0x001e, - 0x0005, 0x0016, 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e0, - 0x7018, 0x2098, 0x20e9, 0x0000, 0x20a1, 0x0088, 0x782b, 0x0026, - 0x710c, 0x2011, 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, - 0x700e, 0x22a8, 0x4006, 0x8203, 0x7812, 0x782b, 0x0020, 0x3300, - 0x701a, 0x782b, 0x0001, 0x015e, 0x014e, 0x013e, 0x002e, 0x001e, - 0x0005, 0x0016, 0x2009, 0x19f7, 0x2104, 0xc095, 0x200a, 0x080c, - 0x1116, 0x001e, 0x0005, 0x0016, 0x00e6, 0x2071, 0x19f7, 0x00f6, - 0x2079, 0x0080, 0x792c, 0xd1bc, 0x190c, 0x0dbc, 0x782b, 0x0002, - 0xd1fc, 0x0120, 0x918c, 0x0700, 0x7004, 0x0023, 0x00fe, 0x00ee, - 0x001e, 0x0005, 0x1127, 0x11d1, 0x1205, 0x0dc3, 0x0dc3, 0x12bf, - 0x0dc3, 0x918c, 0x0700, 0x1550, 0x0136, 0x0146, 0x0156, 0x7014, - 0x20e8, 0x7018, 0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, - 0x0040, 0x7010, 0x20a8, 0x4005, 0x3400, 0x701a, 0x015e, 0x014e, - 0x013e, 0x700c, 0x9005, 0x0578, 0x7800, 0x7802, 0x7804, 0x7806, - 0x080c, 0x116c, 0x0005, 0x7008, 0x0096, 0x2048, 0xa873, 0x0100, - 0x009e, 0x7007, 0x0000, 0x080c, 0x1127, 0x0005, 0x7008, 0x0096, - 0x2048, 0xa873, 0x0200, 0x009e, 0x0ca0, 0x918c, 0x0700, 0x1150, - 0x700c, 0x9005, 0x0180, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, - 0x1181, 0x0005, 0x7008, 0x0096, 0x2048, 0xa873, 0x0200, 0x009e, - 0x7007, 0x0000, 0x0080, 0x0096, 0x7008, 0x2048, 0x7800, 0xa892, - 0x7804, 0xa896, 0x7808, 0xa89a, 0x780c, 0xa89e, 0xa873, 0x0100, - 0x009e, 0x7007, 0x0000, 0x0096, 0x00d6, 0x7008, 0x2048, 0x2001, - 0x18ba, 0x2004, 0x9906, 0x1128, 0xa8a0, 0x080f, 0x00de, 0x009e, - 0x00a0, 0x00de, 0x009e, 0x0096, 0x00d6, 0x7008, 0x2048, 0x0081, - 0x0150, 0xa8a0, 0x0086, 0x2940, 0x080f, 0x008e, 0x00de, 0x009e, - 0x080c, 0x1116, 0x0005, 0x00de, 0x009e, 0x080c, 0x1116, 0x0005, - 0xa8ac, 0xd08c, 0x0005, 0x0096, 0xa0a4, 0x904d, 0x090c, 0x0dc3, - 0xa070, 0x908e, 0x0100, 0x0130, 0xa87f, 0x0030, 0xa887, 0x0000, - 0xa89b, 0x4002, 0xa898, 0x908e, 0x006b, 0x090c, 0x4740, 0x080c, - 0x6bf5, 0xa0a3, 0x0000, 0xa0a7, 0x0000, 0x2848, 0x080c, 0x103f, - 0x009e, 0x0005, 0x00a6, 0xa0a4, 0x904d, 0x090c, 0x0dc3, 0xa070, - 0x908e, 0x0100, 0x0128, 0xa87f, 0x0001, 0xa887, 0x0000, 0x00c0, - 0xa80c, 0x2050, 0xb004, 0x9005, 0x0198, 0xa80e, 0x2050, 0x8006, - 0x8006, 0x8007, 0x908c, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, - 0xa07a, 0xa176, 0xb000, 0xa07e, 0x2810, 0x080c, 0x10f7, 0x00c8, - 0xa980, 0xa898, 0x0016, 0x0006, 0x080c, 0x6bf5, 0x000e, 0x001e, - 0xd1a4, 0x0128, 0x00c6, 0x2060, 0x080c, 0xa39d, 0x00ce, 0x7008, - 0x2048, 0xa8a3, 0x0000, 0xa8a7, 0x0000, 0x080c, 0x103f, 0x080c, - 0x1116, 0x00ae, 0x0005, 0x0126, 0x2091, 0x8000, 0x782b, 0x1001, - 0x7007, 0x0005, 0x7000, 0xc094, 0x7002, 0x012e, 0x0005, 0x7007, - 0x0000, 0x080c, 0x1127, 0x0005, 0x0126, 0x2091, 0x2200, 0x2079, - 0x0300, 0x2071, 0x1a41, 0x7003, 0x0000, 0x78bf, 0x00f6, 0x781b, - 0x4800, 0x00c1, 0x7803, 0x0003, 0x780f, 0x0000, 0x20a9, 0x0266, - 0x2061, 0xe114, 0x2c0d, 0x7912, 0xe104, 0x9ce0, 0x0002, 0x7916, - 0x1f04, 0x12da, 0x7807, 0x0007, 0x7803, 0x0000, 0x7803, 0x0001, - 0x012e, 0x0005, 0x00c6, 0x7803, 0x0000, 0x7808, 0xd09c, 0x0110, - 0x7820, 0x0cd8, 0x2001, 0x1a42, 0x2003, 0x0000, 0x78ab, 0x0004, - 0x78ac, 0xd0ac, 0x1de8, 0x78ab, 0x0002, 0x7807, 0x0007, 0x7827, - 0x0030, 0x782b, 0x0400, 0x7827, 0x0031, 0x782b, 0x1a64, 0x781f, - 0xff00, 0x781b, 0xb700, 0x2001, 0x0200, 0x2004, 0xd0dc, 0x0110, - 0x781f, 0x0303, 0x2061, 0x1a64, 0x602f, 0x1cd0, 0x2001, 0x1819, - 0x2004, 0x9082, 0x1cd0, 0x6032, 0x603b, 0x1fb8, 0x2001, 0x3268, - 0xd0fc, 0x190c, 0x0dc3, 0x2001, 0x1810, 0x2004, 0xd0c4, 0x1128, - 0x2001, 0x0003, 0x2004, 0xd0d4, 0x1118, 0x783f, 0x3268, 0x0020, - 0x9084, 0xc000, 0x783f, 0xb268, 0x00ce, 0x0005, 0x0126, 0x2091, - 0x2200, 0x7908, 0x9184, 0x0030, 0x190c, 0x0dbc, 0xd19c, 0x0158, - 0x7820, 0x908c, 0xf000, 0x15f0, 0x908a, 0x0024, 0x1a0c, 0x0dc3, - 0x0023, 0x012e, 0x0005, 0x012e, 0x0005, 0x1372, 0x1372, 0x1389, - 0x138e, 0x1392, 0x1397, 0x13bf, 0x13c3, 0x13d1, 0x13d5, 0x1372, - 0x1467, 0x146b, 0x14db, 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, - 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, - 0x1399, 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, 0x1372, 0x1376, - 0x1374, 0x1372, 0x080c, 0x0dc3, 0x080c, 0x0dbc, 0x080c, 0x14e2, - 0x2009, 0x1a59, 0x2104, 0x8000, 0x200a, 0x080c, 0x7dcd, 0x080c, - 0x19e3, 0x0005, 0x2009, 0x0048, 0x2060, 0x080c, 0xa419, 0x012e, - 0x0005, 0x7004, 0xc085, 0xc0b5, 0x7006, 0x0005, 0x7004, 0xc085, - 0x7006, 0x0005, 0x080c, 0x14e2, 0x080c, 0x164b, 0x0005, 0x080c, - 0x0dc3, 0x080c, 0x14e2, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, - 0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0xa419, 0x2001, 0x015d, - 0x2003, 0x0000, 0x2009, 0x03e8, 0x8109, 0x0160, 0x2001, 0x0201, - 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, - 0x080c, 0x14e7, 0x2001, 0x0307, 0x2003, 0x8000, 0x0005, 0x7004, - 0xc095, 0x7006, 0x0005, 0x080c, 0x14e2, 0x2060, 0x6014, 0x0096, - 0x2048, 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0xa419, - 0x0005, 0x080c, 0x14e2, 0x080c, 0x0dc3, 0x080c, 0x14e2, 0x080c, - 0x1452, 0x7827, 0x0018, 0x79ac, 0xd1dc, 0x0540, 0x7827, 0x0015, - 0x7828, 0x782b, 0x0000, 0x9065, 0x0138, 0x2001, 0x020d, 0x2003, - 0x0050, 0x2003, 0x0020, 0x0400, 0x7004, 0x9005, 0x1180, 0x78ab, - 0x0004, 0x7827, 0x0018, 0x782b, 0x0000, 0xd1bc, 0x090c, 0x0dc3, - 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x04c0, 0x78ab, - 0x0004, 0x7803, 0x0001, 0x080c, 0x146b, 0x0005, 0x7828, 0x782b, - 0x0000, 0x9065, 0x090c, 0x0dc3, 0x6014, 0x2048, 0x78ab, 0x0004, - 0x918c, 0x0700, 0x01d8, 0x080c, 0x7dcd, 0x080c, 0x19e3, 0x080c, - 0xc1cd, 0x0158, 0xa9b0, 0xa936, 0xa9b4, 0xa93a, 0xa83f, 0xffff, - 0xa843, 0xffff, 0xa884, 0xc0bd, 0xa886, 0xa984, 0x9184, 0x0020, - 0x1120, 0xc1ad, 0xa986, 0x080c, 0xbde5, 0x0005, 0x6010, 0x00b6, - 0x2058, 0xb800, 0x00be, 0xd0bc, 0x6024, 0x190c, 0xc5b0, 0x2029, - 0x00c8, 0x8529, 0x0128, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, - 0x7dbc, 0x080c, 0xe0a1, 0xd5a4, 0x1118, 0x080c, 0x14e7, 0x0005, - 0x080c, 0x7dcd, 0x080c, 0x19e3, 0x0005, 0x781f, 0x0300, 0x7803, + 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x70c0, 0x90ca, 0x0020, + 0x0268, 0x8001, 0x70c2, 0x702c, 0x2048, 0xa800, 0x702e, 0xa803, + 0x0000, 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8, + 0x00e6, 0x0126, 0x2091, 0x8000, 0x0016, 0x890e, 0x810e, 0x810f, + 0x9184, 0x003f, 0xa862, 0x9184, 0xffc0, 0xa85e, 0x001e, 0x0020, + 0x00e6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x702c, 0xa802, + 0x2900, 0x702e, 0x70c0, 0x8000, 0x70c2, 0x080c, 0x8944, 0x012e, + 0x00ee, 0x0005, 0x2071, 0x1800, 0x9026, 0x2009, 0x0000, 0x2049, + 0x0400, 0x2900, 0x702e, 0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, + 0x0001, 0x8420, 0x9886, 0x0440, 0x0120, 0x2848, 0x9188, 0x0040, + 0x0c90, 0x2071, 0x1890, 0x7000, 0x9005, 0x11a0, 0x2001, 0x0534, + 0xa802, 0x2048, 0x2009, 0x4d00, 0x8940, 0x2800, 0xa802, 0xa95e, + 0xa863, 0x0001, 0x8420, 0x9886, 0x0800, 0x0120, 0x2848, 0x9188, + 0x0040, 0x0c90, 0x2071, 0x1890, 0x7104, 0x7200, 0x82ff, 0x01d0, + 0x7308, 0x8318, 0x831f, 0x831b, 0x831b, 0x7312, 0x8319, 0x2001, + 0x0800, 0xa802, 0x2048, 0x8900, 0xa802, 0x2040, 0xa95e, 0xaa62, + 0x8420, 0x2300, 0x9906, 0x0130, 0x2848, 0x9188, 0x0040, 0x9291, + 0x0000, 0x0c88, 0xa803, 0x0000, 0x2071, 0x1800, 0x74be, 0x74c2, + 0x0005, 0x00e6, 0x0016, 0x9984, 0xfc00, 0x01e8, 0x908c, 0xf800, + 0x1168, 0x9982, 0x0400, 0x02b8, 0x9982, 0x0440, 0x0278, 0x9982, + 0x0534, 0x0288, 0x9982, 0x0800, 0x1270, 0x0040, 0x9982, 0x0800, + 0x0250, 0x2071, 0x1890, 0x7010, 0x9902, 0x1228, 0x9085, 0x0001, + 0x001e, 0x00ee, 0x0005, 0x9006, 0x0cd8, 0x0156, 0x01d6, 0x0146, + 0x89ff, 0x090c, 0x0dcc, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001c, + 0x20a0, 0x20a9, 0x0024, 0x9006, 0x4004, 0x014e, 0x01de, 0x015e, + 0x0005, 0x00e6, 0x2071, 0x1a1e, 0x7007, 0x0000, 0x9006, 0x701e, + 0x7022, 0x7002, 0x2071, 0x0000, 0x7010, 0x9085, 0x8044, 0x7012, + 0x2071, 0x0080, 0x9006, 0x20a9, 0x0040, 0x7022, 0x1f04, 0x110d, + 0x702b, 0x0020, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, + 0xa073, 0x0000, 0x2071, 0x1a1e, 0x701c, 0x9088, 0x1a28, 0x280a, + 0x8000, 0x9084, 0x003f, 0x701e, 0x7120, 0x9106, 0x090c, 0x0dcc, + 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x00a9, 0x00fe, + 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, 0x2071, + 0x1a1e, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x0021, + 0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004, 0x9086, 0x0000, 0x1110, + 0x7007, 0x0006, 0x7000, 0x0002, 0x1156, 0x12dc, 0x1154, 0x1154, + 0x12d0, 0x12d0, 0x12d0, 0x12d0, 0x080c, 0x0dcc, 0x701c, 0x7120, + 0x9106, 0x1148, 0x792c, 0x9184, 0x0001, 0x1120, 0xd1fc, 0x1110, + 0x7007, 0x0000, 0x0005, 0x0096, 0x9180, 0x1a28, 0x2004, 0x700a, + 0x2048, 0x8108, 0x918c, 0x003f, 0x7122, 0x782b, 0x0026, 0xa890, + 0x7802, 0xa894, 0x7806, 0xa898, 0x780a, 0xa89c, 0x780e, 0xa87c, + 0x700e, 0xa874, 0x7016, 0xa878, 0x701a, 0xa86c, 0x009e, 0xd084, + 0x0120, 0x7007, 0x0001, 0x0029, 0x0005, 0x7007, 0x0002, 0x00b1, + 0x0005, 0x0016, 0x0026, 0x710c, 0x2011, 0x0040, 0x9182, 0x0040, + 0x1210, 0x2110, 0x9006, 0x700e, 0x7212, 0x8203, 0x7812, 0x782b, + 0x0020, 0x782b, 0x0041, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, + 0x0136, 0x0146, 0x0156, 0x7014, 0x20e0, 0x7018, 0x2098, 0x20e9, + 0x0000, 0x20a1, 0x0088, 0x782b, 0x0026, 0x710c, 0x2011, 0x0040, + 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x22a8, 0x4006, + 0x8203, 0x7812, 0x782b, 0x0020, 0x3300, 0x701a, 0x782b, 0x0001, + 0x015e, 0x014e, 0x013e, 0x002e, 0x001e, 0x0005, 0x0016, 0x2009, + 0x1a1e, 0x2104, 0xc095, 0x200a, 0x080c, 0x1133, 0x001e, 0x0005, + 0x0016, 0x00e6, 0x2071, 0x1a1e, 0x00f6, 0x2079, 0x0080, 0x792c, + 0xd1bc, 0x190c, 0x0dc5, 0x782b, 0x0002, 0xd1fc, 0x0120, 0x918c, + 0x0700, 0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x1144, + 0x11ee, 0x1222, 0x12fb, 0x0dcc, 0x1316, 0x0dcc, 0x918c, 0x0700, + 0x1550, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e8, 0x7018, 0x20a0, + 0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, 0x0040, 0x7010, 0x20a8, + 0x4005, 0x3400, 0x701a, 0x015e, 0x014e, 0x013e, 0x700c, 0x9005, + 0x0578, 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x1189, 0x0005, + 0x7008, 0x0096, 0x2048, 0xa873, 0x0100, 0x009e, 0x7007, 0x0000, + 0x080c, 0x1144, 0x0005, 0x7008, 0x0096, 0x2048, 0xa873, 0x0200, + 0x009e, 0x0ca0, 0x918c, 0x0700, 0x1150, 0x700c, 0x9005, 0x0180, + 0x7800, 0x7802, 0x7804, 0x7806, 0x080c, 0x119e, 0x0005, 0x7008, + 0x0096, 0x2048, 0xa873, 0x0200, 0x009e, 0x7007, 0x0000, 0x0080, + 0x0096, 0x7008, 0x2048, 0x7800, 0xa892, 0x7804, 0xa896, 0x7808, + 0xa89a, 0x780c, 0xa89e, 0xa873, 0x0100, 0x009e, 0x7007, 0x0000, + 0x0096, 0x00d6, 0x7008, 0x2048, 0x2001, 0x18bc, 0x2004, 0x9906, + 0x1128, 0xa8a0, 0x080f, 0x00de, 0x009e, 0x00a0, 0x00de, 0x009e, + 0x0096, 0x00d6, 0x7008, 0x2048, 0x0081, 0x0150, 0xa8a0, 0x0086, + 0x2940, 0x080f, 0x008e, 0x00de, 0x009e, 0x080c, 0x1133, 0x0005, + 0x00de, 0x009e, 0x080c, 0x1133, 0x0005, 0xa8ac, 0xd08c, 0x0005, + 0x0096, 0xa0a4, 0x904d, 0x090c, 0x0dcc, 0xa070, 0x908e, 0x0100, + 0x0130, 0xa87f, 0x0030, 0xa887, 0x0000, 0xa89b, 0x4002, 0xa898, + 0x908e, 0x006b, 0x090c, 0x4959, 0x080c, 0x7061, 0xa0a3, 0x0000, + 0xa0a7, 0x0000, 0x2848, 0x080c, 0x1048, 0x009e, 0x0005, 0x00a6, + 0xa0a4, 0x904d, 0x090c, 0x0dcc, 0xa070, 0x908e, 0x0100, 0x0128, + 0xa87f, 0x0001, 0xa887, 0x0000, 0x00c0, 0xa80c, 0x2050, 0xb004, + 0x9005, 0x0198, 0xa80e, 0x2050, 0x8006, 0x8006, 0x8007, 0x908c, + 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0xa07a, 0xa176, 0xb000, + 0xa07e, 0x2810, 0x080c, 0x1114, 0x00c8, 0xa980, 0xa898, 0x0016, + 0x0006, 0x080c, 0x7061, 0x000e, 0x001e, 0xd1a4, 0x0128, 0x00c6, + 0x2060, 0x080c, 0xb53c, 0x00ce, 0x7008, 0x2048, 0xa8a3, 0x0000, + 0xa8a7, 0x0000, 0x080c, 0x1048, 0x080c, 0x1133, 0x00ae, 0x0005, + 0x0126, 0x2091, 0x8000, 0x782b, 0x1001, 0x7007, 0x0005, 0x7000, + 0xc094, 0x7002, 0x012e, 0x0005, 0x0096, 0x2001, 0x1932, 0x204c, + 0xa880, 0x7812, 0xa890, 0x7802, 0xa894, 0x7806, 0xa898, 0x780a, + 0xa89c, 0x780e, 0x782b, 0x0020, 0x0126, 0x2091, 0x8000, 0x782b, + 0x0041, 0x7007, 0x0003, 0x7000, 0xc084, 0x7002, 0x2900, 0x700a, + 0x012e, 0x009e, 0x0005, 0x20e1, 0x0000, 0x2099, 0x0088, 0x782b, + 0x0040, 0x0096, 0x2001, 0x1932, 0x204c, 0xaa80, 0x009e, 0x080c, + 0x8ff3, 0x2009, 0x188f, 0x2104, 0x9084, 0xfffc, 0x200a, 0x080c, + 0x8e65, 0x7007, 0x0000, 0x080c, 0x1144, 0x0005, 0x7007, 0x0000, + 0x080c, 0x1144, 0x0005, 0x0126, 0x2091, 0x2200, 0x2079, 0x0300, + 0x2071, 0x1a68, 0x7003, 0x0000, 0x78bf, 0x00f6, 0x781b, 0x4800, + 0x00c1, 0x7803, 0x0003, 0x780f, 0x0000, 0x20a9, 0x03ee, 0x2061, + 0xf4b7, 0x2c0d, 0x7912, 0xe104, 0x9ce0, 0x0002, 0x7916, 0x1f04, + 0x1331, 0x7807, 0x0007, 0x7803, 0x0000, 0x7803, 0x0001, 0x012e, + 0x0005, 0x00c6, 0x7803, 0x0000, 0x781b, 0x0400, 0x7808, 0xd09c, + 0x0120, 0x7820, 0x080c, 0x1397, 0x0cc8, 0x2001, 0x1a69, 0x2003, + 0x0000, 0x78ab, 0x0004, 0x78ac, 0xd0ac, 0x1de8, 0x78ab, 0x0002, + 0x7807, 0x0007, 0x7827, 0x0030, 0x782b, 0x0400, 0x7827, 0x0031, + 0x782b, 0x1a8c, 0x781f, 0xff00, 0x781b, 0xb700, 0x2001, 0x0200, + 0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, 0x2061, 0x1a8c, 0x602f, + 0x1cd0, 0x2001, 0x181a, 0x2004, 0x9082, 0x1cd0, 0x6032, 0x603b, + 0x2125, 0x2001, 0x3471, 0xd0fc, 0x190c, 0x0dcc, 0x2001, 0x1810, + 0x2004, 0xd0c4, 0x1128, 0x2001, 0x0003, 0x2004, 0xd0d4, 0x1118, + 0x783f, 0x3471, 0x0020, 0x9084, 0xc000, 0x783f, 0xb471, 0x604f, + 0x1940, 0x2001, 0x192b, 0x2004, 0x6042, 0x00ce, 0x0005, 0x9086, + 0x000d, 0x11d0, 0x7808, 0xd09c, 0x01b8, 0x7820, 0x0026, 0x2010, + 0x080c, 0xd3e3, 0x0180, 0x2260, 0x6000, 0x9086, 0x0004, 0x1158, + 0x0016, 0x6120, 0x9186, 0x0009, 0x0108, 0x0020, 0x2009, 0x004c, + 0x080c, 0xb5b9, 0x001e, 0x002e, 0x0005, 0x0126, 0x2091, 0x2200, + 0x7908, 0x9184, 0x0030, 0x190c, 0x0dc5, 0xd19c, 0x0158, 0x7820, + 0x908c, 0xf000, 0x15f0, 0x908a, 0x0024, 0x1a0c, 0x0dcc, 0x0023, + 0x012e, 0x0005, 0x012e, 0x0005, 0x13f1, 0x13f1, 0x1408, 0x140d, + 0x1411, 0x1416, 0x143e, 0x1442, 0x1450, 0x1454, 0x13f1, 0x1527, + 0x152b, 0x159d, 0x15a4, 0x13f1, 0x15a5, 0x15a6, 0x15b1, 0x15b8, + 0x13f1, 0x13f1, 0x13f1, 0x13f1, 0x13f1, 0x13f1, 0x13f1, 0x1418, + 0x13f1, 0x13f1, 0x13f1, 0x13f1, 0x13f1, 0x13f1, 0x13f5, 0x13f3, + 0x13f1, 0x080c, 0x0dcc, 0x080c, 0x0dc5, 0x080c, 0x15c3, 0x2009, + 0x1a81, 0x2104, 0x8000, 0x200a, 0x080c, 0x8302, 0x080c, 0x1b35, + 0x0005, 0x2009, 0x0048, 0x2060, 0x080c, 0xb5b9, 0x012e, 0x0005, + 0x7004, 0xc085, 0xc0b5, 0x7006, 0x0005, 0x7004, 0xc085, 0x7006, + 0x0005, 0x080c, 0x15c3, 0x080c, 0x1733, 0x0005, 0x080c, 0x0dcc, + 0x080c, 0x15c3, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, + 0x009e, 0x2009, 0x0048, 0x080c, 0xb5b9, 0x2001, 0x015d, 0x2003, + 0x0000, 0x2009, 0x03e8, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, + 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, + 0x15c8, 0x2001, 0x0307, 0x2003, 0x8000, 0x0005, 0x7004, 0xc095, + 0x7006, 0x0005, 0x080c, 0x15c3, 0x2060, 0x6014, 0x0096, 0x2048, + 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0xb5b9, 0x0005, + 0x080c, 0x15c3, 0x080c, 0x0dcc, 0x080c, 0x15c3, 0x080c, 0x1512, + 0x7827, 0x0018, 0x79ac, 0xd1dc, 0x0904, 0x14bd, 0x7827, 0x0015, + 0x7828, 0x782b, 0x0000, 0x9065, 0x0140, 0x2001, 0x020d, 0x2003, + 0x0050, 0x2003, 0x0020, 0x0804, 0x14c3, 0x7004, 0x9005, 0x01c8, + 0x1188, 0x78ab, 0x0004, 0x7827, 0x0018, 0x782b, 0x0000, 0xd1bc, + 0x090c, 0x0dcc, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, + 0x0804, 0x14fa, 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, 0x152b, + 0x0005, 0x7827, 0x0018, 0xa001, 0x7828, 0x7827, 0x0011, 0xa001, + 0x7928, 0x9106, 0x0110, 0x79ac, 0x08e0, 0x00e6, 0x2071, 0x0200, + 0x702c, 0xd0c4, 0x0140, 0x00ee, 0x080c, 0x1b35, 0x080c, 0x1341, + 0x7803, 0x0001, 0x0005, 0x7037, 0x0001, 0xa001, 0x7150, 0x00ee, + 0x918c, 0xff00, 0x9186, 0x0500, 0x0110, 0x79ac, 0x0810, 0x7004, + 0xc09d, 0x7006, 0x78ab, 0x0004, 0x7803, 0x0001, 0x080c, 0x152b, + 0x2001, 0x020d, 0x2003, 0x0020, 0x0005, 0x7828, 0x782b, 0x0000, + 0x9065, 0x090c, 0x0dcc, 0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, + 0x0700, 0x01d8, 0x080c, 0x8302, 0x080c, 0x1b35, 0x080c, 0xd3f5, + 0x0188, 0xa9b0, 0xa936, 0xa9b4, 0xa93a, 0xa83f, 0xffff, 0xa843, + 0xffff, 0xa884, 0xc0bd, 0xa886, 0xa984, 0x9184, 0x0020, 0x1120, + 0xc1ad, 0xa986, 0x080c, 0xd00b, 0x0005, 0x6020, 0x9086, 0x0009, + 0x1128, 0x2009, 0x004c, 0x080c, 0xb5b9, 0x0060, 0x080c, 0xd3f5, + 0x0148, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x6024, + 0x190c, 0xd7ee, 0x2029, 0x00c8, 0x8529, 0x0128, 0x2001, 0x0201, + 0x2004, 0x9005, 0x0dc8, 0x7dbc, 0x080c, 0xf444, 0xd5a4, 0x0904, + 0x15c8, 0x080c, 0x8302, 0x0804, 0x1b35, 0x781f, 0x0300, 0x7803, 0x0001, 0x0005, 0x0016, 0x0066, 0x0076, 0x00f6, 0x2079, 0x0300, 0x7908, 0x918c, 0x0007, 0x9186, 0x0003, 0x0120, 0x2001, 0x0016, - 0x080c, 0x1568, 0x00fe, 0x007e, 0x006e, 0x001e, 0x0005, 0x7004, - 0xc09d, 0x7006, 0x0005, 0x7104, 0x9184, 0x0004, 0x190c, 0x0dc3, + 0x080c, 0x1649, 0x00fe, 0x007e, 0x006e, 0x001e, 0x0005, 0x7004, + 0xc09d, 0x7006, 0x0005, 0x7104, 0x9184, 0x0004, 0x190c, 0x0dcc, 0xd184, 0x11b1, 0xd19c, 0x0180, 0xc19c, 0x7106, 0x0016, 0x080c, - 0x162e, 0x001e, 0x0148, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, - 0x0020, 0x080c, 0x14e7, 0x0005, 0x81ff, 0x190c, 0x0dc3, 0x0005, + 0x1716, 0x001e, 0x0148, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, + 0x0020, 0x080c, 0x15c8, 0x0005, 0x81ff, 0x190c, 0x0dcc, 0x0005, 0x2100, 0xc184, 0xc1b4, 0x7106, 0xd0b4, 0x0016, 0x00e6, 0x1904, - 0x14d0, 0x2071, 0x0200, 0x080c, 0x1622, 0x080c, 0x162e, 0x05a8, - 0x6014, 0x9005, 0x05a8, 0x0096, 0x2048, 0xa868, 0x009e, 0x9084, - 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e, 0x0048, 0x1548, 0x601c, - 0xd084, 0x11d8, 0x00f6, 0x2c78, 0x080c, 0x16c1, 0x00fe, 0x00a8, - 0x00f6, 0x2c78, 0x080c, 0x1805, 0x00fe, 0x2009, 0x01f4, 0x8109, - 0x0160, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, - 0x2004, 0xd0ec, 0x1110, 0x0419, 0x0040, 0x2001, 0x020d, 0x2003, - 0x0020, 0x080c, 0x12ea, 0x7803, 0x0001, 0x00ee, 0x001e, 0x0005, - 0x080c, 0x162e, 0x0dd0, 0x2001, 0x020d, 0x2003, 0x0050, 0x2003, - 0x0020, 0x0069, 0x0c90, 0x0031, 0x2060, 0x2009, 0x0053, 0x080c, - 0xa419, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, 0x080c, - 0x1452, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, 0x0520, - 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, 0x79bc, - 0xd1a4, 0x1578, 0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, 0x0841, - 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, 0x810c, - 0x080c, 0x1554, 0x6827, 0x0001, 0x8109, 0x1dd0, 0x080c, 0x1554, - 0x6827, 0x0002, 0x080c, 0x1554, 0x6804, 0x9005, 0x1170, 0x682c, - 0xd0e4, 0x1540, 0x691c, 0x9184, 0x0014, 0x0120, 0x6830, 0x9084, - 0x9554, 0x15b9, 0x6804, 0x9005, 0x0da8, 0x79b8, 0xd1ec, 0x1130, - 0x0870, 0x080c, 0x7dcd, 0x080c, 0x19e3, 0x0090, 0x7827, 0x0015, - 0x782b, 0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d, - 0x2003, 0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001, - 0x00de, 0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30, - 0x7827, 0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085, - 0x1800, 0x6802, 0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0, - 0x0005, 0x2079, 0x0001, 0x000e, 0x00f6, 0x0804, 0x0dc5, 0x2001, - 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086, 0x0041, 0x0005, - 0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c, 0x0140, 0x0016, - 0x0026, 0x00c6, 0x080c, 0x1336, 0x00ce, 0x002e, 0x001e, 0x000e, - 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059, 0x1118, - 0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900, 0x8000, 0x2004, - 0x080c, 0x0dc3, 0x2009, 0x180c, 0x2104, 0xc0f4, 0x200a, 0x2009, - 0xff00, 0x8109, 0x0904, 0x15e6, 0x7a18, 0x9284, 0x0030, 0x0904, - 0x15e1, 0x9284, 0x0048, 0x9086, 0x0008, 0x1904, 0x15e1, 0x2001, - 0x0109, 0x2004, 0xd08c, 0x01f0, 0x0006, 0x01c6, 0x01d6, 0x0136, - 0x0146, 0x0156, 0x0126, 0x2091, 0x2800, 0x00f6, 0x0026, 0x0016, - 0x2009, 0x1a5c, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x885a, - 0x001e, 0x002e, 0x00fe, 0x012e, 0x015e, 0x014e, 0x013e, 0x01de, - 0x01ce, 0x000e, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x01d0, 0x0006, - 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x00f6, 0x0016, - 0x2009, 0x1a5d, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x1ddc, - 0x001e, 0x00fe, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, - 0x000e, 0x7818, 0xd0bc, 0x1904, 0x1591, 0x0005, 0x2001, 0x180c, - 0x2004, 0xd0f4, 0x1528, 0x7a18, 0x9284, 0x0030, 0x0508, 0x9284, - 0x0048, 0x9086, 0x0008, 0x11e0, 0x2001, 0x19d3, 0x2004, 0x9005, - 0x01b8, 0x2001, 0x1a44, 0x2004, 0x9086, 0x0000, 0x0188, 0x2009, - 0x1a5b, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0x994f, 0x2009, - 0x180c, 0x2104, 0xc0f5, 0x200a, 0x2009, 0xff00, 0x0804, 0x1591, - 0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, - 0x080c, 0x158a, 0x1108, 0x0005, 0x792c, 0x3900, 0x8000, 0x2004, - 0x080c, 0x0dc3, 0x7037, 0x0001, 0x7150, 0x7037, 0x0002, 0x7050, - 0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x0005, 0x0006, 0x0046, + 0x1592, 0x2071, 0x0200, 0x080c, 0x1703, 0x05e0, 0x080c, 0x1716, + 0x05b0, 0x6014, 0x9005, 0x05b0, 0x0096, 0x2048, 0xa868, 0x009e, + 0x9084, 0x00ff, 0x908e, 0x0029, 0x0160, 0x908e, 0x0048, 0x1550, + 0x601c, 0xd084, 0x11e0, 0x00f6, 0x2c78, 0x080c, 0x17a9, 0x00fe, + 0x00b0, 0x00f6, 0x2c78, 0x080c, 0x193e, 0x00fe, 0x2009, 0x01f4, + 0x8109, 0x0168, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x2001, + 0x0218, 0x2004, 0xd0ec, 0x1118, 0x080c, 0x15c8, 0x0040, 0x2001, + 0x020d, 0x2003, 0x0020, 0x080c, 0x1341, 0x7803, 0x0001, 0x00ee, + 0x001e, 0x0005, 0x080c, 0x1716, 0x0dd0, 0x2001, 0x020d, 0x2003, + 0x0050, 0x2003, 0x0020, 0x0461, 0x0c90, 0x0429, 0x2060, 0x2009, + 0x0053, 0x080c, 0xb5b9, 0x0005, 0x0005, 0x0005, 0x00e1, 0x2008, + 0x00d1, 0x0006, 0x7004, 0xc09d, 0x7006, 0x000e, 0x080c, 0x9336, + 0x0005, 0x0089, 0x9005, 0x0118, 0x080c, 0x8f59, 0x0cd0, 0x0005, + 0x2001, 0x0036, 0x2009, 0x1820, 0x210c, 0x2011, 0x181f, 0x2214, + 0x080c, 0x1649, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, 0x0005, + 0x080c, 0x1512, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4, 0x8109, + 0x0520, 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003, 0x0000, + 0x79bc, 0xd1a4, 0x1578, 0x79b8, 0x918c, 0x0fff, 0x0180, 0x9182, + 0x0841, 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c, 0x810c, + 0x810c, 0x080c, 0x1635, 0x6827, 0x0001, 0x8109, 0x1dd0, 0x080c, + 0x1635, 0x6827, 0x0002, 0x080c, 0x1635, 0x6804, 0x9005, 0x1170, + 0x682c, 0xd0e4, 0x1540, 0x691c, 0x9184, 0x0014, 0x0120, 0x6830, + 0x9084, 0x9554, 0x15b9, 0x6804, 0x9005, 0x0da8, 0x79b8, 0xd1ec, + 0x1130, 0x0870, 0x080c, 0x8302, 0x080c, 0x1b35, 0x0090, 0x7827, + 0x0015, 0x782b, 0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001, + 0x020d, 0x2003, 0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803, + 0x0001, 0x00de, 0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400, + 0x0d30, 0x7827, 0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800, + 0x9085, 0x1800, 0x6802, 0x00de, 0x0005, 0x6824, 0x9084, 0x0003, + 0x1de0, 0x0005, 0x2079, 0x0001, 0x000e, 0x00f6, 0x0804, 0x0dce, + 0x2001, 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086, 0x0041, + 0x0005, 0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c, 0x0140, + 0x0016, 0x0026, 0x00c6, 0x080c, 0x13b5, 0x00ce, 0x002e, 0x001e, + 0x000e, 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x0059, + 0x1118, 0x000e, 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900, 0x8000, + 0x2004, 0x080c, 0x0dcc, 0x2009, 0x180c, 0x2104, 0xc0f4, 0x200a, + 0x2009, 0xff00, 0x8109, 0x0904, 0x16c7, 0x7a18, 0x9284, 0x0030, + 0x0904, 0x16c2, 0x9284, 0x0048, 0x9086, 0x0008, 0x1904, 0x16c2, + 0x2001, 0x0109, 0x2004, 0xd08c, 0x01f0, 0x0006, 0x01c6, 0x01d6, + 0x0136, 0x0146, 0x0156, 0x0126, 0x2091, 0x2800, 0x00f6, 0x0026, + 0x0016, 0x2009, 0x1a84, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, + 0x96e6, 0x001e, 0x002e, 0x00fe, 0x012e, 0x015e, 0x014e, 0x013e, + 0x01de, 0x01ce, 0x000e, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x01d0, + 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x00f6, + 0x0016, 0x2009, 0x1a85, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, + 0x1f49, 0x001e, 0x00fe, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, + 0x012e, 0x000e, 0x7818, 0xd0bc, 0x1904, 0x1672, 0x0005, 0x2001, + 0x180c, 0x2004, 0xd0f4, 0x1528, 0x7a18, 0x9284, 0x0030, 0x0508, + 0x9284, 0x0048, 0x9086, 0x0008, 0x11e0, 0x2001, 0x19fa, 0x2004, + 0x9005, 0x01b8, 0x2001, 0x1a6c, 0x2004, 0x9086, 0x0000, 0x0188, + 0x2009, 0x1a83, 0x2104, 0x8000, 0x0208, 0x200a, 0x080c, 0xa999, + 0x2009, 0x180c, 0x2104, 0xc0f5, 0x200a, 0x2009, 0xff00, 0x0804, + 0x1672, 0x9085, 0x0001, 0x0005, 0x7832, 0x7936, 0x7a3a, 0x781b, + 0x8080, 0x080c, 0x166b, 0x1108, 0x0005, 0x792c, 0x3900, 0x8000, + 0x2004, 0x080c, 0x0dcc, 0x7037, 0x0001, 0x7150, 0x7037, 0x0002, + 0x7050, 0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x918c, 0xff00, + 0x9186, 0x0500, 0x0110, 0x9085, 0x0001, 0x0005, 0x0006, 0x0046, 0x00e6, 0x2071, 0x0200, 0x7037, 0x0002, 0x7058, 0x9084, 0xff00, - 0x8007, 0x9086, 0x00bc, 0x1158, 0x2021, 0x1a5a, 0x2404, 0x8000, - 0x0208, 0x2022, 0x080c, 0x7dcd, 0x080c, 0x19e3, 0x9006, 0x00ee, + 0x8007, 0x9086, 0x00bc, 0x1158, 0x2021, 0x1a82, 0x2404, 0x8000, + 0x0208, 0x2022, 0x080c, 0x8302, 0x080c, 0x1b35, 0x9006, 0x00ee, 0x004e, 0x000e, 0x0005, 0x0c11, 0x1108, 0x0005, 0x00e6, 0x0016, - 0x2071, 0x0200, 0x0879, 0x6120, 0x9186, 0x0000, 0x0904, 0x16b6, - 0x9186, 0x0002, 0x0904, 0x16b6, 0x6124, 0xd1dc, 0x01f8, 0x701c, - 0xd08c, 0x0904, 0x16b6, 0x7017, 0x0000, 0x2001, 0x0264, 0x2004, - 0xd0bc, 0x0904, 0x16b6, 0x2001, 0x0268, 0x00c6, 0x2064, 0x6104, - 0x6038, 0x00ce, 0x918e, 0x0039, 0x1904, 0x16b6, 0x9c06, 0x15f0, - 0x0126, 0x2091, 0x2600, 0x080c, 0x7d14, 0x012e, 0x7358, 0x745c, + 0x2071, 0x0200, 0x0841, 0x6120, 0x9186, 0x0000, 0x0904, 0x179e, + 0x9186, 0x0002, 0x0904, 0x179e, 0x6124, 0xd1dc, 0x01f8, 0x701c, + 0xd08c, 0x0904, 0x179e, 0x7017, 0x0000, 0x2001, 0x0264, 0x2004, + 0xd0bc, 0x0904, 0x179e, 0x2001, 0x0268, 0x00c6, 0x2064, 0x6104, + 0x6038, 0x00ce, 0x918e, 0x0039, 0x1904, 0x179e, 0x9c06, 0x15f0, + 0x0126, 0x2091, 0x2600, 0x080c, 0x8249, 0x012e, 0x7358, 0x745c, 0x6014, 0x905d, 0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058, 0xb800, - 0x00be, 0xd0bc, 0x190c, 0xc58b, 0xab42, 0xac3e, 0x2001, 0x1880, + 0x00be, 0xd0bc, 0x190c, 0xd7c9, 0xab42, 0xac3e, 0x2001, 0x186c, 0x2004, 0xd0b4, 0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff, 0xa837, - 0xffff, 0x080c, 0x1fd8, 0x1190, 0x080c, 0x1862, 0x2a00, 0xa816, + 0xffff, 0x080c, 0x2145, 0x1190, 0x080c, 0x19b6, 0x2a00, 0xa816, 0x0130, 0x2800, 0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812, 0x7037, 0x0020, 0x781f, 0x0300, 0x001e, 0x00ee, 0x0005, 0x7037, 0x0050, - 0x7037, 0x0020, 0x001e, 0x00ee, 0x080c, 0x14e7, 0x0005, 0x080c, - 0x0dc3, 0x2001, 0x180d, 0x2004, 0xd08c, 0x190c, 0x693f, 0x2ff0, + 0x7037, 0x0020, 0x001e, 0x00ee, 0x080c, 0x15c8, 0x0005, 0x080c, + 0x0dcc, 0x2001, 0x180d, 0x2004, 0xd08c, 0x190c, 0x6d2d, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x0016, 0x00c6, 0x3e60, 0x6014, 0x2048, 0x2940, 0x903e, 0x2730, 0xa868, 0x2068, 0xa81a, 0x9d84, 0x000f, - 0x9088, 0x1fb8, 0x2165, 0x0002, 0x16f3, 0x1740, 0x16f3, 0x16f3, - 0x16f3, 0x1722, 0x16f3, 0x16f7, 0x16ec, 0x1737, 0x16f3, 0x16f3, - 0x16f3, 0x17fd, 0x170b, 0x1701, 0xa968, 0x918c, 0x00ff, 0x918e, - 0x0048, 0x0904, 0x1737, 0x9085, 0x0001, 0x0804, 0x17f3, 0xa880, - 0xd0bc, 0x0dc8, 0xa894, 0xa842, 0xa890, 0xa83e, 0xa88c, 0x0804, - 0x1747, 0xa880, 0xd0bc, 0x0d78, 0xa894, 0xa842, 0xa890, 0xa83e, - 0xa88c, 0x0804, 0x1796, 0xa880, 0xd0bc, 0x0d28, 0xa894, 0xa842, - 0xa890, 0xa83e, 0xa804, 0x9045, 0x090c, 0x0dc3, 0xa168, 0xa91a, - 0x91ec, 0x000f, 0x9d80, 0x1fb8, 0x2065, 0xa88c, 0xd19c, 0x1904, - 0x1796, 0x0428, 0xa880, 0xd0ac, 0x0970, 0xa804, 0x9045, 0x090c, - 0x0dc3, 0xa168, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1fb8, 0x2065, - 0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, 0x1796, 0x0080, 0xa880, - 0xd0ac, 0x0904, 0x16f3, 0x9006, 0xa842, 0xa83e, 0x0804, 0x1796, - 0xa880, 0xd0ac, 0x0904, 0x16f3, 0x9006, 0xa842, 0xa83e, 0x2c05, - 0x908a, 0x0037, 0x1a0c, 0x0dc3, 0x9082, 0x001c, 0x0002, 0x176a, - 0x176a, 0x176c, 0x176a, 0x176a, 0x176a, 0x1772, 0x176a, 0x176a, - 0x176a, 0x1778, 0x176a, 0x176a, 0x176a, 0x177e, 0x176a, 0x176a, - 0x176a, 0x1784, 0x176a, 0x176a, 0x176a, 0x178a, 0x176a, 0x176a, - 0x176a, 0x1790, 0x080c, 0x0dc3, 0xa578, 0xa47c, 0xa380, 0xa284, - 0x0804, 0x17db, 0xa588, 0xa48c, 0xa390, 0xa294, 0x0804, 0x17db, - 0xa598, 0xa49c, 0xa3a0, 0xa2a4, 0x0804, 0x17db, 0xa5a8, 0xa4ac, - 0xa3b0, 0xa2b4, 0x0804, 0x17db, 0xa5b8, 0xa4bc, 0xa3c0, 0xa2c4, - 0x0804, 0x17db, 0xa5c8, 0xa4cc, 0xa3d0, 0xa2d4, 0x0804, 0x17db, - 0xa5d8, 0xa4dc, 0xa3e0, 0xa2e4, 0x0804, 0x17db, 0x2c05, 0x908a, - 0x0035, 0x1a0c, 0x0dc3, 0x9082, 0x001c, 0x0002, 0x17b9, 0x17b7, - 0x17b7, 0x17b7, 0x17b7, 0x17b7, 0x17c0, 0x17b7, 0x17b7, 0x17b7, - 0x17b7, 0x17b7, 0x17c7, 0x17b7, 0x17b7, 0x17b7, 0x17b7, 0x17b7, - 0x17ce, 0x17b7, 0x17b7, 0x17b7, 0x17b7, 0x17b7, 0x17d5, 0x080c, - 0x0dc3, 0xa570, 0xa474, 0xa778, 0xa67c, 0xa380, 0xa284, 0x00d8, - 0xa588, 0xa48c, 0xa790, 0xa694, 0xa398, 0xa29c, 0x00a0, 0xa5a0, - 0xa4a4, 0xa7a8, 0xa6ac, 0xa3b0, 0xa2b4, 0x0068, 0xa5b8, 0xa4bc, - 0xa7c0, 0xa6c4, 0xa3c8, 0xa2cc, 0x0030, 0xa5d0, 0xa4d4, 0xa7d8, - 0xa6dc, 0xa3e0, 0xa2e4, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, - 0xae2a, 0xa98c, 0x8c60, 0x2c1d, 0xa8b0, 0xaab4, 0xa836, 0xaa3a, - 0x8109, 0xa916, 0x1160, 0x3e60, 0x601c, 0xc085, 0x601e, 0xa880, - 0xc0dd, 0xa882, 0x9006, 0x00ce, 0x001e, 0x012e, 0x0005, 0x2800, - 0xa80e, 0xab0a, 0x2c00, 0xa812, 0x0c70, 0x0804, 0x16f3, 0x2001, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Nov 30 23:37:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19129A3C419; Mon, 30 Nov 2015 23:37:11 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAB4D1D0A; Mon, 30 Nov 2015 23:37:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAUNbA2v007795; Mon, 30 Nov 2015 23:37:10 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAUNbAKs007794; Mon, 30 Nov 2015 23:37:10 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201511302337.tAUNbAKs007794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 30 Nov 2015 23:37:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291544 - head/sys/fs/nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Nov 2015 23:37:11 -0000 Author: rmacklem Date: Mon Nov 30 23:37:09 2015 New Revision: 291544 URL: https://svnweb.freebsd.org/changeset/base/291544 Log: Delete the TUNABLE_INT() line. It was in r291527 so that it could be MFC'd to stable/10 and still work. Modified: head/sys/fs/nfs/nfs_commonport.c Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Mon Nov 30 23:00:22 2015 (r291543) +++ head/sys/fs/nfs/nfs_commonport.c Mon Nov 30 23:37:09 2015 (r291544) @@ -80,7 +80,6 @@ SYSCTL_STRING(_vfs_nfs, OID_AUTO, callba "NFSv4 callback addr for server to use"); SYSCTL_INT(_vfs_nfs, OID_AUTO, debuglevel, CTLFLAG_RW, &nfscl_debuglevel, 0, "Debug level for NFS client"); -TUNABLE_INT("vfs.nfs.userhashsize", &nfsrv_lughashsize); SYSCTL_INT(_vfs_nfs, OID_AUTO, userhashsize, CTLFLAG_RDTUN, &nfsrv_lughashsize, 0, "Size of hash tables for uid/name mapping"); From owner-svn-src-all@freebsd.org Tue Dec 1 00:24:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21937A3A200; Tue, 1 Dec 2015 00:24:56 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F01751378; Tue, 1 Dec 2015 00:24:55 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB10OtiF022201; Tue, 1 Dec 2015 00:24:55 GMT (envelope-from stas@FreeBSD.org) Received: (from stas@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB10OtRA022200; Tue, 1 Dec 2015 00:24:55 GMT (envelope-from stas@FreeBSD.org) Message-Id: <201512010024.tB10OtRA022200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stas set sender to stas@FreeBSD.org using -f From: Stanislav Sedov Date: Tue, 1 Dec 2015 00:24:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291545 - head/sys/cddl/contrib/opensolaris/uts/common/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 00:24:56 -0000 Author: stas Date: Tue Dec 1 00:24:54 2015 New Revision: 291545 URL: https://svnweb.freebsd.org/changeset/base/291545 Log: Make the number of fasttrap probes and the size of the trace points hash table tunable via sysctl or kernel tunables. Illumos allows this parameters to be changed via the fasttrap.conf configuration file, but FreeBSD code hardcoded the parameters. Expose them under the kern.dtrace.fasttrap sysctl tree. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Mon Nov 30 23:37:09 2015 (r291544) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Tue Dec 1 00:24:54 2015 (r291545) @@ -63,6 +63,7 @@ #ifndef illumos #include #include +#include #include #include #include @@ -172,13 +173,14 @@ static volatile uint64_t fasttrap_mod_ge /* * When the fasttrap provider is loaded, fasttrap_max is set to either - * FASTTRAP_MAX_DEFAULT or the value for fasttrap-max-probes in the - * fasttrap.conf file. Each time a probe is created, fasttrap_total is - * incremented by the number of tracepoints that may be associated with that - * probe; fasttrap_total is capped at fasttrap_max. + * FASTTRAP_MAX_DEFAULT, or the value for fasttrap-max-probes in the + * fasttrap.conf file (Illumos), or the value provied in the loader.conf (FreeBSD). + * Each time a probe is created, fasttrap_total is incremented by the number + * of tracepoints that may be associated with that probe; fasttrap_total is capped + * at fasttrap_max. */ #define FASTTRAP_MAX_DEFAULT 250000 -static uint32_t fasttrap_max; +static uint32_t fasttrap_max = FASTTRAP_MAX_DEFAULT; static uint32_t fasttrap_total; /* @@ -226,6 +228,17 @@ static kmutex_t fasttrap_cpuc_pid_lock[M static eventhandler_tag fasttrap_thread_dtor_tag; #endif +static unsigned long tpoints_hash_size = FASTTRAP_TPOINTS_DEFAULT_SIZE; + +#ifdef __FreeBSD__ +SYSCTL_DECL(_kern_dtrace); +SYSCTL_NODE(_kern_dtrace, OID_AUTO, fasttrap, CTLFLAG_RD, 0, "DTrace fasttrap parameters"); +SYSCTL_UINT(_kern_dtrace_fasttrap, OID_AUTO, max_probes, CTLFLAG_RWTUN, &fasttrap_max, + FASTTRAP_MAX_DEFAULT, "Maximum number of fasttrap probes"); +SYSCTL_ULONG(_kern_dtrace_fasttrap, OID_AUTO, tpoints_hash_size, CTLFLAG_RDTUN, &tpoints_hash_size, + FASTTRAP_TPOINTS_DEFAULT_SIZE, "Size of the tracepoint hash table"); +#endif + static int fasttrap_highbit(ulong_t i) { @@ -2480,8 +2493,6 @@ fasttrap_load(void) #ifdef illumos fasttrap_max = ddi_getprop(DDI_DEV_T_ANY, devi, DDI_PROP_DONTPASS, "fasttrap-max-probes", FASTTRAP_MAX_DEFAULT); -#else - fasttrap_max = FASTTRAP_MAX_DEFAULT; #endif fasttrap_total = 0; @@ -2492,12 +2503,14 @@ fasttrap_load(void) nent = ddi_getprop(DDI_DEV_T_ANY, devi, DDI_PROP_DONTPASS, "fasttrap-hash-size", FASTTRAP_TPOINTS_DEFAULT_SIZE); #else - nent = FASTTRAP_TPOINTS_DEFAULT_SIZE; + nent = tpoints_hash_size; #endif if (nent == 0 || nent > 0x1000000) nent = FASTTRAP_TPOINTS_DEFAULT_SIZE; + tpoints_hash_size = nent; + if (ISP2(nent)) fasttrap_tpoints.fth_nent = nent; else From owner-svn-src-all@freebsd.org Tue Dec 1 00:32:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4D90A3A402; Tue, 1 Dec 2015 00:32:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7AF6118C9; Tue, 1 Dec 2015 00:32:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB10W9YK024416; Tue, 1 Dec 2015 00:32:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB10W9eM024415; Tue, 1 Dec 2015 00:32:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512010032.tB10W9eM024415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 00:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291546 - head/targets/pseudo/bootstrap-tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 00:32:10 -0000 Author: bdrewery Date: Tue Dec 1 00:32:09 2015 New Revision: 291546 URL: https://svnweb.freebsd.org/changeset/base/291546 Log: META MODE: For bootstrap-tools, don't let Makefile.inc1 build any of the toolchain. This change prevents building of [clang-]tblgen, which is unneeded due to already being a host dependency where needed for targets/pseudo/toolchain. Sponsored by: EMC / Isilon Storage Division Modified: head/targets/pseudo/bootstrap-tools/Makefile Modified: head/targets/pseudo/bootstrap-tools/Makefile ============================================================================== --- head/targets/pseudo/bootstrap-tools/Makefile Tue Dec 1 00:24:54 2015 (r291545) +++ head/targets/pseudo/bootstrap-tools/Makefile Tue Dec 1 00:32:09 2015 (r291546) @@ -45,6 +45,8 @@ BSARGS= DESTDIR= \ # Need to override these so OBJTOP uses are proper in the non-meta build. BSARGS+= OBJTOP=${BTOOLSDIR}${SRCTOP} OBJROOT='$${OBJTOP}/' +# We will handle building the toolchain and cross-compiler. +BSARGS+= MK_CROSS_COMPILER=no MK_CLANG=no MK_GCC=no DISTRIB_ENV= INSTALL="sh ${SRCTOP}/tools/install.sh" NO_FSCHG=1 MK_TESTS=no legacy: .MAKE .META @@ -75,7 +77,7 @@ BSTCENV= \ TARGET_ARCH=${HOST_MACHINE_ARCH} BSTCARGS= \ - ${BSARGS:NDESTDIR=*:NOBJTOP=*:NOBJROOT=*} \ + ${BSARGS:NDESTDIR=*:NOBJTOP=*:NOBJROOT=*:NMK_CROSS_COMPILER=*:NMK_CLANG=*:NMK_GCC=*} \ BUILD_DIRDEPS=yes \ -DWITH_STAGING \ -DWITH_TOOLSDIR From owner-svn-src-all@freebsd.org Tue Dec 1 00:48:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3969A3A803; Tue, 1 Dec 2015 00:48:32 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 852FB1F8C; Tue, 1 Dec 2015 00:48:32 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB10mViL028236; Tue, 1 Dec 2015 00:48:31 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB10mV5c028235; Tue, 1 Dec 2015 00:48:31 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201512010048.tB10mV5c028235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Tue, 1 Dec 2015 00:48:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291547 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 00:48:32 -0000 Author: smh Date: Tue Dec 1 00:48:31 2015 New Revision: 291547 URL: https://svnweb.freebsd.org/changeset/base/291547 Log: MFC r288153: Use kenv 'dumpdev' in the same way as etc/rc.d/dumpon Sponsored by: Multiplay Modified: stable/10/sys/geom/geom_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_dev.c ============================================================================== --- stable/10/sys/geom/geom_dev.c Tue Dec 1 00:32:09 2015 (r291546) +++ stable/10/sys/geom/geom_dev.c Tue Dec 1 00:48:31 2015 (r291547) @@ -124,6 +124,7 @@ g_dev_fini(struct g_class *mp) { freeenv(dumpdev); + dumpdev = NULL; } static int @@ -152,10 +153,16 @@ g_dev_setdumpdev(struct cdev *dev, struc static void init_dumpdev(struct cdev *dev) { + const char *devprefix = "/dev/", *devname; + size_t len; if (dumpdev == NULL) return; - if (strcmp(devtoname(dev), dumpdev) != 0) + len = strlen(devprefix); + devname = devtoname(dev); + if (strcmp(devname, dumpdev) != 0 && + (strncmp(dumpdev, devprefix, len) != 0 || + strcmp(devname, dumpdev + len) != 0)) return; if (g_dev_setdumpdev(dev, curthread) == 0) { freeenv(dumpdev); From owner-svn-src-all@freebsd.org Tue Dec 1 00:53:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B51B4A3A9D3; Tue, 1 Dec 2015 00:53:04 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 792BA1388; Tue, 1 Dec 2015 00:53:04 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB10r3GR030984; Tue, 1 Dec 2015 00:53:03 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB10r3VM030983; Tue, 1 Dec 2015 00:53:03 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201512010053.tB10r3VM030983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Tue, 1 Dec 2015 00:53:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291548 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 00:53:04 -0000 Author: smh Date: Tue Dec 1 00:53:03 2015 New Revision: 291548 URL: https://svnweb.freebsd.org/changeset/base/291548 Log: MFC r291004: Fix early kernel dump via dumpdev env Sponsored by: Multiplay Modified: stable/10/sys/geom/geom_dev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/geom_dev.c ============================================================================== --- stable/10/sys/geom/geom_dev.c Tue Dec 1 00:48:31 2015 (r291547) +++ stable/10/sys/geom/geom_dev.c Tue Dec 1 00:53:03 2015 (r291548) @@ -150,24 +150,38 @@ g_dev_setdumpdev(struct cdev *dev, struc return (error); } -static void +static int init_dumpdev(struct cdev *dev) { + struct g_consumer *cp; const char *devprefix = "/dev/", *devname; + int error; size_t len; if (dumpdev == NULL) - return; + return (0); + len = strlen(devprefix); devname = devtoname(dev); if (strcmp(devname, dumpdev) != 0 && (strncmp(dumpdev, devprefix, len) != 0 || strcmp(devname, dumpdev + len) != 0)) - return; - if (g_dev_setdumpdev(dev, curthread) == 0) { + return (0); + + cp = (struct g_consumer *)dev->si_drv2; + error = g_access(cp, 1, 0, 0); + if (error != 0) + return (error); + + error = g_dev_setdumpdev(dev, curthread); + if (error == 0) { freeenv(dumpdev); dumpdev = NULL; } + + (void)g_access(cp, -1, 0, 0); + + return (error); } static void @@ -329,7 +343,10 @@ g_dev_taste(struct g_class *mp, struct g dev->si_iosize_max = MAXPHYS; dev->si_drv2 = cp; - init_dumpdev(dev); + error = init_dumpdev(dev); + if (error != 0) + printf("%s: init_dumpdev() failed (gp->name=%s, error=%d)\n", + __func__, gp->name, error); if (adev != NULL) { adev->si_iosize_max = MAXPHYS; adev->si_drv2 = cp; From owner-svn-src-all@freebsd.org Tue Dec 1 00:53:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A367DA3AA17; Tue, 1 Dec 2015 00:53:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C06D1542; Tue, 1 Dec 2015 00:53:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB10rHVX031034; Tue, 1 Dec 2015 00:53:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB10rHPa031033; Tue, 1 Dec 2015 00:53:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512010053.tB10rHPa031033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 00:53:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291549 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 00:53:18 -0000 Author: bdrewery Date: Tue Dec 1 00:53:17 2015 New Revision: 291549 URL: https://svnweb.freebsd.org/changeset/base/291549 Log: META MODE: Always define HOST_*, even if not using them. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.meta.sys.mk Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Tue Dec 1 00:53:03 2015 (r291548) +++ head/share/mk/local.meta.sys.mk Tue Dec 1 00:53:17 2015 (r291549) @@ -225,12 +225,13 @@ CPP?= ${HOST_CPP} .endif .endif -.if ${MACHINE} == "host" HOST_CC?= /usr/bin/cc -CC= ${HOST_CC} HOST_CXX?= /usr/bin/c++ -CXX= ${HOST_CXX} HOST_CPP?= /usr/bin/cpp + +.if ${MACHINE} == "host" +CC= ${HOST_CC} +CXX= ${HOST_CXX} CPP= ${HOST_CPP} .endif From owner-svn-src-all@freebsd.org Tue Dec 1 01:22:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1058A3D097; Tue, 1 Dec 2015 01:22:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DCEE10C2; Tue, 1 Dec 2015 01:22:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB11MAlg037680; Tue, 1 Dec 2015 01:22:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB11MALE037678; Tue, 1 Dec 2015 01:22:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512010122.tB11MALE037678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 01:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291550 - head/lib/libc++ X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 01:22:11 -0000 Author: bdrewery Date: Tue Dec 1 01:22:10 2015 New Revision: 291550 URL: https://svnweb.freebsd.org/changeset/base/291550 Log: META MODE: Libc++ does in fact need Libcxxrt. There seems to be no cyclic dependency here. This partially reverts r283595 which had no explanation for the change. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc++/Makefile head/lib/libc++/Makefile.depend Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Tue Dec 1 00:53:17 2015 (r291549) +++ head/lib/libc++/Makefile Tue Dec 1 01:22:10 2015 (r291550) @@ -212,8 +212,4 @@ afterinstall: ${.OBJDIR}/libstdc++.a .endif -# avoid cyclic dependency -CFLAGS+= -I${LIBCXXRTDIR} -GENDIRDEPS_FILTER= N*/libcxxrt - .include Modified: head/lib/libc++/Makefile.depend ============================================================================== --- head/lib/libc++/Makefile.depend Tue Dec 1 00:53:17 2015 (r291549) +++ head/lib/libc++/Makefile.depend Tue Dec 1 01:22:10 2015 (r291550) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libcxxrt \ lib/msun \ From owner-svn-src-all@freebsd.org Tue Dec 1 02:30:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00CA6A3DF8F; Tue, 1 Dec 2015 02:30:43 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C119310B6; Tue, 1 Dec 2015 02:30:42 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB12Uf1D058266; Tue, 1 Dec 2015 02:30:41 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB12Ufe7058265; Tue, 1 Dec 2015 02:30:41 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201512010230.tB12Ufe7058265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 1 Dec 2015 02:30:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291551 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 02:30:43 -0000 Author: rmacklem Date: Tue Dec 1 02:30:41 2015 New Revision: 291551 URL: https://svnweb.freebsd.org/changeset/base/291551 Log: MFC: r290970 mnt_stat.f_iosize (which is used to set bo_bsize) must be set to the largest size of buffer cache block or the mapping of the buffer is bogus. When a mount with rsize=4096,wsize=4096 was done, f_iosize would be set to 4096. This resulted in corrupted directory data, since the buffer cache block size for directories is NFS_DIRBLKSIZ (8192). This patch fixes the code so that it always sets f_iosize to at least NFS_DIRBLKSIZ. Modified: stable/10/sys/fs/nfsclient/nfs_clvfsops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clvfsops.c Tue Dec 1 01:22:10 2015 (r291550) +++ stable/10/sys/fs/nfsclient/nfs_clvfsops.c Tue Dec 1 02:30:41 2015 (r291551) @@ -211,10 +211,12 @@ newnfs_iosize(struct nfsmount *nmp) * Calculate the size used for io buffers. Use the larger * of the two sizes to minimise nfs requests but make sure * that it is at least one VM page to avoid wasting buffer - * space. + * space. It must also be at least NFS_DIRBLKSIZ, since + * that is the buffer size used for directories. */ iosize = imax(nmp->nm_rsize, nmp->nm_wsize); iosize = imax(iosize, PAGE_SIZE); + iosize = imax(iosize, NFS_DIRBLKSIZ); nmp->nm_mountp->mnt_stat.f_iosize = iosize; return (iosize); } From owner-svn-src-all@freebsd.org Tue Dec 1 02:35:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A611A3D093; Tue, 1 Dec 2015 02:35:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4908D15D0; Tue, 1 Dec 2015 02:35:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB12ZCnw060528; Tue, 1 Dec 2015 02:35:12 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB12ZCA5060527; Tue, 1 Dec 2015 02:35:12 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201512010235.tB12ZCA5060527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Tue, 1 Dec 2015 02:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291552 - stable/9/sys/fs/nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 02:35:13 -0000 Author: rmacklem Date: Tue Dec 1 02:35:12 2015 New Revision: 291552 URL: https://svnweb.freebsd.org/changeset/base/291552 Log: MFC: r290970 mnt_stat.f_iosize (which is used to set bo_bsize) must be set to the largest size of buffer cache block or the mapping of the buffer is bogus. When a mount with rsize=4096,wsize=4096 was done, f_iosize would be set to 4096. This resulted in corrupted directory data, since the buffer cache block size for directories is NFS_DIRBLKSIZ (8192). This patch fixes the code so that it always sets f_iosize to at least NFS_DIRBLKSIZ. Modified: stable/9/sys/fs/nfsclient/nfs_clvfsops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clvfsops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clvfsops.c Tue Dec 1 02:30:41 2015 (r291551) +++ stable/9/sys/fs/nfsclient/nfs_clvfsops.c Tue Dec 1 02:35:12 2015 (r291552) @@ -207,10 +207,12 @@ newnfs_iosize(struct nfsmount *nmp) * Calculate the size used for io buffers. Use the larger * of the two sizes to minimise nfs requests but make sure * that it is at least one VM page to avoid wasting buffer - * space. + * space. It must also be at least NFS_DIRBLKSIZ, since + * that is the buffer size used for directories. */ iosize = imax(nmp->nm_rsize, nmp->nm_wsize); iosize = imax(iosize, PAGE_SIZE); + iosize = imax(iosize, NFS_DIRBLKSIZ); nmp->nm_mountp->mnt_stat.f_iosize = iosize; return (iosize); } From owner-svn-src-all@freebsd.org Tue Dec 1 02:48:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9FFF6A3D381; Tue, 1 Dec 2015 02:48:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6879F1C9F; Tue, 1 Dec 2015 02:48:43 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB12mgdJ063432; Tue, 1 Dec 2015 02:48:42 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB12mgac063431; Tue, 1 Dec 2015 02:48:42 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201512010248.tB12mgac063431@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 1 Dec 2015 02:48:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291553 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 02:48:43 -0000 Author: mjg Date: Tue Dec 1 02:48:42 2015 New Revision: 291553 URL: https://svnweb.freebsd.org/changeset/base/291553 Log: capsicum: plug spurious memset in __cap_rights_init Reviewed by: pjd Modified: head/sys/kern/subr_capability.c Modified: head/sys/kern/subr_capability.c ============================================================================== --- head/sys/kern/subr_capability.c Tue Dec 1 02:35:12 2015 (r291552) +++ head/sys/kern/subr_capability.c Tue Dec 1 02:48:42 2015 (r291553) @@ -157,7 +157,6 @@ __cap_rights_init(int version, cap_right n = version + 2; assert(n >= CAPARSIZE_MIN && n <= CAPARSIZE_MAX); - memset(rights->cr_rights, 0, sizeof(rights->cr_rights[0]) * n); CAP_NONE(rights); va_start(ap, rights); cap_rights_vset(rights, ap); From owner-svn-src-all@freebsd.org Tue Dec 1 03:00:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FE6EA3D685; Tue, 1 Dec 2015 03:00:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AB2D12DB; Tue, 1 Dec 2015 03:00:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB130BSY066407; Tue, 1 Dec 2015 03:00:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB130B8h066406; Tue, 1 Dec 2015 03:00:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512010300.tB130B8h066406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 03:00:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291554 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 03:00:12 -0000 Author: bdrewery Date: Tue Dec 1 03:00:10 2015 New Revision: 291554 URL: https://svnweb.freebsd.org/changeset/base/291554 Log: FAST_DEPEND: Allow not using -MP by setting DEPEND_MP blank. -MP creates empty targets for all dependency files, which can be useful when a dependency is deleted from the file system. This would otherwise cause an error for "don't know how to build FOO" since the .depend file is included with the dependency registered. This is mostly a workaround for the misc/dahdi-kmod port using '::' for one of its dependencies, while -MP uses just ':'. This results in an 'Inconsistent operator for' error. X-MFC-With: r290433 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Tue Dec 1 02:48:42 2015 (r291553) +++ head/share/mk/bsd.dep.mk Tue Dec 1 03:00:10 2015 (r291554) @@ -59,7 +59,8 @@ DEPENDFILE?= .depend DEPENDFILES= ${DEPENDFILE} .if ${MK_FAST_DEPEND} == "yes" && ${.MAKE.MODE:Unormal:Mmeta*} == "" DEPENDFILES+= ${DEPENDFILE}.* -DEPEND_CFLAGS+= -MD -MP -MF${DEPENDFILE}.${.TARGET} +DEPEND_MP?= -MP +DEPEND_CFLAGS+= -MD -MF${DEPENDFILE}.${.TARGET} DEPEND_CFLAGS+= -MT${.TARGET} CFLAGS+= ${DEPEND_CFLAGS} DEPENDOBJS+= ${OBJS} ${POBJS} ${SOBJS} From owner-svn-src-all@freebsd.org Tue Dec 1 03:09:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 940A8A3D94C; Tue, 1 Dec 2015 03:09:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61AB91BFE; Tue, 1 Dec 2015 03:09:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB139sQD069967; Tue, 1 Dec 2015 03:09:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB139sEd069966; Tue, 1 Dec 2015 03:09:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512010309.tB139sEd069966@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 03:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291555 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 03:09:55 -0000 Author: bdrewery Date: Tue Dec 1 03:09:54 2015 New Revision: 291555 URL: https://svnweb.freebsd.org/changeset/base/291555 Log: FAST_DEPEND: Workaround hacks in the wild that have '..' or '/' in OBJS. This is mostly working around the converts/iconv port having '../ces/file.o' in its OBJS list which resulted in '.depend../ces/file.o'. Now it will have '.depend.._ces_file.o'. Other implementations have :T which would result in '.depend.file.o' here, but that could lead to collisions. X-MFC-With: r291554 MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Tue Dec 1 03:00:10 2015 (r291554) +++ head/share/mk/bsd.dep.mk Tue Dec 1 03:09:54 2015 (r291555) @@ -60,15 +60,18 @@ DEPENDFILES= ${DEPENDFILE} .if ${MK_FAST_DEPEND} == "yes" && ${.MAKE.MODE:Unormal:Mmeta*} == "" DEPENDFILES+= ${DEPENDFILE}.* DEPEND_MP?= -MP -DEPEND_CFLAGS+= -MD -MF${DEPENDFILE}.${.TARGET} +# Handle OBJS=../somefile.o hacks. Just replace '/' rather than use :T to +# avoid collisions. +DEPEND_FILTER= C,/,_,g +DEPEND_CFLAGS+= -MD -MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}} DEPEND_CFLAGS+= -MT${.TARGET} CFLAGS+= ${DEPEND_CFLAGS} DEPENDOBJS+= ${OBJS} ${POBJS} ${SOBJS} .for __obj in ${DEPENDOBJS:O:u} .if ${.MAKEFLAGS:M-V} == "" -.sinclude "${DEPENDFILE}.${__obj}" +.sinclude "${DEPENDFILE}.${__obj:${DEPEND_FILTER}}" .endif -DEPENDFILES_OBJS+= ${DEPENDFILE}.${__obj} +DEPENDFILES_OBJS+= ${DEPENDFILE}.${__obj:${DEPEND_FILTER}} .endfor .endif # ${MK_FAST_DEPEND} == "yes" From owner-svn-src-all@freebsd.org Tue Dec 1 05:12:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CE39A3ECA7; Tue, 1 Dec 2015 05:12:15 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E08CE10E8; Tue, 1 Dec 2015 05:12:14 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB15CEo9007439; Tue, 1 Dec 2015 05:12:14 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB15CDgV007432; Tue, 1 Dec 2015 05:12:13 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201512010512.tB15CDgV007432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Tue, 1 Dec 2015 05:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291557 - in head: share/man/man4 sys/conf sys/dev/usb sys/dev/usb/net sys/modules/usb sys/modules/usb/ure X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 05:12:15 -0000 Author: kevlo Date: Tue Dec 1 05:12:13 2015 New Revision: 291557 URL: https://svnweb.freebsd.org/changeset/base/291557 Log: Add initial support for RTL8152 USB Fast Ethernet. RTL8152 supports IPv4/IPv6 checksum offloading and VLAN tag insertion/stripping. Since uether doesn't provide a way to announce driver specific offload capabilities to upper stack, checksum offloading support needs more work and will be done in the future. Special thanks to Hayes Wang from RealTek who gave input. Added: head/share/man/man4/ure.4 (contents, props changed) head/sys/dev/usb/net/if_ure.c (contents, props changed) head/sys/dev/usb/net/if_urereg.h (contents, props changed) head/sys/modules/usb/ure/ head/sys/modules/usb/ure/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/miibus.4 head/sys/conf/NOTES head/sys/conf/files head/sys/dev/usb/usbdevs head/sys/modules/usb/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Dec 1 04:15:34 2015 (r291556) +++ head/share/man/man4/Makefile Tue Dec 1 05:12:13 2015 (r291557) @@ -521,6 +521,7 @@ MAN= aac.4 \ tws.4 \ tx.4 \ txp.4 \ + ure.4 \ vale.4 \ vga.4 \ vge.4 \ @@ -710,6 +711,7 @@ MLINKS+=tl.4 if_tl.4 MLINKS+=tun.4 if_tun.4 MLINKS+=tx.4 if_tx.4 MLINKS+=txp.4 if_txp.4 +MLINKS+=ure.4 if_ure.4 MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vxlan.4 if_vxlan.4 Modified: head/share/man/man4/miibus.4 ============================================================================== --- head/share/man/man4/miibus.4 Tue Dec 1 04:15:34 2015 (r291556) +++ head/share/man/man4/miibus.4 Tue Dec 1 05:12:13 2015 (r291557) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 5, 2015 +.Dd December 1, 2015 .Dt MIIBUS 4 .Os .Sh NAME @@ -117,6 +117,8 @@ Texas Instruments ThunderLAN SMC EtherPower II (83c170) .It Xr udav 4 Davicom DM9601 USB Ethernet +.It Xr ure 4 +RealTek RTL8152 USB To Fast Ethernet .It Xr vge 4 VIA VT612x PCI Gigabit Ethernet .It Xr vr 4 @@ -177,6 +179,7 @@ but as a result are not well behaved new .Xr tl 4 , .Xr tx 4 , .Xr udav 4 , +.Xr ure 4 , .Xr vge 4 , .Xr vr 4 , .Xr vte 4 , Added: head/share/man/man4/ure.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ure.4 Tue Dec 1 05:12:13 2015 (r291557) @@ -0,0 +1,121 @@ +.\" +.\" Copyright (c) 2015 Kevin Lo +.\" 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$ +.\" +.Dd December 1, 2015 +.Dt URE 4 +.Os +.Sh NAME +.Nm ure +.Nd "RealTek RTL8152 USB to Fast Ethernet controller driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device uhci" +.Cd "device ohci" +.Cd "device usb" +.Cd "device miibus" +.Cd "device uether" +.Cd "device ure" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ure_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for USB Ethernet adapters based on the RealTek +RTL8152 USB to Fast Ethernet controller chip. +.Pp +The RTL8152 contains an integrated Fast Ethernet MAC, which supports +both 10 and 100Mbps speeds in either full or half duplex. +.Pp +The +.Nm +driver supports the following media types: +.Bl -tag -width ".Cm 10baseT/UTP" +.It Cm autoselect +Enable auto selection of the media type and options. +The user can manually override +the auto selected mode by adding media options to the +.Pa /etc/rc.conf +file. +.It Cm 10baseT/UTP +Set 10Mbps operation. +The +.Cm mediaopt +option can also be used to select either +.Cm full-duplex +or +.Cm half-duplex +modes. +.It Cm 100baseTX +Set 100Mbps (Fast Ethernet) operation. +The +.Cm mediaopt +option can also be used to select either +.Cm full-duplex +or +.Cm half-duplex +modes. +.El +.Pp +The +.Nm +driver supports the following media options: +.Bl -tag -width ".Cm 10baseT/UTP" +.It Cm full-duplex +Force full duplex operation. +.It Cm half-duplex +Force half duplex operation. +.El +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh DIAGNOSTICS +.Bl -diag +.It "ure%d: watchdog timeout" +A packet was queued for transmission and a transmit command was +issued, however the device failed to acknowledge the transmission +before a timeout expired. +.El +.Sh SEE ALSO +.Xr arp 4 , +.Xr miibus 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr ifconfig 8 +.Sh AUTHORS +The +.Nm +driver was written by +.An Kevin Lo Aq Mt kevlo@FreeBSD.org . Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Dec 1 04:15:34 2015 (r291556) +++ head/sys/conf/NOTES Tue Dec 1 05:12:13 2015 (r291557) @@ -2740,6 +2740,9 @@ device rue # Davicom DM9601E USB to fast ethernet. Supports the Corega FEther USB-TXC. device udav # +# RealTek RTL8152 USB to fast ethernet. +device ure +# # Moschip MCS7730/MCS7840 USB to fast ethernet. Supports the Sitecom LN030. device mos # Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Dec 1 04:15:34 2015 (r291556) +++ head/sys/conf/files Tue Dec 1 05:12:13 2015 (r291557) @@ -2612,12 +2612,13 @@ dev/usb/net/if_mos.c optional mos dev/usb/net/if_rue.c optional rue dev/usb/net/if_smsc.c optional smsc dev/usb/net/if_udav.c optional udav +dev/usb/net/if_ure.c optional ure dev/usb/net/if_usie.c optional usie dev/usb/net/if_urndis.c optional urndis dev/usb/net/ruephy.c optional rue dev/usb/net/usb_ethernet.c optional uether | aue | axe | axge | cdce | \ cue | ipheth | kue | mos | rue | \ - smsc | udav | urndis + smsc | udav | ure | urndis dev/usb/net/uhso.c optional uhso # # USB WLAN drivers Added: head/sys/dev/usb/net/if_ure.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/net/if_ure.c Tue Dec 1 05:12:13 2015 (r291557) @@ -0,0 +1,1070 @@ +/*- + * Copyright (c) 2015 Kevin Lo + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include "usbdevs.h" + +#define USB_DEBUG_VAR ure_debug +#include +#include + +#include +#include + +#ifdef USB_DEBUG +static int ure_debug = 0; + +static SYSCTL_NODE(_hw_usb, OID_AUTO, ure, CTLFLAG_RW, 0, "USB ure"); +SYSCTL_INT(_hw_usb_ure, OID_AUTO, debug, CTLFLAG_RWTUN, &ure_debug, 0, + "Debug level"); +#endif + +/* + * Various supported device vendors/products. + */ +static const STRUCT_USB_HOST_ID ure_devs[] = { +#define URE_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) } + URE_DEV(REALTEK, RTL8152), +#undef URE_DEV +}; + +static device_probe_t ure_probe; +static device_attach_t ure_attach; +static device_detach_t ure_detach; + +static usb_callback_t ure_bulk_read_callback; +static usb_callback_t ure_bulk_write_callback; + +static miibus_readreg_t ure_miibus_readreg; +static miibus_writereg_t ure_miibus_writereg; +static miibus_statchg_t ure_miibus_statchg; + +static uether_fn_t ure_attach_post; +static uether_fn_t ure_init; +static uether_fn_t ure_stop; +static uether_fn_t ure_start; +static uether_fn_t ure_tick; +static uether_fn_t ure_setmulti; +static uether_fn_t ure_setpromisc; + +static int ure_ctl(struct ure_softc *, uint8_t, uint16_t, uint16_t, + void *, int); +static int ure_read_mem(struct ure_softc *, uint16_t, uint16_t, void *, + int); +static int ure_write_mem(struct ure_softc *, uint16_t, uint16_t, void *, + int); +static uint8_t ure_read_1(struct ure_softc *, uint16_t, uint16_t); +static uint16_t ure_read_2(struct ure_softc *, uint16_t, uint16_t); +static uint32_t ure_read_4(struct ure_softc *, uint16_t, uint16_t); +static int ure_write_1(struct ure_softc *, uint16_t, uint16_t, uint32_t); +static int ure_write_2(struct ure_softc *, uint16_t, uint16_t, uint32_t); +static int ure_write_4(struct ure_softc *, uint16_t, uint16_t, uint32_t); +static uint16_t ure_ocp_reg_read(struct ure_softc *, uint16_t); +static void ure_ocp_reg_write(struct ure_softc *, uint16_t, uint16_t); + +static void ure_read_chipver(struct ure_softc *); +static int ure_attach_post_sub(struct usb_ether *); +static void ure_reset(struct ure_softc *); +static int ure_ifmedia_upd(struct ifnet *); +static void ure_ifmedia_sts(struct ifnet *, struct ifmediareq *); +static int ure_ioctl(struct ifnet *, u_long, caddr_t); +static void ure_rtl8152_init(struct ure_softc *); +static void ure_disable_teredo(struct ure_softc *); +static void ure_init_fifo(struct ure_softc *); + +static const struct usb_config ure_config[URE_N_TRANSFER] = { + [URE_BULK_DT_WR] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_OUT, + .bufsize = MCLBYTES, + .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .callback = ure_bulk_write_callback, + .timeout = 10000, /* 10 seconds */ + }, + [URE_BULK_DT_RD] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .bufsize = MCLBYTES, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = ure_bulk_read_callback, + .timeout = 0, /* no timeout */ + }, +}; + +static device_method_t ure_methods[] = { + /* Device interface. */ + DEVMETHOD(device_probe, ure_probe), + DEVMETHOD(device_attach, ure_attach), + DEVMETHOD(device_detach, ure_detach), + + /* MII interface. */ + DEVMETHOD(miibus_readreg, ure_miibus_readreg), + DEVMETHOD(miibus_writereg, ure_miibus_writereg), + DEVMETHOD(miibus_statchg, ure_miibus_statchg), + + DEVMETHOD_END +}; + +static driver_t ure_driver = { + .name = "ure", + .methods = ure_methods, + .size = sizeof(struct ure_softc), +}; + +static devclass_t ure_devclass; + +DRIVER_MODULE(ure, uhub, ure_driver, ure_devclass, NULL, NULL); +DRIVER_MODULE(miibus, ure, miibus_driver, miibus_devclass, NULL, NULL); +MODULE_DEPEND(ure, uether, 1, 1, 1); +MODULE_DEPEND(ure, usb, 1, 1, 1); +MODULE_DEPEND(ure, ether, 1, 1, 1); +MODULE_DEPEND(ure, miibus, 1, 1, 1); +MODULE_VERSION(ure, 1); + +static const struct usb_ether_methods ure_ue_methods = { + .ue_attach_post = ure_attach_post, + .ue_attach_post_sub = ure_attach_post_sub, + .ue_start = ure_start, + .ue_init = ure_init, + .ue_stop = ure_stop, + .ue_tick = ure_tick, + .ue_setmulti = ure_setmulti, + .ue_setpromisc = ure_setpromisc, + .ue_mii_upd = ure_ifmedia_upd, + .ue_mii_sts = ure_ifmedia_sts, +}; + +static int +ure_ctl(struct ure_softc *sc, uint8_t rw, uint16_t val, uint16_t index, + void *buf, int len) +{ + struct usb_device_request req; + + URE_LOCK_ASSERT(sc, MA_OWNED); + + if (rw == URE_CTL_WRITE) + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + else + req.bmRequestType = UT_READ_VENDOR_DEVICE; + req.bRequest = UR_SET_ADDRESS; + USETW(req.wValue, val); + USETW(req.wIndex, index); + USETW(req.wLength, len); + + return (uether_do_request(&sc->sc_ue, &req, buf, 1000)); +} + +static int +ure_read_mem(struct ure_softc *sc, uint16_t addr, uint16_t index, + void *buf, int len) +{ + + return (ure_ctl(sc, URE_CTL_READ, addr, index, buf, len)); +} + +static int +ure_write_mem(struct ure_softc *sc, uint16_t addr, uint16_t index, + void *buf, int len) +{ + + return (ure_ctl(sc, URE_CTL_WRITE, addr, index, buf, len)); +} + +static uint8_t +ure_read_1(struct ure_softc *sc, uint16_t reg, uint16_t index) +{ + uint32_t val; + uint8_t temp[4]; + uint8_t shift; + + shift = (reg & 3) << 3; + reg &= ~3; + + ure_read_mem(sc, reg, index, &temp, 4); + val = UGETDW(temp); + val >>= shift; + + return (val & 0xff); +} + +static uint16_t +ure_read_2(struct ure_softc *sc, uint16_t reg, uint16_t index) +{ + uint32_t val; + uint8_t temp[4]; + uint8_t shift; + + shift = (reg & 2) << 3; + reg &= ~3; + + ure_read_mem(sc, reg, index, &temp, 4); + val = UGETDW(temp); + val >>= shift; + + return (val & 0xffff); +} + +static uint32_t +ure_read_4(struct ure_softc *sc, uint16_t reg, uint16_t index) +{ + uint8_t temp[4]; + + ure_read_mem(sc, reg, index, &temp, 4); + return (UGETDW(temp)); +} + +static int +ure_write_1(struct ure_softc *sc, uint16_t reg, uint16_t index, uint32_t val) +{ + uint16_t byen; + uint8_t temp[4]; + uint8_t shift; + + byen = URE_BYTE_EN_BYTE; + shift = reg & 3; + val &= 0xff; + + if (reg & 3) { + byen <<= shift; + val <<= (shift << 3); + reg &= ~3; + } + + USETDW(temp, val); + return (ure_write_mem(sc, reg, index | byen, &temp, 4)); +} + +static int +ure_write_2(struct ure_softc *sc, uint16_t reg, uint16_t index, uint32_t val) +{ + uint16_t byen; + uint8_t temp[4]; + uint8_t shift; + + byen = URE_BYTE_EN_WORD; + shift = reg & 2; + val &= 0xffff; + + if (reg & 2) { + byen <<= shift; + val <<= (shift << 3); + reg &= ~3; + } + + USETDW(temp, val); + return (ure_write_mem(sc, reg, index | byen, &temp, 4)); +} + +static int +ure_write_4(struct ure_softc *sc, uint16_t reg, uint16_t index, uint32_t val) +{ + uint8_t temp[4]; + + USETDW(temp, val); + return (ure_write_mem(sc, reg, index | URE_BYTE_EN_DWORD, &temp, 4)); +} + +static uint16_t +ure_ocp_reg_read(struct ure_softc *sc, uint16_t addr) +{ + uint16_t reg; + + ure_write_2(sc, URE_PLA_OCP_GPHY_BASE, URE_MCU_TYPE_PLA, addr & 0xf000); + reg = (addr & 0x0fff) | 0xb000; + + return (ure_read_2(sc, reg, URE_MCU_TYPE_PLA)); +} + +static void +ure_ocp_reg_write(struct ure_softc *sc, uint16_t addr, uint16_t data) +{ + uint16_t reg; + + ure_write_2(sc, URE_PLA_OCP_GPHY_BASE, URE_MCU_TYPE_PLA, addr & 0xf000); + reg = (addr & 0x0fff) | 0xb000; + + ure_write_2(sc, reg, URE_MCU_TYPE_PLA, data); +} + +static int +ure_miibus_readreg(device_t dev, int phy, int reg) +{ + struct ure_softc *sc; + uint16_t val; + int locked; + + sc = device_get_softc(dev); + locked = mtx_owned(&sc->sc_mtx); + if (!locked) + URE_LOCK(sc); + + val = ure_ocp_reg_read(sc, URE_OCP_BASE_MII + reg * 2); + + if (!locked) + URE_UNLOCK(sc); + return (val); +} + +static int +ure_miibus_writereg(device_t dev, int phy, int reg, int val) +{ + struct ure_softc *sc; + int locked; + + sc = device_get_softc(dev); + if (sc->sc_phyno != phy) + return (0); + + locked = mtx_owned(&sc->sc_mtx); + if (!locked) + URE_LOCK(sc); + + ure_ocp_reg_write(sc, URE_OCP_BASE_MII + reg * 2, val); + + if (!locked) + URE_UNLOCK(sc); + return (0); +} + +static void +ure_miibus_statchg(device_t dev) +{ + struct ure_softc *sc; + struct mii_data *mii; + struct ifnet *ifp; + int locked; + + sc = device_get_softc(dev); + mii = GET_MII(sc); + locked = mtx_owned(&sc->sc_mtx); + if (!locked) + URE_LOCK(sc); + + ifp = uether_getifp(&sc->sc_ue); + if (mii == NULL || ifp == NULL || + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + goto done; + + sc->sc_flags &= ~URE_FLAG_LINK; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + sc->sc_flags |= URE_FLAG_LINK; + break; + default: + break; + } + } + + /* Lost link, do nothing. */ + if ((sc->sc_flags & URE_FLAG_LINK) == 0) + goto done; +done: + if (!locked) + URE_UNLOCK(sc); +} + +/* + * Probe for a RTL8152 chip. + */ +static int +ure_probe(device_t dev) +{ + struct usb_attach_arg *uaa; + + uaa = device_get_ivars(dev);; + if (uaa->usb_mode != USB_MODE_HOST) + return (ENXIO); + if (uaa->info.bConfigIndex != URE_CONFIG_IDX) + return (ENXIO); + if (uaa->info.bIfaceIndex != URE_IFACE_IDX) + return (ENXIO); + + return (usbd_lookup_id_by_uaa(ure_devs, sizeof(ure_devs), uaa)); +} + +/* + * Attach the interface. Allocate softc structures, do ifmedia + * setup and ethernet/BPF attach. + */ +static int +ure_attach(device_t dev) +{ + struct usb_attach_arg *uaa = device_get_ivars(dev); + struct ure_softc *sc = device_get_softc(dev); + struct usb_ether *ue = &sc->sc_ue; + uint8_t iface_index; + int error; + + device_set_usb_desc(dev); + mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); + + iface_index = URE_IFACE_IDX; + error = usbd_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, + ure_config, URE_N_TRANSFER, sc, &sc->sc_mtx); + if (error != 0) { + device_printf(dev, "allocating USB transfers failed\n"); + goto detach; + } + + ue->ue_sc = sc; + ue->ue_dev = dev; + ue->ue_udev = uaa->device; + ue->ue_mtx = &sc->sc_mtx; + ue->ue_methods = &ure_ue_methods; + + error = uether_ifattach(ue); + if (error != 0) { + device_printf(dev, "could not attach interface\n"); + goto detach; + } + return (0); /* success */ + +detach: + ure_detach(dev); + return (ENXIO); /* failure */ +} + +static int +ure_detach(device_t dev) +{ + struct ure_softc *sc = device_get_softc(dev); + struct usb_ether *ue = &sc->sc_ue; + + usbd_transfer_unsetup(sc->sc_xfer, URE_N_TRANSFER); + uether_ifdetach(ue); + mtx_destroy(&sc->sc_mtx); + + return (0); +} + +static void +ure_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct ure_softc *sc = usbd_xfer_softc(xfer); + struct usb_ether *ue = &sc->sc_ue; + struct ifnet *ifp = uether_getifp(ue); + struct usb_page_cache *pc; + struct ure_rxpkt pkt; + int actlen, len; + + usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + if (actlen < (int)(sizeof(pkt))) { + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); + goto tr_setup; + } + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_out(pc, 0, &pkt, sizeof(pkt)); + len = le32toh(pkt.ure_pktlen) & URE_RXPKT_LEN_MASK; + len -= ETHER_CRC_LEN; + if (actlen < (int)(len + sizeof(pkt))) { + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); + goto tr_setup; + } + + uether_rxbuf(ue, pc, sizeof(pkt), len); + /* FALLTHROUGH */ + case USB_ST_SETUP: +tr_setup: + usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); + usbd_transfer_submit(xfer); + uether_rxflush(ue); + return; + + default: /* Error */ + DPRINTF("bulk read error, %s\n", + usbd_errstr(error)); + + if (error != USB_ERR_CANCELLED) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + goto tr_setup; + } + return; + } +} + +static void +ure_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct ure_softc *sc = usbd_xfer_softc(xfer); + struct ifnet *ifp = uether_getifp(&sc->sc_ue); + struct usb_page_cache *pc; + struct mbuf *m; + struct ure_txpkt txpkt; + int len, pos; + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + DPRINTFN(11, "transfer complete\n"); + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + /* FALLTHROUGH */ + case USB_ST_SETUP: +tr_setup: + if ((sc->sc_flags & URE_FLAG_LINK) == 0 || + (ifp->if_drv_flags & IFF_DRV_OACTIVE) != 0) { + /* + * don't send anything if there is no link ! + */ + return; + } + IFQ_DRV_DEQUEUE(&ifp->if_snd, m); + if (m == NULL) + break; + pos = 0; + len = m->m_pkthdr.len; + pc = usbd_xfer_get_frame(xfer, 0); + memset(&txpkt, 0, sizeof(txpkt)); + txpkt.ure_pktlen = htole32((len & URE_TXPKT_LEN_MASK) | + URE_TKPKT_TX_FS | URE_TKPKT_TX_LS); + usbd_copy_in(pc, pos, &txpkt, sizeof(txpkt)); + pos += sizeof(txpkt); + usbd_m_copy_in(pc, pos, m, 0, m->m_pkthdr.len); + pos += m->m_pkthdr.len; + + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + + /* + * If there's a BPF listener, bounce a copy + * of this frame to him. + */ + BPF_MTAP(ifp, m); + + m_freem(m); + + /* Set frame length. */ + usbd_xfer_set_frame_len(xfer, 0, pos); + + usbd_transfer_submit(xfer); + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + return; + default: /* Error */ + DPRINTFN(11, "transfer error, %s\n", + usbd_errstr(error)); + + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + + if (error != USB_ERR_CANCELLED) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + goto tr_setup; + } + return; + } +} + +static void +ure_read_chipver(struct ure_softc *sc) +{ + uint16_t ver; + + ver = ure_read_2(sc, URE_PLA_TCR1, URE_MCU_TYPE_PLA) & URE_VERSION_MASK; + switch (ver) { + case 0x4c00: + sc->sc_chip |= URE_CHIP_VER_4C00; + break; + case 0x4c10: + sc->sc_chip |= URE_CHIP_VER_4C10; + break; + default: + device_printf(sc->sc_ue.ue_dev, + "unknown version 0x%04x\n", ver); + break; + } +} + +static void +ure_attach_post(struct usb_ether *ue) +{ + struct ure_softc *sc = uether_getsc(ue); + + sc->sc_phyno = 0; + + /* Determine the chip version. */ + ure_read_chipver(sc); + + /* Initialize controller and get station address. */ + ure_rtl8152_init(sc); + + if (sc->sc_chip & URE_CHIP_VER_4C00) + ure_read_mem(sc, URE_PLA_IDR, URE_MCU_TYPE_PLA, + ue->ue_eaddr, 8); + else + ure_read_mem(sc, URE_PLA_BACKUP, URE_MCU_TYPE_PLA, + ue->ue_eaddr, 8); +} + +static int +ure_attach_post_sub(struct usb_ether *ue) +{ + struct ure_softc *sc; + struct ifnet *ifp; + int error; + + sc = uether_getsc(ue); + ifp = ue->ue_ifp; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_start = uether_start; + ifp->if_ioctl = ure_ioctl; + ifp->if_init = uether_init; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; + IFQ_SET_READY(&ifp->if_snd); + + mtx_lock(&Giant); + error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, + uether_ifmedia_upd, ue->ue_methods->ue_mii_sts, + BMSR_DEFCAPMASK, sc->sc_phyno, MII_OFFSET_ANY, 0); + mtx_unlock(&Giant); + + return (error); +} + +static void +ure_init(struct usb_ether *ue) +{ + struct ure_softc *sc = uether_getsc(ue); + struct ifnet *ifp = uether_getifp(ue); + uint32_t rxmode; + + URE_LOCK_ASSERT(sc, MA_OWNED); + + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + return; + + /* Cancel pending I/O. */ + ure_stop(ue); + + ure_reset(sc); + + /* Set MAC address. */ + ure_write_mem(sc, URE_PLA_IDR, URE_MCU_TYPE_PLA | URE_BYTE_EN_SIX_BYTES, + IF_LLADDR(ifp), 8); + + /* Reset the packet filter. */ + ure_write_2(sc, URE_PLA_FMC, URE_MCU_TYPE_PLA, + ure_read_2(sc, URE_PLA_FMC, URE_MCU_TYPE_PLA) & + ~URE_FMC_FCR_MCU_EN); + ure_write_2(sc, URE_PLA_FMC, URE_MCU_TYPE_PLA, + ure_read_2(sc, URE_PLA_FMC, URE_MCU_TYPE_PLA) | + URE_FMC_FCR_MCU_EN); + + /* Enable transmit and receive. */ + ure_write_1(sc, URE_PLA_CR, URE_MCU_TYPE_PLA, + ure_read_1(sc, URE_PLA_CR, URE_MCU_TYPE_PLA) | URE_CR_RE | + URE_CR_TE); + + ure_write_2(sc, URE_PLA_MISC_1, URE_MCU_TYPE_PLA, + ure_read_2(sc, URE_PLA_MISC_1, URE_MCU_TYPE_PLA) & + ~URE_RXDY_GATED_EN); + + /* Set Rx mode. */ + rxmode = URE_RCR_APM; + + /* If we want promiscuous mode, set the allframes bit. */ + if (ifp->if_flags & IFF_PROMISC) + rxmode |= URE_RCR_AAP; + + if (ifp->if_flags & IFF_BROADCAST) + rxmode |= URE_RCR_AB; + + ure_write_4(sc, URE_PLA_RCR, URE_MCU_TYPE_PLA, rxmode); + + /* Load the multicast filter. */ + ure_setmulti(ue); + + usbd_xfer_set_stall(sc->sc_xfer[URE_BULK_DT_WR]); + + /* Indicate we are up and running. */ + ifp->if_drv_flags |= IFF_DRV_RUNNING; + + /* Switch to selected media. */ + ure_ifmedia_upd(ifp); +} + +static void +ure_tick(struct usb_ether *ue) +{ + struct ure_softc *sc = uether_getsc(ue); + struct mii_data *mii = GET_MII(sc); + + URE_LOCK_ASSERT(sc, MA_OWNED); + + mii_tick(mii); + if ((sc->sc_flags & URE_FLAG_LINK) == 0 + && mii->mii_media_status & IFM_ACTIVE && + IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { + sc->sc_flags |= URE_FLAG_LINK; + ure_start(ue); + } +} + +static void +ure_setpromisc(struct usb_ether *ue) +{ + struct ure_softc *sc = uether_getsc(ue); + struct ifnet *ifp = uether_getifp(ue); + uint32_t rxmode; + + rxmode = ure_read_4(sc, URE_PLA_RCR, URE_MCU_TYPE_PLA); + + if (ifp->if_flags & IFF_PROMISC) + rxmode |= URE_RCR_AAP; + else + rxmode &= ~URE_RCR_AAP; + + ure_write_4(sc, URE_PLA_RCR, URE_MCU_TYPE_PLA, rxmode); + + ure_setmulti(ue); +} + +/* + * Program the 64-bit multicast hash filter. + */ +static void +ure_setmulti(struct usb_ether *ue) +{ + struct ure_softc *sc = uether_getsc(ue); + struct ifnet *ifp = uether_getifp(ue); + struct ifmultiaddr *ifma; + uint32_t h, rxmode; + uint32_t hashes[2] = { 0, 0 }; + + URE_LOCK_ASSERT(sc, MA_OWNED); + + rxmode = ure_read_4(sc, URE_PLA_RCR, URE_MCU_TYPE_PLA); + if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { + if (ifp->if_flags & IFF_PROMISC) + rxmode |= URE_RCR_AAP; + rxmode |= URE_RCR_AM; + hashes[0] = hashes[1] = 0xffffffff; + goto done; + } + + if_maddr_rlock(ifp); + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Dec 1 05:18:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE185A3F39A; Tue, 1 Dec 2015 05:18:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4D7D1513; Tue, 1 Dec 2015 05:18:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB15Ipqg008721; Tue, 1 Dec 2015 05:18:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB15ImWP008687; Tue, 1 Dec 2015 05:18:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512010518.tB15ImWP008687@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 05:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291558 - in head: bin/pkill bin/ps gnu/usr.bin/gdb/kgdb libexec/rpc.rstatd sbin/ddb sbin/dmesg sbin/ipf/ipf sbin/ipf/ipfs sbin/ipf/ipfstat sbin/ipf/ipftest sbin/ipf/ipmon sbin/ipf/ipna... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 05:18:53 -0000 Author: bdrewery Date: Tue Dec 1 05:18:48 2015 New Revision: 291558 URL: https://svnweb.freebsd.org/changeset/base/291558 Log: Update dependencies after r291406 added libelf to libkvm. Unfortunately filemon/meta mode tracks all indirect dependencies here since ld(1) is reading libelf when linking in libkvm. Churn would be reduced if this was able to be limited to direct dependencies. Sponsored by: EMC / Isilon Storage Division Modified: head/bin/pkill/Makefile.depend head/bin/ps/Makefile.depend head/gnu/usr.bin/gdb/kgdb/Makefile.depend.amd64 head/libexec/rpc.rstatd/Makefile.depend head/sbin/ddb/Makefile.depend head/sbin/dmesg/Makefile.depend head/sbin/ipf/ipf/Makefile.depend head/sbin/ipf/ipfs/Makefile.depend head/sbin/ipf/ipfstat/Makefile.depend head/sbin/ipf/ipftest/Makefile.depend head/sbin/ipf/ipmon/Makefile.depend head/sbin/ipf/ipnat/Makefile.depend head/sbin/ipf/ippool/Makefile.depend head/sbin/ipf/ipresend/Makefile.depend head/usr.bin/bluetooth/btsockstat/Makefile.depend head/usr.bin/ipcrm/Makefile.depend head/usr.bin/ipcs/Makefile.depend head/usr.bin/ktrdump/Makefile.depend head/usr.bin/netstat/Makefile.depend head/usr.bin/nfsstat/Makefile.depend head/usr.bin/systat/Makefile.depend head/usr.bin/top/Makefile.depend head/usr.bin/vmstat/Makefile.depend head/usr.bin/w/Makefile.depend head/usr.sbin/asf/Makefile.depend head/usr.sbin/dconschat/Makefile.depend head/usr.sbin/gstat/Makefile.depend head/usr.sbin/iostat/Makefile.depend head/usr.sbin/jail/Makefile.depend head/usr.sbin/kgmon/Makefile.depend head/usr.sbin/pstat/Makefile.depend Modified: head/bin/pkill/Makefile.depend ============================================================================== --- head/bin/pkill/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/bin/pkill/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libjail \ lib/libkvm \ Modified: head/bin/ps/Makefile.depend ============================================================================== --- head/bin/ps/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/bin/ps/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libjail \ lib/libkvm \ lib/libutil \ Modified: head/gnu/usr.bin/gdb/kgdb/Makefile.depend.amd64 ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/Makefile.depend.amd64 Tue Dec 1 05:12:13 2015 (r291557) +++ head/gnu/usr.bin/gdb/kgdb/Makefile.depend.amd64 Tue Dec 1 05:18:48 2015 (r291558) @@ -15,6 +15,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ lib/msun \ lib/ncurses/ncursesw \ Modified: head/libexec/rpc.rstatd/Makefile.depend ============================================================================== --- head/libexec/rpc.rstatd/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/libexec/rpc.rstatd/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -12,6 +12,7 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libdevstat \ + lib/libelf \ lib/libkvm \ lib/librpcsvc \ Modified: head/sbin/ddb/Makefile.depend ============================================================================== --- head/sbin/ddb/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/sbin/ddb/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ Modified: head/sbin/dmesg/Makefile.depend ============================================================================== --- head/sbin/dmesg/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/sbin/dmesg/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ Modified: head/sbin/ipf/ipf/Makefile.depend ============================================================================== --- head/sbin/ipf/ipf/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/sbin/ipf/ipf/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ lib/libpcap \ sbin/ipf/libipf \ Modified: head/sbin/ipf/ipfs/Makefile.depend ============================================================================== --- head/sbin/ipf/ipfs/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/sbin/ipf/ipfs/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ sbin/ipf/libipf \ Modified: head/sbin/ipf/ipfstat/Makefile.depend ============================================================================== --- head/sbin/ipf/ipfstat/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/sbin/ipf/ipfstat/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ lib/ncurses/ncursesw \ sbin/ipf/libipf \ Modified: head/sbin/ipf/ipftest/Makefile.depend ============================================================================== --- head/sbin/ipf/ipftest/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/sbin/ipf/ipftest/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ sbin/ipf/libipf \ usr.bin/yacc.host \ Modified: head/sbin/ipf/ipmon/Makefile.depend ============================================================================== --- head/sbin/ipf/ipmon/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/sbin/ipf/ipmon/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ sbin/ipf/libipf \ usr.bin/yacc.host \ Modified: head/sbin/ipf/ipnat/Makefile.depend ============================================================================== --- head/sbin/ipf/ipnat/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/sbin/ipf/ipnat/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ sbin/ipf/libipf \ usr.bin/yacc.host \ Modified: head/sbin/ipf/ippool/Makefile.depend ============================================================================== --- head/sbin/ipf/ippool/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/sbin/ipf/ippool/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ sbin/ipf/libipf \ usr.bin/yacc.host \ Modified: head/sbin/ipf/ipresend/Makefile.depend ============================================================================== --- head/sbin/ipf/ipresend/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/sbin/ipf/ipresend/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ lib/msun \ sbin/ipf/libipf \ Modified: head/usr.bin/bluetooth/btsockstat/Makefile.depend ============================================================================== --- head/usr.bin/bluetooth/btsockstat/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.bin/bluetooth/btsockstat/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/libbluetooth \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ Modified: head/usr.bin/ipcrm/Makefile.depend ============================================================================== --- head/usr.bin/ipcrm/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.bin/ipcrm/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ Modified: head/usr.bin/ipcs/Makefile.depend ============================================================================== --- head/usr.bin/ipcs/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.bin/ipcs/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ Modified: head/usr.bin/ktrdump/Makefile.depend ============================================================================== --- head/usr.bin/ktrdump/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.bin/ktrdump/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ Modified: head/usr.bin/netstat/Makefile.depend ============================================================================== --- head/usr.bin/netstat/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.bin/netstat/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ lib/libmemstat \ lib/libnetgraph \ Modified: head/usr.bin/nfsstat/Makefile.depend ============================================================================== --- head/usr.bin/nfsstat/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.bin/nfsstat/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ Modified: head/usr.bin/systat/Makefile.depend ============================================================================== --- head/usr.bin/systat/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.bin/systat/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -11,6 +11,7 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libdevstat \ + lib/libelf \ lib/libkvm \ lib/msun \ lib/ncurses/ncursesw \ Modified: head/usr.bin/top/Makefile.depend ============================================================================== --- head/usr.bin/top/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.bin/top/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libjail \ lib/libkvm \ lib/msun \ Modified: head/usr.bin/vmstat/Makefile.depend ============================================================================== --- head/usr.bin/vmstat/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.bin/vmstat/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,9 +10,11 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libdevstat \ + lib/libelf \ lib/libkvm \ lib/libmemstat \ lib/libutil \ + lib/libxo \ .include Modified: head/usr.bin/w/Makefile.depend ============================================================================== --- head/usr.bin/w/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.bin/w/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ lib/libsbuf \ lib/libutil \ Modified: head/usr.sbin/asf/Makefile.depend ============================================================================== --- head/usr.sbin/asf/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.sbin/asf/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ Modified: head/usr.sbin/dconschat/Makefile.depend ============================================================================== --- head/usr.sbin/dconschat/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.sbin/dconschat/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ Modified: head/usr.sbin/gstat/Makefile.depend ============================================================================== --- head/usr.sbin/gstat/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.sbin/gstat/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -11,6 +11,7 @@ DIRDEPS = \ lib/libcompiler_rt \ lib/libdevstat \ lib/libedit \ + lib/libelf \ lib/libexpat \ lib/libgeom \ lib/libkvm \ Modified: head/usr.sbin/iostat/Makefile.depend ============================================================================== --- head/usr.sbin/iostat/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.sbin/iostat/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/libc \ lib/libcompiler_rt \ lib/libdevstat \ + lib/libelf \ lib/libkvm \ lib/msun \ Modified: head/usr.sbin/jail/Makefile.depend ============================================================================== --- head/usr.sbin/jail/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.sbin/jail/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -10,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libjail \ lib/libkvm \ lib/libutil \ Modified: head/usr.sbin/kgmon/Makefile.depend ============================================================================== --- head/usr.sbin/kgmon/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.sbin/kgmon/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ Modified: head/usr.sbin/pstat/Makefile.depend ============================================================================== --- head/usr.sbin/pstat/Makefile.depend Tue Dec 1 05:12:13 2015 (r291557) +++ head/usr.sbin/pstat/Makefile.depend Tue Dec 1 05:18:48 2015 (r291558) @@ -9,6 +9,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libc \ lib/libcompiler_rt \ + lib/libelf \ lib/libkvm \ lib/libutil \ From owner-svn-src-all@freebsd.org Tue Dec 1 05:19:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B22CA3F47F; Tue, 1 Dec 2015 05:19:04 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0689E18CE; Tue, 1 Dec 2015 05:19:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB15J3rt008867; Tue, 1 Dec 2015 05:19:03 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB15J2iF008864; Tue, 1 Dec 2015 05:19:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512010519.tB15J2iF008864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 05:19:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291561 - in head: lib/clang share/mk targets/pseudo/bootstrap-tools X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 05:19:04 -0000 Author: bdrewery Date: Tue Dec 1 05:19:02 2015 New Revision: 291561 URL: https://svnweb.freebsd.org/changeset/base/291561 Log: META MODE: Rework [bootstrapped] tools PATH support. - Support more of the toolchain from TOOLSDIR. - This also improves 'make bootstrap-tools' to pass, for example, AS=/usr/bin/as to Makefile.inc1, which will tell cross-tools to use external toolchain support and avoid building things we won't be using in the build. - Always set the PATH to contain the staged TOOLSDIR directories when not building the bootstrap targets. The previous version was only setting this at MAKE.LEVEL==0 and if the TOOLSDIR existed. Both of these prevented using staged tools that were built during the build though as DIRDEPS with .host dependencies, such as the fix for needing usr.bin/localedef.host in r291311. This is not a common tool so we must build and use it during the build, and need to be prepared to change PATH as soon as it appears. This should also fix the issue of host dependencies disappearing from Makefile.depend and then reappearing due to the start of the fresh build not having the directory yet, resulting in the tools that were built not actually being used. - Only use LEGACY_TOOLS while building in Makefile.inc1. After r291317 and r291546 there is no need to add LEGACY_TOOLS into the PATH for the pseudo/targets/toolchain build. - Because the pseudo/targets/toolchain will now build its own [clang-]tblgen, the special logic in clang.build.mk is no longer needed. - LEGACY_TOOLS is no longer used outside of targets/pseudo/bootstrap-tools so is no longer passed into the environment in its build. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/clang/clang.build.mk head/share/mk/local.meta.sys.mk head/targets/pseudo/bootstrap-tools/Makefile Modified: head/lib/clang/clang.build.mk ============================================================================== --- head/lib/clang/clang.build.mk Tue Dec 1 05:18:59 2015 (r291560) +++ head/lib/clang/clang.build.mk Tue Dec 1 05:19:02 2015 (r291561) @@ -39,26 +39,6 @@ CXXFLAGS.clang+= -stdlib=libc++ .PATH: ${LLVM_SRCS}/${SRCDIR} -.if ${MK_DIRDEPS_BUILD} == "yes" -.if empty(TOOLSDIR) || !exists(${TOOLSDIR}/usr/bin/clang-tblgen) -.if ${MACHINE} == "host" && defined(BOOTSTRAPPING_TOOLS) -.if !empty(LEGACY_TOOLS) && exists(${LEGACY_TOOLS}/usr/bin/tblgen) -TOOLSDIR= ${LEGACY_TOOLS} -.endif -.endif -.if ${MK_STAGING} == "yes" && exists(${STAGE_HOST_OBJTOP:Uno}/usr/bin/tblgen) -TOOLSDIR= ${STAGE_HOST_OBJTOP} -.endif -.if exists(${LEGACY_TOOLS:Uno}/usr/bin/tblgen) -TOOLSDIR= ${LEGACY_TOOLS} -.endif -.endif -TOOLSDIR?= -.if !empty(TOOLSDIR) && exists(${TOOLSDIR}/usr/bin/clang-tblgen) -TBLGEN= ${TOOLSDIR}/usr/bin/tblgen -CLANG_TBLGEN= ${TOOLSDIR}/usr/bin/clang-tblgen -.endif -.endif # ${MK_DIRDEPS_BUILD} == "yes" TBLGEN?= tblgen CLANG_TBLGEN?= clang-tblgen Modified: head/share/mk/local.meta.sys.mk ============================================================================== --- head/share/mk/local.meta.sys.mk Tue Dec 1 05:18:59 2015 (r291560) +++ head/share/mk/local.meta.sys.mk Tue Dec 1 05:19:02 2015 (r291561) @@ -204,35 +204,41 @@ TRACER= ${TIME_STAMP} ${:U} .if ${MACHINE} == "host" MK_SHARED_TOOLCHAIN= no .endif +TOOLCHAIN_VARS= AS AR CC CLANG_TBLGEN CXX CPP LD NM OBJDUMP OBJCOPY RANLIB \ + STRINGS SIZE TBLGEN +_toolchain_bin_CLANG_TBLGEN= /usr/bin/clang-tblgen +_toolchain_bin_CXX= /usr/bin/c++ .ifdef WITH_TOOLSDIR TOOLSDIR?= ${HOST_OBJTOP}/tools -.elif defined(STAGE_HOST_OBJTOP) && exists(${STAGE_HOST_OBJTOP}/usr/bin) +.elif defined(STAGE_HOST_OBJTOP) TOOLSDIR?= ${STAGE_HOST_OBJTOP} .endif -.if !empty(TOOLSDIR) -.if ${.MAKE.LEVEL} == 0 && exists(${TOOLSDIR}/usr/bin) -PATH:= ${PATH:S,:, ,g:@d@${exists(${TOOLSDIR}$d):?${TOOLSDIR}$d:}@:ts:}:${PATH} +# Don't use the bootstrap tools logic on itself. +.if ${.TARGETS:Mbootstrap-tools} == "" && \ + !defined(BOOTSTRAPPING_TOOLS) && !empty(TOOLSDIR) && ${.MAKE.LEVEL} == 0 +.for dir in /sbin /bin /usr/sbin /usr/bin +PATH:= ${TOOLSDIR}${dir}:${PATH} +.endfor .export PATH -.if exists(${TOOLSDIR}/usr/bin/cc) -HOST_CC?= ${TOOLSDIR}/usr/bin/cc -CC?= ${HOST_CC} -HOST_CXX?= ${TOOLSDIR}/usr/bin/c++ -CXX?= ${HOST_CXX} -HOST_CPP?= ${TOOLSDIR}/usr/bin/cpp -CPP?= ${HOST_CPP} -.export HOST_CC CC HOST_CXX CXX HOST_CPP CPP -.endif +# Prefer the TOOLSDIR version of the toolchain if present vs the host version. +.for var in ${TOOLCHAIN_VARS} +_toolchain_bin.${var}= ${TOOLSDIR}${_toolchain_bin_${var}:U/usr/bin/${var:tl}} +.if exists(${_toolchain_bin.${var}}) +HOST_${var}?= ${_toolchain_bin.${var}} +${var}?= ${HOST_${var}} +.export HOST_${var} ${var} .endif +.endfor .endif -HOST_CC?= /usr/bin/cc -HOST_CXX?= /usr/bin/c++ -HOST_CPP?= /usr/bin/cpp +.for var in ${TOOLCHAIN_VARS} +HOST_${var}?= ${_toolchain_bin_${var}:U/usr/bin/${var:tl}} +.endfor .if ${MACHINE} == "host" -CC= ${HOST_CC} -CXX= ${HOST_CXX} -CPP= ${HOST_CPP} +.for var in ${TOOLCHAIN_VARS} +${var}= ${HOST_${var}} +.endfor .endif .if ${MACHINE:Nhost:Ncommon} != "" && ${MACHINE} != ${HOST_MACHINE} Modified: head/targets/pseudo/bootstrap-tools/Makefile ============================================================================== --- head/targets/pseudo/bootstrap-tools/Makefile Tue Dec 1 05:18:59 2015 (r291560) +++ head/targets/pseudo/bootstrap-tools/Makefile Tue Dec 1 05:19:02 2015 (r291561) @@ -20,7 +20,7 @@ BSENV= \ MAKESYSPATH=${SRCTOP}/tools/build/mk:${SRCTOP}/share/mk \ TARGET=${HOST_MACHINE} TARGET_ARCH=${HOST_MACHINE_ARCH} \ WITHOUT_STAGING=1 STAGE_ROOT= BOOTSTRAPPING_TOOLS=1 \ - WORLDTMP=${BTOOLSDIR} LEGACY_TOOLS=${LEGACY_TOOLS} \ + WORLDTMP=${BTOOLSDIR} \ INSTALL="sh ${SRCTOP}/tools/install.sh" \ PATH=${LEGACY_TOOLS}/usr/sbin:${LEGACY_TOOLS}/usr/bin:${LEGACY_TOOLS}/bin:${PATH} @@ -67,14 +67,15 @@ cross-tools build-tools bootstrap-tools: touch $@ # MAKELEVEL=0 so that dirdeps.mk does its thing -# LEGACY_TOOLS lets us use the bootstrapped stuff above +# BSENV:MPATH=* lets us use the bootstrapped stuff in LEGACY_TOOLS above. # TARGET* is so that MK_CLANG gets set correctly. BSTCENV= \ MAKELEVEL=0 \ MACHINE=host \ - LEGACY_TOOLS=${LEGACY_TOOLS} \ + BOOTSTRAPPING_TOOLS=1 \ TARGET=${HOST_MACHINE} \ - TARGET_ARCH=${HOST_MACHINE_ARCH} + TARGET_ARCH=${HOST_MACHINE_ARCH} \ + ${BSENV:MPATH=*} BSTCARGS= \ ${BSARGS:NDESTDIR=*:NOBJTOP=*:NOBJROOT=*:NMK_CROSS_COMPILER=*:NMK_CLANG=*:NMK_GCC=*} \ From owner-svn-src-all@freebsd.org Tue Dec 1 05:18:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AC08A3F3F5; Tue, 1 Dec 2015 05:18:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE02B1543; Tue, 1 Dec 2015 05:18:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB15IuEH008767; Tue, 1 Dec 2015 05:18:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB15ItVG008765; Tue, 1 Dec 2015 05:18:55 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512010518.tB15ItVG008765@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 05:18:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291559 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 05:18:57 -0000 Author: bdrewery Date: Tue Dec 1 05:18:55 2015 New Revision: 291559 URL: https://svnweb.freebsd.org/changeset/base/291559 Log: META MODE: Don't trim out lib/clang/include dependency. Doing this causes more trouble than it is worth regarding cyclic dependencies. It should not be needed after cleaning up MACHINE=host builds in r291324. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.dirdeps.mk head/share/mk/local.gendirdeps.mk Modified: head/share/mk/local.dirdeps.mk ============================================================================== --- head/share/mk/local.dirdeps.mk Tue Dec 1 05:18:48 2015 (r291558) +++ head/share/mk/local.dirdeps.mk Tue Dec 1 05:18:55 2015 (r291559) @@ -86,10 +86,6 @@ DIRDEPS += \ .endif -.if ${MK_CLANG} == "yes" && ${DEP_RELDIR:Nlib/clang/lib*:Nlib/libc*} == "" -DIRDEPS+= lib/clang/include -.endif - .if ${MK_STAGING} == "yes" # we need targets/pseudo/stage to prep the stage tree .if ${DEP_RELDIR} != "targets/pseudo/stage" Modified: head/share/mk/local.gendirdeps.mk ============================================================================== --- head/share/mk/local.gendirdeps.mk Tue Dec 1 05:18:48 2015 (r291558) +++ head/share/mk/local.gendirdeps.mk Tue Dec 1 05:18:55 2015 (r291559) @@ -9,7 +9,6 @@ GENDIRDEPS_FILTER+= \ Nbin/cat.host \ Ngnu/lib/libssp/libssp_nonshared \ Ncddl/usr.bin/ctf* \ - Nlib/clang/include \ Nlib/libc_nonshared \ Ntargets/pseudo/stage* \ Ntools/* From owner-svn-src-all@freebsd.org Tue Dec 1 05:19:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA151A3F427; Tue, 1 Dec 2015 05:19:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EE45177B; Tue, 1 Dec 2015 05:19:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB15IxQ0008816; Tue, 1 Dec 2015 05:18:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB15Ix51008814; Tue, 1 Dec 2015 05:18:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512010518.tB15Ix51008814@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 05:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291560 - head/lib/clang/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 05:19:00 -0000 Author: bdrewery Date: Tue Dec 1 05:18:59 2015 New Revision: 291560 URL: https://svnweb.freebsd.org/changeset/base/291560 Log: META MODE: Fix rebuilding of lib/clang/include after clang-tblgen.host is staged. None of usr.bin/clang/clang-tblgen or its dependencies need lib/clang/include, so there is no cyclic dependency here to worry about. The issue came about because of workarounds to dependencies on clang being optional. Without this, the clang-tblgen called during the build would change after it was staged for the host. This would cause lib/clang/include to rebuild due to changed build commands. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/clang/include/Makefile head/lib/clang/include/Makefile.depend Modified: head/lib/clang/include/Makefile ============================================================================== --- head/lib/clang/include/Makefile Tue Dec 1 05:18:55 2015 (r291559) +++ head/lib/clang/include/Makefile Tue Dec 1 05:18:59 2015 (r291560) @@ -67,7 +67,4 @@ INCS= __stddef_max_align_t.h \ GENINCS= arm_neon.h CLEANFILES= ${GENINCS} ${GENINCS:C/\.h$/.d/} -# avoid a circular dependency -GENDIRDEPS_FILTER+= Nusr.bin/clang/clang-tblgen.host - .include Modified: head/lib/clang/include/Makefile.depend ============================================================================== --- head/lib/clang/include/Makefile.depend Tue Dec 1 05:18:55 2015 (r291559) +++ head/lib/clang/include/Makefile.depend Tue Dec 1 05:18:59 2015 (r291560) @@ -2,6 +2,7 @@ # Autogenerated - do NOT edit! DIRDEPS = \ + usr.bin/clang/clang-tblgen.host \ .include From owner-svn-src-all@freebsd.org Tue Dec 1 05:29:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A23EA3EC2F; Tue, 1 Dec 2015 05:29:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED80D1221; Tue, 1 Dec 2015 05:29:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB15TVKO011897; Tue, 1 Dec 2015 05:29:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB15TVi1011896; Tue, 1 Dec 2015 05:29:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512010529.tB15TVi1011896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 05:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291564 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 05:29:32 -0000 Author: bdrewery Date: Tue Dec 1 05:29:30 2015 New Revision: 291564 URL: https://svnweb.freebsd.org/changeset/base/291564 Log: META MODE: Add some basic bootstrapping support for no Makefile.depend. This will not work for bootstrapping dependencies, it will only bootstrap the top-level build directory. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.dirdeps.mk Modified: head/share/mk/local.dirdeps.mk ============================================================================== --- head/share/mk/local.dirdeps.mk Tue Dec 1 05:23:19 2015 (r291563) +++ head/share/mk/local.dirdeps.mk Tue Dec 1 05:29:30 2015 (r291564) @@ -84,7 +84,71 @@ DIRDEPS += \ cddl/usr.bin/ctfmerge.host .endif +# Bootstrap support. Give hints to DIRDEPS if there is no Makefile.depend* +# generated yet. This can be based on things such as SRC files and LIBADD. +# These hints will not factor into the final Makefile.depend as only what is +# used will be added in and handled via [local.]gendirdeps.mk. This is not +# done for MACHINE=host builds. +# XXX: Include this in local.autodep.mk as well for gendirdeps without filemon. +.if ${RELDIR} == ${DEP_RELDIR} # Only do this for main build target +.for _depfile in ${.MAKE.DEPENDFILE_PREFERENCE:T} +.if !defined(_have_depfile) && exists(${.CURDIR}/${_depfile}) +_have_depfile= .endif +.endfor +.if !defined(_have_depfile) +# Has C files. The C_DIRDEPS are shared with C++ files as well. +C_DIRDEPS= \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + +.if !empty(SRCS:M*.c) +DIRDEPS+= ${C_DIRDEPS} +.endif +# Has C++ files +.if !empty(SRCS:M*.cc) || !empty(SRCS:M*.C) || !empty(SRCS:M*.cpp) || \ + !empty(SRCS:M*.cxx) +DIRDEPS+= ${C_DIRDEPS} +.if ${MK_CLANG} == "yes" +DIRDEPS+= lib/libc++ lib/libcxxrt +.else +DIRDEPS+= gnu/lib/libstdc++ gnu/lib/libsupc++ +.endif +# XXX: Clang and GCC always adds -lm currently, even when not needed. +DIRDEPS+= lib/msun +.endif +# Has yacc files. +.if !empty(SRCS:M*.y) +DIRDEPS+= usr.bin/yacc.host +.endif +.if !empty(DPADD) +# Taken from meta.autodep.mk (where it only does something with +# BUILD_AT_LEVEL0, which we don't use). +# This only works for DPADD with full OBJ/SRC paths, which is mostly just +# _INTERNALLIBS. +DIRDEPS+= \ + ${DPADD:M${OBJTOP}*:H:C,${OBJTOP}[^/]*/,,:N.:O:u} \ + ${DPADD:M${OBJROOT}*:N${OBJTOP}*:N${STAGE_ROOT}/*:H:S,${OBJROOT},,:C,^([^/]+)/(.*),\2.\1,:S,${HOST_TARGET}$,host,:N.*:O:u} +.endif +.if !empty(LIBADD) +# Also handle LIBADD for non-internal libraries. +.for _lib in ${LIBADD} +_lib${_lib}reldir= ${LIB${_lib:tu}DIR:C,${OBJTOP}/,,} +.if defined(LIB${_lib:tu}DIR) && ${DIRDEPS:M${_lib${_lib}reldir}} == "" && \ + exists(${SRCTOP}/${_lib${_lib}reldir}) +DIRDEPS+= ${_lib${_lib}reldir} +.endif +.endfor +.endif # !empty(LIBADD) +.endif # no Makefile.depend* +.endif # ${RELDIR} == ${DEP_RELDIR} + +.endif # ${DEP_MACHINE} != "host" .if ${MK_STAGING} == "yes" # we need targets/pseudo/stage to prep the stage tree From owner-svn-src-all@freebsd.org Tue Dec 1 05:23:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53557A3E2B2; Tue, 1 Dec 2015 05:23:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC4C91FEA; Tue, 1 Dec 2015 05:23:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB15NMTk011674; Tue, 1 Dec 2015 05:23:22 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB15NJlU011650; Tue, 1 Dec 2015 05:23:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512010523.tB15NJlU011650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 05:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291563 - in head: cddl/lib/libzfs cddl/sbin/zfs cddl/sbin/zpool etc etc/newsyslog.conf.d gnu/lib/libssp gnu/usr.bin/diff gnu/usr.bin/dtc gnu/usr.bin/gperf gnu/usr.bin/grep lib/clang/li... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 05:23:23 -0000 Author: bdrewery Date: Tue Dec 1 05:23:19 2015 New Revision: 291563 URL: https://svnweb.freebsd.org/changeset/base/291563 Log: META MODE: Update dependencies with 'the-lot' and add missing directories. This is not properly respecting WITHOUT or ARCH dependencies in target/. Doing so requires a massive effort to rework targets/ to do so. A better approach will be to either include the SUBDIR Makefiles directly and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose the benefit of having a userland/lib, userland/libexec, etc, though and results in a massive package. The current implementation of targets/ is very unmaintainable. Currently rescue/rescue and sys/modules are still not connected. Sponsored by: EMC / Isilon Storage Division Added: head/etc/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/etc/newsyslog.conf.d/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/lib/clang/liblldbInitialization/Makefile.depend - copied, changed from r291562, head/lib/clang/libllvmtarget/Makefile.depend head/lib/clang/liblldbPluginABISysV_arm/Makefile.depend (contents, props changed) head/lib/clang/liblldbPluginABISysV_arm64/Makefile.depend (contents, props changed) head/lib/clang/liblldbPluginABISysV_i386/Makefile.depend (contents, props changed) head/lib/clang/liblldbPluginABISysV_mips/Makefile.depend (contents, props changed) head/lib/clang/liblldbPluginABISysV_mips64/Makefile.depend (contents, props changed) head/lib/clang/liblldbPluginInstructionMIPS/Makefile.depend - copied, changed from r291562, head/lib/clang/libllvmtarget/Makefile.depend head/lib/clang/liblldbPluginInstructionMIPS64/Makefile.depend - copied, changed from r291562, head/lib/clang/libllvmtarget/Makefile.depend head/lib/lib80211/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/lib/libbsdstat/Makefile.depend - copied, changed from r291562, head/share/examples/libvgl/Makefile.depend head/lib/libcasper/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/lib/libclang_rt/asan-preinit/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/lib/libclang_rt/asan/Makefile.depend - copied, changed from r291562, head/lib/clang/libllvmtarget/Makefile.depend head/lib/libclang_rt/asan_cxx/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/loader/Makefile.depend head/lib/libclang_rt/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/lib/libclang_rt/profile/Makefile.depend - copied, changed from r291562, head/lib/libevent/Makefile.depend head/lib/libclang_rt/safestack/Makefile.depend - copied, changed from r291562, head/usr.bin/svn/lib/libsvn_delta/Makefile.depend head/lib/libclang_rt/ubsan_standalone/Makefile.depend - copied, changed from r291562, head/lib/clang/libllvmtarget/Makefile.depend head/lib/libclang_rt/ubsan_standalone_cxx/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/lib/libdevctl/Makefile.depend - copied, changed from r291562, head/gnu/usr.bin/gperf/Makefile.depend head/lib/libpjdlog/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/libexec/casper/dns/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/libexec/casper/grp/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/libexec/casper/pwd/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/libexec/casper/random/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/libexec/casper/sysctl/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/libexec/hyperv/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/sbin/casperd/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/secure/lib/libcrypto/engines/libcapi/Makefile.depend - copied, changed from r291562, head/gnu/usr.bin/grep/Makefile.depend head/share/dtrace/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/share/examples/smbfs/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/share/examples/smbfs/print/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/share/keys/pkg/trusted/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/share/locale-links/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/share/mk/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/share/vt/fonts/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/share/vt/keymaps/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/sys/boot/common/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/sys/boot/efi/boot1/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/boot2/Makefile.depend head/sys/boot/efi/fdt/Makefile.depend - copied, changed from r291562, head/lib/libevent/Makefile.depend head/sys/boot/efi/loader/Makefile.depend - copied, changed from r291562, head/lib/libevent/Makefile.depend head/sys/boot/fdt/Makefile.depend - copied, changed from r291562, head/usr.bin/svn/lib/libsvn_delta/Makefile.depend head/sys/boot/ficl32/Makefile.depend - copied, changed from r291562, head/lib/clang/libllvmtarget/Makefile.depend head/sys/boot/forth/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/sys/boot/i386/btx/btx/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/sys/boot/i386/btx/btxldr/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/sys/boot/i386/btx/lib/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/sys/boot/i386/cdboot/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/sys/boot/i386/gptboot/Makefile.depend - copied, changed from r291562, head/lib/libevent/Makefile.depend head/sys/boot/i386/gptzfsboot/Makefile.depend - copied, changed from r291562, head/gnu/lib/libssp/Makefile.depend head/sys/boot/i386/kgzldr/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/boot2/Makefile.depend head/sys/boot/i386/libfirewire/Makefile.depend - copied, changed from r291562, head/lib/libevent/Makefile.depend head/sys/boot/i386/libi386/Makefile.depend - copied, changed from r291562, head/lib/libevent/Makefile.depend head/sys/boot/i386/mbr/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/sys/boot/i386/pmbr/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/sys/boot/i386/pxeldr/Makefile.depend - copied, changed from r291562, head/share/examples/libvgl/Makefile.depend head/sys/boot/i386/zfsboot/Makefile.depend - copied, changed from r291562, head/gnu/lib/libssp/Makefile.depend head/sys/boot/libstand32/Makefile.depend (contents, props changed) head/sys/boot/userboot/ficl/Makefile.depend - copied, changed from r291562, head/lib/clang/libllvmtarget/Makefile.depend head/sys/boot/userboot/libstand/Makefile.depend (contents, props changed) head/sys/boot/userboot/test/Makefile.depend - copied, changed from r291562, head/gnu/lib/libssp/Makefile.depend head/sys/boot/userboot/userboot/Makefile.depend - copied, changed from r291562, head/gnu/lib/libssp/Makefile.depend head/sys/boot/userboot/zfs/Makefile.depend - copied, changed from r291562, head/lib/libevent/Makefile.depend head/sys/boot/zfs/Makefile.depend - copied, changed from r291562, head/lib/libevent/Makefile.depend head/usr.bin/dpv/Makefile.depend - copied, changed from r291562, head/usr.bin/clang/clang-tblgen/Makefile.depend head/usr.bin/drill/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.bin/dtc/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.bin/iconv/Makefile.depend - copied, changed from r291562, head/gnu/lib/libssp/Makefile.depend head/usr.bin/ident/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.bin/iscsictl/Makefile.depend - copied, changed from r291562, head/cddl/lib/libzfs/Makefile.depend head/usr.bin/mkcsmapper/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.bin/mkesdb/Makefile.depend - copied, changed from r291562, head/usr.bin/clang/tblgen/Makefile.depend head/usr.bin/mkimg/Makefile.depend - copied, changed from r291562, head/libexec/bootpd/Makefile.depend head/usr.bin/patch/Makefile.depend - copied, changed from r291562, head/gnu/lib/libssp/Makefile.depend head/usr.bin/protect/Makefile.depend - copied, changed from r291562, head/usr.sbin/mount_smbfs/Makefile.depend head/usr.bin/send-pr/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.bin/soelim/Makefile.depend - copied, changed from r291562, head/share/examples/libvgl/Makefile.depend head/usr.bin/vi/catalog/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.bin/xo/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.sbin/auditdistd/Makefile.depend - copied, changed from r291562, head/cddl/lib/libzfs/Makefile.depend head/usr.sbin/autofs/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.sbin/bhyvectl/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.sbin/bhyveload/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.sbin/binmiscctl/Makefile.depend - copied, changed from r291562, head/share/examples/libvgl/Makefile.depend head/usr.sbin/bsdconfig/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/console/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/console/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/diskmgmt/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/diskmgmt/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/docsinstall/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/docsinstall/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/dot/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/dot/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/examples/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/includes/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/includes/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/mouse/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/mouse/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/networking/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/networking/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/networking/share/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/password/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/password/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/password/share/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/security/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/security/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/share/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/share/media/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/startup/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/startup/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/startup/share/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/timezone/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/timezone/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/timezone/share/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/ttys/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/ttys/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/usermgmt/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/usermgmt/include/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/bsdconfig/usermgmt/share/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/ctld/Makefile.depend - copied, changed from r291562, head/cddl/sbin/zpool/Makefile.depend head/usr.sbin/devctl/Makefile.depend - copied, changed from r291562, head/gnu/usr.bin/gperf/Makefile.depend head/usr.sbin/fstyp/Makefile.depend - copied, changed from r291562, head/cddl/sbin/zpool/Makefile.depend head/usr.sbin/ftp-proxy/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.sbin/hyperv/tools/Makefile.depend - copied, changed from r291562, head/libexec/bootpd/Makefile.depend head/usr.sbin/iovctl/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.sbin/iscsid/Makefile.depend - copied, changed from r291562, head/sbin/routed/Makefile.depend head/usr.sbin/ntp/doc/drivers/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/ntp/doc/drivers/icons/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/ntp/doc/drivers/scripts/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/ntp/doc/hints/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/ntp/doc/icons/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/ntp/doc/pic/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/ntp/doc/scripts/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/sysrc/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/uefisign/Makefile.depend - copied, changed from r291562, head/libexec/bootpd/Makefile.depend head/usr.sbin/unbound/anchor/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.sbin/unbound/checkconf/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.sbin/unbound/control/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.sbin/unbound/daemon/Makefile.depend - copied, changed from r291562, head/sbin/ifconfig/Makefile.depend head/usr.sbin/unbound/local-setup/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend head/usr.sbin/vigr/Makefile.depend - copied, changed from r291562, head/sys/boot/i386/zfsloader/Makefile.depend Modified: head/cddl/lib/libzfs/Makefile.depend head/cddl/sbin/zfs/Makefile.depend head/cddl/sbin/zpool/Makefile.depend head/gnu/lib/libssp/Makefile.depend head/gnu/usr.bin/diff/Makefile.depend head/gnu/usr.bin/dtc/Makefile.depend head/gnu/usr.bin/gperf/Makefile.depend head/gnu/usr.bin/grep/Makefile.depend head/lib/clang/libclanganalysis/Makefile.depend head/lib/clang/libclangast/Makefile.depend head/lib/clang/libclangbasic/Makefile.depend head/lib/clang/libclangcodegen/Makefile.depend head/lib/clang/libclangdriver/Makefile.depend head/lib/clang/libclanglex/Makefile.depend head/lib/clang/libclangparse/Makefile.depend head/lib/clang/libclangstaticanalyzercheckers/Makefile.depend head/lib/clang/libclangstaticanalyzercore/Makefile.depend head/lib/clang/liblldb/Makefile.depend head/lib/clang/liblldbAPI/Makefile.depend head/lib/clang/liblldbBreakpoint/Makefile.depend head/lib/clang/liblldbCommands/Makefile.depend head/lib/clang/liblldbCore/Makefile.depend head/lib/clang/liblldbDataFormatters/Makefile.depend head/lib/clang/liblldbExpression/Makefile.depend head/lib/clang/liblldbHostCommon/Makefile.depend head/lib/clang/liblldbHostFreeBSD/Makefile.depend head/lib/clang/liblldbInterpreter/Makefile.depend head/lib/clang/liblldbPluginDisassemblerLLVM/Makefile.depend head/lib/clang/liblldbPluginDynamicLoaderPosixDYLD/Makefile.depend head/lib/clang/liblldbPluginDynamicLoaderStatic/Makefile.depend head/lib/clang/liblldbPluginInstrumentationRuntimeAddressSanitizer/Makefile.depend head/lib/clang/liblldbPluginJITLoaderGDB/Makefile.depend head/lib/clang/liblldbPluginMemoryHistoryASan/Makefile.depend head/lib/clang/liblldbPluginObjectContainerBSDArchive/Makefile.depend head/lib/clang/liblldbPluginObjectFileELF/Makefile.depend head/lib/clang/liblldbPluginObjectFileJIT/Makefile.depend head/lib/clang/liblldbPluginPlatformFreeBSD/Makefile.depend head/lib/clang/liblldbPluginPlatformGDB/Makefile.depend head/lib/clang/liblldbPluginProcessElfCore/Makefile.depend head/lib/clang/liblldbPluginProcessFreeBSD/Makefile.depend head/lib/clang/liblldbPluginProcessGDBRemote/Makefile.depend head/lib/clang/liblldbPluginProcessPOSIX/Makefile.depend head/lib/clang/liblldbPluginProcessUtility/Makefile.depend head/lib/clang/liblldbPluginSymbolFileSymtab/Makefile.depend head/lib/clang/liblldbPluginSymbolVendorELF/Makefile.depend head/lib/clang/liblldbPluginUnwindAssemblyInstEmulation/Makefile.depend head/lib/clang/liblldbPluginUnwindAssemblyX86/Makefile.depend head/lib/clang/liblldbSymbol/Makefile.depend head/lib/clang/liblldbTarget/Makefile.depend head/lib/clang/libllvmaarch64codegen/Makefile.depend head/lib/clang/libllvmaarch64disassembler/Makefile.depend head/lib/clang/libllvmanalysis/Makefile.depend head/lib/clang/libllvmarmcodegen/Makefile.depend head/lib/clang/libllvmcodegen/Makefile.depend head/lib/clang/libllvmcore/Makefile.depend head/lib/clang/libllvminstrumentation/Makefile.depend head/lib/clang/libllvmipa/Makefile.depend head/lib/clang/libllvmipo/Makefile.depend head/lib/clang/libllvmmipscodegen/Makefile.depend head/lib/clang/libllvmobjcarcopts/Makefile.depend head/lib/clang/libllvmpowerpccodegen/Makefile.depend head/lib/clang/libllvmscalaropts/Makefile.depend head/lib/clang/libllvmtarget/Makefile.depend head/lib/clang/libllvmtransformutils/Makefile.depend head/lib/clang/libllvmx86codegen/Makefile.depend head/lib/clang/libllvmx86disassembler/Makefile.depend head/lib/libevent/Makefile.depend head/lib/libunbound/Makefile.depend head/libexec/bootpd/Makefile.depend head/libexec/dma/dmagent/Makefile.depend head/sbin/ifconfig/Makefile.depend head/sbin/routed/Makefile.depend head/share/examples/libvgl/Makefile.depend head/sys/boot/i386/boot2/Makefile.depend head/sys/boot/i386/loader/Makefile.depend head/sys/boot/i386/zfsloader/Makefile.depend head/targets/pseudo/userland/Makefile.depend head/targets/pseudo/userland/gnu/Makefile.depend head/targets/pseudo/userland/lib/Makefile.depend head/targets/pseudo/userland/libexec/Makefile.depend head/targets/pseudo/userland/misc/Makefile.depend head/targets/pseudo/userland/secure/Makefile.depend head/targets/pseudo/userland/share/Makefile.depend head/usr.bin/clang/clang-tblgen/Makefile.depend head/usr.bin/clang/clang/Makefile.depend head/usr.bin/clang/lldb/Makefile.depend head/usr.bin/clang/tblgen/Makefile.depend head/usr.bin/lex/Makefile.depend head/usr.bin/smbutil/Makefile.depend head/usr.bin/svn/lib/libsvn_delta/Makefile.depend head/usr.bin/svn/lib/libsvn_subr/Makefile.depend head/usr.bin/svn/svn/Makefile.depend head/usr.bin/svn/svnadmin/Makefile.depend head/usr.bin/svn/svnbench/Makefile.depend head/usr.bin/svn/svndumpfilter/Makefile.depend head/usr.bin/svn/svnfsfs/Makefile.depend head/usr.bin/svn/svnlook/Makefile.depend head/usr.bin/svn/svnmucc/Makefile.depend head/usr.bin/svn/svnrdump/Makefile.depend head/usr.bin/svn/svnserve/Makefile.depend head/usr.bin/svn/svnsync/Makefile.depend head/usr.bin/svn/svnversion/Makefile.depend head/usr.sbin/bsnmpd/modules/snmp_hast/Makefile.depend head/usr.sbin/mount_smbfs/Makefile.depend Modified: head/cddl/lib/libzfs/Makefile.depend ============================================================================== --- head/cddl/lib/libzfs/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/cddl/lib/libzfs/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -19,6 +19,7 @@ DIRDEPS = \ lib/libmd \ lib/libthr \ lib/libutil \ + lib/libz \ lib/msun \ Modified: head/cddl/sbin/zfs/Makefile.depend ============================================================================== --- head/cddl/sbin/zfs/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/cddl/sbin/zfs/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -22,6 +22,7 @@ DIRDEPS = \ lib/libsbuf \ lib/libthr \ lib/libutil \ + lib/libz \ lib/msun \ Modified: head/cddl/sbin/zpool/Makefile.depend ============================================================================== --- head/cddl/sbin/zpool/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/cddl/sbin/zpool/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -21,6 +21,7 @@ DIRDEPS = \ lib/libsbuf \ lib/libthr \ lib/libutil \ + lib/libz \ lib/msun \ Copied and modified: head/etc/Makefile.depend (from r291562, head/sys/boot/i386/zfsloader/Makefile.depend) ============================================================================== Copied and modified: head/etc/newsyslog.conf.d/Makefile.depend (from r291562, head/sys/boot/i386/zfsloader/Makefile.depend) ============================================================================== Modified: head/gnu/lib/libssp/Makefile.depend ============================================================================== --- head/gnu/lib/libssp/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/gnu/lib/libssp/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -2,11 +2,13 @@ # Autogenerated - do NOT edit! DIRDEPS = \ + gnu/lib/csu \ gnu/lib/libgcc \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcompiler_rt \ .include Modified: head/gnu/usr.bin/diff/Makefile.depend ============================================================================== --- head/gnu/usr.bin/diff/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/gnu/usr.bin/diff/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -2,20 +2,18 @@ # Autogenerated - do NOT edit! DIRDEPS = \ + gnu/lib/csu \ gnu/lib/libgcc \ gnu/lib/libregex \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcompiler_rt \ .include .if ${DEP_RELDIR} == ${_DEP_RELDIR} # local dependencies - needed for -jN in clean tree -context.o: context.c -context.po: context.c -diff.o: diff.c -diff.po: diff.c .endif Modified: head/gnu/usr.bin/dtc/Makefile.depend ============================================================================== --- head/gnu/usr.bin/dtc/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/gnu/usr.bin/dtc/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -2,11 +2,14 @@ # Autogenerated - do NOT edit! DIRDEPS = \ + gnu/lib/csu \ gnu/lib/libgcc \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libcompiler_rt \ + usr.bin/yacc.host \ .include @@ -19,6 +22,6 @@ dtc-lexer.lex.po: dtc-lexer.lex.c dtc-lexer.lex.po: dtc-parser.tab.h dtc-parser.tab.o: dtc-parser.tab.c dtc-parser.tab.po: dtc-parser.tab.c -dtc.o: version_gen.h -dtc.po: version_gen.h +util.o: version_gen.h +util.po: version_gen.h .endif Modified: head/gnu/usr.bin/gperf/Makefile.depend ============================================================================== --- head/gnu/usr.bin/gperf/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/gnu/usr.bin/gperf/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -2,12 +2,15 @@ # Autogenerated - do NOT edit! DIRDEPS = \ + gnu/lib/csu \ gnu/lib/libgcc \ - gnu/lib/libstdc++ \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ + lib/libc++ \ + lib/libcompiler_rt \ + lib/libcxxrt \ lib/msun \ Modified: head/gnu/usr.bin/grep/Makefile.depend ============================================================================== --- head/gnu/usr.bin/grep/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/gnu/usr.bin/grep/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -2,6 +2,7 @@ # Autogenerated - do NOT edit! DIRDEPS = \ + gnu/lib/csu \ gnu/lib/libgcc \ gnu/lib/libregex \ include \ @@ -9,6 +10,7 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/libbz2 \ lib/libc \ + lib/libcompiler_rt \ lib/libz \ Modified: head/lib/clang/libclanganalysis/Makefile.depend ============================================================================== --- head/lib/clang/libclanganalysis/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/libclanganalysis/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -169,12 +169,6 @@ ThreadSafetyCommon.po: Attrs.inc.h ThreadSafetyCommon.po: DeclNodes.inc.h ThreadSafetyCommon.po: DiagnosticCommonKinds.inc.h ThreadSafetyCommon.po: StmtNodes.inc.h -ThreadSafetyLogical.o: DeclNodes.inc.h -ThreadSafetyLogical.o: DiagnosticCommonKinds.inc.h -ThreadSafetyLogical.o: StmtNodes.inc.h -ThreadSafetyLogical.po: DeclNodes.inc.h -ThreadSafetyLogical.po: DiagnosticCommonKinds.inc.h -ThreadSafetyLogical.po: StmtNodes.inc.h ThreadSafetyTIL.o: DeclNodes.inc.h ThreadSafetyTIL.o: DiagnosticCommonKinds.inc.h ThreadSafetyTIL.o: StmtNodes.inc.h Modified: head/lib/clang/libclangast/Makefile.depend ============================================================================== --- head/lib/clang/libclangast/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/libclangast/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -611,12 +611,14 @@ VTableBuilder.o: AttrList.inc.h VTableBuilder.o: Attrs.inc.h VTableBuilder.o: CommentCommandList.inc.h VTableBuilder.o: DeclNodes.inc.h +VTableBuilder.o: DiagnosticASTKinds.inc.h VTableBuilder.o: DiagnosticCommonKinds.inc.h VTableBuilder.o: StmtNodes.inc.h VTableBuilder.po: AttrList.inc.h VTableBuilder.po: Attrs.inc.h VTableBuilder.po: CommentCommandList.inc.h VTableBuilder.po: DeclNodes.inc.h +VTableBuilder.po: DiagnosticASTKinds.inc.h VTableBuilder.po: DiagnosticCommonKinds.inc.h VTableBuilder.po: StmtNodes.inc.h .endif Modified: head/lib/clang/libclangbasic/Makefile.depend ============================================================================== --- head/lib/clang/libclangbasic/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/libclangbasic/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -4,7 +4,6 @@ DIRDEPS = \ include \ include/xlocale \ - lib/clang/include.host \ lib/libc++ \ lib/msun \ usr.bin/clang/clang-tblgen.host \ Modified: head/lib/clang/libclangcodegen/Makefile.depend ============================================================================== --- head/lib/clang/libclangcodegen/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/libclangcodegen/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -16,8 +16,10 @@ DIRDEPS = \ # local dependencies - needed for -jN in clean tree BackendUtil.o: DiagnosticCommonKinds.inc.h BackendUtil.o: DiagnosticFrontendKinds.inc.h +BackendUtil.o: Intrinsics.inc.h BackendUtil.po: DiagnosticCommonKinds.inc.h BackendUtil.po: DiagnosticFrontendKinds.inc.h +BackendUtil.po: Intrinsics.inc.h CGAtomic.o: AttrList.inc.h CGAtomic.o: Attrs.inc.h CGAtomic.o: CommentCommandList.inc.h @@ -127,6 +129,7 @@ CGClass.o: Attrs.inc.h CGClass.o: CommentCommandList.inc.h CGClass.o: DeclNodes.inc.h CGClass.o: DiagnosticCommonKinds.inc.h +CGClass.o: Intrinsics.inc.h CGClass.o: StmtNodes.inc.h CGClass.o: arm_neon.inc.h CGClass.po: AttrList.inc.h @@ -134,6 +137,7 @@ CGClass.po: Attrs.inc.h CGClass.po: CommentCommandList.inc.h CGClass.po: DeclNodes.inc.h CGClass.po: DiagnosticCommonKinds.inc.h +CGClass.po: Intrinsics.inc.h CGClass.po: StmtNodes.inc.h CGClass.po: arm_neon.inc.h CGCleanup.o: AttrList.inc.h @@ -197,6 +201,7 @@ CGException.o: DeclNodes.inc.h CGException.o: DiagnosticCommonKinds.inc.h CGException.o: Intrinsics.inc.h CGException.o: StmtNodes.inc.h +CGException.o: arm_neon.inc.h CGException.po: AttrList.inc.h CGException.po: Attrs.inc.h CGException.po: CommentCommandList.inc.h @@ -204,6 +209,7 @@ CGException.po: DeclNodes.inc.h CGException.po: DiagnosticCommonKinds.inc.h CGException.po: Intrinsics.inc.h CGException.po: StmtNodes.inc.h +CGException.po: arm_neon.inc.h CGExpr.o: AttrList.inc.h CGExpr.o: Attrs.inc.h CGExpr.o: CommentCommandList.inc.h @@ -284,6 +290,18 @@ CGExprScalar.po: DeclNodes.inc.h CGExprScalar.po: DiagnosticCommonKinds.inc.h CGExprScalar.po: Intrinsics.inc.h CGExprScalar.po: StmtNodes.inc.h +CGLoopInfo.o: AttrList.inc.h +CGLoopInfo.o: AttrParsedAttrList.inc.h +CGLoopInfo.o: Attrs.inc.h +CGLoopInfo.o: DeclNodes.inc.h +CGLoopInfo.o: DiagnosticCommonKinds.inc.h +CGLoopInfo.o: StmtNodes.inc.h +CGLoopInfo.po: AttrList.inc.h +CGLoopInfo.po: AttrParsedAttrList.inc.h +CGLoopInfo.po: Attrs.inc.h +CGLoopInfo.po: DeclNodes.inc.h +CGLoopInfo.po: DiagnosticCommonKinds.inc.h +CGLoopInfo.po: StmtNodes.inc.h CGObjC.o: AttrList.inc.h CGObjC.o: Attrs.inc.h CGObjC.o: CommentCommandList.inc.h @@ -555,12 +573,14 @@ MicrosoftCXXABI.o: Attrs.inc.h MicrosoftCXXABI.o: CommentCommandList.inc.h MicrosoftCXXABI.o: DeclNodes.inc.h MicrosoftCXXABI.o: DiagnosticCommonKinds.inc.h +MicrosoftCXXABI.o: Intrinsics.inc.h MicrosoftCXXABI.o: StmtNodes.inc.h MicrosoftCXXABI.po: AttrList.inc.h MicrosoftCXXABI.po: Attrs.inc.h MicrosoftCXXABI.po: CommentCommandList.inc.h MicrosoftCXXABI.po: DeclNodes.inc.h MicrosoftCXXABI.po: DiagnosticCommonKinds.inc.h +MicrosoftCXXABI.po: Intrinsics.inc.h MicrosoftCXXABI.po: StmtNodes.inc.h ModuleBuilder.o: AttrList.inc.h ModuleBuilder.o: Attrs.inc.h @@ -574,6 +594,20 @@ ModuleBuilder.po: CommentCommandList.inc ModuleBuilder.po: DeclNodes.inc.h ModuleBuilder.po: DiagnosticCommonKinds.inc.h ModuleBuilder.po: StmtNodes.inc.h +ObjectFilePCHContainerOperations.o: AttrList.inc.h +ObjectFilePCHContainerOperations.o: AttrVisitor.inc.h +ObjectFilePCHContainerOperations.o: Attrs.inc.h +ObjectFilePCHContainerOperations.o: CommentCommandList.inc.h +ObjectFilePCHContainerOperations.o: DeclNodes.inc.h +ObjectFilePCHContainerOperations.o: DiagnosticCommonKinds.inc.h +ObjectFilePCHContainerOperations.o: StmtNodes.inc.h +ObjectFilePCHContainerOperations.po: AttrList.inc.h +ObjectFilePCHContainerOperations.po: AttrVisitor.inc.h +ObjectFilePCHContainerOperations.po: Attrs.inc.h +ObjectFilePCHContainerOperations.po: CommentCommandList.inc.h +ObjectFilePCHContainerOperations.po: DeclNodes.inc.h +ObjectFilePCHContainerOperations.po: DiagnosticCommonKinds.inc.h +ObjectFilePCHContainerOperations.po: StmtNodes.inc.h SanitizerMetadata.o: AttrList.inc.h SanitizerMetadata.o: Attrs.inc.h SanitizerMetadata.o: CommentCommandList.inc.h Modified: head/lib/clang/libclangdriver/Makefile.depend ============================================================================== --- head/lib/clang/libclangdriver/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/libclangdriver/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -42,6 +42,10 @@ MSVCToolChain.o: Options.inc.h MSVCToolChain.po: DiagnosticCommonKinds.inc.h MSVCToolChain.po: DiagnosticDriverKinds.inc.h MSVCToolChain.po: Options.inc.h +MinGWToolChain.o: DiagnosticCommonKinds.inc.h +MinGWToolChain.o: Options.inc.h +MinGWToolChain.po: DiagnosticCommonKinds.inc.h +MinGWToolChain.po: Options.inc.h Multilib.o: Options.inc.h Multilib.po: Options.inc.h SanitizerArgs.o: DiagnosticCommonKinds.inc.h Modified: head/lib/clang/libclanglex/Makefile.depend ============================================================================== --- head/lib/clang/libclanglex/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/libclanglex/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -4,7 +4,6 @@ DIRDEPS = \ include \ include/xlocale \ - lib/clang/include.host \ lib/libc++ \ lib/msun \ usr.bin/clang/clang-tblgen.host \ Modified: head/lib/clang/libclangparse/Makefile.depend ============================================================================== --- head/lib/clang/libclangparse/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/libclangparse/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -128,6 +128,7 @@ ParseInit.po: StmtNodes.inc.h ParseObjc.o: AttrList.inc.h ParseObjc.o: AttrParsedAttrList.inc.h ParseObjc.o: Attrs.inc.h +ParseObjc.o: CommentCommandList.inc.h ParseObjc.o: DeclNodes.inc.h ParseObjc.o: DiagnosticCommonKinds.inc.h ParseObjc.o: DiagnosticParseKinds.inc.h @@ -135,6 +136,7 @@ ParseObjc.o: StmtNodes.inc.h ParseObjc.po: AttrList.inc.h ParseObjc.po: AttrParsedAttrList.inc.h ParseObjc.po: Attrs.inc.h +ParseObjc.po: CommentCommandList.inc.h ParseObjc.po: DeclNodes.inc.h ParseObjc.po: DiagnosticCommonKinds.inc.h ParseObjc.po: DiagnosticParseKinds.inc.h @@ -206,6 +208,7 @@ ParseStmtAsm.po: StmtNodes.inc.h ParseTemplate.o: AttrList.inc.h ParseTemplate.o: AttrParsedAttrList.inc.h ParseTemplate.o: Attrs.inc.h +ParseTemplate.o: CommentCommandList.inc.h ParseTemplate.o: DeclNodes.inc.h ParseTemplate.o: DiagnosticCommonKinds.inc.h ParseTemplate.o: DiagnosticParseKinds.inc.h @@ -213,6 +216,7 @@ ParseTemplate.o: StmtNodes.inc.h ParseTemplate.po: AttrList.inc.h ParseTemplate.po: AttrParsedAttrList.inc.h ParseTemplate.po: Attrs.inc.h +ParseTemplate.po: CommentCommandList.inc.h ParseTemplate.po: DeclNodes.inc.h ParseTemplate.po: DiagnosticCommonKinds.inc.h ParseTemplate.po: DiagnosticParseKinds.inc.h Modified: head/lib/clang/libclangstaticanalyzercheckers/Makefile.depend ============================================================================== --- head/lib/clang/libclangstaticanalyzercheckers/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/libclangstaticanalyzercheckers/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -175,16 +175,6 @@ CheckSizeofPointer.po: CommentCommandLis CheckSizeofPointer.po: DeclNodes.inc.h CheckSizeofPointer.po: DiagnosticCommonKinds.inc.h CheckSizeofPointer.po: StmtNodes.inc.h -CheckerDocumentation.o: Checkers.inc.h -CheckerDocumentation.o: CommentCommandList.inc.h -CheckerDocumentation.o: DeclNodes.inc.h -CheckerDocumentation.o: DiagnosticCommonKinds.inc.h -CheckerDocumentation.o: StmtNodes.inc.h -CheckerDocumentation.po: Checkers.inc.h -CheckerDocumentation.po: CommentCommandList.inc.h -CheckerDocumentation.po: DeclNodes.inc.h -CheckerDocumentation.po: DiagnosticCommonKinds.inc.h -CheckerDocumentation.po: StmtNodes.inc.h ChrootChecker.o: Checkers.inc.h ChrootChecker.o: CommentCommandList.inc.h ChrootChecker.o: DeclNodes.inc.h Modified: head/lib/clang/libclangstaticanalyzercore/Makefile.depend ============================================================================== --- head/lib/clang/libclangstaticanalyzercore/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/libclangstaticanalyzercore/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -21,6 +21,14 @@ AnalysisManager.po: CommentCommandList.i AnalysisManager.po: DeclNodes.inc.h AnalysisManager.po: DiagnosticCommonKinds.inc.h AnalysisManager.po: StmtNodes.inc.h +AnalyzerOptions.o: CommentCommandList.inc.h +AnalyzerOptions.o: DeclNodes.inc.h +AnalyzerOptions.o: DiagnosticCommonKinds.inc.h +AnalyzerOptions.o: StmtNodes.inc.h +AnalyzerOptions.po: CommentCommandList.inc.h +AnalyzerOptions.po: DeclNodes.inc.h +AnalyzerOptions.po: DiagnosticCommonKinds.inc.h +AnalyzerOptions.po: StmtNodes.inc.h BasicValueFactory.o: CommentCommandList.inc.h BasicValueFactory.o: DeclNodes.inc.h BasicValueFactory.o: DiagnosticCommonKinds.inc.h @@ -98,10 +106,12 @@ CheckerManager.po: StmtNodes.inc.h CheckerRegistry.o: CommentCommandList.inc.h CheckerRegistry.o: DeclNodes.inc.h CheckerRegistry.o: DiagnosticCommonKinds.inc.h +CheckerRegistry.o: DiagnosticFrontendKinds.inc.h CheckerRegistry.o: StmtNodes.inc.h CheckerRegistry.po: CommentCommandList.inc.h CheckerRegistry.po: DeclNodes.inc.h CheckerRegistry.po: DiagnosticCommonKinds.inc.h +CheckerRegistry.po: DiagnosticFrontendKinds.inc.h CheckerRegistry.po: StmtNodes.inc.h ConstraintManager.o: CommentCommandList.inc.h ConstraintManager.o: DeclNodes.inc.h Modified: head/lib/clang/liblldb/Makefile.depend ============================================================================== --- head/lib/clang/liblldb/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/liblldb/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -5,7 +5,6 @@ DIRDEPS = \ include \ include/xlocale \ lib/libc++ \ - lib/msun \ usr.bin/clang/clang-tblgen.host \ @@ -13,16 +12,4 @@ DIRDEPS = \ .if ${DEP_RELDIR} == ${_DEP_RELDIR} # local dependencies - needed for -jN in clean tree -lldb.o: AttrList.inc.h -lldb.o: Attrs.inc.h -lldb.o: CommentCommandList.inc.h -lldb.o: DeclNodes.inc.h -lldb.o: DiagnosticCommonKinds.inc.h -lldb.o: StmtNodes.inc.h -lldb.po: AttrList.inc.h -lldb.po: Attrs.inc.h -lldb.po: CommentCommandList.inc.h -lldb.po: DeclNodes.inc.h -lldb.po: DiagnosticCommonKinds.inc.h -lldb.po: StmtNodes.inc.h .endif Modified: head/lib/clang/liblldbAPI/Makefile.depend ============================================================================== --- head/lib/clang/liblldbAPI/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/liblldbAPI/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -13,60 +13,10 @@ DIRDEPS = \ .if ${DEP_RELDIR} == ${_DEP_RELDIR} # local dependencies - needed for -jN in clean tree -SBAddress.o: CommentCommandList.inc.h -SBAddress.o: DeclNodes.inc.h -SBAddress.o: DiagnosticCommonKinds.inc.h -SBAddress.o: StmtNodes.inc.h -SBAddress.po: CommentCommandList.inc.h -SBAddress.po: DeclNodes.inc.h -SBAddress.po: DiagnosticCommonKinds.inc.h -SBAddress.po: StmtNodes.inc.h SBBlock.o: DiagnosticCommonKinds.inc.h SBBlock.po: DiagnosticCommonKinds.inc.h -SBBreakpoint.o: AttrList.inc.h -SBBreakpoint.o: Attrs.inc.h -SBBreakpoint.o: CommentCommandList.inc.h -SBBreakpoint.o: DeclNodes.inc.h -SBBreakpoint.o: DiagnosticCommonKinds.inc.h -SBBreakpoint.o: StmtNodes.inc.h -SBBreakpoint.po: AttrList.inc.h -SBBreakpoint.po: Attrs.inc.h -SBBreakpoint.po: CommentCommandList.inc.h -SBBreakpoint.po: DeclNodes.inc.h -SBBreakpoint.po: DiagnosticCommonKinds.inc.h -SBBreakpoint.po: StmtNodes.inc.h -SBBreakpointLocation.o: AttrList.inc.h -SBBreakpointLocation.o: Attrs.inc.h -SBBreakpointLocation.o: CommentCommandList.inc.h -SBBreakpointLocation.o: DeclNodes.inc.h -SBBreakpointLocation.o: DiagnosticCommonKinds.inc.h -SBBreakpointLocation.o: StmtNodes.inc.h -SBBreakpointLocation.po: AttrList.inc.h -SBBreakpointLocation.po: Attrs.inc.h -SBBreakpointLocation.po: CommentCommandList.inc.h -SBBreakpointLocation.po: DeclNodes.inc.h -SBBreakpointLocation.po: DiagnosticCommonKinds.inc.h -SBBreakpointLocation.po: StmtNodes.inc.h -SBCommandInterpreter.o: AttrList.inc.h -SBCommandInterpreter.o: Attrs.inc.h -SBCommandInterpreter.o: CommentCommandList.inc.h -SBCommandInterpreter.o: DeclNodes.inc.h -SBCommandInterpreter.o: DiagnosticCommonKinds.inc.h -SBCommandInterpreter.o: StmtNodes.inc.h -SBCommandInterpreter.po: AttrList.inc.h -SBCommandInterpreter.po: Attrs.inc.h -SBCommandInterpreter.po: CommentCommandList.inc.h -SBCommandInterpreter.po: DeclNodes.inc.h -SBCommandInterpreter.po: DiagnosticCommonKinds.inc.h -SBCommandInterpreter.po: StmtNodes.inc.h -SBCompileUnit.o: CommentCommandList.inc.h -SBCompileUnit.o: DeclNodes.inc.h SBCompileUnit.o: DiagnosticCommonKinds.inc.h -SBCompileUnit.o: StmtNodes.inc.h -SBCompileUnit.po: CommentCommandList.inc.h -SBCompileUnit.po: DeclNodes.inc.h SBCompileUnit.po: DiagnosticCommonKinds.inc.h -SBCompileUnit.po: StmtNodes.inc.h SBDebugger.o: AttrList.inc.h SBDebugger.o: Attrs.inc.h SBDebugger.o: CommentCommandList.inc.h @@ -79,58 +29,12 @@ SBDebugger.po: CommentCommandList.inc.h SBDebugger.po: DeclNodes.inc.h SBDebugger.po: DiagnosticCommonKinds.inc.h SBDebugger.po: StmtNodes.inc.h -SBEvent.o: AttrList.inc.h -SBEvent.o: Attrs.inc.h -SBEvent.o: CommentCommandList.inc.h -SBEvent.o: DeclNodes.inc.h -SBEvent.o: DiagnosticCommonKinds.inc.h -SBEvent.o: StmtNodes.inc.h -SBEvent.po: AttrList.inc.h -SBEvent.po: Attrs.inc.h -SBEvent.po: CommentCommandList.inc.h -SBEvent.po: DeclNodes.inc.h -SBEvent.po: DiagnosticCommonKinds.inc.h -SBEvent.po: StmtNodes.inc.h -SBExpressionOptions.o: DiagnosticCommonKinds.inc.h -SBExpressionOptions.po: DiagnosticCommonKinds.inc.h SBFrame.o: DiagnosticCommonKinds.inc.h SBFrame.po: DiagnosticCommonKinds.inc.h -SBFunction.o: CommentCommandList.inc.h -SBFunction.o: DeclNodes.inc.h SBFunction.o: DiagnosticCommonKinds.inc.h -SBFunction.o: StmtNodes.inc.h -SBFunction.po: CommentCommandList.inc.h -SBFunction.po: DeclNodes.inc.h SBFunction.po: DiagnosticCommonKinds.inc.h -SBFunction.po: StmtNodes.inc.h -SBInstruction.o: CommentCommandList.inc.h -SBInstruction.o: DeclNodes.inc.h -SBInstruction.o: DiagnosticCommonKinds.inc.h -SBInstruction.o: StmtNodes.inc.h -SBInstruction.po: CommentCommandList.inc.h -SBInstruction.po: DeclNodes.inc.h -SBInstruction.po: DiagnosticCommonKinds.inc.h -SBInstruction.po: StmtNodes.inc.h -SBInstructionList.o: CommentCommandList.inc.h -SBInstructionList.o: DeclNodes.inc.h -SBInstructionList.o: DiagnosticCommonKinds.inc.h -SBInstructionList.o: StmtNodes.inc.h -SBInstructionList.po: CommentCommandList.inc.h -SBInstructionList.po: DeclNodes.inc.h -SBInstructionList.po: DiagnosticCommonKinds.inc.h -SBInstructionList.po: StmtNodes.inc.h -SBListener.o: AttrList.inc.h -SBListener.o: Attrs.inc.h -SBListener.o: CommentCommandList.inc.h -SBListener.o: DeclNodes.inc.h -SBListener.o: DiagnosticCommonKinds.inc.h -SBListener.o: StmtNodes.inc.h -SBListener.po: AttrList.inc.h -SBListener.po: Attrs.inc.h -SBListener.po: CommentCommandList.inc.h -SBListener.po: DeclNodes.inc.h -SBListener.po: DiagnosticCommonKinds.inc.h -SBListener.po: StmtNodes.inc.h +SBLanguageRuntime.o: DiagnosticCommonKinds.inc.h +SBLanguageRuntime.po: DiagnosticCommonKinds.inc.h SBModule.o: CommentCommandList.inc.h SBModule.o: DeclNodes.inc.h SBModule.o: DiagnosticCommonKinds.inc.h @@ -139,104 +43,20 @@ SBModule.po: CommentCommandList.inc.h SBModule.po: DeclNodes.inc.h SBModule.po: DiagnosticCommonKinds.inc.h SBModule.po: StmtNodes.inc.h -SBModuleSpec.o: CommentCommandList.inc.h -SBModuleSpec.o: DeclNodes.inc.h -SBModuleSpec.o: DiagnosticCommonKinds.inc.h -SBModuleSpec.o: StmtNodes.inc.h -SBModuleSpec.po: CommentCommandList.inc.h -SBModuleSpec.po: DeclNodes.inc.h -SBModuleSpec.po: DiagnosticCommonKinds.inc.h -SBModuleSpec.po: StmtNodes.inc.h -SBPlatform.o: DiagnosticCommonKinds.inc.h -SBPlatform.po: DiagnosticCommonKinds.inc.h -SBProcess.o: AttrList.inc.h -SBProcess.o: Attrs.inc.h -SBProcess.o: CommentCommandList.inc.h -SBProcess.o: DeclNodes.inc.h -SBProcess.o: DiagnosticCommonKinds.inc.h -SBProcess.o: StmtNodes.inc.h -SBProcess.po: AttrList.inc.h -SBProcess.po: Attrs.inc.h -SBProcess.po: CommentCommandList.inc.h -SBProcess.po: DeclNodes.inc.h -SBProcess.po: DiagnosticCommonKinds.inc.h -SBProcess.po: StmtNodes.inc.h -SBQueue.o: DiagnosticCommonKinds.inc.h -SBQueue.po: DiagnosticCommonKinds.inc.h -SBQueueItem.o: DiagnosticCommonKinds.inc.h -SBQueueItem.po: DiagnosticCommonKinds.inc.h -SBSection.o: CommentCommandList.inc.h -SBSection.o: DeclNodes.inc.h -SBSection.o: DiagnosticCommonKinds.inc.h -SBSection.o: StmtNodes.inc.h -SBSection.po: CommentCommandList.inc.h -SBSection.po: DeclNodes.inc.h -SBSection.po: DiagnosticCommonKinds.inc.h -SBSection.po: StmtNodes.inc.h -SBSourceManager.o: AttrList.inc.h -SBSourceManager.o: Attrs.inc.h -SBSourceManager.o: CommentCommandList.inc.h -SBSourceManager.o: DeclNodes.inc.h -SBSourceManager.o: DiagnosticCommonKinds.inc.h -SBSourceManager.o: StmtNodes.inc.h -SBSourceManager.po: AttrList.inc.h -SBSourceManager.po: Attrs.inc.h -SBSourceManager.po: CommentCommandList.inc.h -SBSourceManager.po: DeclNodes.inc.h -SBSourceManager.po: DiagnosticCommonKinds.inc.h -SBSourceManager.po: StmtNodes.inc.h -SBSymbol.o: CommentCommandList.inc.h -SBSymbol.o: DeclNodes.inc.h -SBSymbol.o: DiagnosticCommonKinds.inc.h -SBSymbol.o: StmtNodes.inc.h -SBSymbol.po: CommentCommandList.inc.h -SBSymbol.po: DeclNodes.inc.h -SBSymbol.po: DiagnosticCommonKinds.inc.h -SBSymbol.po: StmtNodes.inc.h -SBSymbolContext.o: CommentCommandList.inc.h -SBSymbolContext.o: DeclNodes.inc.h SBSymbolContext.o: DiagnosticCommonKinds.inc.h -SBSymbolContext.o: StmtNodes.inc.h -SBSymbolContext.po: CommentCommandList.inc.h -SBSymbolContext.po: DeclNodes.inc.h SBSymbolContext.po: DiagnosticCommonKinds.inc.h -SBSymbolContext.po: StmtNodes.inc.h -SBTarget.o: AttrList.inc.h -SBTarget.o: Attrs.inc.h SBTarget.o: CommentCommandList.inc.h SBTarget.o: DeclNodes.inc.h SBTarget.o: DiagnosticCommonKinds.inc.h SBTarget.o: StmtNodes.inc.h -SBTarget.po: AttrList.inc.h -SBTarget.po: Attrs.inc.h SBTarget.po: CommentCommandList.inc.h SBTarget.po: DeclNodes.inc.h SBTarget.po: DiagnosticCommonKinds.inc.h SBTarget.po: StmtNodes.inc.h -SBThread.o: AttrList.inc.h -SBThread.o: Attrs.inc.h -SBThread.o: CommentCommandList.inc.h -SBThread.o: DeclNodes.inc.h SBThread.o: DiagnosticCommonKinds.inc.h -SBThread.o: StmtNodes.inc.h -SBThread.po: AttrList.inc.h -SBThread.po: Attrs.inc.h -SBThread.po: CommentCommandList.inc.h -SBThread.po: DeclNodes.inc.h SBThread.po: DiagnosticCommonKinds.inc.h -SBThread.po: StmtNodes.inc.h -SBThreadPlan.o: AttrList.inc.h -SBThreadPlan.o: Attrs.inc.h -SBThreadPlan.o: CommentCommandList.inc.h -SBThreadPlan.o: DeclNodes.inc.h SBThreadPlan.o: DiagnosticCommonKinds.inc.h -SBThreadPlan.o: StmtNodes.inc.h -SBThreadPlan.po: AttrList.inc.h -SBThreadPlan.po: Attrs.inc.h -SBThreadPlan.po: CommentCommandList.inc.h -SBThreadPlan.po: DeclNodes.inc.h SBThreadPlan.po: DiagnosticCommonKinds.inc.h -SBThreadPlan.po: StmtNodes.inc.h SBType.o: CommentCommandList.inc.h SBType.o: DeclNodes.inc.h SBType.o: DiagnosticCommonKinds.inc.h @@ -319,8 +139,6 @@ SBTypeSynthetic.po: CommentCommandList.i SBTypeSynthetic.po: DeclNodes.inc.h SBTypeSynthetic.po: DiagnosticCommonKinds.inc.h SBTypeSynthetic.po: StmtNodes.inc.h -SBUnixSignals.o: DiagnosticCommonKinds.inc.h -SBUnixSignals.po: DiagnosticCommonKinds.inc.h SBValue.o: AttrList.inc.h SBValue.o: Attrs.inc.h SBValue.o: CommentCommandList.inc.h @@ -335,4 +153,12 @@ SBValue.po: DiagnosticCommonKinds.inc.h SBValue.po: StmtNodes.inc.h SBWatchpoint.o: DiagnosticCommonKinds.inc.h SBWatchpoint.po: DiagnosticCommonKinds.inc.h +SystemInitializerFull.o: CommentCommandList.inc.h +SystemInitializerFull.o: DeclNodes.inc.h +SystemInitializerFull.o: DiagnosticCommonKinds.inc.h +SystemInitializerFull.o: StmtNodes.inc.h +SystemInitializerFull.po: CommentCommandList.inc.h +SystemInitializerFull.po: DeclNodes.inc.h +SystemInitializerFull.po: DiagnosticCommonKinds.inc.h +SystemInitializerFull.po: StmtNodes.inc.h .endif Modified: head/lib/clang/liblldbBreakpoint/Makefile.depend ============================================================================== --- head/lib/clang/liblldbBreakpoint/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/liblldbBreakpoint/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -13,66 +13,20 @@ DIRDEPS = \ .if ${DEP_RELDIR} == ${_DEP_RELDIR} # local dependencies - needed for -jN in clean tree -Breakpoint.o: CommentCommandList.inc.h -Breakpoint.o: DeclNodes.inc.h Breakpoint.o: DiagnosticCommonKinds.inc.h -Breakpoint.o: StmtNodes.inc.h -Breakpoint.po: CommentCommandList.inc.h -Breakpoint.po: DeclNodes.inc.h Breakpoint.po: DiagnosticCommonKinds.inc.h -Breakpoint.po: StmtNodes.inc.h -BreakpointIDList.o: DiagnosticCommonKinds.inc.h -BreakpointIDList.po: DiagnosticCommonKinds.inc.h -BreakpointList.o: DiagnosticCommonKinds.inc.h -BreakpointList.po: DiagnosticCommonKinds.inc.h -BreakpointLocation.o: AttrList.inc.h -BreakpointLocation.o: Attrs.inc.h -BreakpointLocation.o: CommentCommandList.inc.h -BreakpointLocation.o: DeclNodes.inc.h BreakpointLocation.o: DiagnosticCommonKinds.inc.h -BreakpointLocation.o: StmtNodes.inc.h -BreakpointLocation.po: AttrList.inc.h -BreakpointLocation.po: Attrs.inc.h -BreakpointLocation.po: CommentCommandList.inc.h -BreakpointLocation.po: DeclNodes.inc.h BreakpointLocation.po: DiagnosticCommonKinds.inc.h -BreakpointLocation.po: StmtNodes.inc.h -BreakpointLocationCollection.o: DiagnosticCommonKinds.inc.h -BreakpointLocationCollection.po: DiagnosticCommonKinds.inc.h -BreakpointLocationList.o: CommentCommandList.inc.h -BreakpointLocationList.o: DeclNodes.inc.h -BreakpointLocationList.o: DiagnosticCommonKinds.inc.h -BreakpointLocationList.o: StmtNodes.inc.h -BreakpointLocationList.po: CommentCommandList.inc.h -BreakpointLocationList.po: DeclNodes.inc.h -BreakpointLocationList.po: DiagnosticCommonKinds.inc.h -BreakpointLocationList.po: StmtNodes.inc.h BreakpointOptions.o: DiagnosticCommonKinds.inc.h BreakpointOptions.po: DiagnosticCommonKinds.inc.h BreakpointResolver.o: DiagnosticCommonKinds.inc.h BreakpointResolver.po: DiagnosticCommonKinds.inc.h -BreakpointResolverAddress.o: DiagnosticCommonKinds.inc.h -BreakpointResolverAddress.po: DiagnosticCommonKinds.inc.h -BreakpointResolverFileLine.o: CommentCommandList.inc.h -BreakpointResolverFileLine.o: DeclNodes.inc.h BreakpointResolverFileLine.o: DiagnosticCommonKinds.inc.h -BreakpointResolverFileLine.o: StmtNodes.inc.h -BreakpointResolverFileLine.po: CommentCommandList.inc.h -BreakpointResolverFileLine.po: DeclNodes.inc.h BreakpointResolverFileLine.po: DiagnosticCommonKinds.inc.h -BreakpointResolverFileLine.po: StmtNodes.inc.h BreakpointResolverFileRegex.o: DiagnosticCommonKinds.inc.h BreakpointResolverFileRegex.po: DiagnosticCommonKinds.inc.h -BreakpointResolverName.o: CommentCommandList.inc.h -BreakpointResolverName.o: DeclNodes.inc.h BreakpointResolverName.o: DiagnosticCommonKinds.inc.h -BreakpointResolverName.o: StmtNodes.inc.h -BreakpointResolverName.po: CommentCommandList.inc.h -BreakpointResolverName.po: DeclNodes.inc.h BreakpointResolverName.po: DiagnosticCommonKinds.inc.h -BreakpointResolverName.po: StmtNodes.inc.h -BreakpointSite.o: DiagnosticCommonKinds.inc.h -BreakpointSite.po: DiagnosticCommonKinds.inc.h Watchpoint.o: CommentCommandList.inc.h Watchpoint.o: DeclNodes.inc.h Watchpoint.o: DiagnosticCommonKinds.inc.h Modified: head/lib/clang/liblldbCommands/Makefile.depend ============================================================================== --- head/lib/clang/liblldbCommands/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) +++ head/lib/clang/liblldbCommands/Makefile.depend Tue Dec 1 05:23:19 2015 (r291563) @@ -13,102 +13,22 @@ DIRDEPS = \ .if ${DEP_RELDIR} == ${_DEP_RELDIR} # local dependencies - needed for -jN in clean tree -CommandCompletions.o: AttrList.inc.h -CommandCompletions.o: Attrs.inc.h -CommandCompletions.o: CommentCommandList.inc.h -CommandCompletions.o: DeclNodes.inc.h CommandCompletions.o: DiagnosticCommonKinds.inc.h -CommandCompletions.o: StmtNodes.inc.h -CommandCompletions.po: AttrList.inc.h -CommandCompletions.po: Attrs.inc.h -CommandCompletions.po: CommentCommandList.inc.h -CommandCompletions.po: DeclNodes.inc.h CommandCompletions.po: DiagnosticCommonKinds.inc.h -CommandCompletions.po: StmtNodes.inc.h -CommandObjectApropos.o: AttrList.inc.h -CommandObjectApropos.o: Attrs.inc.h -CommandObjectApropos.o: CommentCommandList.inc.h -CommandObjectApropos.o: DeclNodes.inc.h -CommandObjectApropos.o: DiagnosticCommonKinds.inc.h -CommandObjectApropos.o: StmtNodes.inc.h -CommandObjectApropos.po: AttrList.inc.h -CommandObjectApropos.po: Attrs.inc.h -CommandObjectApropos.po: CommentCommandList.inc.h -CommandObjectApropos.po: DeclNodes.inc.h -CommandObjectApropos.po: DiagnosticCommonKinds.inc.h -CommandObjectApropos.po: StmtNodes.inc.h -CommandObjectArgs.o: AttrList.inc.h -CommandObjectArgs.o: Attrs.inc.h CommandObjectArgs.o: CommentCommandList.inc.h CommandObjectArgs.o: DeclNodes.inc.h CommandObjectArgs.o: DiagnosticCommonKinds.inc.h CommandObjectArgs.o: StmtNodes.inc.h -CommandObjectArgs.po: AttrList.inc.h -CommandObjectArgs.po: Attrs.inc.h CommandObjectArgs.po: CommentCommandList.inc.h CommandObjectArgs.po: DeclNodes.inc.h CommandObjectArgs.po: DiagnosticCommonKinds.inc.h CommandObjectArgs.po: StmtNodes.inc.h -CommandObjectBreakpoint.o: AttrList.inc.h -CommandObjectBreakpoint.o: Attrs.inc.h -CommandObjectBreakpoint.o: CommentCommandList.inc.h -CommandObjectBreakpoint.o: DeclNodes.inc.h CommandObjectBreakpoint.o: DiagnosticCommonKinds.inc.h -CommandObjectBreakpoint.o: StmtNodes.inc.h -CommandObjectBreakpoint.po: AttrList.inc.h -CommandObjectBreakpoint.po: Attrs.inc.h -CommandObjectBreakpoint.po: CommentCommandList.inc.h -CommandObjectBreakpoint.po: DeclNodes.inc.h CommandObjectBreakpoint.po: DiagnosticCommonKinds.inc.h -CommandObjectBreakpoint.po: StmtNodes.inc.h -CommandObjectBreakpointCommand.o: AttrList.inc.h -CommandObjectBreakpointCommand.o: Attrs.inc.h -CommandObjectBreakpointCommand.o: CommentCommandList.inc.h -CommandObjectBreakpointCommand.o: DeclNodes.inc.h -CommandObjectBreakpointCommand.o: DiagnosticCommonKinds.inc.h -CommandObjectBreakpointCommand.o: StmtNodes.inc.h -CommandObjectBreakpointCommand.po: AttrList.inc.h -CommandObjectBreakpointCommand.po: Attrs.inc.h -CommandObjectBreakpointCommand.po: CommentCommandList.inc.h -CommandObjectBreakpointCommand.po: DeclNodes.inc.h -CommandObjectBreakpointCommand.po: DiagnosticCommonKinds.inc.h -CommandObjectBreakpointCommand.po: StmtNodes.inc.h -CommandObjectCommands.o: AttrList.inc.h -CommandObjectCommands.o: Attrs.inc.h -CommandObjectCommands.o: CommentCommandList.inc.h -CommandObjectCommands.o: DeclNodes.inc.h -CommandObjectCommands.o: DiagnosticCommonKinds.inc.h -CommandObjectCommands.o: StmtNodes.inc.h -CommandObjectCommands.po: AttrList.inc.h -CommandObjectCommands.po: Attrs.inc.h -CommandObjectCommands.po: CommentCommandList.inc.h -CommandObjectCommands.po: DeclNodes.inc.h -CommandObjectCommands.po: DiagnosticCommonKinds.inc.h -CommandObjectCommands.po: StmtNodes.inc.h -CommandObjectDisassemble.o: AttrList.inc.h -CommandObjectDisassemble.o: Attrs.inc.h -CommandObjectDisassemble.o: CommentCommandList.inc.h -CommandObjectDisassemble.o: DeclNodes.inc.h CommandObjectDisassemble.o: DiagnosticCommonKinds.inc.h -CommandObjectDisassemble.o: StmtNodes.inc.h -CommandObjectDisassemble.po: AttrList.inc.h -CommandObjectDisassemble.po: Attrs.inc.h -CommandObjectDisassemble.po: CommentCommandList.inc.h -CommandObjectDisassemble.po: DeclNodes.inc.h CommandObjectDisassemble.po: DiagnosticCommonKinds.inc.h -CommandObjectDisassemble.po: StmtNodes.inc.h -CommandObjectExpression.o: AttrList.inc.h -CommandObjectExpression.o: Attrs.inc.h -CommandObjectExpression.o: CommentCommandList.inc.h -CommandObjectExpression.o: DeclNodes.inc.h CommandObjectExpression.o: DiagnosticCommonKinds.inc.h -CommandObjectExpression.o: StmtNodes.inc.h -CommandObjectExpression.po: AttrList.inc.h -CommandObjectExpression.po: Attrs.inc.h -CommandObjectExpression.po: CommentCommandList.inc.h -CommandObjectExpression.po: DeclNodes.inc.h CommandObjectExpression.po: DiagnosticCommonKinds.inc.h -CommandObjectExpression.po: StmtNodes.inc.h CommandObjectFrame.o: AttrList.inc.h CommandObjectFrame.o: Attrs.inc.h CommandObjectFrame.o: CommentCommandList.inc.h @@ -121,186 +41,20 @@ CommandObjectFrame.po: CommentCommandLis CommandObjectFrame.po: DeclNodes.inc.h CommandObjectFrame.po: DiagnosticCommonKinds.inc.h CommandObjectFrame.po: StmtNodes.inc.h -CommandObjectGUI.o: AttrList.inc.h -CommandObjectGUI.o: Attrs.inc.h -CommandObjectGUI.o: CommentCommandList.inc.h -CommandObjectGUI.o: DeclNodes.inc.h -CommandObjectGUI.o: DiagnosticCommonKinds.inc.h -CommandObjectGUI.o: StmtNodes.inc.h -CommandObjectGUI.po: AttrList.inc.h -CommandObjectGUI.po: Attrs.inc.h -CommandObjectGUI.po: CommentCommandList.inc.h -CommandObjectGUI.po: DeclNodes.inc.h -CommandObjectGUI.po: DiagnosticCommonKinds.inc.h -CommandObjectGUI.po: StmtNodes.inc.h -CommandObjectHelp.o: AttrList.inc.h -CommandObjectHelp.o: Attrs.inc.h -CommandObjectHelp.o: CommentCommandList.inc.h -CommandObjectHelp.o: DeclNodes.inc.h -CommandObjectHelp.o: DiagnosticCommonKinds.inc.h -CommandObjectHelp.o: StmtNodes.inc.h -CommandObjectHelp.po: AttrList.inc.h -CommandObjectHelp.po: Attrs.inc.h -CommandObjectHelp.po: CommentCommandList.inc.h -CommandObjectHelp.po: DeclNodes.inc.h -CommandObjectHelp.po: DiagnosticCommonKinds.inc.h -CommandObjectHelp.po: StmtNodes.inc.h -CommandObjectLog.o: AttrList.inc.h -CommandObjectLog.o: Attrs.inc.h -CommandObjectLog.o: CommentCommandList.inc.h -CommandObjectLog.o: DeclNodes.inc.h +CommandObjectLanguage.o: DiagnosticCommonKinds.inc.h +CommandObjectLanguage.po: DiagnosticCommonKinds.inc.h CommandObjectLog.o: DiagnosticCommonKinds.inc.h -CommandObjectLog.o: StmtNodes.inc.h -CommandObjectLog.po: AttrList.inc.h -CommandObjectLog.po: Attrs.inc.h -CommandObjectLog.po: CommentCommandList.inc.h -CommandObjectLog.po: DeclNodes.inc.h CommandObjectLog.po: DiagnosticCommonKinds.inc.h -CommandObjectLog.po: StmtNodes.inc.h -CommandObjectMemory.o: AttrList.inc.h -CommandObjectMemory.o: Attrs.inc.h -CommandObjectMemory.o: CommentCommandList.inc.h CommandObjectMemory.o: DeclNodes.inc.h CommandObjectMemory.o: DiagnosticCommonKinds.inc.h -CommandObjectMemory.o: StmtNodes.inc.h -CommandObjectMemory.po: AttrList.inc.h -CommandObjectMemory.po: Attrs.inc.h -CommandObjectMemory.po: CommentCommandList.inc.h CommandObjectMemory.po: DeclNodes.inc.h CommandObjectMemory.po: DiagnosticCommonKinds.inc.h -CommandObjectMemory.po: StmtNodes.inc.h -CommandObjectMultiword.o: AttrList.inc.h -CommandObjectMultiword.o: Attrs.inc.h -CommandObjectMultiword.o: CommentCommandList.inc.h -CommandObjectMultiword.o: DeclNodes.inc.h -CommandObjectMultiword.o: DiagnosticCommonKinds.inc.h -CommandObjectMultiword.o: StmtNodes.inc.h -CommandObjectMultiword.po: AttrList.inc.h -CommandObjectMultiword.po: Attrs.inc.h -CommandObjectMultiword.po: CommentCommandList.inc.h -CommandObjectMultiword.po: DeclNodes.inc.h -CommandObjectMultiword.po: DiagnosticCommonKinds.inc.h -CommandObjectMultiword.po: StmtNodes.inc.h -CommandObjectPlatform.o: AttrList.inc.h -CommandObjectPlatform.o: Attrs.inc.h -CommandObjectPlatform.o: CommentCommandList.inc.h -CommandObjectPlatform.o: DeclNodes.inc.h -CommandObjectPlatform.o: DiagnosticCommonKinds.inc.h -CommandObjectPlatform.o: StmtNodes.inc.h -CommandObjectPlatform.po: AttrList.inc.h -CommandObjectPlatform.po: Attrs.inc.h -CommandObjectPlatform.po: CommentCommandList.inc.h -CommandObjectPlatform.po: DeclNodes.inc.h -CommandObjectPlatform.po: DiagnosticCommonKinds.inc.h -CommandObjectPlatform.po: StmtNodes.inc.h -CommandObjectPlugin.o: AttrList.inc.h -CommandObjectPlugin.o: Attrs.inc.h -CommandObjectPlugin.o: CommentCommandList.inc.h -CommandObjectPlugin.o: DeclNodes.inc.h -CommandObjectPlugin.o: DiagnosticCommonKinds.inc.h -CommandObjectPlugin.o: StmtNodes.inc.h -CommandObjectPlugin.po: AttrList.inc.h -CommandObjectPlugin.po: Attrs.inc.h -CommandObjectPlugin.po: CommentCommandList.inc.h -CommandObjectPlugin.po: DeclNodes.inc.h -CommandObjectPlugin.po: DiagnosticCommonKinds.inc.h -CommandObjectPlugin.po: StmtNodes.inc.h -CommandObjectProcess.o: AttrList.inc.h -CommandObjectProcess.o: Attrs.inc.h -CommandObjectProcess.o: CommentCommandList.inc.h -CommandObjectProcess.o: DeclNodes.inc.h -CommandObjectProcess.o: DiagnosticCommonKinds.inc.h -CommandObjectProcess.o: StmtNodes.inc.h -CommandObjectProcess.po: AttrList.inc.h -CommandObjectProcess.po: Attrs.inc.h -CommandObjectProcess.po: CommentCommandList.inc.h -CommandObjectProcess.po: DeclNodes.inc.h -CommandObjectProcess.po: DiagnosticCommonKinds.inc.h -CommandObjectProcess.po: StmtNodes.inc.h -CommandObjectQuit.o: AttrList.inc.h -CommandObjectQuit.o: Attrs.inc.h -CommandObjectQuit.o: CommentCommandList.inc.h -CommandObjectQuit.o: DeclNodes.inc.h -CommandObjectQuit.o: DiagnosticCommonKinds.inc.h -CommandObjectQuit.o: StmtNodes.inc.h -CommandObjectQuit.po: AttrList.inc.h -CommandObjectQuit.po: Attrs.inc.h -CommandObjectQuit.po: CommentCommandList.inc.h -CommandObjectQuit.po: DeclNodes.inc.h -CommandObjectQuit.po: DiagnosticCommonKinds.inc.h -CommandObjectQuit.po: StmtNodes.inc.h -CommandObjectRegister.o: AttrList.inc.h -CommandObjectRegister.o: Attrs.inc.h -CommandObjectRegister.o: CommentCommandList.inc.h -CommandObjectRegister.o: DeclNodes.inc.h -CommandObjectRegister.o: DiagnosticCommonKinds.inc.h -CommandObjectRegister.o: StmtNodes.inc.h -CommandObjectRegister.po: AttrList.inc.h -CommandObjectRegister.po: Attrs.inc.h -CommandObjectRegister.po: CommentCommandList.inc.h -CommandObjectRegister.po: DeclNodes.inc.h -CommandObjectRegister.po: DiagnosticCommonKinds.inc.h -CommandObjectRegister.po: StmtNodes.inc.h -CommandObjectSettings.o: AttrList.inc.h -CommandObjectSettings.o: Attrs.inc.h -CommandObjectSettings.o: CommentCommandList.inc.h -CommandObjectSettings.o: DeclNodes.inc.h -CommandObjectSettings.o: DiagnosticCommonKinds.inc.h -CommandObjectSettings.o: StmtNodes.inc.h -CommandObjectSettings.po: AttrList.inc.h -CommandObjectSettings.po: Attrs.inc.h -CommandObjectSettings.po: CommentCommandList.inc.h -CommandObjectSettings.po: DeclNodes.inc.h -CommandObjectSettings.po: DiagnosticCommonKinds.inc.h -CommandObjectSettings.po: StmtNodes.inc.h -CommandObjectSource.o: AttrList.inc.h -CommandObjectSource.o: Attrs.inc.h -CommandObjectSource.o: CommentCommandList.inc.h -CommandObjectSource.o: DeclNodes.inc.h CommandObjectSource.o: DiagnosticCommonKinds.inc.h -CommandObjectSource.o: StmtNodes.inc.h -CommandObjectSource.po: AttrList.inc.h -CommandObjectSource.po: Attrs.inc.h -CommandObjectSource.po: CommentCommandList.inc.h -CommandObjectSource.po: DeclNodes.inc.h CommandObjectSource.po: DiagnosticCommonKinds.inc.h -CommandObjectSource.po: StmtNodes.inc.h -CommandObjectSyntax.o: AttrList.inc.h -CommandObjectSyntax.o: Attrs.inc.h -CommandObjectSyntax.o: CommentCommandList.inc.h -CommandObjectSyntax.o: DeclNodes.inc.h -CommandObjectSyntax.o: DiagnosticCommonKinds.inc.h -CommandObjectSyntax.o: StmtNodes.inc.h -CommandObjectSyntax.po: AttrList.inc.h -CommandObjectSyntax.po: Attrs.inc.h -CommandObjectSyntax.po: CommentCommandList.inc.h -CommandObjectSyntax.po: DeclNodes.inc.h -CommandObjectSyntax.po: DiagnosticCommonKinds.inc.h -CommandObjectSyntax.po: StmtNodes.inc.h -CommandObjectTarget.o: AttrList.inc.h -CommandObjectTarget.o: Attrs.inc.h -CommandObjectTarget.o: CommentCommandList.inc.h -CommandObjectTarget.o: DeclNodes.inc.h *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Dec 1 05:59:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E479A3EBAC; Tue, 1 Dec 2015 05:59:55 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBEEB198F; Tue, 1 Dec 2015 05:59:54 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB15xrVB020665; Tue, 1 Dec 2015 05:59:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB15xrrx020664; Tue, 1 Dec 2015 05:59:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512010559.tB15xrrx020664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 05:59:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291565 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 05:59:55 -0000 Author: ngie Date: Tue Dec 1 05:59:53 2015 New Revision: 291565 URL: https://svnweb.freebsd.org/changeset/base/291565 Log: Fix LINT-NOIP kernels after r291467 rn is only used if INET or INET6 are defined Sponsored by: EMC / Isilon Storage Division Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Tue Dec 1 05:29:30 2015 (r291564) +++ head/sys/net/route.c Tue Dec 1 05:59:53 2015 (r291565) @@ -1369,7 +1369,9 @@ rt_mpath_unlink(struct radix_node_head * static struct rtentry * rt_flowtable_check_route(struct radix_node_head *rnh, struct rt_addrinfo *info) { +#if defined(INET6) || defined(INET) struct radix_node *rn; +#endif struct rtentry *rt0; rt0 = NULL; From owner-svn-src-all@freebsd.org Tue Dec 1 06:06:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29136A3E348; Tue, 1 Dec 2015 06:06:41 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from forward15h.cmail.yandex.net (forward15h.cmail.yandex.net [IPv6:2a02:6b8:0:f35::a0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Certum Level IV CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8DE41D42; Tue, 1 Dec 2015 06:06:40 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from web10h.yandex.ru (web10h.yandex.ru [IPv6:2a02:6b8:0:f05::20]) by forward15h.cmail.yandex.net (Yandex) with ESMTP id EF7D720EC1; Tue, 1 Dec 2015 09:06:36 +0300 (MSK) Received: from 127.0.0.1 (localhost [127.0.0.1]) by web10h.yandex.ru (Yandex) with ESMTP id 1579C1000403; Tue, 1 Dec 2015 09:06:35 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfw.ru; s=mail; t=1448949996; bh=RNGdaDT++Zc1Vh20BZcyXsll8C27YciMQEmZFdlVzUs=; h=From:To:In-Reply-To:References:Subject:Date; b=LdtX5bbZ2UjTbGJaV9RuUtRCVqMEcmX4XoDOXoh7ktLYOpxMaM6FpMXSwxgBENTVJ EZFmfLUOCblrZIvhY0ijnVIjctY9J1ziuD9ThcNl58XRa/jBo7YFbjtRByZyfj7P0o Hl45BVHzs9ILSXMano8qIEHD7yp5mkofYFRiL43c= Received: by web10h.yandex.ru with HTTP; Tue, 01 Dec 2015 09:06:35 +0300 From: Alexander V. Chernikov To: Garrett Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" In-Reply-To: <201512010559.tB15xrrx020664@repo.freebsd.org> References: null <201512010559.tB15xrrx020664@repo.freebsd.org> Subject: Re: svn commit: r291565 - head/sys/net MIME-Version: 1.0 Message-Id: <3845521448949995@web10h.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Tue, 01 Dec 2015 09:06:35 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 06:06:41 -0000 Thanks, I missed that part :( 01.12.2015, 09:00, "Garrett Cooper" : > Author: ngie > Date: Tue Dec 1 05:59:53 2015 > New Revision: 291565 > URL: https://svnweb.freebsd.org/changeset/base/291565 > > Log: > ššFix LINT-NOIP kernels after r291467 > > ššrn is only used if INET or INET6 are defined > > ššSponsored by: EMC / Isilon Storage Division > > Modified: > ššhead/sys/net/route.c > > Modified: head/sys/net/route.c > ============================================================================== > --- head/sys/net/route.c Tue Dec 1 05:29:30 2015 (r291564) > +++ head/sys/net/route.c Tue Dec 1 05:59:53 2015 (r291565) > @@ -1369,7 +1369,9 @@ rt_mpath_unlink(struct radix_node_head * > šstatic struct rtentry * > šrt_flowtable_check_route(struct radix_node_head *rnh, struct rt_addrinfo *info) > š{ > +#if defined(INET6) || defined(INET) > šššššššššstruct radix_node *rn; > +#endif > šššššššššstruct rtentry *rt0; > > šššššššššrt0 = NULL; From owner-svn-src-all@freebsd.org Tue Dec 1 06:24:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EACEA3E8D2; Tue, 1 Dec 2015 06:24:28 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x22a.google.com (mail-pa0-x22a.google.com [IPv6:2607:f8b0:400e:c03::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E48501AEE; Tue, 1 Dec 2015 06:24:27 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pacdm15 with SMTP id dm15so211206037pac.3; Mon, 30 Nov 2015 22:24:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=UVJqd7VcvU1lZ8I2vH+hwGK8Z2YLLb19t1njGAbgCEE=; b=Aj8A/8Db08v9h5ITr3hzlT5svEFw1pasEsbv+Y13IXCC7NZSnCqGPxvWhjU5CUXdFH eSx5c74OwFQl28cfBf29SK0sDUkgr7jv+jZBjBeLOmhlww3raTIsCyzpAiF71zEJJGvU cCoa/4kevcGri5AdPsVjpT1lrdQn9jpyAXXCWxIKE0zRJY5qYsCkEw9LsPhroflLDI/Z k1jmum3mk8ESDNt8B2zPm/K5GxEL97U3/jxL9Y4ER6pCZjfH0IOJ9kQ1MNHBkG9eu1o2 qXH6149zdrid7gZ2XQQUEydVLOsgxkNC8M/xBCU86g6ek/zb7uMtfTNRMPkql/uJQ/dq mixQ== X-Received: by 10.98.72.18 with SMTP id v18mr76975057pfa.68.1448951067592; Mon, 30 Nov 2015 22:24:27 -0800 (PST) Received: from [192.168.20.7] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id x79sm55142526pfi.47.2015.11.30.22.24.25 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Nov 2015 22:24:26 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r290840 - head/etc From: NGie Cooper In-Reply-To: <565CB930.2060504@FreeBSD.org> Date: Mon, 30 Nov 2015 22:24:24 -0800 Cc: Ian Lepore , Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, gjb@FreeBSD.org Content-Transfer-Encoding: quoted-printable Message-Id: <59366F9C-0F8C-4B19-A197-32BC8B86DFA4@gmail.com> References: <201511150304.tAF34dD2062713@repo.freebsd.org> <1447597638.1254.16.camel@freebsd.org> <565CB930.2060504@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 06:24:28 -0000 > On Nov 30, 2015, at 13:01, Bryan Drewery wrote: =85 > I have concerns this may break the install image that re@ (or other > parties) produce as well since it may have a broken /sys link if not > built from /usr/src. >=20 > Looking at the freebsd-update kernel I see > "root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC" which = means > that the freebsd-upate one should be fine. Not sure about other = images. >=20 > In general I think this is wrong. For meta mode staging I am tempted = to > disable this, but that's no different than non-meta mode really for > images. I don't like the symlink at all, but having it point to = usr/src > is at least only 1 symlink that needs to be setup to fix all = assumptions > (usr/src -> /real/src), rather than now having up to 2 symlinks that > need fixing. I mulled over the change and I agree that the risks outweigh the benefit = (as annoying as it seems to folks like me), so I reverted it in r291568. = I can script /sys install as needed for my environment. Thanks, -NGie= From owner-svn-src-all@freebsd.org Tue Dec 1 06:09:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13B07A3E638; Tue, 1 Dec 2015 06:09:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D193E1E61; Tue, 1 Dec 2015 06:09:23 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB169MP2023578; Tue, 1 Dec 2015 06:09:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB169MJH023576; Tue, 1 Dec 2015 06:09:22 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512010609.tB169MJH023576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 06:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291566 - in head: . lib/libelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 06:09:24 -0000 Author: ngie Date: Tue Dec 1 06:09:22 2015 New Revision: 291566 URL: https://svnweb.freebsd.org/changeset/base/291566 Log: Move libelf.so.2 from /usr/lib to /lib to unbreak libkvm use after r291406 Tested with the following commands as root: - yes | make delete-old - service ldconfig restart - netstat -nr X-MFC with: r291406 Reviewed by: jhb, kib Sponsored by: EMC / Isilon Storage Division Modified: head/ObsoleteFiles.inc head/lib/libelf/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 1 05:59:53 2015 (r291565) +++ head/ObsoleteFiles.inc Tue Dec 1 06:09:22 2015 (r291566) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406) +OLD_FILES+=usr/lib/libelf.so.2 # 20151115: Fox bad upgrade scheme OLD_FILES+=usr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030 OLD_FILES+=usr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312 Modified: head/lib/libelf/Makefile ============================================================================== --- head/lib/libelf/Makefile Tue Dec 1 05:59:53 2015 (r291565) +++ head/lib/libelf/Makefile Tue Dec 1 06:09:22 2015 (r291566) @@ -7,6 +7,7 @@ SRCDIR= ${TOP}/libelf .PATH: ${SRCDIR} LIB= elf +SHLIBDIR?= /lib SRCS= elf.c \ elf_begin.c \ From owner-svn-src-all@freebsd.org Tue Dec 1 06:23:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2D22A3E77F; Tue, 1 Dec 2015 06:23:16 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C62C19BE; Tue, 1 Dec 2015 06:23:16 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB16NF4X029422; Tue, 1 Dec 2015 06:23:15 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB16NFWr029421; Tue, 1 Dec 2015 06:23:15 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512010623.tB16NFWr029421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 1 Dec 2015 06:23:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291569 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 06:23:16 -0000 Author: arybchik Date: Tue Dec 1 06:23:15 2015 New Revision: 291569 URL: https://svnweb.freebsd.org/changeset/base/291569 Log: sfxge: avoid TSO packets collapses if packet header uses 2 segments It is really observed in the case of VLAN over sfxge interface. Also this change makes total value equal to 35 which is default assumed by the kernel for if_hw_tsomaxsegcount. Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4319 Modified: head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Tue Dec 1 06:22:27 2015 (r291568) +++ head/sys/dev/sfxge/sfxge_tx.h Tue Dec 1 06:23:15 2015 (r291569) @@ -53,11 +53,13 @@ * TSO, the mbuf length may be just over 64K, divided into 2K mbuf * clusters taking into account that the first may be not 2K cluster * boundary aligned. + * Packet header may be split into two segments because of, for example, + * VLAN header insertion. * The chain could be longer than this initially, but can be shortened * with m_collapse(). */ #define SFXGE_TX_MAPPING_MAX_SEG \ - (1 + howmany(SFXGE_TSO_MAX_SIZE, MCLBYTES) + 1) + (2 + howmany(SFXGE_TSO_MAX_SIZE, MCLBYTES) + 1) /* * Buffer mapping flags. From owner-svn-src-all@freebsd.org Tue Dec 1 05:22:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2496DA3E07C; Tue, 1 Dec 2015 05:22:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F403E1E93; Tue, 1 Dec 2015 05:22:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB15MBD4009641; Tue, 1 Dec 2015 05:22:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB15MAEI009636; Tue, 1 Dec 2015 05:22:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512010522.tB15MAEI009636@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 05:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291562 - in head: cddl/usr.bin/ctfconvert cddl/usr.bin/ctfdump cddl/usr.bin/ctfmerge cddl/usr.sbin/dtrace targets/pseudo/userland/cddl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 05:22:12 -0000 Author: bdrewery Date: Tue Dec 1 05:22:10 2015 New Revision: 291562 URL: https://svnweb.freebsd.org/changeset/base/291562 Log: META MODE: Fix userland/cddl. MK_CTF controls whether ctfmerge is ran against the binaries, not whether CTF tools should be built. Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/usr.bin/ctfconvert/Makefile.depend head/cddl/usr.bin/ctfdump/Makefile.depend head/cddl/usr.bin/ctfmerge/Makefile.depend head/cddl/usr.sbin/dtrace/Makefile.depend head/targets/pseudo/userland/cddl/Makefile.depend Modified: head/cddl/usr.bin/ctfconvert/Makefile.depend ============================================================================== --- head/cddl/usr.bin/ctfconvert/Makefile.depend Tue Dec 1 05:19:02 2015 (r291561) +++ head/cddl/usr.bin/ctfconvert/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) @@ -2,14 +2,12 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - cddl/lib/libctf \ gnu/lib/csu \ gnu/lib/libgcc \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libc_nonshared \ lib/libcompiler_rt \ lib/libdwarf \ lib/libelf \ Modified: head/cddl/usr.bin/ctfdump/Makefile.depend ============================================================================== --- head/cddl/usr.bin/ctfdump/Makefile.depend Tue Dec 1 05:19:02 2015 (r291561) +++ head/cddl/usr.bin/ctfdump/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) @@ -8,10 +8,8 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libc_nonshared \ lib/libcompiler_rt \ lib/libelf \ - lib/libthr \ lib/libz \ Modified: head/cddl/usr.bin/ctfmerge/Makefile.depend ============================================================================== --- head/cddl/usr.bin/ctfmerge/Makefile.depend Tue Dec 1 05:19:02 2015 (r291561) +++ head/cddl/usr.bin/ctfmerge/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) @@ -2,16 +2,13 @@ # Autogenerated - do NOT edit! DIRDEPS = \ - cddl/lib/libctf \ gnu/lib/csu \ gnu/lib/libgcc \ include \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libc_nonshared \ lib/libcompiler_rt \ - lib/libdwarf \ lib/libelf \ lib/libthr \ lib/libz \ Modified: head/cddl/usr.sbin/dtrace/Makefile.depend ============================================================================== --- head/cddl/usr.sbin/dtrace/Makefile.depend Tue Dec 1 05:19:02 2015 (r291561) +++ head/cddl/usr.sbin/dtrace/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) @@ -10,7 +10,6 @@ DIRDEPS = \ include/xlocale \ lib/${CSU_DIR} \ lib/libc \ - lib/libc_nonshared \ lib/libcompiler_rt \ lib/libcxxrt \ lib/libelf \ @@ -18,9 +17,7 @@ DIRDEPS = \ lib/librtld_db \ lib/libthr \ lib/libutil \ - lib/liby \ lib/libz \ - usr.bin/lex/lib \ .include Modified: head/targets/pseudo/userland/cddl/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/cddl/Makefile.depend Tue Dec 1 05:19:02 2015 (r291561) +++ head/targets/pseudo/userland/cddl/Makefile.depend Tue Dec 1 05:22:10 2015 (r291562) @@ -9,19 +9,17 @@ DIRDEPS = \ cddl/lib/drti \ cddl/lib/libavl \ + cddl/lib/libctf \ + cddl/lib/libdtrace \ cddl/lib/libnvpair \ cddl/lib/libumem \ cddl/lib/libuutil \ - - -DIRDEPS.CTF = \ - cddl/lib/libctf \ cddl/usr.bin/ctfconvert \ cddl/usr.bin/ctfdump \ cddl/usr.bin/ctfmerge \ - cddl/lib/libdtrace \ cddl/usr.sbin/dtrace \ cddl/usr.sbin/dtruss \ + cddl/usr.sbin/lockstat \ DIRDEPS.ZFS = \ @@ -33,12 +31,11 @@ DIRDEPS.ZFS = \ cddl/usr.bin/zinject \ cddl/usr.bin/zstreamdump \ cddl/usr.bin/ztest \ - cddl/usr.sbin/lockstat \ cddl/usr.sbin/zdb \ cddl/usr.sbin/zhack \ -.for O in CTF ZFS +.for O in ZFS .if ${MK_$O} == "yes" DIRDEPS+= ${DIRDEPS.$O} .endif From owner-svn-src-all@freebsd.org Tue Dec 1 06:11:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCD33A3E91A; Tue, 1 Dec 2015 06:11:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 893061FC1; Tue, 1 Dec 2015 06:11:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB16B96g023713; Tue, 1 Dec 2015 06:11:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB16B9Fx023712; Tue, 1 Dec 2015 06:11:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201512010611.tB16B9Fx023712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 1 Dec 2015 06:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291567 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 06:11:10 -0000 Author: adrian Date: Tue Dec 1 06:11:09 2015 New Revision: 291567 URL: https://svnweb.freebsd.org/changeset/base/291567 Log: Adjust a comment; we now support these embedded boards! Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h Tue Dec 1 06:09:22 2015 (r291566) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h Tue Dec 1 06:11:09 2015 (r291567) @@ -51,7 +51,7 @@ #define AH_SUPPORT_POSEIDON 1 #define AH_SUPPORT_AR9300 1 -/* These are the embedded boards; we don't currently support these */ +/* These are the embedded boards */ #ifdef AH_SUPPORT_AR9330 #define AH_SUPPORT_HORNET 1 #endif /* AH_SUPPORT_AR9330 */ From owner-svn-src-all@freebsd.org Tue Dec 1 06:22:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E978A3E689; Tue, 1 Dec 2015 06:22:29 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2A3918A3; Tue, 1 Dec 2015 06:22:28 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB16MR4h029331; Tue, 1 Dec 2015 06:22:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB16MRwa029330; Tue, 1 Dec 2015 06:22:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512010622.tB16MRwa029330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 06:22:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291568 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 06:22:29 -0000 Author: ngie Date: Tue Dec 1 06:22:27 2015 New Revision: 291568 URL: https://svnweb.freebsd.org/changeset/base/291568 Log: Revert r290840 This request by the submitter was valid, but unfortunately there is a good deal of concern over breakage when DESTDIR != / or "", i.e. with release media. Making this change correct for all cases would make it markedly more complex than need be Requested by: bdrewery, ian, imp PR: 76362 Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Tue Dec 1 06:11:09 2015 (r291567) +++ head/etc/Makefile Tue Dec 1 06:22:27 2015 (r291568) @@ -408,7 +408,7 @@ distrib-dirs: ${MTREES:N/*} distrib-clea ${METALOG.add} ; \ done; true .endif - ${INSTALL_SYMLINK} ${SRCTOP:C/^\///}/sys ${DESTDIR}/sys + ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys .if ${MK_MAN} != "no" cd ${DESTDIR}${SHAREDIR}/man; \ for mandir in man*; do \ From owner-svn-src-all@freebsd.org Tue Dec 1 06:29:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D9C1A3EDCA; Tue, 1 Dec 2015 06:29:13 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FFE51C70; Tue, 1 Dec 2015 06:29:13 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB16TCtT029663; Tue, 1 Dec 2015 06:29:12 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB16TCCf029662; Tue, 1 Dec 2015 06:29:12 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512010629.tB16TCCf029662@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 1 Dec 2015 06:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291570 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 06:29:13 -0000 Author: arybchik Date: Tue Dec 1 06:29:11 2015 New Revision: 291570 URL: https://svnweb.freebsd.org/changeset/base/291570 Log: sfxge: added setting TSO-related parameters Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4308 Modified: head/sys/dev/sfxge/sfxge.c Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Tue Dec 1 06:23:15 2015 (r291569) +++ head/sys/dev/sfxge/sfxge.c Tue Dec 1 06:29:11 2015 (r291570) @@ -538,6 +538,9 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ifp->if_capabilities = SFXGE_CAP; ifp->if_capenable = SFXGE_CAP_ENABLE; + ifp->if_hw_tsomax = SFXGE_TSO_MAX_SIZE; + ifp->if_hw_tsomaxsegcount = SFXGE_TX_MAPPING_MAX_SEG; + ifp->if_hw_tsomaxsegsize = PAGE_SIZE; #ifdef SFXGE_LRO ifp->if_capabilities |= IFCAP_LRO; From owner-svn-src-all@freebsd.org Tue Dec 1 06:52:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31991A3E887; Tue, 1 Dec 2015 06:52:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 050F015E2; Tue, 1 Dec 2015 06:52:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB16q0To038133; Tue, 1 Dec 2015 06:52:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB16px5L038123; Tue, 1 Dec 2015 06:51:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512010651.tB16px5L038123@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 06:51:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291571 - stable/9/lib/libc/stdio X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 06:52:01 -0000 Author: ngie Date: Tue Dec 1 06:51:59 2015 New Revision: 291571 URL: https://svnweb.freebsd.org/changeset/base/291571 Log: MFstable/10 r291336: MFC r288006,r288031,r288032,r288033: r288006 (by rodrigc): Add declarations to eliminate -Wmissing-prototypes warnings r288031 (by rodrigc): Remove names from some prototypes r288032 (by rodrigc): Remove names from some prototypes r288033 (by rodrigc): Use ANSI C prototypes. Eliminates -Wold-style-definition warnings. Modified: stable/9/lib/libc/stdio/_flock_stub.c stable/9/lib/libc/stdio/fgetwln.c stable/9/lib/libc/stdio/findfp.c stable/9/lib/libc/stdio/getchar.c stable/9/lib/libc/stdio/vfscanf.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdio/_flock_stub.c ============================================================================== --- stable/9/lib/libc/stdio/_flock_stub.c Tue Dec 1 06:29:11 2015 (r291570) +++ stable/9/lib/libc/stdio/_flock_stub.c Tue Dec 1 06:51:59 2015 (r291571) @@ -55,6 +55,9 @@ __weak_reference(_flockfile_debug_stub, __weak_reference(_ftrylockfile, ftrylockfile); __weak_reference(_funlockfile, funlockfile); +void _flockfile_debug_stub(FILE *, char *, int); +int _ftrylockfile(FILE *); + void _flockfile(FILE *fp) { Modified: stable/9/lib/libc/stdio/fgetwln.c ============================================================================== --- stable/9/lib/libc/stdio/fgetwln.c Tue Dec 1 06:29:11 2015 (r291570) +++ stable/9/lib/libc/stdio/fgetwln.c Tue Dec 1 06:51:59 2015 (r291571) @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include "local.h" #include "xlocale_private.h" +wchar_t *fgetwln_l(FILE * __restrict, size_t *, locale_t); + wchar_t * fgetwln_l(FILE * __restrict fp, size_t *lenp, locale_t locale) { Modified: stable/9/lib/libc/stdio/findfp.c ============================================================================== --- stable/9/lib/libc/stdio/findfp.c Tue Dec 1 06:29:11 2015 (r291570) +++ stable/9/lib/libc/stdio/findfp.c Tue Dec 1 06:51:59 2015 (r291571) @@ -114,7 +114,7 @@ moreglue(n) * Find a free FILE for fopen et al. */ FILE * -__sfp() +__sfp(void) { FILE *fp; int n; @@ -165,6 +165,7 @@ found: */ __warn_references(f_prealloc, "warning: this program uses f_prealloc(), which is not recommended."); +void f_prealloc(void); void f_prealloc(void) @@ -196,7 +197,7 @@ f_prealloc(void) * The name `_cleanup' is, alas, fairly well known outside stdio. */ void -_cleanup() +_cleanup(void) { /* (void) _fwalk(fclose); */ (void) _fwalk(__sflush); /* `cheating' */ @@ -206,7 +207,7 @@ _cleanup() * __sinit() is called whenever stdio's internal variables must be set up. */ void -__sinit() +__sinit(void) { /* Make sure we clean up on exit. */ Modified: stable/9/lib/libc/stdio/getchar.c ============================================================================== --- stable/9/lib/libc/stdio/getchar.c Tue Dec 1 06:29:11 2015 (r291570) +++ stable/9/lib/libc/stdio/getchar.c Tue Dec 1 06:51:59 2015 (r291571) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #undef getchar_unlocked int -getchar() +getchar(void) { int retval; FLOCKFILE(stdin); Modified: stable/9/lib/libc/stdio/vfscanf.c ============================================================================== --- stable/9/lib/libc/stdio/vfscanf.c Tue Dec 1 06:29:11 2015 (r291570) +++ stable/9/lib/libc/stdio/vfscanf.c Tue Dec 1 06:51:59 2015 (r291571) @@ -817,9 +817,7 @@ match_failure: * considered part of the scanset. */ static const u_char * -__sccl(tab, fmt) - char *tab; - const u_char *fmt; +__sccl(char *tab, const u_char *fmt) { int c, n, v, i; struct xlocale_collate *table = From owner-svn-src-all@freebsd.org Tue Dec 1 07:16:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27E2BA3DCAB; Tue, 1 Dec 2015 07:16:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA96B1911; Tue, 1 Dec 2015 07:16:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB17G63g044085; Tue, 1 Dec 2015 07:16:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB17G6Xl044084; Tue, 1 Dec 2015 07:16:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512010716.tB17G6Xl044084@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 07:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291572 - stable/10/lib/libc/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 07:16:07 -0000 Author: ngie Date: Tue Dec 1 07:16:05 2015 New Revision: 291572 URL: https://svnweb.freebsd.org/changeset/base/291572 Log: MFC r269326: r269326 (by n_hibma): Fix the example: free the memory that was allocated by getline(). Modified: stable/10/lib/libc/stdio/getline.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdio/getline.3 ============================================================================== --- stable/10/lib/libc/stdio/getline.3 Tue Dec 1 06:51:59 2015 (r291571) +++ stable/10/lib/libc/stdio/getline.3 Tue Dec 1 07:16:05 2015 (r291572) @@ -95,6 +95,7 @@ size_t linecap = 0; ssize_t linelen; while ((linelen = getline(&line, &linecap, fp)) > 0) fwrite(line, linelen, 1, stdout); +free(line); .Ed .Sh COMPATIBILITY Many application writers used the name From owner-svn-src-all@freebsd.org Tue Dec 1 07:21:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E9A0A3D739; Tue, 1 Dec 2015 07:21:43 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E4FA1F6C; Tue, 1 Dec 2015 07:21:43 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pacdm15 with SMTP id dm15so212855314pac.3; Mon, 30 Nov 2015 23:21:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=KxbiMqgo8CrBru8THU3Gu3Xoq9bS99k0L8xpCaXbhYw=; b=RUNqDwp0DdRgiXZ5mTZ7w7xj7zyaFOynjmI0piDHaXLRzhkYeJyAvka37MWyAJCPMc DMUFoatCh3CT3yB+Yach3poqATP4FxrYSoMqNPqMlHTC3BkRFizNF7UGz2RjiA1Ro1nW b5JH/x3klBK1v2CiFGZJjTIUNRYplQ1JA7z0umdQ6A4YrdFB9R3JnhkHi+xZ+T+wmXX3 U8bQN/v4BtzMbVpSuDnB8dEVUiVKa8umeJcTdRxwb3BZ6ZxOE0MfMEbqI3tYVYPFPCbo XhVEMO7bS37MnFLgIt+oqlvARWLpC5lOiCaP9dHzIWnJM4dqc+7MavkhzQxvaopQdIs+ 6q9w== X-Received: by 10.98.71.217 with SMTP id p86mr77896051pfi.162.1448954502966; Mon, 30 Nov 2015 23:21:42 -0800 (PST) Received: from ?IPv6:2601:601:800:126d:2802:e2ed:33ec:fa6a? ([2601:601:800:126d:2802:e2ed:33ec:fa6a]) by smtp.gmail.com with ESMTPSA id fc8sm34955418pab.21.2015.11.30.23.21.41 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Nov 2015 23:21:41 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r291268 - stable/10/usr.bin/ldd From: NGie Cooper In-Reply-To: <201511242304.tAON43uF043278@repo.freebsd.org> Date: Mon, 30 Nov 2015 23:21:40 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org, jenkins-admin@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <2B83D161-7A3A-4EEE-9782-3349B1D2770F@gmail.com> References: <201511242304.tAON43uF043278@repo.freebsd.org> To: Jung-uk Kim X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 07:21:43 -0000 > On Nov 24, 2015, at 15:04, Jung-uk Kim wrote: >=20 > Author: jkim > Date: Tue Nov 24 23:04:03 2015 > New Revision: 291268 > URL: https://svnweb.freebsd.org/changeset/base/291268 >=20 > Log: > MFC: r289425 >=20 > Add support for ARM EABI. Note it is not a direct MFC because some = macros > are not defined in this branch. This change seems to have broken some things on stable/10: = https://jenkins.freebsd.org/job/FreeBSD_stable_10-tests/905/ . Thanks, -NGie= From owner-svn-src-all@freebsd.org Tue Dec 1 07:32:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B868FA3DCE5; Tue, 1 Dec 2015 07:32:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B07B14B9; Tue, 1 Dec 2015 07:32:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB17WZuO049657; Tue, 1 Dec 2015 07:32:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB17WZCl049654; Tue, 1 Dec 2015 07:32:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512010732.tB17WZCl049654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 07:32:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291573 - in stable/10/lib/libc: rpc stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 07:32:36 -0000 Author: ngie Date: Tue Dec 1 07:32:35 2015 New Revision: 291573 URL: https://svnweb.freebsd.org/changeset/base/291573 Log: MFC r278932: r278932 (by pfg): libc: clean some set-but-not-used errors. These were found by gcc 5.0 on Dragonfly BSD, however I made no attempt to silence the false positives. Obtained from: DragonFly (cf515c3a6f3a8964ad592e524442bc628f8ed63b) Modified: stable/10/lib/libc/rpc/clnt_dg.c stable/10/lib/libc/rpc/rpc_soc.c stable/10/lib/libc/stdio/xprintf_float.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/rpc/clnt_dg.c ============================================================================== --- stable/10/lib/libc/rpc/clnt_dg.c Tue Dec 1 07:16:05 2015 (r291572) +++ stable/10/lib/libc/rpc/clnt_dg.c Tue Dec 1 07:32:35 2015 (r291573) @@ -327,7 +327,7 @@ clnt_dg_call(cl, proc, xargs, argsp, xre struct sockaddr *sa; sigset_t mask; sigset_t newmask; - socklen_t inlen, salen; + socklen_t salen; ssize_t recvlen = 0; int kin_len, n, rpc_lock_value; u_int32_t xid; @@ -520,7 +520,6 @@ get_reply: goto call_again_same_xid; } } - inlen = (socklen_t)recvlen; /* * now decode and validate the response Modified: stable/10/lib/libc/rpc/rpc_soc.c ============================================================================== --- stable/10/lib/libc/rpc/rpc_soc.c Tue Dec 1 07:16:05 2015 (r291572) +++ stable/10/lib/libc/rpc/rpc_soc.c Tue Dec 1 07:32:35 2015 (r291573) @@ -462,12 +462,10 @@ clntunix_create(raddr, prog, vers, sockp u_int recvsz; { struct netbuf *svcaddr; - struct netconfig *nconf; CLIENT *cl; int len; cl = NULL; - nconf = NULL; svcaddr = NULL; if ((raddr->sun_len == 0) || ((svcaddr = malloc(sizeof(struct netbuf))) == NULL ) || Modified: stable/10/lib/libc/stdio/xprintf_float.c ============================================================================== --- stable/10/lib/libc/stdio/xprintf_float.c Tue Dec 1 07:16:05 2015 (r291572) +++ stable/10/lib/libc/stdio/xprintf_float.c Tue Dec 1 07:32:35 2015 (r291573) @@ -168,7 +168,6 @@ __printf_render_float(struct __printf_io int realsz; /* field size expanded by dprec, sign, etc */ int dprec; /* a copy of prec if [diouxX], 0 otherwise */ char ox[2]; /* space for 0x; ox[1] is either x, X, or \0 */ - int prsize; /* max size of printed field */ int ret; /* return value accumulator */ char *decimal_point; /* locale specific decimal point */ int n2; /* XXX: for PRINTANDPAD */ @@ -344,8 +343,6 @@ here: if (ox[1]) realsz += 2; - prsize = pi->width > realsz ? pi->width : realsz; - /* right-adjusting blank padding */ if (pi->pad != '0' && pi->left == 0) ret += __printf_pad(io, pi->width - realsz, 0); From owner-svn-src-all@freebsd.org Tue Dec 1 07:33:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FF22A3DDCC; Tue, 1 Dec 2015 07:33:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08E56175D; Tue, 1 Dec 2015 07:33:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB17XVNH049765; Tue, 1 Dec 2015 07:33:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB17XV9m049764; Tue, 1 Dec 2015 07:33:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512010733.tB17XV9m049764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 07:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291574 - stable/9/lib/libc/stdio X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 07:33:32 -0000 Author: ngie Date: Tue Dec 1 07:33:30 2015 New Revision: 291574 URL: https://svnweb.freebsd.org/changeset/base/291574 Log: MFstable/10 r291572: MFC r269326: r269326 (by n_hibma): Fix the example: free the memory that was allocated by getline(). Modified: stable/9/lib/libc/stdio/getline.3 Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdio/getline.3 ============================================================================== --- stable/9/lib/libc/stdio/getline.3 Tue Dec 1 07:32:35 2015 (r291573) +++ stable/9/lib/libc/stdio/getline.3 Tue Dec 1 07:33:30 2015 (r291574) @@ -95,6 +95,7 @@ size_t linecap = 0; ssize_t linelen; while ((linelen = getline(&line, &linecap, fp)) > 0) fwrite(line, linelen, 1, stdout); +free(line); .Ed .Sh COMPATIBILITY Many application writers used the name From owner-svn-src-all@freebsd.org Tue Dec 1 07:52:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E44FBA3D630; Tue, 1 Dec 2015 07:52:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2413137F; Tue, 1 Dec 2015 07:52:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB17qfJK055798; Tue, 1 Dec 2015 07:52:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB17qfoQ055797; Tue, 1 Dec 2015 07:52:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512010752.tB17qfoQ055797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 07:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291575 - head/tests/sys/mqueue X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 07:52:43 -0000 Author: ngie Date: Tue Dec 1 07:52:41 2015 New Revision: 291575 URL: https://svnweb.freebsd.org/changeset/base/291575 Log: Disable mqueue test # 3 and # 4 until __mq_oshandle is properly publicized This will unbreak the test script and make things green again after r291440 Sponsored by: EMC / Isilon Storage Division Modified: head/tests/sys/mqueue/mqueue_test.sh Modified: head/tests/sys/mqueue/mqueue_test.sh ============================================================================== --- head/tests/sys/mqueue/mqueue_test.sh Tue Dec 1 07:33:30 2015 (r291574) +++ head/tests/sys/mqueue/mqueue_test.sh Tue Dec 1 07:52:41 2015 (r291575) @@ -75,7 +75,7 @@ atf_init_test_cases() { atf_add_test_case mqtest1 atf_add_test_case mqtest2 - atf_add_test_case mqtest3 - atf_add_test_case mqtest4 + #atf_add_test_case mqtest3 + #atf_add_test_case mqtest4 atf_add_test_case mqtest5 } From owner-svn-src-all@freebsd.org Tue Dec 1 09:06:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37F66A35D7E; Tue, 1 Dec 2015 09:06:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 146A5164B; Tue, 1 Dec 2015 09:06:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1969ug076228; Tue, 1 Dec 2015 09:06:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1969gI076227; Tue, 1 Dec 2015 09:06:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201512010906.tB1969gI076227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 1 Dec 2015 09:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291576 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 09:06:10 -0000 Author: kib Date: Tue Dec 1 09:06:09 2015 New Revision: 291576 URL: https://svnweb.freebsd.org/changeset/base/291576 Log: r221714 fixed the situation when the collapse scan improperly handled invalid (busy) page supposedly inserted by the vm_fault(), in the OBSC_COLLAPSE_NOWAIT case. As a continuation to r221714, fix a case when invalid page is found by the object scan in OBSC_COLLAPSE_WAIT case as well. But, since this is waitable scan, we should wait for the termination of the busy state and restart from the beginning of the backing object' page queue. [*] Do not free the shadow page swap space when the parent page is invalid, otherwise this action potentially corrupts user data. Combine all instances of the collapse scan sleep code fragments into the new helper vm_object_backing_scan_wait(). Improve style compliance and comments. Change the return type of vm_object_backing_scan() to bool. Initial submission by: cem, https://reviews.freebsd.org/D4103 [*] Reviewed by: alc, cem Tested by: cem Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D4146 Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Tue Dec 1 07:52:41 2015 (r291575) +++ head/sys/vm/vm_object.c Tue Dec 1 09:06:09 2015 (r291576) @@ -1423,13 +1423,40 @@ retry: #define OBSC_COLLAPSE_NOWAIT 0x0002 #define OBSC_COLLAPSE_WAIT 0x0004 -static int +static vm_page_t +vm_object_backing_scan_wait(vm_object_t object, vm_page_t p, vm_page_t next, + int op) +{ + vm_object_t backing_object; + + VM_OBJECT_ASSERT_WLOCKED(object); + backing_object = object->backing_object; + VM_OBJECT_ASSERT_WLOCKED(backing_object); + + KASSERT(p == NULL || vm_page_busied(p), ("unbusy page %p", p)); + KASSERT(p == NULL || p->object == object || p->object == backing_object, + ("invalid ownership %p %p %p", p, object, backing_object)); + if ((op & OBSC_COLLAPSE_NOWAIT) != 0) + return (next); + if (p != NULL) + vm_page_lock(p); + VM_OBJECT_WUNLOCK(object); + VM_OBJECT_WUNLOCK(backing_object); + if (p == NULL) + VM_WAIT; + else + vm_page_busy_sleep(p, "vmocol"); + VM_OBJECT_WLOCK(object); + VM_OBJECT_WLOCK(backing_object); + return (TAILQ_FIRST(&backing_object->memq)); +} + +static bool vm_object_backing_scan(vm_object_t object, int op) { - int r = 1; - vm_page_t p; vm_object_t backing_object; - vm_pindex_t backing_offset_index; + vm_page_t next, p, pp; + vm_pindex_t backing_offset_index, new_pindex; VM_OBJECT_ASSERT_WLOCKED(object); VM_OBJECT_ASSERT_WLOCKED(object->backing_object); @@ -1451,7 +1478,7 @@ vm_object_backing_scan(vm_object_t objec * shadow test may succeed! XXX */ if (backing_object->type != OBJT_DEFAULT) { - return (0); + return (false); } } if (op & OBSC_COLLAPSE_WAIT) { @@ -1463,24 +1490,19 @@ vm_object_backing_scan(vm_object_t objec */ p = TAILQ_FIRST(&backing_object->memq); while (p) { - vm_page_t next = TAILQ_NEXT(p, listq); - vm_pindex_t new_pindex = p->pindex - backing_offset_index; - + next = TAILQ_NEXT(p, listq); + new_pindex = p->pindex - backing_offset_index; if (op & OBSC_TEST_ALL_SHADOWED) { - vm_page_t pp; - /* * Ignore pages outside the parent object's range * and outside the parent object's mapping of the * backing object. * - * note that we do not busy the backing object's + * Note that we do not busy the backing object's * page. */ - if ( - p->pindex < backing_offset_index || - new_pindex >= object->size - ) { + if (p->pindex < backing_offset_index || + new_pindex >= object->size) { p = next; continue; } @@ -1496,55 +1518,26 @@ vm_object_backing_scan(vm_object_t objec */ pp = vm_page_lookup(object, new_pindex); - if ( - (pp == NULL || pp->valid == 0) && - !vm_pager_has_page(object, new_pindex, NULL, NULL) - ) { - r = 0; - break; - } + if ((pp == NULL || pp->valid == 0) && + !vm_pager_has_page(object, new_pindex, NULL, NULL)) + return (false); } /* * Check for busy page */ if (op & (OBSC_COLLAPSE_WAIT | OBSC_COLLAPSE_NOWAIT)) { - vm_page_t pp; - - if (op & OBSC_COLLAPSE_NOWAIT) { - if (!p->valid || vm_page_busied(p)) { - p = next; - continue; - } - } else if (op & OBSC_COLLAPSE_WAIT) { - if (vm_page_busied(p)) { - VM_OBJECT_WUNLOCK(object); - vm_page_lock(p); - VM_OBJECT_WUNLOCK(backing_object); - vm_page_busy_sleep(p, "vmocol"); - VM_OBJECT_WLOCK(object); - VM_OBJECT_WLOCK(backing_object); - /* - * If we slept, anything could have - * happened. Since the object is - * marked dead, the backing offset - * should not have changed so we - * just restart our scan. - */ - p = TAILQ_FIRST(&backing_object->memq); - continue; - } + if (vm_page_busied(p)) { + p = vm_object_backing_scan_wait(object, p, + next, op); + continue; } - KASSERT( - p->object == backing_object, - ("vm_object_backing_scan: object mismatch") - ); - - if ( - p->pindex < backing_offset_index || - new_pindex >= object->size - ) { + KASSERT(p->object == backing_object, + ("vm_object_backing_scan: object mismatch")); + + if (p->pindex < backing_offset_index || + new_pindex >= object->size) { if (backing_object->type == OBJT_SWAP) swap_pager_freespace(backing_object, p->pindex, 1); @@ -1566,43 +1559,45 @@ vm_object_backing_scan(vm_object_t objec } pp = vm_page_lookup(object, new_pindex); - if ( - (op & OBSC_COLLAPSE_NOWAIT) != 0 && - (pp != NULL && pp->valid == 0) - ) { - if (backing_object->type == OBJT_SWAP) - swap_pager_freespace(backing_object, - p->pindex, 1); - + if (pp != NULL && vm_page_busied(pp)) { /* - * The page in the parent is not (yet) valid. - * We don't know anything about the state of - * the original page. It might be mapped, - * so we must avoid the next if here. + * The page in the parent is busy and + * possibly not (yet) valid. Until + * its state is finalized by the busy + * bit owner, we can't tell whether it + * shadows the original page. + * Therefore, we must either skip it + * and the original (backing_object) + * page or wait for its state to be + * finalized. * - * This is due to a race in vm_fault() where - * we must unbusy the original (backing_obj) - * page before we can (re)lock the parent. - * Hence we can get here. + * This is due to a race with vm_fault() + * where we must unbusy the original + * (backing_obj) page before we can + * (re)lock the parent. Hence we can + * get here. */ - p = next; + p = vm_object_backing_scan_wait(object, pp, + next, op); continue; } - if ( - pp != NULL || - vm_pager_has_page(object, new_pindex, NULL, NULL) - ) { - if (backing_object->type == OBJT_SWAP) - swap_pager_freespace(backing_object, - p->pindex, 1); + KASSERT(pp == NULL || pp->valid != 0, + ("unbusy invalid page %p", pp)); + + if (pp != NULL || vm_pager_has_page(object, + new_pindex, NULL, NULL)) { /* - * page already exists in parent OR swap exists - * for this location in the parent. Destroy - * the original page from the backing object. - * - * Leave the parent's page alone + * The page already exists in the + * parent OR swap exists for this + * location in the parent. Leave the + * parent's page alone. Destroy the + * original page from the backing + * object. */ + if (backing_object->type == OBJT_SWAP) + swap_pager_freespace(backing_object, + p->pindex, 1); vm_page_lock(p); KASSERT(!pmap_page_is_mapped(p), ("freeing mapped page %p", p)); @@ -1624,16 +1619,8 @@ vm_object_backing_scan(vm_object_t objec * vm_page_rename() will handle dirty and cache. */ if (vm_page_rename(p, object, new_pindex)) { - if (op & OBSC_COLLAPSE_NOWAIT) { - p = next; - continue; - } - VM_OBJECT_WUNLOCK(backing_object); - VM_OBJECT_WUNLOCK(object); - VM_WAIT; - VM_OBJECT_WLOCK(object); - VM_OBJECT_WLOCK(backing_object); - p = TAILQ_FIRST(&backing_object->memq); + p = vm_object_backing_scan_wait(object, NULL, + next, op); continue; } @@ -1652,7 +1639,7 @@ vm_object_backing_scan(vm_object_t objec } p = next; } - return (r); + return (true); } @@ -1819,8 +1806,8 @@ vm_object_collapse(vm_object_t object) * there is nothing we can do so we give up. */ if (object->resident_page_count != object->size && - vm_object_backing_scan(object, - OBSC_TEST_ALL_SHADOWED) == 0) { + !vm_object_backing_scan(object, + OBSC_TEST_ALL_SHADOWED)) { VM_OBJECT_WUNLOCK(backing_object); break; } From owner-svn-src-all@freebsd.org Tue Dec 1 09:52:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47DEBA3C939; Tue, 1 Dec 2015 09:52:43 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1232B1F80; Tue, 1 Dec 2015 09:52:42 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB19qg9t090862; Tue, 1 Dec 2015 09:52:42 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB19qgK3090861; Tue, 1 Dec 2015 09:52:42 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201512010952.tB19qgK3090861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 1 Dec 2015 09:52:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291577 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 09:52:43 -0000 Author: andrew Date: Tue Dec 1 09:52:41 2015 New Revision: 291577 URL: https://svnweb.freebsd.org/changeset/base/291577 Log: Print useful information when we hit a data abort we can't handle. This prints the trap frame, along with the exception syndrome and fault address registers. Even though esr is 64-bits here it is only 32-bits in hardware so only print the valid 32-bits. While here also print esr and far when appropriate after printing the trap frame. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c ============================================================================== --- head/sys/arm64/arm64/trap.c Tue Dec 1 09:06:09 2015 (r291576) +++ head/sys/arm64/arm64/trap.c Tue Dec 1 09:52:41 2015 (r291577) @@ -186,6 +186,8 @@ data_abort(struct trapframe *frame, uint if (td->td_critnest != 0 || WITNESS_CHECK(WARN_SLEEPOK | WARN_GIANTOK, NULL, "Kernel page fault") != 0) { print_registers(frame); + printf(" far: %16lx\n", far); + printf(" esr: %.8lx\n", esr); panic("data abort in critical section or under mutex"); } @@ -220,6 +222,12 @@ data_abort(struct trapframe *frame, uint frame->tf_elr = pcb->pcb_onfault; return; } + + printf("Fatal data abort:\n"); + print_registers(frame); + printf(" far: %16lx\n", far); + printf(" esr: %.8lx\n", esr); + #ifdef KDB if (debugger_on_panic || kdb_active) if (kdb_trap(ESR_ELx_EXCEPTION(esr), 0, frame)) @@ -271,6 +279,7 @@ do_el1h_sync(struct trapframe *frame) case EXCP_FP_SIMD: case EXCP_TRAP_FP: print_registers(frame); + printf(" esr: %.8lx\n", esr); panic("VFP exception in the kernel"); case EXCP_DATA_ABORT: far = READ_SPECIALREG(far_el1); From owner-svn-src-all@freebsd.org Tue Dec 1 10:13:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F26CA3CE05; Tue, 1 Dec 2015 10:13:06 +0000 (UTC) (envelope-from fidaj@ukr.net) Received: from frv157.fwdcdn.com (frv157.fwdcdn.com [212.42.77.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 104F319B1; Tue, 1 Dec 2015 10:13:05 +0000 (UTC) (envelope-from fidaj@ukr.net) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=WdKFDcBFR4A4g+tGBqC0JijoCZIjRow0nlbGTHWl/wM=; b=BwAE6GqVUK3YUpyE7zehkXHE+pg7Of+L7KaHO4BjSidfhrjS+q6pSGSk2roMqpR1V/rsGUieoBCCmhCyXW/eQsbX4WPhJS8RsLfdgo7KIrnZMWNgi3Gcd0t2mt0b1vNLS4ydG2uftiCK2NNNha6uPWsB8aNyplCH7/b1dzHRfKE=; Received: from [178.137.139.136] (helo=nonamehost.local) by frv157.fwdcdn.com with esmtpsa ID 1a3hvc-000JfR-OL ; Tue, 01 Dec 2015 12:12:56 +0200 Date: Tue, 1 Dec 2015 12:12:56 +0200 From: Ivan Klymenko To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291566 - in head: . lib/libelf Message-ID: <20151201121256.0b5aa89b@nonamehost.local> In-Reply-To: <201512010609.tB169MJH023576@repo.freebsd.org> References: <201512010609.tB169MJH023576@repo.freebsd.org> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Authentication-Result: IP=178.137.139.136; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 10:13:06 -0000 On Tue, 1 Dec 2015 06:09:22 +0000 (UTC) Garrett Cooper wrote: > Author: ngie > Date: Tue Dec 1 06:09:22 2015 > New Revision: 291566 > URL: https://svnweb.freebsd.org/changeset/base/291566 > > Log: > Move libelf.so.2 from /usr/lib to /lib to unbreak libkvm use after > r291406 > Tested with the following commands as root: > - yes | make delete-old > - service ldconfig restart > - netstat -nr > > X-MFC with: r291406 > Reviewed by: jhb, kib > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/ObsoleteFiles.inc > head/lib/libelf/Makefile > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Tue Dec 1 05:59:53 2015 > (r291565) +++ head/ObsoleteFiles.inc Tue Dec 1 06:09:22 > 2015 (r291566) @@ -38,6 +38,8 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in > r291406) +OLD_FILES+=usr/lib/libelf.so.2 > # 20151115: Fox bad upgrade scheme > OLD_FILES+=usr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030 > OLD_FILES+=usr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312 > > Modified: head/lib/libelf/Makefile > ============================================================================== > --- head/lib/libelf/Makefile Tue Dec 1 05:59:53 2015 > (r291565) +++ head/lib/libelf/Makefile Tue Dec 1 06:09:22 > 2015 (r291566) @@ -7,6 +7,7 @@ SRCDIR= ${TOP}/libelf > .PATH: ${SRCDIR} > > LIB= elf > +SHLIBDIR?= /lib Hello. Maybe SHLIBDIR= /lib ? Thanks. > > SRCS= > elf.c \ > elf_begin.c \ From owner-svn-src-all@freebsd.org Tue Dec 1 11:17:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 035FCA3DDC9; Tue, 1 Dec 2015 11:17:43 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C75401897; Tue, 1 Dec 2015 11:17:42 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1BHfYQ014307; Tue, 1 Dec 2015 11:17:41 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1BHftA014306; Tue, 1 Dec 2015 11:17:41 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201512011117.tB1BHftA014306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 1 Dec 2015 11:17:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291578 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 11:17:43 -0000 Author: ae Date: Tue Dec 1 11:17:41 2015 New Revision: 291578 URL: https://svnweb.freebsd.org/changeset/base/291578 Log: mld_v2_dispatch_general_query() is used by mld_fasttimo_vnet() to send a reply to the MLDv2 General Query. In case when router has a lot of multicast groups, the reply can take several packets due to MTU limitation. Also we have a limit MLD_MAX_RESPONSE_BURST == 4, that limits the number of packets we send in one shot. Then we recalculate the timer value and schedule the remaining packets for sending. The problem is that when we call mld_v2_dispatch_general_query() to send remaining packets, we queue new reply in the same mbuf queue. And when number of packets is bigger than MLD_MAX_RESPONSE_BURST, we get endless reply of MLDv2 reports. To fix this, add the check for remaining packets in the queue. PR: 204831 MFC after: 1 week Sponsored by: Yandex LLC Modified: head/sys/netinet6/mld6.c Modified: head/sys/netinet6/mld6.c ============================================================================== --- head/sys/netinet6/mld6.c Tue Dec 1 09:52:41 2015 (r291577) +++ head/sys/netinet6/mld6.c Tue Dec 1 11:17:41 2015 (r291578) @@ -2985,6 +2985,15 @@ mld_v2_dispatch_general_query(struct mld KASSERT(mli->mli_version == MLD_VERSION_2, ("%s: called when version %d", __func__, mli->mli_version)); + /* + * Check that there are some packets queued. If so, send them first. + * For large number of groups the reply to general query can take + * many packets, we should finish sending them before starting of + * queuing the new reply. + */ + if (mbufq_len(&mli->mli_gq) != 0) + goto send; + ifp = mli->mli_ifp; IF_ADDR_RLOCK(ifp); @@ -3020,6 +3029,7 @@ mld_v2_dispatch_general_query(struct mld } IF_ADDR_RUNLOCK(ifp); +send: mld_dispatch_queue(&mli->mli_gq, MLD_MAX_RESPONSE_BURST); /* From owner-svn-src-all@freebsd.org Tue Dec 1 11:24:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76546A3C0CA; Tue, 1 Dec 2015 11:24:31 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 438BD1E8B; Tue, 1 Dec 2015 11:24:31 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1BOUgW017138; Tue, 1 Dec 2015 11:24:30 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1BOUFU017137; Tue, 1 Dec 2015 11:24:30 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201512011124.tB1BOUFU017137@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 1 Dec 2015 11:24:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291579 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 11:24:31 -0000 Author: ae Date: Tue Dec 1 11:24:30 2015 New Revision: 291579 URL: https://svnweb.freebsd.org/changeset/base/291579 Log: In the same way fix the problem described in r291578 for IGMPv3. In case when router has a lot of multicast groups, the reply can take several packets due to MTU limitation. Also we have a limit IGMP_MAX_RESPONSE_BURST == 4, that limits the number of packets we send in one shot. Then we recalculate the timer value and schedule the remaining packets for sending. The problem is that when we call igmp_v3_dispatch_general_query() to send remaining packets, we queue new reply in the same mbuf queue. And when number of packets is bigger than IGMP_MAX_RESPONSE_BURST, we get endless reply of IGMPv3 reports. To fix this, add the check for remaining packets in the queue. MFC after: 1 week Sponsored by: Yandex LLC Modified: head/sys/netinet/igmp.c Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Tue Dec 1 11:17:41 2015 (r291578) +++ head/sys/netinet/igmp.c Tue Dec 1 11:24:30 2015 (r291579) @@ -3334,6 +3334,15 @@ igmp_v3_dispatch_general_query(struct ig KASSERT(igi->igi_version == IGMP_VERSION_3, ("%s: called when version %d", __func__, igi->igi_version)); + /* + * Check that there are some packets queued. If so, send them first. + * For large number of groups the reply to general query can take + * many packets, we should finish sending them before starting of + * queuing the new reply. + */ + if (mbufq_len(&igi->igi_gq) != 0) + goto send; + ifp = igi->igi_ifp; IF_ADDR_RLOCK(ifp); @@ -3369,6 +3378,7 @@ igmp_v3_dispatch_general_query(struct ig } IF_ADDR_RUNLOCK(ifp); +send: loop = (igi->igi_flags & IGIF_LOOPBACK) ? 1 : 0; igmp_dispatch_queue(&igi->igi_gq, IGMP_MAX_RESPONSE_BURST, loop); From owner-svn-src-all@freebsd.org Tue Dec 1 12:27:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B399BA2463E; Tue, 1 Dec 2015 12:27:37 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 766831D77; Tue, 1 Dec 2015 12:27:37 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1CRa0E034311; Tue, 1 Dec 2015 12:27:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1CRa92034310; Tue, 1 Dec 2015 12:27:36 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201512011227.tB1CRa92034310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 1 Dec 2015 12:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291580 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 12:27:37 -0000 Author: andrew Date: Tue Dec 1 12:27:36 2015 New Revision: 291580 URL: https://svnweb.freebsd.org/changeset/base/291580 Log: Rework the atomic code to reduce the repetition. This merges some of the atomic functions where they are almost identical, or have acquire/release semantics. While here clean these function up. The cbnz instruction doesn't change the condition flags so drop cc, however they should have memory added to the clobber list. Reviewed by: kib Sponsored by: ABT Systems Ltd Differential Revision: https://reviews.freebsd.org/D4318 Modified: head/sys/arm64/include/atomic.h Modified: head/sys/arm64/include/atomic.h ============================================================================== --- head/sys/arm64/include/atomic.h Tue Dec 1 11:24:30 2015 (r291579) +++ head/sys/arm64/include/atomic.h Tue Dec 1 12:27:36 2015 (r291580) @@ -53,69 +53,135 @@ #define wmb() dmb(st) /* Full system memory barrier store */ #define rmb() dmb(ld) /* Full system memory barrier load */ -static __inline void -atomic_add_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldxr %w0, [%2] \n" - " add %w0, %w0, %w3 \n" - " stxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" - ); -} - -static __inline void -atomic_clear_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldxr %w0, [%2] \n" - " bic %w0, %w0, %w3 \n" - " stxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" - ); -} +#define ATOMIC_OP(op, asm_op, bar, a, l) \ +static __inline void \ +atomic_##op##_##bar##32(volatile uint32_t *p, uint32_t val) \ +{ \ + uint32_t tmp; \ + int res; \ + \ + __asm __volatile( \ + "1: ld"#a"xr %w0, [%2] \n" \ + " "#asm_op" %w0, %w0, %w3 \n" \ + " st"#l"xr %w1, %w0, [%2] \n" \ + " cbnz %w1, 1b \n" \ + : "=&r"(tmp), "=&r"(res) \ + : "r" (p), "r" (val) \ + : "memory" \ + ); \ +} \ + \ +static __inline void \ +atomic_##op##_##bar##64(volatile uint64_t *p, uint64_t val) \ +{ \ + uint64_t tmp; \ + int res; \ + \ + __asm __volatile( \ + "1: ld"#a"xr %0, [%2] \n" \ + " "#asm_op" %0, %0, %3 \n" \ + " st"#l"xr %w1, %0, [%2] \n" \ + " cbnz %w1, 1b \n" \ + : "=&r"(tmp), "=&r"(res) \ + : "r" (p), "r" (val) \ + : "memory" \ + ); \ +} + +#define ATOMIC(op, asm_op) \ + ATOMIC_OP(op, asm_op, , , ) \ + ATOMIC_OP(op, asm_op, acq_, a, ) \ + ATOMIC_OP(op, asm_op, rel_, , l) \ + +ATOMIC(add, add) +ATOMIC(clear, bic) +ATOMIC(set, orr) +ATOMIC(subtract, sub) + +#define ATOMIC_CMPSET(bar, a, l) \ +static __inline int \ +atomic_cmpset_##bar##32(volatile uint32_t *p, uint32_t cmpval, \ + uint32_t newval) \ +{ \ + uint32_t tmp; \ + int res; \ + \ + __asm __volatile( \ + "1: mov %w1, #1 \n" \ + " ld"#a"xr %w0, [%2] \n" \ + " cmp %w0, %w3 \n" \ + " b.ne 2f \n" \ + " st"#l"xr %w1, %w4, [%2] \n" \ + " cbnz %w1, 1b \n" \ + "2:" \ + : "=&r"(tmp), "=&r"(res) \ + : "r" (p), "r" (cmpval), "r" (newval) \ + : "cc", "memory" \ + ); \ + \ + return (!res); \ +} \ + \ +static __inline int \ +atomic_cmpset_##bar##64(volatile uint64_t *p, uint64_t cmpval, \ + uint64_t newval) \ +{ \ + uint64_t tmp; \ + int res; \ + \ + __asm __volatile( \ + "1: mov %w1, #1 \n" \ + " ld"#a"xr %0, [%2] \n" \ + " cmp %0, %3 \n" \ + " b.ne 2f \n" \ + " st"#l"xr %w1, %4, [%2] \n" \ + " cbnz %w1, 1b \n" \ + "2:" \ + : "=&r"(tmp), "=&r"(res) \ + : "r" (p), "r" (cmpval), "r" (newval) \ + : "cc", "memory" \ + ); \ + \ + return (!res); \ +} + +ATOMIC_CMPSET( , , ) +ATOMIC_CMPSET(acq_, a, ) +ATOMIC_CMPSET(rel_, ,l) -static __inline int -atomic_cmpset_32(volatile uint32_t *p, uint32_t cmpval, uint32_t newval) +static __inline uint32_t +atomic_fetchadd_32(volatile uint32_t *p, uint32_t val) { - uint32_t tmp; + uint32_t tmp, ret; int res; __asm __volatile( - "1: mov %w1, #1 \n" - " ldxr %w0, [%2] \n" - " cmp %w0, %w3 \n" - " b.ne 2f \n" - " stxr %w1, %w4, [%2] \n" - " cbnz %w1, 1b \n" - "2:" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (cmpval), "+r" (newval) - : : "cc" + "1: ldxr %w2, [%3] \n" + " add %w0, %w2, %w4 \n" + " stxr %w1, %w0, [%3] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "=&r"(ret) + : "r" (p), "r" (val) + : "memory" ); - return (!res); + return (ret); } -static __inline uint32_t -atomic_fetchadd_32(volatile uint32_t *p, uint32_t val) +static __inline uint64_t +atomic_fetchadd_64(volatile uint64_t *p, uint64_t val) { - uint32_t tmp, ret; + uint64_t tmp, ret; int res; __asm __volatile( - "1: ldxr %w4, [%2] \n" - " add %w0, %w4, %w3 \n" - " stxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val), "=&r"(ret) : : "cc" + "1: ldxr %2, [%3] \n" + " add %0, %2, %4 \n" + " stxr %w1, %0, [%3] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "=&r"(ret) + : "r" (p), "r" (val) + : "memory" ); return (ret); @@ -124,125 +190,73 @@ atomic_fetchadd_32(volatile uint32_t *p, static __inline uint32_t atomic_readandclear_32(volatile uint32_t *p) { - uint32_t tmp, ret; + uint32_t ret; int res; __asm __volatile( - " mov %w0, #0 \n" - "1: ldxr %w3, [%2] \n" - " stxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "=&r"(ret) : : "cc" + "1: ldxr %w1, [%2] \n" + " stxr %w0, wzr, [%2] \n" + " cbnz %w0, 1b \n" + : "=&r"(res), "=&r"(ret) + : "r" (p) + : "memory" ); return (ret); } -static __inline void -atomic_set_32(volatile uint32_t *p, uint32_t val) +static __inline uint64_t +atomic_readandclear_64(volatile uint64_t *p) { - uint32_t tmp; + uint64_t ret; int res; __asm __volatile( - "1: ldxr %w0, [%2] \n" - " orr %w0, %w0, %w3 \n" - " stxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" + "1: ldxr %1, [%2] \n" + " stxr %w0, xzr, [%2] \n" + " cbnz %w0, 1b \n" + : "=&r"(res), "=&r"(ret) + : "r" (p) + : "memory" ); + + return (ret); } static __inline uint32_t atomic_swap_32(volatile uint32_t *p, uint32_t val) { - uint32_t tmp; + uint32_t ret; int res; __asm __volatile( "1: ldxr %w0, [%2] \n" " stxr %w1, %w3, [%2] \n" " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + : "=&r"(ret), "=&r"(res) + : "r" (p), "r" (val) + : "memory" ); - return (tmp); -} - -static __inline void -atomic_subtract_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldxr %w0, [%2] \n" - " sub %w0, %w0, %w3 \n" - " stxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" - ); -} - -#define atomic_add_int atomic_add_32 -#define atomic_clear_int atomic_clear_32 -#define atomic_cmpset_int atomic_cmpset_32 -#define atomic_fetchadd_int atomic_fetchadd_32 -#define atomic_readandclear_int atomic_readandclear_32 -#define atomic_set_int atomic_set_32 -#define atomic_swap_int atomic_swap_32 -#define atomic_subtract_int atomic_subtract_32 - -static __inline void -atomic_add_acq_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldaxr %w0, [%2] \n" - " add %w0, %w0, %w3 \n" - " stxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - "2:" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -static __inline void -atomic_clear_acq_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldaxr %w0, [%2] \n" - " bic %w0, %w0, %w3 \n" - " stxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); + return (ret); } -static __inline int -atomic_cmpset_acq_32(volatile uint32_t *p, uint32_t cmpval, uint32_t newval) +static __inline uint64_t +atomic_swap_64(volatile uint64_t *p, uint64_t val) { - uint32_t tmp; + uint64_t ret; int res; __asm __volatile( - "1: mov %w1, #1 \n" - " ldaxr %w0, [%2] \n" - " cmp %w0, %w3 \n" - " b.ne 2f \n" - " stxr %w1, %w4, [%2] \n" - " cbnz %w1, 1b \n" - "2:" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (cmpval), "+r" (newval) - : : "cc", "memory" + "1: ldxr %0, [%2] \n" + " stxr %w1, %3, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(ret), "=&r"(res) + : "r" (p), "r" (val) + : "memory" ); - return (!res); + return (ret); } static __inline uint32_t @@ -252,279 +266,72 @@ atomic_load_acq_32(volatile uint32_t *p) __asm __volatile( "ldar %w0, [%1] \n" - : "=&r" (ret) : "r" (p) : "memory"); + : "=&r" (ret) + : "r" (p) + : "memory"); return (ret); } -static __inline void -atomic_set_acq_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldaxr %w0, [%2] \n" - " orr %w0, %w0, %w3 \n" - " stxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -static __inline void -atomic_subtract_acq_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldaxr %w0, [%2] \n" - " sub %w0, %w0, %w3 \n" - " stxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -#define atomic_add_acq_int atomic_add_acq_32 -#define atomic_clear_acq_int atomic_clear_acq_32 -#define atomic_cmpset_acq_int atomic_cmpset_acq_32 -#define atomic_load_acq_int atomic_load_acq_32 -#define atomic_set_acq_int atomic_set_acq_32 -#define atomic_subtract_acq_int atomic_subtract_acq_32 - -/* The atomic functions currently are both acq and rel, we should fix this. */ - -static __inline void -atomic_add_rel_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldxr %w0, [%2] \n" - " add %w0, %w0, %w3 \n" - " stlxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - "2:" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -static __inline void -atomic_clear_rel_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldxr %w0, [%2] \n" - " bic %w0, %w0, %w3 \n" - " stlxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -static __inline int -atomic_cmpset_rel_32(volatile uint32_t *p, uint32_t cmpval, uint32_t newval) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: mov %w1, #1 \n" - " ldxr %w0, [%2] \n" - " cmp %w0, %w3 \n" - " b.ne 2f \n" - " stlxr %w1, %w4, [%2] \n" - " cbnz %w1, 1b \n" - "2:" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (cmpval), "+r" (newval) - : : "cc", "memory" - ); - - return (!res); -} - -static __inline void -atomic_set_rel_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldxr %w0, [%2] \n" - " orr %w0, %w0, %w3 \n" - " stlxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -static __inline void -atomic_store_rel_32(volatile uint32_t *p, uint32_t val) -{ - - __asm __volatile( - "stlr %w0, [%1] \n" - : : "r" (val), "r" (p) : "memory"); -} - -static __inline void -atomic_subtract_rel_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldxr %w0, [%2] \n" - " sub %w0, %w0, %w3 \n" - " stlxr %w1, %w0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -#define atomic_add_rel_int atomic_add_rel_32 -#define atomic_clear_rel_int atomic_add_rel_32 -#define atomic_cmpset_rel_int atomic_cmpset_rel_32 -#define atomic_set_rel_int atomic_set_rel_32 -#define atomic_subtract_rel_int atomic_subtract_rel_32 -#define atomic_store_rel_int atomic_store_rel_32 - - -static __inline void -atomic_add_64(volatile uint64_t *p, uint64_t val) -{ - uint64_t tmp; - int res; - - __asm __volatile( - "1: ldxr %0, [%2] \n" - " add %0, %0, %3 \n" - " stxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r" (tmp), "=&r" (res), "+r" (p), "+r" (val) : : "cc" - ); -} - -static __inline void -atomic_clear_64(volatile uint64_t *p, uint64_t val) -{ - uint64_t tmp; - int res; - - __asm __volatile( - "1: ldxr %0, [%2] \n" - " bic %0, %0, %3 \n" - " stxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" - ); -} - -static __inline int -atomic_cmpset_64(volatile uint64_t *p, uint64_t cmpval, uint64_t newval) -{ - uint64_t tmp; - int res; - - __asm __volatile( - "1: mov %w1, #1 \n" - " ldxr %0, [%2] \n" - " cmp %0, %3 \n" - " b.ne 2f \n" - " stxr %w1, %4, [%2] \n" - " cbnz %w1, 1b \n" - "2:" - : "=&r" (tmp), "=&r"(res), "+r" (p), "+r" (cmpval), "+r" (newval) - : : "cc", "memory" - ); - - return (!res); -} - static __inline uint64_t -atomic_fetchadd_64(volatile uint64_t *p, uint64_t val) -{ - uint64_t tmp, ret; - int res; - - __asm __volatile( - "1: ldxr %4, [%2] \n" - " add %0, %4, %3 \n" - " stxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val), "=&r"(ret) : : "cc" - ); - - return (ret); -} - -static __inline uint64_t -atomic_readandclear_64(volatile uint64_t *p) +atomic_load_acq_64(volatile uint64_t *p) { - uint64_t tmp, ret; - int res; + uint64_t ret; __asm __volatile( - " mov %0, #0 \n" - "1: ldxr %3, [%2] \n" - " stxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "=&r"(ret) : : "cc" - ); + "ldar %0, [%1] \n" + : "=&r" (ret) + : "r" (p) + : "memory"); return (ret); } static __inline void -atomic_set_64(volatile uint64_t *p, uint64_t val) +atomic_store_rel_32(volatile uint32_t *p, uint32_t val) { - uint64_t tmp; - int res; __asm __volatile( - "1: ldxr %0, [%2] \n" - " orr %0, %0, %3 \n" - " stxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" - ); + "stlr %w0, [%1] \n" + : + : "r" (val), "r" (p) + : "memory"); } static __inline void -atomic_subtract_64(volatile uint64_t *p, uint64_t val) +atomic_store_rel_64(volatile uint64_t *p, uint64_t val) { - uint64_t tmp; - int res; __asm __volatile( - "1: ldxr %0, [%2] \n" - " sub %0, %0, %3 \n" - " stxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" - ); + "stlr %0, [%1] \n" + : + : "r" (val), "r" (p) + : "memory"); } -static __inline uint64_t -atomic_swap_64(volatile uint64_t *p, uint64_t val) -{ - uint64_t old; - int res; - - __asm __volatile( - "1: ldxr %0, [%2] \n" - " stxr %w1, %3, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(old), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); - return (old); -} +#define atomic_add_int atomic_add_32 +#define atomic_clear_int atomic_clear_32 +#define atomic_cmpset_int atomic_cmpset_32 +#define atomic_fetchadd_int atomic_fetchadd_32 +#define atomic_readandclear_int atomic_readandclear_32 +#define atomic_set_int atomic_set_32 +#define atomic_swap_int atomic_swap_32 +#define atomic_subtract_int atomic_subtract_32 + +#define atomic_add_acq_int atomic_add_acq_32 +#define atomic_clear_acq_int atomic_clear_acq_32 +#define atomic_cmpset_acq_int atomic_cmpset_acq_32 +#define atomic_load_acq_int atomic_load_acq_32 +#define atomic_set_acq_int atomic_set_acq_32 +#define atomic_subtract_acq_int atomic_subtract_acq_32 + +#define atomic_add_rel_int atomic_add_rel_32 +#define atomic_clear_rel_int atomic_add_rel_32 +#define atomic_cmpset_rel_int atomic_cmpset_rel_32 +#define atomic_set_rel_int atomic_set_rel_32 +#define atomic_subtract_rel_int atomic_subtract_rel_32 +#define atomic_store_rel_int atomic_store_rel_32 #define atomic_add_long atomic_add_64 #define atomic_clear_long atomic_clear_64 @@ -544,100 +351,6 @@ atomic_swap_64(volatile uint64_t *p, uin #define atomic_swap_ptr atomic_swap_64 #define atomic_subtract_ptr atomic_subtract_64 -static __inline void -atomic_add_acq_64(volatile uint64_t *p, uint64_t val) -{ - uint64_t tmp; - int res; - - __asm __volatile( - "1: ldaxr %0, [%2] \n" - " add %0, %0, %3 \n" - " stxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - "2:" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -static __inline void -atomic_clear_acq_64(volatile uint64_t *p, uint64_t val) -{ - uint64_t tmp; - int res; - - __asm __volatile( - "1: ldaxr %0, [%2] \n" - " bic %0, %0, %3 \n" - " stxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -static __inline int -atomic_cmpset_acq_64(volatile uint64_t *p, uint64_t cmpval, uint64_t newval) -{ - uint64_t tmp; - int res; - - __asm __volatile( - "1: mov %w1, #1 \n" - " ldaxr %0, [%2] \n" - " cmp %0, %3 \n" - " b.ne 2f \n" - " stxr %w1, %4, [%2] \n" - " cbnz %w1, 1b \n" - "2:" - : "=&r" (tmp), "=&r" (res), "+r" (p), "+r" (cmpval), "+r" (newval) - : : "cc", "memory" - ); - - return (!res); -} - -static __inline uint64_t -atomic_load_acq_64(volatile uint64_t *p) -{ - uint64_t ret; - - __asm __volatile( - "ldar %0, [%1] \n" - : "=&r" (ret) : "r" (p) : "memory"); - - return (ret); -} - -static __inline void -atomic_set_acq_64(volatile uint64_t *p, uint64_t val) -{ - uint64_t tmp; - int res; - - __asm __volatile( - "1: ldaxr %0, [%2] \n" - " orr %0, %0, %3 \n" - " stxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -static __inline void -atomic_subtract_acq_64(volatile uint64_t *p, uint64_t val) -{ - uint64_t tmp; - int res; - - __asm __volatile( - "1: ldaxr %0, [%2] \n" - " sub %0, %0, %3 \n" - " stxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - #define atomic_add_acq_long atomic_add_acq_64 #define atomic_clear_acq_long atomic_add_acq_64 #define atomic_cmpset_acq_long atomic_cmpset_acq_64 @@ -652,100 +365,19 @@ atomic_subtract_acq_64(volatile uint64_t #define atomic_set_acq_ptr atomic_set_acq_64 #define atomic_subtract_acq_ptr atomic_subtract_acq_64 -/* - * TODO: The atomic functions currently are both acq and rel, we should fix - * this. - */ -static __inline void -atomic_add_rel_64(volatile uint64_t *p, uint64_t val) -{ - uint64_t tmp; - int res; - - __asm __volatile( - "1: ldxr %0, [%2] \n" - " add %0, %0, %3 \n" - " stlxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - "2:" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -static __inline void -atomic_clear_rel_64(volatile uint64_t *p, uint64_t val) -{ - uint64_t tmp; - int res; - - __asm __volatile( - "1: ldxr %0, [%2] \n" - " bic %0, %0, %3 \n" - " stlxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -static __inline int -atomic_cmpset_rel_64(volatile uint64_t *p, uint64_t cmpval, uint64_t newval) -{ - uint64_t tmp; - int res; - - __asm __volatile( - "1: mov %w1, #1 \n" - " ldxr %0, [%2] \n" - " cmp %0, %3 \n" - " b.ne 2f \n" - " stlxr %w1, %4, [%2] \n" - " cbnz %w1, 1b \n" - "2:" - : "=&r" (tmp), "=&r" (res), "+r" (p), "+r" (cmpval), "+r" (newval) - : : "cc", "memory" - ); - - return (!res); -} - -static __inline void -atomic_set_rel_64(volatile uint64_t *p, uint64_t val) -{ - uint64_t tmp; - int res; - - __asm __volatile( - "1: ldxr %0, [%2] \n" - " orr %0, %0, %3 \n" - " stlxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} - -static __inline void -atomic_store_rel_64(volatile uint64_t *p, uint64_t val) -{ - - __asm __volatile( - "stlr %0, [%1] \n" - : : "r" (val), "r" (p) : "memory"); -} - -static __inline void -atomic_subtract_rel_64(volatile uint64_t *p, uint64_t val) -{ - uint64_t tmp; - int res; +#define atomic_add_rel_long atomic_add_rel_64 +#define atomic_clear_rel_long atomic_clear_rel_64 +#define atomic_cmpset_rel_long atomic_cmpset_rel_64 +#define atomic_set_rel_long atomic_set_rel_64 +#define atomic_subtract_rel_long atomic_subtract_rel_64 +#define atomic_store_rel_long atomic_store_rel_64 - __asm __volatile( - "1: ldxr %0, [%2] \n" - " sub %0, %0, %3 \n" - " stlxr %w1, %0, [%2] \n" - " cbnz %w1, 1b \n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" - ); -} +#define atomic_add_rel_ptr atomic_add_rel_64 +#define atomic_clear_rel_ptr atomic_clear_rel_64 +#define atomic_cmpset_rel_ptr atomic_cmpset_rel_64 +#define atomic_set_rel_ptr atomic_set_rel_64 +#define atomic_subtract_rel_ptr atomic_subtract_rel_64 +#define atomic_store_rel_ptr atomic_store_rel_64 static __inline void atomic_thread_fence_acq(void) @@ -775,19 +407,5 @@ atomic_thread_fence_seq_cst(void) dmb(sy); } -#define atomic_add_rel_long atomic_add_rel_64 -#define atomic_clear_rel_long atomic_clear_rel_64 -#define atomic_cmpset_rel_long atomic_cmpset_rel_64 -#define atomic_set_rel_long atomic_set_rel_64 -#define atomic_subtract_rel_long atomic_subtract_rel_64 -#define atomic_store_rel_long atomic_store_rel_64 - -#define atomic_add_rel_ptr atomic_add_rel_64 -#define atomic_clear_rel_ptr atomic_clear_rel_64 -#define atomic_cmpset_rel_ptr atomic_cmpset_rel_64 -#define atomic_set_rel_ptr atomic_set_rel_64 -#define atomic_subtract_rel_ptr atomic_subtract_rel_64 -#define atomic_store_rel_ptr atomic_store_rel_64 - #endif /* _MACHINE_ATOMIC_H_ */ From owner-svn-src-all@freebsd.org Tue Dec 1 12:37:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0F98A24924; Tue, 1 Dec 2015 12:37:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4A301248; Tue, 1 Dec 2015 12:37:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1Cb4X6037217; Tue, 1 Dec 2015 12:37:04 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1Cb4h7037215; Tue, 1 Dec 2015 12:37:04 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201512011237.tB1Cb4h7037215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 1 Dec 2015 12:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291581 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 12:37:06 -0000 Author: andrew Date: Tue Dec 1 12:37:04 2015 New Revision: 291581 URL: https://svnweb.freebsd.org/changeset/base/291581 Log: Rework the exception entry/return functions to make them valid frames to be unwound through. For this we need the frame pointer (x29) to point to the location on the stack where we stored the previous frame pointer, and link register. To simplify this the stack pointer is only adjusted by addition and subtraction, and not through the use of post increment on loads and stores. The updated frame layout is: +------------+ | lr -- x30 | +------------+ | fp -- x29 | <-- x29 points at this +------------+ | Trap frame | | ... | | | <-- sp points at this +------------+ The only difference is the first two items, and setting of x29. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/exception.S head/sys/arm64/arm64/genassym.c Modified: head/sys/arm64/arm64/exception.S ============================================================================== --- head/sys/arm64/arm64/exception.S Tue Dec 1 12:27:36 2015 (r291580) +++ head/sys/arm64/arm64/exception.S Tue Dec 1 12:37:04 2015 (r291581) @@ -37,29 +37,32 @@ __FBSDID("$FreeBSD$"); mov x18, sp sub sp, sp, #128 .endif - stp x28, x29, [sp, #-16]! - stp x26, x27, [sp, #-16]! - stp x24, x25, [sp, #-16]! - stp x22, x23, [sp, #-16]! - stp x20, x21, [sp, #-16]! - stp x18, x19, [sp, #-16]! - stp x16, x17, [sp, #-16]! - stp x14, x15, [sp, #-16]! - stp x12, x13, [sp, #-16]! - stp x10, x11, [sp, #-16]! - stp x8, x9, [sp, #-16]! - stp x6, x7, [sp, #-16]! - stp x4, x5, [sp, #-16]! - stp x2, x3, [sp, #-16]! - stp x0, x1, [sp, #-16]! + sub sp, sp, #(TF_SIZE + 16) + stp x29, x30, [sp, #(TF_SIZE)] + stp x28, x29, [sp, #(TF_X + 28 * 8)] + stp x26, x27, [sp, #(TF_X + 26 * 8)] + stp x24, x25, [sp, #(TF_X + 24 * 8)] + stp x22, x23, [sp, #(TF_X + 22 * 8)] + stp x20, x21, [sp, #(TF_X + 20 * 8)] + stp x18, x19, [sp, #(TF_X + 18 * 8)] + stp x16, x17, [sp, #(TF_X + 16 * 8)] + stp x14, x15, [sp, #(TF_X + 14 * 8)] + stp x12, x13, [sp, #(TF_X + 12 * 8)] + stp x10, x11, [sp, #(TF_X + 10 * 8)] + stp x8, x9, [sp, #(TF_X + 8 * 8)] + stp x6, x7, [sp, #(TF_X + 6 * 8)] + stp x4, x5, [sp, #(TF_X + 4 * 8)] + stp x2, x3, [sp, #(TF_X + 2 * 8)] + stp x0, x1, [sp, #(TF_X + 0 * 8)] mrs x10, elr_el1 mrs x11, spsr_el1 .if \el == 0 mrs x18, sp_el0 .endif - stp x10, x11, [sp, #-16]! - stp x18, lr, [sp, #-16]! + stp x10, x11, [sp, #(TF_ELR)] + stp x18, lr, [sp, #(TF_SP)] mrs x18, tpidr_el1 + add x29, sp, #(TF_SIZE) .endm .macro restore_registers el @@ -70,33 +73,35 @@ __FBSDID("$FreeBSD$"); * handler. For EL0 exceptions, do_ast already did this. */ .endif - ldp x18, lr, [sp], #16 - ldp x10, x11, [sp], #16 + ldp x18, lr, [sp, #(TF_SP)] + ldp x10, x11, [sp, #(TF_ELR)] .if \el == 0 msr sp_el0, x18 .endif msr spsr_el1, x11 msr elr_el1, x10 - ldp x0, x1, [sp], #16 - ldp x2, x3, [sp], #16 - ldp x4, x5, [sp], #16 - ldp x6, x7, [sp], #16 - ldp x8, x9, [sp], #16 - ldp x10, x11, [sp], #16 - ldp x12, x13, [sp], #16 - ldp x14, x15, [sp], #16 - ldp x16, x17, [sp], #16 + ldp x0, x1, [sp, #(TF_X + 0 * 8)] + ldp x2, x3, [sp, #(TF_X + 2 * 8)] + ldp x4, x5, [sp, #(TF_X + 4 * 8)] + ldp x6, x7, [sp, #(TF_X + 6 * 8)] + ldp x8, x9, [sp, #(TF_X + 8 * 8)] + ldp x10, x11, [sp, #(TF_X + 10 * 8)] + ldp x12, x13, [sp, #(TF_X + 12 * 8)] + ldp x14, x15, [sp, #(TF_X + 14 * 8)] + ldp x16, x17, [sp, #(TF_X + 16 * 8)] .if \el == 0 - ldp x18, x19, [sp], #16 + ldp x18, x19, [sp, #(TF_X + 18 * 8)] .else - ldp xzr, x19, [sp], #16 + ldr x19, [sp, #(TF_X + 19 * 8)] .endif - ldp x20, x21, [sp], #16 - ldp x22, x23, [sp], #16 - ldp x24, x25, [sp], #16 - ldp x26, x27, [sp], #16 - ldp x28, x29, [sp], #16 -.if \el == 1 + ldp x20, x21, [sp, #(TF_X + 20 * 8)] + ldp x22, x23, [sp, #(TF_X + 22 * 8)] + ldp x24, x25, [sp, #(TF_X + 24 * 8)] + ldp x26, x27, [sp, #(TF_X + 26 * 8)] + ldp x28, x29, [sp, #(TF_X + 28 * 8)] +.if \el == 0 + add sp, sp, #(TF_SIZE + 16) +.else mov sp, x18 mrs x18, tpidr_el1 .endif Modified: head/sys/arm64/arm64/genassym.c ============================================================================== --- head/sys/arm64/arm64/genassym.c Tue Dec 1 12:27:36 2015 (r291580) +++ head/sys/arm64/arm64/genassym.c Tue Dec 1 12:37:04 2015 (r291581) @@ -60,4 +60,7 @@ ASSYM(TD_PCB, offsetof(struct thread, td ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); ASSYM(TD_LOCK, offsetof(struct thread, td_lock)); +ASSYM(TF_SIZE, sizeof(struct trapframe)); +ASSYM(TF_SP, offsetof(struct trapframe, tf_sp)); +ASSYM(TF_ELR, offsetof(struct trapframe, tf_elr)); ASSYM(TF_X, offsetof(struct trapframe, tf_x)); From owner-svn-src-all@freebsd.org Tue Dec 1 13:20:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF690A3D30D; Tue, 1 Dec 2015 13:20:22 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B4BD1B8D; Tue, 1 Dec 2015 13:20:22 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1DKLbP049481; Tue, 1 Dec 2015 13:20:21 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1DKLhG049480; Tue, 1 Dec 2015 13:20:21 GMT (envelope-from des@FreeBSD.org) Message-Id: <201512011320.tB1DKLhG049480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 1 Dec 2015 13:20:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291582 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 13:20:22 -0000 Author: des Date: Tue Dec 1 13:20:21 2015 New Revision: 291582 URL: https://svnweb.freebsd.org/changeset/base/291582 Log: Load our configuration before setting defaults, so local_unbound_workdir actually has an effect. PR: 204931 Submitted by: Eugene Grosbein MFC after: 1 week Modified: head/etc/rc.d/local_unbound Modified: head/etc/rc.d/local_unbound ============================================================================== --- head/etc/rc.d/local_unbound Tue Dec 1 12:37:04 2015 (r291581) +++ head/etc/rc.d/local_unbound Tue Dec 1 13:20:21 2015 (r291582) @@ -24,6 +24,8 @@ configtest_cmd="local_unbound_configtest setup_cmd="local_unbound_setup" pidfile="/var/run/${name}.pid" +load_rc_config $name + : ${local_unbound_workdir:=/var/unbound} : ${local_unbound_config:=${local_unbound_workdir}/unbound.conf} : ${local_unbound_flags:="-c ${local_unbound_config}"} @@ -32,8 +34,6 @@ pidfile="/var/run/${name}.pid" : ${local_unbound_anchor:=${local_unbound_workdir}/root.key} : ${local_unbound_forwarders:=} -load_rc_config $name - do_as_unbound() { echo "$@" | su -m unbound From owner-svn-src-all@freebsd.org Tue Dec 1 14:02:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE95AA3E146; Tue, 1 Dec 2015 14:02:15 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 810A61966; Tue, 1 Dec 2015 14:02:15 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1E2EpP063693; Tue, 1 Dec 2015 14:02:14 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1E2EVD063692; Tue, 1 Dec 2015 14:02:14 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201512011402.tB1E2EVD063692@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 1 Dec 2015 14:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291583 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 14:02:15 -0000 Author: trasz Date: Tue Dec 1 14:02:14 2015 New Revision: 291583 URL: https://svnweb.freebsd.org/changeset/base/291583 Log: Fix rctl rule filters - eg the 'rctl -r :' case. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c ============================================================================== --- head/usr.bin/rctl/rctl.c Tue Dec 1 13:20:21 2015 (r291582) +++ head/usr.bin/rctl/rctl.c Tue Dec 1 14:02:14 2015 (r291583) @@ -111,22 +111,38 @@ parse_group(const char *s, id_t *gidp, c * Replace human-readable number with its expanded form. */ static char * -expand_amount(char *rule, const char *unexpanded_rule) +expand_amount(const char *rule, const char *unexpanded_rule) { uint64_t num; const char *subject, *subject_id, *resource, *action, *amount, *per; - char *expanded; + char *copy, *expanded, *tofree; int ret; - subject = strsep(&rule, ":"); - subject_id = strsep(&rule, ":"); - resource = strsep(&rule, ":"); - action = strsep(&rule, "=/"); - amount = strsep(&rule, "/"); - per = rule; + tofree = copy = strdup(rule); + if (copy == NULL) { + warn("strdup"); + return (NULL); + } - if (amount == NULL || strlen(amount) == 0) - return (rule); + subject = strsep(©, ":"); + subject_id = strsep(©, ":"); + resource = strsep(©, ":"); + action = strsep(©, "=/"); + amount = strsep(©, "/"); + per = copy; + + if (amount == NULL || strlen(amount) == 0) { + /* + * The "copy" has already been tinkered with by strsep(). + */ + free(tofree); + copy = strdup(rule); + if (copy == NULL) { + warn("strdup"); + return (NULL); + } + return (copy); + } assert(subject != NULL); assert(subject_id != NULL); @@ -136,6 +152,7 @@ expand_amount(char *rule, const char *un if (expand_number(amount, &num)) { warnx("malformed rule '%s': invalid numeric value '%s'", unexpanded_rule, amount); + free(tofree); return (NULL); } @@ -149,9 +166,12 @@ expand_amount(char *rule, const char *un if (ret <= 0) { warn("asprintf"); + free(tofree); return (NULL); } + free(tofree); + return (expanded); } From owner-svn-src-all@freebsd.org Tue Dec 1 14:16:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1675FA3E635; Tue, 1 Dec 2015 14:16:43 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8777317B4; Tue, 1 Dec 2015 14:16:42 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tB1EGTIT087234 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 1 Dec 2015 16:16:30 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tB1EGTIT087234 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tB1EGTg5087233; Tue, 1 Dec 2015 16:16:29 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 1 Dec 2015 16:16:29 +0200 From: Konstantin Belousov To: Garrett Cooper Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291566 - in head: . lib/libelf Message-ID: <20151201141629.GV3448@kib.kiev.ua> References: <201512010609.tB169MJH023576@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201512010609.tB169MJH023576@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 14:16:43 -0000 On Tue, Dec 01, 2015 at 06:09:22AM +0000, Garrett Cooper wrote: > Author: ngie > Date: Tue Dec 1 06:09:22 2015 > New Revision: 291566 > URL: https://svnweb.freebsd.org/changeset/base/291566 > > Log: > Move libelf.so.2 from /usr/lib to /lib to unbreak libkvm use after r291406 > > Tested with the following commands as root: > - yes | make delete-old > - service ldconfig restart > - netstat -nr > > X-MFC with: r291406 > Reviewed by: jhb, kib > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/ObsoleteFiles.inc > head/lib/libelf/Makefile > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Tue Dec 1 05:59:53 2015 (r291565) > +++ head/ObsoleteFiles.inc Tue Dec 1 06:09:22 2015 (r291566) > @@ -38,6 +38,8 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406) > +OLD_FILES+=usr/lib/libelf.so.2 Apparently this is wrong. It should be OLD_LIBS. From owner-svn-src-all@freebsd.org Tue Dec 1 14:55:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CA77A3ED24; Tue, 1 Dec 2015 14:55:26 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDCC41E0B; Tue, 1 Dec 2015 14:55:25 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1EtOSI079340; Tue, 1 Dec 2015 14:55:24 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1EtOjs079338; Tue, 1 Dec 2015 14:55:24 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512011455.tB1EtOjs079338@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 1 Dec 2015 14:55:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291584 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 14:55:26 -0000 Author: arybchik Date: Tue Dec 1 14:55:24 2015 New Revision: 291584 URL: https://svnweb.freebsd.org/changeset/base/291584 Log: sfxge: parse packets for TSO early in if_transmit Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D4309 Modified: head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Tue Dec 1 14:02:14 2015 (r291583) +++ head/sys/dev/sfxge/sfxge_tx.c Tue Dec 1 14:55:24 2015 (r291584) @@ -710,6 +710,84 @@ sfxge_if_qflush(struct ifnet *ifp) sfxge_tx_qdpl_flush(sc->txq[i]); } +#if SFXGE_TX_PARSE_EARLY + +/* There is little space for user data in mbuf pkthdr, so we + * use l*hlen fields which are not used by the driver otherwise + * to store header offsets. + * The fields are 8-bit, but it's ok, no header may be longer than 255 bytes. + */ + + +#define TSO_MBUF_PROTO(_mbuf) ((_mbuf)->m_pkthdr.PH_loc.sixteen[0]) +/* We abuse l5hlen here because PH_loc can hold only 64 bits of data */ +#define TSO_MBUF_FLAGS(_mbuf) ((_mbuf)->m_pkthdr.l5hlen) +#define TSO_MBUF_PACKETID(_mbuf) ((_mbuf)->m_pkthdr.PH_loc.sixteen[1]) +#define TSO_MBUF_SEQNUM(_mbuf) ((_mbuf)->m_pkthdr.PH_loc.thirtytwo[1]) + +static void sfxge_parse_tx_packet(struct mbuf *mbuf) +{ + struct ether_header *eh = mtod(mbuf, struct ether_header *); + const struct tcphdr *th; + struct tcphdr th_copy; + + /* Find network protocol and header */ + TSO_MBUF_PROTO(mbuf) = eh->ether_type; + if (TSO_MBUF_PROTO(mbuf) == htons(ETHERTYPE_VLAN)) { + struct ether_vlan_header *veh = + mtod(mbuf, struct ether_vlan_header *); + TSO_MBUF_PROTO(mbuf) = veh->evl_proto; + mbuf->m_pkthdr.l2hlen = sizeof(*veh); + } else { + mbuf->m_pkthdr.l2hlen = sizeof(*eh); + } + + /* Find TCP header */ + if (TSO_MBUF_PROTO(mbuf) == htons(ETHERTYPE_IP)) { + const struct ip *iph = (const struct ip *)mtodo(mbuf, mbuf->m_pkthdr.l2hlen); + + KASSERT(iph->ip_p == IPPROTO_TCP, + ("TSO required on non-TCP packet")); + mbuf->m_pkthdr.l3hlen = mbuf->m_pkthdr.l2hlen + 4 * iph->ip_hl; + TSO_MBUF_PACKETID(mbuf) = iph->ip_id; + } else { + KASSERT(TSO_MBUF_PROTO(mbuf) == htons(ETHERTYPE_IPV6), + ("TSO required on non-IP packet")); + KASSERT(((const struct ip6_hdr *)mtodo(mbuf, mbuf->m_pkthdr.l2hlen))->ip6_nxt == + IPPROTO_TCP, + ("TSO required on non-TCP packet")); + mbuf->m_pkthdr.l3hlen = mbuf->m_pkthdr.l2hlen + sizeof(struct ip6_hdr); + TSO_MBUF_PACKETID(mbuf) = 0; + } + + KASSERT(mbuf->m_len >= mbuf->m_pkthdr.l3hlen, + ("network header is fragmented in mbuf")); + + /* We need TCP header including flags (window is the next) */ + if (mbuf->m_len < mbuf->m_pkthdr.l3hlen + offsetof(struct tcphdr, th_win)) { + m_copydata(mbuf, mbuf->m_pkthdr.l3hlen, sizeof(th_copy), + (caddr_t)&th_copy); + th = &th_copy; + } else { + th = (const struct tcphdr *)mtodo(mbuf, mbuf->m_pkthdr.l3hlen); + } + + mbuf->m_pkthdr.l4hlen = mbuf->m_pkthdr.l3hlen + 4 * th->th_off; + TSO_MBUF_SEQNUM(mbuf) = ntohl(th->th_seq); + + /* These flags must not be duplicated */ + /* + * RST should not be duplicated as well, but FreeBSD kernel + * generates TSO packets with RST flag. So, do not assert + * its absence. + */ + KASSERT(!(th->th_flags & (TH_URG | TH_SYN)), + ("incompatible TCP flag 0x%x on TSO packet", + th->th_flags & (TH_URG | TH_SYN))); + TSO_MBUF_FLAGS(mbuf) = th->th_flags; +} +#endif + /* * TX start -- called by the stack. */ @@ -744,6 +822,10 @@ sfxge_if_transmit(struct ifnet *ifp, str index = sc->rx_indir_table[hash % SFXGE_RX_SCALE_MAX]; } +#if SFXGE_TX_PARSE_EARLY + if (m->m_pkthdr.csum_flags & CSUM_TSO) + sfxge_parse_tx_packet(m); +#endif txq = sc->txq[SFXGE_TXQ_IP_TCP_UDP_CKSUM + index]; } else if (m->m_pkthdr.csum_flags & CSUM_DELAY_IP) { txq = sc->txq[SFXGE_TXQ_IP_CKSUM]; @@ -781,26 +863,32 @@ struct sfxge_tso_state { unsigned seg_size; /* TCP segment size */ int fw_assisted; /* Use FW-assisted TSO */ u_short packet_id; /* IPv4 packet ID from the original packet */ + uint8_t tcp_flags; /* TCP flags */ efx_desc_t header_desc; /* Precomputed header descriptor for * FW-assisted TSO */ }; +#if !SFXGE_TX_PARSE_EARLY static const struct ip *tso_iph(const struct sfxge_tso_state *tso) { KASSERT(tso->protocol == htons(ETHERTYPE_IP), ("tso_iph() in non-IPv4 state")); return (const struct ip *)(tso->mbuf->m_data + tso->nh_off); } + static __unused const struct ip6_hdr *tso_ip6h(const struct sfxge_tso_state *tso) { KASSERT(tso->protocol == htons(ETHERTYPE_IPV6), ("tso_ip6h() in non-IPv6 state")); return (const struct ip6_hdr *)(tso->mbuf->m_data + tso->nh_off); } + static const struct tcphdr *tso_tcph(const struct sfxge_tso_state *tso) { return (const struct tcphdr *)(tso->mbuf->m_data + tso->tcph_off); } +#endif + /* Size of preallocated TSO header buffers. Larger blocks must be * allocated from the heap. @@ -857,15 +945,18 @@ static void tso_start(struct sfxge_txq * const bus_dma_segment_t *hdr_dma_seg, struct mbuf *mbuf) { - struct ether_header *eh = mtod(mbuf, struct ether_header *); const efx_nic_cfg_t *encp = efx_nic_cfg_get(txq->sc->enp); +#if !SFXGE_TX_PARSE_EARLY + struct ether_header *eh = mtod(mbuf, struct ether_header *); const struct tcphdr *th; struct tcphdr th_copy; +#endif tso->fw_assisted = txq->sc->tso_fw_assisted; tso->mbuf = mbuf; /* Find network protocol and header */ +#if !SFXGE_TX_PARSE_EARLY tso->protocol = eh->ether_type; if (tso->protocol == htons(ETHERTYPE_VLAN)) { struct ether_vlan_header *veh = @@ -875,7 +966,14 @@ static void tso_start(struct sfxge_txq * } else { tso->nh_off = sizeof(*eh); } +#else + tso->protocol = TSO_MBUF_PROTO(mbuf); + tso->nh_off = mbuf->m_pkthdr.l2hlen; + tso->tcph_off = mbuf->m_pkthdr.l3hlen; + tso->packet_id = TSO_MBUF_PACKETID(mbuf); +#endif +#if !SFXGE_TX_PARSE_EARLY /* Find TCP header */ if (tso->protocol == htons(ETHERTYPE_IP)) { KASSERT(tso_iph(tso)->ip_p == IPPROTO_TCP, @@ -890,12 +988,17 @@ static void tso_start(struct sfxge_txq * tso->tcph_off = tso->nh_off + sizeof(struct ip6_hdr); tso->packet_id = 0; } +#endif + + if (tso->fw_assisted && __predict_false(tso->tcph_off > encp->enc_tx_tso_tcp_header_offset_limit)) { tso->fw_assisted = 0; } + +#if !SFXGE_TX_PARSE_EARLY KASSERT(mbuf->m_len >= tso->tcph_off, ("network header is fragmented in mbuf")); /* We need TCP header including flags (window is the next) */ @@ -906,10 +1009,13 @@ static void tso_start(struct sfxge_txq * } else { th = tso_tcph(tso); } - tso->header_len = tso->tcph_off + 4 * th->th_off; +#else + tso->header_len = mbuf->m_pkthdr.l4hlen; +#endif tso->seg_size = mbuf->m_pkthdr.tso_segsz; +#if !SFXGE_TX_PARSE_EARLY tso->seqnum = ntohl(th->th_seq); /* These flags must not be duplicated */ @@ -921,6 +1027,11 @@ static void tso_start(struct sfxge_txq * KASSERT(!(th->th_flags & (TH_URG | TH_SYN)), ("incompatible TCP flag 0x%x on TSO packet", th->th_flags & (TH_URG | TH_SYN))); + tso->tcp_flags = th->th_flags; +#else + tso->seqnum = TSO_MBUF_SEQNUM(mbuf); + tso->tcp_flags = TSO_MBUF_FLAGS(mbuf); +#endif tso->out_len = mbuf->m_pkthdr.len - tso->header_len; @@ -1001,7 +1112,7 @@ static int tso_start_new_packet(struct s int rc; if (tso->fw_assisted) { - uint8_t tcp_flags = tso_tcph(tso)->th_flags; + uint8_t tcp_flags = tso->tcp_flags; if (tso->out_len > tso->seg_size) tcp_flags &= ~(TH_FIN | TH_PUSH); Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Tue Dec 1 14:02:14 2015 (r291583) +++ head/sys/dev/sfxge/sfxge_tx.h Tue Dec 1 14:55:24 2015 (r291584) @@ -40,6 +40,11 @@ #include #include +/* If defined, parse TX packets directly in if_transmit + * for better cache locality and reduced time under TX lock + */ +#define SFXGE_TX_PARSE_EARLY 1 + /* Maximum size of TSO packet */ #define SFXGE_TSO_MAX_SIZE (65535) From owner-svn-src-all@freebsd.org Tue Dec 1 15:26:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 959B5A2C950; Tue, 1 Dec 2015 15:26:47 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46CCF15E0; Tue, 1 Dec 2015 15:26:47 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1FQkj1088415; Tue, 1 Dec 2015 15:26:46 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1FQkHG088414; Tue, 1 Dec 2015 15:26:46 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512011526.tB1FQkHG088414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 1 Dec 2015 15:26:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291585 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 15:26:47 -0000 Author: arybchik Date: Tue Dec 1 15:26:46 2015 New Revision: 291585 URL: https://svnweb.freebsd.org/changeset/base/291585 Log: sfxge: support MAC spoofing for 4.2.x firmare Common code should infer other privileges from Admin privilege to support firmware that pre-dates introduction of specific privilege flags. Submitted by: Richard Houldsworth Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4327 Modified: head/sys/dev/sfxge/common/hunt_mcdi.c Modified: head/sys/dev/sfxge/common/hunt_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_mcdi.c Tue Dec 1 14:55:24 2015 (r291584) +++ head/sys/dev/sfxge/common/hunt_mcdi.c Tue Dec 1 15:26:46 2015 (r291585) @@ -435,7 +435,11 @@ hunt_mcdi_fw_update_supported( EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON); - /* use privilege mask state at MCDI attach */ + /* + * Use privilege mask state at MCDI attach. + * Admin privilege must be used prior to introduction of + * specific flag. + */ *supportedp = (encp->enc_privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) == MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN; @@ -449,13 +453,20 @@ hunt_mcdi_macaddr_change_supported( __out boolean_t *supportedp) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); + uint32_t privilege_mask = encp->enc_privilege_mask; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON); - /* use privilege mask state at MCDI attach */ - *supportedp = (encp->enc_privilege_mask & - MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) - == MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING; + /* + * Use privilege mask state at MCDI attach. + * Admin privilege must be used prior to introduction of + * specific flag (at v4.6). + */ + *supportedp = + ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) == + MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) || + ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) == + MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN); return (0); } From owner-svn-src-all@freebsd.org Tue Dec 1 15:29:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE493A2CA33; Tue, 1 Dec 2015 15:29:52 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE7B219E3; Tue, 1 Dec 2015 15:29:52 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1FTpf4088696; Tue, 1 Dec 2015 15:29:51 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1FTpDW088695; Tue, 1 Dec 2015 15:29:51 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512011529.tB1FTpDW088695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 1 Dec 2015 15:29:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291586 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 15:29:53 -0000 Author: arybchik Date: Tue Dec 1 15:29:51 2015 New Revision: 291586 URL: https://svnweb.freebsd.org/changeset/base/291586 Log: sfxge: allow VFs to have locally administered MAC addresses Submitted by: Mark Spender Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4328 Modified: head/sys/dev/sfxge/common/hunt_nic.c Modified: head/sys/dev/sfxge/common/hunt_nic.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_nic.c Tue Dec 1 15:26:46 2015 (r291585) +++ head/sys/dev/sfxge/common/hunt_nic.c Tue Dec 1 15:29:51 2015 (r291586) @@ -1071,18 +1071,18 @@ hunt_board_cfg( /* MAC address for this function */ if (EFX_PCI_FUNCTION_IS_PF(encp)) { rc = efx_mcdi_get_mac_address_pf(enp, mac_addr); + if ((rc == 0) && (mac_addr[0] & 0x02)) { + /* + * If the static config does not include a global MAC + * address pool then the board may return a locally + * administered MAC address (this should only happen on + * incorrectly programmed boards). + */ + rc = EINVAL; + } } else { rc = efx_mcdi_get_mac_address_vf(enp, mac_addr); } - if ((rc == 0) && (mac_addr[0] & 0x02)) { - /* - * If the static config does not include a global MAC address - * pool then the board may return a locally administered MAC - * address (this should only happen on incorrectly programmed - * boards). - */ - rc = EINVAL; - } if (rc != 0) goto fail4; From owner-svn-src-all@freebsd.org Tue Dec 1 15:32:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6DEFA2CC1F; Tue, 1 Dec 2015 15:32:38 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84ED51E7D; Tue, 1 Dec 2015 15:32:38 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1FWbLV091422; Tue, 1 Dec 2015 15:32:37 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1FWbTM091421; Tue, 1 Dec 2015 15:32:37 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512011532.tB1FWbTM091421@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 1 Dec 2015 15:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291587 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 15:32:38 -0000 Author: arybchik Date: Tue Dec 1 15:32:37 2015 New Revision: 291587 URL: https://svnweb.freebsd.org/changeset/base/291587 Log: sfxge: FPGA and FPGA backup (diagnostic) partitions added to hunt_parttbl It allows manftest to program them. Submitted by: Paul Fox Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4329 Modified: head/sys/dev/sfxge/common/hunt_nvram.c Modified: head/sys/dev/sfxge/common/hunt_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_nvram.c Tue Dec 1 15:29:51 2015 (r291586) +++ head/sys/dev/sfxge/common/hunt_nvram.c Tue Dec 1 15:32:37 2015 (r291587) @@ -1490,7 +1490,15 @@ static hunt_parttbl_entry_t hunt_parttbl {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 1, EFX_NVRAM_DYNAMIC_CFG}, {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 2, EFX_NVRAM_DYNAMIC_CFG}, {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 3, EFX_NVRAM_DYNAMIC_CFG}, - {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 4, EFX_NVRAM_DYNAMIC_CFG} + {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 4, EFX_NVRAM_DYNAMIC_CFG}, + {NVRAM_PARTITION_TYPE_FPGA, 1, EFX_NVRAM_FPGA}, + {NVRAM_PARTITION_TYPE_FPGA, 2, EFX_NVRAM_FPGA}, + {NVRAM_PARTITION_TYPE_FPGA, 3, EFX_NVRAM_FPGA}, + {NVRAM_PARTITION_TYPE_FPGA, 4, EFX_NVRAM_FPGA}, + {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 1, EFX_NVRAM_FPGA_BACKUP}, + {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 2, EFX_NVRAM_FPGA_BACKUP}, + {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 3, EFX_NVRAM_FPGA_BACKUP}, + {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 4, EFX_NVRAM_FPGA_BACKUP} }; static __checkReturn hunt_parttbl_entry_t * From owner-svn-src-all@freebsd.org Tue Dec 1 15:38:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C8CBA2CE3E; Tue, 1 Dec 2015 15:38:41 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55AEB12F7; Tue, 1 Dec 2015 15:38:41 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1FceH3092016; Tue, 1 Dec 2015 15:38:40 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1FcdKS092009; Tue, 1 Dec 2015 15:38:39 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512011538.tB1FcdKS092009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 1 Dec 2015 15:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291588 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 15:38:41 -0000 Author: arybchik Date: Tue Dec 1 15:38:39 2015 New Revision: 291588 URL: https://svnweb.freebsd.org/changeset/base/291588 Log: sfxge: add function to query link control privilege Make link control privilege visible to OS driver to guard updates to flow control and PHY advertised capabilities. Submitted by: Richard Houldsworth Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4330 Modified: head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/efx_mcdi.c head/sys/dev/sfxge/common/efx_mcdi.h head/sys/dev/sfxge/common/hunt_impl.h head/sys/dev/sfxge/common/hunt_mcdi.c head/sys/dev/sfxge/common/siena_impl.h head/sys/dev/sfxge/common/siena_mcdi.c Modified: head/sys/dev/sfxge/common/efx_impl.h ============================================================================== --- head/sys/dev/sfxge/common/efx_impl.h Tue Dec 1 15:32:37 2015 (r291587) +++ head/sys/dev/sfxge/common/efx_impl.h Tue Dec 1 15:38:39 2015 (r291588) @@ -462,6 +462,7 @@ typedef struct efx_mcdi_ops_s { void (*emco_fini)(efx_nic_t *); efx_rc_t (*emco_fw_update_supported)(efx_nic_t *, boolean_t *); efx_rc_t (*emco_macaddr_change_supported)(efx_nic_t *, boolean_t *); + efx_rc_t (*emco_link_control_supported)(efx_nic_t *, boolean_t *); } efx_mcdi_ops_t; typedef struct efx_mcdi_s { Modified: head/sys/dev/sfxge/common/efx_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.c Tue Dec 1 15:32:37 2015 (r291587) +++ head/sys/dev/sfxge/common/efx_mcdi.c Tue Dec 1 15:38:39 2015 (r291588) @@ -53,6 +53,8 @@ static efx_mcdi_ops_t __efx_mcdi_siena_o siena_mcdi_fw_update_supported, /* emco_fw_update_supported */ siena_mcdi_macaddr_change_supported, /* emco_macaddr_change_supported */ + siena_mcdi_link_control_supported, + /* emco_link_control_supported */ }; #endif /* EFSYS_OPT_SIENA */ @@ -69,6 +71,8 @@ static efx_mcdi_ops_t __efx_mcdi_hunt_op hunt_mcdi_fw_update_supported, /* emco_fw_update_supported */ hunt_mcdi_macaddr_change_supported, /* emco_macaddr_change_supported */ + hunt_mcdi_link_control_supported, + /* emco_link_control_supported */ }; #endif /* EFSYS_OPT_HUNTINGTON */ @@ -1169,6 +1173,31 @@ fail1: return (rc); } + __checkReturn efx_rc_t +efx_mcdi_link_control_supported( + __in efx_nic_t *enp, + __out boolean_t *supportedp) +{ + efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop; + efx_rc_t rc; + + if (emcop != NULL && emcop->emco_link_control_supported != NULL) { + if ((rc = emcop->emco_link_control_supported(enp, supportedp)) + != 0) + goto fail1; + } else { + /* Earlier devices always supported link control */ + *supportedp = B_TRUE; + } + + return (0); + +fail1: + EFSYS_PROBE1(fail1, efx_rc_t, rc); + + return (rc); +} + #if EFSYS_OPT_BIST #if EFSYS_OPT_HUNTINGTON Modified: head/sys/dev/sfxge/common/efx_mcdi.h ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.h Tue Dec 1 15:32:37 2015 (r291587) +++ head/sys/dev/sfxge/common/efx_mcdi.h Tue Dec 1 15:38:39 2015 (r291588) @@ -151,6 +151,11 @@ efx_mcdi_macaddr_change_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); +extern __checkReturn efx_rc_t +efx_mcdi_link_control_supported( + __in efx_nic_t *enp, + __out boolean_t *supportedp); + #if EFSYS_OPT_BIST #if EFSYS_OPT_HUNTINGTON extern __checkReturn efx_rc_t Modified: head/sys/dev/sfxge/common/hunt_impl.h ============================================================================== --- head/sys/dev/sfxge/common/hunt_impl.h Tue Dec 1 15:32:37 2015 (r291587) +++ head/sys/dev/sfxge/common/hunt_impl.h Tue Dec 1 15:38:39 2015 (r291588) @@ -286,6 +286,11 @@ hunt_mcdi_macaddr_change_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); +extern __checkReturn efx_rc_t +hunt_mcdi_link_control_supported( + __in efx_nic_t *enp, + __out boolean_t *supportedp); + #endif /* EFSYS_OPT_MCDI */ /* NVRAM */ Modified: head/sys/dev/sfxge/common/hunt_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_mcdi.c Tue Dec 1 15:32:37 2015 (r291587) +++ head/sys/dev/sfxge/common/hunt_mcdi.c Tue Dec 1 15:38:39 2015 (r291588) @@ -471,6 +471,30 @@ hunt_mcdi_macaddr_change_supported( return (0); } + __checkReturn efx_rc_t +hunt_mcdi_link_control_supported( + __in efx_nic_t *enp, + __out boolean_t *supportedp) +{ + efx_nic_cfg_t *encp = &(enp->en_nic_cfg); + uint32_t privilege_mask = encp->enc_privilege_mask; + + EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON); + + /* + * Use privilege mask state at MCDI attach. + * Admin privilege used prior to introduction of + * specific flag. + */ + *supportedp = + ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK) == + MC_CMD_PRIVILEGE_MASK_IN_GRP_LINK) || + ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) == + MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN); + + return (0); +} + #endif /* EFSYS_OPT_MCDI */ #endif /* EFSYS_OPT_HUNTINGTON */ Modified: head/sys/dev/sfxge/common/siena_impl.h ============================================================================== --- head/sys/dev/sfxge/common/siena_impl.h Tue Dec 1 15:32:37 2015 (r291587) +++ head/sys/dev/sfxge/common/siena_impl.h Tue Dec 1 15:38:39 2015 (r291588) @@ -148,6 +148,11 @@ siena_mcdi_macaddr_change_supported( __in efx_nic_t *enp, __out boolean_t *supportedp); +extern __checkReturn efx_rc_t +siena_mcdi_link_control_supported( + __in efx_nic_t *enp, + __out boolean_t *supportedp); + #endif /* EFSYS_OPT_MCDI */ #if EFSYS_OPT_NVRAM || EFSYS_OPT_VPD Modified: head/sys/dev/sfxge/common/siena_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/siena_mcdi.c Tue Dec 1 15:32:37 2015 (r291587) +++ head/sys/dev/sfxge/common/siena_mcdi.c Tue Dec 1 15:38:39 2015 (r291588) @@ -351,4 +351,16 @@ siena_mcdi_macaddr_change_supported( return (0); } + __checkReturn efx_rc_t +siena_mcdi_link_control_supported( + __in efx_nic_t *enp, + __out boolean_t *supportedp) +{ + EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_SIENA); + + *supportedp = B_TRUE; + + return (0); +} + #endif /* EFSYS_OPT_SIENA && EFSYS_OPT_MCDI */ From owner-svn-src-all@freebsd.org Tue Dec 1 15:50:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF3B9A3D1CE; Tue, 1 Dec 2015 15:50:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D1761C56; Tue, 1 Dec 2015 15:50:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1FoZhx094995; Tue, 1 Dec 2015 15:50:35 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1FoZF3094994; Tue, 1 Dec 2015 15:50:35 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512011550.tB1FoZF3094994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 15:50:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291589 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 15:50:36 -0000 Author: bdrewery Date: Tue Dec 1 15:50:35 2015 New Revision: 291589 URL: https://svnweb.freebsd.org/changeset/base/291589 Log: FAST_DEPEND: Actually use -MP from DEPEND_MP, completing r291554. X-MFC-With: r291554 MFC after: 1 week Pointyhat to: bdrewery Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Tue Dec 1 15:38:39 2015 (r291588) +++ head/share/mk/bsd.dep.mk Tue Dec 1 15:50:35 2015 (r291589) @@ -63,7 +63,7 @@ DEPEND_MP?= -MP # Handle OBJS=../somefile.o hacks. Just replace '/' rather than use :T to # avoid collisions. DEPEND_FILTER= C,/,_,g -DEPEND_CFLAGS+= -MD -MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}} +DEPEND_CFLAGS+= -MD ${DEPEND_MP} -MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}} DEPEND_CFLAGS+= -MT${.TARGET} CFLAGS+= ${DEPEND_CFLAGS} DEPENDOBJS+= ${OBJS} ${POBJS} ${SOBJS} From owner-svn-src-all@freebsd.org Tue Dec 1 15:54:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B4D9A3D424; Tue, 1 Dec 2015 15:54:48 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4FFF11CE; Tue, 1 Dec 2015 15:54:47 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1FskJP097621; Tue, 1 Dec 2015 15:54:46 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1FskKl097620; Tue, 1 Dec 2015 15:54:46 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512011554.tB1FskKl097620@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 1 Dec 2015 15:54:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291590 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 15:54:48 -0000 Author: arybchik Date: Tue Dec 1 15:54:46 2015 New Revision: 291590 URL: https://svnweb.freebsd.org/changeset/base/291590 Log: sfxge: retry VF vAdaptor allocation if it fails because of no EVB port yet After an MC reboot, a VF driver may reset before the PF driver has finished bringing everything back up. This includes the VFs EVB port. MC_CMD_VADAPTOR_ALLOC is the first MCDI call after an MC reboot to require the EVB port, so if it fails with MC_CMD_ERR_NO_EVB_PORT, retry the command a few times after waiting a while. Submitted by: Mark Spender Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4333 Modified: head/sys/dev/sfxge/common/hunt_nic.c Modified: head/sys/dev/sfxge/common/hunt_nic.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_nic.c Tue Dec 1 15:50:35 2015 (r291589) +++ head/sys/dev/sfxge/common/hunt_nic.c Tue Dec 1 15:54:46 2015 (r291590) @@ -1532,6 +1532,8 @@ hunt_nic_init( uint32_t min_vi_count, max_vi_count; uint32_t vi_count, vi_base; uint32_t i; + uint32_t retry; + uint32_t delay_us; efx_rc_t rc; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON); @@ -1622,14 +1624,48 @@ hunt_nic_init( } } - /* Allocate a vAdapter attached to our upstream vPort/pPort */ - if ((rc = efx_mcdi_vadaptor_alloc(enp, EVB_PORT_ID_ASSIGNED)) != 0) - goto fail5; + /* + * Allocate a vAdaptor attached to our upstream vPort/pPort. + * + * On a VF, this may fail with MC_CMD_ERR_NO_EVB_PORT (ENOENT) if the PF + * driver has yet to bring up the EVB port. See bug 56147. In this case, + * retry the request several times after waiting a while. The wait time + * between retries starts small (10ms) and exponentially increases. + * Total wait time is a little over two seconds. Retry logic in the + * client driver may mean this whole loop is repeated if it continues to + * fail. + */ + retry = 0; + delay_us = 10000; + while ((rc = efx_mcdi_vadaptor_alloc(enp, EVB_PORT_ID_ASSIGNED)) != 0) { + if (EFX_PCI_FUNCTION_IS_PF(&enp->en_nic_cfg) || + (rc != ENOENT)) { + /* + * Do not retry alloc for PF, or for other errors on + * a VF. + */ + goto fail5; + } + + /* VF startup before PF is ready. Retry allocation. */ + if (retry > 5) { + /* Too many attempts */ + rc = EINVAL; + goto fail6; + } + EFSYS_PROBE1(mcdi_no_evb_port_retry, int, retry); + EFSYS_SLEEP(delay_us); + retry++; + if (delay_us < 500000) + delay_us <<= 2; + } enp->en_vport_id = EVB_PORT_ID_ASSIGNED; return (0); +fail6: + EFSYS_PROBE(fail6); fail5: EFSYS_PROBE(fail5); fail4: From owner-svn-src-all@freebsd.org Tue Dec 1 15:55:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 965E9A3D47F; Tue, 1 Dec 2015 15:55:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6397F1380; Tue, 1 Dec 2015 15:55:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1FtKbT097702; Tue, 1 Dec 2015 15:55:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1FtKgx097701; Tue, 1 Dec 2015 15:55:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512011555.tB1FtKgx097701@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 15:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291591 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 15:55:21 -0000 Author: bdrewery Date: Tue Dec 1 15:55:20 2015 New Revision: 291591 URL: https://svnweb.freebsd.org/changeset/base/291591 Log: Fix removal of libelf.so.2 and add missing files for it. X-MFC-With: r291566 Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 1 15:54:46 2015 (r291590) +++ head/ObsoleteFiles.inc Tue Dec 1 15:55:20 2015 (r291591) @@ -39,7 +39,10 @@ # done # 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406) -OLD_FILES+=usr/lib/libelf.so.2 +OLD_LIBS+=usr/lib/libelf.so.2 +OLD_FILES+=usr/lib/libelf.a +OLD_FILES+=usr/lib/libelf.so +OLD_FILES+=usr/lib/libelf_p.a # 20151115: Fox bad upgrade scheme OLD_FILES+=usr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030 OLD_FILES+=usr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312 From owner-svn-src-all@freebsd.org Tue Dec 1 15:56:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB3D4A3D4D7; Tue, 1 Dec 2015 15:56:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 938751583; Tue, 1 Dec 2015 15:56:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 8C5E3198E; Tue, 1 Dec 2015 15:56:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 43C5B143DC; Tue, 1 Dec 2015 15:56:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id MtuNWch3cfEZ; Tue, 1 Dec 2015 15:55:57 +0000 (UTC) Subject: Re: svn commit: r291566 - in head: . lib/libelf DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com A0FC7143D1 To: Konstantin Belousov , Garrett Cooper References: <201512010609.tB169MJH023576@repo.freebsd.org> <20151201141629.GV3448@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <565DC318.3010408@FreeBSD.org> Date: Tue, 1 Dec 2015 07:56:08 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151201141629.GV3448@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ia4u93Lx1Msp6feUeTHHa7niH8boKJb8x" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 15:56:00 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ia4u93Lx1Msp6feUeTHHa7niH8boKJb8x Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 12/1/2015 6:16 AM, Konstantin Belousov wrote: > On Tue, Dec 01, 2015 at 06:09:22AM +0000, Garrett Cooper wrote: >> Author: ngie >> Date: Tue Dec 1 06:09:22 2015 >> New Revision: 291566 >> URL: https://svnweb.freebsd.org/changeset/base/291566 >> >> Log: >> Move libelf.so.2 from /usr/lib to /lib to unbreak libkvm use after r= 291406 >> =20 >> Tested with the following commands as root: >> - yes | make delete-old >> - service ldconfig restart >> - netstat -nr >> =20 >> X-MFC with: r291406 >> Reviewed by: jhb, kib >> Sponsored by: EMC / Isilon Storage Division >> >> Modified: >> head/ObsoleteFiles.inc >> head/lib/libelf/Makefile >> >> Modified: head/ObsoleteFiles.inc >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/ObsoleteFiles.inc Tue Dec 1 05:59:53 2015 (r291565) >> +++ head/ObsoleteFiles.inc Tue Dec 1 06:09:22 2015 (r291566) >> @@ -38,6 +38,8 @@ >> # xargs -n1 | sort | uniq -d; >> # done >> =20 >> +# 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in = r291406) >> +OLD_FILES+=3Dusr/lib/libelf.so.2 > Apparently this is wrong. It should be OLD_LIBS. >=20 Yes. Fixed in r291591. --=20 Regards, Bryan Drewery --ia4u93Lx1Msp6feUeTHHa7niH8boKJb8x Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWXcMYAAoJEDXXcbtuRpfPCQMH/27AR8kYdnjX9BacbIIfySfU F0//GT93vbgOxWV1vN26bldnfeU63fFzoY2IweExfP6mA9TWV2ky6hS3M9HmIbIC u+Jcwy2I8MfDJuKlG1X03QD38sMpMEqWyeWagzs9t8XeHY60jQTS6r1gpEQRVVud 28b8yb6+O6C/oI+j1KQZR4yBMPunhutkbtDzp8j2l/U1rIA9PSBlZhGAiJOKEwZ7 kSFraIrLD6sEYrN6md0yCbBOSlH/tJhsyebIGxyFvH8P5dejXn0joZZqVnv141fq tldXkWmDhRtAk+x4VDxWJkCJ+P0bxEG8iPHD7XW9USI2OlZORvXxRkHfJmJ5flQ= =ewH2 -----END PGP SIGNATURE----- --ia4u93Lx1Msp6feUeTHHa7niH8boKJb8x-- From owner-svn-src-all@freebsd.org Tue Dec 1 16:04:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 751EEA3D89E; Tue, 1 Dec 2015 16:04:52 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2493B1DA9; Tue, 1 Dec 2015 16:04:52 +0000 (UTC) (envelope-from ume@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1G4pBh000699; Tue, 1 Dec 2015 16:04:51 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1G4pHa000698; Tue, 1 Dec 2015 16:04:51 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201512011604.tB1G4pHa000698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Tue, 1 Dec 2015 16:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291592 - head/usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 16:04:52 -0000 Author: ume Date: Tue Dec 1 16:04:50 2015 New Revision: 291592 URL: https://svnweb.freebsd.org/changeset/base/291592 Log: At the time a destination or a gateway of `netstat -r' protrudes its field, narrow the next field to raise readability bit. Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c ============================================================================== --- head/usr.bin/netstat/route.c Tue Dec 1 15:55:20 2015 (r291591) +++ head/usr.bin/netstat/route.c Tue Dec 1 16:04:50 2015 (r291592) @@ -107,7 +107,7 @@ static const char *netname4(in_addr_t, i static const char *netname6(struct sockaddr_in6 *, struct sockaddr_in6 *); static void p_rtable_sysctl(int, int); static void p_rtentry_sysctl(const char *name, struct rt_msghdr *); -static void p_sockaddr(const char *name, struct sockaddr *, struct sockaddr *, +static int p_sockaddr(const char *name, struct sockaddr *, struct sockaddr *, int, int); static const char *fmt_sockaddr(struct sockaddr *sa, struct sockaddr *mask, int flags); @@ -352,7 +352,7 @@ p_rtentry_sysctl(const char *name, struc struct sockaddr *sa, *addr[RTAX_MAX]; char buffer[128]; char prettyname[128]; - int i; + int i, protrusion; xo_open_instance(name); sa = (struct sockaddr *)(rtm + 1); @@ -362,11 +362,13 @@ p_rtentry_sysctl(const char *name, struc sa = (struct sockaddr *)((char *)sa + SA_SIZE(sa)); } - p_sockaddr("destination", addr[RTAX_DST], addr[RTAX_NETMASK], + protrusion = p_sockaddr("destination", addr[RTAX_DST], + addr[RTAX_NETMASK], rtm->rtm_flags, wid_dst); - p_sockaddr("gateway", addr[RTAX_GATEWAY], NULL, RTF_HOST, wid_gw); + protrusion = p_sockaddr("gateway", addr[RTAX_GATEWAY], NULL, RTF_HOST, + wid_gw - protrusion); snprintf(buffer, sizeof(buffer), "{[:-%d}{:flags/%%s}{]:} ", - wid_flags); + wid_flags - protrusion); p_flags(rtm->rtm_flags, buffer); if (Wflag) { xo_emit("{t:use/%*lu} ", wid_pksent, rtm->rtm_rmx.rmx_pksent); @@ -402,12 +404,13 @@ p_rtentry_sysctl(const char *name, struc xo_close_instance(name); } -static void +static int p_sockaddr(const char *name, struct sockaddr *sa, struct sockaddr *mask, int flags, int width) { const char *cp; char buf[128]; + int protrusion; cp = fmt_sockaddr(sa, mask, flags); @@ -419,12 +422,17 @@ p_sockaddr(const char *name, struct sock snprintf(buf, sizeof(buf), "{[:%d}{:%s/%%s}{]:} ", -width, name); xo_emit(buf, cp); + protrusion = strlen(cp) - width; + if (protrusion < 0) + protrusion = 0; } else { snprintf(buf, sizeof(buf), "{[:%d}{:%s/%%-.*s}{]:} ", -width, name); xo_emit(buf, width, cp); + protrusion = 0; } } + return (protrusion); } static const char * From owner-svn-src-all@freebsd.org Tue Dec 1 16:08:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED339A3DCC7; Tue, 1 Dec 2015 16:08:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B68DE100A; Tue, 1 Dec 2015 16:08:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1G8ctA002720; Tue, 1 Dec 2015 16:08:38 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1G8cWQ002719; Tue, 1 Dec 2015 16:08:38 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512011608.tB1G8cWQ002719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 16:08:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291593 - head/lib/libelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 16:08:40 -0000 Author: bdrewery Date: Tue Dec 1 16:08:38 2015 New Revision: 291593 URL: https://svnweb.freebsd.org/changeset/base/291593 Log: Correct r291566 for defining SHLIBDIR. This must happen before including bsd.own.mk which sets the default to /usr/lib. X-MFC-With: r291566 Reported by: Max N. Boyarov Modified: head/lib/libelf/Makefile Modified: head/lib/libelf/Makefile ============================================================================== --- head/lib/libelf/Makefile Tue Dec 1 16:04:50 2015 (r291592) +++ head/lib/libelf/Makefile Tue Dec 1 16:08:38 2015 (r291593) @@ -1,4 +1,7 @@ # $FreeBSD$ + +SHLIBDIR?= /lib + .include TOP= ${.CURDIR}/../../contrib/elftoolchain @@ -7,7 +10,6 @@ SRCDIR= ${TOP}/libelf .PATH: ${SRCDIR} LIB= elf -SHLIBDIR?= /lib SRCS= elf.c \ elf_begin.c \ From owner-svn-src-all@freebsd.org Tue Dec 1 16:13:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B84BA3DFF4; Tue, 1 Dec 2015 16:13:45 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp002.me.com (mr11p00im-asmtp002.me.com [17.110.69.253]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12E2E160C; Tue, 1 Dec 2015 16:13:45 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from [192.168.1.4] (c-24-6-178-251.hsd1.ca.comcast.net [24.6.178.251]) by mr11p00im-asmtp002.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar 31 2015)) with ESMTPSA id <0NYO00B1GT2U5O20@mr11p00im-asmtp002.me.com>; Tue, 01 Dec 2015 16:13:44 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-12-01_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510090000 definitions=main-1512010258 User-Agent: Microsoft-MacOutlook/0.0.0.151105 Date: Tue, 01 Dec 2015 08:13:41 -0800 Subject: Re: svn commit: r291592 - head/usr.bin/netstat From: Ravi Pokala Sender: "Pokala, Ravi" To: Hajimu UMEMOTO , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <319A5F79-53CD-40A1-9076-CF3EF33858A9@panasas.com> Thread-topic: svn commit: r291592 - head/usr.bin/netstat References: <201512011604.tB1G4pHa000698@repo.freebsd.org> In-reply-to: <201512011604.tB1G4pHa000698@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 16:13:45 -0000 Hi ume, The value returned by p_sockaddr("destination", ...) is saved to "protrusion", but it is never used before it is overwritten by the value returned by p_sockaddr("gateway", ...). That doesn't seem right. Thanks, Ravi (rpokala@) -----Original Message----- From: on behalf of Hajimu UMEMOTO Date: 2015-12-01, Tuesday at 08:04 To: , , Subject: svn commit: r291592 - head/usr.bin/netstat >Author: ume >Date: Tue Dec 1 16:04:50 2015 >New Revision: 291592 >URL: https://svnweb.freebsd.org/changeset/base/291592 > >Log: > At the time a destination or a gateway of `netstat -r' > protrudes its field, narrow the next field to raise > readability bit. > >Modified: > head/usr.bin/netstat/route.c > >Modified: head/usr.bin/netstat/route.c >============================================================================== >--- head/usr.bin/netstat/route.c Tue Dec 1 15:55:20 2015 (r291591) >+++ head/usr.bin/netstat/route.c Tue Dec 1 16:04:50 2015 (r291592) >@@ -107,7 +107,7 @@ static const char *netname4(in_addr_t, i > static const char *netname6(struct sockaddr_in6 *, struct sockaddr_in6 *); > static void p_rtable_sysctl(int, int); > static void p_rtentry_sysctl(const char *name, struct rt_msghdr *); >-static void p_sockaddr(const char *name, struct sockaddr *, struct sockaddr *, >+static int p_sockaddr(const char *name, struct sockaddr *, struct sockaddr *, > int, int); > static const char *fmt_sockaddr(struct sockaddr *sa, struct sockaddr *mask, > int flags); >@@ -352,7 +352,7 @@ p_rtentry_sysctl(const char *name, struc > struct sockaddr *sa, *addr[RTAX_MAX]; > char buffer[128]; > char prettyname[128]; >- int i; >+ int i, protrusion; > > xo_open_instance(name); > sa = (struct sockaddr *)(rtm + 1); >@@ -362,11 +362,13 @@ p_rtentry_sysctl(const char *name, struc > sa = (struct sockaddr *)((char *)sa + SA_SIZE(sa)); > } > >- p_sockaddr("destination", addr[RTAX_DST], addr[RTAX_NETMASK], >+ protrusion = p_sockaddr("destination", addr[RTAX_DST], >+ addr[RTAX_NETMASK], > rtm->rtm_flags, wid_dst); >- p_sockaddr("gateway", addr[RTAX_GATEWAY], NULL, RTF_HOST, wid_gw); >+ protrusion = p_sockaddr("gateway", addr[RTAX_GATEWAY], NULL, RTF_HOST, >+ wid_gw - protrusion); > snprintf(buffer, sizeof(buffer), "{[:-%d}{:flags/%%s}{]:} ", >- wid_flags); >+ wid_flags - protrusion); > p_flags(rtm->rtm_flags, buffer); > if (Wflag) { > xo_emit("{t:use/%*lu} ", wid_pksent, rtm->rtm_rmx.rmx_pksent); >@@ -402,12 +404,13 @@ p_rtentry_sysctl(const char *name, struc > xo_close_instance(name); > } > >-static void >+static int > p_sockaddr(const char *name, struct sockaddr *sa, struct sockaddr *mask, > int flags, int width) > { > const char *cp; > char buf[128]; >+ int protrusion; > > cp = fmt_sockaddr(sa, mask, flags); > >@@ -419,12 +422,17 @@ p_sockaddr(const char *name, struct sock > snprintf(buf, sizeof(buf), "{[:%d}{:%s/%%s}{]:} ", > -width, name); > xo_emit(buf, cp); >+ protrusion = strlen(cp) - width; >+ if (protrusion < 0) >+ protrusion = 0; > } else { > snprintf(buf, sizeof(buf), "{[:%d}{:%s/%%-.*s}{]:} ", > -width, name); > xo_emit(buf, width, cp); >+ protrusion = 0; > } > } >+ return (protrusion); > } > > static const char * > From owner-svn-src-all@freebsd.org Tue Dec 1 16:14:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A552A3E05B; Tue, 1 Dec 2015 16:14:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A40C18B4; Tue, 1 Dec 2015 16:14:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tB1GEOn1022194 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 1 Dec 2015 18:14:25 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tB1GEOn1022194 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tB1GEO6B022193; Tue, 1 Dec 2015 18:14:24 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 1 Dec 2015 18:14:24 +0200 From: Konstantin Belousov To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291591 - head Message-ID: <20151201161424.GW3448@kib.kiev.ua> References: <201512011555.tB1FtKgx097701@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201512011555.tB1FtKgx097701@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 16:14:35 -0000 On Tue, Dec 01, 2015 at 03:55:20PM +0000, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Dec 1 15:55:20 2015 > New Revision: 291591 > URL: https://svnweb.freebsd.org/changeset/base/291591 > > Log: > Fix removal of libelf.so.2 and add missing files for it. > > X-MFC-With: r291566 > > Modified: > head/ObsoleteFiles.inc > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Tue Dec 1 15:54:46 2015 (r291590) > +++ head/ObsoleteFiles.inc Tue Dec 1 15:55:20 2015 (r291591) > @@ -39,7 +39,10 @@ > # done > > # 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406) > -OLD_FILES+=usr/lib/libelf.so.2 > +OLD_LIBS+=usr/lib/libelf.so.2 > +OLD_FILES+=usr/lib/libelf.a > +OLD_FILES+=usr/lib/libelf.so > +OLD_FILES+=usr/lib/libelf_p.a Why ? libelf is not removed, it is moved. libelf.so link and libelf.a (and _p.a) should be left as is. > # 20151115: Fox bad upgrade scheme > OLD_FILES+=usr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030 > OLD_FILES+=usr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312 From owner-svn-src-all@freebsd.org Tue Dec 1 16:16:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B858A3E18B; Tue, 1 Dec 2015 16:16:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 577961C8C; Tue, 1 Dec 2015 16:16:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1GGeM6005705; Tue, 1 Dec 2015 16:16:40 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1GGea1005704; Tue, 1 Dec 2015 16:16:40 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512011616.tB1GGea1005704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 16:16:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291594 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 16:16:41 -0000 Author: bdrewery Date: Tue Dec 1 16:16:40 2015 New Revision: 291594 URL: https://svnweb.freebsd.org/changeset/base/291594 Log: Correct r291591: Don't remove /usr/lib/libelf*, these are still installed. Only the shared library moved to /lib. X-MFC-With: r291566 Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 1 16:08:38 2015 (r291593) +++ head/ObsoleteFiles.inc Tue Dec 1 16:16:40 2015 (r291594) @@ -40,9 +40,6 @@ # 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406) OLD_LIBS+=usr/lib/libelf.so.2 -OLD_FILES+=usr/lib/libelf.a -OLD_FILES+=usr/lib/libelf.so -OLD_FILES+=usr/lib/libelf_p.a # 20151115: Fox bad upgrade scheme OLD_FILES+=usr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030 OLD_FILES+=usr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312 From owner-svn-src-all@freebsd.org Tue Dec 1 16:17:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3A88EA3E1D3; Tue, 1 Dec 2015 16:17:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 228FD1DED; Tue, 1 Dec 2015 16:17:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 1B6F2153B; Tue, 1 Dec 2015 16:17:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id DBA3B1459B; Tue, 1 Dec 2015 16:17:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id A4LLprjWL55s; Tue, 1 Dec 2015 16:17:07 +0000 (UTC) Subject: Re: svn commit: r291591 - head DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 4B9FE14590 To: Konstantin Belousov References: <201512011555.tB1FtKgx097701@repo.freebsd.org> <20151201161424.GW3448@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <565DC810.20206@FreeBSD.org> Date: Tue, 1 Dec 2015 08:17:20 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151201161424.GW3448@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jQAvwhhwhuoKM0mgGRRsMveX5KA8fvrPp" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 16:17:10 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jQAvwhhwhuoKM0mgGRRsMveX5KA8fvrPp Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 12/1/2015 8:14 AM, Konstantin Belousov wrote: > On Tue, Dec 01, 2015 at 03:55:20PM +0000, Bryan Drewery wrote: >> Author: bdrewery >> Date: Tue Dec 1 15:55:20 2015 >> New Revision: 291591 >> URL: https://svnweb.freebsd.org/changeset/base/291591 >> >> Log: >> Fix removal of libelf.so.2 and add missing files for it. >> =20 >> X-MFC-With: r291566 >> >> Modified: >> head/ObsoleteFiles.inc >> >> Modified: head/ObsoleteFiles.inc >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/ObsoleteFiles.inc Tue Dec 1 15:54:46 2015 (r291590) >> +++ head/ObsoleteFiles.inc Tue Dec 1 15:55:20 2015 (r291591) >> @@ -39,7 +39,10 @@ >> # done >> =20 >> # 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in = r291406) >> -OLD_FILES+=3Dusr/lib/libelf.so.2 >> +OLD_LIBS+=3Dusr/lib/libelf.so.2 >> +OLD_FILES+=3Dusr/lib/libelf.a >> +OLD_FILES+=3Dusr/lib/libelf.so >> +OLD_FILES+=3Dusr/lib/libelf_p.a > Why ? libelf is not removed, it is moved. libelf.so link and libelf.a > (and _p.a) should be left as is. >=20 Yes I just discovered that too. Fixed. >> # 20151115: Fox bad upgrade scheme >> OLD_FILES+=3Dusr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030 >> OLD_FILES+=3Dusr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312 >=20 --=20 Regards, Bryan Drewery --jQAvwhhwhuoKM0mgGRRsMveX5KA8fvrPp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWXcgQAAoJEDXXcbtuRpfPxcIIAIt1tKKto2c99JP8vDh/5Nly TkfIcS3LpA4hePre+Bv4F9Or2o3gszoT0OV3MK/fOjfRXfTlt4cgA7TLnJa3iBqY fxzEJB/q6HMz/BpMbaOJpe8rz6Ej7LjqXKnoYmEYhCfgSsHeTPNEWoZgmleGAxHO oNYOvOdjfgDCH2Ep1LdjvHj4UlG1U/c9cUbBQz7ca3T97A57GF7zS+tjJHMbflJ1 Zzr32tmLTBBJPJet+V22GMnNv4p8fk0AS/cbLRQrysiooxSjQt+rEOLADCvqMv1S nrUV5OCKUWln8Q+o63qGValPj0BNQ/t+/IQlGWUxRWDfDe7VYNczyYm/tEKnQcw= =EfbV -----END PGP SIGNATURE----- --jQAvwhhwhuoKM0mgGRRsMveX5KA8fvrPp-- From owner-svn-src-all@freebsd.org Tue Dec 1 16:26:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7352A3E36E; Tue, 1 Dec 2015 16:26:46 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from mail.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "asuka.mahoroba.org", Issuer "ca.mahoroba.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 82E7A12E9; Tue, 1 Dec 2015 16:26:46 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from vsuiko.mahoroba.org (vsuiko.mahoroba.org [IPv6:2001:2f0:104:8010:a00:27ff:feb0:c2e]) (user=ume mech=DIGEST-MD5 bits=0) by mail.mahoroba.org (8.15.2/8.15.2) with ESMTPSA/inet6 id tB1GQe8T045664 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Wed, 2 Dec 2015 01:26:40 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Wed, 02 Dec 2015 01:26:32 +0900 Message-ID: From: Hajimu UMEMOTO To: Ravi Pokala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291592 - head/usr.bin/netstat In-Reply-To: <319A5F79-53CD-40A1-9076-CF3EF33858A9@panasas.com> References: <201512011604.tB1G4pHa000698@repo.freebsd.org> <319A5F79-53CD-40A1-9076-CF3EF33858A9@panasas.com> User-Agent: xcite1.60> Wanderlust/2.15.9 (Almost Unreal) Emacs/24.5 Mule/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 10.2-STABLE X-PGP-Key: http://www.mahoroba.org/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Wed, 02 Dec 2015 01:26:41 +0900 (JST) X-Virus-Scanned: clamav-milter 0.98.7 at asuka.mahoroba.org X-Virus-Status: Clean X-Spam-Status: No, score=-3.5 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on asuka.mahoroba.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 16:26:46 -0000 Hi, >>>>> On Tue, 01 Dec 2015 08:13:41 -0800 >>>>> Ravi Pokala said: rpokala> The value returned by p_sockaddr("destination", ...) is saved to "protrusion", but it is never used before it is overwritten by the value returned by p_sockaddr("gateway", ...). That doesn't seem right. The protrusion is given to the argument of next p_sockaddr() call. Sincerely, -- Hajimu UMEMOTO ume@mahoroba.org ume@FreeBSD.org http://www.mahoroba.org/~ume/ From owner-svn-src-all@freebsd.org Tue Dec 1 16:31:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76D54A3E478; Tue, 1 Dec 2015 16:31:08 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 395A81782; Tue, 1 Dec 2015 16:31:08 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1GV7mw010697; Tue, 1 Dec 2015 16:31:07 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1GV7UO010696; Tue, 1 Dec 2015 16:31:07 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201512011631.tB1GV7UO010696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 1 Dec 2015 16:31:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291595 - head/usr.bin/vmstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 16:31:08 -0000 Author: allanjude Date: Tue Dec 1 16:31:07 2015 New Revision: 291595 URL: https://svnweb.freebsd.org/changeset/base/291595 Log: Some problems were introduced during the libxo-ification of vmstat, fix them stop vmstat -i segfaulting remove duplicate header from vmstat -i do not pad the name of the interupt in encoded outputs fix stray % and missing } in the header for vmstat -i add outer container to vmstat -i add missing xo_flush in vmstat -i (when run with an interval or delay) add outer container to vmstat -m do not pad the name of malloc areans add outer container to vmstat -z do not pad the name of memory zones Reviewed by: rodrigc Approved by: bapt (mentor) Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D4263 Modified: head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/vmstat/vmstat.c ============================================================================== --- head/usr.bin/vmstat/vmstat.c Tue Dec 1 16:16:40 2015 (r291594) +++ head/usr.bin/vmstat/vmstat.c Tue Dec 1 16:31:07 2015 (r291595) @@ -1318,8 +1318,6 @@ print_intrcnts(unsigned long *intrcnts, inttotal = 0; old_inttotal = 0; intrname = intrnames; - xo_emit("{T:/%-*s} {T:/%20s} {T:/%10s}\n", - (int)istrnamlen, "interrupt", "total", "rate"); xo_open_list("interrupt"); for (i = 0, intrcnt=intrcnts, old_intrcnt=old_intrcnts; i < nintr; i++) { if (intrname[0] != '\0' && (*intrcnt != 0 || aflag)) { @@ -1328,8 +1326,10 @@ print_intrcnts(unsigned long *intrcnts, count = *intrcnt - *old_intrcnt; rate = (count * 1000 + period_ms / 2) / period_ms; xo_open_instance("interrupt"); - xo_emit("{k:name/%-*s} {:total/%20lu} {:rate/%10lu}\n", - (int)istrnamlen, intrname, count, rate); + xo_emit("{d:name/%-*s}{ket:name/%s} " + "{:total/%20lu} {:rate/%10lu}\n", + (int)istrnamlen, intrname, + intrname, count, rate); xo_close_instance("interrupt"); } intrname += strlen(intrname) + 1; @@ -1380,13 +1380,15 @@ dointr(unsigned int interval, int reps) istrnamlen = clen; intrname += strlen(intrname) + 1; } - xo_emit("%{T:/%-%s} {T:/%20s} {T:/%10s\n", + xo_emit("{T:/%-*s} {T:/%20s} {T:/%10s}\n", (int)istrnamlen, "interrupt", "total", "rate"); /* * Loop reps times printing differential interrupt counts. If reps is * zero, then run just once, printing total counts */ + xo_open_container("interrupt-statistics"); + period_ms = uptime / 1000000; while(1) { unsigned int nintr; @@ -1405,6 +1407,7 @@ dointr(unsigned int interval, int reps) print_intrcnts(intrcnts, old_intrcnts, intrnames, nintr, istrnamlen, period_ms); + xo_flush(); free(old_intrcnts); old_intrcnts = intrcnts; @@ -1415,6 +1418,8 @@ dointr(unsigned int interval, int reps) uptime = getuptime(); period_ms = (uptime - old_uptime) / 1000000; } + + xo_close_container("interrupt-statistics"); } static void @@ -1446,6 +1451,7 @@ domemstat_malloc(void) memstat_strerror(error)); } } + xo_open_container("malloc-statistics"); xo_emit("{T:/%13s} {T:/%5s} {T:/%6s} {T:/%7s} {T:/%8s} {T:Size(s)}\n", "Type", "InUse", "MemUse", "HighUse", "Requests"); xo_open_list("memory"); @@ -1455,7 +1461,7 @@ domemstat_malloc(void) memstat_get_count(mtp) == 0) continue; xo_open_instance("memory"); - xo_emit("{k:type/%13s} {:in-use/%5" PRIu64 "} " + xo_emit("{k:type/%13s/%s} {:in-use/%5" PRIu64 "} " "{:memory-use/%5" PRIu64 "}{U:K} {:high-use/%7s} " "{:requests/%8" PRIu64 "} ", memstat_get_name(mtp), memstat_get_count(mtp), @@ -1476,6 +1482,7 @@ domemstat_malloc(void) xo_emit("\n"); } xo_close_list("memory"); + xo_close_container("malloc-statistics"); memstat_mtl_free(mtlp); } @@ -1509,6 +1516,7 @@ domemstat_zone(void) memstat_strerror(error)); } } + xo_open_container("memory-zone-statistics"); xo_emit("{T:/%-20s} {T:/%6s} {T:/%6s} {T:/%8s} {T:/%8s} {T:/%8s} " "{T:/%4s} {T:/%4s}\n\n", "ITEM", "SIZE", "LIMIT", "USED", "FREE", "REQ", "FAIL", "SLEEP"); @@ -1518,10 +1526,11 @@ domemstat_zone(void) strlcpy(name, memstat_get_name(mtp), MEMTYPE_MAXNAME); strcat(name, ":"); xo_open_instance("zone"); - xo_emit("{k:name/%-20s} {:size/%6" PRIu64 "}, " + xo_emit("{d:name/%-20s}{ke:name/%s} {:size/%6" PRIu64 "}, " "{:limit/%6" PRIu64 "},{:used/%8" PRIu64 "}," "{:free/%8" PRIu64 "},{:requests/%8" PRIu64 "}," "{:fail/%4" PRIu64 "},{:sleep/%4" PRIu64 "}\n", name, + memstat_get_name(mtp), memstat_get_size(mtp), memstat_get_countlimit(mtp), memstat_get_count(mtp), memstat_get_free(mtp), memstat_get_numallocs(mtp), memstat_get_failures(mtp), @@ -1530,6 +1539,7 @@ domemstat_zone(void) } memstat_mtl_free(mtlp); xo_close_list("zone"); + xo_close_container("memory-zone-statistics"); xo_emit("\n"); } From owner-svn-src-all@freebsd.org Tue Dec 1 16:31:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3C66A3E4B4; Tue, 1 Dec 2015 16:31:30 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com [17.110.69.252]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A3701934; Tue, 1 Dec 2015 16:31:30 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from [192.168.1.4] (c-24-6-178-251.hsd1.ca.comcast.net [24.6.178.251]) by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar 31 2015)) with ESMTPSA id <0NYO00FC8TWAFU20@mr11p00im-asmtp001.me.com>; Tue, 01 Dec 2015 16:31:24 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-12-01_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510090000 definitions=main-1512010264 User-Agent: Microsoft-MacOutlook/0.0.0.151105 Date: Tue, 01 Dec 2015 08:31:22 -0800 Subject: Re: svn commit: r291592 - head/usr.bin/netstat From: Ravi Pokala Sender: "Pokala, Ravi" To: Hajimu UMEMOTO , Ravi Pokala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <70ADB754-1404-4666-864C-D8E051F59409@panasas.com> Thread-topic: svn commit: r291592 - head/usr.bin/netstat References: <201512011604.tB1G4pHa000698@repo.freebsd.org> <319A5F79-53CD-40A1-9076-CF3EF33858A9@panasas.com> In-reply-to: MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 16:31:30 -0000 -----Original Message----- From: Hajimu UMEMOTO Date: 2015-12-01, Tuesday at 08:26 To: Ravi Pokala Cc: , , Subject: Re: svn commit: r291592 - head/usr.bin/netstat >Hi, > >>>>>> On Tue, 01 Dec 2015 08:13:41 -0800 >>>>>> Ravi Pokala said: > >rpokala> The value returned by p_sockaddr("destination", ...) is saved to "protrusion", but it is never used before it is overwritten by the value returned by p_sockaddr("gateway", ...). That doesn't seem right. > >The protrusion is given to the argument of next p_sockaddr() call. How did I miss that? Looks like it's time for new glasses. :-/ -Ravi >Sincerely, > >-- >Hajimu UMEMOTO >ume@mahoroba.org ume@FreeBSD.org >http://www.mahoroba.org/~ume/ From owner-svn-src-all@freebsd.org Tue Dec 1 16:42:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3A27A3E72D; Tue, 1 Dec 2015 16:42:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C11601FDB; Tue, 1 Dec 2015 16:42:40 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1GgdUU014154; Tue, 1 Dec 2015 16:42:39 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1GgdR4014153; Tue, 1 Dec 2015 16:42:39 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201512011642.tB1GgdR4014153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 1 Dec 2015 16:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291596 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 16:42:41 -0000 Author: trasz Date: Tue Dec 1 16:42:39 2015 New Revision: 291596 URL: https://svnweb.freebsd.org/changeset/base/291596 Log: Modify the rctl rc script to add multiple rules in a single run. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/etc/rc.d/rctl Modified: head/etc/rc.d/rctl ============================================================================== --- head/etc/rc.d/rctl Tue Dec 1 16:31:07 2015 (r291595) +++ head/etc/rc.d/rctl Tue Dec 1 16:42:39 2015 (r291596) @@ -23,10 +23,10 @@ rctl_start() \#*|'') ;; *) - rctl -a "${var}" + echo "${var}" ;; esac - done < ${rctl_rules} + done < ${rctl_rules} | xargs rctl -a fi } From owner-svn-src-all@freebsd.org Tue Dec 1 17:00:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F66AA3EB5B; Tue, 1 Dec 2015 17:00:32 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C41A1AEE; Tue, 1 Dec 2015 17:00:32 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1H0Vwb017373; Tue, 1 Dec 2015 17:00:31 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1H0VWf017372; Tue, 1 Dec 2015 17:00:31 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201512011700.tB1H0VWf017372@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 1 Dec 2015 17:00:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291597 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 17:00:32 -0000 Author: nwhitehorn Date: Tue Dec 1 17:00:31 2015 New Revision: 291597 URL: https://svnweb.freebsd.org/changeset/base/291597 Log: Missed header_supported call from r291020: make really, really sure the brand likes the executable. Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Tue Dec 1 16:42:39 2015 (r291596) +++ head/sys/kern/imgact_elf.c Tue Dec 1 17:00:31 2015 (r291597) @@ -273,6 +273,9 @@ __elfN(get_brandinfo)(struct image_param if (hdr->e_machine == bi->machine && (bi->flags & (BI_BRAND_NOTE|BI_BRAND_NOTE_MANDATORY)) != 0) { ret = __elfN(check_note)(imgp, bi->brand_note, osrel); + /* Give brand a chance to veto check_note's guess */ + if (ret && bi->header_supported) + ret = bi->header_supported(imgp); if (ret) return (bi); } From owner-svn-src-all@freebsd.org Tue Dec 1 17:01:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA802A3EC08; Tue, 1 Dec 2015 17:01:28 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7601F1DE7; Tue, 1 Dec 2015 17:01:28 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1H1Rnt018062; Tue, 1 Dec 2015 17:01:27 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1H1Rbd018059; Tue, 1 Dec 2015 17:01:27 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201512011701.tB1H1Rbd018059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 1 Dec 2015 17:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291598 - in head/sys/boot: ofw/libofw powerpc/kboot powerpc/ps3 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 17:01:28 -0000 Author: nwhitehorn Date: Tue Dec 1 17:01:27 2015 New Revision: 291598 URL: https://svnweb.freebsd.org/changeset/base/291598 Log: Allow loader to load 64-bit ELFv2 PowerPC kernels. Modified: head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c head/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c head/sys/boot/powerpc/ps3/ppc64_elf_freebsd.c Modified: head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c ============================================================================== --- head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c Tue Dec 1 17:00:31 2015 (r291597) +++ head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c Tue Dec 1 17:01:27 2015 (r291598) @@ -77,8 +77,11 @@ ppc64_ofw_elf_exec(struct preloaded_file } e = (Elf_Ehdr *)&fmp->md_data; - /* Handle function descriptor */ - entry = *(uint64_t *)e->e_entry; + /* Handle function descriptor for ELFv1 kernels */ + if ((e->e_flags & 3) == 2) + entry = e->e_entry; + else + entry = *(uint64_t *)e->e_entry; if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0) return (error); Modified: head/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c ============================================================================== --- head/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c Tue Dec 1 17:00:31 2015 (r291597) +++ head/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c Tue Dec 1 17:01:27 2015 (r291598) @@ -78,10 +78,15 @@ ppc64_elf_exec(struct preloaded_file *fp /* Figure out where to put it */ trampolinebase = archsw.arch_loadaddr(LOAD_RAW, NULL, 0); - /* Set up interesting values in function descriptor */ + /* Set up loader trampoline */ trampoline = malloc(szkerneltramp); memcpy(trampoline, &kerneltramp, szkerneltramp); - archsw.arch_copyout(e->e_entry + elf64_relocation_offset, &entry, 8); + /* Parse function descriptor for ELFv1 kernels */ + if ((e->e_flags & 3) == 2) + entry = e->e_entry; + else + archsw.arch_copyout(e->e_entry + elf64_relocation_offset, + &entry, 8); trampoline[2] = entry + elf64_relocation_offset; trampoline[4] = 0; /* Phys. mem offset */ trampoline[5] = 0; /* OF entry point */ Modified: head/sys/boot/powerpc/ps3/ppc64_elf_freebsd.c ============================================================================== --- head/sys/boot/powerpc/ps3/ppc64_elf_freebsd.c Tue Dec 1 17:00:31 2015 (r291597) +++ head/sys/boot/powerpc/ps3/ppc64_elf_freebsd.c Tue Dec 1 17:01:27 2015 (r291598) @@ -75,8 +75,11 @@ ppc64_elf_exec(struct preloaded_file *fp } e = (Elf_Ehdr *)&fmp->md_data; - /* Handle function descriptor */ - entry = (void *)(uintptr_t)(*(uint64_t *)e->e_entry); + /* Handle function descriptor for ELFv1 kernels */ + if ((e->e_flags & 3) == 2) + entry = e->e_entry; + else + entry = (void *)(uintptr_t)(*(uint64_t *)e->e_entry); if ((error = md_load64(fp->f_args, &mdp)) != 0) return (error); From owner-svn-src-all@freebsd.org Tue Dec 1 17:31:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 978E6A3E470; Tue, 1 Dec 2015 17:31:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 645F71337; Tue, 1 Dec 2015 17:31:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1HVM6D026585; Tue, 1 Dec 2015 17:31:22 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1HVM7W026584; Tue, 1 Dec 2015 17:31:22 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512011731.tB1HVM7W026584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 17:31:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291599 - head/lib/lib80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 17:31:23 -0000 Author: bdrewery Date: Tue Dec 1 17:31:22 2015 New Revision: 291599 URL: https://svnweb.freebsd.org/changeset/base/291599 Log: No trailing slash is needed here. Modified: head/lib/lib80211/Makefile Modified: head/lib/lib80211/Makefile ============================================================================== --- head/lib/lib80211/Makefile Tue Dec 1 17:01:27 2015 (r291598) +++ head/lib/lib80211/Makefile Tue Dec 1 17:31:22 2015 (r291599) @@ -5,7 +5,7 @@ SHLIBDIR?= /lib SHLIB_MAJOR= 1 SRCS= lib80211_regdomain.c lib80211_ioctl.c -INCSDIR= ${INCLUDEDIR}/lib80211/ +INCSDIR= ${INCLUDEDIR}/lib80211 INCS= lib80211_regdomain.h lib80211_ioctl.h MAN= lib80211.3 From owner-svn-src-all@freebsd.org Tue Dec 1 17:38:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4AFCA3E68A; Tue, 1 Dec 2015 17:38:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B282219C4; Tue, 1 Dec 2015 17:38:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1HcqfU029405; Tue, 1 Dec 2015 17:38:52 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1HcqMe029403; Tue, 1 Dec 2015 17:38:52 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512011738.tB1HcqMe029403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 17:38:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291600 - in head: lib/lib80211 share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 17:38:54 -0000 Author: bdrewery Date: Tue Dec 1 17:38:52 2015 New Revision: 291600 URL: https://svnweb.freebsd.org/changeset/base/291600 Log: Fix underlinking in lib80211 and define static dependencies in src.libnames.mk so NO_SHARED works properly. Reported by: Manfred Antar Sponsored by: EMC / Isilon Storage Division Modified: head/lib/lib80211/Makefile head/share/mk/src.libnames.mk Modified: head/lib/lib80211/Makefile ============================================================================== --- head/lib/lib80211/Makefile Tue Dec 1 17:31:22 2015 (r291599) +++ head/lib/lib80211/Makefile Tue Dec 1 17:38:52 2015 (r291600) @@ -8,6 +8,8 @@ SRCS= lib80211_regdomain.c lib80211_ioct INCSDIR= ${INCLUDEDIR}/lib80211 INCS= lib80211_regdomain.h lib80211_ioctl.h +LIBADD= sbuf bsdxml + MAN= lib80211.3 CFLAGS+=-I${.CURDIR} Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Dec 1 17:31:22 2015 (r291599) +++ head/share/mk/src.libnames.mk Tue Dec 1 17:38:52 2015 (r291600) @@ -162,6 +162,7 @@ _LIBRARIES= \ ypclnt \ z +_DP_80211= sbuf bsdxml _DP_archive= z bz2 lzma bsdxml .if ${MK_OPENSSL} != "no" _DP_archive+= crypto From owner-svn-src-all@freebsd.org Tue Dec 1 17:49:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54DD2A3E8FB; Tue, 1 Dec 2015 17:49:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 37136105D; Tue, 1 Dec 2015 17:49:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 306361862; Tue, 1 Dec 2015 17:49:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id C775C147CE; Tue, 1 Dec 2015 17:49:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id NYJo41VNx9Ip; Tue, 1 Dec 2015 17:49:14 +0000 (UTC) Subject: Re: svn commit: r291600 - in head: lib/lib80211 share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 4E5F2147C9 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201512011738.tB1HcqMe029403@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <565DDDA5.3040202@FreeBSD.org> Date: Tue, 1 Dec 2015 09:49:25 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201512011738.tB1HcqMe029403@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kLSoXWjKsThVThASwxLGWdQO6OWGar7CW" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 17:49:17 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kLSoXWjKsThVThASwxLGWdQO6OWGar7CW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/1/2015 9:38 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Dec 1 17:38:52 2015 > New Revision: 291600 > URL: https://svnweb.freebsd.org/changeset/base/291600 >=20 > Log: > Fix underlinking in lib80211 and define static dependencies in src.li= bnames.mk > so NO_SHARED works properly. > =20 > Reported by: Manfred Antar > Sponsored by: EMC / Isilon Storage Division >=20 > Modified: > head/lib/lib80211/Makefile > head/share/mk/src.libnames.mk >=20 > Modified: head/lib/lib80211/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/lib80211/Makefile Tue Dec 1 17:31:22 2015 (r291599) > +++ head/lib/lib80211/Makefile Tue Dec 1 17:38:52 2015 (r291600) > @@ -8,6 +8,8 @@ SRCS=3D lib80211_regdomain.c lib80211_ioct > INCSDIR=3D ${INCLUDEDIR}/lib80211 > INCS=3D lib80211_regdomain.h lib80211_ioctl.h > =20 > +LIBADD=3D sbuf bsdxml > + I have a branch in progress to automatically detect underlinking like this. I did so at Isilon for internal libraries, but not FreeBSD libraries. Doing so for FreeBSD has become a massive effort just as it was for Isilon's internal libraries. There's a lot of cyclic dependencies and libraries missing from src.libnames.mk. > MAN=3D lib80211.3 > =20 > CFLAGS+=3D-I${.CURDIR} >=20 > Modified: head/share/mk/src.libnames.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/src.libnames.mk Tue Dec 1 17:31:22 2015 (r291599) > +++ head/share/mk/src.libnames.mk Tue Dec 1 17:38:52 2015 (r291600) > @@ -162,6 +162,7 @@ _LIBRARIES=3D \ > ypclnt \ > z > =20 > +_DP_80211=3D sbuf bsdxml I am adding a sanity check in src.libnames.mk for this to assert that the _DP_{lib} matches the lib's LIBADD. I consider the _DP_{lib} entries to be a bad hack but it's what we're stuck with for now until something better comes along. > _DP_archive=3D z bz2 lzma bsdxml > .if ${MK_OPENSSL} !=3D "no" > _DP_archive+=3D crypto >=20 --=20 Regards, Bryan Drewery --kLSoXWjKsThVThASwxLGWdQO6OWGar7CW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWXd2lAAoJEDXXcbtuRpfPZd0H/0FsCZx+iJwf67KEYBMW2ASI CsEgEPUr5/lm+EULqqJmB36MfELVcE+5/Ok0aRcsdvO8+NzlhsUjQbzTJIUe8vje ii0rK3qHqQs0IMJ5Jsdv/gsuL7PpCsGOTh7Buat7q3kKEX43dNs0JKDs3BJHagoW DMNZKu5QCTnBLcDceacVHN/VfKfn9tW8PrUflq+2e1ixUqwLiMfMnfrhzEyKbhFj ycpA2MHnmnqcyEHYi4P964J3P151SR/Ph17nirVDTlXHuEcvF5v85UjaURsGq5P2 AbR/ORkn+WvvZotO7hYVHrKOR0zrPcu2oSz675LUFyd5l9DtkswVcbcBFiFEXuA= =8wPK -----END PGP SIGNATURE----- --kLSoXWjKsThVThASwxLGWdQO6OWGar7CW-- From owner-svn-src-all@freebsd.org Tue Dec 1 17:52:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B695A3EA79; Tue, 1 Dec 2015 17:52:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C97B1493; Tue, 1 Dec 2015 17:52:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igvg19 with SMTP id g19so99812980igv.1; Tue, 01 Dec 2015 09:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=G21SFSw6Q5JDosv4T53BfOnIwrWkUUsaZX4abymzJn4=; b=oA1/BpDVoDfVC8AakoqVdzhVqHQHpb3UJkBwXrgsnrn65YY4D2u0L4awPoUi6r95vA 9AXP1L1fTKnSq9L8B/QrvMRuMLulA9XbuiyTWAulBGs0dePB6k5/XBDSYV4uniGxnGIs SpC2qE3netFhfivJl4Q6AgkF9VP24hZvU07MqlWfz308/wqkAKwOcy9uI/H+Xq9bVLPu JCph4M/3bm3sLWuoDPpqbolYIMtN19evgtIyLzv7McQncDTFaJPpPrEDqkD4kWfv0XuL xofxNyCI5eCSPJgyNWFqkstqvmIsuyr6zzOOZ2rB6azLcnCDvMwLqwGRfiAANsy6X/5L ylOQ== MIME-Version: 1.0 X-Received: by 10.50.6.36 with SMTP id x4mr25971821igx.61.1448992331800; Tue, 01 Dec 2015 09:52:11 -0800 (PST) Received: by 10.36.217.196 with HTTP; Tue, 1 Dec 2015 09:52:11 -0800 (PST) In-Reply-To: <565DDDA5.3040202@FreeBSD.org> References: <201512011738.tB1HcqMe029403@repo.freebsd.org> <565DDDA5.3040202@FreeBSD.org> Date: Tue, 1 Dec 2015 09:52:11 -0800 Message-ID: Subject: Re: svn commit: r291600 - in head: lib/lib80211 share/mk From: Adrian Chadd To: Bryan Drewery Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 17:52:12 -0000 oh, thanks! -a On 1 December 2015 at 09:49, Bryan Drewery wrote: > On 12/1/2015 9:38 AM, Bryan Drewery wrote: >> Author: bdrewery >> Date: Tue Dec 1 17:38:52 2015 >> New Revision: 291600 >> URL: https://svnweb.freebsd.org/changeset/base/291600 >> >> Log: >> Fix underlinking in lib80211 and define static dependencies in src.libnames.mk >> so NO_SHARED works properly. >> >> Reported by: Manfred Antar >> Sponsored by: EMC / Isilon Storage Division >> >> Modified: >> head/lib/lib80211/Makefile >> head/share/mk/src.libnames.mk >> >> Modified: head/lib/lib80211/Makefile >> ============================================================================== >> --- head/lib/lib80211/Makefile Tue Dec 1 17:31:22 2015 (r291599) >> +++ head/lib/lib80211/Makefile Tue Dec 1 17:38:52 2015 (r291600) >> @@ -8,6 +8,8 @@ SRCS= lib80211_regdomain.c lib80211_ioct >> INCSDIR= ${INCLUDEDIR}/lib80211 >> INCS= lib80211_regdomain.h lib80211_ioctl.h >> >> +LIBADD= sbuf bsdxml >> + > > I have a branch in progress to automatically detect underlinking like > this. I did so at Isilon for internal libraries, but not FreeBSD > libraries. Doing so for FreeBSD has become a massive effort just as it > was for Isilon's internal libraries. There's a lot of cyclic > dependencies and libraries missing from src.libnames.mk. > >> MAN= lib80211.3 >> >> CFLAGS+=-I${.CURDIR} >> >> Modified: head/share/mk/src.libnames.mk >> ============================================================================== >> --- head/share/mk/src.libnames.mk Tue Dec 1 17:31:22 2015 (r291599) >> +++ head/share/mk/src.libnames.mk Tue Dec 1 17:38:52 2015 (r291600) >> @@ -162,6 +162,7 @@ _LIBRARIES= \ >> ypclnt \ >> z >> >> +_DP_80211= sbuf bsdxml > > I am adding a sanity check in src.libnames.mk for this to assert that > the _DP_{lib} matches the lib's LIBADD. > > I consider the _DP_{lib} entries to be a bad hack but it's what we're > stuck with for now until something better comes along. > >> _DP_archive= z bz2 lzma bsdxml >> .if ${MK_OPENSSL} != "no" >> _DP_archive+= crypto >> > > > -- > Regards, > Bryan Drewery > From owner-svn-src-all@freebsd.org Tue Dec 1 17:55:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B72EBA3EB17; Tue, 1 Dec 2015 17:55:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx2.freebsd.org", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A4EC2181B; Tue, 1 Dec 2015 17:55:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id E2B003F9C; Tue, 1 Dec 2015 17:55:03 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: svn commit: r291268 - stable/10/usr.bin/ldd To: NGie Cooper References: <201511242304.tAON43uF043278@repo.freebsd.org> <2B83D161-7A3A-4EEE-9782-3349B1D2770F@gmail.com> Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org, jenkins-admin@freebsd.org, jmmv@FreeBSD.org From: Jung-uk Kim X-Enigmail-Draft-Status: N1110 Message-ID: <565DDEF7.9040003@FreeBSD.org> Date: Tue, 1 Dec 2015 12:55:03 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <2B83D161-7A3A-4EEE-9782-3349B1D2770F@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 17:55:04 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 12/ 1/15 02:21 AM, NGie Cooper wrote: > >> On Nov 24, 2015, at 15:04, Jung-uk Kim wrote: >> >> Author: jkim Date: Tue Nov 24 23:04:03 2015 New Revision: 291268 >> URL: https://svnweb.freebsd.org/changeset/base/291268 >> >> Log: MFC: r289425 >> >> Add support for ARM EABI. Note it is not a direct MFC because >> some macros are not defined in this branch. > > This change seems to have broken some things on stable/10: > https://jenkins.freebsd.org/job/FreeBSD_stable_10-tests/905/ . I am not sure why my commit is causing the trouble. In fact, it seems head had the same issue, which was fixed by this commit: https://svnweb.freebsd.org/changeset/base/285118 although it was never MFC'ed. Note bin/sh/tests/legacy_test.sh was not changed by the commit because it was removed in r269902. https://svnweb.freebsd.org/changeset/base/269902 Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWXd7zAAoJEHyflib82/FGcPcH/ie4yq3ZlODL+DwVKe7byZ5e WVDlQV2jqaxD+anCYurvgxYzb4jEYXOGyJpnWljsT3gOt7pYKPVt1Pkv4rFiCuxI AEgA2mF/1g7ctlENED4zltNqOS6atnSrx3seL6qKmn3TPDf3fnlmEcRxY7CIhIYF bth7AacKOhf6WO8vPhAXEzaoXm0MVFo3IW/x1re29il0N6nzcX1Y/glAWsYPdrWs mLm7VyuF94xYWeo9t0L3zawr6OJFogLjgfnwq+rhr3hYrC9A/DlKCD8a4mDcxDs6 46SA9PVfPSvEVQd8RCEGWWqPfl/FRPxP94MbuW3+z7sTZGvEnuTXILY4szGz8+Q= =1cFh -----END PGP SIGNATURE----- From owner-svn-src-all@freebsd.org Tue Dec 1 18:09:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D1ACA3EE9C; Tue, 1 Dec 2015 18:09:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC422106C; Tue, 1 Dec 2015 18:09:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1I9eos038097; Tue, 1 Dec 2015 18:09:40 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1I9e4f038096; Tue, 1 Dec 2015 18:09:40 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512011809.tB1I9e4f038096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 18:09:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291601 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 18:09:42 -0000 Author: bdrewery Date: Tue Dec 1 18:09:40 2015 New Revision: 291601 URL: https://svnweb.freebsd.org/changeset/base/291601 Log: Add missing LIB80211 entry for DPADD needs. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Tue Dec 1 17:38:52 2015 (r291600) +++ head/share/mk/bsd.libnames.mk Tue Dec 1 18:09:40 2015 (r291601) @@ -14,6 +14,7 @@ LIBCRT0?= ${DESTDIR}${LIBDIR}/crt0.o +LIB80211?= ${DESTDIR}${LIBDIR}/lib80211.a LIBALIAS?= ${DESTDIR}${LIBDIR}/libalias.a LIBARCHIVE?= ${DESTDIR}${LIBDIR}/libarchive.a LIBASN1?= ${DESTDIR}${LIBDIR}/libasn1.a From owner-svn-src-all@freebsd.org Tue Dec 1 18:19:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38D89A3E0A0; Tue, 1 Dec 2015 18:19:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08C14163D; Tue, 1 Dec 2015 18:19:24 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1IJOP7040918; Tue, 1 Dec 2015 18:19:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1IJN9o040914; Tue, 1 Dec 2015 18:19:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512011819.tB1IJN9o040914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 18:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291602 - in stable/10: include lib/libc/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 18:19:25 -0000 Author: ngie Date: Tue Dec 1 18:19:23 2015 New Revision: 291602 URL: https://svnweb.freebsd.org/changeset/base/291602 Log: MFC r285140: r285140 (by oshogbo): Add fdclose(3) function. This function is equivalent to fclose(3) function except that it does not close the underlying file descriptor. fdclose(3) is step forward to make FILE structure private. Reviewed by: wblock, jilles, jhb, pjd Approved by: pjd (mentor) Differential Revision: https://reviews.freebsd.org/D2697 Modified: stable/10/include/stdio.h stable/10/lib/libc/stdio/Symbol.map stable/10/lib/libc/stdio/fclose.3 stable/10/lib/libc/stdio/fclose.c Directory Properties: stable/10/ (props changed) Modified: stable/10/include/stdio.h ============================================================================== --- stable/10/include/stdio.h Tue Dec 1 18:09:40 2015 (r291601) +++ stable/10/include/stdio.h Tue Dec 1 18:19:23 2015 (r291602) @@ -399,6 +399,7 @@ int (dprintf)(int, const char * __restr int asprintf(char **, const char *, ...) __printflike(2, 3); char *ctermid_r(char *); void fcloseall(void); +int fdclose(FILE *, int *); char *fgetln(FILE *, size_t *); const char *fmtcheck(const char *, const char *) __format_arg(2); int fpurge(FILE *); Modified: stable/10/lib/libc/stdio/Symbol.map ============================================================================== --- stable/10/lib/libc/stdio/Symbol.map Tue Dec 1 18:09:40 2015 (r291601) +++ stable/10/lib/libc/stdio/Symbol.map Tue Dec 1 18:19:23 2015 (r291602) @@ -162,6 +162,10 @@ FBSD_1.3 { mkostemps; }; +FBSD_1.4 { + fdclose; +}; + FBSDprivate_1.0 { _flockfile; _flockfile_debug_stub; Modified: stable/10/lib/libc/stdio/fclose.3 ============================================================================== --- stable/10/lib/libc/stdio/fclose.3 Tue Dec 1 18:09:40 2015 (r291601) +++ stable/10/lib/libc/stdio/fclose.3 Tue Dec 1 18:19:23 2015 (r291602) @@ -1,5 +1,6 @@ -.\" Copyright (c) 1990, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 1990, 1991, 1993 The Regents of the University of California. +.\" Copyright (c) 2015 Mariusz Zaborski +.\" All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Chris Torek and the American National Standards Committee X3, @@ -32,11 +33,12 @@ .\" @(#)fclose.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd April 22, 2006 +.Dd July 4, 2015 .Dt FCLOSE 3 .Os .Sh NAME .Nm fclose , +.Nm fdclose , .Nm fcloseall .Nd close a stream .Sh LIBRARY @@ -45,6 +47,8 @@ .In stdio.h .Ft int .Fn fclose "FILE *stream" +.Ft int +.Fn fdclose "FILE *stream" "int *fdp" .Ft void .Fn fcloseall void .Sh DESCRIPTION @@ -59,36 +63,77 @@ first, using .Xr fflush 3 . .Pp The +.Fn fdclose +function is equivalent to +.Fn fclose +except that it does not close the underlying file descriptor. +If +.Fa fdp +is not +.Dv NULL , +the file descriptor will be written to it. +If the +.Fa fdp +argument will be different then NULL the file descriptor will be returned in it, +If the stream does not have an associated file descriptor, +.Fa fdp +will be set to -1. +This type of stream is created with functions such as +.Xr fmemopen 3 , +.Xr funopen 3 , +or +.Xr open_memstream 3 . +.Pp +The .Fn fcloseall function calls .Fn fclose on all open streams. .Sh RETURN VALUES -Upon successful completion 0 is returned. +.Fn fcloseall +does not return a value. +.Pp +Upon successful completion the +.Fn fclose +and +.Fn fdclose +functions return 0. Otherwise, .Dv EOF is returned and the global variable .Va errno is set to indicate the error. -In either case no further access to the stream is possible. .Sh ERRORS +.Fn fdclose +fails if: +.Bl -tag -width Er +.It Bq Er EOPNOTSUPP +The stream does not have an associated file descriptor. +.El +.Pp The .Fn fclose -function -may also fail and set +and +.Fn fdclose +functions may also fail and set .Va errno -for any of the errors specified for the routines -.Xr close 2 -or +for any of the errors specified for .Xr fflush 3 . +.Pp +The +.Fn fclose +function may also fail and set errno for any of the errors specified for +.Xr close 2 . .Sh NOTES The .Fn fclose -function -does not handle NULL arguments; they will result in a segmentation -violation. -This is intentional - it makes it easier to make sure programs written -under +and +.Fn fdclose +functions do not handle NULL arguments in the +.Fa stream +variable; this will result in a segmentation violation. +This is intentional. +It makes it easier to make sure programs written under .Fx are bug free. This behaviour is an implementation detail, and programs should not @@ -104,8 +149,13 @@ The function conforms to .St -isoC . -.Pp +.Sh HISTORY The .Fn fcloseall function first appeared in .Fx 7.0 . +.Pp +The +.Fn fdclose +function first appeared in +.Fx 11.0 . Modified: stable/10/lib/libc/stdio/fclose.c ============================================================================== --- stable/10/lib/libc/stdio/fclose.c Tue Dec 1 18:09:40 2015 (r291601) +++ stable/10/lib/libc/stdio/fclose.c Tue Dec 1 18:19:23 2015 (r291602) @@ -1,6 +1,7 @@ /*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 1990, 1993 The Regents of the University of California. + * Copyright (c) 2013 Mariusz Zaborski + * All rights reserved. * * This code is derived from software contributed to Berkeley by * Chris Torek. @@ -38,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include +#include #include #include #include "un-namespace.h" @@ -45,19 +47,17 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" #include "local.h" -int -fclose(FILE *fp) +static int +cleanfile(FILE *fp, bool c) { int r; - if (fp->_flags == 0) { /* not open! */ - errno = EBADF; - return (EOF); - } - FLOCKFILE(fp); r = fp->_flags & __SWR ? __sflush(fp) : 0; - if (fp->_close != NULL && (*fp->_close)(fp->_cookie) < 0) - r = EOF; + if (c) { + if (fp->_close != NULL && (*fp->_close)(fp->_cookie) < 0) + r = EOF; + } + if (fp->_flags & __SMBF) free((char *)fp->_bf._base); if (HASUB(fp)) @@ -80,6 +80,59 @@ fclose(FILE *fp) STDIO_THREAD_LOCK(); fp->_flags = 0; /* Release this FILE for reuse. */ STDIO_THREAD_UNLOCK(); + + return (r); +} + +int +fdclose(FILE *fp, int *fdp) +{ + int r, err; + + if (fdp != NULL) + *fdp = -1; + + if (fp->_flags == 0) { /* not open! */ + errno = EBADF; + return (EOF); + } + + FLOCKFILE(fp); + r = 0; + if (fp->_close != __sclose) { + r = EOF; + errno = EOPNOTSUPP; + } else if (fp->_file < 0) { + r = EOF; + errno = EBADF; + } + if (r == EOF) { + err = errno; + (void)cleanfile(fp, true); + errno = err; + } else { + if (fdp != NULL) + *fdp = fp->_file; + r = cleanfile(fp, false); + } FUNLOCKFILE(fp); + + return (r); +} + +int +fclose(FILE *fp) +{ + int r; + + if (fp->_flags == 0) { /* not open! */ + errno = EBADF; + return (EOF); + } + + FLOCKFILE(fp); + r = cleanfile(fp, true); + FUNLOCKFILE(fp); + return (r); } From owner-svn-src-all@freebsd.org Tue Dec 1 18:21:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9792FA3E138; Tue, 1 Dec 2015 18:21:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 618631A18; Tue, 1 Dec 2015 18:21:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1ILP9u041067; Tue, 1 Dec 2015 18:21:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1ILPhP041066; Tue, 1 Dec 2015 18:21:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512011821.tB1ILPhP041066@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 18:21:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291603 - stable/10/share/examples/tests/tests/plain X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 18:21:26 -0000 Author: ngie Date: Tue Dec 1 18:21:25 2015 New Revision: 291603 URL: https://svnweb.freebsd.org/changeset/base/291603 Log: MFC r285118: r285118 (by jmmv): Add missing shebang Plain test programs are not preprocessed by the build system (as opposed to ATF test cases, which automatically gain a shebang pointing at atf-sh), so we must take care of providing the shebang ourselves. I'm not sure why this was not causing problems with Kyua 0.11, but the upcoming 0.12 release chokes on this particular issue. Modified: stable/10/share/examples/tests/tests/plain/cp_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/tests/tests/plain/cp_test.sh ============================================================================== --- stable/10/share/examples/tests/tests/plain/cp_test.sh Tue Dec 1 18:19:23 2015 (r291602) +++ stable/10/share/examples/tests/tests/plain/cp_test.sh Tue Dec 1 18:21:25 2015 (r291603) @@ -1,3 +1,4 @@ +#! /bin/sh # $FreeBSD$ # # Copyright 2013 Google Inc. From owner-svn-src-all@freebsd.org Tue Dec 1 18:22:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6CDFA3E189; Tue, 1 Dec 2015 18:22:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96CB21BE1; Tue, 1 Dec 2015 18:22:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by padhx2 with SMTP id hx2so12720895pad.1; Tue, 01 Dec 2015 10:22:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=TnsBuM+JIXcefWSLeQ5t8xPwa/4tTm8iqs0xNYwWlkM=; b=t36OQ4DAzTJZU11FAJklqYUT34kVmts7euic6pGdF8h9UxJqQ0kGtKHCuHkVy5d4U8 Pnds8sjJFVkLMN4PsB2sSfsnoj2OedcnxnrjroxgJarpvRHyYwCkSHvvaXfTLGvbYS2I fGNUdymbqks15YqOaPimtTYyd7yxvhVzoEDiS4S21CvWVCWs9BEkfYZgdZzKc2+BeD3Q OdC0wOWtFZDGzroHmveZHgIiLncAyusteE7s8OysVZHkxhXk/7EAhaAuMgvATjATijwY F51Y4VdyZ6gEiIGeQasPKrlqS0KiVmcWLlklSj4AEbhSSA8XTjjlhAxv0iwUvM0eUlpd FgcA== X-Received: by 10.98.65.135 with SMTP id g7mr82362056pfd.141.1448994127257; Tue, 01 Dec 2015 10:22:07 -0800 (PST) Received: from [192.168.20.7] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id p86sm47946945pfi.42.2015.12.01.10.22.05 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 01 Dec 2015 10:22:05 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r291268 - stable/10/usr.bin/ldd From: NGie Cooper In-Reply-To: <565DDEF7.9040003@FreeBSD.org> Date: Tue, 1 Dec 2015 10:22:04 -0800 Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org, jenkins-admin@freebsd.org, jmmv@FreeBSD.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201511242304.tAON43uF043278@repo.freebsd.org> <2B83D161-7A3A-4EEE-9782-3349B1D2770F@gmail.com> <565DDEF7.9040003@FreeBSD.org> To: Jung-uk Kim X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 18:22:07 -0000 > On Dec 1, 2015, at 09:55, Jung-uk Kim wrote: >=20 > Signed PGP part > On 12/ 1/15 02:21 AM, NGie Cooper wrote: > > > >> On Nov 24, 2015, at 15:04, Jung-uk Kim wrote: > >> > >> Author: jkim Date: Tue Nov 24 23:04:03 2015 New Revision: 291268 > >> URL: https://svnweb.freebsd.org/changeset/base/291268 > >> > >> Log: MFC: r289425 > >> > >> Add support for ARM EABI. Note it is not a direct MFC because > >> some macros are not defined in this branch. > > > > This change seems to have broken some things on stable/10: > > https://jenkins.freebsd.org/job/FreeBSD_stable_10-tests/905/ . >=20 > I am not sure why my commit is causing the trouble. In fact, it seems > head had the same issue, which was fixed by this commit: >=20 > https://svnweb.freebsd.org/changeset/base/285118 >=20 > although it was never MFC'ed. Note bin/sh/tests/legacy_test.sh was > not changed by the commit because it was removed in r269902. >=20 > https://svnweb.freebsd.org/changeset/base/269902 I missed the fact that kyua was just upgraded. I=92m taking care of the = missing MFCs. Thanks! -NGie= From owner-svn-src-all@freebsd.org Tue Dec 1 18:22:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8438EA3E1AF; Tue, 1 Dec 2015 18:22:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 6C36C1BEE; Tue, 1 Dec 2015 18:22:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 656971697; Tue, 1 Dec 2015 18:22:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 2809A148C2; Tue, 1 Dec 2015 18:22:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id wMyccVxiJCr2; Tue, 1 Dec 2015 18:22:07 +0000 (UTC) Subject: Re: svn commit: r291601 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com A6424148BD To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201512011809.tB1I9e4f038096@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <565DE55A.2020907@FreeBSD.org> Date: Tue, 1 Dec 2015 10:22:18 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201512011809.tB1I9e4f038096@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k9rDW3Vxf5H8ksiobiv2hmXSAv22LNNEg" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 18:22:10 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --k9rDW3Vxf5H8ksiobiv2hmXSAv22LNNEg Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/1/2015 10:09 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Dec 1 18:09:40 2015 > New Revision: 291601 > URL: https://svnweb.freebsd.org/changeset/base/291601 >=20 > Log: > Add missing LIB80211 entry for DPADD needs. > =20 > Sponsored by: EMC / Isilon Storage Division >=20 > Modified: > head/share/mk/bsd.libnames.mk >=20 > Modified: head/share/mk/bsd.libnames.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/bsd.libnames.mk Tue Dec 1 17:38:52 2015 (r291600) > +++ head/share/mk/bsd.libnames.mk Tue Dec 1 18:09:40 2015 (r291601) > @@ -14,6 +14,7 @@ > =20 > LIBCRT0?=3D ${DESTDIR}${LIBDIR}/crt0.o > =20 > +LIB80211?=3D ${DESTDIR}${LIBDIR}/lib80211.a > LIBALIAS?=3D ${DESTDIR}${LIBDIR}/libalias.a > LIBARCHIVE?=3D ${DESTDIR}${LIBDIR}/libarchive.a > LIBASN1?=3D ${DESTDIR}${LIBDIR}/libasn1.a >=20 I have a sanity check coming for this too. --=20 Regards, Bryan Drewery --k9rDW3Vxf5H8ksiobiv2hmXSAv22LNNEg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWXeVaAAoJEDXXcbtuRpfPwfQIAKtyWIBVOLMAGClu3FGP4Snk BA3Asixzb/Rep05LvPncz3ZroZFhyP/rROTVK9PFkrDxDyS+2L+SVSVVIiziIstC Hj1Y/Xr5q3xc9A+qHM+7boweKEv+ky//IQ7grpWvTff2PzGJgFVTdNNxlrIeA3oC DX3CzbwbrsY5LYsTvKMFMwhxcn7ovKQAUeShEDtssLJsfBGtCilpZIgvYi4EUcgw 6197lyxhOhEG2/IB3jQIUUcwqw6xoAui9YCDKrrax96uB+be48hOJ0dswk6vSJxn utwhd3wNZXjWJdxcMEyG2lH0VsFG92BtXMucjXj8c+6/yBEy2dJEl82JNqmBrqU= =7aeF -----END PGP SIGNATURE----- --k9rDW3Vxf5H8ksiobiv2hmXSAv22LNNEg-- From owner-svn-src-all@freebsd.org Tue Dec 1 18:27:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D20EA3E4E2; Tue, 1 Dec 2015 18:27:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4747D1241; Tue, 1 Dec 2015 18:27:41 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1IReY6044075; Tue, 1 Dec 2015 18:27:40 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1IRcHM044053; Tue, 1 Dec 2015 18:27:38 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512011827.tB1IRcHM044053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 18:27:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291604 - in stable/10: bin/sh/tests bin/sh/tests/builtins bin/sh/tests/errors bin/sh/tests/execution bin/sh/tests/expansion bin/sh/tests/parameters bin/sh/tests/parser bin/sh/tests/set... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 18:27:41 -0000 Author: ngie Date: Tue Dec 1 18:27:38 2015 New Revision: 291604 URL: https://svnweb.freebsd.org/changeset/base/291604 Log: MFC r269902,r270101: r269902: Convert bin/sh/tests to ATF The new code uses a "test discovery mechanism" to determine what tests are available for execution The test shell can be specified via: kyua test -v test_suites.FreeBSD.bin.sh.test_shell=/path/to/test/sh Sponsored by: EMC / Isilon Storage Division Approved by: jmmv (mentor) Reviewed by: jilles (maintainer) r270101 (by jilles): sh: Don't hardcode relative paths in the tests stderr files. These paths have had to be adjusted to changes in the testsuite runner several times, so modify the tests to remove the need for such adjustment. A cp in functional_test.sh is now unneeded, but this matters little in performance. Added: stable/10/bin/sh/tests/functional_test.sh - copied, changed from r269902, head/bin/sh/tests/functional_test.sh Deleted: stable/10/bin/sh/tests/legacy_test.sh Modified: stable/10/bin/sh/tests/Makefile stable/10/bin/sh/tests/builtins/Makefile stable/10/bin/sh/tests/errors/Makefile stable/10/bin/sh/tests/errors/bad-parm-exp2.2 stable/10/bin/sh/tests/errors/bad-parm-exp2.2.stderr stable/10/bin/sh/tests/errors/bad-parm-exp3.2 stable/10/bin/sh/tests/errors/bad-parm-exp3.2.stderr stable/10/bin/sh/tests/errors/bad-parm-exp4.2 stable/10/bin/sh/tests/errors/bad-parm-exp4.2.stderr stable/10/bin/sh/tests/errors/bad-parm-exp5.2 stable/10/bin/sh/tests/errors/bad-parm-exp5.2.stderr stable/10/bin/sh/tests/errors/bad-parm-exp6.2 stable/10/bin/sh/tests/errors/bad-parm-exp6.2.stderr stable/10/bin/sh/tests/execution/Makefile stable/10/bin/sh/tests/expansion/Makefile stable/10/bin/sh/tests/parameters/Makefile stable/10/bin/sh/tests/parser/Makefile stable/10/bin/sh/tests/set-e/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/tests/Makefile ============================================================================== --- stable/10/bin/sh/tests/Makefile Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/Makefile Tue Dec 1 18:27:38 2015 (r291604) @@ -4,15 +4,12 @@ TESTSDIR= ${TESTSBASE}/bin/sh -TAP_TESTS_SH= legacy_test -TAP_TESTS_SH_SED_legacy_test= -e 's,__SH__,/bin/sh,g' -# Some tests in here are silently not run when the tests are executed as -# root. Explicitly tell Kyua to drop privileges. -# -# TODO(jmmv): Kyua needs to do this by default, not only when explicitly -# requested. See https://code.google.com/p/kyua/issues/detail?id=6 -TEST_METADATA.legacy_test+= required_user="unprivileged" - -SUBDIR+= builtins errors execution expansion parameters parser set-e +TESTS_SUBDIRS+= builtins +TESTS_SUBDIRS+= errors +TESTS_SUBDIRS+= execution +TESTS_SUBDIRS+= expansion +TESTS_SUBDIRS+= parameters +TESTS_SUBDIRS+= parser +TESTS_SUBDIRS+= set-e .include Modified: stable/10/bin/sh/tests/builtins/Makefile ============================================================================== --- stable/10/bin/sh/tests/builtins/Makefile Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/builtins/Makefile Tue Dec 1 18:27:38 2015 (r291604) @@ -2,8 +2,12 @@ .include -FILESDIR= ${TESTSBASE}/bin/sh/builtins -KYUAFILE= no +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} + +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= alias.0 alias.0.stdout FILES+= alias.1 alias.1.stderr Modified: stable/10/bin/sh/tests/errors/Makefile ============================================================================== --- stable/10/bin/sh/tests/errors/Makefile Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/errors/Makefile Tue Dec 1 18:27:38 2015 (r291604) @@ -1,9 +1,11 @@ # $FreeBSD$ -.include +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} -FILESDIR= ${TESTSBASE}/bin/sh/errors -KYUAFILE= no +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= assignment-error1.0 FILES+= assignment-error2.0 Modified: stable/10/bin/sh/tests/errors/bad-parm-exp2.2 ============================================================================== --- stable/10/bin/sh/tests/errors/bad-parm-exp2.2 Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/errors/bad-parm-exp2.2 Tue Dec 1 18:27:38 2015 (r291604) @@ -1,2 +1,2 @@ # $FreeBSD$ -${} +eval '${}' Modified: stable/10/bin/sh/tests/errors/bad-parm-exp2.2.stderr ============================================================================== --- stable/10/bin/sh/tests/errors/bad-parm-exp2.2.stderr Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/errors/bad-parm-exp2.2.stderr Tue Dec 1 18:27:38 2015 (r291604) @@ -1 +1 @@ -./errors/bad-parm-exp2.2: ${}: Bad substitution +eval: ${}: Bad substitution Modified: stable/10/bin/sh/tests/errors/bad-parm-exp3.2 ============================================================================== --- stable/10/bin/sh/tests/errors/bad-parm-exp3.2 Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/errors/bad-parm-exp3.2 Tue Dec 1 18:27:38 2015 (r291604) @@ -1,2 +1,2 @@ # $FreeBSD$ -${foo/} +eval '${foo/}' Modified: stable/10/bin/sh/tests/errors/bad-parm-exp3.2.stderr ============================================================================== --- stable/10/bin/sh/tests/errors/bad-parm-exp3.2.stderr Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/errors/bad-parm-exp3.2.stderr Tue Dec 1 18:27:38 2015 (r291604) @@ -1 +1 @@ -./errors/bad-parm-exp3.2: ${foo/}: Bad substitution +eval: ${foo/}: Bad substitution Modified: stable/10/bin/sh/tests/errors/bad-parm-exp4.2 ============================================================================== --- stable/10/bin/sh/tests/errors/bad-parm-exp4.2 Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/errors/bad-parm-exp4.2 Tue Dec 1 18:27:38 2015 (r291604) @@ -1,2 +1,2 @@ # $FreeBSD$ -${foo:@abc} +eval '${foo:@abc}' Modified: stable/10/bin/sh/tests/errors/bad-parm-exp4.2.stderr ============================================================================== --- stable/10/bin/sh/tests/errors/bad-parm-exp4.2.stderr Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/errors/bad-parm-exp4.2.stderr Tue Dec 1 18:27:38 2015 (r291604) @@ -1 +1 @@ -./errors/bad-parm-exp4.2: ${foo:@...}: Bad substitution +eval: ${foo:@...}: Bad substitution Modified: stable/10/bin/sh/tests/errors/bad-parm-exp5.2 ============================================================================== --- stable/10/bin/sh/tests/errors/bad-parm-exp5.2 Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/errors/bad-parm-exp5.2 Tue Dec 1 18:27:38 2015 (r291604) @@ -1,2 +1,2 @@ # $FreeBSD$ -${/} +eval '${/}' Modified: stable/10/bin/sh/tests/errors/bad-parm-exp5.2.stderr ============================================================================== --- stable/10/bin/sh/tests/errors/bad-parm-exp5.2.stderr Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/errors/bad-parm-exp5.2.stderr Tue Dec 1 18:27:38 2015 (r291604) @@ -1 +1 @@ -./errors/bad-parm-exp5.2: ${/}: Bad substitution +eval: ${/}: Bad substitution Modified: stable/10/bin/sh/tests/errors/bad-parm-exp6.2 ============================================================================== --- stable/10/bin/sh/tests/errors/bad-parm-exp6.2 Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/errors/bad-parm-exp6.2 Tue Dec 1 18:27:38 2015 (r291604) @@ -1,2 +1,2 @@ # $FreeBSD$ -${#foo^} +eval '${#foo^}' Modified: stable/10/bin/sh/tests/errors/bad-parm-exp6.2.stderr ============================================================================== --- stable/10/bin/sh/tests/errors/bad-parm-exp6.2.stderr Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/errors/bad-parm-exp6.2.stderr Tue Dec 1 18:27:38 2015 (r291604) @@ -1 +1 @@ -./errors/bad-parm-exp6.2: ${foo...}: Bad substitution +eval: ${foo...}: Bad substitution Modified: stable/10/bin/sh/tests/execution/Makefile ============================================================================== --- stable/10/bin/sh/tests/execution/Makefile Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/execution/Makefile Tue Dec 1 18:27:38 2015 (r291604) @@ -1,9 +1,11 @@ # $FreeBSD$ -.include +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} -FILESDIR= ${TESTSBASE}/bin/sh/execution -KYUAFILE= no +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= bg1.0 FILES+= bg2.0 Modified: stable/10/bin/sh/tests/expansion/Makefile ============================================================================== --- stable/10/bin/sh/tests/expansion/Makefile Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/expansion/Makefile Tue Dec 1 18:27:38 2015 (r291604) @@ -1,9 +1,11 @@ # $FreeBSD$ -.include +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} -FILESDIR= ${TESTSBASE}/bin/sh/expansion -KYUAFILE= no +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= arith1.0 FILES+= arith2.0 Copied and modified: stable/10/bin/sh/tests/functional_test.sh (from r269902, head/bin/sh/tests/functional_test.sh) ============================================================================== --- head/bin/sh/tests/functional_test.sh Wed Aug 13 04:14:50 2014 (r269902, copy source) +++ stable/10/bin/sh/tests/functional_test.sh Tue Dec 1 18:27:38 2015 (r291604) @@ -39,13 +39,7 @@ check() local out_file="${SRCDIR}/${tc}.stdout" [ -f "${out_file}" ] && out_flag="-o file:${out_file}" - # We need to copy the testcase scenario file because some of the - # testcases hardcode relative paths in the stderr/stdout. - # - # TODO: we might be able to generate this path at build time - cp ${SRCDIR}/${tc} . - - atf_check -s exit:${tc##*.} ${err_flag} ${out_flag} ${SH} "./${tc}" + atf_check -s exit:${tc##*.} ${err_flag} ${out_flag} ${SH} "${SRCDIR}/${tc}" } add_testcase() Modified: stable/10/bin/sh/tests/parameters/Makefile ============================================================================== --- stable/10/bin/sh/tests/parameters/Makefile Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/parameters/Makefile Tue Dec 1 18:27:38 2015 (r291604) @@ -1,9 +1,11 @@ # $FreeBSD$ -.include +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} -FILESDIR= ${TESTSBASE}/bin/sh/parameters -KYUAFILE= no +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= env1.0 FILES+= exitstatus1.0 Modified: stable/10/bin/sh/tests/parser/Makefile ============================================================================== --- stable/10/bin/sh/tests/parser/Makefile Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/parser/Makefile Tue Dec 1 18:27:38 2015 (r291604) @@ -1,9 +1,11 @@ # $FreeBSD$ -.include +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} -FILESDIR= ${TESTSBASE}/bin/sh/parser -KYUAFILE= no +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= alias1.0 FILES+= alias2.0 Modified: stable/10/bin/sh/tests/set-e/Makefile ============================================================================== --- stable/10/bin/sh/tests/set-e/Makefile Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/bin/sh/tests/set-e/Makefile Tue Dec 1 18:27:38 2015 (r291604) @@ -1,9 +1,11 @@ # $FreeBSD$ -.include +TESTSDIR= ${TESTSBASE}/bin/sh/${.CURDIR:T} -FILESDIR= ${TESTSBASE}/bin/sh/set-e -KYUAFILE= no +.PATH: ${.CURDIR:H} +ATF_TESTS_SH= functional_test + +FILESDIR= ${TESTSDIR} FILES= and1.0 FILES+= and2.1 Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Tue Dec 1 18:21:25 2015 (r291603) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Tue Dec 1 18:27:38 2015 (r291604) @@ -4468,6 +4468,7 @@ OLD_FILES+=usr/share/aclocal/atf-common. OLD_FILES+=usr/share/aclocal/atf-sh.m4 OLD_DIRS+=usr/share/aclocal OLD_FILES+=usr/tests/bin/date/legacy_test +OLD_FILES+=usr/tests/bin/sh/legacy_test OLD_FILES+=usr/tests/lib/atf/libatf-c/test_helpers_test OLD_FILES+=usr/tests/lib/atf/test-programs/fork_test OLD_FILES+=usr/tests/lib/atf/libatf-c++/application_test From owner-svn-src-all@freebsd.org Tue Dec 1 19:00:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A5D9A3EBB5; Tue, 1 Dec 2015 19:00:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44400160C; Tue, 1 Dec 2015 19:00:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1J0ii2055778; Tue, 1 Dec 2015 19:00:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1J0i1v055775; Tue, 1 Dec 2015 19:00:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512011900.tB1J0i1v055775@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 19:00:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291605 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 19:00:45 -0000 Author: bdrewery Date: Tue Dec 1 19:00:43 2015 New Revision: 291605 URL: https://svnweb.freebsd.org/changeset/base/291605 Log: Fix errors being ignored in many phases of the build since the bmake integration. Say it with me, "I will not chain commands with && in Makefiles" This was originally fixed and explained quite well by bde@ in r36074. The initial bmake integration caused 'set -e' to stop being used which lead to r252419. Later 'set -e' expectations were fixed with bmake in r254980. Because of the && here, errors would be ignored when building in parallel and a dependency failed. Such as bootstrap-tools since it builds everything in parallel. If any tool failed in obj/depend/all, it would just ignore the error and continue to build. This later would result in cascaded errors that only confused the real issue. This could also cause commands after the failed command to still execute, leading to more confusion. This should be fine if the command is in a sub-shell such as: (cmd1 && cmd2) This reverts r252419. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile head/Makefile.inc1 head/UPDATING Modified: head/Makefile ============================================================================== --- head/Makefile Tue Dec 1 18:27:38 2015 (r291604) +++ head/Makefile Tue Dec 1 19:00:43 2015 (r291605) @@ -323,21 +323,21 @@ bmake: .PHONY @echo ">>> Building an up-to-date ${.TARGET}(1)" @echo "--------------------------------------------------------------" ${_+_}@cd ${.CURDIR}/usr.bin/${.TARGET}; \ - ${MMAKE} obj && \ - ${MMAKE} depend && \ - ${MMAKE} all && \ + ${MMAKE} obj; \ + ${MMAKE} depend; \ + ${MMAKE} all; \ ${MMAKE} install DESTDIR=${MYMAKE:H} BINDIR= tinderbox toolchains kernel-toolchains: upgrade_checks tinderbox: - @cd ${.CURDIR} && ${SUB_MAKE} DOING_TINDERBOX=YES universe + @cd ${.CURDIR}; ${SUB_MAKE} DOING_TINDERBOX=YES universe toolchains: - @cd ${.CURDIR} && ${SUB_MAKE} UNIVERSE_TARGET=toolchain universe + @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=toolchain universe kernel-toolchains: - @cd ${.CURDIR} && ${SUB_MAKE} UNIVERSE_TARGET=kernel-toolchain universe + @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=kernel-toolchain universe # # universe @@ -435,7 +435,7 @@ universe_${target}_kernels: universe_${t (echo "${target} 'make LINT' failed," \ "check _.${target}.makeLINT for details"| ${MAKEFAIL})) .endif - @cd ${.CURDIR} && ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \ + @cd ${.CURDIR}; ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \ universe_kernels .endif # !MAKE_JUST_WORLDS Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Dec 1 18:27:38 2015 (r291604) +++ head/Makefile.inc1 Tue Dec 1 19:00:43 2015 (r291605) @@ -1283,7 +1283,7 @@ doxygen: .PHONY echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ exit 1; \ fi - ${_+_}cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all + ${_+_}cd ${.CURDIR}/tools/kerneldoc/subsys; ${MAKE} obj all # # update @@ -1303,7 +1303,7 @@ update: @echo "--------------------------------------------------------------" @echo ">>> Updating ${.CURDIR} using Subversion" @echo "--------------------------------------------------------------" - @(cd ${.CURDIR} && ${SVN} update ${SVNFLAGS}) + @(cd ${.CURDIR}; ${SVN} update ${SVNFLAGS}) .endif # @@ -1336,11 +1336,11 @@ legacy: .endif .for _tool in tools/build ${_elftoolchain_libs} ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,depend,all,install)"; \ - cd ${.CURDIR}/${_tool} && \ - ${MAKE} DIRPRFX=${_tool}/ obj && \ - ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes && \ - ${MAKE} DIRPRFX=${_tool}/ depend && \ - ${MAKE} DIRPRFX=${_tool}/ all && \ + cd ${.CURDIR}/${_tool}; \ + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \ + ${MAKE} DIRPRFX=${_tool}/ depend; \ + ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install .endfor @@ -1489,10 +1489,10 @@ bootstrap-tools: .PHONY usr.bin/localedef ${_bt}-${_tool}: .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ - cd ${.CURDIR}/${_tool} && \ - ${MAKE} DIRPRFX=${_tool}/ obj && \ - ${MAKE} DIRPRFX=${_tool}/ depend && \ - ${MAKE} DIRPRFX=${_tool}/ all && \ + cd ${.CURDIR}/${_tool}; \ + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ depend; \ + ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install bootstrap-tools: ${_bt}-${_tool} @@ -1529,8 +1529,8 @@ _rescue=rescue/rescue usr.bin/vi/catalog build-tools_${_tool}: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \ - cd ${.CURDIR}/${_tool} && \ - ${MAKE} DIRPRFX=${_tool}/ obj && \ + cd ${.CURDIR}/${_tool}; \ + ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ build-tools build-tools: build-tools_${_tool} .endfor @@ -1538,9 +1538,9 @@ build-tools: build-tools_${_tool} ${_gcc_tools} build-tools_${_tool}: .PHONY ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all)"; \ - cd ${.CURDIR}/${_tool} && \ - ${MAKE} DIRPRFX=${_tool}/ obj && \ - ${MAKE} DIRPRFX=${_tool}/ depend && \ + cd ${.CURDIR}/${_tool}; \ + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ depend; \ ${MAKE} DIRPRFX=${_tool}/ all build-tools: build-tools_${_tool} .endfor @@ -1620,10 +1620,10 @@ cross-tools: .MAKE .PHONY ${_crunchide} \ ${_usb_tools} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ - cd ${.CURDIR}/${_tool} && \ - ${MAKE} DIRPRFX=${_tool}/ obj && \ - ${MAKE} DIRPRFX=${_tool}/ depend && \ - ${MAKE} DIRPRFX=${_tool}/ all && \ + cd ${.CURDIR}/${_tool}; \ + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ depend; \ + ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor @@ -1652,10 +1652,10 @@ native-xtools: .PHONY .if ${MK_GCC_BOOTSTRAP} != "no" mkdir -p ${OBJTREE}/gperf_for_gcc/usr/bin ${_+_}@${ECHODIR} "===> ${_gperf} (obj,depend,all,install)"; \ - cd ${.CURDIR}/${_gperf} && \ - ${NXBMAKE} DIRPRFX=${_gperf}/ obj && \ - ${NXBMAKE} DIRPRFX=${_gperf}/ depend && \ - ${NXBMAKE} DIRPRFX=${_gperf}/ all && \ + cd ${.CURDIR}/${_gperf}; \ + ${NXBMAKE} DIRPRFX=${_gperf}/ obj; \ + ${NXBMAKE} DIRPRFX=${_gperf}/ depend; \ + ${NXBMAKE} DIRPRFX=${_gperf}/ all; \ ${NXBMAKE} DIRPRFX=${_gperf}/ DESTDIR=${OBJTREE}/gperf_for_gcc install .endif mkdir -p ${NXBDESTDIR}/bin ${NXBDESTDIR}/sbin ${NXBDESTDIR}/usr @@ -1727,10 +1727,10 @@ native-xtools: .PHONY usr.bin/yacc \ usr.sbin/chown ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ - cd ${.CURDIR}/${_tool} && \ - ${NXBMAKE} DIRPRFX=${_tool}/ obj && \ - ${NXBMAKE} DIRPRFX=${_tool}/ depend && \ - ${NXBMAKE} DIRPRFX=${_tool}/ all && \ + cd ${.CURDIR}/${_tool}; \ + ${NXBMAKE} DIRPRFX=${_tool}/ obj; \ + ${NXBMAKE} DIRPRFX=${_tool}/ depend; \ + ${NXBMAKE} DIRPRFX=${_tool}/ all; \ ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${NXBDESTDIR} install .endfor @@ -1738,7 +1738,7 @@ native-xtools: .PHONY # hierarchy - ensure that all the needed directories are present # hierarchy hier: .MAKE .PHONY - ${_+_}cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs + ${_+_}cd ${.CURDIR}/etc; ${HMAKE} distrib-dirs # # libraries - build all libraries, and install them under ${DESTDIR}. @@ -1748,10 +1748,10 @@ hierarchy hier: .MAKE .PHONY # ${.CURDIR}/tools/make_libdeps.sh script. # libraries: .MAKE .PHONY - ${_+_}cd ${.CURDIR} && \ - ${MAKE} -f Makefile.inc1 _prereq_libs && \ - ${MAKE} -f Makefile.inc1 _startup_libs && \ - ${MAKE} -f Makefile.inc1 _prebuild_libs && \ + ${_+_}cd ${.CURDIR}; \ + ${MAKE} -f Makefile.inc1 _prereq_libs; \ + ${MAKE} -f Makefile.inc1 _startup_libs; \ + ${MAKE} -f Makefile.inc1 _prebuild_libs; \ ${MAKE} -f Makefile.inc1 _generic_libs # @@ -1957,11 +1957,11 @@ gnu/lib/libdialog__L: lib/msun__L lib/nc ${_lib}__PL: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ - cd ${.CURDIR}/${_lib} && \ - ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj && \ - ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend && \ + cd ${.CURDIR}/${_lib}; \ + ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \ + ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend; \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ - DIRPRFX=${_lib}/ all && \ + DIRPRFX=${_lib}/ all; \ ${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \ DIRPRFX=${_lib}/ install .endif @@ -1971,10 +1971,10 @@ ${_lib}__PL: .PHONY .MAKE ${_lib}__L: .PHONY .MAKE .if exists(${.CURDIR}/${_lib}) ${_+_}@${ECHODIR} "===> ${_lib} (obj,depend,all,install)"; \ - cd ${.CURDIR}/${_lib} && \ - ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj && \ - ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend && \ - ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all && \ + cd ${.CURDIR}/${_lib}; \ + ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; \ + ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ depend; \ + ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all; \ ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ install .endif .endfor @@ -1984,11 +1984,11 @@ ${_lib}__L: .PHONY .MAKE # modules. lib/libpam__L: .PHONY .MAKE ${_+_}@${ECHODIR} "===> lib/libpam (obj,depend,all,install)"; \ - cd ${.CURDIR}/lib/libpam && \ - ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ obj && \ - ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ depend && \ + cd ${.CURDIR}/lib/libpam; \ + ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ obj; \ + ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ depend; \ ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \ - -D_NO_LIBPAM_SO_YET all && \ + -D_NO_LIBPAM_SO_YET all; \ ${MAKE} MK_TESTS=no DIRPRFX=lib/libpam/ \ -D_NO_LIBPAM_SO_YET install @@ -2283,10 +2283,10 @@ _xb-bootstrap-tools: .PHONY ${_clang_tblgen} \ ${_gperf} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ - cd ${.CURDIR}/${_tool} && \ - ${CDMAKE} DIRPRFX=${_tool}/ obj && \ - ${CDMAKE} DIRPRFX=${_tool}/ depend && \ - ${CDMAKE} DIRPRFX=${_tool}/ all && \ + cd ${.CURDIR}/${_tool}; \ + ${CDMAKE} DIRPRFX=${_tool}/ obj; \ + ${CDMAKE} DIRPRFX=${_tool}/ depend; \ + ${CDMAKE} DIRPRFX=${_tool}/ all; \ ${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install .endfor @@ -2303,9 +2303,9 @@ _xb-cross-tools: .PHONY ${_clang} \ ${_cc} ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \ - cd ${.CURDIR}/${_tool} && \ - ${CDMAKE} DIRPRFX=${_tool}/ obj && \ - ${CDMAKE} DIRPRFX=${_tool}/ depend && \ + cd ${.CURDIR}/${_tool}; \ + ${CDMAKE} DIRPRFX=${_tool}/ obj; \ + ${CDMAKE} DIRPRFX=${_tool}/ depend; \ ${CDMAKE} DIRPRFX=${_tool}/ all .endfor Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Dec 1 18:27:38 2015 (r291604) +++ head/UPDATING Tue Dec 1 19:00:43 2015 (r291605) @@ -849,14 +849,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 keep 64-bits counters. Thus all tools, that work with networking statistics, must be rebuilt (netstat(1), bsnmpd(1), etc.) -20130629: - Fix targets that run multiple make's to use && rather than ; - so that subsequent steps depend on success of previous. - - NOTE: if building 'universe' with -j* on stable/8 or stable/9 - it would be better to start the build using bmake, to avoid - overloading the machine. - 20130618: Fix a bug that allowed a tracing process (e.g. gdb) to write to a memory-mapped file in the traced process's address space From owner-svn-src-all@freebsd.org Tue Dec 1 19:18:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26F7EA3EFA7; Tue, 1 Dec 2015 19:18:55 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 036751023; Tue, 1 Dec 2015 19:18:54 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1JIsUJ059494; Tue, 1 Dec 2015 19:18:54 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1JIr3p059486; Tue, 1 Dec 2015 19:18:53 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201512011918.tB1JIr3p059486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 1 Dec 2015 19:18:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291607 - in head: bin/df bin/ls bin/ps sbin/savecore usr.bin/iscsictl usr.bin/netstat usr.bin/w usr.bin/wc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 19:18:55 -0000 Author: rodrigc Date: Tue Dec 1 19:18:53 2015 New Revision: 291607 URL: https://svnweb.freebsd.org/changeset/base/291607 Log: Add more text to explain --libxo flag. Modified: head/bin/df/df.1 head/bin/ls/ls.1 head/bin/ps/ps.1 head/sbin/savecore/savecore.8 head/usr.bin/iscsictl/iscsictl.8 head/usr.bin/netstat/netstat.1 head/usr.bin/w/w.1 head/usr.bin/wc/wc.1 Modified: head/bin/df/df.1 ============================================================================== --- head/bin/df/df.1 Tue Dec 1 19:17:30 2015 (r291606) +++ head/bin/df/df.1 Tue Dec 1 19:18:53 2015 (r291607) @@ -29,7 +29,7 @@ .\" @(#)df.1 8.3 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd November 6, 2014 +.Dd December 1, 2015 .Dt DF 1 .Os .Sh NAME @@ -62,6 +62,13 @@ option below). .Pp The following options are available: .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl a Show all mount points, including those that were mounted with the .Dv MNT_IGNORE Modified: head/bin/ls/ls.1 ============================================================================== --- head/bin/ls/ls.1 Tue Dec 1 19:17:30 2015 (r291606) +++ head/bin/ls/ls.1 Tue Dec 1 19:18:53 2015 (r291607) @@ -32,7 +32,7 @@ .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 .\" $FreeBSD$ .\" -.Dd September 27, 2015 +.Dd December 1, 2015 .Dt LS 1 .Os .Sh NAME @@ -69,6 +69,13 @@ lexicographical order. .Pp The following options are available: .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl A Include directory entries whose names begin with a dot Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Tue Dec 1 19:17:30 2015 (r291606) +++ head/bin/ps/ps.1 Tue Dec 1 19:18:53 2015 (r291607) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 27, 2015 +.Dd December 1, 2015 .Dt PS 1 .Os .Sh NAME @@ -103,6 +103,13 @@ and associated command. .Pp The options are as follows: .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl a Display information about other users' processes as well as your own. If the Modified: head/sbin/savecore/savecore.8 ============================================================================== --- head/sbin/savecore/savecore.8 Tue Dec 1 19:17:30 2015 (r291606) +++ head/sbin/savecore/savecore.8 Tue Dec 1 19:18:53 2015 (r291607) @@ -28,7 +28,7 @@ .\" From: @(#)savecore.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd December 17, 2012 +.Dd December 1, 2015 .Dt SAVECORE 8 .Os .Sh NAME @@ -44,6 +44,7 @@ .Op Fl v .Op Ar device ... .Nm +.Op Fl -libxo .Op Fl fkvz .Op Fl m Ar maxdumps .Op Ar directory Op Ar device ... @@ -61,6 +62,13 @@ the system log. .Pp The options are as follows: .Bl -tag -width ".Fl m Ar maxdumps" +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl C Check to see if a dump exists, and display a brief message to indicate the status. @@ -154,6 +162,8 @@ is meant to be called near the end of th .Sh SEE ALSO .Xr gzip 1 , .Xr getbootfile 3 , +.Xr libxo 3 , +.Xr xo_parse_args 3 , .Xr textdump 4 , .Xr tar 5 , .Xr dumpon 8 , Modified: head/usr.bin/iscsictl/iscsictl.8 ============================================================================== --- head/usr.bin/iscsictl/iscsictl.8 Tue Dec 1 19:17:30 2015 (r291606) +++ head/usr.bin/iscsictl/iscsictl.8 Tue Dec 1 19:18:53 2015 (r291607) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2015 +.Dd December 1, 2015 .Dt ISCSICTL 8 .Os .Sh NAME @@ -80,6 +80,13 @@ utility is used to configure the iSCSI i .Pp The following options are available: .Bl -tag -width ".Fl A" +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl A Add session. .It Fl M @@ -182,7 +189,9 @@ Disconnect all iSCSI sessions: .Sh SEE ALSO .Xr iscsi 4 , .Xr iscsi.conf 5 , -.Xr iscsid 8 +.Xr iscsid 8 , +.Xr libxo 3 , +.Xr xo_parse_args 3 .Sh HISTORY The .Nm Modified: head/usr.bin/netstat/netstat.1 ============================================================================== --- head/usr.bin/netstat/netstat.1 Tue Dec 1 19:17:30 2015 (r291606) +++ head/usr.bin/netstat/netstat.1 Tue Dec 1 19:18:53 2015 (r291607) @@ -28,7 +28,7 @@ .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd August 27, 2015 +.Dd December 1, 2015 .Dt NETSTAT 1 .Os .Sh NAME @@ -151,6 +151,13 @@ or addresses and ports appear as .Dq Li * . .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl 4 Show IPv4 only. See Modified: head/usr.bin/w/w.1 ============================================================================== --- head/usr.bin/w/w.1 Tue Dec 1 19:17:30 2015 (r291606) +++ head/usr.bin/w/w.1 Tue Dec 1 19:18:53 2015 (r291607) @@ -28,7 +28,7 @@ .\" @(#)w.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 5, 2014 +.Dd December 1, 2015 .Dt W 1 .Os .Sh NAME @@ -59,6 +59,13 @@ and the name and arguments of the curren .Pp The options are as follows: .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl d dumps out the entire process list on a per controlling tty basis, instead of just the top level process. Modified: head/usr.bin/wc/wc.1 ============================================================================== --- head/usr.bin/wc/wc.1 Tue Dec 1 19:17:30 2015 (r291606) +++ head/usr.bin/wc/wc.1 Tue Dec 1 19:18:53 2015 (r291607) @@ -31,7 +31,7 @@ .\" @(#)wc.1 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd August 24, 2015 +.Dd December 1, 2015 .Dt WC 1 .Os .Sh NAME @@ -68,6 +68,13 @@ the last file. .Pp The following options are available: .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl L The number of characters in the longest input line is written to the standard output. From owner-svn-src-all@freebsd.org Tue Dec 1 19:20:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C53B9A3E029; Tue, 1 Dec 2015 19:20:39 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 913BA11C9; Tue, 1 Dec 2015 19:20:39 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1JKcRx059607; Tue, 1 Dec 2015 19:20:38 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1JKc3V059606; Tue, 1 Dec 2015 19:20:38 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201512011920.tB1JKc3V059606@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 1 Dec 2015 19:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291608 - head/bin/ps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 19:20:39 -0000 Author: rodrigc Date: Tue Dec 1 19:20:38 2015 New Revision: 291608 URL: https://svnweb.freebsd.org/changeset/base/291608 Log: Fix spelling, as recommended by igor tool. Modified: head/bin/ps/ps.1 Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Tue Dec 1 19:18:53 2015 (r291607) +++ head/bin/ps/ps.1 Tue Dec 1 19:20:38 2015 (r291608) @@ -142,7 +142,7 @@ column is not the last column displayed. .It Fl e Display the environment as well. .It Fl f -Show commandline and environment information about swapped out processes. +Show command-line and environment information about swapped out processes. This option is honored only if the UID of the user is 0. .It Fl G Display information about processes which are running with the specified From owner-svn-src-all@freebsd.org Tue Dec 1 19:37:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10BF4A3E400; Tue, 1 Dec 2015 19:37:26 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D39461DA9; Tue, 1 Dec 2015 19:37:25 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1JbPjY065409; Tue, 1 Dec 2015 19:37:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1JbPpG065408; Tue, 1 Dec 2015 19:37:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512011937.tB1JbPpG065408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 19:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291609 - head/usr.bin/rctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 19:37:26 -0000 Author: ngie Date: Tue Dec 1 19:37:24 2015 New Revision: 291609 URL: https://svnweb.freebsd.org/changeset/base/291609 Log: Fix typos in error messages dealing with unknown groups/users MFC after: 1 month X-MFC with: r291447, r291452 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c ============================================================================== --- head/usr.bin/rctl/rctl.c Tue Dec 1 19:20:38 2015 (r291608) +++ head/usr.bin/rctl/rctl.c Tue Dec 1 19:37:24 2015 (r291609) @@ -64,7 +64,7 @@ parse_user(const char *s, id_t *uidp, co } if (!isnumber(s[0])) { - warnx("malformed rule '%s': uknown user '%s'", + warnx("malformed rule '%s': unknown user '%s'", unexpanded_rule, s); return (1); } @@ -92,7 +92,7 @@ parse_group(const char *s, id_t *gidp, c } if (!isnumber(s[0])) { - warnx("malformed rule '%s': uknown group '%s'", + warnx("malformed rule '%s': unknown group '%s'", unexpanded_rule, s); return (1); } From owner-svn-src-all@freebsd.org Tue Dec 1 19:58:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F360AA3E872; Tue, 1 Dec 2015 19:58:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A607A1A8B; Tue, 1 Dec 2015 19:58:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1Jw870071438; Tue, 1 Dec 2015 19:58:08 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1Jw8PC071437; Tue, 1 Dec 2015 19:58:08 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512011958.tB1Jw8PC071437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 19:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291610 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 19:58:10 -0000 Author: bdrewery Date: Tue Dec 1 19:58:08 2015 New Revision: 291610 URL: https://svnweb.freebsd.org/changeset/base/291610 Log: Allow storing package(world|kernel) tarballs into a different location at PACKAGEDIR. Submitted by: Russell Cattelan Discussed with: gjb MFC after: 2 weeks Obtained from: OneFS Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Dec 1 19:37:24 2015 (r291609) +++ head/Makefile.inc1 Tue Dec 1 19:58:08 2015 (r291610) @@ -144,6 +144,7 @@ CLEANDIR= cleandir .endif LOCAL_TOOL_DIRS?= +PACKAGEDIR?= ${DESTDIR}/${DISTDIR} BUILDENV_SHELL?=${SHELL} @@ -1008,11 +1009,11 @@ packageworld: ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ tar cvf - --exclude usr/lib/debug \ @${DESTDIR}/${DISTDIR}/${dist}.meta | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}.txz + ${XZ_CMD} > ${PACKAGEDIR}/${dist}.txz .else ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ tar cvf - --exclude usr/lib/debug . | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}.txz + ${XZ_CMD} > ${PACKAGEDIR}/${dist}.txz .endif .endfor @@ -1020,11 +1021,11 @@ packageworld: . if defined(NO_ROOT) ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ tar cvf - @${DESTDIR}/${DISTDIR}/${dist}.debug.meta | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz + ${XZ_CMD} > ${PACKAGEDIR}/${dist}-dbg.txz . else ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ tar cvLf - usr/lib/debug | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz + ${XZ_CMD} > ${PACKAGEDIR}/${dist}-dbg.txz . endif .endfor @@ -1252,23 +1253,23 @@ packagekernel: .if defined(NO_ROOT) cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz + ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz .if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz + ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz .endfor .endif .else cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - . | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz + ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz .if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - . | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz + ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz .endfor .endif .endif From owner-svn-src-all@freebsd.org Tue Dec 1 20:25:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 021C4A3EE46; Tue, 1 Dec 2015 20:24:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3F011802; Tue, 1 Dec 2015 20:24:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1KOwCR079993; Tue, 1 Dec 2015 20:24:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1KOwoD079992; Tue, 1 Dec 2015 20:24:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512012024.tB1KOwoD079992@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 20:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291611 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 20:25:00 -0000 Author: bdrewery Date: Tue Dec 1 20:24:58 2015 New Revision: 291611 URL: https://svnweb.freebsd.org/changeset/base/291611 Log: Add NO_INSTALLKERNEL to undo the assumption that the first KERNCONF will be installed as "kernel". This is relevant for packaging of the kernel when not wanting a default "kernel.txz". Submitted by: Russell Cattelan MFC after: 2 weeks Obtained from: OneFS Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Dec 1 19:58:08 2015 (r291610) +++ head/Makefile.inc1 Tue Dec 1 20:24:58 2015 (r291611) @@ -1110,10 +1110,14 @@ KERNCONFDIR?= ${KRNLCONFDIR} BUILDKERNELS= INSTALLKERNEL= +.if defined(NO_INSTALLKERNEL) +# All of the BUILDKERNELS loops start at index 1. +BUILDKERNELS+= dummy +.endif .for _kernel in ${KERNCONF} .if exists(${KERNCONFDIR}/${_kernel}) BUILDKERNELS+= ${_kernel} -.if empty(INSTALLKERNEL) +.if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) INSTALLKERNEL= ${_kernel} .endif .endif @@ -1127,12 +1131,12 @@ ${WMAKE_TGTS:N_worldtmp:Nbuild32} ${.ALL # Builds all kernels defined by BUILDKERNELS. # buildkernel: .MAKE .PHONY -.if empty(BUILDKERNELS) +.if empty(BUILDKERNELS:Ndummy) @echo "ERROR: Missing kernel configuration file(s) (${KERNCONF})."; \ false .endif @echo -.for _kernel in ${BUILDKERNELS} +.for _kernel in ${BUILDKERNELS:Ndummy} @echo "--------------------------------------------------------------" @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`" @echo "--------------------------------------------------------------" @@ -1191,6 +1195,7 @@ buildkernel: .MAKE .PHONY # installkernel installkernel.debug \ reinstallkernel reinstallkernel.debug: _installcheck_kernel +.if !defined(NO_INSTALLKERNEL) .if empty(INSTALLKERNEL) @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \ false @@ -1201,6 +1206,7 @@ reinstallkernel reinstallkernel.debug: _ cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} +.endif .if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} @echo "--------------------------------------------------------------" @@ -1213,6 +1219,7 @@ reinstallkernel reinstallkernel.debug: _ .endif distributekernel distributekernel.debug: +.if !defined(NO_INSTALLKERNEL) .if empty(INSTALLKERNEL) @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \ false @@ -1230,6 +1237,7 @@ distributekernel distributekernel.debug: sed -e 's|^./kernel|.|' ${DESTDIR}/${DISTDIR}/kernel.premeta > \ ${DESTDIR}/${DISTDIR}/kernel.meta .endif +.endif .if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} .if defined(NO_ROOT) @@ -1251,9 +1259,11 @@ distributekernel distributekernel.debug: packagekernel: .if defined(NO_ROOT) +.if !defined(NO_INSTALLKERNEL) cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz +.endif .if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ @@ -1262,9 +1272,11 @@ packagekernel: .endfor .endif .else +.if !defined(NO_INSTALLKERNEL) cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - . | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz +.endif .if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ From owner-svn-src-all@freebsd.org Tue Dec 1 20:50:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9531BA3E4BC; Tue, 1 Dec 2015 20:50:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6173D1925; Tue, 1 Dec 2015 20:50:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1KoEuL086486; Tue, 1 Dec 2015 20:50:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1KoElQ086485; Tue, 1 Dec 2015 20:50:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512012050.tB1KoElQ086485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 20:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291612 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 20:50:15 -0000 Author: bdrewery Date: Tue Dec 1 20:50:14 2015 New Revision: 291612 URL: https://svnweb.freebsd.org/changeset/base/291612 Log: Support LOCAL_LIBRARIES for LIBADD. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Dec 1 20:24:58 2015 (r291611) +++ head/share/mk/src.libnames.mk Tue Dec 1 20:50:14 2015 (r291612) @@ -50,6 +50,7 @@ _INTERNALLIBS= \ _LIBRARIES= \ ${_PRIVATELIBS} \ ${_INTERNALLIBS} \ + ${LOCAL_LIBRARIES} \ 80211 \ alias \ archive \ From owner-svn-src-all@freebsd.org Tue Dec 1 20:56:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E52A2A3E6CB; Tue, 1 Dec 2015 20:56:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3A761F86; Tue, 1 Dec 2015 20:56:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1KuG8H089380; Tue, 1 Dec 2015 20:56:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1KuGBL089379; Tue, 1 Dec 2015 20:56:16 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512012056.tB1KuGBL089379@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 20:56:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291613 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 20:56:18 -0000 Author: bdrewery Date: Tue Dec 1 20:56:16 2015 New Revision: 291613 URL: https://svnweb.freebsd.org/changeset/base/291613 Log: Only include src.conf if _WITHOUT_SRCCONF not defined. This does not really fix anything currently since _WITHOUT_SRCCONF must be defined in the environment or local.sys.*.mk, but is proper and needed for downstream fixes. I am working towards reworking src.conf inclusion still. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.sys.mk Modified: head/share/mk/src.sys.mk ============================================================================== --- head/share/mk/src.sys.mk Tue Dec 1 20:50:14 2015 (r291612) +++ head/share/mk/src.sys.mk Tue Dec 1 20:56:16 2015 (r291613) @@ -5,6 +5,7 @@ # to preserve historical (and useful) behavior. Changes here need to # be reflected there so SRCCONF isn't included multiple times. +.if !defined(_WITHOUT_SRCCONF) # Allow user to configure things that only effect src tree builds. SRCCONF?= /etc/src.conf .if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_) @@ -29,6 +30,7 @@ __postrcconf_${var}:= ${MK_${var}:U-}${W .endfor .endif # SRCCONF +.endif # tempting, but bsd.compiler.mk causes problems this early # probably need to remove dependence on bsd.own.mk From owner-svn-src-all@freebsd.org Tue Dec 1 21:19:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51E16A3EA86; Tue, 1 Dec 2015 21:19:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3F6C19F3; Tue, 1 Dec 2015 21:19:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1LJHUt095487; Tue, 1 Dec 2015 21:19:17 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1LJHu8095485; Tue, 1 Dec 2015 21:19:17 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201512012119.tB1LJHu8095485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 1 Dec 2015 21:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291614 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 21:19:18 -0000 Author: jhb Date: Tue Dec 1 21:19:16 2015 New Revision: 291614 URL: https://svnweb.freebsd.org/changeset/base/291614 Log: Restore cleaning of auto-generated kobj files after the recent MFILES changes. Use the list of MFILES found by find to identify the set of possible auto-generated files and add the intersection of this set and SRCS to CLEANFILES. Submitted by: imp (previous version), sbruno Differential Revision: https://reviews.freebsd.org/D4336 Modified: head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Dec 1 20:56:16 2015 (r291613) +++ head/sys/conf/kern.pre.mk Tue Dec 1 21:19:16 2015 (r291614) @@ -206,9 +206,8 @@ SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symb SYSTEM_DEP+= ${LDSCRIPT} # Calculate path for .m files early, if needed. -.if !defined(_MPATH) +.if !defined(__MPATH) __MPATH!=find ${S:tA}/ -name \*_if.m -_MPATH=${__MPATH:H:O:u} .endif # MKMODULESENV is set here so that port makefiles can augment @@ -227,7 +226,7 @@ MKMODULESENV+= MODULES_OVERRIDE="${MODUL .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif -MKMODULESENV+= _MPATH="${_MPATH}" +MKMODULESENV+= __MPATH="${__MPATH}" # Architecture and output format arguments for objdump to convert image to # object file Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Tue Dec 1 20:56:16 2015 (r291613) +++ head/sys/conf/kmod.mk Tue Dec 1 21:19:16 2015 (r291614) @@ -370,14 +370,18 @@ vnode_if_typedef.h: .endif # Build _if.[ch] from _if.m, and clean them when we're done. -.if !defined(_MPATH) +.if !defined(__MPATH) __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m -_MPATH=${__MPATH:H:O:u} .endif +_MFILES=${__MPATH:T:O} +_MPATH=${__MPATH:H:O:u} .PATH.m: ${_MPATH} .for _i in ${SRCS:M*_if.[ch]} -#removes too much, comment out until it's more constrained. -#CLEANFILES+= ${_i} +_MATCH=M${_i:R:S/$/.m/} +_MATCHES=${_MFILES:${_MATCH}} +.if !empty(_MATCHES) +CLEANFILES+= ${_i} +.endif .endfor # _i .m.c: ${SYSDIR}/tools/makeobjops.awk ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -c From owner-svn-src-all@freebsd.org Tue Dec 1 21:22:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6557EA3EC92; Tue, 1 Dec 2015 21:22:31 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 174B31D8F; Tue, 1 Dec 2015 21:22:30 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1LMTWv098203; Tue, 1 Dec 2015 21:22:29 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1LMT3w098202; Tue, 1 Dec 2015 21:22:29 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201512012122.tB1LMT3w098202@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 1 Dec 2015 21:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291615 - head/contrib/netbsd-tests/lib/libcrypt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 21:22:31 -0000 Author: rodrigc Date: Tue Dec 1 21:22:29 2015 New Revision: 291615 URL: https://svnweb.freebsd.org/changeset/base/291615 Log: Hack test so that it works on FreeBSD. Modified: head/contrib/netbsd-tests/lib/libcrypt/t_crypt.c Modified: head/contrib/netbsd-tests/lib/libcrypt/t_crypt.c ============================================================================== --- head/contrib/netbsd-tests/lib/libcrypt/t_crypt.c Tue Dec 1 21:19:16 2015 (r291614) +++ head/contrib/netbsd-tests/lib/libcrypt/t_crypt.c Tue Dec 1 21:22:29 2015 (r291615) @@ -124,11 +124,13 @@ ATF_TC_HEAD(crypt_salts, tc) ATF_TC_BODY(crypt_salts, tc) { for (size_t i = 0; tests[i].hash; i++) { + char *hash = crypt(tests[i].pw, tests[i].hash); #if defined(__FreeBSD__) - if (22 <= i) + if (i >= 22 && i != 24 && i != 25) atf_tc_expect_fail("Old-style/bad inputs fail on FreeBSD"); + else + atf_tc_expect_pass(); #endif - char *hash = crypt(tests[i].pw, tests[i].hash); if (!hash) { ATF_CHECK_MSG(0, "Test %zu NULL\n", i); continue; From owner-svn-src-all@freebsd.org Tue Dec 1 21:25:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F79DA3ECFE; Tue, 1 Dec 2015 21:25:20 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB97F1F31; Tue, 1 Dec 2015 21:25:19 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1LPIf5098340; Tue, 1 Dec 2015 21:25:18 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1LPIY5098339; Tue, 1 Dec 2015 21:25:18 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201512012125.tB1LPIY5098339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Tue, 1 Dec 2015 21:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291616 - head/lib/libcrypt/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 21:25:20 -0000 Author: rodrigc Date: Tue Dec 1 21:25:18 2015 New Revision: 291616 URL: https://svnweb.freebsd.org/changeset/base/291616 Log: Enable libcrypt tests. kyua 0.12 has fix for https://github.com/jmmv/kyua/pull/148 which eliminates invalid XML characters from being written to test reports with "kyua report-junit". Modified: head/lib/libcrypt/tests/Makefile Modified: head/lib/libcrypt/tests/Makefile ============================================================================== --- head/lib/libcrypt/tests/Makefile Tue Dec 1 21:22:29 2015 (r291615) +++ head/lib/libcrypt/tests/Makefile Tue Dec 1 21:25:18 2015 (r291616) @@ -1,12 +1,12 @@ # $FreeBSD$ -#ATF_TESTS_C+= crypt_tests -# -#NETBSD_ATF_TESTS_C+= crypt_test -# -#CFLAGS+= -I${.CURDIR:H} -#LIBADD= crypt -# +ATF_TESTS_C+= crypt_tests + +NETBSD_ATF_TESTS_C+= crypt_test + +CFLAGS+= -I${.CURDIR:H} +LIBADD= crypt + .include .include From owner-svn-src-all@freebsd.org Tue Dec 1 22:03:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F21EA3C67B; Tue, 1 Dec 2015 22:03:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECF031569; Tue, 1 Dec 2015 22:03:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1M3eHk010066; Tue, 1 Dec 2015 22:03:40 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1M3ewI010065; Tue, 1 Dec 2015 22:03:40 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512012203.tB1M3ewI010065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 22:03:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291617 - head/lib/libauditd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 22:03:42 -0000 Author: bdrewery Date: Tue Dec 1 22:03:40 2015 New Revision: 291617 URL: https://svnweb.freebsd.org/changeset/base/291617 Log: Don't override LIB*DIR variables from src.libnames.mk. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libauditd/Makefile Modified: head/lib/libauditd/Makefile ============================================================================== --- head/lib/libauditd/Makefile Tue Dec 1 21:25:18 2015 (r291616) +++ head/lib/libauditd/Makefile Tue Dec 1 22:03:40 2015 (r291617) @@ -3,19 +3,19 @@ # OPENBSMDIR= ${.CURDIR}/../../contrib/openbsm -LIBAUDITDDIR= ${OPENBSMDIR}/libauditd -LIBBSMDIR= ${OPENBSMDIR}/libbsm +_LIBAUDITDDIR= ${OPENBSMDIR}/libauditd +_LIBBSMDIR= ${OPENBSMDIR}/libbsm LIB= auditd -.PATH: ${LIBAUDITDDIR} +.PATH: ${_LIBAUDITDDIR} SRCS= auditd_lib.c # # Must use BSM include files from within the contrib area, not the system. # -CFLAGS+= -I${OPENBSMDIR} -I${LIBBSMDIR} +CFLAGS+= -I${OPENBSMDIR} -I${_LIBBSMDIR} WARNS?= 3 From owner-svn-src-all@freebsd.org Tue Dec 1 22:05:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B529FA3C6D4; Tue, 1 Dec 2015 22:05:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8333B17EE; Tue, 1 Dec 2015 22:05:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1M4x7i010159; Tue, 1 Dec 2015 22:04:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1M4xiJ010158; Tue, 1 Dec 2015 22:04:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512012204.tB1M4xiJ010158@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 22:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291618 - head/lib/libarchive X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 22:05:00 -0000 Author: bdrewery Date: Tue Dec 1 22:04:59 2015 New Revision: 291618 URL: https://svnweb.freebsd.org/changeset/base/291618 Log: Don't override LIB*DIR variables from src.libnames.mk. MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libarchive/Makefile Modified: head/lib/libarchive/Makefile ============================================================================== --- head/lib/libarchive/Makefile Tue Dec 1 22:03:40 2015 (r291617) +++ head/lib/libarchive/Makefile Tue Dec 1 22:04:59 2015 (r291618) @@ -1,7 +1,7 @@ # $FreeBSD$ .include -LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive +_LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive LIB= archive @@ -37,7 +37,7 @@ CFLAGS+= -DPPMD_32BIT .endif NO_WCAST_ALIGN.clang= -.PATH: ${LIBARCHIVEDIR}/libarchive +.PATH: ${_LIBARCHIVEDIR}/libarchive # Headers to be installed in /usr/include INCS= archive.h archive_entry.h From owner-svn-src-all@freebsd.org Tue Dec 1 22:19:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B220A3CAEB; Tue, 1 Dec 2015 22:19:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 650EE1EF5; Tue, 1 Dec 2015 22:19:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1MJHmD013217; Tue, 1 Dec 2015 22:19:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1MJH0i013216; Tue, 1 Dec 2015 22:19:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512012219.tB1MJH0i013216@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 22:19:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291619 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 22:19:18 -0000 Author: bdrewery Date: Tue Dec 1 22:19:17 2015 New Revision: 291619 URL: https://svnweb.freebsd.org/changeset/base/291619 Log: Define a LIB*SRCDIR for all known _LIBRARIES. This is a follow-up to r291327 which added a LIB*DIR for all known _LIBRARIES. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Tue Dec 1 22:04:59 2015 (r291618) +++ head/share/mk/bsd.libnames.mk Tue Dec 1 22:19:17 2015 (r291619) @@ -152,3 +152,11 @@ LDADD:= ${LDADD:N-lpthread} -lpthread LDADD:= ${LDADD:N-lc} -lc .endif .endif + +# Only do this for src builds. +.if defined(SRCTOP) +# Derive LIB*SRCDIR from LIB*DIR +.for lib in ${_LIBRARIES} +LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} +.endfor +.endif From owner-svn-src-all@freebsd.org Tue Dec 1 22:20:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AC0AA3CB5A; Tue, 1 Dec 2015 22:20:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27FE6105F; Tue, 1 Dec 2015 22:20:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1MK5KB013308; Tue, 1 Dec 2015 22:20:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1MK4EF013298; Tue, 1 Dec 2015 22:20:04 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512012220.tB1MK4EF013298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 22:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291620 - in head: gnu/usr.bin/dtc lib/libarchive/tests lib/libbsm lib/libc++ lib/msun libexec/rtld-elf usr.bin/cpio usr.bin/cpio/tests usr.bin/tar usr.bin/tar/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 22:20:06 -0000 Author: bdrewery Date: Tue Dec 1 22:20:04 2015 New Revision: 291620 URL: https://svnweb.freebsd.org/changeset/base/291620 Log: Don't override LIB*DIR variables from src.libnames.mk. In some cases switch to the LIB*SRCDIR value. These recently were defined in r291327 and r291619. Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/usr.bin/dtc/Makefile head/lib/libarchive/tests/Makefile head/lib/libbsm/Makefile head/lib/libc++/Makefile head/lib/msun/Makefile head/libexec/rtld-elf/Makefile head/usr.bin/cpio/Makefile head/usr.bin/cpio/tests/Makefile head/usr.bin/tar/Makefile head/usr.bin/tar/tests/Makefile Modified: head/gnu/usr.bin/dtc/Makefile ============================================================================== --- head/gnu/usr.bin/dtc/Makefile Tue Dec 1 22:19:17 2015 (r291619) +++ head/gnu/usr.bin/dtc/Makefile Tue Dec 1 22:20:04 2015 (r291620) @@ -3,8 +3,8 @@ .include DTCDIR= ${.CURDIR}/../../../contrib/dtc -LIBFDTDIR= ${.CURDIR}/../../../sys/contrib/libfdt -.PATH: ${DTCDIR} ${LIBFDTDIR} +_LIBFDTDIR= ${.CURDIR}/../../../sys/contrib/libfdt +.PATH: ${DTCDIR} ${_LIBFDTDIR} PROG= dtc @@ -14,7 +14,7 @@ SRCS= dtc.c checks.c fstree.c livetree.c fdt_sw.c fdt_wip.c ${DTCVERSIONFILE} WARNS?= 2 -CFLAGS+= -I. -I${.CURDIR} -I${DTCDIR} -I${LIBFDTDIR} +CFLAGS+= -I. -I${.CURDIR} -I${DTCDIR} -I${_LIBFDTDIR} VERSIONMAJ!= awk '/^VERSION =/ { print $$3 }' ${DTCDIR}/Makefile VERSIONMIN!= awk '/^PATCHLEVEL =/ { print $$3 }' ${DTCDIR}/Makefile Modified: head/lib/libarchive/tests/Makefile ============================================================================== --- head/lib/libarchive/tests/Makefile Tue Dec 1 22:19:17 2015 (r291619) +++ head/lib/libarchive/tests/Makefile Tue Dec 1 22:20:04 2015 (r291620) @@ -1,6 +1,6 @@ # $FreeBSD$ -LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive ATF_TESTS_SH+= functional_test @@ -9,14 +9,14 @@ BINDIR= ${TESTSDIR} PROGS+= libarchive_test CFLAGS+= -I${.CURDIR:H} -I${.OBJDIR} -CFLAGS+= -I${LIBARCHIVEDIR}/libarchive -I${LIBARCHIVEDIR}/test_utils +CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive -I${_LIBARCHIVEDIR}/test_utils CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 # Uncomment to link against dmalloc #LDADD+= -L/usr/local/lib -ldmalloc #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC -.PATH: ${LIBARCHIVEDIR}/libarchive/test +.PATH: ${_LIBARCHIVEDIR}/libarchive/test TESTS_SRCS= \ test_acl_freebsd_nfs4.c \ test_acl_freebsd_posix1e.c \ @@ -249,12 +249,12 @@ SRCS.libarchive_test= \ LIBADD.libarchive_test= archive -.PATH: ${LIBARCHIVEDIR}/test_utils +.PATH: ${_LIBARCHIVEDIR}/test_utils SRCS.libarchive_test+= test_utils.c # list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines list.h: ${TESTS_SRCS} Makefile - @(cd ${LIBARCHIVEDIR}/libarchive/test && \ + @(cd ${_LIBARCHIVEDIR}/libarchive/test && \ grep -h DEFINE_TEST ${.ALLSRC:N*Makefile} | \ egrep -v '${BROKEN_TESTS:tW:C/ /|/g}') > ${.TARGET}.tmp @mv ${.TARGET}.tmp ${.TARGET} Modified: head/lib/libbsm/Makefile ============================================================================== --- head/lib/libbsm/Makefile Tue Dec 1 22:19:17 2015 (r291619) +++ head/lib/libbsm/Makefile Tue Dec 1 22:20:04 2015 (r291620) @@ -3,12 +3,12 @@ # OPENBSMDIR= ${.CURDIR}/../../contrib/openbsm -LIBBSMDIR= ${OPENBSMDIR}/libbsm +_LIBBSMDIR= ${OPENBSMDIR}/libbsm LIB= bsm SHLIB_MAJOR= 3 -.PATH: ${LIBBSMDIR} +.PATH: ${_LIBBSMDIR} .PATH: ${OPENBSMDIR}/bsm .PATH: ${OPENBSMDIR}/man @@ -31,7 +31,7 @@ SRCS= bsm_audit.c \ # # Must use BSM include files from within the contrib area, not the system. # -CFLAGS+= -I${OPENBSMDIR} -I${LIBBSMDIR} +CFLAGS+= -I${OPENBSMDIR} -I${_LIBBSMDIR} WARNS?= 1 Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Tue Dec 1 22:19:17 2015 (r291619) +++ head/lib/libc++/Makefile Tue Dec 1 22:20:04 2015 (r291620) @@ -2,7 +2,7 @@ .include -LIBCXXRTDIR= ${.CURDIR}/../../contrib/libcxxrt +_LIBCXXRTDIR= ${.CURDIR}/../../contrib/libcxxrt HDRDIR= ${.CURDIR}/../../contrib/libc++/include SRCDIR= ${.CURDIR}/../../contrib/libc++/src CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} @@ -52,12 +52,12 @@ CXXRT_SRCS+= libelftc_dem_gnu3.c\ .for _S in ${CXXRT_SRCS} STATICOBJS+= cxxrt_${_S:R}.o -cxxrt_${_S}: ${LIBCXXRTDIR}/${_S} .NOMETA +cxxrt_${_S}: ${_LIBCXXRTDIR}/${_S} .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .endfor WARNS= 0 -CFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -nostdlib -DLIBCXXRT +CFLAGS+= -I${HDRDIR} -I${_LIBCXXRTDIR} -nostdlib -DLIBCXXRT .if empty(CXXFLAGS:M-std=*) CXXFLAGS+= -std=c++11 .endif @@ -172,7 +172,7 @@ STD+= ${HDRDIR}/${hdr} INCSLINKS+= ${CXXINCLUDEDIR}/${hdr} ${CXXINCLUDEDIR}/tr1/${hdr} .endfor .for hdr in ${RT_HEADERS} -STD+= ${LIBCXXRTDIR}/${hdr} +STD+= ${_LIBCXXRTDIR}/${hdr} .endfor STDDIR= ${CXXINCLUDEDIR} Modified: head/lib/msun/Makefile ============================================================================== --- head/lib/msun/Makefile Tue Dec 1 22:19:17 2015 (r291619) +++ head/lib/msun/Makefile Tue Dec 1 22:20:04 2015 (r291620) @@ -81,17 +81,16 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c w_cabs.c w_cabsf.c w_drem.c w_dremf.c # Location of fpmath.h and _fpmath.h -LIBCDIR= ${.CURDIR}/../libc -.if exists(${LIBCDIR}/${MACHINE_ARCH}) +.if exists(${LIBCSRCDIR}/${MACHINE_ARCH}) LIBC_ARCH=${MACHINE_ARCH} .else LIBC_ARCH=${MACHINE_CPUARCH} .endif -CFLAGS+= -I${.CURDIR}/src -I${LIBCDIR}/include \ - -I${LIBCDIR}/${LIBC_ARCH} +CFLAGS+= -I${.CURDIR}/src -I${LIBCSRCDIR}/include \ + -I${LIBCSRCDIR}/${LIBC_ARCH} SYM_MAPS+= ${.CURDIR}/Symbol.map -VERSION_DEF= ${LIBCDIR}/Versions.def +VERSION_DEF= ${LIBCSRCDIR}/Versions.def SYMBOL_MAPS= ${SYM_MAPS} # C99 long double functions Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Tue Dec 1 22:19:17 2015 (r291619) +++ head/libexec/rtld-elf/Makefile Tue Dec 1 22:20:04 2015 (r291620) @@ -13,9 +13,8 @@ SRCS= rtld_start.S \ malloc.c xmalloc.c debug.c libmap.c MAN= rtld.1 CSTD?= gnu99 -TOPSRCDIR= ${.CURDIR}/../.. CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -CFLAGS+= -I${TOPSRCDIR}/lib/csu/common +CFLAGS+= -I${SRCTOP}/lib/csu/common .if exists(${.CURDIR}/${MACHINE_ARCH}) RTLD_ARCH= ${MACHINE_ARCH} .else @@ -59,8 +58,7 @@ LIBADD+= compiler_rt .if ${MK_SYMVER} == "yes" -LIBCDIR= ${TOPSRCDIR}/lib/libc -VERSION_DEF= ${LIBCDIR}/Versions.def +VERSION_DEF= ${LIBCSRCDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map VERSION_MAP= Version.map LDFLAGS+= -Wl,--version-script=${VERSION_MAP} Modified: head/usr.bin/cpio/Makefile ============================================================================== --- head/usr.bin/cpio/Makefile Tue Dec 1 22:19:17 2015 (r291619) +++ head/usr.bin/cpio/Makefile Tue Dec 1 22:20:04 2015 (r291620) @@ -2,21 +2,21 @@ .include -LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive -LIBARCHIVECONFDIR= ${.CURDIR}/../../lib/libarchive +_LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive +_LIBARCHIVECONFDIR= ${.CURDIR}/../../lib/libarchive PROG= bsdcpio BSDCPIO_VERSION_STRING= 3.1.2 -.PATH: ${LIBARCHIVEDIR}/cpio +.PATH: ${_LIBARCHIVEDIR}/cpio SRCS= cpio.c cmdline.c -.PATH: ${LIBARCHIVEDIR}/libarchive_fe +.PATH: ${_LIBARCHIVEDIR}/libarchive_fe SRCS+= err.c line_reader.c CFLAGS+= -DBSDCPIO_VERSION_STRING=\"${BSDCPIO_VERSION_STRING}\" -CFLAGS+= -DPLATFORM_CONFIG_H=\"${LIBARCHIVECONFDIR}/config_freebsd.h\" -CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe +CFLAGS+= -DPLATFORM_CONFIG_H=\"${_LIBARCHIVECONFDIR}/config_freebsd.h\" +CFLAGS+= -I${_LIBARCHIVEDIR}/cpio -I${_LIBARCHIVEDIR}/libarchive_fe .ifdef RELEASE_CRUNCH # FreeBSD's installer uses cpio in crunched binaries that are Modified: head/usr.bin/cpio/tests/Makefile ============================================================================== --- head/usr.bin/cpio/tests/Makefile Tue Dec 1 22:19:17 2015 (r291619) +++ head/usr.bin/cpio/tests/Makefile Tue Dec 1 22:20:04 2015 (r291620) @@ -1,6 +1,6 @@ # $FreeBSD$ -LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive ATF_TESTS_SH+= functional_test @@ -12,20 +12,20 @@ CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP} CFLAGS+= -I${SRCTOP}/lib/libarchive -I${.OBJDIR} CFLAGS+= -I${.OBJDIR} -CFLAGS+= -I${LIBARCHIVEDIR}/cpio -I${LIBARCHIVEDIR}/libarchive_fe -CFLAGS+= -I${LIBARCHIVEDIR}/test_utils +CFLAGS+= -I${_LIBARCHIVEDIR}/cpio -I${_LIBARCHIVEDIR}/libarchive_fe +CFLAGS+= -I${_LIBARCHIVEDIR}/test_utils # Uncomment to link against dmalloc #LDADD+= -L/usr/local/lib -ldmalloc #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC -.PATH: ${LIBARCHIVEDIR}/cpio +.PATH: ${_LIBARCHIVEDIR}/cpio CPIO_SRCS= cmdline.c -.PATH: ${LIBARCHIVEDIR}/libarchive_fe +.PATH: ${_LIBARCHIVEDIR}/libarchive_fe CPIO_SRCS+= err.c -.PATH: ${LIBARCHIVEDIR}/cpio/test +.PATH: ${_LIBARCHIVEDIR}/cpio/test TESTS_SRCS= \ test_0.c \ test_basic.c \ @@ -75,13 +75,13 @@ SRCS.bsdcpio_test= list.h \ ${TESTS_SRCS} \ main.c -.PATH: ${LIBARCHIVEDIR}/test_utils +.PATH: ${_LIBARCHIVEDIR}/test_utils SRCS.bsdcpio_test+= test_utils.c LIBADD.bsdcpio_test= archive list.h: ${TESTS_SRCS} Makefile - @(cd ${LIBARCHIVEDIR}/tar/test && \ + @(cd ${_LIBARCHIVEDIR}/tar/test && \ grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp @mv ${.TARGET}.tmp ${.TARGET} Modified: head/usr.bin/tar/Makefile ============================================================================== --- head/usr.bin/tar/Makefile Tue Dec 1 22:19:17 2015 (r291619) +++ head/usr.bin/tar/Makefile Tue Dec 1 22:20:04 2015 (r291620) @@ -1,12 +1,12 @@ # $FreeBSD$ .include -LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive +_LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive PROG= bsdtar BSDTAR_VERSION_STRING= 3.1.2 -.PATH: ${LIBARCHIVEDIR}/tar +.PATH: ${_LIBARCHIVEDIR}/tar SRCS= bsdtar.c \ cmdline.c \ creation_set.c \ @@ -15,7 +15,7 @@ SRCS= bsdtar.c \ util.c \ write.c -.PATH: ${LIBARCHIVEDIR}/libarchive_fe +.PATH: ${_LIBARCHIVEDIR}/libarchive_fe SRCS+= err.c \ line_reader.c @@ -27,8 +27,8 @@ CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 CFLAGS+= -DBSDTAR_VERSION_STRING=\"${BSDTAR_VERSION_STRING}\" CFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/../../lib/libarchive/config_freebsd.h\" -CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/libarchive -CFLAGS+= -I${LIBARCHIVEDIR}/libarchive_fe +CFLAGS+= -I${_LIBARCHIVEDIR}/tar -I${_LIBARCHIVEDIR}/libarchive +CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive_fe SYMLINKS= bsdtar ${BINDIR}/tar MLINKS= bsdtar.1 tar.1 Modified: head/usr.bin/tar/tests/Makefile ============================================================================== --- head/usr.bin/tar/tests/Makefile Tue Dec 1 22:19:17 2015 (r291619) +++ head/usr.bin/tar/tests/Makefile Tue Dec 1 22:20:04 2015 (r291620) @@ -1,6 +1,6 @@ # $FreeBSD$ -LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive +_LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive ATF_TESTS_SH+= functional_test @@ -9,7 +9,7 @@ BINDIR= ${TESTSDIR} CFLAGS+= -DPLATFORM_CONFIG_H=\"${SRCTOP}/lib/libarchive/config_freebsd.h\" CFLAGS+= -static CFLAGS+= -I${SRCTOP}/lib/libarchive -I${.OBJDIR} -CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBARCHIVEDIR}/test_utils +CFLAGS+= -I${_LIBARCHIVEDIR}/tar -I${_LIBARCHIVEDIR}/test_utils # Uncomment to link against dmalloc #LDADD+= -L/usr/local/lib -ldmalloc @@ -17,7 +17,7 @@ CFLAGS+= -I${LIBARCHIVEDIR}/tar -I${LIBA PROGS+= bsdtar_test -.PATH: ${LIBARCHIVEDIR}/tar/test +.PATH: ${_LIBARCHIVEDIR}/tar/test TESTS_SRCS= \ test_0.c \ test_basic.c \ @@ -75,13 +75,13 @@ SRCS.bsdtar_test= \ list.h \ main.c -.PATH: ${LIBARCHIVEDIR}/test_utils +.PATH: ${_LIBARCHIVEDIR}/test_utils SRCS.bsdtar_test+= test_utils.c LIBADD.bsdtar_test= archive list.h: ${TESTS_SRCS} Makefile - @(cd ${LIBARCHIVEDIR}/tar/test && \ + @(cd ${_LIBARCHIVEDIR}/tar/test && \ grep -h DEFINE_TEST ${.ALLSRC:N*Makefile}) > ${.TARGET}.tmp @mv ${.TARGET}.tmp ${.TARGET} From owner-svn-src-all@freebsd.org Tue Dec 1 22:39:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 497E9A3E009; Tue, 1 Dec 2015 22:39:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17E8C1BCA; Tue, 1 Dec 2015 22:39:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1MdJaT018859; Tue, 1 Dec 2015 22:39:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1MdJiU018858; Tue, 1 Dec 2015 22:39:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512012239.tB1MdJiU018858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 22:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291621 - head/sbin/ipf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 22:39:20 -0000 Author: bdrewery Date: Tue Dec 1 22:39:19 2015 New Revision: 291621 URL: https://svnweb.freebsd.org/changeset/base/291621 Log: Don't add LIBADD=ipf to libipf itself. This had no real impact since libipf is a static INTERNALLIB. It does conflict with an assertion I am adding for LIBADD though. Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/ipf/Makefile.inc Modified: head/sbin/ipf/Makefile.inc ============================================================================== --- head/sbin/ipf/Makefile.inc Tue Dec 1 22:20:04 2015 (r291620) +++ head/sbin/ipf/Makefile.inc Tue Dec 1 22:39:19 2015 (r291621) @@ -18,7 +18,9 @@ CFLAGS+= -DUSE_INET6 CFLAGS+= -DNOINET6 .endif +.if ${.CURDIR:M*/libipf} == "" LIBADD+= ipf +.endif CLEANFILES+= y.tab.c y.tab.h From owner-svn-src-all@freebsd.org Tue Dec 1 22:50:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 788B7A3E2F7; Tue, 1 Dec 2015 22:50:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E84012E4; Tue, 1 Dec 2015 22:50:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB1MoWaI021832; Tue, 1 Dec 2015 22:50:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB1MoWBT021831; Tue, 1 Dec 2015 22:50:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512012250.tB1MoWBT021831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Tue, 1 Dec 2015 22:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291622 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 22:50:33 -0000 Author: bdrewery Date: Tue Dec 1 22:50:32 2015 New Revision: 291622 URL: https://svnweb.freebsd.org/changeset/base/291622 Log: Fix build after r291620. "don't know how to make /Versions.def. Stop" This was trying to define a target in bsd.symver.mk based on LIBCDIR which was not yet defined. Switching the order of inclusion of bsd.prog.mk and bsd.symver.mk fixes it and seems fine. Pointyhat to: bdrewery Sponsored by: EMC / Isilon Storage Division Modified: head/libexec/rtld-elf/Makefile Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Tue Dec 1 22:39:19 2015 (r291621) +++ head/libexec/rtld-elf/Makefile Tue Dec 1 22:50:32 2015 (r291622) @@ -85,5 +85,5 @@ beforeinstall: SUBDIR+= tests .endif -.include .include +.include From owner-svn-src-all@freebsd.org Wed Dec 2 00:01:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BA68A3E65F; Wed, 2 Dec 2015 00:01:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D25FC1DBC; Wed, 2 Dec 2015 00:01:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2019tg042985; Wed, 2 Dec 2015 00:01:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB20198S042983; Wed, 2 Dec 2015 00:01:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020001.tB20198S042983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 00:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291623 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 00:01:11 -0000 Author: bdrewery Date: Wed Dec 2 00:01:09 2015 New Revision: 291623 URL: https://svnweb.freebsd.org/changeset/base/291623 Log: Add assertions that capture invalid configurations for new libraries. Fix current findings. Given libfoo: - Ensure that a LIBFOO is set. For INTERNALLIBS advise setting this in src.libnames.mk, otherwise bsd.libnames.mk. - Ensure that a LIBFOODIR is properly set. - Ensure that _DP_foo is set and matches the LIBADD in the build of foo's own Makefile Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Tue Dec 1 22:50:32 2015 (r291622) +++ head/share/mk/bsd.libnames.mk Wed Dec 2 00:01:09 2015 (r291623) @@ -42,6 +42,7 @@ LIBCRYPT?= ${DESTDIR}${LIBDIR}/libcrypt. LIBCRYPTO?= ${DESTDIR}${LIBDIR}/libcrypto.a LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurses.a +LIBCUSE?= ${DESTDIR}${LIBDIR}/libcuse.a LIBDEVCTL?= ${DESTDIR}${LIBDIR}/libdevctl.a LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a @@ -98,6 +99,7 @@ LIBNVPAIR?= ${DESTDIR}${LIBDIR}/libnvpai LIBOPIE?= ${DESTDIR}${LIBDIR}/libopie.a LIBPAM?= ${DESTDIR}${LIBDIR}/libpam.a LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel.a +LIBPANELW?= ${DESTDIR}${LIBDIR}/libpanelw.a LIBPCAP?= ${DESTDIR}${LIBDIR}/libpcap.a LIBPJDLOG?= ${DESTDIR}${LIBDIR}/libpjdlog.a LIBPMC?= ${DESTDIR}${LIBDIR}/libpmc.a @@ -117,6 +119,7 @@ LIBSSL?= ${DESTDIR}${LIBDIR}/libssl.a LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR}/libssp_nonshared.a LIBSTAND?= ${DESTDIR}${LIBDIR}/libstand.a LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a +LIBSTDTHREADS?= ${DESTDIR}${LIBDIR}/libstdthreads.a LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a LIBTERMCAP?= ${DESTDIR}${LIBDIR}/libtermcap.a LIBTERMCAPW?= ${DESTDIR}${LIBDIR}/libtermcapw.a @@ -155,6 +158,13 @@ LDADD:= ${LDADD:N-lc} -lc # Only do this for src builds. .if defined(SRCTOP) +.if defined(_LIBRARIES) && defined(LIB) && \ + ${_LIBRARIES:M${LIB}} != "" +.if !defined(LIB${LIB:tu}) +.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${DESTDIR}$${LIBDIR}/lib${LIB}.a +.endif +.endif + # Derive LIB*SRCDIR from LIB*DIR .for lib in ${_LIBRARIES} LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Tue Dec 1 22:50:32 2015 (r291622) +++ head/share/mk/src.libnames.mk Wed Dec 2 00:01:09 2015 (r291623) @@ -163,6 +163,8 @@ _LIBRARIES= \ ypclnt \ z +# Each library's LIBADD needs to be duplicated here for static linkage of +# 2nd+ order consumers. _DP_80211= sbuf bsdxml _DP_archive= z bz2 lzma bsdxml .if ${MK_OPENSSL} != "no" @@ -170,6 +172,7 @@ _DP_archive+= crypto .else _DP_archive+= md .endif +_DP_sqlite3= pthread _DP_ssl= crypto _DP_ssh= crypto crypt .if ${MK_LDNS} != "no" @@ -217,7 +220,7 @@ _DP_fetch= md .endif _DP_execinfo= elf _DP_dwarf= elf -_DP_dpv= dialog figpar util +_DP_dpv= dialog figpar util ncursesw _DP_dialog= ncursesw m _DP_cuse= pthread _DP_atf_cxx= atf_c @@ -232,16 +235,39 @@ _DP_pam+= ssh .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif -_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc \ - pthread +_DP_readline= ncursesw +_DP_roken= crypt +_DP_kadm5clnt= com_err krb5 roken +_DP_kadm5srv= com_err hdb krb5 roken +_DP_heimntlm= crypto com_err krb5 roken +_DP_hx509= asn1 com_err crypto roken wind +_DP_hdb= asn1 com_err krb5 roken sqlite3 +_DP_asn1= com_err roken +_DP_kdc= roken hdb hx509 krb5 heimntlm asn1 crypto +_DP_wind= com_err roken +_DP_heimbase= pthread +_DP_heimipcc= heimbase roken pthread +_DP_heimipcs= heimbase roken pthread +_DP_kafs5= asn1 krb5 roken +_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc _DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err _DP_lzma= pthread _DP_ucl= m _DP_vmmapi= util _DP_ctf= z _DP_proc= rtld_db util -_DP_dtrace= rtld_db pthread +_DP_dtrace= ctf elf proc pthread rtld_db _DP_xo= util +# The libc dependencies are not strictly needed but are defined to make the +# assert happy. +_DP_c= compiler_rt +.if ${MK_SSP} != "no" +_DP_c+= ssp_nonshared +.endif +_DP_stdthreads= pthread +_DP_tacplus= md +_DP_panel= ncurses +_DP_panelw= ncursesw # Define spacial cases LDADD_supcplusplus= -lsupc++ @@ -291,6 +317,7 @@ DPADD_dtrace+= ${DPADD_ctf} ${DPADD_elf} LDADD_dtrace+= ${LDADD_ctf} ${LDADD_elf} ${LDADD_proc} # The following depends on libraries which are using pthread +# XXX: These vars are always empty DPADD_hdb+= ${DPADD_pthread} LDADD_hdb+= ${LDADD_pthread} DPADD_kadm5srv+= ${DPADD_pthread} @@ -306,9 +333,10 @@ LDADD+= ${LDADD_${_l}} .endfor .if defined(DPADD) && ${DPADD:Mmissing-dpadd_*} -.error Missing ${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/DPADD_/} variable add "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//}" to _LIBRARIES, _INTERNALLIBS, or _PRIVATELIBS and define "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/LIB/:tu}". +.error ${.CURDIR}: Missing ${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/DPADD_/} variable add "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//}" to _LIBRARIES, _INTERNALLIBS, or _PRIVATELIBS and define "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/LIB/:tu}". .endif +# INTERNALLIB definitions. LIBELFTCDIR= ${OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc.a @@ -352,7 +380,7 @@ LIBNTPEVENTDIR= ${OBJTOP}/usr.sbin/ntp/l LIBNTPEVENT?= ${LIBNTPEVENTDIR}/libntpevent.a LIBOPTSDIR= ${OBJTOP}/usr.sbin/ntp/libopts -LIBOTPS?= ${LIBOPTSDIR}/libopts.a +LIBOPTS?= ${LIBOPTSDIR}/libopts.a LIBPARSEDIR= ${OBJTOP}/usr.sbin/ntp/libparse LIBPARSE?= ${LIBPARSEDIR}/libparse.a @@ -416,8 +444,10 @@ LIBFORMDIR= ${OBJTOP}/lib/ncurses/form LIBFORMLIBWDIR= ${OBJTOP}/lib/ncurses/formw LIBMENUDIR= ${OBJTOP}/lib/ncurses/menu LIBMENULIBWDIR= ${OBJTOP}/lib/ncurses/menuw -LIBTERMCAPDIR= ${OBJTOP}/lib/ncurses/ncurses -LIBTERMCAPWDIR= ${OBJTOP}/lib/ncurses/ncursesw +LIBNCURSESDIR= ${OBJTOP}/lib/ncurses/ncurses +LIBNCURSESWDIR= ${OBJTOP}/lib/ncurses/ncursesw +LIBTERMCAPDIR= ${LIBNCURSESDIR} +LIBTERMCAPWDIR= ${LIBNCURSESWDIR} LIBPANELDIR= ${OBJTOP}/lib/ncurses/panel LIBPANELWDIR= ${OBJTOP}/lib/ncurses/panelw LIBCRYPTODIR= ${OBJTOP}/secure/lib/libcrypto @@ -432,4 +462,18 @@ LIBLNDIR= ${OBJTOP}/usr.bin/lex/lib LIB${lib:tu}DIR?= ${OBJTOP}/lib/lib${lib} .endfor +# Sanity check that libraries are defined here properly when building them. +.if defined(LIB) && ${_LIBRARIES:M${LIB}} != "" +.if !empty(LIBADD) && \ + (!defined(_DP_${LIB}) || ${LIBADD:O:u} != ${_DP_${LIB}:O:u}) +.info ${.CURDIR}: Missing or incorrect _DP_${LIB} entry in ${_this:T}. Should match LIBADD for ${LIB} ('${LIBADD}' vs '${_DP_${LIB}}') +.endif +.if !defined(LIB${LIB:tu}DIR) || !exists(${SRCTOP}/${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,}) +.error ${.CURDIR}: Missing or incorrect value for LIB${LIB:tu}DIR in ${_this:T}: ${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,} +.endif +.if ${_INTERNALLIBS:M${LIB}} != "" && !defined(LIB${LIB:tu}) +.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIB${LIB:tu}DIR}/lib${LIB}.a +.endif +.endif + .endif # !target(____) From owner-svn-src-all@freebsd.org Wed Dec 2 00:08:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A580AA3E8DC; Wed, 2 Dec 2015 00:08:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 903B71482; Wed, 2 Dec 2015 00:08:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 879BA1438; Wed, 2 Dec 2015 00:08:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 3F97718054; Wed, 2 Dec 2015 00:08:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id tit-LHL30xK8; Wed, 2 Dec 2015 00:08:45 +0000 (UTC) Subject: Re: svn commit: r291623 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 0E3841804A To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201512020001.tB20198S042983@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <565E3696.5030607@FreeBSD.org> Date: Tue, 1 Dec 2015 16:08:54 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201512020001.tB20198S042983@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="X2vI5gn9FMBVtlR8uIcgnALfjQlg7cv4L" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 00:08:47 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --X2vI5gn9FMBVtlR8uIcgnALfjQlg7cv4L Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/1/2015 4:01 PM, Bryan Drewery wrote: > +.info ${.CURDIR}: Missing or incorrect _DP_${LIB} entry in ${_this:T}.= Should match LIBADD for ${LIB} ('${LIBADD}' vs '${_DP_${LIB}}') Meant to be .error. Retesting. --=20 Regards, Bryan Drewery --X2vI5gn9FMBVtlR8uIcgnALfjQlg7cv4L Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWXjaWAAoJEDXXcbtuRpfPDiQH/R3NVEw01ni6F3/mwPZBQoXp N9uD/mt4sbz4KVE7pHnwLzFijqB6lAh5cjVXs2N8e4FqhcLOkOmaK5yKezPIWWoJ uXTRl80s32rwDIGl1BMcQwi+hmsj+fiY6+kxirF45zevi3GnEVL2TemcfbbXCo90 7hAdo4HxmNccl4AJezmmHKaRkTK1aiYdvwLXUu2aJBSDTnnvVT3qMRP3OIFzU5qP xl5z+Fua4od59MakFZZAtp+rBRzix930u9kN9UzCMYRrzlJrSAgfad3hqhGncVd0 LJm2kSwvS95WVfRqT5JE6njgn7Q4kj+gZtkUvVZ+V8YFE6UqMSsnVvylQFa1iBU= =PRmk -----END PGP SIGNATURE----- --X2vI5gn9FMBVtlR8uIcgnALfjQlg7cv4L-- From owner-svn-src-all@freebsd.org Wed Dec 2 00:17:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86CCDA3EC0A; Wed, 2 Dec 2015 00:17:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 637081D53; Wed, 2 Dec 2015 00:17:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB20HDAh048904; Wed, 2 Dec 2015 00:17:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB20HD7q048902; Wed, 2 Dec 2015 00:17:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020017.tB20HD7q048902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 00:17:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291624 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 00:17:14 -0000 Author: bdrewery Date: Wed Dec 2 00:17:13 2015 New Revision: 291624 URL: https://svnweb.freebsd.org/changeset/base/291624 Log: Revert incomplete r291623. Modified: head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Wed Dec 2 00:01:09 2015 (r291623) +++ head/share/mk/bsd.libnames.mk Wed Dec 2 00:17:13 2015 (r291624) @@ -42,7 +42,6 @@ LIBCRYPT?= ${DESTDIR}${LIBDIR}/libcrypt. LIBCRYPTO?= ${DESTDIR}${LIBDIR}/libcrypto.a LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurses.a -LIBCUSE?= ${DESTDIR}${LIBDIR}/libcuse.a LIBDEVCTL?= ${DESTDIR}${LIBDIR}/libdevctl.a LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a @@ -99,7 +98,6 @@ LIBNVPAIR?= ${DESTDIR}${LIBDIR}/libnvpai LIBOPIE?= ${DESTDIR}${LIBDIR}/libopie.a LIBPAM?= ${DESTDIR}${LIBDIR}/libpam.a LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel.a -LIBPANELW?= ${DESTDIR}${LIBDIR}/libpanelw.a LIBPCAP?= ${DESTDIR}${LIBDIR}/libpcap.a LIBPJDLOG?= ${DESTDIR}${LIBDIR}/libpjdlog.a LIBPMC?= ${DESTDIR}${LIBDIR}/libpmc.a @@ -119,7 +117,6 @@ LIBSSL?= ${DESTDIR}${LIBDIR}/libssl.a LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR}/libssp_nonshared.a LIBSTAND?= ${DESTDIR}${LIBDIR}/libstand.a LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a -LIBSTDTHREADS?= ${DESTDIR}${LIBDIR}/libstdthreads.a LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a LIBTERMCAP?= ${DESTDIR}${LIBDIR}/libtermcap.a LIBTERMCAPW?= ${DESTDIR}${LIBDIR}/libtermcapw.a @@ -158,13 +155,6 @@ LDADD:= ${LDADD:N-lc} -lc # Only do this for src builds. .if defined(SRCTOP) -.if defined(_LIBRARIES) && defined(LIB) && \ - ${_LIBRARIES:M${LIB}} != "" -.if !defined(LIB${LIB:tu}) -.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${DESTDIR}$${LIBDIR}/lib${LIB}.a -.endif -.endif - # Derive LIB*SRCDIR from LIB*DIR .for lib in ${_LIBRARIES} LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Dec 2 00:01:09 2015 (r291623) +++ head/share/mk/src.libnames.mk Wed Dec 2 00:17:13 2015 (r291624) @@ -163,8 +163,6 @@ _LIBRARIES= \ ypclnt \ z -# Each library's LIBADD needs to be duplicated here for static linkage of -# 2nd+ order consumers. _DP_80211= sbuf bsdxml _DP_archive= z bz2 lzma bsdxml .if ${MK_OPENSSL} != "no" @@ -172,7 +170,6 @@ _DP_archive+= crypto .else _DP_archive+= md .endif -_DP_sqlite3= pthread _DP_ssl= crypto _DP_ssh= crypto crypt .if ${MK_LDNS} != "no" @@ -220,7 +217,7 @@ _DP_fetch= md .endif _DP_execinfo= elf _DP_dwarf= elf -_DP_dpv= dialog figpar util ncursesw +_DP_dpv= dialog figpar util _DP_dialog= ncursesw m _DP_cuse= pthread _DP_atf_cxx= atf_c @@ -235,39 +232,16 @@ _DP_pam+= ssh .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif -_DP_readline= ncursesw -_DP_roken= crypt -_DP_kadm5clnt= com_err krb5 roken -_DP_kadm5srv= com_err hdb krb5 roken -_DP_heimntlm= crypto com_err krb5 roken -_DP_hx509= asn1 com_err crypto roken wind -_DP_hdb= asn1 com_err krb5 roken sqlite3 -_DP_asn1= com_err roken -_DP_kdc= roken hdb hx509 krb5 heimntlm asn1 crypto -_DP_wind= com_err roken -_DP_heimbase= pthread -_DP_heimipcc= heimbase roken pthread -_DP_heimipcs= heimbase roken pthread -_DP_kafs5= asn1 krb5 roken -_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc +_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc \ + pthread _DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err _DP_lzma= pthread _DP_ucl= m _DP_vmmapi= util _DP_ctf= z _DP_proc= rtld_db util -_DP_dtrace= ctf elf proc pthread rtld_db +_DP_dtrace= rtld_db pthread _DP_xo= util -# The libc dependencies are not strictly needed but are defined to make the -# assert happy. -_DP_c= compiler_rt -.if ${MK_SSP} != "no" -_DP_c+= ssp_nonshared -.endif -_DP_stdthreads= pthread -_DP_tacplus= md -_DP_panel= ncurses -_DP_panelw= ncursesw # Define spacial cases LDADD_supcplusplus= -lsupc++ @@ -317,7 +291,6 @@ DPADD_dtrace+= ${DPADD_ctf} ${DPADD_elf} LDADD_dtrace+= ${LDADD_ctf} ${LDADD_elf} ${LDADD_proc} # The following depends on libraries which are using pthread -# XXX: These vars are always empty DPADD_hdb+= ${DPADD_pthread} LDADD_hdb+= ${LDADD_pthread} DPADD_kadm5srv+= ${DPADD_pthread} @@ -333,10 +306,9 @@ LDADD+= ${LDADD_${_l}} .endfor .if defined(DPADD) && ${DPADD:Mmissing-dpadd_*} -.error ${.CURDIR}: Missing ${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/DPADD_/} variable add "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//}" to _LIBRARIES, _INTERNALLIBS, or _PRIVATELIBS and define "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/LIB/:tu}". +.error Missing ${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/DPADD_/} variable add "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//}" to _LIBRARIES, _INTERNALLIBS, or _PRIVATELIBS and define "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/LIB/:tu}". .endif -# INTERNALLIB definitions. LIBELFTCDIR= ${OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc.a @@ -380,7 +352,7 @@ LIBNTPEVENTDIR= ${OBJTOP}/usr.sbin/ntp/l LIBNTPEVENT?= ${LIBNTPEVENTDIR}/libntpevent.a LIBOPTSDIR= ${OBJTOP}/usr.sbin/ntp/libopts -LIBOPTS?= ${LIBOPTSDIR}/libopts.a +LIBOTPS?= ${LIBOPTSDIR}/libopts.a LIBPARSEDIR= ${OBJTOP}/usr.sbin/ntp/libparse LIBPARSE?= ${LIBPARSEDIR}/libparse.a @@ -444,10 +416,8 @@ LIBFORMDIR= ${OBJTOP}/lib/ncurses/form LIBFORMLIBWDIR= ${OBJTOP}/lib/ncurses/formw LIBMENUDIR= ${OBJTOP}/lib/ncurses/menu LIBMENULIBWDIR= ${OBJTOP}/lib/ncurses/menuw -LIBNCURSESDIR= ${OBJTOP}/lib/ncurses/ncurses -LIBNCURSESWDIR= ${OBJTOP}/lib/ncurses/ncursesw -LIBTERMCAPDIR= ${LIBNCURSESDIR} -LIBTERMCAPWDIR= ${LIBNCURSESWDIR} +LIBTERMCAPDIR= ${OBJTOP}/lib/ncurses/ncurses +LIBTERMCAPWDIR= ${OBJTOP}/lib/ncurses/ncursesw LIBPANELDIR= ${OBJTOP}/lib/ncurses/panel LIBPANELWDIR= ${OBJTOP}/lib/ncurses/panelw LIBCRYPTODIR= ${OBJTOP}/secure/lib/libcrypto @@ -462,18 +432,4 @@ LIBLNDIR= ${OBJTOP}/usr.bin/lex/lib LIB${lib:tu}DIR?= ${OBJTOP}/lib/lib${lib} .endfor -# Sanity check that libraries are defined here properly when building them. -.if defined(LIB) && ${_LIBRARIES:M${LIB}} != "" -.if !empty(LIBADD) && \ - (!defined(_DP_${LIB}) || ${LIBADD:O:u} != ${_DP_${LIB}:O:u}) -.info ${.CURDIR}: Missing or incorrect _DP_${LIB} entry in ${_this:T}. Should match LIBADD for ${LIB} ('${LIBADD}' vs '${_DP_${LIB}}') -.endif -.if !defined(LIB${LIB:tu}DIR) || !exists(${SRCTOP}/${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,}) -.error ${.CURDIR}: Missing or incorrect value for LIB${LIB:tu}DIR in ${_this:T}: ${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,} -.endif -.if ${_INTERNALLIBS:M${LIB}} != "" && !defined(LIB${LIB:tu}) -.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIB${LIB:tu}DIR}/lib${LIB}.a -.endif -.endif - .endif # !target(____) From owner-svn-src-all@freebsd.org Wed Dec 2 00:49:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60250A3E0EE; Wed, 2 Dec 2015 00:49:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 255AE1984; Wed, 2 Dec 2015 00:49:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB20nd0W058613; Wed, 2 Dec 2015 00:49:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB20ndrV058612; Wed, 2 Dec 2015 00:49:39 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020049.tB20ndrV058612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 00:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291625 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 00:49:40 -0000 Author: bdrewery Date: Wed Dec 2 00:49:39 2015 New Revision: 291625 URL: https://svnweb.freebsd.org/changeset/base/291625 Log: libssh uses libz even without MK_LDNS Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Dec 2 00:17:13 2015 (r291624) +++ head/share/mk/src.libnames.mk Wed Dec 2 00:49:39 2015 (r291625) @@ -171,9 +171,9 @@ _DP_archive+= crypto _DP_archive+= md .endif _DP_ssl= crypto -_DP_ssh= crypto crypt +_DP_ssh= crypto crypt z .if ${MK_LDNS} != "no" -_DP_ssh+= ldns z +_DP_ssh+= ldns .endif _DP_edit= ncursesw .if ${MK_OPENSSL} != "no" From owner-svn-src-all@freebsd.org Wed Dec 2 00:49:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5865AA3E106; Wed, 2 Dec 2015 00:49:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 284AC1987; Wed, 2 Dec 2015 00:49:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB20ngKr058658; Wed, 2 Dec 2015 00:49:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB20ngEi058657; Wed, 2 Dec 2015 00:49:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020049.tB20ngEi058657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 00:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291626 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 00:49:43 -0000 Author: bdrewery Date: Wed Dec 2 00:49:42 2015 New Revision: 291626 URL: https://svnweb.freebsd.org/changeset/base/291626 Log: Don't overlink libmt consumers with libsbuf. This change came in r281332 which was reducing overlinking in mt(1) but currently mt(1) is linked with sbuf when it does not need it due to the LDADD_mt+=${LDADD_sbuf}. Only libmt needs sbuf. Add sbuf to _DP_mt so static linkage of libmt picks it up. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Dec 2 00:49:39 2015 (r291625) +++ head/share/mk/src.libnames.mk Wed Dec 2 00:49:42 2015 (r291626) @@ -208,7 +208,7 @@ _DP_proc+= ctf _DP_mp= crypto _DP_memstat= kvm _DP_magic= z -_DP_mt= bsdxml +_DP_mt= sbuf bsdxml _DP_ldns= crypto .if ${MK_OPENSSL} != "no" _DP_fetch= ssl crypto @@ -284,9 +284,6 @@ LDADD_fifolog+= ${LDADD_z} DPADD_ipf+= ${DPADD_kvm} LDADD_ipf+= ${LDADD_kvm} -DPADD_mt+= ${DPADD_sbuf} -LDADD_mt+= ${LDADD_sbuf} - DPADD_dtrace+= ${DPADD_ctf} ${DPADD_elf} ${DPADD_proc} LDADD_dtrace+= ${LDADD_ctf} ${LDADD_elf} ${LDADD_proc} From owner-svn-src-all@freebsd.org Wed Dec 2 00:49:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8CEFA3E131; Wed, 2 Dec 2015 00:49:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B9751ACC; Wed, 2 Dec 2015 00:49:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB20nkNb058709; Wed, 2 Dec 2015 00:49:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB20nkbR058704; Wed, 2 Dec 2015 00:49:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020049.tB20nkbR058704@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 00:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291627 - in head: cddl/usr.sbin cddl/usr.sbin/plockstat targets/pseudo/userland/cddl tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 00:49:47 -0000 Author: bdrewery Date: Wed Dec 2 00:49:45 2015 New Revision: 291627 URL: https://svnweb.freebsd.org/changeset/base/291627 Log: Fully connect cddl/usr.sbin/plockstat. There seems to be no reason to keep this so private. Also add missing optional MK_CDDL files. Sponsored by: EMC / Isilon Storage Division Added: head/cddl/usr.sbin/plockstat/Makefile.depend (contents, props changed) Modified: head/cddl/usr.sbin/Makefile head/targets/pseudo/userland/cddl/Makefile.depend head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/cddl/usr.sbin/Makefile ============================================================================== --- head/cddl/usr.sbin/Makefile Wed Dec 2 00:49:42 2015 (r291626) +++ head/cddl/usr.sbin/Makefile Wed Dec 2 00:49:45 2015 (r291627) @@ -25,10 +25,8 @@ _zhack= zhack _dtrace= dtrace _dtruss= dtruss _lockstat= lockstat -.if defined(WITH_PLOCKSTAT) _plockstat= plockstat .endif -.endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" _dtrace= dtrace Added: head/cddl/usr.sbin/plockstat/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/plockstat/Makefile.depend Wed Dec 2 00:49:45 2015 (r291627) @@ -0,0 +1,27 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + cddl/lib/libctf \ + cddl/lib/libdtrace \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libcxxrt \ + lib/libelf \ + lib/libproc \ + lib/librtld_db \ + lib/libthr \ + lib/libutil \ + lib/libz \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Modified: head/targets/pseudo/userland/cddl/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/cddl/Makefile.depend Wed Dec 2 00:49:42 2015 (r291626) +++ head/targets/pseudo/userland/cddl/Makefile.depend Wed Dec 2 00:49:45 2015 (r291627) @@ -20,6 +20,7 @@ DIRDEPS = \ cddl/usr.sbin/dtrace \ cddl/usr.sbin/dtruss \ cddl/usr.sbin/lockstat \ + cddl/usr.sbin/plockstat \ DIRDEPS.ZFS = \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Dec 2 00:49:42 2015 (r291626) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Dec 2 00:49:45 2015 (r291627) @@ -978,7 +978,11 @@ OLD_FILES+=usr/lib32/libuutil_p.a OLD_LIBS+=lib/libdtrace.so.2 OLD_FILES+=usr/sbin/dtrace OLD_FILES+=usr/sbin/lockstat +OLD_FILES+=usr/sbin/plockstat OLD_FILES+=usr/share/man/man1/dtrace.1.gz +OLD_FILES+=usr/share/man/man1/dtruss.1.gz +OLD_FILES+=usr/share/man/man1/lockstat.1.gz +OLD_FILES+=usr/share/man/man1/plockstat.1.gz OLD_FILES+=usr/share/dtrace/disklatency OLD_FILES+=usr/share/dtrace/disklatencycmd OLD_FILES+=usr/share/dtrace/hotopen From owner-svn-src-all@freebsd.org Wed Dec 2 00:49:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3693FA3E145; Wed, 2 Dec 2015 00:49:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E18491BE2; Wed, 2 Dec 2015 00:49:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB20nnee058755; Wed, 2 Dec 2015 00:49:49 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB20nnKp058753; Wed, 2 Dec 2015 00:49:49 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020049.tB20nnKp058753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 00:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291628 - in head: cddl/usr.sbin/dtrace share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 00:49:51 -0000 Author: bdrewery Date: Wed Dec 2 00:49:49 2015 New Revision: 291628 URL: https://svnweb.freebsd.org/changeset/base/291628 Log: Reduce overlinking of libdtrace consumers with libctf, libelf, libproc. The proper place for this list is _DP_dtrace. Due to removing the LDADD_dtrace, more LIBADD are needed in cddl/usr.sbin/dtrace to prevent underlinking. This fixes overlinking in cddl/usr.sbin/lockstat and cddl/usr.sbin/plockstat. Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/usr.sbin/dtrace/Makefile head/share/mk/src.libnames.mk Modified: head/cddl/usr.sbin/dtrace/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/Makefile Wed Dec 2 00:49:45 2015 (r291627) +++ head/cddl/usr.sbin/dtrace/Makefile Wed Dec 2 00:49:49 2015 (r291628) @@ -22,7 +22,7 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ #CFLAGS+= -DNEED_ERRLOC #YFLAGS+= -d -LIBADD= dtrace +LIBADD= dtrace ctf elf proc .if ${MK_DTRACE_TESTS} != "no" SUBDIR+= tests Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Dec 2 00:49:45 2015 (r291627) +++ head/share/mk/src.libnames.mk Wed Dec 2 00:49:49 2015 (r291628) @@ -240,7 +240,7 @@ _DP_ucl= m _DP_vmmapi= util _DP_ctf= z _DP_proc= rtld_db util -_DP_dtrace= rtld_db pthread +_DP_dtrace= ctf elf proc pthread rtld_db _DP_xo= util # Define spacial cases @@ -284,9 +284,6 @@ LDADD_fifolog+= ${LDADD_z} DPADD_ipf+= ${DPADD_kvm} LDADD_ipf+= ${LDADD_kvm} -DPADD_dtrace+= ${DPADD_ctf} ${DPADD_elf} ${DPADD_proc} -LDADD_dtrace+= ${LDADD_ctf} ${LDADD_elf} ${LDADD_proc} - # The following depends on libraries which are using pthread DPADD_hdb+= ${DPADD_pthread} LDADD_hdb+= ${LDADD_pthread} From owner-svn-src-all@freebsd.org Wed Dec 2 00:54:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA02BA3E40D; Wed, 2 Dec 2015 00:54:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7421C1151; Wed, 2 Dec 2015 00:54:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB20s5gx061484; Wed, 2 Dec 2015 00:54:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB20s5Lo061483; Wed, 2 Dec 2015 00:54:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020054.tB20s5Lo061483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 00:54:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291629 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 00:54:06 -0000 Author: bdrewery Date: Wed Dec 2 00:54:05 2015 New Revision: 291629 URL: https://svnweb.freebsd.org/changeset/base/291629 Log: Fix truncation of _DP_proc and add missing libelf. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Dec 2 00:49:49 2015 (r291628) +++ head/share/mk/src.libnames.mk Wed Dec 2 00:54:05 2015 (r291629) @@ -205,6 +205,7 @@ _DP_proc= supcplusplus .if ${MK_CDDL} != "no" _DP_proc+= ctf .endif +_DP_proc+= elf rtld_db util _DP_mp= crypto _DP_memstat= kvm _DP_magic= z @@ -239,7 +240,6 @@ _DP_lzma= pthread _DP_ucl= m _DP_vmmapi= util _DP_ctf= z -_DP_proc= rtld_db util _DP_dtrace= ctf elf proc pthread rtld_db _DP_xo= util From owner-svn-src-all@freebsd.org Wed Dec 2 01:17:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A28D2A3E70B; Wed, 2 Dec 2015 01:17:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63AAC19D3; Wed, 2 Dec 2015 01:17:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB21H9AH067139; Wed, 2 Dec 2015 01:17:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB21H9GY067138; Wed, 2 Dec 2015 01:17:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020117.tB21H9GY067138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 01:17:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291630 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 01:17:10 -0000 Author: bdrewery Date: Wed Dec 2 01:17:09 2015 New Revision: 291630 URL: https://svnweb.freebsd.org/changeset/base/291630 Log: Don't overlink pthread to libsqlite3 consumers. At least usr.bin/mandoc was overlink. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Dec 2 00:54:05 2015 (r291629) +++ head/share/mk/src.libnames.mk Wed Dec 2 01:17:09 2015 (r291630) @@ -170,6 +170,7 @@ _DP_archive+= crypto .else _DP_archive+= md .endif +_DP_sqlite3= pthread _DP_ssl= crypto _DP_ssh= crypto crypt z .if ${MK_LDNS} != "no" @@ -275,9 +276,6 @@ LDADD_${_l}+= ${LDADD_${_d}} DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} -DPADD_sqlite3+= ${DPADD_pthread} -LDADD_sqlite3+= ${LDADD_pthread} - DPADD_fifolog+= ${DPADD_z} LDADD_fifolog+= ${LDADD_z} From owner-svn-src-all@freebsd.org Wed Dec 2 01:23:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA612A3E8AA; Wed, 2 Dec 2015 01:23:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DCB51D90; Wed, 2 Dec 2015 01:23:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB21NGDC069942; Wed, 2 Dec 2015 01:23:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB21NG6j069941; Wed, 2 Dec 2015 01:23:16 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020123.tB21NG6j069941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 01:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291631 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 01:23:17 -0000 Author: bdrewery Date: Wed Dec 2 01:23:16 2015 New Revision: 291631 URL: https://svnweb.freebsd.org/changeset/base/291631 Log: Don't overlink pthread to kerberos library consumers. I'm not sure why this was here, none of these use pthread themselves and none of the consumers are broken with removing this. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Dec 2 01:17:09 2015 (r291630) +++ head/share/mk/src.libnames.mk Wed Dec 2 01:23:16 2015 (r291631) @@ -282,16 +282,6 @@ LDADD_fifolog+= ${LDADD_z} DPADD_ipf+= ${DPADD_kvm} LDADD_ipf+= ${LDADD_kvm} -# The following depends on libraries which are using pthread -DPADD_hdb+= ${DPADD_pthread} -LDADD_hdb+= ${LDADD_pthread} -DPADD_kadm5srv+= ${DPADD_pthread} -LDADD_kadm5srv+= ${LDADD_pthread} -DPADD_krb5+= ${DPADD_pthread} -LDADD_krb5+= ${LDADD_pthread} -DPADD_gssapi_krb5+= ${DPADD_pthread} -LDADD_gssapi_krb5+= ${LDADD_pthread} - .for _l in ${LIBADD} DPADD+= ${DPADD_${_l}:Umissing-dpadd_${_l}} LDADD+= ${LDADD_${_l}} From owner-svn-src-all@freebsd.org Wed Dec 2 01:24:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A896CA3E944; Wed, 2 Dec 2015 01:24:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69A661FE2; Wed, 2 Dec 2015 01:24:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB21OVNK070200; Wed, 2 Dec 2015 01:24:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB21OV60070198; Wed, 2 Dec 2015 01:24:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020124.tB21OV60070198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 01:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291632 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 01:24:32 -0000 Author: bdrewery Date: Wed Dec 2 01:24:31 2015 New Revision: 291632 URL: https://svnweb.freebsd.org/changeset/base/291632 Log: Add assertions that capture invalid configurations for new libraries. Fix current findings, which should fix cases of NO_SHARED not building properly. Given libfoo: - Ensure that a LIBFOO is set. For INTERNALLIBS advise setting this in src.libnames.mk, otherwise bsd.libnames.mk. - Ensure that a LIBFOODIR is properly set. - Ensure that _DP_foo is set and matches the LIBADD in the build of foo's own Makefile Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Wed Dec 2 01:23:16 2015 (r291631) +++ head/share/mk/bsd.libnames.mk Wed Dec 2 01:24:31 2015 (r291632) @@ -42,6 +42,7 @@ LIBCRYPT?= ${DESTDIR}${LIBDIR}/libcrypt. LIBCRYPTO?= ${DESTDIR}${LIBDIR}/libcrypto.a LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurses.a +LIBCUSE?= ${DESTDIR}${LIBDIR}/libcuse.a LIBDEVCTL?= ${DESTDIR}${LIBDIR}/libdevctl.a LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a @@ -98,6 +99,7 @@ LIBNVPAIR?= ${DESTDIR}${LIBDIR}/libnvpai LIBOPIE?= ${DESTDIR}${LIBDIR}/libopie.a LIBPAM?= ${DESTDIR}${LIBDIR}/libpam.a LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel.a +LIBPANELW?= ${DESTDIR}${LIBDIR}/libpanelw.a LIBPCAP?= ${DESTDIR}${LIBDIR}/libpcap.a LIBPJDLOG?= ${DESTDIR}${LIBDIR}/libpjdlog.a LIBPMC?= ${DESTDIR}${LIBDIR}/libpmc.a @@ -117,6 +119,7 @@ LIBSSL?= ${DESTDIR}${LIBDIR}/libssl.a LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR}/libssp_nonshared.a LIBSTAND?= ${DESTDIR}${LIBDIR}/libstand.a LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a +LIBSTDTHREADS?= ${DESTDIR}${LIBDIR}/libstdthreads.a LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a LIBTERMCAP?= ${DESTDIR}${LIBDIR}/libtermcap.a LIBTERMCAPW?= ${DESTDIR}${LIBDIR}/libtermcapw.a @@ -155,6 +158,13 @@ LDADD:= ${LDADD:N-lc} -lc # Only do this for src builds. .if defined(SRCTOP) +.if defined(_LIBRARIES) && defined(LIB) && \ + ${_LIBRARIES:M${LIB}} != "" +.if !defined(LIB${LIB:tu}) +.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${DESTDIR}$${LIBDIR}/lib${LIB}.a +.endif +.endif + # Derive LIB*SRCDIR from LIB*DIR .for lib in ${_LIBRARIES} LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Wed Dec 2 01:23:16 2015 (r291631) +++ head/share/mk/src.libnames.mk Wed Dec 2 01:24:31 2015 (r291632) @@ -163,6 +163,8 @@ _LIBRARIES= \ ypclnt \ z +# Each library's LIBADD needs to be duplicated here for static linkage of +# 2nd+ order consumers. Auto-generating this would be better. _DP_80211= sbuf bsdxml _DP_archive= z bz2 lzma bsdxml .if ${MK_OPENSSL} != "no" @@ -188,7 +190,7 @@ _DP_kvm= elf _DP_pjdlog= util _DP_opie= md _DP_usb= pthread -_DP_unbound= pthread +_DP_unbound= ssl crypto pthread _DP_rt= pthread .if ${MK_OPENSSL} == "no" _DP_radius= md @@ -219,7 +221,7 @@ _DP_fetch= md .endif _DP_execinfo= elf _DP_dwarf= elf -_DP_dpv= dialog figpar util +_DP_dpv= dialog figpar util ncursesw _DP_dialog= ncursesw m _DP_cuse= pthread _DP_atf_cxx= atf_c @@ -234,8 +236,21 @@ _DP_pam+= ssh .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif -_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc \ - pthread +_DP_readline= ncursesw +_DP_roken= crypt +_DP_kadm5clnt= com_err krb5 roken +_DP_kadm5srv= com_err hdb krb5 roken +_DP_heimntlm= crypto com_err krb5 roken +_DP_hx509= asn1 com_err crypto roken wind +_DP_hdb= asn1 com_err krb5 roken sqlite3 +_DP_asn1= com_err roken +_DP_kdc= roken hdb hx509 krb5 heimntlm asn1 crypto +_DP_wind= com_err roken +_DP_heimbase= pthread +_DP_heimipcc= heimbase roken pthread +_DP_heimipcs= heimbase roken pthread +_DP_kafs5= asn1 krb5 roken +_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc _DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err _DP_lzma= pthread _DP_ucl= m @@ -243,6 +258,19 @@ _DP_vmmapi= util _DP_ctf= z _DP_dtrace= ctf elf proc pthread rtld_db _DP_xo= util +# The libc dependencies are not strictly needed but are defined to make the +# assert happy. +_DP_c= compiler_rt +.if ${MK_SSP} != "no" +_DP_c+= ssp_nonshared +.endif +_DP_stdthreads= pthread +_DP_tacplus= md +_DP_panel= ncurses +_DP_panelw= ncursesw +_DP_rpcsec_gss= gssapi +_DP_smb= kiconv +_DP_ulog= md # Define spacial cases LDADD_supcplusplus= -lsupc++ @@ -273,12 +301,21 @@ LDADD_${_l}+= ${LDADD_${_d}} .endif .endfor +# These are special cases where the library is broken and anything that uses +# it needs to add more dependencies. Many _INTERNALLIBS fall into this +# category. Unless the library itself is broken then the proper place to +# define dependencies is _DP_* above. + +# libatf-c++ exposes libatf-c abi hence we need to explicit link to atf_c for +# atf_cxx DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} +# _INTERNALLIBS. +# XXX: This should likely be reworked to have LIBADD in them and use normal +# _DP_ lists just to avoid temptation to add more similar entries here. DPADD_fifolog+= ${DPADD_z} LDADD_fifolog+= ${LDADD_z} - DPADD_ipf+= ${DPADD_kvm} LDADD_ipf+= ${LDADD_kvm} @@ -288,9 +325,10 @@ LDADD+= ${LDADD_${_l}} .endfor .if defined(DPADD) && ${DPADD:Mmissing-dpadd_*} -.error Missing ${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/DPADD_/} variable add "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//}" to _LIBRARIES, _INTERNALLIBS, or _PRIVATELIBS and define "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/LIB/:tu}". +.error ${.CURDIR}: Missing ${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/DPADD_/} variable add "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//}" to _LIBRARIES, _INTERNALLIBS, or _PRIVATELIBS and define "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/LIB/:tu}". .endif +# INTERNALLIB definitions. LIBELFTCDIR= ${OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc.a @@ -334,7 +372,7 @@ LIBNTPEVENTDIR= ${OBJTOP}/usr.sbin/ntp/l LIBNTPEVENT?= ${LIBNTPEVENTDIR}/libntpevent.a LIBOPTSDIR= ${OBJTOP}/usr.sbin/ntp/libopts -LIBOTPS?= ${LIBOPTSDIR}/libopts.a +LIBOPTS?= ${LIBOPTSDIR}/libopts.a LIBPARSEDIR= ${OBJTOP}/usr.sbin/ntp/libparse LIBPARSE?= ${LIBPARSEDIR}/libparse.a @@ -398,8 +436,10 @@ LIBFORMDIR= ${OBJTOP}/lib/ncurses/form LIBFORMLIBWDIR= ${OBJTOP}/lib/ncurses/formw LIBMENUDIR= ${OBJTOP}/lib/ncurses/menu LIBMENULIBWDIR= ${OBJTOP}/lib/ncurses/menuw -LIBTERMCAPDIR= ${OBJTOP}/lib/ncurses/ncurses -LIBTERMCAPWDIR= ${OBJTOP}/lib/ncurses/ncursesw +LIBNCURSESDIR= ${OBJTOP}/lib/ncurses/ncurses +LIBNCURSESWDIR= ${OBJTOP}/lib/ncurses/ncursesw +LIBTERMCAPDIR= ${LIBNCURSESDIR} +LIBTERMCAPWDIR= ${LIBNCURSESWDIR} LIBPANELDIR= ${OBJTOP}/lib/ncurses/panel LIBPANELWDIR= ${OBJTOP}/lib/ncurses/panelw LIBCRYPTODIR= ${OBJTOP}/secure/lib/libcrypto @@ -414,4 +454,18 @@ LIBLNDIR= ${OBJTOP}/usr.bin/lex/lib LIB${lib:tu}DIR?= ${OBJTOP}/lib/lib${lib} .endfor +# Sanity check that libraries are defined here properly when building them. +.if defined(LIB) && ${_LIBRARIES:M${LIB}} != "" +.if !empty(LIBADD) && \ + (!defined(_DP_${LIB}) || ${LIBADD:O:u} != ${_DP_${LIB}:O:u}) +.error ${.CURDIR}: Missing or incorrect _DP_${LIB} entry in ${_this:T}. Should match LIBADD for ${LIB} ('${LIBADD}' vs '${_DP_${LIB}}') +.endif +.if !defined(LIB${LIB:tu}DIR) || !exists(${SRCTOP}/${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,}) +.error ${.CURDIR}: Missing or incorrect value for LIB${LIB:tu}DIR in ${_this:T}: ${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,} +.endif +.if ${_INTERNALLIBS:M${LIB}} != "" && !defined(LIB${LIB:tu}) +.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIB${LIB:tu}DIR}/lib${LIB}.a +.endif +.endif + .endif # !target(____) From owner-svn-src-all@freebsd.org Wed Dec 2 01:47:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8567FA3EE89; Wed, 2 Dec 2015 01:47:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4583D1AA8; Wed, 2 Dec 2015 01:47:28 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB21lR8v076267; Wed, 2 Dec 2015 01:47:27 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB21lRIb076266; Wed, 2 Dec 2015 01:47:27 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020147.tB21lRIb076266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 01:47:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291633 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 01:47:28 -0000 Author: bdrewery Date: Wed Dec 2 01:47:27 2015 New Revision: 291633 URL: https://svnweb.freebsd.org/changeset/base/291633 Log: bsd.subdir.mk: Only recurse on called targets, rather than dependencies. This is to fix 'make all' causing it to recurse on both 'all' and 'buildconfig' due to 'buildconfig' being in ALL_SUBDIR_TARGETS and being a dependency of 'all'. This now adds all of the '*includes', '*files' targets as subdir targets, allowing them to recurse. This also removes the need for some 'realinstall' hacks in bsd.subdir.mk since it no longer recurses; only 'install' will recurse and call the proper 'beforeinstall', 'realinstall', and 'afterinstall' in each sub-directory. This fixes 'make includes' and 'make files' to not be a rerolled ${MAKE} sub-shell but to rather just recurse on 'inclues' and 'files'. This avoids various issues such as the one fixed in r289462. As such revert Makefile.inc1 back to using 'includes' which avoids an extra tree walk and parallelizes the includes phases better. Makefile.inc1 includes a guard so that 'make all' will not use SUBDIR_PARALLEL, added in r289438. This is so users do not get a probably broken build if they run 'make all' from the top-level. Before the change in this commit, the workaround for 'make everything' was 'par-all' which would depend on 'all' and cause a proper parallel recursion. Now that will not work so a new _PARALLEL_SUBUDIR_OK is used to allow it. This is still part of an effort to combine bsd.(files|incs|confs).mk and move some of its logic out of bsd.subdir.mk, as attempted in r289282 and reverted in r289331. This commit fixes the problems found there which was mostly double recursing during 'includes' which would recurse on itself and 'buildincludes' and 'installincludes', all in parallel. The logic is still in bsd.subdir.mk for now. I've been cautious about this commit but have experienced no breakage on the tree except for the 'par-all' case which was already a hack. If something foo is depending on something bar that should recurse, it is very likely that the foo target is being recursed on already meaning that bar will still effectively recurse once sub-directories call foo. Discussed on: arch@ MFC after: never Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Wed Dec 2 01:24:31 2015 (r291632) +++ head/share/mk/bsd.subdir.mk Wed Dec 2 01:47:27 2015 (r291633) @@ -36,10 +36,11 @@ .if !target(____) ____: -ALL_SUBDIR_TARGETS= all all-man buildconfig checkdpadd clean cleandepend \ - cleandir cleanilinks cleanobj depend distribute \ - installconfig lint maninstall manlint obj objlink \ - realinstall regress tags \ +ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \ + checkdpadd clean cleandepend cleandir cleanilinks \ + cleanobj depend distribute files includes installconfig \ + installfiles installincludes install lint maninstall \ + manlint obj objlink regress tags \ ${SUBDIR_TARGETS} # Described above. @@ -71,6 +72,27 @@ distribute: .MAKE .endfor .endif +# Convenience targets to run 'build${target}' and 'install${target}' when +# calling 'make ${target}'. +.for __target in files includes +.if !target(${__target}) +${__target}: build${__target} install${__target} +.ORDER: build${__target} install${__target} +.endif +.endfor + +# Make 'install' supports a before and after target. Actual install +# hooks are placed in 'realinstall'. +.if !target(install) +.for __stage in before real after +.if !target(${__stage}install) +${__stage}install: +.endif +.endfor +install: beforeinstall realinstall afterinstall +.ORDER: beforeinstall realinstall afterinstall +.endif + # Subdir code shared among 'make ', 'make ' and SUBDIR_PARALLEL. _SUBDIR_SH= \ if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \ @@ -82,7 +104,7 @@ _SUBDIR_SH= \ _SUBDIR: .USEBEFORE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}target=${.TARGET:S,realinstall,install,}; \ + @${_+_}target=${.TARGET}; \ for dir in ${SUBDIR:N.WAIT}; do ( ${_SUBDIR_SH} ); done .endif @@ -101,6 +123,10 @@ SUBDIR:= ${SUBDIR:N.WAIT} .else _is_standalone_target= 0 .endif +# Only recurse on directly-called targets. I.e., don't recurse on dependencies +# such as 'install' becoming {before,real,after}install, just recurse +# 'install'. +.if make(${__target}) .if defined(SUBDIR_PARALLEL) || ${_is_standalone_target} == 1 __subdir_targets= .for __dir in ${SUBDIR} @@ -116,7 +142,7 @@ __deps+= ${__target}_subdir_${__dep} .endif ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) - @${_+_}target=${__target:realinstall=install}; \ + @${_+_}target=${__target}; \ dir=${__dir}; \ ${_SUBDIR_SH}; .endif @@ -126,35 +152,11 @@ ${__target}: ${__subdir_targets} .else ${__target}: _SUBDIR .endif # SUBDIR_PARALLEL || _is_standalone_target +.elif !target(${__target}) +${__target}: +.endif # make(${__target}) .endfor # __target in ${ALL_SUBDIR_TARGETS} -# This is to support 'make includes' calling 'make buildincludes' and -# 'make installincludes' in the proper order, and to support these -# targets as SUBDIR_TARGETS. -.for __target in files includes -.for __stage in build install -${__stage}${__target}: -.if make(${__stage}${__target}) -${__stage}${__target}: _SUBDIR -.endif -.endfor -.if !target(${__target}) -${__target}: .MAKE - ${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} -.endif -.endfor - -.endif - -.if !target(install) -.if !target(beforeinstall) -beforeinstall: -.endif -.if !target(afterinstall) -afterinstall: -.endif -install: beforeinstall realinstall afterinstall -.ORDER: beforeinstall realinstall afterinstall -.endif +.endif # !target(_SUBDIR) .endif From owner-svn-src-all@freebsd.org Wed Dec 2 01:49:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E007A3EEEB; Wed, 2 Dec 2015 01:49:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13E0D1C57; Wed, 2 Dec 2015 01:49:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB21nNeG076376; Wed, 2 Dec 2015 01:49:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB21nNPZ076375; Wed, 2 Dec 2015 01:49:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020149.tB21nNPZ076375@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 01:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291634 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 01:49:24 -0000 Author: bdrewery Date: Wed Dec 2 01:49:22 2015 New Revision: 291634 URL: https://svnweb.freebsd.org/changeset/base/291634 Log: Revert r291633. Some files were missed. Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Wed Dec 2 01:47:27 2015 (r291633) +++ head/share/mk/bsd.subdir.mk Wed Dec 2 01:49:22 2015 (r291634) @@ -36,11 +36,10 @@ .if !target(____) ____: -ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \ - checkdpadd clean cleandepend cleandir cleanilinks \ - cleanobj depend distribute files includes installconfig \ - installfiles installincludes install lint maninstall \ - manlint obj objlink regress tags \ +ALL_SUBDIR_TARGETS= all all-man buildconfig checkdpadd clean cleandepend \ + cleandir cleanilinks cleanobj depend distribute \ + installconfig lint maninstall manlint obj objlink \ + realinstall regress tags \ ${SUBDIR_TARGETS} # Described above. @@ -72,27 +71,6 @@ distribute: .MAKE .endfor .endif -# Convenience targets to run 'build${target}' and 'install${target}' when -# calling 'make ${target}'. -.for __target in files includes -.if !target(${__target}) -${__target}: build${__target} install${__target} -.ORDER: build${__target} install${__target} -.endif -.endfor - -# Make 'install' supports a before and after target. Actual install -# hooks are placed in 'realinstall'. -.if !target(install) -.for __stage in before real after -.if !target(${__stage}install) -${__stage}install: -.endif -.endfor -install: beforeinstall realinstall afterinstall -.ORDER: beforeinstall realinstall afterinstall -.endif - # Subdir code shared among 'make ', 'make ' and SUBDIR_PARALLEL. _SUBDIR_SH= \ if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \ @@ -104,7 +82,7 @@ _SUBDIR_SH= \ _SUBDIR: .USEBEFORE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}target=${.TARGET}; \ + @${_+_}target=${.TARGET:S,realinstall,install,}; \ for dir in ${SUBDIR:N.WAIT}; do ( ${_SUBDIR_SH} ); done .endif @@ -123,10 +101,6 @@ SUBDIR:= ${SUBDIR:N.WAIT} .else _is_standalone_target= 0 .endif -# Only recurse on directly-called targets. I.e., don't recurse on dependencies -# such as 'install' becoming {before,real,after}install, just recurse -# 'install'. -.if make(${__target}) .if defined(SUBDIR_PARALLEL) || ${_is_standalone_target} == 1 __subdir_targets= .for __dir in ${SUBDIR} @@ -142,7 +116,7 @@ __deps+= ${__target}_subdir_${__dep} .endif ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) - @${_+_}target=${__target}; \ + @${_+_}target=${__target:realinstall=install}; \ dir=${__dir}; \ ${_SUBDIR_SH}; .endif @@ -152,11 +126,35 @@ ${__target}: ${__subdir_targets} .else ${__target}: _SUBDIR .endif # SUBDIR_PARALLEL || _is_standalone_target -.elif !target(${__target}) -${__target}: -.endif # make(${__target}) .endfor # __target in ${ALL_SUBDIR_TARGETS} -.endif # !target(_SUBDIR) +# This is to support 'make includes' calling 'make buildincludes' and +# 'make installincludes' in the proper order, and to support these +# targets as SUBDIR_TARGETS. +.for __target in files includes +.for __stage in build install +${__stage}${__target}: +.if make(${__stage}${__target}) +${__stage}${__target}: _SUBDIR +.endif +.endfor +.if !target(${__target}) +${__target}: .MAKE + ${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} +.endif +.endfor + +.endif + +.if !target(install) +.if !target(beforeinstall) +beforeinstall: +.endif +.if !target(afterinstall) +afterinstall: +.endif +install: beforeinstall realinstall afterinstall +.ORDER: beforeinstall realinstall afterinstall +.endif .endif From owner-svn-src-all@freebsd.org Wed Dec 2 01:50:24 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA98AA3EF6B; Wed, 2 Dec 2015 01:50:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4A8C1DD1; Wed, 2 Dec 2015 01:50:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB21oM9U076462; Wed, 2 Dec 2015 01:50:22 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB21oMtW076460; Wed, 2 Dec 2015 01:50:22 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020150.tB21oMtW076460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 01:50:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291635 - in head: . share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 01:50:24 -0000 Author: bdrewery Date: Wed Dec 2 01:50:22 2015 New Revision: 291635 URL: https://svnweb.freebsd.org/changeset/base/291635 Log: bsd.subdir.mk: Only recurse on called targets, rather than dependencies. This is to fix 'make all' causing it to recurse on both 'all' and 'buildconfig' due to 'buildconfig' being in ALL_SUBDIR_TARGETS and being a dependency of 'all'. This now adds all of the '*includes', '*files' targets as subdir targets, allowing them to recurse. This also removes the need for some 'realinstall' hacks in bsd.subdir.mk since it no longer recurses; only 'install' will recurse and call the proper 'beforeinstall', 'realinstall', and 'afterinstall' in each sub-directory. This fixes 'make includes' and 'make files' to not be a rerolled ${MAKE} sub-shell but to rather just recurse on 'inclues' and 'files'. This avoids various issues such as the one fixed in r289462. As such revert Makefile.inc1 back to using 'includes' which avoids an extra tree walk and parallelizes the includes phases better. Makefile.inc1 includes a guard so that 'make all' will not use SUBDIR_PARALLEL, added in r289438. This is so users do not get a probably broken build if they run 'make all' from the top-level. Before the change in this commit, the workaround for 'make everything' was 'par-all' which would depend on 'all' and cause a proper parallel recursion. Now that will not work so a new _PARALLEL_SUBUDIR_OK is used to allow it. This is still part of an effort to combine bsd.(files|incs|confs).mk and move some of its logic out of bsd.subdir.mk, as attempted in r289282 and reverted in r289331. This commit fixes the problems found there which was mostly double recursing during 'includes' which would recurse on itself and 'buildincludes' and 'installincludes', all in parallel. The logic is still in bsd.subdir.mk for now. I've been cautious about this commit but have experienced no breakage on the tree except for the 'par-all' case which was already a hack. If something foo is depending on something bar that should recurse, it is very likely that the foo target is being recursed on already meaning that bar will still effectively recurse once sub-directories call foo. Discussed on: arch@ MFC after: never Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 head/share/mk/bsd.subdir.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Dec 2 01:49:22 2015 (r291634) +++ head/Makefile.inc1 Wed Dec 2 01:50:22 2015 (r291635) @@ -643,12 +643,9 @@ _includes: # Special handling for SUBDIR_OVERRIDE in buildworld as they most likely need # headers from default SUBDIR. Do SUBDIR_OVERRIDE includes last. ${_+_}cd ${.CURDIR}; ${WMAKE} SUBDIR_OVERRIDE= SHARED=symlinks \ - buildincludes - ${_+_}cd ${.CURDIR}; ${WMAKE} SUBDIR_OVERRIDE= SHARED=symlinks \ - installincludes + includes .if !empty(SUBDIR_OVERRIDE) && make(buildworld) - ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks buildincludes - ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks installincludes + ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes .endif _libraries: @echo @@ -669,7 +666,7 @@ everything: @echo "--------------------------------------------------------------" @echo ">>> stage 4.4: building everything" @echo "--------------------------------------------------------------" - ${_+_}cd ${.CURDIR}; ${WMAKE} par-all + ${_+_}cd ${.CURDIR}; _PARALLEL_SUBUDIR_OK=1 ${WMAKE} all .if defined(LIB32TMP) build32: .PHONY @echo @@ -2010,16 +2007,15 @@ _startup_libs: ${_startup_libs:S/$/__L/} _prebuild_libs: ${_prebuild_libs:S/$/__L/} _generic_libs: ${_generic_libs:S/$/__L/} -# Enable SUBDIR_PARALLEL when not calling 'make all', unless called as -# 'par-all'. This is because it is unlikely that running 'make all' from -# the top-level, especially with a SUBDIR_OVERRIDE or LOCAL_DIRS set, -# will have a reliable build if SUBDIRs are built in parallel. This is -# safe for the world stage of buildworld though since it has already -# built libraries in a proper order and installed includes into WORLDTMP. -# Special handling is done for SUBDIR ordering for 'install*' to avoid -# trashing a system if it crashes mid-install. -par-all: all .PHONY -.if !make(all) +# Enable SUBDIR_PARALLEL when not calling 'make all', unless called from +# 'everything' with _PARALLEL_SUBUDIR_OK set. This is because it is unlikely +# that running 'make all' from the top-level, especially with a SUBDIR_OVERRIDE +# or LOCAL_DIRS set, will have a reliable build if SUBDIRs are built in +# parallel. This is safe for the world stage of buildworld though since it has +# already built libraries in a proper order and installed includes into +# WORLDTMP. Special handling is done for SUBDIR ordering for 'install*' to +# avoid trashing a system if it crashes mid-install. +.if !make(all) || defined(_PARALLEL_SUBUDIR_OK) SUBDIR_PARALLEL= .endif @@ -2359,9 +2355,7 @@ _xi-cross-tools: .PHONY .endfor _xi-includes: .PHONY - ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 buildincludes \ - DESTDIR=${XDDESTDIR} - ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 installincludes \ + ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 includes \ DESTDIR=${XDDESTDIR} _xi-libraries: .PHONY Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Wed Dec 2 01:49:22 2015 (r291634) +++ head/share/mk/bsd.subdir.mk Wed Dec 2 01:50:22 2015 (r291635) @@ -36,10 +36,11 @@ .if !target(____) ____: -ALL_SUBDIR_TARGETS= all all-man buildconfig checkdpadd clean cleandepend \ - cleandir cleanilinks cleanobj depend distribute \ - installconfig lint maninstall manlint obj objlink \ - realinstall regress tags \ +ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \ + checkdpadd clean cleandepend cleandir cleanilinks \ + cleanobj depend distribute files includes installconfig \ + installfiles installincludes install lint maninstall \ + manlint obj objlink regress tags \ ${SUBDIR_TARGETS} # Described above. @@ -71,6 +72,27 @@ distribute: .MAKE .endfor .endif +# Convenience targets to run 'build${target}' and 'install${target}' when +# calling 'make ${target}'. +.for __target in files includes +.if !target(${__target}) +${__target}: build${__target} install${__target} +.ORDER: build${__target} install${__target} +.endif +.endfor + +# Make 'install' supports a before and after target. Actual install +# hooks are placed in 'realinstall'. +.if !target(install) +.for __stage in before real after +.if !target(${__stage}install) +${__stage}install: +.endif +.endfor +install: beforeinstall realinstall afterinstall +.ORDER: beforeinstall realinstall afterinstall +.endif + # Subdir code shared among 'make ', 'make ' and SUBDIR_PARALLEL. _SUBDIR_SH= \ if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \ @@ -82,7 +104,7 @@ _SUBDIR_SH= \ _SUBDIR: .USEBEFORE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}target=${.TARGET:S,realinstall,install,}; \ + @${_+_}target=${.TARGET}; \ for dir in ${SUBDIR:N.WAIT}; do ( ${_SUBDIR_SH} ); done .endif @@ -101,6 +123,10 @@ SUBDIR:= ${SUBDIR:N.WAIT} .else _is_standalone_target= 0 .endif +# Only recurse on directly-called targets. I.e., don't recurse on dependencies +# such as 'install' becoming {before,real,after}install, just recurse +# 'install'. +.if make(${__target}) .if defined(SUBDIR_PARALLEL) || ${_is_standalone_target} == 1 __subdir_targets= .for __dir in ${SUBDIR} @@ -116,7 +142,7 @@ __deps+= ${__target}_subdir_${__dep} .endif ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) - @${_+_}target=${__target:realinstall=install}; \ + @${_+_}target=${__target}; \ dir=${__dir}; \ ${_SUBDIR_SH}; .endif @@ -126,35 +152,11 @@ ${__target}: ${__subdir_targets} .else ${__target}: _SUBDIR .endif # SUBDIR_PARALLEL || _is_standalone_target +.elif !target(${__target}) +${__target}: +.endif # make(${__target}) .endfor # __target in ${ALL_SUBDIR_TARGETS} -# This is to support 'make includes' calling 'make buildincludes' and -# 'make installincludes' in the proper order, and to support these -# targets as SUBDIR_TARGETS. -.for __target in files includes -.for __stage in build install -${__stage}${__target}: -.if make(${__stage}${__target}) -${__stage}${__target}: _SUBDIR -.endif -.endfor -.if !target(${__target}) -${__target}: .MAKE - ${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} -.endif -.endfor - -.endif - -.if !target(install) -.if !target(beforeinstall) -beforeinstall: -.endif -.if !target(afterinstall) -afterinstall: -.endif -install: beforeinstall realinstall afterinstall -.ORDER: beforeinstall realinstall afterinstall -.endif +.endif # !target(_SUBDIR) .endif From owner-svn-src-all@freebsd.org Wed Dec 2 02:11:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4918A3E628; Wed, 2 Dec 2015 02:11:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79B3C1A70; Wed, 2 Dec 2015 02:11:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB22Bc22082865; Wed, 2 Dec 2015 02:11:38 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB22BcUB082864; Wed, 2 Dec 2015 02:11:38 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020211.tB22BcUB082864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 02:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291637 - head/cddl/contrib/opensolaris/cmd/plockstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 02:11:39 -0000 Author: bdrewery Date: Wed Dec 2 02:11:38 2015 New Revision: 291637 URL: https://svnweb.freebsd.org/changeset/base/291637 Log: Fix the build for non-amd64. Modified: head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c Modified: head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c Wed Dec 2 01:55:14 2015 (r291636) +++ head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c Wed Dec 2 02:11:38 2015 (r291637) @@ -515,7 +515,7 @@ getsym(struct ps_prochandle *P, uintptr_ if (P == NULL || Pxlookup_by_addr(P, addr, name, sizeof (name), &sym, &info) != 0) { - (void) snprintf(buf, size, "%#lx", addr); + (void) snprintf(buf, size, "%#lx", (unsigned long)addr); return (0); } #ifdef illumos @@ -537,7 +537,7 @@ getsym(struct ps_prochandle *P, uintptr_ size -= len; if (sym.st_value != addr) - len = snprintf(buf, size, "+%#lx", addr - sym.st_value); + len = snprintf(buf, size, "+%#lx", (unsigned long)(addr - sym.st_value)); if (nolocks && strcmp("libc.so.1", map->pr_mapname) == 0 && (strstr("mutex", name) == 0 || From owner-svn-src-all@freebsd.org Wed Dec 2 02:47:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5B9EA3EBFD; Wed, 2 Dec 2015 02:47:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C22C6161D; Wed, 2 Dec 2015 02:47:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB22lDkU093595; Wed, 2 Dec 2015 02:47:13 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB22lDYd093592; Wed, 2 Dec 2015 02:47:13 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201512020247.tB22lDYd093592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 2 Dec 2015 02:47:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291638 - head/sys/fs/nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 02:47:15 -0000 Author: rmacklem Date: Wed Dec 2 02:47:13 2015 New Revision: 291638 URL: https://svnweb.freebsd.org/changeset/base/291638 Log: Fix the memory leak that occurs when the nfscommon.ko module is unloaded. This leak was introduced by r291527. Since the nfscommon.ko module is rarely unloaded, this leak would not have been much of an issue. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Wed Dec 2 02:11:38 2015 (r291637) +++ head/sys/fs/nfs/nfs_commonport.c Wed Dec 2 02:47:13 2015 (r291638) @@ -623,6 +623,8 @@ nfscommon_modevent(module_t mod, int typ nfsd_call_nfscommon = NULL; callout_drain(&newnfsd_callout); + /* Clean out the name<-->id cache. */ + nfsrv_cleanusergroup(); /* and get rid of the mutexes */ mtx_destroy(&nfs_nameid_mutex); mtx_destroy(&newnfsd_mtx); Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Wed Dec 2 02:11:38 2015 (r291637) +++ head/sys/fs/nfs/nfs_commonsubs.c Wed Dec 2 02:47:13 2015 (r291638) @@ -3546,6 +3546,55 @@ nfsrv_removeuser(struct nfsusrgrp *usrp, } /* + * Free up all the allocations related to the name<-->id cache. + * This function should only be called when the nfsuserd daemon isn't + * running, since it doesn't do any locking. + * This function is meant to be used when the nfscommon module is unloaded. + */ +APPLESTATIC void +nfsrv_cleanusergroup(void) +{ + struct nfsrv_lughash *hp, *hp2; + struct nfsusrgrp *nusrp, *usrp; + int i; + + if (nfsuserhash == NULL) + return; + + for (i = 0; i < nfsrv_lughashsize; i++) { + hp = &nfsuserhash[i]; + TAILQ_FOREACH_SAFE(usrp, &hp->lughead, lug_numhash, nusrp) { + TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); + hp2 = NFSUSERNAMEHASH(usrp->lug_name, + usrp->lug_namelen); + TAILQ_REMOVE(&hp2->lughead, usrp, lug_namehash); + if (usrp->lug_cred != NULL) + crfree(usrp->lug_cred); + free(usrp, M_NFSUSERGROUP); + } + hp = &nfsgrouphash[i]; + TAILQ_FOREACH_SAFE(usrp, &hp->lughead, lug_numhash, nusrp) { + TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); + hp2 = NFSGROUPNAMEHASH(usrp->lug_name, + usrp->lug_namelen); + TAILQ_REMOVE(&hp2->lughead, usrp, lug_namehash); + if (usrp->lug_cred != NULL) + crfree(usrp->lug_cred); + free(usrp, M_NFSUSERGROUP); + } + mtx_destroy(&nfsuserhash[i].mtx); + mtx_destroy(&nfsusernamehash[i].mtx); + mtx_destroy(&nfsgroupnamehash[i].mtx); + mtx_destroy(&nfsgrouphash[i].mtx); + } + free(nfsuserhash, M_NFSUSERGROUP); + free(nfsusernamehash, M_NFSUSERGROUP); + free(nfsgrouphash, M_NFSUSERGROUP); + free(nfsgroupnamehash, M_NFSUSERGROUP); + free(nfsrv_dnsname, M_NFSSTRING); +} + +/* * This function scans a byte string and checks for UTF-8 compliance. * It returns 0 if it conforms and NFSERR_INVAL if not. */ Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Wed Dec 2 02:11:38 2015 (r291637) +++ head/sys/fs/nfs/nfs_var.h Wed Dec 2 02:47:13 2015 (r291638) @@ -283,6 +283,7 @@ void nfsv4_getref(struct nfsv4lock *, in int nfsv4_getref_nonblock(struct nfsv4lock *); int nfsv4_testlock(struct nfsv4lock *); int nfsrv_mtostr(struct nfsrv_descript *, char *, int); +void nfsrv_cleanusergroup(void); int nfsrv_checkutf8(u_int8_t *, int); int newnfs_sndlock(int *); void newnfs_sndunlock(int *); From owner-svn-src-all@freebsd.org Wed Dec 2 04:18:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D4DFA3FA17; Wed, 2 Dec 2015 04:18:31 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-ig0-x233.google.com (mail-ig0-x233.google.com [IPv6:2607:f8b0:4001:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 244401D0C; Wed, 2 Dec 2015 04:18:31 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: by igvg19 with SMTP id g19so109987859igv.1; Tue, 01 Dec 2015 20:18:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=QEwtHjALwoX8ipFuPUnDmvuj4hIfUg63StBmPoKhfBo=; b=XXfHO029xlfOnllG8glZQGQy8AbRgmV1T+eeLpnIJNqWVcikT5qViBwCK0JPshBOP6 /huX+GiNavAgGxhzikdEiONXFM+3PL26Rx6AWPGZT22u2GdxFpbHyIwAcZOxWmI2fxbC U1/ze+q5ohnwKvCAL2vdUGiFS4BhdAnZSLFIEkwmQ0cS0BLk2n5ZKweP7/vdV0bvMvlr BJ6rD2RmFPSO4CZIO3GGP+etgxSKp7lSdMeGaKzQn1Tx5x2eCHCOzXGJrj4MxsR8Qhzn B7ovHRfBH29uZCr61OesANccgwb82MsjidurhEveux8sOWUfU4tindCykPaDUWQ90WW2 C5bg== MIME-Version: 1.0 X-Received: by 10.50.155.106 with SMTP id vv10mr1647228igb.36.1449029910565; Tue, 01 Dec 2015 20:18:30 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.50.152.69 with HTTP; Tue, 1 Dec 2015 20:18:30 -0800 (PST) In-Reply-To: <201512020211.tB22BcUB082864@repo.freebsd.org> References: <201512020211.tB22BcUB082864@repo.freebsd.org> Date: Tue, 1 Dec 2015 20:18:30 -0800 X-Google-Sender-Auth: D9rG8ZNpvXq69VCeviN_Ljo68ms Message-ID: Subject: Re: svn commit: r291637 - head/cddl/contrib/opensolaris/cmd/plockstat From: Craig Rodrigues To: Bryan Drewery Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 04:18:31 -0000 On Tue, Dec 1, 2015 at 6:11 PM, Bryan Drewery wrote: > - (void) snprintf(buf, size, "%#lx", addr); > + (void) snprintf(buf, size, "%#lx", (unsigned long)addr); > return (0); > In the past when I've hit these types of problems, I have found that using %#jx and casting to (uintmax_t) instead seemed to work consistently across different platforms, so you might want to do that here. There are lots of examples in the tree of this pattern. -- Craig From owner-svn-src-all@freebsd.org Wed Dec 2 05:03:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27050A341E0; Wed, 2 Dec 2015 05:03:58 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-wm0-x235.google.com (mail-wm0-x235.google.com [IPv6:2a00:1450:400c:c09::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2F591F13; Wed, 2 Dec 2015 05:03:57 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by wmvv187 with SMTP id v187so237533677wmv.1; Tue, 01 Dec 2015 21:03:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=m1C/r/XbJRpoGi8p4wDC7JGzwl0AoSLBOr+6CKRa8rU=; b=SDKguVSABaIyJc45Qn5ZLjB4lPJqun1maQGCc23bc7FNjrvCmQE/B58wu/PUyjoUdY 2tF3smbc6LTkKX176tmsX32T3E3TY8j0CxZ1+FeRxeflnMpA1fL73aoW/6t4aL7v77x5 MBLegpLQSuz5iWMFkd3wWnRQlqcRvs41a/K2Q3iIQhdjAM2RYh2RPcC1iKV1vWQ0mY5P yE2/HDPm3gkwZA6DV3aA1c03V10cKJZy4VhAmDc1Uu+OWdOJiSRNxQpBdpJMCb1Gm5g+ zvfHbPY5DQdgy/K5YjuzcjpgfzqeEZ08Qx0KahR396zcQo2Dhf4FrZ2I7IPV55szNNOh qqtQ== MIME-Version: 1.0 X-Received: by 10.28.171.134 with SMTP id u128mr42809490wme.22.1449032636229; Tue, 01 Dec 2015 21:03:56 -0800 (PST) Received: by 10.27.10.199 with HTTP; Tue, 1 Dec 2015 21:03:56 -0800 (PST) In-Reply-To: References: <201512020211.tB22BcUB082864@repo.freebsd.org> Date: Tue, 1 Dec 2015 23:03:56 -0600 Message-ID: Subject: Re: svn commit: r291637 - head/cddl/contrib/opensolaris/cmd/plockstat From: Benjamin Kaduk To: Craig Rodrigues Cc: Bryan Drewery , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 05:03:58 -0000 On Tue, Dec 1, 2015 at 10:18 PM, Craig Rodrigues wrote: > On Tue, Dec 1, 2015 at 6:11 PM, Bryan Drewery > wrote: > > > - (void) snprintf(buf, size, "%#lx", addr); > > + (void) snprintf(buf, size, "%#lx", (unsigned long)addr); > > return (0); > > > > In the past when I've hit these types of problems, > I have found that using %#jx and casting to (uintmax_t) instead seemed to > work > consistently across different platforms, so you might want to do that here. > There are lots of examples in the tree of this pattern. > Any sort of cast will usually work, provided the casted-to type matches the format string. The main issue is when one tries to avoid a cast, in which case the fundamental type corresponding to the abstract type of the variable being printed can be different across different platforms. (Some sense is needed to ensure that the cast does not truncate the range of accessible values, of course, which is where [u]intmax_t comes in.) -Ben From owner-svn-src-all@freebsd.org Wed Dec 2 05:23:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74523A34669; Wed, 2 Dec 2015 05:23:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D63217F6; Wed, 2 Dec 2015 05:23:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB25NC4N039754; Wed, 2 Dec 2015 05:23:12 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB25NC8N039753; Wed, 2 Dec 2015 05:23:12 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020523.tB25NC8N039753@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 05:23:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291639 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 05:23:13 -0000 Author: bdrewery Date: Wed Dec 2 05:23:12 2015 New Revision: 291639 URL: https://svnweb.freebsd.org/changeset/base/291639 Log: Add LIBNANDFS. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk ============================================================================== --- head/share/mk/bsd.libnames.mk Wed Dec 2 02:47:13 2015 (r291638) +++ head/share/mk/bsd.libnames.mk Wed Dec 2 05:23:12 2015 (r291639) @@ -90,6 +90,7 @@ LIBMENU?= ${DESTDIR}${LIBDIR}/libmenu.a LIBMILTER?= ${DESTDIR}${LIBDIR}/libmilter.a LIBMP?= ${DESTDIR}${LIBDIR}/libmp.a LIBMT?= ${DESTDIR}${LIBDIR}/libmt.a +LIBNANDFS?= ${DESTDIR}${LIBDIR}/libnandfs.a LIBNCURSES?= ${DESTDIR}${LIBDIR}/libncurses.a LIBNCURSESW?= ${DESTDIR}${LIBDIR}/libncursesw.a LIBNETGRAPH?= ${DESTDIR}${LIBDIR}/libnetgraph.a From owner-svn-src-all@freebsd.org Wed Dec 2 05:31:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ED7CA3482D; Wed, 2 Dec 2015 05:31:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D3E21D44; Wed, 2 Dec 2015 05:31:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB25V2Qg040787; Wed, 2 Dec 2015 05:31:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB25V1bt040780; Wed, 2 Dec 2015 05:31:01 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512020531.tB25V1bt040780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 2 Dec 2015 05:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291640 - in head: lib/libnandfs sbin/nandfs sbin/newfs_nandfs targets/pseudo/userland targets/pseudo/userland/lib usr.sbin/nandsim usr.sbin/nandtool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 05:31:03 -0000 Author: bdrewery Date: Wed Dec 2 05:31:01 2015 New Revision: 291640 URL: https://svnweb.freebsd.org/changeset/base/291640 Log: META MODE: Connect MK_NAND directories. Sponsored by: EMC / Isilon Storage Division Added: head/lib/libnandfs/Makefile.depend (contents, props changed) head/sbin/nandfs/Makefile.depend (contents, props changed) head/sbin/newfs_nandfs/Makefile.depend (contents, props changed) head/usr.sbin/nandsim/Makefile.depend (contents, props changed) head/usr.sbin/nandtool/Makefile.depend (contents, props changed) Modified: head/targets/pseudo/userland/Makefile.depend head/targets/pseudo/userland/lib/Makefile.depend Added: head/lib/libnandfs/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnandfs/Makefile.depend Wed Dec 2 05:31:01 2015 (r291640) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/sbin/nandfs/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/nandfs/Makefile.depend Wed Dec 2 05:31:01 2015 (r291640) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libnandfs \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/sbin/newfs_nandfs/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/newfs_nandfs/Makefile.depend Wed Dec 2 05:31:01 2015 (r291640) @@ -0,0 +1,21 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libexpat \ + lib/libgeom \ + lib/libsbuf \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Wed Dec 2 05:23:12 2015 (r291639) +++ head/targets/pseudo/userland/Makefile.depend Wed Dec 2 05:31:01 2015 (r291640) @@ -800,6 +800,15 @@ DIRDEPS+= \ ${DEP_RELDIR}/secure \ ${DEP_RELDIR}/share \ +.if ${MK_NAND} != "no" +DIRDEPS+= \ + sbin/nandfs \ + sbin/newfs_nandfs \ + usr.sbin/nandsim \ + usr.sbin/nandtool \ + +.endif + DIRDEPS.amd64= \ sbin/bsdlabel \ sbin/fdisk \ Modified: head/targets/pseudo/userland/lib/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/lib/Makefile.depend Wed Dec 2 05:23:12 2015 (r291639) +++ head/targets/pseudo/userland/lib/Makefile.depend Wed Dec 2 05:31:01 2015 (r291640) @@ -180,4 +180,8 @@ DIRDEPS+= \ .endif +.if ${MK_NAND} != "no" +DIRDEPS+= lib/libnandfs +.endif + .include Added: head/usr.sbin/nandsim/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/nandsim/Makefile.depend Wed Dec 2 05:31:01 2015 (r291640) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/usr.sbin/nandtool/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/nandtool/Makefile.depend Wed Dec 2 05:31:01 2015 (r291640) @@ -0,0 +1,21 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libexpat \ + lib/libgeom \ + lib/libsbuf \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From owner-svn-src-all@freebsd.org Wed Dec 2 05:35:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D5FFA34A71; Wed, 2 Dec 2015 05:35:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D099C10D7; Wed, 2 Dec 2015 05:35:05 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB25Z5rK042909; Wed, 2 Dec 2015 05:35:05 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB25Z5rP042907; Wed, 2 Dec 2015 05:35:05 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201512020535.tB25Z5rP042907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 2 Dec 2015 05:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291641 - head/sys/dev/arcmsr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 05:35:06 -0000 Author: delphij Date: Wed Dec 2 05:35:04 2015 New Revision: 291641 URL: https://svnweb.freebsd.org/changeset/base/291641 Log: Update arcmsr(4) to 1.30.00.00 in order to add support of ARC-1203 SATA RAID controllers. Many thanks to Areca for continuing to support FreeBSD. Submitted by: 黃清隆 MFC after: 2 weeks Modified: head/sys/dev/arcmsr/arcmsr.c head/sys/dev/arcmsr/arcmsr.h Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Wed Dec 2 05:31:01 2015 (r291640) +++ head/sys/dev/arcmsr/arcmsr.c Wed Dec 2 05:35:04 2015 (r291641) @@ -76,6 +76,7 @@ ** 1.20.00.27 05/06/2013 Ching Huang Fixed out standing cmd full on ARC-12x4 ** 1.20.00.28 09/13/2013 Ching Huang Removed recursive mutex in arcmsr_abort_dr_ccbs ** 1.20.00.29 12/18/2013 Ching Huang Change simq allocation number, support ARC1883 +** 1.30.00.00 11/30/2015 Ching Huang Added support ARC1203 ****************************************************************************************** */ @@ -126,15 +127,15 @@ __FBSDID("$FreeBSD$"); ************************************************************************** */ #if __FreeBSD_version >= 500005 - #include - #include - #include - #include - #include + #include + #include + #include + #include + #include #else - #include - #include - #include + #include + #include + #include #endif #if !defined(CAM_NEW_TRAN_CODE) && __FreeBSD_version >= 700025 @@ -147,7 +148,7 @@ __FBSDID("$FreeBSD$"); #define arcmsr_callout_init(a) callout_init(a); #endif -#define ARCMSR_DRIVER_VERSION "arcmsr version 1.20.00.29 2013-12-18" +#define ARCMSR_DRIVER_VERSION "arcmsr version 1.30.00.00 2015-11-30" #include /* ************************************************************************** @@ -181,8 +182,8 @@ static int arcmsr_iop_message_xfer(struc static int arcmsr_resume(device_t dev); static int arcmsr_suspend(device_t dev); static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb); -static void arcmsr_polling_devmap(void *arg); -static void arcmsr_srb_timeout(void *arg); +static void arcmsr_polling_devmap(void *arg); +static void arcmsr_srb_timeout(void *arg); static void arcmsr_hbd_postqueue_isr(struct AdapterControlBlock *acb); #ifdef ARCMSR_DEBUG1 static void arcmsr_dump_data(struct AdapterControlBlock *acb); @@ -220,11 +221,11 @@ static device_method_t arcmsr_methods[]= { 0, 0 } #endif }; - + static driver_t arcmsr_driver={ "arcmsr", arcmsr_methods, sizeof(struct AdapterControlBlock) }; - + static devclass_t arcmsr_devclass; DRIVER_MODULE(arcmsr, pci, arcmsr_driver, arcmsr_devclass, 0, 0); MODULE_DEPEND(arcmsr, pci, 1, 1, 1); @@ -247,38 +248,38 @@ static struct cdevsw arcmsr_cdevsw={ }; #else #define ARCMSR_CDEV_MAJOR 180 - + static struct cdevsw arcmsr_cdevsw = { - arcmsr_open, /* open */ - arcmsr_close, /* close */ - noread, /* read */ - nowrite, /* write */ - arcmsr_ioctl, /* ioctl */ - nopoll, /* poll */ - nommap, /* mmap */ - nostrategy, /* strategy */ - "arcmsr", /* name */ - ARCMSR_CDEV_MAJOR, /* major */ - nodump, /* dump */ - nopsize, /* psize */ - 0 /* flags */ + arcmsr_open, /* open */ + arcmsr_close, /* close */ + noread, /* read */ + nowrite, /* write */ + arcmsr_ioctl, /* ioctl */ + nopoll, /* poll */ + nommap, /* mmap */ + nostrategy, /* strategy */ + "arcmsr", /* name */ + ARCMSR_CDEV_MAJOR, /* major */ + nodump, /* dump */ + nopsize, /* psize */ + 0 /* flags */ }; #endif /* ************************************************************************** ************************************************************************** */ -#if __FreeBSD_version < 500005 +#if __FreeBSD_version < 500005 static int arcmsr_open(dev_t dev, int flags, int fmt, struct proc *proc) #else - #if __FreeBSD_version < 503000 + #if __FreeBSD_version < 503000 static int arcmsr_open(dev_t dev, int flags, int fmt, struct thread *proc) #else static int arcmsr_open(struct cdev *dev, int flags, int fmt, struct thread *proc) #endif #endif { - #if __FreeBSD_version < 503000 + #if __FreeBSD_version < 503000 struct AdapterControlBlock *acb = dev->si_drv1; #else int unit = dev2unit(dev); @@ -293,17 +294,17 @@ static struct cdevsw arcmsr_cdevsw = { ************************************************************************** ************************************************************************** */ -#if __FreeBSD_version < 500005 +#if __FreeBSD_version < 500005 static int arcmsr_close(dev_t dev, int flags, int fmt, struct proc *proc) #else - #if __FreeBSD_version < 503000 + #if __FreeBSD_version < 503000 static int arcmsr_close(dev_t dev, int flags, int fmt, struct thread *proc) #else static int arcmsr_close(struct cdev *dev, int flags, int fmt, struct thread *proc) #endif #endif { - #if __FreeBSD_version < 503000 + #if __FreeBSD_version < 503000 struct AdapterControlBlock *acb = dev->si_drv1; #else int unit = dev2unit(dev); @@ -318,17 +319,17 @@ static struct cdevsw arcmsr_cdevsw = { ************************************************************************** ************************************************************************** */ -#if __FreeBSD_version < 500005 +#if __FreeBSD_version < 500005 static int arcmsr_ioctl(dev_t dev, u_long ioctl_cmd, caddr_t arg, int flags, struct proc *proc) #else - #if __FreeBSD_version < 503000 + #if __FreeBSD_version < 503000 static int arcmsr_ioctl(dev_t dev, u_long ioctl_cmd, caddr_t arg, int flags, struct thread *proc) #else static int arcmsr_ioctl(struct cdev *dev, u_long ioctl_cmd, caddr_t arg, int flags, struct thread *proc) #endif #endif { - #if __FreeBSD_version < 503000 + #if __FreeBSD_version < 503000 struct AdapterControlBlock *acb = dev->si_drv1; #else int unit = dev2unit(dev); @@ -347,7 +348,7 @@ static struct cdevsw arcmsr_cdevsw = { static u_int32_t arcmsr_disable_allintr( struct AdapterControlBlock *acb) { u_int32_t intmask_org = 0; - + switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_A: { /* disable all outbound interrupt */ @@ -356,10 +357,11 @@ static u_int32_t arcmsr_disable_allintr( } break; case ACB_ADAPTER_TYPE_B: { + struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; /* disable all outbound interrupt */ - intmask_org = CHIP_REG_READ32(HBB_DOORBELL, - 0, iop2drv_doorbell_mask) & (~ARCMSR_IOP2DRV_MESSAGE_CMD_DONE); /* disable outbound message0 int */ - CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell_mask, 0); /* disable all interrupt */ + intmask_org = READ_CHIP_REG32(0, phbbmu->iop2drv_doorbell_mask) + & (~ARCMSR_IOP2DRV_MESSAGE_CMD_DONE); /* disable outbound message0 int */ + WRITE_CHIP_REG32(0, phbbmu->iop2drv_doorbell_mask, 0); /* disable all interrupt */ } break; case ACB_ADAPTER_TYPE_C: { @@ -384,7 +386,7 @@ static u_int32_t arcmsr_disable_allintr( static void arcmsr_enable_allintr( struct AdapterControlBlock *acb, u_int32_t intmask_org) { u_int32_t mask; - + switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_A: { /* enable outbound Post Queue, outbound doorbell Interrupt */ @@ -394,9 +396,10 @@ static void arcmsr_enable_allintr( struc } break; case ACB_ADAPTER_TYPE_B: { + struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; /* enable ARCMSR_IOP2DRV_MESSAGE_CMD_DONE */ mask = (ARCMSR_IOP2DRV_DATA_WRITE_OK|ARCMSR_IOP2DRV_DATA_READ_OK|ARCMSR_IOP2DRV_CDB_DONE|ARCMSR_IOP2DRV_MESSAGE_CMD_DONE); - CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell_mask, intmask_org | mask); /*1=interrupt enable, 0=interrupt disable*/ + WRITE_CHIP_REG32(0, phbbmu->iop2drv_doorbell_mask, intmask_org | mask); /*1=interrupt enable, 0=interrupt disable*/ acb->outbound_int_enable = (intmask_org | mask) & 0x0000000f; } break; @@ -425,7 +428,7 @@ static u_int8_t arcmsr_hba_wait_msgint_r { u_int32_t Index; u_int8_t Retries = 0x00; - + do { for(Index=0; Index < 100; Index++) { if(CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & ARCMSR_MU_OUTBOUND_MESSAGE0_INT) { @@ -445,12 +448,13 @@ static u_int8_t arcmsr_hbb_wait_msgint_r { u_int32_t Index; u_int8_t Retries = 0x00; - + struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; + do { for(Index=0; Index < 100; Index++) { - if(CHIP_REG_READ32(HBB_DOORBELL, 0, iop2drv_doorbell) & ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) { - CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN);/*clear interrupt*/ - CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_END_OF_INTERRUPT); + if(READ_CHIP_REG32(0, phbbmu->iop2drv_doorbell) & ARCMSR_IOP2DRV_MESSAGE_CMD_DONE) { + WRITE_CHIP_REG32(0, phbbmu->iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN);/*clear interrupt*/ + WRITE_CHIP_REG32(0, phbbmu->drv2iop_doorbell, ARCMSR_DRV2IOP_END_OF_INTERRUPT); return TRUE; } UDELAY(10000); @@ -466,7 +470,7 @@ static u_int8_t arcmsr_hbc_wait_msgint_r { u_int32_t Index; u_int8_t Retries = 0x00; - + do { for(Index=0; Index < 100; Index++) { if(CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_doorbell) & ARCMSR_HBCMU_IOP2DRV_MESSAGE_CMD_DONE) { @@ -486,7 +490,7 @@ static u_int8_t arcmsr_hbd_wait_msgint_r { u_int32_t Index; u_int8_t Retries = 0x00; - + do { for(Index=0; Index < 100; Index++) { if(CHIP_REG_READ32(HBD_MessageUnit, 0, outbound_doorbell) & ARCMSR_HBDMU_IOP2DRV_MESSAGE_CMD_DONE) { @@ -505,7 +509,7 @@ static u_int8_t arcmsr_hbd_wait_msgint_r static void arcmsr_flush_hba_cache(struct AdapterControlBlock *acb) { int retry_count = 30;/* enlarge wait flush adapter cache time: 10 minute */ - + CHIP_REG_WRITE32(HBA_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE); do { if(arcmsr_hba_wait_msgint_ready(acb)) { @@ -522,9 +526,9 @@ static void arcmsr_flush_hba_cache(struc static void arcmsr_flush_hbb_cache(struct AdapterControlBlock *acb) { int retry_count = 30;/* enlarge wait flush adapter cache time: 10 minute */ - - CHIP_REG_WRITE32(HBB_DOORBELL, - 0, drv2iop_doorbell, ARCMSR_MESSAGE_FLUSH_CACHE); + struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; + + WRITE_CHIP_REG32(0, phbbmu->drv2iop_doorbell, ARCMSR_MESSAGE_FLUSH_CACHE); do { if(arcmsr_hbb_wait_msgint_ready(acb)) { break; @@ -540,7 +544,7 @@ static void arcmsr_flush_hbb_cache(struc static void arcmsr_flush_hbc_cache(struct AdapterControlBlock *acb) { int retry_count = 30;/* enlarge wait flush adapter cache time: 10 minute */ - + CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE); CHIP_REG_WRITE32(HBC_MessageUnit, 0, inbound_doorbell, ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE); do { @@ -558,7 +562,7 @@ static void arcmsr_flush_hbc_cache(struc static void arcmsr_flush_hbd_cache(struct AdapterControlBlock *acb) { int retry_count = 30; /* enlarge wait flush adapter cache time: 10 minute */ - + CHIP_REG_WRITE32(HBD_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE); do { if(arcmsr_hbd_wait_msgint_ready(acb)) { @@ -600,7 +604,7 @@ static void arcmsr_flush_adapter_cache(s static int arcmsr_suspend(device_t dev) { struct AdapterControlBlock *acb = device_get_softc(dev); - + /* flush controller */ arcmsr_iop_parking(acb); /* disable all outbound interrupt */ @@ -614,7 +618,7 @@ static int arcmsr_suspend(device_t dev) static int arcmsr_resume(device_t dev) { struct AdapterControlBlock *acb = device_get_softc(dev); - + arcmsr_iop_init(acb); return(0); } @@ -627,7 +631,7 @@ static void arcmsr_async(void *cb_arg, u struct AdapterControlBlock *acb; u_int8_t target_id, target_lun; struct cam_sim *sim; - + sim = (struct cam_sim *) cb_arg; acb =(struct AdapterControlBlock *) cam_sim_softc(sim); switch (code) { @@ -650,7 +654,7 @@ static void arcmsr_async(void *cb_arg, u static void arcmsr_report_sense_info(struct CommandControlBlock *srb) { union ccb *pccb = srb->pccb; - + pccb->ccb_h.status |= CAM_SCSI_STATUS_ERROR; pccb->csio.scsi_status = SCSI_STATUS_CHECK_COND; if(pccb->csio.sense_len) { @@ -678,7 +682,8 @@ static void arcmsr_abort_hba_allcmd(stru */ static void arcmsr_abort_hbb_allcmd(struct AdapterControlBlock *acb) { - CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_MESSAGE_ABORT_CMD); + struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; + WRITE_CHIP_REG32(0, phbbmu->drv2iop_doorbell, ARCMSR_MESSAGE_ABORT_CMD); if(!arcmsr_hbb_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'abort all outstanding command' timeout \n", acb->pci_unit); } @@ -739,12 +744,12 @@ static void arcmsr_srb_complete(struct C { struct AdapterControlBlock *acb = srb->acb; union ccb *pccb = srb->pccb; - + if(srb->srb_flags & SRB_FLAG_TIMER_START) callout_stop(&srb->ccb_callout); if((pccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) { bus_dmasync_op_t op; - + if((pccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { op = BUS_DMASYNC_POSTREAD; } else { @@ -773,7 +778,7 @@ static void arcmsr_srb_complete(struct C static void arcmsr_report_srb_state(struct AdapterControlBlock *acb, struct CommandControlBlock *srb, u_int16_t error) { int target, lun; - + target = srb->pccb->ccb_h.target_id; lun = srb->pccb->ccb_h.target_lun; if(error == FALSE) { @@ -824,7 +829,7 @@ static void arcmsr_report_srb_state(stru static void arcmsr_drain_donequeue(struct AdapterControlBlock *acb, u_int32_t flag_srb, u_int16_t error) { struct CommandControlBlock *srb; - + /* check if command done with no error*/ switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_C: @@ -860,7 +865,7 @@ static void arcmsr_srb_timeout(void *arg struct AdapterControlBlock *acb; int target, lun; u_int8_t cmd; - + target = srb->pccb->ccb_h.target_id; lun = srb->pccb->ccb_h.target_lun; acb = srb->acb; @@ -876,7 +881,7 @@ static void arcmsr_srb_timeout(void *arg } ARCMSR_LOCK_RELEASE(&acb->isr_lock); #ifdef ARCMSR_DEBUG1 - arcmsr_dump_data(acb); + arcmsr_dump_data(acb); #endif } @@ -889,29 +894,29 @@ static void arcmsr_done4abort_postqueue( int i=0; u_int32_t flag_srb; u_int16_t error; - + switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_A: { u_int32_t outbound_intstatus; - + /*clear and abort all outbound posted Q*/ outbound_intstatus = CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_intstatus) & acb->outbound_int_enable; CHIP_REG_WRITE32(HBA_MessageUnit, 0, outbound_intstatus, outbound_intstatus);/*clear interrupt*/ while(((flag_srb=CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_queueport)) != 0xFFFFFFFF) && (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) { - error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE; + error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE; arcmsr_drain_donequeue(acb, flag_srb, error); } } break; case ACB_ADAPTER_TYPE_B: { struct HBB_MessageUnit *phbbmu=(struct HBB_MessageUnit *)acb->pmu; - + /*clear all outbound posted Q*/ - CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_DOORBELL_INT_CLEAR_PATTERN); /* clear doorbell interrupt */ + WRITE_CHIP_REG32(0, phbbmu->iop2drv_doorbell, ARCMSR_DOORBELL_INT_CLEAR_PATTERN); /* clear doorbell interrupt */ for(i=0; i < ARCMSR_MAX_HBB_POSTQUEUE; i++) { if((flag_srb = phbbmu->done_qbuffer[i]) != 0) { phbbmu->done_qbuffer[i] = 0; - error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE; + error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE; arcmsr_drain_donequeue(acb, flag_srb, error); } phbbmu->post_qbuffer[i] = 0; @@ -921,10 +926,10 @@ static void arcmsr_done4abort_postqueue( } break; case ACB_ADAPTER_TYPE_C: { - + while((CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_status) & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) && (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) { flag_srb = CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low); - error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1) ? TRUE : FALSE; + error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1) ? TRUE : FALSE; arcmsr_drain_donequeue(acb, flag_srb, error); } } @@ -944,7 +949,7 @@ static void arcmsr_iop_reset(struct Adap struct CommandControlBlock *srb; u_int32_t intmask_org; u_int32_t i=0; - + if(acb->srboutstandingcount>0) { /* disable all outbound interrupt */ intmask_org = arcmsr_disable_allintr(acb); @@ -985,7 +990,7 @@ static void arcmsr_build_srb(struct Comm union ccb *pccb = srb->pccb; struct ccb_scsiio *pcsio = &pccb->csio; u_int32_t arccdbsize = 0x30; - + memset(arcmsr_cdb, 0, sizeof(struct ARCMSR_CDB)); arcmsr_cdb->Bus = 0; arcmsr_cdb->TargetID = pccb->ccb_h.target_id; @@ -997,7 +1002,7 @@ static void arcmsr_build_srb(struct Comm struct AdapterControlBlock *acb = srb->acb; bus_dmasync_op_t op; u_int32_t length, i, cdb_sgcount = 0; - + if((pccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { op = BUS_DMASYNC_PREREAD; } else { @@ -1019,11 +1024,11 @@ static void arcmsr_build_srb(struct Comm arccdbsize += sizeof(struct SG32ENTRY); } else { u_int32_t sg64s_size = 0, tmplength = length; - + while(1) { u_int64_t span4G, length0; struct SG64ENTRY *pdma_sg = (struct SG64ENTRY *)psge; - + span4G = (u_int64_t)address_lo + tmplength; pdma_sg->addresshigh = address_hi; pdma_sg->address = address_lo; @@ -1056,8 +1061,8 @@ static void arcmsr_build_srb(struct Comm } else { arcmsr_cdb->DataLength = 0; } - srb->arc_cdb_size = arccdbsize; - arcmsr_cdb->msgPages = (arccdbsize/256) + ((arccdbsize % 256) ? 1 : 0); + srb->arc_cdb_size = arccdbsize; + arcmsr_cdb->msgPages = (arccdbsize/256) + ((arccdbsize % 256) ? 1 : 0); } /* ************************************************************************** @@ -1067,7 +1072,7 @@ static void arcmsr_post_srb(struct Adapt { u_int32_t cdb_phyaddr_low = (u_int32_t) srb->cdb_phyaddr_low; struct ARCMSR_CDB *arcmsr_cdb = (struct ARCMSR_CDB *)&srb->arcmsr_cdb; - + bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, (srb->srb_flags & SRB_FLAG_WRITE) ? BUS_DMASYNC_POSTWRITE:BUS_DMASYNC_POSTREAD); atomic_add_int(&acb->srboutstandingcount, 1); srb->srb_state = ARCMSR_SRB_START; @@ -1084,7 +1089,7 @@ static void arcmsr_post_srb(struct Adapt case ACB_ADAPTER_TYPE_B: { struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; int ending_index, index; - + index = phbbmu->postq_index; ending_index = ((index+1) % ARCMSR_MAX_HBB_POSTQUEUE); phbbmu->post_qbuffer[ending_index] = 0; @@ -1096,26 +1101,26 @@ static void arcmsr_post_srb(struct Adapt index++; index %= ARCMSR_MAX_HBB_POSTQUEUE; /*if last index number set it to 0 */ phbbmu->postq_index = index; - CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_CDB_POSTED); + WRITE_CHIP_REG32(0, phbbmu->drv2iop_doorbell, ARCMSR_DRV2IOP_CDB_POSTED); } break; - case ACB_ADAPTER_TYPE_C: { - u_int32_t ccb_post_stamp, arc_cdb_size, cdb_phyaddr_hi32; + case ACB_ADAPTER_TYPE_C: { + u_int32_t ccb_post_stamp, arc_cdb_size, cdb_phyaddr_hi32; - arc_cdb_size = (srb->arc_cdb_size > 0x300) ? 0x300 : srb->arc_cdb_size; - ccb_post_stamp = (cdb_phyaddr_low | ((arc_cdb_size-1) >> 6) | 1); + arc_cdb_size = (srb->arc_cdb_size > 0x300) ? 0x300 : srb->arc_cdb_size; + ccb_post_stamp = (cdb_phyaddr_low | ((arc_cdb_size-1) >> 6) | 1); cdb_phyaddr_hi32 = acb->srb_phyaddr.B.phyadd_high; - if(cdb_phyaddr_hi32) - { - CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_high, cdb_phyaddr_hi32); - CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_low, ccb_post_stamp); - } - else - { - CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_low, ccb_post_stamp); - } - } - break; + if(cdb_phyaddr_hi32) + { + CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_high, cdb_phyaddr_hi32); + CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_low, ccb_post_stamp); + } + else + { + CHIP_REG_WRITE32(HBC_MessageUnit,0,inbound_queueport_low, ccb_post_stamp); + } + } + break; case ACB_ADAPTER_TYPE_D: { struct HBD_MessageUnit0 *phbdmu = (struct HBD_MessageUnit0 *)acb->pmu; u_int16_t index_stripped; @@ -1153,29 +1158,29 @@ static void arcmsr_post_srb(struct Adapt static struct QBUFFER *arcmsr_get_iop_rqbuffer( struct AdapterControlBlock *acb) { struct QBUFFER *qbuffer=NULL; - + switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_A: { struct HBA_MessageUnit *phbamu = (struct HBA_MessageUnit *)acb->pmu; - + qbuffer = (struct QBUFFER *)&phbamu->message_rbuffer; } break; case ACB_ADAPTER_TYPE_B: { struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; - + qbuffer = (struct QBUFFER *)&phbbmu->hbb_rwbuffer->message_rbuffer; } break; case ACB_ADAPTER_TYPE_C: { struct HBC_MessageUnit *phbcmu = (struct HBC_MessageUnit *)acb->pmu; - + qbuffer = (struct QBUFFER *)&phbcmu->message_rbuffer; } break; case ACB_ADAPTER_TYPE_D: { struct HBD_MessageUnit0 *phbdmu = (struct HBD_MessageUnit0 *)acb->pmu; - + qbuffer = (struct QBUFFER *)&phbdmu->phbdmu->message_rbuffer; } break; @@ -1189,29 +1194,29 @@ static struct QBUFFER *arcmsr_get_iop_rq static struct QBUFFER *arcmsr_get_iop_wqbuffer( struct AdapterControlBlock *acb) { struct QBUFFER *qbuffer = NULL; - + switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_A: { struct HBA_MessageUnit *phbamu = (struct HBA_MessageUnit *)acb->pmu; - + qbuffer = (struct QBUFFER *)&phbamu->message_wbuffer; } break; case ACB_ADAPTER_TYPE_B: { struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; - + qbuffer = (struct QBUFFER *)&phbbmu->hbb_rwbuffer->message_wbuffer; } break; case ACB_ADAPTER_TYPE_C: { struct HBC_MessageUnit *phbcmu = (struct HBC_MessageUnit *)acb->pmu; - + qbuffer = (struct QBUFFER *)&phbcmu->message_wbuffer; } break; case ACB_ADAPTER_TYPE_D: { struct HBD_MessageUnit0 *phbdmu = (struct HBD_MessageUnit0 *)acb->pmu; - + qbuffer = (struct QBUFFER *)&phbdmu->phbdmu->message_wbuffer; } break; @@ -1231,8 +1236,9 @@ static void arcmsr_iop_message_read(stru } break; case ACB_ADAPTER_TYPE_B: { + struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; /* let IOP know data has been read */ - CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_READ_OK); + WRITE_CHIP_REG32(0, phbbmu->drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_READ_OK); } break; case ACB_ADAPTER_TYPE_C: { @@ -1263,11 +1269,12 @@ static void arcmsr_iop_message_wrote(str } break; case ACB_ADAPTER_TYPE_B: { + struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; /* ** push inbound doorbell tell iop, driver data write ok ** and wait reply on next hwinterrupt for next Qbuffer post */ - CHIP_REG_WRITE32(HBB_DOORBELL, 0, drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_WRITE_OK); + WRITE_CHIP_REG32(0, phbbmu->drv2iop_doorbell, ARCMSR_DRV2IOP_DATA_WRITE_OK); } break; case ACB_ADAPTER_TYPE_C: { @@ -1296,7 +1303,7 @@ static void arcmsr_stop_hba_bgrb(struct { acb->acb_flags &= ~ACB_F_MSG_START_BGRB; CHIP_REG_WRITE32(HBA_MessageUnit, - 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_STOP_BGRB); + 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_STOP_BGRB); if(!arcmsr_hba_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'stop adapter background rebulid' timeout \n" , acb->pci_unit); @@ -1308,9 +1315,9 @@ static void arcmsr_stop_hba_bgrb(struct */ static void arcmsr_stop_hbb_bgrb(struct AdapterControlBlock *acb) { + struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; acb->acb_flags &= ~ACB_F_MSG_START_BGRB; - CHIP_REG_WRITE32(HBB_DOORBELL, - 0, drv2iop_doorbell, ARCMSR_MESSAGE_STOP_BGRB); + WRITE_CHIP_REG32(0, phbbmu->drv2iop_doorbell, ARCMSR_MESSAGE_STOP_BGRB); if(!arcmsr_hbb_wait_msgint_ready(acb)) { printf( "arcmsr%d: wait 'stop adapter background rebulid' timeout \n" , acb->pci_unit); @@ -1388,7 +1395,7 @@ static void arcmsr_poll(struct cam_sim * ************************************************************************** */ static u_int32_t arcmsr_Read_iop_rqbuffer_data_D(struct AdapterControlBlock *acb, - struct QBUFFER *prbuffer) { + struct QBUFFER *prbuffer) { u_int8_t *pQbuffer; u_int8_t *buf1 = 0; @@ -1433,7 +1440,7 @@ static u_int32_t arcmsr_Read_iop_rqbuffe ************************************************************************** */ static u_int32_t arcmsr_Read_iop_rqbuffer_data(struct AdapterControlBlock *acb, - struct QBUFFER *prbuffer) { + struct QBUFFER *prbuffer) { u_int8_t *pQbuffer; u_int8_t *iop_data; @@ -1465,12 +1472,12 @@ static void arcmsr_iop2drv_data_wrote_ha { struct QBUFFER *prbuffer; int my_empty_len; - + /*check this iop data if overflow my rqbuffer*/ ARCMSR_LOCK_ACQUIRE(&acb->qbuffer_lock); prbuffer = arcmsr_get_iop_rqbuffer(acb); my_empty_len = (acb->rqbuf_lastindex - acb->rqbuf_firstindex - 1) & - (ARCMSR_MAX_QBUFFER-1); + (ARCMSR_MAX_QBUFFER-1); if(my_empty_len >= prbuffer->data_len) { if(arcmsr_Read_iop_rqbuffer_data(acb, prbuffer) == 0) acb->acb_flags |= ACB_F_IOPDATA_OVERFLOW; @@ -1490,7 +1497,7 @@ static void arcmsr_Write_data_2iop_wqbuf u_int8_t *buf1 = 0; u_int32_t *iop_data, *buf2 = 0; u_int32_t allxfer_len = 0, data_len; - + if(acb->acb_flags & ACB_F_MESSAGE_WQBUFFER_READ) { buf1 = malloc(128, M_DEVBUF, M_NOWAIT | M_ZERO); buf2 = (u_int32_t *)buf1; @@ -1533,7 +1540,7 @@ static void arcmsr_Write_data_2iop_wqbuf struct QBUFFER *pwbuffer; u_int8_t *iop_data; int32_t allxfer_len=0; - + if(acb->adapter_type & (ACB_ADAPTER_TYPE_C | ACB_ADAPTER_TYPE_D)) { arcmsr_Write_data_2iop_wqbuffer_D(acb); return; @@ -1586,8 +1593,8 @@ static void arcmsr_rescanLun_cb(struct c /* if (ccb->ccb_h.status != CAM_REQ_CMP) printf("arcmsr_rescanLun_cb: Rescan Target=%x, lun=%x," - "failure status=%x\n", ccb->ccb_h.target_id, - ccb->ccb_h.target_lun, ccb->ccb_h.status); + "failure status=%x\n", ccb->ccb_h.target_id, + ccb->ccb_h.target_lun, ccb->ccb_h.status); else printf("arcmsr_rescanLun_cb: Rescan lun successfully!\n"); */ @@ -1601,7 +1608,7 @@ static void arcmsr_rescan_lun(struct Ada union ccb *ccb; if ((ccb = (union ccb *)xpt_alloc_ccb_nowait()) == NULL) - return; + return; if (xpt_create_path(&path, NULL, cam_sim_path(acb->psim), target, lun) != CAM_REQ_CMP) { xpt_free_ccb(ccb); @@ -1619,9 +1626,9 @@ static void arcmsr_rescan_lun(struct Ada static void arcmsr_abort_dr_ccbs(struct AdapterControlBlock *acb, int target, int lun) { - struct CommandControlBlock *srb; + struct CommandControlBlock *srb; u_int32_t intmask_org; - int i; + int i; /* disable all outbound interrupts */ intmask_org = arcmsr_disable_allintr(acb); @@ -1630,13 +1637,13 @@ static void arcmsr_abort_dr_ccbs(struct srb = acb->psrb_pool[i]; if (srb->srb_state == ARCMSR_SRB_START) { - if((target == srb->pccb->ccb_h.target_id) && (lun == srb->pccb->ccb_h.target_lun)) - { - srb->srb_state = ARCMSR_SRB_ABORTED; + if((target == srb->pccb->ccb_h.target_id) && (lun == srb->pccb->ccb_h.target_lun)) + { + srb->srb_state = ARCMSR_SRB_ABORTED; srb->pccb->ccb_h.status |= CAM_REQ_ABORTED; - arcmsr_srb_complete(srb, 1); + arcmsr_srb_complete(srb, 1); printf("arcmsr%d: abort scsi id %d lun %d srb=%p \n", acb->pci_unit, target, lun, srb); - } + } } } /* enable outbound Post Queue, outbound doorbell Interrupt */ @@ -1649,87 +1656,87 @@ static void arcmsr_abort_dr_ccbs(struct static void arcmsr_dr_handle(struct AdapterControlBlock *acb) { u_int32_t devicemap; u_int32_t target, lun; - u_int32_t deviceMapCurrent[4]={0}; - u_int8_t *pDevMap; + u_int32_t deviceMapCurrent[4]={0}; + u_int8_t *pDevMap; switch (acb->adapter_type) { case ACB_ADAPTER_TYPE_A: - devicemap = offsetof(struct HBA_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]); - for (target = 0; target < 4; target++) - { - deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0], devicemap); - devicemap += 4; - } - break; + devicemap = offsetof(struct HBA_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]); + for (target = 0; target < 4; target++) + { + deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0], devicemap); + devicemap += 4; + } + break; case ACB_ADAPTER_TYPE_B: - devicemap = offsetof(struct HBB_RWBUFFER, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]); - for (target = 0; target < 4; target++) - { - deviceMapCurrent[target]=bus_space_read_4(acb->btag[1], acb->bhandle[1], devicemap); - devicemap += 4; - } - break; + devicemap = offsetof(struct HBB_RWBUFFER, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]); + for (target = 0; target < 4; target++) + { + deviceMapCurrent[target]=bus_space_read_4(acb->btag[1], acb->bhandle[1], devicemap); + devicemap += 4; + } + break; case ACB_ADAPTER_TYPE_C: - devicemap = offsetof(struct HBC_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]); - for (target = 0; target < 4; target++) - { - deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0], devicemap); - devicemap += 4; - } - break; + devicemap = offsetof(struct HBC_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]); + for (target = 0; target < 4; target++) + { + deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0], devicemap); + devicemap += 4; + } + break; case ACB_ADAPTER_TYPE_D: - devicemap = offsetof(struct HBD_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]); - for (target = 0; target < 4; target++) - { - deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0], devicemap); - devicemap += 4; - } - break; - } - - if(acb->acb_flags & ACB_F_BUS_HANG_ON) + devicemap = offsetof(struct HBD_MessageUnit, msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]); + for (target = 0; target < 4; target++) { - acb->acb_flags &= ~ACB_F_BUS_HANG_ON; + deviceMapCurrent[target]=bus_space_read_4(acb->btag[0], acb->bhandle[0], devicemap); + devicemap += 4; } - /* - ** adapter posted CONFIG message - ** copy the new map, note if there are differences with the current map - */ - pDevMap = (u_int8_t *)&deviceMapCurrent[0]; - for (target = 0; target < ARCMSR_MAX_TARGETID - 1; target++) + break; + } + + if(acb->acb_flags & ACB_F_BUS_HANG_ON) + { + acb->acb_flags &= ~ACB_F_BUS_HANG_ON; + } + /* + ** adapter posted CONFIG message + ** copy the new map, note if there are differences with the current map + */ + pDevMap = (u_int8_t *)&deviceMapCurrent[0]; + for (target = 0; target < ARCMSR_MAX_TARGETID - 1; target++) + { + if (*pDevMap != acb->device_map[target]) { - if (*pDevMap != acb->device_map[target]) - { - u_int8_t difference, bit_check; + u_int8_t difference, bit_check; - difference = *pDevMap ^ acb->device_map[target]; - for(lun=0; lun < ARCMSR_MAX_TARGETLUN; lun++) - { - bit_check = (1 << lun); /*check bit from 0....31*/ - if(difference & bit_check) - { - if(acb->device_map[target] & bit_check) - {/* unit departed */ - printf("arcmsr_dr_handle: Target=%x, lun=%x, GONE!!!\n",target,lun); - arcmsr_abort_dr_ccbs(acb, target, lun); - arcmsr_rescan_lun(acb, target, lun); - acb->devstate[target][lun] = ARECA_RAID_GONE; - } - else - {/* unit arrived */ - printf("arcmsr_dr_handle: Target=%x, lun=%x, Plug-IN!!!\n",target,lun); - arcmsr_rescan_lun(acb, target, lun); - acb->devstate[target][lun] = ARECA_RAID_GOOD; - } - } - } -/* printf("arcmsr_dr_handle: acb->device_map[%x]=0x%x, deviceMapCurrent[%x]=%x\n",target,acb->device_map[target],target,*pDevMap); */ - acb->device_map[target] = *pDevMap; + difference = *pDevMap ^ acb->device_map[target]; + for(lun=0; lun < ARCMSR_MAX_TARGETLUN; lun++) + { + bit_check = (1 << lun); /*check bit from 0....31*/ + if(difference & bit_check) + { + if(acb->device_map[target] & bit_check) + {/* unit departed */ + printf("arcmsr_dr_handle: Target=%x, lun=%x, GONE!!!\n",target,lun); + arcmsr_abort_dr_ccbs(acb, target, lun); + arcmsr_rescan_lun(acb, target, lun); + acb->devstate[target][lun] = ARECA_RAID_GONE; + } + else + {/* unit arrived */ + printf("arcmsr_dr_handle: Target=%x, lun=%x, Plug-IN!!!\n",target,lun); + arcmsr_rescan_lun(acb, target, lun); + acb->devstate[target][lun] = ARECA_RAID_GOOD; + } + } } - pDevMap++; +/* printf("arcmsr_dr_handle: acb->device_map[%x]=0x%x, deviceMapCurrent[%x]=%x\n",target,acb->device_map[target],target,*pDevMap); */ + acb->device_map[target] = *pDevMap; } + pDevMap++; + } } /* ************************************************************************** @@ -1749,9 +1756,10 @@ static void arcmsr_hba_message_isr(struc */ static void arcmsr_hbb_message_isr(struct AdapterControlBlock *acb) { u_int32_t outbound_message; + struct HBB_MessageUnit *phbbmu = (struct HBB_MessageUnit *)acb->pmu; /* clear interrupts */ - CHIP_REG_WRITE32(HBB_DOORBELL, 0, iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN); + WRITE_CHIP_REG32(0, phbbmu->iop2drv_doorbell, ARCMSR_MESSAGE_INT_CLEAR_PATTERN); outbound_message = CHIP_REG_READ32(HBB_RWBUFFER, 1, msgcode_rwbuffer[0]); if (outbound_message == ARCMSR_SIGNATURE_GET_CONFIG) arcmsr_dr_handle( acb ); @@ -1787,7 +1795,7 @@ static void arcmsr_hbd_message_isr(struc static void arcmsr_hba_doorbell_isr(struct AdapterControlBlock *acb) { u_int32_t doorbell_status; - + /* ******************************************************************* ** Maybe here we need to check wrqbuffer_lock is lock or not @@ -1811,7 +1819,7 @@ static void arcmsr_hba_doorbell_isr(stru static void arcmsr_hbc_doorbell_isr(struct AdapterControlBlock *acb) { u_int32_t doorbell_status; - + /* ******************************************************************* ** Maybe here we need to check wrqbuffer_lock is lock or not @@ -1838,7 +1846,7 @@ static void arcmsr_hbc_doorbell_isr(stru static void arcmsr_hbd_doorbell_isr(struct AdapterControlBlock *acb) { u_int32_t doorbell_status; - + /* ******************************************************************* ** Maybe here we need to check wrqbuffer_lock is lock or not @@ -1872,7 +1880,7 @@ static void arcmsr_hba_postqueue_isr(str { u_int32_t flag_srb; u_int16_t error; - + /* ***************************************************************************** ** areca cdb command done @@ -1883,7 +1891,7 @@ static void arcmsr_hba_postqueue_isr(str while((flag_srb = CHIP_REG_READ32(HBA_MessageUnit, 0, outbound_queueport)) != 0xFFFFFFFF) { /* check if command done with no error*/ - error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0) ? TRUE : FALSE; + error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0) ? TRUE : FALSE; arcmsr_drain_donequeue(acb, flag_srb, error); } /*drain reply FIFO*/ } @@ -1912,7 +1920,7 @@ static void arcmsr_hbb_postqueue_isr(str index %= ARCMSR_MAX_HBB_POSTQUEUE; /*if last index number set it to 0 */ phbbmu->doneq_index = index; /* check if command done with no error*/ - error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE; + error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE0)?TRUE:FALSE; arcmsr_drain_donequeue(acb, flag_srb, error); } /*drain reply FIFO*/ } @@ -1924,7 +1932,7 @@ static void arcmsr_hbc_postqueue_isr(str { u_int32_t flag_srb,throttling = 0; u_int16_t error; - + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Dec 2 05:36:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A18EBA34B38; Wed, 2 Dec 2015 05:36:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62B531387; Wed, 2 Dec 2015 05:36:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB25ak9x043330; Wed, 2 Dec 2015 05:36:46 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB25ak8j043325; Wed, 2 Dec 2015 05:36:46 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201512020536.tB25ak8j043325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 2 Dec 2015 05:36:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291642 - in head/sys: conf contrib/dev/ath/ath_hal/ar9300 modules/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 05:36:47 -0000 Author: adrian Date: Wed Dec 2 05:36:45 2015 New Revision: 291642 URL: https://svnweb.freebsd.org/changeset/base/291642 Log: Add initial ar9300 HAL support for the spectral scan mode. Modified: head/sys/conf/files head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c head/sys/modules/ath/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Dec 2 05:35:04 2015 (r291641) +++ head/sys/conf/files Wed Dec 2 05:36:45 2015 (r291642) @@ -1058,6 +1058,8 @@ contrib/dev/ath/ath_hal/ar9300/ar9300_st compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" +contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c optional ath_hal | ath_ar9300 \ + compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_timer.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c optional ath_hal | ath_ar9300 \ Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Wed Dec 2 05:35:04 2015 (r291641) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Wed Dec 2 05:36:45 2015 (r291642) @@ -224,6 +224,14 @@ ar9300_attach_freebsd_ops(struct ath_hal ah->ah_isFastClockEnabled = ar9300_is_fast_clock_enabled; ah->ah_get11nExtBusy = ar9300_get_11n_ext_busy; + /* Spectral Scan Functions */ + ah->ah_spectralConfigure = ar9300_configure_spectral_scan; + ah->ah_spectralGetConfig = ar9300_get_spectral_params; + ah->ah_spectralStart = ar9300_start_spectral_scan; + ah->ah_spectralStop = ar9300_stop_spectral_scan; + ah->ah_spectralIsEnabled = ar9300_is_spectral_enabled; + ah->ah_spectralIsActive = ar9300_is_spectral_active; + /* Key cache functions */ ah->ah_getKeyCacheSize = ar9300_get_key_cache_size; ah->ah_resetKeyCacheEntry = ar9300_reset_key_cache_entry; Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h Wed Dec 2 05:35:04 2015 (r291641) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h Wed Dec 2 05:36:45 2015 (r291642) @@ -17,7 +17,7 @@ #define ATH_ANT_DIV_COMB 1 /* Antenna combining */ #define ATH_SUPPORT_RAW_ADC_CAPTURE 0 /* Raw ADC capture support */ #define ATH_TRAFFIC_FAST_RECOVER 0 /* XXX not sure yet */ -#define ATH_SUPPORT_SPECTRAL 0 /* Spectral scan support */ +#define ATH_SUPPORT_SPECTRAL 1 /* Spectral scan support */ #define ATH_BT_COEX 1 /* Enable BT Coex code */ #define ATH_PCIE_ERROR_MONITOR 0 /* ??? */ #define ATH_SUPPORT_CRDC 0 /* ??? */ Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c Wed Dec 2 05:35:04 2015 (r291641) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c Wed Dec 2 05:36:45 2015 (r291642) @@ -15,12 +15,14 @@ */ #include "opt_ah.h" -#ifdef AH_SUPPORT_AR9300 +//#ifdef AH_SUPPORT_AR9300 #include "ah.h" #include "ah_desc.h" #include "ah_internal.h" +#include "ar9300_freebsd_inc.h" + #include "ar9300/ar9300phy.h" #include "ar9300/ar9300.h" #include "ar9300/ar9300reg.h" @@ -310,7 +312,7 @@ ar9300_configure_spectral_scan(struct at u_int32_t val, i; struct ath_hal_9300 *ahp = AH9300(ah); HAL_BOOL asleep = ahp->ah_chip_full_sleep; - int16_t nf_buf[NUM_NF_READINGS]; + int16_t nf_buf[HAL_NUM_NF_READINGS]; if ((AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah)) && asleep) { ar9300_set_power_mode(ah, HAL_PM_AWAKE, AH_TRUE); @@ -319,7 +321,7 @@ ar9300_configure_spectral_scan(struct at ar9300_prep_spectral_scan(ah); if (ss->ss_spectral_pri) { - for (i = 0; i < NUM_NF_READINGS; i++) { + for (i = 0; i < HAL_NUM_NF_READINGS; i++) { nf_buf[i] = NOISE_PWR_DBM_2_INT(ss->ss_nf_cal[i]); } ar9300_load_nf(ah, nf_buf); @@ -392,11 +394,17 @@ void ar9300_get_spectral_params(struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss) { u_int32_t val; - HAL_CHANNEL_INTERNAL *chan = AH_PRIVATE(ah)->ah_curchan; + HAL_CHANNEL_INTERNAL *chan = NULL; + const struct ieee80211_channel *c; int i, ichain, rx_chain_status; struct ath_hal_9300 *ahp = AH9300(ah); HAL_BOOL asleep = ahp->ah_chip_full_sleep; + c = AH_PRIVATE(ah)->ah_curchan; + if (c != NULL) + chan = ath_hal_checkchannel(ah, c); + + // XXX TODO: just always wake up all chips? if ((AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah)) && asleep) { ar9300_set_power_mode(ah, HAL_PM_AWAKE, AH_TRUE); } @@ -414,7 +422,7 @@ ar9300_get_spectral_params(struct ath_ha if (chan != NULL) { rx_chain_status = OS_REG_READ(ah, AR_PHY_RX_CHAINMASK) & 0x7; - for (i = 0; i < NUM_NF_READINGS; i++) { + for (i = 0; i < HAL_NUM_NF_READINGS; i++) { ichain = i % 3; if (rx_chain_status & (1 << ichain)) { ss->ss_nf_cal[i] = @@ -550,14 +558,16 @@ u_int32_t ar9300_get_spectral_config(str int16_t ar9300_get_ctl_chan_nf(struct ath_hal *ah) { int16_t nf; +#if 0 struct ath_hal_private *ahpriv = AH_PRIVATE(ah); +#endif if ( (OS_REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) == 0) { /* Noise floor calibration value is ready */ nf = MS(OS_REG_READ(ah, AR_PHY_CCA_0), AR_PHY_MINCCA_PWR); } else { /* NF calibration is not done, return nominal value */ - nf = ahpriv->nfp->nominal; + nf = AH9300(ah)->nfp->nominal; } if (nf & 0x100) { nf = (0 - ((nf ^ 0x1ff) + 1)); @@ -568,14 +578,16 @@ int16_t ar9300_get_ctl_chan_nf(struct at int16_t ar9300_get_ext_chan_nf(struct ath_hal *ah) { int16_t nf; +#if 0 struct ath_hal_private *ahpriv = AH_PRIVATE(ah); +#endif if ((OS_REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) == 0) { /* Noise floor calibration value is ready */ nf = MS(OS_REG_READ(ah, AR_PHY_EXT_CCA), AR_PHY_EXT_MINCCA_PWR); } else { /* NF calibration is not done, return nominal value */ - nf = ahpriv->nfp->nominal; + nf = AH9300(ah)->nfp->nominal; } if (nf & 0x100) { nf = (0 - ((nf ^ 0x1ff) + 1)); @@ -583,6 +595,6 @@ int16_t ar9300_get_ext_chan_nf(struct at return nf; } -#endif #endif /* ATH_SUPPORT_SPECTRAL */ +//#endif Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Wed Dec 2 05:35:04 2015 (r291641) +++ head/sys/modules/ath/Makefile Wed Dec 2 05:36:45 2015 (r291642) @@ -131,7 +131,7 @@ SRCS+= ar9300_radio.c ar9300_xmit.c ar93 SRCS+= ar9300_xmit_ds.c ar9300_beacon.c ar9300_misc.c ar9300_recv.c SRCS+= ar9300_stub_funcs.c ar9300_eeprom.c ar9300_paprd.c ar9300_recv_ds.c SRCS+= ar9300_freebsd.c ar9300_phy.c ar9300_reset.c ar9300_gpio.c -SRCS+= ar9300_power.c ar9300_timer.c +SRCS+= ar9300_power.c ar9300_timer.c ar9300_spectral.c # NB: rate control is bound to the driver by symbol names so only pick one .if ${ATH_RATE} == "sample" From owner-svn-src-all@freebsd.org Wed Dec 2 08:17:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E88A2A3FAF5; Wed, 2 Dec 2015 08:17:32 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD32B17C3; Wed, 2 Dec 2015 08:17:32 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB28HVW6095715; Wed, 2 Dec 2015 08:17:31 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB28HViF095714; Wed, 2 Dec 2015 08:17:31 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201512020817.tB28HViF095714@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 2 Dec 2015 08:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291643 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 08:17:33 -0000 Author: melifaro Date: Wed Dec 2 08:17:31 2015 New Revision: 291643 URL: https://svnweb.freebsd.org/changeset/base/291643 Log: Move RTF_PINNED handling to generic route code. This eliminates last RTF_RNH_LOCKED rtrequest1_fib() user. Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Wed Dec 2 05:36:45 2015 (r291642) +++ head/sys/net/route.c Wed Dec 2 08:17:31 2015 (r291643) @@ -1089,6 +1089,7 @@ rt_unlinkrte(struct radix_node_head *rnh rt = RNTORT(rn); RT_LOCK(rt); RT_ADDREF(rt); + rt->rt_flags &= ~RTF_UP; *perror = 0; @@ -1100,8 +1101,6 @@ rt_notifydelete(struct rtentry *rt, stru { struct ifaddr *ifa; - rt->rt_flags &= ~RTF_UP; - /* * give the protocol a chance to keep things in sync. */ @@ -1434,7 +1433,7 @@ rtrequest1_fib(int req, struct rt_addrin u_int fibnum) { int error = 0, needlock = 0; - struct rtentry *rt; + struct rtentry *rt, *rt_old; #ifdef FLOWTABLE struct rtentry *rt0; #endif @@ -1577,6 +1576,26 @@ rtrequest1_fib(int req, struct rt_addrin /* XXX mtu manipulation will be done in rnh_addaddr -- itojun */ rn = rnh->rnh_addaddr(ndst, netmask, rnh, rt->rt_nodes); + + rt_old = NULL; + if (rn == NULL && (info->rti_flags & RTF_PINNED) != 0) { + + /* + * Force removal and re-try addition + * TODO: better multipath&pinned support + */ + struct sockaddr *info_dst = info->rti_info[RTAX_DST]; + info->rti_info[RTAX_DST] = ndst; + rt_old = rt_unlinkrte(rnh, info, &error); + info->rti_info[RTAX_DST] = info_dst; + if (rt_old != NULL) + rn = rnh->rnh_addaddr(ndst, netmask, rnh, + rt->rt_nodes); + } + + if (rt_old != NULL) + RT_UNLOCK(rt_old); + /* * If it still failed to go into the tree, * then un-make it (this should be a function) @@ -1598,6 +1617,11 @@ rtrequest1_fib(int req, struct rt_addrin } #endif + if (rt_old != NULL) { + rt_notifydelete(rt_old, info); + RTFREE(rt_old); + } + /* * If this protocol has something to add to this then * allow it to do that as well. @@ -1974,32 +1998,6 @@ rtinit1(struct ifaddr *ifa, int cmd, int info.rti_info[RTAX_NETMASK] = netmask; error = rtrequest1_fib(cmd, &info, &rt, fibnum); - if ((error == EEXIST) && (cmd == RTM_ADD)) { - /* - * Interface route addition failed. - * Atomically delete current prefix generating - * RTM_DELETE message, and retry adding - * interface prefix. - */ - rnh = rt_tables_get_rnh(fibnum, dst->sa_family); - RADIX_NODE_HEAD_LOCK(rnh); - - /* Delete old prefix */ - info.rti_ifa = NULL; - info.rti_flags = RTF_RNH_LOCKED; - - error = rtrequest1_fib(RTM_DELETE, &info, NULL, fibnum); - if (error == 0) { - info.rti_ifa = ifa; - info.rti_flags = flags | RTF_RNH_LOCKED | - (ifa->ifa_flags & ~IFA_RTSELF) | RTF_PINNED; - error = rtrequest1_fib(cmd, &info, &rt, fibnum); - } - - RADIX_NODE_HEAD_UNLOCK(rnh); - } - - if (error == 0 && rt != NULL) { /* * notify any listening routing agents of the change From owner-svn-src-all@freebsd.org Wed Dec 2 10:23:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88890A3D2D6; Wed, 2 Dec 2015 10:23:55 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 538CB1B46; Wed, 2 Dec 2015 10:23:55 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2ANsKj032635; Wed, 2 Dec 2015 10:23:54 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2ANstv032634; Wed, 2 Dec 2015 10:23:54 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201512021023.tB2ANstv032634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Wed, 2 Dec 2015 10:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291644 - stable/10/sys/x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 10:23:55 -0000 Author: royger Date: Wed Dec 2 10:23:54 2015 New Revision: 291644 URL: https://svnweb.freebsd.org/changeset/base/291644 Log: MFC r291022: x86/intr: allow mutex recursion in intr_remove_handler Sponsored by: Citrix Systems R&D Modified: stable/10/sys/x86/x86/intr_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/x86/intr_machdep.c ============================================================================== --- stable/10/sys/x86/x86/intr_machdep.c Wed Dec 2 08:17:31 2015 (r291643) +++ stable/10/sys/x86/x86/intr_machdep.c Wed Dec 2 10:23:54 2015 (r291644) @@ -197,19 +197,28 @@ int intr_remove_handler(void *cookie) { struct intsrc *isrc; - int error; + int error, mtx_owned; isrc = intr_handler_source(cookie); error = intr_event_remove_handler(cookie); if (error == 0) { - mtx_lock(&intr_table_lock); + /* + * Recursion is needed here so PICs can remove interrupts + * while resuming. It was previously not possible due to + * intr_resume holding the intr_table_lock and + * intr_remove_handler recursing on it. + */ + mtx_owned = mtx_owned(&intr_table_lock); + if (mtx_owned == 0) + mtx_lock(&intr_table_lock); isrc->is_handlers--; if (isrc->is_handlers == 0) { isrc->is_pic->pic_disable_source(isrc, PIC_NO_EOI); isrc->is_pic->pic_disable_intr(isrc); } intrcnt_updatename(isrc); - mtx_unlock(&intr_table_lock); + if (mtx_owned == 0) + mtx_unlock(&intr_table_lock); } return (error); } From owner-svn-src-all@freebsd.org Wed Dec 2 10:26:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDA8AA3D428; Wed, 2 Dec 2015 10:26:35 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6C091D75; Wed, 2 Dec 2015 10:26:35 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2AQY2g032785; Wed, 2 Dec 2015 10:26:34 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2AQYnF032784; Wed, 2 Dec 2015 10:26:34 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201512021026.tB2AQYnF032784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Wed, 2 Dec 2015 10:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291645 - stable/10/sys/x86/xen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 10:26:36 -0000 Author: royger Date: Wed Dec 2 10:26:34 2015 New Revision: 291645 URL: https://svnweb.freebsd.org/changeset/base/291645 Log: MFC r291023: xen/intr: properly dispose event channels on resume Sponsored by: Citrix Systems R&D Modified: stable/10/sys/x86/xen/xen_intr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/xen/xen_intr.c ============================================================================== --- stable/10/sys/x86/xen/xen_intr.c Wed Dec 2 10:23:54 2015 (r291644) +++ stable/10/sys/x86/xen/xen_intr.c Wed Dec 2 10:26:34 2015 (r291645) @@ -711,7 +711,10 @@ xen_intr_resume(struct pic *unused, bool xen_rebind_virq(isrc); break; default: + intr_remove_handler(isrc->xi_cookie); isrc->xi_cpu = 0; + isrc->xi_type = EVTCHN_TYPE_UNBOUND; + isrc->xi_cookie = NULL; break; } } From owner-svn-src-all@freebsd.org Wed Dec 2 11:12:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5CE36A3E097; Wed, 2 Dec 2015 11:12:00 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2238C163A; Wed, 2 Dec 2015 11:12:00 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2BBxP1046504; Wed, 2 Dec 2015 11:11:59 GMT (envelope-from erwin@FreeBSD.org) Received: (from erwin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2BBx75046503; Wed, 2 Dec 2015 11:11:59 GMT (envelope-from erwin@FreeBSD.org) Message-Id: <201512021111.tB2BBx75046503@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: erwin set sender to erwin@FreeBSD.org using -f From: Erwin Lansing Date: Wed, 2 Dec 2015 11:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291646 - stable/9/etc/namedb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 11:12:00 -0000 Author: erwin Date: Wed Dec 2 11:11:58 2015 New Revision: 291646 URL: https://svnweb.freebsd.org/changeset/base/291646 Log: Update addresses for H root. Sponsored by: DK Hostmaster A/S Modified: stable/9/etc/namedb/named.root Modified: stable/9/etc/namedb/named.root ============================================================================== --- stable/9/etc/namedb/named.root Wed Dec 2 10:26:34 2015 (r291645) +++ stable/9/etc/namedb/named.root Wed Dec 2 11:11:58 2015 (r291646) @@ -13,8 +13,8 @@ ; on server FTP.INTERNIC.NET ; -OR- RS.INTERNIC.NET ; -; last update: June 2, 2014 -; related version of root zone: 2014060201 +; last update: December 01, 2015 +; related version of root zone: 2015120100 ; ; formerly NS.INTERNIC.NET ; @@ -59,8 +59,8 @@ G.ROOT-SERVERS.NET. 3600000 A ; FORMERLY AOS.ARL.ARMY.MIL ; . 3600000 NS H.ROOT-SERVERS.NET. -H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53 -H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803F:235 +H.ROOT-SERVERS.NET. 3600000 A 198.97.190.53 +H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::53 ; ; FORMERLY NIC.NORDU.NET ; From owner-svn-src-all@freebsd.org Wed Dec 2 11:48:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2463EA3EAC2; Wed, 2 Dec 2015 11:48:48 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 7688F1E4B; Wed, 2 Dec 2015 11:48:47 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 0EE47231E; Wed, 2 Dec 2015 11:48:46 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 4371947B04; Wed, 2 Dec 2015 12:48:46 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r287084 - in stable/10/usr.sbin/pw: . tests References: <201508232142.t7NLgSXX033227@repo.freebsd.org> Date: Wed, 02 Dec 2015 12:48:46 +0100 In-Reply-To: <201508232142.t7NLgSXX033227@repo.freebsd.org> (Baptiste Daroussin's message of "Sun, 23 Aug 2015 21:42:28 +0000 (UTC)") Message-ID: <867fkxcbq9.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 11:48:48 -0000 Baptiste Daroussin writes: > Log: > MFC: r285133,r285136,r285137,r285156,r285157,r285158,r285256,r285318,r2= 85395, > r285396,r285398,r285401,r285403,r285405,r285406,r285408,r285409,r285411, > r285412,r285413,r285415,r285418,r285430,r285433,r285434,r285442,r285948, > r285984,r285985,r285989,r285996,r285997,r286045,r286047,r286066,r286150, > r286151,r286152,r286154,r286155,r286156,r286157,r286173,r286196,r286197, > r286198,r286199,r286200,r286201,r286202,r286203,r286204,r286210,r286211, > r286217,r286218,r286258,r286259,r286341,r286775,r286982,r286986,r286991, > r286993 >=20=20=20 > Validate most pw inputs. This is a serious regression as the validation code is not locale-aware. I would like to see it reverted and an EN issued. Fixing it correctly will be a major undertaking since it would needs to support multibyte locales. In the meantime, I will have to replace pw on my 10.2 systems with the 10.1 binary. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Wed Dec 2 12:58:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A76BFA3FEDB; Wed, 2 Dec 2015 12:58:21 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F79F1398; Wed, 2 Dec 2015 12:58:21 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2CwKnj075719; Wed, 2 Dec 2015 12:58:20 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2CwKo9075718; Wed, 2 Dec 2015 12:58:20 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201512021258.tB2CwKo9075718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Wed, 2 Dec 2015 12:58:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291647 - stable/10/sys/x86/xen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 12:58:21 -0000 Author: royger Date: Wed Dec 2 12:58:20 2015 New Revision: 291647 URL: https://svnweb.freebsd.org/changeset/base/291647 Log: Revert MFC of r291023: Due to the delta between HEAD and stable/10 event channel code, this fix is not needed on stable/10 and was also causing build issues. Revert it. Modified: stable/10/sys/x86/xen/xen_intr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/xen/xen_intr.c ============================================================================== --- stable/10/sys/x86/xen/xen_intr.c Wed Dec 2 11:11:58 2015 (r291646) +++ stable/10/sys/x86/xen/xen_intr.c Wed Dec 2 12:58:20 2015 (r291647) @@ -711,10 +711,7 @@ xen_intr_resume(struct pic *unused, bool xen_rebind_virq(isrc); break; default: - intr_remove_handler(isrc->xi_cookie); isrc->xi_cpu = 0; - isrc->xi_type = EVTCHN_TYPE_UNBOUND; - isrc->xi_cookie = NULL; break; } } From owner-svn-src-all@freebsd.org Wed Dec 2 14:21:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 997DAA3F4FE; Wed, 2 Dec 2015 14:21:17 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FA8510F0; Wed, 2 Dec 2015 14:21:17 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2ELGFb002358; Wed, 2 Dec 2015 14:21:16 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2ELGHZ002356; Wed, 2 Dec 2015 14:21:16 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201512021421.tB2ELGHZ002356@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 2 Dec 2015 14:21:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291648 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 14:21:17 -0000 Author: mmel Date: Wed Dec 2 14:21:16 2015 New Revision: 291648 URL: https://svnweb.freebsd.org/changeset/base/291648 Log: OFW: Move code for searching interrupt parent into separate function. It can be used by interrupt controller drivers. Approved by: kib (mentor) Modified: head/sys/dev/ofw/ofw_bus_subr.c head/sys/dev/ofw/ofw_bus_subr.h Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Wed Dec 2 12:58:20 2015 (r291647) +++ head/sys/dev/ofw/ofw_bus_subr.c Wed Dec 2 14:21:16 2015 (r291648) @@ -430,6 +430,27 @@ ofw_bus_reg_to_rl(device_t dev, phandle_ return (0); } +/* + * Get interrupt parent for given node. + * Returns 0 if interrupt parent doesn't exist. + */ +phandle_t +ofw_bus_find_iparent(phandle_t node) +{ + phandle_t iparent; + + if (OF_searchencprop(node, "interrupt-parent", &iparent, + sizeof(iparent)) == -1) { + for (iparent = node; iparent != 0; + iparent = OF_parent(iparent)) { + if (OF_hasprop(iparent, "interrupt-controller")) + break; + } + iparent = OF_xref_from_node(iparent); + } + return (iparent); +} + int ofw_bus_intr_to_rl(device_t dev, phandle_t node, struct resource_list *rl, int *rlen) @@ -442,18 +463,11 @@ ofw_bus_intr_to_rl(device_t dev, phandle nintr = OF_getencprop_alloc(node, "interrupts", sizeof(*intr), (void **)&intr); if (nintr > 0) { - if (OF_searchencprop(node, "interrupt-parent", &iparent, - sizeof(iparent)) == -1) { - for (iparent = node; iparent != 0; - iparent = OF_parent(iparent)) { - if (OF_hasprop(iparent, "interrupt-controller")) - break; - } - if (iparent == 0) { - device_printf(dev, "No interrupt-parent found, " - "assuming direct parent\n"); - iparent = OF_parent(node); - } + iparent = ofw_bus_find_iparent(node); + if (iparent == 0) { + device_printf(dev, "No interrupt-parent found, " + "assuming direct parent\n"); + iparent = OF_parent(node); iparent = OF_xref_from_node(iparent); } if (OF_searchencprop(OF_node_from_xref(iparent), Modified: head/sys/dev/ofw/ofw_bus_subr.h ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.h Wed Dec 2 12:58:20 2015 (r291647) +++ head/sys/dev/ofw/ofw_bus_subr.h Wed Dec 2 14:21:16 2015 (r291648) @@ -82,7 +82,7 @@ const char *ofw_bus_get_status(device_t int ofw_bus_status_okay(device_t dev); /* Helper to get node's interrupt parent */ -void ofw_bus_find_iparent(phandle_t); +phandle_t ofw_bus_find_iparent(phandle_t); /* Helper routine for checking compat prop */ int ofw_bus_is_compatible(device_t, const char *); From owner-svn-src-all@freebsd.org Wed Dec 2 14:22:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95A7DA3F634; Wed, 2 Dec 2015 14:22:59 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 634F0145A; Wed, 2 Dec 2015 14:22:59 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2EMwGw002463; Wed, 2 Dec 2015 14:22:58 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2EMwkB002462; Wed, 2 Dec 2015 14:22:58 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201512021422.tB2EMwkB002462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 2 Dec 2015 14:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291649 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 14:22:59 -0000 Author: mmel Date: Wed Dec 2 14:22:58 2015 New Revision: 291649 URL: https://svnweb.freebsd.org/changeset/base/291649 Log: ARM: Fix of detection of root interrupt controller. This fixes detection of root interrupt controller for cases, when interrupt parent is not defined at all or it's not defined directly in controller node. Approved by: kib (mentor) Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Wed Dec 2 14:21:16 2015 (r291648) +++ head/sys/arm/arm/gic.c Wed Dec 2 14:22:58 2015 (r291649) @@ -461,9 +461,13 @@ arm_gic_attach(device_t dev) goto cleanup; } - i = OF_getencprop(ofw_bus_get_node(dev), "interrupt-parent", - &pxref, sizeof(pxref)); - if (i > 0 && xref == pxref) { + /* + * Controller is root if: + * - doesn't have interrupt parent + * - his interrupt parent is this controller + */ + pxref = ofw_bus_find_iparent(ofw_bus_get_node(dev)); + if (pxref == 0 || xref == pxref) { if (arm_pic_claim_root(dev, xref, arm_gic_intr, sc, GIC_LAST_SGI - GIC_FIRST_SGI + 1) != 0) { device_printf(dev, "could not set PIC as a root\n"); @@ -471,6 +475,12 @@ arm_gic_attach(device_t dev) goto cleanup; } } else { + if (sc->gic_res[2] == NULL) { + device_printf(dev, + "not root PIC must have defined interrupt\n"); + arm_pic_unregister(dev, xref); + goto cleanup; + } if (bus_setup_intr(dev, sc->gic_res[2], INTR_TYPE_CLK, arm_gic_intr, NULL, sc, &sc->gic_intrhand)) { device_printf(dev, "could not setup irq handler\n"); From owner-svn-src-all@freebsd.org Wed Dec 2 14:24:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 513C4A3F680; Wed, 2 Dec 2015 14:24:15 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E612160E; Wed, 2 Dec 2015 14:24:15 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2EOEOO002548; Wed, 2 Dec 2015 14:24:14 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2EOEPh002547; Wed, 2 Dec 2015 14:24:14 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <201512021424.tB2EOEPh002547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Wed, 2 Dec 2015 14:24:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291650 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 14:24:15 -0000 Author: mmel Date: Wed Dec 2 14:24:14 2015 New Revision: 291650 URL: https://svnweb.freebsd.org/changeset/base/291650 Log: ARM: Define PCI_RES_BUS resource for platforms having NEW_PCIB enabled. Approved by: kib (mentor) Modified: head/sys/arm/include/resource.h Modified: head/sys/arm/include/resource.h ============================================================================== --- head/sys/arm/include/resource.h Wed Dec 2 14:22:58 2015 (r291649) +++ head/sys/arm/include/resource.h Wed Dec 2 14:24:14 2015 (r291650) @@ -42,5 +42,8 @@ #define SYS_RES_MEMORY 3 /* i/o memory */ #define SYS_RES_IOPORT 4 /* i/o ports */ #define SYS_RES_GPIO 5 /* general purpose i/o */ +#ifdef NEW_PCIB +#define PCI_RES_BUS 6 /* PCI bus numbers */ +#endif #endif /* !_MACHINE_RESOURCE_H_ */ From owner-svn-src-all@freebsd.org Wed Dec 2 16:29:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B953A3F1D2; Wed, 2 Dec 2015 16:29:38 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 223F4164F; Wed, 2 Dec 2015 16:29:38 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2GTbqk038017; Wed, 2 Dec 2015 16:29:37 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2GTb3E038016; Wed, 2 Dec 2015 16:29:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201512021629.tB2GTb3E038016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 2 Dec 2015 16:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291651 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 16:29:38 -0000 Author: tuexen Date: Wed Dec 2 16:29:36 2015 New Revision: 291651 URL: https://svnweb.freebsd.org/changeset/base/291651 Log: Adjust the MTU when accepting an SCTP association using UDP encapsulation. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Wed Dec 2 14:24:14 2015 (r291650) +++ head/sys/netinet/sctp_input.c Wed Dec 2 16:29:36 2015 (r291651) @@ -521,7 +521,6 @@ sctp_process_init_ack(struct mbuf *m, in /* calculate the RTO */ net->RTO = sctp_calculate_rto(stcb, asoc, net, &asoc->time_entered, sctp_align_safe_nocopy, SCTP_RTT_FROM_NON_DATA); - retval = sctp_send_cookie_echo(m, offset, stcb, net); if (retval < 0) { /* @@ -2347,12 +2346,17 @@ sctp_process_cookie_new(struct mbuf *m, sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL); } (void)SCTP_GETTIME_TIMEVAL(&stcb->asoc.time_entered); - if ((netp) && (*netp)) { + if ((netp != NULL) && (*netp != NULL)) { /* calculate the RTT and set the encaps port */ (*netp)->RTO = sctp_calculate_rto(stcb, asoc, *netp, &cookie->time_entered, sctp_align_unsafe_makecopy, SCTP_RTT_FROM_NON_DATA); +#if defined(INET) || defined(INET6) + if (((*netp)->port == 0) && (port != 0)) { + sctp_pathmtu_adjustment(stcb, (*netp)->mtu - sizeof(struct udphdr)); + } (*netp)->port = port; +#endif } /* respond with a COOKIE-ACK */ sctp_send_cookie_ack(stcb); @@ -5845,7 +5849,7 @@ sctp_common_input_processing(struct mbuf */ inp = stcb->sctp_ep; #if defined(INET) || defined(INET6) - if ((net) && (port)) { + if ((net != NULL) && (port != 0)) { if (net->port == 0) { sctp_pathmtu_adjustment(stcb, net->mtu - sizeof(struct udphdr)); } From owner-svn-src-all@freebsd.org Wed Dec 2 17:26:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD80CA3FDEA; Wed, 2 Dec 2015 17:26:38 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 625821A47; Wed, 2 Dec 2015 17:26:38 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2HQbwB056014; Wed, 2 Dec 2015 17:26:37 GMT (envelope-from fabient@FreeBSD.org) Received: (from fabient@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2HQb5p056013; Wed, 2 Dec 2015 17:26:37 GMT (envelope-from fabient@FreeBSD.org) Message-Id: <201512021726.tB2HQb5p056013@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fabient set sender to fabient@FreeBSD.org using -f From: Fabien Thomas Date: Wed, 2 Dec 2015 17:26:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291652 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 17:26:38 -0000 Author: fabient Date: Wed Dec 2 17:26:37 2015 New Revision: 291652 URL: https://svnweb.freebsd.org/changeset/base/291652 Log: MFC r291301: The r241129 description was wrong that the scenario is possible only for read locks on pcbs. The same race can happen with write lock semantics as well. The race scenario: - Two threads (1 and 2) locate pcb with writer semantics (INPLOOKUP_WLOCKPCB) and do in_pcbref() on it. - 1 and 2 both drop the inp hash lock. - Another thread (3) grabs the inp hash lock. Then it runs in_pcbfree(), which wlocks the pcb. They must happen faster than 1 or 2 come INP_WLOCK()! - 1 and 2 congest in INP_WLOCK(). - 3 does in_pcbremlists(), drops hash lock, and runs in_pcbrele_wlocked(), which doesn't free the pcb due to two references on it. Then it unlocks the pcb. - 1 (or 2) gets wlock on the pcb, runs in_pcbrele_wlocked(), which doesn't report inp as freed, due to 2 (or 1) still helding extra reference on it. The thread tries to do smth with a disconnected pcb and crashes. Submitted by: emeric.poupon@stormshield.eu Reviewed by: glebius@ Sponsored by: Stormshield Tested by: Cassiano Peixoto, Stormshield Modified: stable/10/sys/netinet/in_pcb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/in_pcb.c ============================================================================== --- stable/10/sys/netinet/in_pcb.c Wed Dec 2 16:29:36 2015 (r291651) +++ stable/10/sys/netinet/in_pcb.c Wed Dec 2 17:26:37 2015 (r291652) @@ -1148,8 +1148,17 @@ in_pcbrele_wlocked(struct inpcb *inp) INP_WLOCK_ASSERT(inp); - if (refcount_release(&inp->inp_refcount) == 0) + if (refcount_release(&inp->inp_refcount) == 0) { + /* + * If the inpcb has been freed, let the caller know, even if + * this isn't the last reference. + */ + if (inp->inp_flags2 & INP_FREED) { + INP_WUNLOCK(inp); + return (1); + } return (0); + } KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); From owner-svn-src-all@freebsd.org Wed Dec 2 17:30:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6ED4CA3FE83; Wed, 2 Dec 2015 17:30:32 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-ob0-x232.google.com (mail-ob0-x232.google.com [IPv6:2607:f8b0:4003:c01::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34FAE1C49; Wed, 2 Dec 2015 17:30:32 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by obbnk6 with SMTP id nk6so38271332obb.2; Wed, 02 Dec 2015 09:30:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=O2VdLbk5/uE3Fgmdc9bggex1ULUCzuyziQr0owSoYvM=; b=C/oD5fh7zgl/xwUx3m5YTnH86qWLC7JO34OCLnITaUzUl/QajZiaxrlUEVUpVGBBDs C65HVGTpYt/Xjk+SUtuLhjX8jRiqY1OcE9Bxkg1R7zNji46O9w9Rso8puYY1rpXWNLhW E0fEhgTMtL6DJVN6s2Yc3T8DznrOV+l4nW4mBvNhuoeWlrgJzOB3Hf+Wger9JefdLqVo hsYoDAw9UbQouGvpFYhCpkwS7J0tgd5ZJZ+5LKXCbPEH0ieUjAuXyqBh8/+HrvnXIlhK TLxVnqChZK/TQP55OMuYmpHTQlMnRkclJK6Cdjuz4+uOMiijsyU4mTz1j9wSSOGBP7ZO oxgw== MIME-Version: 1.0 X-Received: by 10.182.120.4 with SMTP id ky4mr3743300obb.16.1449077431353; Wed, 02 Dec 2015 09:30:31 -0800 (PST) Received: by 10.182.174.1 with HTTP; Wed, 2 Dec 2015 09:30:30 -0800 (PST) Received: by 10.182.174.1 with HTTP; Wed, 2 Dec 2015 09:30:30 -0800 (PST) Reply-To: araujo@FreeBSD.org In-Reply-To: <201512021726.tB2HQb5p056013@repo.freebsd.org> References: <201512021726.tB2HQb5p056013@repo.freebsd.org> Date: Thu, 3 Dec 2015 01:30:30 +0800 Message-ID: Subject: Re: svn commit: r291652 - stable/10/sys/netinet From: Marcelo Araujo To: Fabien Thomas Cc: svn-src-stable-10@freebsd.org, svn-src-stable@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 17:30:32 -0000 Hello, I'm sorry, but that 'even' smell buggy for me! Could you explain what that 'even' really mean? Best, On Dec 3, 2015 1:26 AM, "Fabien Thomas" wrote: > Author: fabient > Date: Wed Dec 2 17:26:37 2015 > New Revision: 291652 > URL: https://svnweb.freebsd.org/changeset/base/291652 > > Log: > MFC r291301: > > The r241129 description was wrong that the scenario is possible > only for read locks on pcbs. The same race can happen with write > lock semantics as well. > > The race scenario: > > - Two threads (1 and 2) locate pcb with writer semantics > (INPLOOKUP_WLOCKPCB) > and do in_pcbref() on it. > - 1 and 2 both drop the inp hash lock. > - Another thread (3) grabs the inp hash lock. Then it runs in_pcbfree(), > which wlocks the pcb. They must happen faster than 1 or 2 come > INP_WLOCK()! > - 1 and 2 congest in INP_WLOCK(). > - 3 does in_pcbremlists(), drops hash lock, and runs > in_pcbrele_wlocked(), > which doesn't free the pcb due to two references on it. > Then it unlocks the pcb. > - 1 (or 2) gets wlock on the pcb, runs in_pcbrele_wlocked(), which > doesn't > report inp as freed, due to 2 (or 1) still helding extra reference on > it. > The thread tries to do smth with a disconnected pcb and crashes. > > Submitted by: emeric.poupon@stormshield.eu > Reviewed by: glebius@ > Sponsored by: Stormshield > Tested by: Cassiano Peixoto, Stormshield > > Modified: > stable/10/sys/netinet/in_pcb.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/netinet/in_pcb.c > > ============================================================================== > --- stable/10/sys/netinet/in_pcb.c Wed Dec 2 16:29:36 2015 > (r291651) > +++ stable/10/sys/netinet/in_pcb.c Wed Dec 2 17:26:37 2015 > (r291652) > @@ -1148,8 +1148,17 @@ in_pcbrele_wlocked(struct inpcb *inp) > > INP_WLOCK_ASSERT(inp); > > - if (refcount_release(&inp->inp_refcount) == 0) > + if (refcount_release(&inp->inp_refcount) == 0) { > + /* > + * If the inpcb has been freed, let the caller know, even > if > + * this isn't the last reference. > + */ > + if (inp->inp_flags2 & INP_FREED) { > + INP_WUNLOCK(inp); > + return (1); > + } > return (0); > + } > > KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", > __func__)); > > > From owner-svn-src-all@freebsd.org Wed Dec 2 18:27:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54B3BA3FBAA; Wed, 2 Dec 2015 18:27:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 163DD134A; Wed, 2 Dec 2015 18:27:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2IRVJL074516; Wed, 2 Dec 2015 18:27:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2IRUdV074513; Wed, 2 Dec 2015 18:27:30 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201512021827.tB2IRUdV074513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 2 Dec 2015 18:27:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291653 - in head: share/man/man9 sys/fs/devfs sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 18:27:32 -0000 Author: jhb Date: Wed Dec 2 18:27:30 2015 New Revision: 291653 URL: https://svnweb.freebsd.org/changeset/base/291653 Log: The cdevpriv_dtr_t typedef was not able to be used in a function prototype like the various d_*_t typedefs since it declared a function pointer rather than a function. Add a new d_priv_dtor_t typedef that declares the function and can be used as a function prototype. The previous typedef wasn't useful outside of the cdevpriv implementation, so retire it. The name d_priv_dtor_t was chosen to be more consistent with cdev methods since it is commonly used in place of d_close_t even though it is not a direct pointer in struct cdevsw. Reviewed by: kib, imp MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D4340 Modified: head/share/man/man9/devfs_set_cdevpriv.9 head/sys/fs/devfs/devfs_vnops.c head/sys/sys/conf.h Modified: head/share/man/man9/devfs_set_cdevpriv.9 ============================================================================== --- head/share/man/man9/devfs_set_cdevpriv.9 Wed Dec 2 17:26:37 2015 (r291652) +++ head/share/man/man9/devfs_set_cdevpriv.9 Wed Dec 2 18:27:30 2015 (r291653) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 20, 2015 +.Dd December 2, 2015 .Dt DEVFS_CDEVPRIV 9 .Os .Sh NAME @@ -36,12 +36,12 @@ .In sys/param.h .In sys/conf.h .Bd -literal -typedef void (*cdevpriv_dtr_t)(void *data); +typedef void d_priv_dtor_t(void *data); .Ed .Ft int .Fn devfs_get_cdevpriv "void **datap" .Ft int -.Fn devfs_set_cdevpriv "void *priv" "cdevpriv_dtr_t dtr" +.Fn devfs_set_cdevpriv "void *priv" "d_priv_dtor_t *dtr" .Ft void .Fn devfs_clear_cdevpriv "void" .Sh DESCRIPTION Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Wed Dec 2 17:26:37 2015 (r291652) +++ head/sys/fs/devfs/devfs_vnops.c Wed Dec 2 18:27:30 2015 (r291653) @@ -151,7 +151,7 @@ devfs_get_cdevpriv(void **datap) } int -devfs_set_cdevpriv(void *priv, cdevpriv_dtr_t priv_dtr) +devfs_set_cdevpriv(void *priv, d_priv_dtor_t *priv_dtr) { struct file *fp; struct cdev_priv *cdp; Modified: head/sys/sys/conf.h ============================================================================== --- head/sys/sys/conf.h Wed Dec 2 17:26:37 2015 (r291652) +++ head/sys/sys/conf.h Wed Dec 2 18:27:30 2015 (r291653) @@ -277,9 +277,9 @@ void setconf(void); #define dev2unit(d) ((d)->si_drv0) -typedef void (*cdevpriv_dtr_t)(void *data); +typedef void d_priv_dtor_t(void *data); int devfs_get_cdevpriv(void **datap); -int devfs_set_cdevpriv(void *priv, cdevpriv_dtr_t dtr); +int devfs_set_cdevpriv(void *priv, d_priv_dtor_t *dtr); void devfs_clear_cdevpriv(void); void devfs_fpdrop(struct file *fp); /* XXX This is not public KPI */ From owner-svn-src-all@freebsd.org Wed Dec 2 20:22:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECDB6A3F4D2; Wed, 2 Dec 2015 20:22:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B956412F1; Wed, 2 Dec 2015 20:22:51 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2KMoj0010540; Wed, 2 Dec 2015 20:22:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2KMo75010536; Wed, 2 Dec 2015 20:22:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201512022022.tB2KMo75010536@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 2 Dec 2015 20:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291654 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 20:22:52 -0000 Author: mav Date: Wed Dec 2 20:22:50 2015 New Revision: 291654 URL: https://svnweb.freebsd.org/changeset/base/291654 Log: Add initial support for 16Gbps FC QLogic chips. I still don't know how to read NVRAM there, so WWNs and other parameters are incorrect, but other then that driver seems like attaching normally. Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/isp_pci.c head/sys/dev/isp/ispmbox.h head/sys/dev/isp/ispvar.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Wed Dec 2 18:27:30 2015 (r291653) +++ head/sys/dev/isp/isp.c Wed Dec 2 20:22:50 2015 (r291654) @@ -277,6 +277,9 @@ isp_reset(ispsoftc_t *isp, int do_load_d case ISP_HA_FC_2500: btype = "2532"; break; + case ISP_HA_FC_2600: + btype = "2031"; + break; default: break; } @@ -761,6 +764,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d code_org = ISP_CODE_ORG; } + isp->isp_loaded_fw = 0; if (dodnld && IS_24XX(isp)) { const uint32_t *ptr = isp->isp_mdvec->dv_ispfw; int wordload; @@ -956,8 +960,17 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_RESET0(isp); return; } + } else if (IS_26XX(isp)) { + MBSINIT(&mbs, MBOX_LOAD_FLASH_FIRMWARE, MBLOGALL, 5000000); + mbs.ibitm = 0x01; + mbs.obitm = 0x07; + isp_mboxcmd(isp, &mbs); + if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { + isp_prt(isp, ISP_LOGERR, "Flash F/W load failed"); + ISP_RESET0(isp); + return; + } } else { - isp->isp_loaded_fw = 0; isp_prt(isp, ISP_LOGDEBUG2, "skipping f/w download"); } @@ -966,7 +979,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d */ if (isp->isp_loaded_fw) { MBSINIT(&mbs, MBOX_VERIFY_CHECKSUM, MBLOGNONE, 0); - mbs.param[0] = MBOX_VERIFY_CHECKSUM; if (IS_24XX(isp)) { mbs.param[1] = code_org >> 16; mbs.param[2] = code_org; @@ -998,9 +1010,6 @@ isp_reset(ispsoftc_t *isp, int do_load_d } else { mbs.param[3] = 1; } - if (IS_25XX(isp)) { - mbs.ibits |= 0x10; - } } else if (IS_2322(isp)) { mbs.param[1] = code_org; if (isp->isp_loaded_fw) { @@ -1861,16 +1870,16 @@ isp_fibre_init(ispsoftc_t *isp) icbp->icb_idelaytimer = 10; } icbp->icb_zfwoptions = fcp->isp_zfwoptions; - if (isp->isp_confopts & ISP_CFG_ONEGB) { + if (isp->isp_confopts & ISP_CFG_1GB) { icbp->icb_zfwoptions &= ~ICBZOPT_RATE_MASK; - icbp->icb_zfwoptions |= ICBZOPT_RATE_ONEGB; - } else if (isp->isp_confopts & ISP_CFG_TWOGB) { + icbp->icb_zfwoptions |= ICBZOPT_RATE_1GB; + } else if (isp->isp_confopts & ISP_CFG_2GB) { icbp->icb_zfwoptions &= ~ICBZOPT_RATE_MASK; - icbp->icb_zfwoptions |= ICBZOPT_RATE_TWOGB; + icbp->icb_zfwoptions |= ICBZOPT_RATE_2GB; } else { switch (icbp->icb_zfwoptions & ICBZOPT_RATE_MASK) { - case ICBZOPT_RATE_ONEGB: - case ICBZOPT_RATE_TWOGB: + case ICBZOPT_RATE_1GB: + case ICBZOPT_RATE_2GB: case ICBZOPT_RATE_AUTO: break; default: @@ -2126,14 +2135,16 @@ isp_fibre_init_2400(ispsoftc_t *isp) icbp->icb_fwoptions3 |= ICB2400_OPT3_RSPSZ_24; } icbp->icb_fwoptions3 &= ~ICB2400_OPT3_RATE_AUTO; - if (isp->isp_confopts & ISP_CFG_ONEGB) { - icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_ONEGB; - } else if (isp->isp_confopts & ISP_CFG_TWOGB) { - icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_TWOGB; - } else if (isp->isp_confopts & ISP_CFG_FOURGB) { - icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_FOURGB; - } else if (IS_25XX(isp) && (isp->isp_confopts & ISP_CFG_EIGHTGB)) { - icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_EIGHTGB; + if (isp->isp_confopts & ISP_CFG_1GB) { + icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_1GB; + } else if (isp->isp_confopts & ISP_CFG_2GB) { + icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_2GB; + } else if (isp->isp_confopts & ISP_CFG_4GB) { + icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_4GB; + } else if (isp->isp_confopts & ISP_CFG_8GB) { + icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_8GB; + } else if (isp->isp_confopts & ISP_CFG_16GB) { + icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_16GB; } else { icbp->icb_fwoptions3 |= ICB2400_OPT3_RATE_AUTO; } @@ -6828,7 +6839,7 @@ static const char *scsi_mbcmd_names[] = static const uint32_t mbpfc[] = { ISP_FC_OPMAP(0x01, 0x01), /* 0x00: MBOX_NO_OP */ ISP_FC_OPMAP(0x1f, 0x01), /* 0x01: MBOX_LOAD_RAM */ - ISP_FC_OPMAP(0x0f, 0x01), /* 0x02: MBOX_EXEC_FIRMWARE */ + ISP_FC_OPMAP_HALF(0x07, 0xff, 0x00, 0x03), /* 0x02: MBOX_EXEC_FIRMWARE */ ISP_FC_OPMAP(0xdf, 0x01), /* 0x03: MBOX_DUMP_RAM */ ISP_FC_OPMAP(0x07, 0x07), /* 0x04: MBOX_WRITE_RAM_WORD */ ISP_FC_OPMAP(0x03, 0x07), /* 0x05: MBOX_READ_RAM_WORD */ Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Wed Dec 2 18:27:30 2015 (r291653) +++ head/sys/dev/isp/isp_pci.c Wed Dec 2 20:22:50 2015 (r291654) @@ -172,6 +172,18 @@ static struct ispmdvec mdvec_2500 = { NULL }; +static struct ispmdvec mdvec_2600 = { + isp_pci_rd_isr_2400, + isp_pci_rd_reg_2400, + isp_pci_wr_reg_2400, + isp_pci_mbxdma, + isp_pci_dmasetup, + isp_common_dmateardown, + isp_pci_reset0, + isp_pci_reset1, + NULL +}; + #ifndef PCIM_CMD_INVEN #define PCIM_CMD_INVEN 0x10 #endif @@ -276,6 +288,10 @@ static struct ispmdvec mdvec_2500 = { #define PCI_PRODUCT_QLOGIC_ISP5432 0x5432 #endif +#ifndef PCI_PRODUCT_QLOGIC_ISP2031 +#define PCI_PRODUCT_QLOGIC_ISP2031 0x2031 +#endif + #define PCI_QLOGIC_ISP5432 \ ((PCI_PRODUCT_QLOGIC_ISP5432 << 16) | PCI_VENDOR_QLOGIC) @@ -327,14 +343,14 @@ static struct ispmdvec mdvec_2500 = { #define PCI_QLOGIC_ISP6322 \ ((PCI_PRODUCT_QLOGIC_ISP6322 << 16) | PCI_VENDOR_QLOGIC) +#define PCI_QLOGIC_ISP2031 \ + ((PCI_PRODUCT_QLOGIC_ISP2031 << 16) | PCI_VENDOR_QLOGIC) + /* * Odd case for some AMI raid cards... We need to *not* attach to this. */ #define AMI_RAID_SUBVENDOR_ID 0x101e -#define IO_MAP_REG 0x10 -#define MEM_MAP_REG 0x14 - #define PCI_DFLT_LTNCY 0x40 #define PCI_DFLT_LNSZ 0x10 @@ -434,6 +450,9 @@ isp_pci_probe(device_t dev) case PCI_QLOGIC_ISP6322: device_set_desc(dev, "Qlogic ISP 6322 PCI FC-AL Adapter"); break; + case PCI_QLOGIC_ISP2031: + device_set_desc(dev, "Qlogic ISP 2031 PCI FC-AL Adapter"); + break; default: return (ENXIO); } @@ -485,31 +504,6 @@ isp_get_generic_options(device_t dev, is } static void -isp_get_pci_options(device_t dev, int *m1, int *m2) -{ - int tval; - /* - * Which we should try first - memory mapping or i/o mapping? - * - * We used to try memory first followed by i/o on alpha, otherwise - * the reverse, but we should just try memory first all the time now. - */ - *m1 = PCIM_CMD_MEMEN; - *m2 = PCIM_CMD_PORTEN; - - tval = 0; - if (resource_int_value(device_get_name(dev), device_get_unit(dev), "prefer_iomap", &tval) == 0 && tval != 0) { - *m1 = PCIM_CMD_PORTEN; - *m2 = PCIM_CMD_MEMEN; - } - tval = 0; - if (resource_int_value(device_get_name(dev), device_get_unit(dev), "prefer_memmap", &tval) == 0 && tval != 0) { - *m1 = PCIM_CMD_MEMEN; - *m2 = PCIM_CMD_PORTEN; - } -} - -static void isp_get_specific_options(device_t dev, int chan, ispsoftc_t *isp) { const char *sptr; @@ -662,7 +656,7 @@ isp_get_specific_options(device_t dev, i static int isp_pci_attach(device_t dev) { - int i, m1, m2, locksetup = 0; + int i, locksetup = 0; uint32_t data, cmd, linesz, did; struct isp_pcisoftc *pcs; ispsoftc_t *isp; @@ -689,33 +683,10 @@ isp_pci_attach(device_t dev) isp_nvports = 0; isp_get_generic_options(dev, isp); - /* - * Get PCI options- which in this case are just mapping preferences. - */ - isp_get_pci_options(dev, &m1, &m2); - linesz = PCI_DFLT_LNSZ; pcs->irq = pcs->regs = NULL; pcs->rgd = pcs->rtp = pcs->iqd = 0; - pcs->rtp = (m1 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; - pcs->rgd = (m1 == PCIM_CMD_MEMEN)? MEM_MAP_REG : IO_MAP_REG; - pcs->regs = bus_alloc_resource_any(dev, pcs->rtp, &pcs->rgd, RF_ACTIVE); - if (pcs->regs == NULL) { - pcs->rtp = (m2 == PCIM_CMD_MEMEN)? SYS_RES_MEMORY : SYS_RES_IOPORT; - pcs->rgd = (m2 == PCIM_CMD_MEMEN)? MEM_MAP_REG : IO_MAP_REG; - pcs->regs = bus_alloc_resource_any(dev, pcs->rtp, &pcs->rgd, RF_ACTIVE); - } - if (pcs->regs == NULL) { - device_printf(dev, "unable to map any ports\n"); - goto bad; - } - if (bootverbose) { - device_printf(dev, "using %s space register mapping\n", (pcs->rgd == IO_MAP_REG)? "I/O" : "Memory"); - } - isp->isp_bus_tag = rman_get_bustag(pcs->regs); - isp->isp_bus_handle = rman_get_bushandle(pcs->regs); - pcs->pci_dev = dev; pcs->pci_poff[BIU_BLOCK >> _BLK_REG_SHFT] = BIU_REGS_OFF; pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = PCI_MBOX_REGS_OFF; @@ -823,6 +794,13 @@ isp_pci_attach(device_t dev) isp->isp_type = ISP_HA_FC_2500; pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = PCI_MBOX_REGS2400_OFF; break; + case PCI_QLOGIC_ISP2031: + did = 0x2600; + isp->isp_nchan += isp_nvports; + isp->isp_mdvec = &mdvec_2600; + isp->isp_type = ISP_HA_FC_2600; + pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] = PCI_MBOX_REGS2400_OFF; + break; default: device_printf(dev, "unknown device type\n"); goto bad; @@ -830,6 +808,34 @@ isp_pci_attach(device_t dev) } isp->isp_revision = pci_get_revid(dev); + if (IS_26XX(isp)) { + pcs->rtp = SYS_RES_MEMORY; + pcs->rgd = PCIR_BAR(0); + pcs->regs = bus_alloc_resource_any(dev, pcs->rtp, &pcs->rgd, + RF_ACTIVE); + } else { + pcs->rtp = SYS_RES_MEMORY; + pcs->rgd = PCIR_BAR(1); + pcs->regs = bus_alloc_resource_any(dev, pcs->rtp, &pcs->rgd, + RF_ACTIVE); + if (pcs->regs == NULL) { + pcs->rtp = SYS_RES_IOPORT; + pcs->rgd = PCIR_BAR(0); + pcs->regs = bus_alloc_resource_any(dev, pcs->rtp, + &pcs->rgd, RF_ACTIVE); + } + } + if (pcs->regs == NULL) { + device_printf(dev, "Unable to map any ports\n"); + goto bad; + } + if (bootverbose) { + device_printf(dev, "Using %s space register mapping\n", + (pcs->rtp == SYS_RES_IOPORT)? "I/O" : "Memory"); + } + isp->isp_bus_tag = rman_get_bustag(pcs->regs); + isp->isp_bus_handle = rman_get_bushandle(pcs->regs); + if (IS_FC(isp)) { psize = sizeof (fcparam); xsize = sizeof (struct isp_fc); Modified: head/sys/dev/isp/ispmbox.h ============================================================================== --- head/sys/dev/isp/ispmbox.h Wed Dec 2 18:27:30 2015 (r291653) +++ head/sys/dev/isp/ispmbox.h Wed Dec 2 20:22:50 2015 (r291654) @@ -122,6 +122,7 @@ #define MBOX_GET_TARGET_STATUS 0x0056 /* These are for the ISP2X00 FC cards */ +#define MBOX_LOAD_FLASH_FIRMWARE 0x0003 #define MBOX_WRITE_FC_SERDES_REG 0x0003 /* FC only */ #define MBOX_READ_FC_SERDES_REG 0x0004 /* FC only */ #define MBOX_GET_IO_STATUS 0x0012 @@ -1007,9 +1008,9 @@ typedef struct { #define ICBXOPT_TIMER_MASK 0x7 #define ICBZOPT_RATE_MASK 0xC000 -#define ICBZOPT_RATE_ONEGB 0x0000 +#define ICBZOPT_RATE_1GB 0x0000 #define ICBZOPT_RATE_AUTO 0x8000 -#define ICBZOPT_RATE_TWOGB 0x4000 +#define ICBZOPT_RATE_2GB 0x4000 #define ICBZOPT_50_OHM 0x2000 #define ICBZOPT_NO_LOCAL_PLOGI 0x0080 #define ICBZOPT_ENA_OOF 0x0040 /* out of order frame handling */ @@ -1058,14 +1059,14 @@ typedef struct { #define ICB2400_OPT3_ENA_ETH_RESP 0x08000000 #define ICB2400_OPT3_ENA_ETH_ATIO 0x04000000 #define ICB2400_OPT3_ENA_MFCF 0x00020000 -#define ICB2400_OPT3_SKIP_FOURGB 0x00010000 +#define ICB2400_OPT3_SKIP_4GB 0x00010000 #define ICB2400_OPT3_RATE_MASK 0x0000E000 -#define ICB2400_OPT3_RATE_ONEGB 0x00000000 -#define ICB2400_OPT3_RATE_TWOGB 0x00002000 +#define ICB2400_OPT3_RATE_1GB 0x00000000 +#define ICB2400_OPT3_RATE_2GB 0x00002000 #define ICB2400_OPT3_RATE_AUTO 0x00004000 -#define ICB2400_OPT3_RATE_FOURGB 0x00006000 -#define ICB2400_OPT3_RATE_EIGHTGB 0x00008000 -#define ICB2400_OPT3_RATE_SIXTEENGB 0x0000A000 +#define ICB2400_OPT3_RATE_4GB 0x00006000 +#define ICB2400_OPT3_RATE_8GB 0x00008000 +#define ICB2400_OPT3_RATE_16GB 0x0000A000 #define ICB2400_OPT3_ENA_OOF_XFRDY 0x00000200 #define ICB2400_OPT3_NO_N2N_LOGI 0x00000100 #define ICB2400_OPT3_NO_LOCAL_PLOGI 0x00000080 Modified: head/sys/dev/isp/ispvar.h ============================================================================== --- head/sys/dev/isp/ispvar.h Wed Dec 2 18:27:30 2015 (r291653) +++ head/sys/dev/isp/ispvar.h Wed Dec 2 20:22:50 2015 (r291654) @@ -653,8 +653,8 @@ struct ispsoftc { #define ISP_CFG_NPORT 0x04 /* prefer {N/F}-Port connection */ #define ISP_CFG_NPORT_ONLY 0x08 /* insist on {N/F}-Port connection */ #define ISP_CFG_LPORT_ONLY 0x0c /* insist on {N/F}L-Port connection */ -#define ISP_CFG_ONEGB 0x10 /* force 1GB connection (23XX only) */ -#define ISP_CFG_TWOGB 0x20 /* force 2GB connection (23XX only) */ +#define ISP_CFG_1GB 0x10 /* force 1GB connection (23XX only) */ +#define ISP_CFG_2GB 0x20 /* force 2GB connection (23XX only) */ #define ISP_CFG_NORELOAD 0x80 /* don't download f/w */ #define ISP_CFG_NONVRAM 0x40 /* ignore NVRAM */ #define ISP_CFG_NOFCTAPE 0x100 /* disable FC-Tape */ @@ -662,9 +662,9 @@ struct ispsoftc { #define ISP_CFG_OWNFSZ 0x400 /* override NVRAM frame size */ #define ISP_CFG_OWNLOOPID 0x800 /* override NVRAM loopid */ #define ISP_CFG_OWNEXCTHROTTLE 0x1000 /* override NVRAM execution throttle */ -#define ISP_CFG_FOURGB 0x2000 /* force 4GB connection (24XX only) */ -#define ISP_CFG_EIGHTGB 0x4000 /* force 8GB connection (25XX only) */ -#define ISP_CFG_SIXTEENGB 0x8000 /* force 16GB connection (82XX only) */ +#define ISP_CFG_4GB 0x2000 /* force 4GB connection (24XX only) */ +#define ISP_CFG_8GB 0x4000 /* force 8GB connection (25XX only) */ +#define ISP_CFG_16GB 0x8000 /* force 16GB connection (82XX only) */ /* * For each channel, the outer layers should know what role that channel @@ -764,6 +764,7 @@ struct ispsoftc { #define ISP_HA_FC_2322 0x50 #define ISP_HA_FC_2400 0x60 #define ISP_HA_FC_2500 0x70 +#define ISP_HA_FC_2600 0x80 #define IS_SCSI(isp) (isp->isp_type & ISP_HA_SCSI) #define IS_1020(isp) (isp->isp_type < ISP_HA_SCSI_1240) @@ -789,6 +790,7 @@ struct ispsoftc { #define IS_2322(isp) ((isp)->isp_type == ISP_HA_FC_2322) #define IS_24XX(isp) ((isp)->isp_type >= ISP_HA_FC_2400) #define IS_25XX(isp) ((isp)->isp_type >= ISP_HA_FC_2500) +#define IS_26XX(isp) ((isp)->isp_type >= ISP_HA_FC_2600) /* * DMA related macros From owner-svn-src-all@freebsd.org Wed Dec 2 20:30:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43838A3F568; Wed, 2 Dec 2015 20:30:04 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CBC681568; Wed, 2 Dec 2015 20:30:03 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wmec201 with SMTP id c201so74675695wme.1; Wed, 02 Dec 2015 12:30:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=aE7Qo+zLhoycIy78PmHR07bRE/bTOa5GbTfmc5xBpSk=; b=SsQNEQ9HIJbCWvgmtNg95AopBctGT0h1fKmIlg4pwU1rM3G1tNqCLDrcYVwlKVaVBc 8JLOrsZtnLARboYOjC3VRLl71R6QiVwUf/l3FNgoeumK66yKkACB9p8ToeuvWAk0+9nn e4VVCxQtRnpbAUKZY4KS4I/WRRo4Ww3aD0VCfRkHwbaqzyPYUin41gveSGtt3/WKirIs MePn+BklflKueKQDeEr2vBekv+WYaqBnid9yFyA7i3N/vEhudNE0kZL2UsfeQ13bpp25 ezTmdIEY7xlN2ctbcmAMXrS2XXKDWJ3hx4XEmWTDGFvWVLpHiL2TsLSYTsJM8piH1Tai qmHQ== X-Received: by 10.28.63.204 with SMTP id m195mr7813173wma.11.1449088201353; Wed, 02 Dec 2015 12:30:01 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id dl8sm4332159wjb.29.2015.12.02.12.30.00 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 02 Dec 2015 12:30:00 -0800 (PST) Date: Wed, 2 Dec 2015 21:29:58 +0100 From: Mateusz Guzik To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291481 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <20151202202958.GA30250@dft-labs.eu> References: <201511300924.tAU9OC7o049788@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201511300924.tAU9OC7o049788@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 20:30:04 -0000 On Mon, Nov 30, 2015 at 09:24:12AM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Mon Nov 30 09:24:12 2015 > New Revision: 291481 > URL: https://svnweb.freebsd.org/changeset/base/291481 > > Log: > Add more functions and types to the LinuxKPI. > > MFC after: 1 week > Sponsored by: Mellanox Technologies > > Modified: > head/sys/compat/linuxkpi/common/include/linux/file.h > head/sys/compat/linuxkpi/common/include/linux/workqueue.h > > Modified: head/sys/compat/linuxkpi/common/include/linux/file.h > ============================================================================== > --- head/sys/compat/linuxkpi/common/include/linux/file.h Mon Nov 30 09:13:04 2015 (r291480) > +++ head/sys/compat/linuxkpi/common/include/linux/file.h Mon Nov 30 09:24:12 2015 (r291481) > @@ -2,7 +2,7 @@ > * Copyright (c) 2010 Isilon Systems, Inc. > * Copyright (c) 2010 iX Systems, Inc. > * Copyright (c) 2010 Panasas, Inc. > - * Copyright (c) 2013 Mellanox Technologies, Ltd. > + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -125,6 +125,21 @@ get_unused_fd(void) > return fd; > } > > +static inline int > +get_unused_fd_flags(int flags) > +{ > + struct file *file; > + int error; > + int fd; > + > + error = falloc(curthread, &file, &fd, flags); > + if (error) > + return -error; > + /* drop the extra reference */ > + fdrop(file, curthread); > + return fd; > +} > + This does not look right. AFAIR Linux drivers are not going to install fds into kernel threads. So this would be used for a userspace thread, but then it would completely insecure. Linux model is to reserve a slot in the fd table, obtain a 'file' object and install it as the last step. FreeBSD installs the file right away, but this means an extra reference has to be held in case something else using the table closes the fd. As such, this fdrop can lead to a use-after-free as the file can be freed from this poin. I'm afraid there is no way around patching improted consumers. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Wed Dec 2 20:45:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D870A3F95B; Wed, 2 Dec 2015 20:45:58 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D84B71F7A; Wed, 2 Dec 2015 20:45:57 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9597F1FE023; Wed, 2 Dec 2015 21:45:54 +0100 (CET) Subject: Re: svn commit: r291481 - head/sys/compat/linuxkpi/common/include/linux To: Mateusz Guzik References: <201511300924.tAU9OC7o049788@repo.freebsd.org> <20151202202958.GA30250@dft-labs.eu> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <565F58EF.1030707@selasky.org> Date: Wed, 2 Dec 2015 21:47:43 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151202202958.GA30250@dft-labs.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 20:45:58 -0000 On 12/02/15 21:29, Mateusz Guzik wrote: > On Mon, Nov 30, 2015 at 09:24:12AM +0000, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Mon Nov 30 09:24:12 2015 >> New Revision: 291481 >> URL: https://svnweb.freebsd.org/changeset/base/291481 >> >> Log: >> Add more functions and types to the LinuxKPI. >> >> MFC after: 1 week >> Sponsored by: Mellanox Technologies >> >> Modified: >> head/sys/compat/linuxkpi/common/include/linux/file.h >> head/sys/compat/linuxkpi/common/include/linux/workqueue.h >> >> Modified: head/sys/compat/linuxkpi/common/include/linux/file.h >> ============================================================================== >> --- head/sys/compat/linuxkpi/common/include/linux/file.h Mon Nov 30 09:13:04 2015 (r291480) >> +++ head/sys/compat/linuxkpi/common/include/linux/file.h Mon Nov 30 09:24:12 2015 (r291481) >> @@ -2,7 +2,7 @@ >> * Copyright (c) 2010 Isilon Systems, Inc. >> * Copyright (c) 2010 iX Systems, Inc. >> * Copyright (c) 2010 Panasas, Inc. >> - * Copyright (c) 2013 Mellanox Technologies, Ltd. >> + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. >> * All rights reserved. >> * >> * Redistribution and use in source and binary forms, with or without >> @@ -125,6 +125,21 @@ get_unused_fd(void) >> return fd; >> } >> >> +static inline int >> +get_unused_fd_flags(int flags) >> +{ >> + struct file *file; >> + int error; >> + int fd; >> + >> + error = falloc(curthread, &file, &fd, flags); >> + if (error) >> + return -error; >> + /* drop the extra reference */ >> + fdrop(file, curthread); >> + return fd; >> +} >> + > > This does not look right. > > AFAIR Linux drivers are not going to install fds into kernel threads. So > this would be used for a userspace thread, but then it would completely > insecure. > > Linux model is to reserve a slot in the fd table, obtain a 'file' object > and install it as the last step. > > FreeBSD installs the file right away, but this means an extra reference > has to be held in case something else using the table closes the fd. > > As such, this fdrop can lead to a use-after-free as the file can be > freed from this poin. > > I'm afraid there is no way around patching improted consumers. > Hi Mateusz, Thanks for your input. Yes, there is a potential race there, but no use-after-free from what I can see, because the LinuxKPI always retrieve the file pointer by the file number using "fget_unlocked()". I'll look into if we can delay the fdrop() until after the fd_install(). --HPS From owner-svn-src-all@freebsd.org Wed Dec 2 20:54:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D28A9A3FB83; Wed, 2 Dec 2015 20:54:22 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A7D41439; Wed, 2 Dec 2015 20:54:22 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by wmec201 with SMTP id c201so75481684wme.1; Wed, 02 Dec 2015 12:54:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=wlHgv7hyBdVHXnL5pV75x8EcZcvCvWCtTyooNo3lfuU=; b=mQ2NfZ88apLrvD3LrCUOLMgqcsFDbZqlmQZp9M4n+sAV43E6/GLGOBSIbTHQetgPci /JLus8vz4WYOm7eu+NgnSJZLRaApPDEXL9aeki3H9gE0noC5K4k4SLIZ6ST2QyvMqWEX aYod46sK2TrI8Cr9azby67agv6myxwkFnSFckB4iKtkVKr+1y30iQ6lCFvbMWhcpXpDV 9CNsuc23c+hHgedsFJrGMAHSngBAgiwbFtTMPC8rtTPuh73ibYRDWjlPinxb2heRD8qq rcvzsTeMAQWQ4wAQPXOaz4AoWvMwNeGI6RIvlvsAs4WzpbOnW83uGZR2q+T+YFWmAckE MsrQ== X-Received: by 10.28.105.23 with SMTP id e23mr48476537wmc.80.1449089660985; Wed, 02 Dec 2015 12:54:20 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id a63sm32514961wmc.5.2015.12.02.12.54.19 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 02 Dec 2015 12:54:19 -0800 (PST) Date: Wed, 2 Dec 2015 21:54:18 +0100 From: Mateusz Guzik To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291481 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <20151202205417.GC30250@dft-labs.eu> References: <201511300924.tAU9OC7o049788@repo.freebsd.org> <20151202202958.GA30250@dft-labs.eu> <565F58EF.1030707@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <565F58EF.1030707@selasky.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 20:54:22 -0000 On Wed, Dec 02, 2015 at 09:47:43PM +0100, Hans Petter Selasky wrote: > On 12/02/15 21:29, Mateusz Guzik wrote: > >On Mon, Nov 30, 2015 at 09:24:12AM +0000, Hans Petter Selasky wrote: > >>Author: hselasky > >>Date: Mon Nov 30 09:24:12 2015 > >>New Revision: 291481 > >>URL: https://svnweb.freebsd.org/changeset/base/291481 > >> > >>Log: > >> Add more functions and types to the LinuxKPI. > >> > >> MFC after: 1 week > >> Sponsored by: Mellanox Technologies > >> > >>Modified: > >> head/sys/compat/linuxkpi/common/include/linux/file.h > >> head/sys/compat/linuxkpi/common/include/linux/workqueue.h > >> > >>Modified: head/sys/compat/linuxkpi/common/include/linux/file.h > >>============================================================================== > >>--- head/sys/compat/linuxkpi/common/include/linux/file.h Mon Nov 30 09:13:04 2015 (r291480) > >>+++ head/sys/compat/linuxkpi/common/include/linux/file.h Mon Nov 30 09:24:12 2015 (r291481) > >>@@ -2,7 +2,7 @@ > >> * Copyright (c) 2010 Isilon Systems, Inc. > >> * Copyright (c) 2010 iX Systems, Inc. > >> * Copyright (c) 2010 Panasas, Inc. > >>- * Copyright (c) 2013 Mellanox Technologies, Ltd. > >>+ * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. > >> * All rights reserved. > >> * > >> * Redistribution and use in source and binary forms, with or without > >>@@ -125,6 +125,21 @@ get_unused_fd(void) > >> return fd; > >> } > >> > >>+static inline int > >>+get_unused_fd_flags(int flags) > >>+{ > >>+ struct file *file; > >>+ int error; > >>+ int fd; > >>+ > >>+ error = falloc(curthread, &file, &fd, flags); > >>+ if (error) > >>+ return -error; > >>+ /* drop the extra reference */ > >>+ fdrop(file, curthread); > >>+ return fd; > >>+} > >>+ > > > >This does not look right. > > > >AFAIR Linux drivers are not going to install fds into kernel threads. So > >this would be used for a userspace thread, but then it would completely > >insecure. > > > >Linux model is to reserve a slot in the fd table, obtain a 'file' object > >and install it as the last step. > > > >FreeBSD installs the file right away, but this means an extra reference > >has to be held in case something else using the table closes the fd. > > > >As such, this fdrop can lead to a use-after-free as the file can be > >freed from this poin. > > > >I'm afraid there is no way around patching improted consumers. > > > > Hi Mateusz, > > Thanks for your input. Yes, there is a potential race there, but no > use-after-free from what I can see, because the LinuxKPI always > retrieve the file pointer by the file number using "fget_unlocked()". > > I'll look into if we can delay the fdrop() until after the fd_install(). > I grepped an example consumer: > ssize_t ib_uverbs_create_comp_channel(struct ib_uverbs_file *file, > struct ib_device *ib_dev, > const char __user *buf, int in_len, > int out_len) > { > struct ib_uverbs_create_comp_channel cmd; > struct ib_uverbs_create_comp_channel_resp resp; > struct file *filp; > int ret; > > if (out_len < sizeof resp) > return -ENOSPC; > > if (copy_from_user(&cmd, buf, sizeof cmd)) > return -EFAULT; > > ret = get_unused_fd_flags(O_CLOEXEC); > if (ret < 0) > return ret; > resp.fd = ret; > So this is supposed to get the slot. > filp = ib_uverbs_alloc_event_file(file, ib_dev, 0); file object is allocated separately. > if (IS_ERR(filp)) { > put_unused_fd(resp.fd); > return PTR_ERR(filp); > } > > if (copy_to_user((void __user *) (unsigned long) cmd.response, > &resp, sizeof resp)) { > put_unused_fd(resp.fd); > fput(filp); > return -EFAULT; > } > > fd_install(resp.fd, filp); And here is the install. > return in_len; > } If you drop, and have some magic to grab the file obtained from get_unused_fd_flags, the file object is unsafe to use. In general, I don't see how you can get around having to edit such functions. If they get edited, you can just use the FreeBSD scheme. Fortunately as far as error handling goes, it behaves the same way. -- Mateusz Guzik From owner-svn-src-all@freebsd.org Wed Dec 2 21:13:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B579AA3FF3E; Wed, 2 Dec 2015 21:13:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59E521F82; Wed, 2 Dec 2015 21:13:53 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id C605B1FE023; Wed, 2 Dec 2015 22:13:44 +0100 (CET) Subject: Re: svn commit: r291481 - head/sys/compat/linuxkpi/common/include/linux To: Mateusz Guzik References: <201511300924.tAU9OC7o049788@repo.freebsd.org> <20151202202958.GA30250@dft-labs.eu> <565F58EF.1030707@selasky.org> <20151202205417.GC30250@dft-labs.eu> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <565F5F75.20806@selasky.org> Date: Wed, 2 Dec 2015 22:15:33 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151202205417.GC30250@dft-labs.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 21:13:54 -0000 On 12/02/15 21:54, Mateusz Guzik wrote: > On Wed, Dec 02, 2015 at 09:47:43PM +0100, Hans Petter Selasky wrote: >> On 12/02/15 21:29, Mateusz Guzik wrote: >>> On Mon, Nov 30, 2015 at 09:24:12AM +0000, Hans Petter Selasky wrote: >>>> Author: hselasky >>>> Date: Mon Nov 30 09:24:12 2015 >>>> New Revision: 291481 >>>> URL: https://svnweb.freebsd.org/changeset/base/291481 >>>> >>>> Log: >>>> Add more functions and types to the LinuxKPI. >>>> >>>> MFC after: 1 week >>>> Sponsored by: Mellanox Technologies >>>> >>>> Modified: >>>> head/sys/compat/linuxkpi/common/include/linux/file.h >>>> head/sys/compat/linuxkpi/common/include/linux/workqueue.h >>>> >>>> Modified: head/sys/compat/linuxkpi/common/include/linux/file.h >>>> ============================================================================== >>>> --- head/sys/compat/linuxkpi/common/include/linux/file.h Mon Nov 30 09:13:04 2015 (r291480) >>>> +++ head/sys/compat/linuxkpi/common/include/linux/file.h Mon Nov 30 09:24:12 2015 (r291481) >>>> @@ -2,7 +2,7 @@ >>>> * Copyright (c) 2010 Isilon Systems, Inc. >>>> * Copyright (c) 2010 iX Systems, Inc. >>>> * Copyright (c) 2010 Panasas, Inc. >>>> - * Copyright (c) 2013 Mellanox Technologies, Ltd. >>>> + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. >>>> * All rights reserved. >>>> * >>>> * Redistribution and use in source and binary forms, with or without >>>> @@ -125,6 +125,21 @@ get_unused_fd(void) >>>> return fd; >>>> } >>>> >>>> +static inline int >>>> +get_unused_fd_flags(int flags) >>>> +{ >>>> + struct file *file; >>>> + int error; >>>> + int fd; >>>> + >>>> + error = falloc(curthread, &file, &fd, flags); >>>> + if (error) >>>> + return -error; >>>> + /* drop the extra reference */ >>>> + fdrop(file, curthread); >>>> + return fd; >>>> +} >>>> + >>> >>> This does not look right. >>> >>> AFAIR Linux drivers are not going to install fds into kernel threads. So >>> this would be used for a userspace thread, but then it would completely >>> insecure. >>> >>> Linux model is to reserve a slot in the fd table, obtain a 'file' object >>> and install it as the last step. >>> >>> FreeBSD installs the file right away, but this means an extra reference >>> has to be held in case something else using the table closes the fd. >>> >>> As such, this fdrop can lead to a use-after-free as the file can be >>> freed from this poin. >>> >>> I'm afraid there is no way around patching improted consumers. >>> >> >> Hi Mateusz, >> >> Thanks for your input. Yes, there is a potential race there, but no >> use-after-free from what I can see, because the LinuxKPI always >> retrieve the file pointer by the file number using "fget_unlocked()". >> >> I'll look into if we can delay the fdrop() until after the fd_install(). >> > > I grepped an example consumer: > >> ssize_t ib_uverbs_create_comp_channel(struct ib_uverbs_file *file, >> struct ib_device *ib_dev, >> const char __user *buf, int in_len, >> int out_len) >> { >> struct ib_uverbs_create_comp_channel cmd; >> struct ib_uverbs_create_comp_channel_resp resp; >> struct file *filp; >> int ret; >> >> if (out_len < sizeof resp) >> return -ENOSPC; >> >> if (copy_from_user(&cmd, buf, sizeof cmd)) >> return -EFAULT; >> >> ret = get_unused_fd_flags(O_CLOEXEC); >> if (ret < 0) >> return ret; >> resp.fd = ret; >> > > So this is supposed to get the slot. > >> filp = ib_uverbs_alloc_event_file(file, ib_dev, 0); > > file object is allocated separately. > >> if (IS_ERR(filp)) { >> put_unused_fd(resp.fd); >> return PTR_ERR(filp); >> } >> >> if (copy_to_user((void __user *) (unsigned long) cmd.response, >> &resp, sizeof resp)) { >> put_unused_fd(resp.fd); >> fput(filp); >> return -EFAULT; >> } >> >> fd_install(resp.fd, filp); > > And here is the install. > >> return in_len; >> } > > If you drop, and have some magic to grab the file obtained from > get_unused_fd_flags, the file object is unsafe to use. > > In general, I don't see how you can get around having to edit such > functions. If they get edited, you can just use the FreeBSD scheme. > > Fortunately as far as error handling goes, it behaves the same way. > Hi, I've made a patch here: https://reviews.freebsd.org/D4351 Does it make sense? --HPS From owner-svn-src-all@freebsd.org Wed Dec 2 21:48:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31AECA3F754; Wed, 2 Dec 2015 21:48:36 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA4471249; Wed, 2 Dec 2015 21:48:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2LmYrR033824; Wed, 2 Dec 2015 21:48:34 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2LmYIE033822; Wed, 2 Dec 2015 21:48:34 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201512022148.tB2LmYIE033822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 2 Dec 2015 21:48:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291655 - stable/10/sys/netsmb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 21:48:36 -0000 Author: rmacklem Date: Wed Dec 2 21:48:34 2015 New Revision: 291655 URL: https://svnweb.freebsd.org/changeset/base/291655 Log: MFC: r291035 The problem report was for a crash that happened when smbfs was trying to do a mount. Given the backtrace, it appears that the crash occurred when smb_vc_create() failed and then called smb_vc_put() with vcp->vc_iod == NULL. smb_vc_put() subsequently called smb_vc_disconnect() with vcp->vc_iod == NULL, causing the crash. This patch adds a check for vcp->vc_iod != NULL in smb_vc_disconnect() to avoid the crash. It also fixes the case in smb_vc_create() where kproc_create() fails so that it destroys the mutexes and sets vcp->vc_iod == NULL before free()'ing the iod structure. Modified: stable/10/sys/netsmb/smb_conn.c stable/10/sys/netsmb/smb_iod.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netsmb/smb_conn.c ============================================================================== --- stable/10/sys/netsmb/smb_conn.c Wed Dec 2 20:22:50 2015 (r291654) +++ stable/10/sys/netsmb/smb_conn.c Wed Dec 2 21:48:34 2015 (r291655) @@ -683,7 +683,9 @@ int smb_vc_disconnect(struct smb_vc *vcp) { - smb_iod_request(vcp->vc_iod, SMBIOD_EV_DISCONNECT | SMBIOD_EV_SYNC, NULL); + if (vcp->vc_iod != NULL) + smb_iod_request(vcp->vc_iod, SMBIOD_EV_DISCONNECT | + SMBIOD_EV_SYNC, NULL); return 0; } Modified: stable/10/sys/netsmb/smb_iod.c ============================================================================== --- stable/10/sys/netsmb/smb_iod.c Wed Dec 2 20:22:50 2015 (r291654) +++ stable/10/sys/netsmb/smb_iod.c Wed Dec 2 21:48:34 2015 (r291655) @@ -690,6 +690,9 @@ smb_iod_create(struct smb_vc *vcp) RFNOWAIT, 0, "smbiod%d", iod->iod_id); if (error) { SMBERROR("can't start smbiod: %d", error); + vcp->vc_iod = NULL; + smb_sl_destroy(&iod->iod_rqlock); + smb_sl_destroy(&iod->iod_evlock); free(iod, M_SMBIOD); return error; } From owner-svn-src-all@freebsd.org Wed Dec 2 21:56:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 638AEA3F94D; Wed, 2 Dec 2015 21:56:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 180D01A1A; Wed, 2 Dec 2015 21:56:03 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2Lu2Nb036650; Wed, 2 Dec 2015 21:56:02 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2Lu2L6036648; Wed, 2 Dec 2015 21:56:02 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201512022156.tB2Lu2L6036648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 2 Dec 2015 21:56:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291656 - stable/9/sys/netsmb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 21:56:03 -0000 Author: rmacklem Date: Wed Dec 2 21:56:01 2015 New Revision: 291656 URL: https://svnweb.freebsd.org/changeset/base/291656 Log: MFC: r291035 The problem report was for a crash that happened when smbfs was trying to do a mount. Given the backtrace, it appears that the crash occurred when smb_vc_create() failed and then called smb_vc_put() with vcp->vc_iod == NULL. smb_vc_put() subsequently called smb_vc_disconnect() with vcp->vc_iod == NULL, causing the crash. This patch adds a check for vcp->vc_iod != NULL in smb_vc_disconnect() to avoid the crash. It also fixes the case in smb_vc_create() where kproc_create() fails so that it destroys the mutexes and sets vcp->vc_iod == NULL before free()'ing the iod structure. Modified: stable/9/sys/netsmb/smb_conn.c stable/9/sys/netsmb/smb_iod.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netsmb/smb_conn.c ============================================================================== --- stable/9/sys/netsmb/smb_conn.c Wed Dec 2 21:48:34 2015 (r291655) +++ stable/9/sys/netsmb/smb_conn.c Wed Dec 2 21:56:01 2015 (r291656) @@ -654,7 +654,9 @@ int smb_vc_disconnect(struct smb_vc *vcp) { - smb_iod_request(vcp->vc_iod, SMBIOD_EV_DISCONNECT | SMBIOD_EV_SYNC, NULL); + if (vcp->vc_iod != NULL) + smb_iod_request(vcp->vc_iod, SMBIOD_EV_DISCONNECT | + SMBIOD_EV_SYNC, NULL); return 0; } Modified: stable/9/sys/netsmb/smb_iod.c ============================================================================== --- stable/9/sys/netsmb/smb_iod.c Wed Dec 2 21:48:34 2015 (r291655) +++ stable/9/sys/netsmb/smb_iod.c Wed Dec 2 21:56:01 2015 (r291656) @@ -690,6 +690,9 @@ smb_iod_create(struct smb_vc *vcp) RFNOWAIT, 0, "smbiod%d", iod->iod_id); if (error) { SMBERROR("can't start smbiod: %d", error); + vcp->vc_iod = NULL; + smb_sl_destroy(&iod->iod_rqlock); + smb_sl_destroy(&iod->iod_evlock); free(iod, M_SMBIOD); return error; } From owner-svn-src-all@freebsd.org Wed Dec 2 22:00:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F0A7A3FAC2; Wed, 2 Dec 2015 22:00:03 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 018521D7A; Wed, 2 Dec 2015 22:00:03 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wmvv187 with SMTP id v187so276403648wmv.1; Wed, 02 Dec 2015 14:00:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=0Afh+trTDzdA4O1sBFLTWcx9Bb0Bm2TAsW3C+H73XEE=; b=STESocOSCi+Zm5Yv0SCmnmRJ+7ZxGOZPlJjXaENj4WD0bYqc7wM4zFUHIHfHRP6Q/Y cYD3Y5Nk2B3QIdqBYgyqfQonME3PXCMda6IdfAnjSLp5gu08YL3Dd6aU2nN5FzRaHXmx iFCjltsdsb2KSiiHBMytXAnSild792Najymn/48VAJIaPTdt0scfEo2iMUgYo2bNVkiP q4wcOzq4apkVLcwciBNgMdrIkelpICzgfhh1qvnYDFzih8peaJwInsev7YyGjPSnp3Xm 6USkoTCm2nqCWPMbbniZldwKkjYgX7ATo9Vbj4iPaO7u/hPhSqFi7Zofs40xmtVjgyYN SiOA== X-Received: by 10.28.158.75 with SMTP id h72mr8404705wme.74.1449093601564; Wed, 02 Dec 2015 14:00:01 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id l128sm32482524wmf.10.2015.12.02.14.00.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Dec 2015 14:00:00 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 2 Dec 2015 22:59:58 +0100 From: Baptiste Daroussin To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r287084 - in stable/10/usr.sbin/pw: . tests Message-ID: <20151202215958.GD20169@ivaldir.etoilebsd.net> References: <201508232142.t7NLgSXX033227@repo.freebsd.org> <867fkxcbq9.fsf@desk.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eheScQNz3K90DVRs" Content-Disposition: inline In-Reply-To: <867fkxcbq9.fsf@desk.des.no> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 22:00:03 -0000 --eheScQNz3K90DVRs Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 02, 2015 at 12:48:46PM +0100, Dag-Erling Sm=F8rgrav wrote: > Baptiste Daroussin writes: > > Log: > > MFC: r285133,r285136,r285137,r285156,r285157,r285158,r285256,r285318,= r285395, > > r285396,r285398,r285401,r285403,r285405,r285406,r285408,r285409,r2854= 11, > > r285412,r285413,r285415,r285418,r285430,r285433,r285434,r285442,r2859= 48, > > r285984,r285985,r285989,r285996,r285997,r286045,r286047,r286066,r2861= 50, > > r286151,r286152,r286154,r286155,r286156,r286157,r286173,r286196,r2861= 97, > > r286198,r286199,r286200,r286201,r286202,r286203,r286204,r286210,r2862= 11, > > r286217,r286218,r286258,r286259,r286341,r286775,r286982,r286986,r2869= 91, > > r286993 > > =20 > > Validate most pw inputs. >=20 > This is a serious regression as the validation code is not locale-aware. > I would like to see it reverted and an EN issued. Fixing it correctly > will be a major undertaking since it would needs to support multibyte > locales. In the meantime, I will have to replace pw on my 10.2 systems > with the 10.1 binary. Or a fix can be made, if you provide an example of the failing case, I woul= d be able to fix it and add it to the regression tests. Bapt --eheScQNz3K90DVRs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlZfad4ACgkQ8kTtMUmk6Ew7HACZASh0SzQaIL5BaCS1wzhk8Ht3 +SQAnRb91DnXqU32LTV0LbK3h3eSWwCi =azVL -----END PGP SIGNATURE----- --eheScQNz3K90DVRs-- From owner-svn-src-all@freebsd.org Wed Dec 2 22:01:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA741A3FC49; Wed, 2 Dec 2015 22:01:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E45B105E; Wed, 2 Dec 2015 22:01:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2M1bBw039449; Wed, 2 Dec 2015 22:01:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2M1bPI039447; Wed, 2 Dec 2015 22:01:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201512022201.tB2M1bPI039447@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 2 Dec 2015 22:01:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291657 - in head/usr.sbin/pw: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 22:01:38 -0000 Author: bapt Date: Wed Dec 2 22:01:37 2015 New Revision: 291657 URL: https://svnweb.freebsd.org/changeset/base/291657 Log: Fix handling of numeric-only names with pw lock Add a regression test about it PR: 204968 MFC after: 1 week Modified: head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/tests/pw_lock.sh Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Wed Dec 2 21:56:01 2015 (r291656) +++ head/usr.sbin/pw/pw_user.c Wed Dec 2 22:01:37 2015 (r291657) @@ -274,7 +274,7 @@ pw_userlock(char *arg1, int mode) char *passtmp = NULL; char *name; bool locked = false; - uid_t id; + uid_t id = (uid_t)-1; if (geteuid() != 0) errx(EX_NOPERM, "you must be root"); @@ -282,16 +282,19 @@ pw_userlock(char *arg1, int mode) if (arg1 == NULL) errx(EX_DATAERR, "username or id required"); - if (arg1[strspn(arg1, "0123456789")] == '\0') { - id = pw_checkid(arg1, UID_MAX); - name = NULL; - } else - name = arg1; - - pwd = (name != NULL) ? GETPWNAM(pw_checkname(name, 0)) : GETPWUID(id); + name = arg1; + if (arg1[strspn(name, "0123456789")] == '\0') + id = pw_checkid(name, UID_MAX); + + pwd = GETPWNAM(pw_checkname(name, 0)); + if (pwd == NULL && id != (uid_t)-1) { + pwd = GETPWUID(id); + if (pwd != NULL) + name = pwd->pw_name; + } if (pwd == NULL) { - if (name == NULL) - errx(EX_NOUSER, "no such uid `%ju'", (uintmax_t) id); + if (id == (uid_t)-1) + errx(EX_NOUSER, "no such name or uid `%ju'", (uintmax_t) id); errx(EX_NOUSER, "no such user `%s'", name); } Modified: head/usr.sbin/pw/tests/pw_lock.sh ============================================================================== --- head/usr.sbin/pw/tests/pw_lock.sh Wed Dec 2 21:56:01 2015 (r291656) +++ head/usr.sbin/pw/tests/pw_lock.sh Wed Dec 2 22:01:37 2015 (r291657) @@ -16,7 +16,27 @@ user_locking_body() { grep "^test:\*:1001:" $HOME/master.passwd } +atf_test_case numeric_locking cleanup +numeric_locking_body() { + populate_etc_skel + ${PW} useradd test || atf_fail "Creating test user" + ${PW} lock 1001 || atf_fail "Locking the user" + atf_check -s exit:0 -o match:"^test:\*LOCKED\*\*:1001:" \ + grep "^test:\*LOCKED\*\*:1001:" $HOME/master.passwd + ${PW} unlock 1001 || atf_fail "Unlocking the user" + atf_check -s exit:0 -o match:"^test:\*:1001:" \ + grep "^test:\*:1001:" $HOME/master.passwd + # Now numeric names + ${PW} useradd -n 1001 || atf_fail "Creating test user" + ${PW} lock 1001 || atf_fail "Locking the user" + atf_check -s exit:0 -o match:"^1001:\*LOCKED\*\*:1002:" \ + grep "^1001:\*LOCKED\*\*:1002:" $HOME/master.passwd + ${PW} unlock 1001 || atf_fail "Unlocking the user" + atf_check -s exit:0 -o match:"^1001:\*:1002:" \ + grep "^1001:\*:1002:" $HOME/master.passwd +} atf_init_test_cases() { atf_add_test_case user_locking + atf_add_test_case numeric_locking } From owner-svn-src-all@freebsd.org Wed Dec 2 22:35:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5489AA3F44C; Wed, 2 Dec 2015 22:35:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2154F1A89; Wed, 2 Dec 2015 22:35:26 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2MZPRU048434; Wed, 2 Dec 2015 22:35:25 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2MZPLM048433; Wed, 2 Dec 2015 22:35:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201512022235.tB2MZPLM048433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 2 Dec 2015 22:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291658 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 22:35:26 -0000 Author: bapt Date: Wed Dec 2 22:35:25 2015 New Revision: 291658 URL: https://svnweb.freebsd.org/changeset/base/291658 Log: pw_checkname since the beginning if too strict on GECOS field, relax it a bit so gecos can be used to store multibytes data. This was unseen before FreeBSD 10.2 as this validation function was motly unused since FreeBSD 10.2 the usage of this function has been generalized to improve validation. Reported by: des MFC after: 1 week Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Wed Dec 2 22:01:37 2015 (r291657) +++ head/usr.sbin/pw/pw_user.c Wed Dec 2 22:35:25 2015 (r291658) @@ -642,7 +642,8 @@ pw_checkname(char *name, int gecos) } if (!reject) { while (*ch) { - if (strchr(badchars, *ch) != NULL || *ch < ' ' || + if (strchr(badchars, *ch) != NULL || + (!gecos && *ch < ' ') || *ch == 127) { reject = 1; break; From owner-svn-src-all@freebsd.org Wed Dec 2 22:37:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DB658A3F5AE; Wed, 2 Dec 2015 22:37:48 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 806ED1EBB; Wed, 2 Dec 2015 22:37:48 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wmec201 with SMTP id c201so974338wme.0; Wed, 02 Dec 2015 14:37:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=zhLDrXi74ry04n8Ag51bemRZdS2QHRmk38DLsHkhpY0=; b=B/mTWbw1QAzsJbJQpZ8b+e7CayR8opb7pDYGLagyJPQ+jE3iCLZAl0ZNc4hnQ/Boms dB0nEqgv3OUkocy/SDI5UtYFK8SvABsDEAu+qyvzI3h+pgYMyrjFacfmE32Mx46iqFSC 0lpzidcMRAJB62iA5SoQ0ePteEpFWPk6fBl0FQUuj357QZZ4Mcx/OsvpJrp9wzNR0pJh RkyyQa0oG7A91XsnikL0vUIskA+LdmZ6629TUPbQMdcquJfFe9L3sFfHq8UFO6bPr3Y7 4nW1Ez5dLRUctiQ8cyYlEuNWt+veasZoD5kSJ3c0o1P9+nhZKvS9O0jknSWeUKjqHpu+ CuSQ== X-Received: by 10.28.8.15 with SMTP id 15mr48510803wmi.50.1449095866624; Wed, 02 Dec 2015 14:37:46 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id u134sm32869029wmd.0.2015.12.02.14.37.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Dec 2015 14:37:45 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 2 Dec 2015 23:37:43 +0100 From: Baptiste Daroussin To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r287084 - in stable/10/usr.sbin/pw: . tests Message-ID: <20151202223743.GE20169@ivaldir.etoilebsd.net> References: <201508232142.t7NLgSXX033227@repo.freebsd.org> <867fkxcbq9.fsf@desk.des.no> <20151202215958.GD20169@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tMbDGjvJuJijemkf" Content-Disposition: inline In-Reply-To: <20151202215958.GD20169@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 22:37:49 -0000 --tMbDGjvJuJijemkf Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 02, 2015 at 10:59:58PM +0100, Baptiste Daroussin wrote: > On Wed, Dec 02, 2015 at 12:48:46PM +0100, Dag-Erling Sm=F8rgrav wrote: > > Baptiste Daroussin writes: > > > Log: > > > MFC: r285133,r285136,r285137,r285156,r285157,r285158,r285256,r28531= 8,r285395, > > > r285396,r285398,r285401,r285403,r285405,r285406,r285408,r285409,r28= 5411, > > > r285412,r285413,r285415,r285418,r285430,r285433,r285434,r285442,r28= 5948, > > > r285984,r285985,r285989,r285996,r285997,r286045,r286047,r286066,r28= 6150, > > > r286151,r286152,r286154,r286155,r286156,r286157,r286173,r286196,r28= 6197, > > > r286198,r286199,r286200,r286201,r286202,r286203,r286204,r286210,r28= 6211, > > > r286217,r286218,r286258,r286259,r286341,r286775,r286982,r286986,r28= 6991, > > > r286993 > > > =20 > > > Validate most pw inputs. > >=20 > > This is a serious regression as the validation code is not locale-aware. > > I would like to see it reverted and an EN issued. Fixing it correctly > > will be a major undertaking since it would needs to support multibyte > > locales. In the meantime, I will have to replace pw on my 10.2 systems > > with the 10.1 binary. >=20 > Or a fix can be made, if you provide an example of the failing case, I wo= uld be > able to fix it and add it to the regression tests. >=20 > Bapt If that is what you were speaking about, it is fixed. https://svnweb.freebsd.org/base?view=3Drevision&revision=3D291658 Best regards, Bapt --tMbDGjvJuJijemkf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlZfcrcACgkQ8kTtMUmk6Ex+pACfb+RciUJgii7U5/8xMaZA9GQo IpAAnihYRbJ2puJHX0tpaHA5r+Zk7n4I =PKDz -----END PGP SIGNATURE----- --tMbDGjvJuJijemkf-- From owner-svn-src-all@freebsd.org Wed Dec 2 22:44:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD640A3F8A0; Wed, 2 Dec 2015 22:44:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 966EB1483; Wed, 2 Dec 2015 22:44:43 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB2Migno051643; Wed, 2 Dec 2015 22:44:42 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB2MigW2051642; Wed, 2 Dec 2015 22:44:42 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201512022244.tB2MigW2051642@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 2 Dec 2015 22:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291659 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 22:44:43 -0000 Author: tuexen Date: Wed Dec 2 22:44:42 2015 New Revision: 291659 URL: https://svnweb.freebsd.org/changeset/base/291659 Log: Minor cleanup. No functional change. MFC after: 1 week Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Wed Dec 2 22:35:25 2015 (r291658) +++ head/sys/netinet/sctp_output.c Wed Dec 2 22:44:42 2015 (r291659) @@ -12053,7 +12053,7 @@ sctp_send_str_reset_req(struct sctp_tcb oldstream = stcb->asoc.strmout; /* get some more */ SCTP_MALLOC(stcb->asoc.strmout, struct sctp_stream_out *, - ((stcb->asoc.streamoutcnt + adding_o) * sizeof(struct sctp_stream_out)), + (stcb->asoc.streamoutcnt + adding_o) * sizeof(struct sctp_stream_out), SCTP_M_STRMO); if (stcb->asoc.strmout == NULL) { uint8_t x; From owner-svn-src-all@freebsd.org Thu Dec 3 00:02:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9DF1A3F9BC; Thu, 3 Dec 2015 00:02:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D53810D2; Thu, 3 Dec 2015 00:02:02 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3021NP074690; Thu, 3 Dec 2015 00:02:01 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3021H0074684; Thu, 3 Dec 2015 00:02:01 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201512030002.tB3021H0074684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 3 Dec 2015 00:02:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291665 - in head: share/man/man4 sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/iw_cxgbe sys/dev/cxgbe/tom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 00:02:02 -0000 Author: jhb Date: Thu Dec 3 00:02:01 2015 New Revision: 291665 URL: https://svnweb.freebsd.org/changeset/base/291665 Log: Add support for configuring additional virtual interfaces (VIs) on a port. Each virtual interface has its own MAC address, queues, and statistics. The dedicated netmap interfaces (ncxgbeX / ncxlX) were already implemented as additional VIs on each port. This change allows additional non-netmap interfaces to be configured on each port. Additional virtual interfaces use the naming scheme vcxgbeX or vcxlX. Additional VIs are enabled by setting the hw.cxgbe.num_vis tunable to a value greater than 1 before loading the cxgbe(4) or cxl(4) driver. NB: The first VI on each port is the "main" interface (cxgbeX or cxlX). T4/T5 NICs provide a limited number of MAC addresses for each physical port. As a result, a maximum of six VIs can be configured on each port (including the "main" interface and the netmap interface when netmap is enabled). One user-visible result is that when netmap is enabled, packets received or transmitted via the netmap interface are no longer counted in the stats for the "main" interface, but are not accounted to the netmap interface. The netmap interfaces now also have a new-bus device and export various information sysctl nodes via dev.n(cxgbe|cxl).X. The cxgbetool 'clearstats' command clears the stats for all VIs on the specified port along with the port's stats. There is currently no way to clear the stats of an individual VI. Reviewed by: np MFC after: 1 month Sponsored by: Chelsio Modified: head/share/man/man4/cxgbe.4 head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/common/t4_hw.c head/sys/dev/cxgbe/iw_cxgbe/provider.c head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_netmap.c head/sys/dev/cxgbe/t4_sge.c head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_cpl_io.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tom.c head/sys/dev/cxgbe/tom/t4_tom.h Modified: head/share/man/man4/cxgbe.4 ============================================================================== --- head/share/man/man4/cxgbe.4 Wed Dec 2 23:54:59 2015 (r291664) +++ head/share/man/man4/cxgbe.4 Thu Dec 3 00:02:01 2015 (r291665) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2014 +.Dd December 2, 2015 .Dt CXGBE 4 .Os .Sh NAME @@ -170,6 +170,16 @@ number of CPU cores in the system, which .It Va hw.cxgbe.nofldrxq1g The number of TOE rx queues to use for a 1Gb port. The default is 1. +.It Va hw.cxgbe.num_vis +The number of virtual interfaces (VIs) created for each port. +Each virtual interface creates a separate network interface. +The first virtual interface on each port is required and represents +the primary network interface on the port. +Additional virtual interfaces on a port are named vcxgbe (T4) or +vcxl (T5) and only use a single rx and tx queue. +Additional virtual interfaces use a single pair of queues +for rx and tx as well an additional pair of queues for TOE rx and tx. +The default is 1. .It Va hw.cxgbe.holdoff_timer_idx_10G .It Va hw.cxgbe.holdoff_timer_idx_1G The timer index value to use to delay interrupts. Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Wed Dec 2 23:54:59 2015 (r291664) +++ head/sys/dev/cxgbe/adapter.h Thu Dec 3 00:02:01 2015 (r291665) @@ -198,34 +198,34 @@ enum { CXGBE_BUSY = (1 << 9), /* port flags */ - DOOMED = (1 << 0), - PORT_INIT_DONE = (1 << 1), - PORT_SYSCTL_CTX = (1 << 2), HAS_TRACEQ = (1 << 3), + + /* VI flags */ + DOOMED = (1 << 0), + VI_INIT_DONE = (1 << 1), + VI_SYSCTL_CTX = (1 << 2), INTR_RXQ = (1 << 4), /* All NIC rxq's take interrupts */ INTR_OFLD_RXQ = (1 << 5), /* All TOE rxq's take interrupts */ - INTR_NM_RXQ = (1 << 6), /* All netmap rxq's take interrupts */ - INTR_ALL = (INTR_RXQ | INTR_OFLD_RXQ | INTR_NM_RXQ), + INTR_ALL = (INTR_RXQ | INTR_OFLD_RXQ), + VI_NETMAP = (1 << 6), /* adapter debug_flags */ DF_DUMP_MBOX = (1 << 0), }; -#define IS_DOOMED(pi) ((pi)->flags & DOOMED) -#define SET_DOOMED(pi) do {(pi)->flags |= DOOMED;} while (0) +#define IS_DOOMED(vi) ((vi)->flags & DOOMED) +#define SET_DOOMED(vi) do {(vi)->flags |= DOOMED;} while (0) #define IS_BUSY(sc) ((sc)->flags & CXGBE_BUSY) #define SET_BUSY(sc) do {(sc)->flags |= CXGBE_BUSY;} while (0) #define CLR_BUSY(sc) do {(sc)->flags &= ~CXGBE_BUSY;} while (0) -struct port_info { +struct vi_info { device_t dev; - struct adapter *adapter; + struct port_info *pi; struct ifnet *ifp; struct ifmedia media; - struct mtx pi_lock; - char lockname[16]; unsigned long flags; int if_flags; @@ -234,13 +234,11 @@ struct port_info { int16_t xact_addr_filt;/* index of exact MAC address filter */ uint16_t rss_size; /* size of VI's RSS table slice */ uint16_t rss_base; /* start of VI's RSS table slice */ - uint8_t lport; /* associated offload logical port */ - int8_t mdio_addr; - uint8_t port_type; - uint8_t mod_type; - uint8_t port_id; - uint8_t tx_chan; - uint8_t rx_chan_map; /* rx MPS channel bitmap */ + + eventhandler_tag vlan_c; + + int nintr; + int first_intr; /* These need to be int as they are used in sysctl */ int ntxq; /* # of tx queues */ @@ -254,24 +252,41 @@ struct port_info { int nofldrxq; /* # of offload rx queues */ int first_ofld_rxq; /* index of first offload rx queue */ #endif -#ifdef DEV_NETMAP - int nnmtxq; /* # of netmap tx queues */ - int first_nm_txq; /* index of first netmap tx queue */ - int nnmrxq; /* # of netmap rx queues */ - int first_nm_rxq; /* index of first netmap rx queue */ - - struct ifnet *nm_ifp; - struct ifmedia nm_media; - int nmif_flags; - uint16_t nm_viid; - int16_t nm_xact_addr_filt; - uint16_t nm_rss_size; /* size of netmap VI's RSS table slice */ -#endif int tmr_idx; int pktc_idx; int qsize_rxq; int qsize_txq; + struct timeval last_refreshed; + struct fw_vi_stats_vf stats; + + struct callout tick; + struct sysctl_ctx_list ctx; /* from ifconfig up to driver detach */ + + uint8_t hw_addr[ETHER_ADDR_LEN]; /* factory MAC address, won't change */ +}; + +struct port_info { + device_t dev; + struct adapter *adapter; + + struct vi_info *vi; + int nvi; + int up_vis; + int uld_vis; + + struct mtx pi_lock; + char lockname[16]; + unsigned long flags; + + uint8_t lport; /* associated offload logical port */ + int8_t mdio_addr; + uint8_t port_type; + uint8_t mod_type; + uint8_t port_id; + uint8_t tx_chan; + uint8_t rx_chan_map; /* rx MPS channel bitmap */ + int linkdnrc; struct link_config link_cfg; @@ -280,14 +295,11 @@ struct port_info { u_int tnl_cong_drops; u_int tx_parse_error; - eventhandler_tag vlan_c; - struct callout tick; - struct sysctl_ctx_list ctx; /* from ifconfig up to driver detach */ - - uint8_t hw_addr[ETHER_ADDR_LEN]; /* factory MAC address, won't change */ }; +#define IS_MAIN_VI(vi) ((vi) == &((vi)->pi->vi[0])) + /* Where the cluster came from, how it has been carved up. */ struct cluster_layout { int8_t zidx; @@ -603,7 +615,7 @@ struct sge_wrq { #ifdef DEV_NETMAP struct sge_nm_rxq { - struct port_info *pi; + struct vi_info *vi; struct iq_desc *iq_desc; uint16_t iq_abs_id; @@ -760,7 +772,6 @@ struct adapter { struct tid_info tids; uint16_t doorbells; - int open_device_map; #ifdef TCP_OFFLOAD int offload_map; /* ports with IFCAP_TOE enabled */ int active_ulds; /* ULDs activated on this adapter */ @@ -870,24 +881,27 @@ struct adapter { } \ } while (0) -#define for_each_txq(pi, iter, q) \ - for (q = &pi->adapter->sge.txq[pi->first_txq], iter = 0; \ - iter < pi->ntxq; ++iter, ++q) -#define for_each_rxq(pi, iter, q) \ - for (q = &pi->adapter->sge.rxq[pi->first_rxq], iter = 0; \ - iter < pi->nrxq; ++iter, ++q) -#define for_each_ofld_txq(pi, iter, q) \ - for (q = &pi->adapter->sge.ofld_txq[pi->first_ofld_txq], iter = 0; \ - iter < pi->nofldtxq; ++iter, ++q) -#define for_each_ofld_rxq(pi, iter, q) \ - for (q = &pi->adapter->sge.ofld_rxq[pi->first_ofld_rxq], iter = 0; \ - iter < pi->nofldrxq; ++iter, ++q) -#define for_each_nm_txq(pi, iter, q) \ - for (q = &pi->adapter->sge.nm_txq[pi->first_nm_txq], iter = 0; \ - iter < pi->nnmtxq; ++iter, ++q) -#define for_each_nm_rxq(pi, iter, q) \ - for (q = &pi->adapter->sge.nm_rxq[pi->first_nm_rxq], iter = 0; \ - iter < pi->nnmrxq; ++iter, ++q) +#define for_each_txq(vi, iter, q) \ + for (q = &vi->pi->adapter->sge.txq[vi->first_txq], iter = 0; \ + iter < vi->ntxq; ++iter, ++q) +#define for_each_rxq(vi, iter, q) \ + for (q = &vi->pi->adapter->sge.rxq[vi->first_rxq], iter = 0; \ + iter < vi->nrxq; ++iter, ++q) +#define for_each_ofld_txq(vi, iter, q) \ + for (q = &vi->pi->adapter->sge.ofld_txq[vi->first_ofld_txq], iter = 0; \ + iter < vi->nofldtxq; ++iter, ++q) +#define for_each_ofld_rxq(vi, iter, q) \ + for (q = &vi->pi->adapter->sge.ofld_rxq[vi->first_ofld_rxq], iter = 0; \ + iter < vi->nofldrxq; ++iter, ++q) +#define for_each_nm_txq(vi, iter, q) \ + for (q = &vi->pi->adapter->sge.nm_txq[vi->first_txq], iter = 0; \ + iter < vi->ntxq; ++iter, ++q) +#define for_each_nm_rxq(vi, iter, q) \ + for (q = &vi->pi->adapter->sge.nm_rxq[vi->first_rxq], iter = 0; \ + iter < vi->nrxq; ++iter, ++q) +#define for_each_vi(_pi, _iter, _vi) \ + for ((_vi) = (_pi)->vi, (_iter) = 0; (_iter) < (_pi)->nvi; \ + ++(_iter), ++(_vi)) #define IDXINCR(idx, incr, wrap) do { \ idx = wrap - idx > incr ? idx + incr : incr - (wrap - idx); \ @@ -979,7 +993,7 @@ static inline void t4_os_set_hw_addr(struct adapter *sc, int idx, uint8_t hw_addr[]) { - bcopy(hw_addr, sc->port[idx]->hw_addr, ETHER_ADDR_LEN); + bcopy(hw_addr, sc->port[idx]->vi[0].hw_addr, ETHER_ADDR_LEN); } static inline bool @@ -1015,13 +1029,17 @@ int t4_register_cpl_handler(struct adapt int t4_register_an_handler(struct adapter *, an_handler_t); int t4_register_fw_msg_handler(struct adapter *, int, fw_msg_handler_t); int t4_filter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); -int begin_synchronized_op(struct adapter *, struct port_info *, int, char *); +int begin_synchronized_op(struct adapter *, struct vi_info *, int, char *); +void doom_vi(struct adapter *, struct vi_info *); void end_synchronized_op(struct adapter *, int); int update_mac_settings(struct ifnet *, int); int adapter_full_init(struct adapter *); int adapter_full_uninit(struct adapter *); -int port_full_init(struct port_info *); -int port_full_uninit(struct port_info *); +uint64_t cxgbe_get_counter(struct ifnet *, ift_counter); +int vi_full_init(struct vi_info *); +int vi_full_uninit(struct vi_info *); +void vi_sysctls(struct vi_info *); +void vi_tick(void *); #ifdef DEV_NETMAP /* t4_netmap.c */ @@ -1043,8 +1061,8 @@ void t4_sge_sysctls(struct adapter *, st int t4_destroy_dma_tag(struct adapter *); int t4_setup_adapter_queues(struct adapter *); int t4_teardown_adapter_queues(struct adapter *); -int t4_setup_port_queues(struct port_info *); -int t4_teardown_port_queues(struct port_info *); +int t4_setup_vi_queues(struct vi_info *); +int t4_teardown_vi_queues(struct vi_info *); void t4_intr_all(void *); void t4_intr(void *); void t4_intr_err(void *); Modified: head/sys/dev/cxgbe/common/t4_hw.c ============================================================================== --- head/sys/dev/cxgbe/common/t4_hw.c Wed Dec 2 23:54:59 2015 (r291664) +++ head/sys/dev/cxgbe/common/t4_hw.c Thu Dec 3 00:02:01 2015 (r291665) @@ -5723,11 +5723,11 @@ int __devinit t4_port_init(struct port_i if (ret < 0) return ret; - p->viid = ret; + p->vi[0].viid = ret; p->tx_chan = j; p->rx_chan_map = get_mps_bg_map(adap, j); p->lport = j; - p->rss_size = rss_size; + p->vi[0].rss_size = rss_size; t4_os_set_hw_addr(adap, p->port_id, addr); ret = ntohl(c.u.info.lstatus_to_modtype); @@ -5740,13 +5740,13 @@ int __devinit t4_port_init(struct port_i param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_RSSINFO) | - V_FW_PARAMS_PARAM_YZ(p->viid); + V_FW_PARAMS_PARAM_YZ(p->vi[0].viid); ret = t4_query_params(adap, mbox, pf, vf, 1, ¶m, &val); if (ret) - p->rss_base = 0xffff; + p->vi[0].rss_base = 0xffff; else { /* MPASS((val >> 16) == rss_size); */ - p->rss_base = val & 0xffff; + p->vi[0].rss_base = val & 0xffff; } return 0; Modified: head/sys/dev/cxgbe/iw_cxgbe/provider.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/provider.c Wed Dec 2 23:54:59 2015 (r291664) +++ head/sys/dev/cxgbe/iw_cxgbe/provider.c Thu Dec 3 00:02:01 2015 (r291665) @@ -296,7 +296,7 @@ c4iw_query_gid(struct ib_device *ibdev, if (port == 0 || port > sc->params.nports) return (-EINVAL); pi = sc->port[port - 1]; - memcpy(&gid->raw[0], pi->hw_addr, sizeof(pi->hw_addr)); + memcpy(&gid->raw[0], pi->vi[0].hw_addr, ETHER_ADDR_LEN); return (0); } @@ -309,7 +309,8 @@ c4iw_query_device(struct ib_device *ibde CTR3(KTR_IW_CXGBE, "%s ibdev %p, props %p", __func__, ibdev, props); memset(props, 0, sizeof *props); - memcpy(&props->sys_image_guid, sc->port[0]->hw_addr, 6); + memcpy(&props->sys_image_guid, sc->port[0]->vi[0].hw_addr, + ETHER_ADDR_LEN); props->hw_ver = sc->params.chipid; props->fw_ver = sc->params.fw_vers; props->device_cap_flags = dev->device_cap_flags; @@ -352,7 +353,7 @@ c4iw_query_port(struct ib_device *ibdev, if (port > sc->params.nports) return (-EINVAL); pi = sc->port[port - 1]; - ifp = pi->ifp; + ifp = pi->vi[0].ifp; memset(props, 0, sizeof(struct ib_port_attr)); props->max_mtu = IB_MTU_4096; @@ -397,7 +398,7 @@ c4iw_register_device(struct c4iw_dev *de BUG_ON(!sc->port[0]); strlcpy(ibdev->name, device_get_nameunit(sc->dev), sizeof(ibdev->name)); memset(&ibdev->node_guid, 0, sizeof(ibdev->node_guid)); - memcpy(&ibdev->node_guid, sc->port[0]->hw_addr, 6); + memcpy(&ibdev->node_guid, sc->port[0]->vi[0].hw_addr, ETHER_ADDR_LEN); ibdev->owner = THIS_MODULE; dev->device_cap_flags = IB_DEVICE_LOCAL_DMA_LKEY | IB_DEVICE_MEM_WINDOW; if (fastreg_support) Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Dec 2 23:54:59 2015 (r291664) +++ head/sys/dev/cxgbe/t4_main.c Thu Dec 3 00:02:01 2015 (r291665) @@ -106,6 +106,22 @@ static driver_t cxgbe_driver = { sizeof(struct port_info) }; +/* T4 VI (vcxgbe) interface */ +static int vcxgbe_probe(device_t); +static int vcxgbe_attach(device_t); +static int vcxgbe_detach(device_t); +static device_method_t vcxgbe_methods[] = { + DEVMETHOD(device_probe, vcxgbe_probe), + DEVMETHOD(device_attach, vcxgbe_attach), + DEVMETHOD(device_detach, vcxgbe_detach), + { 0, 0 } +}; +static driver_t vcxgbe_driver = { + "vcxgbe", + vcxgbe_methods, + sizeof(struct vi_info) +}; + static d_ioctl_t t4_ioctl; static d_open_t t4_open; static d_close_t t4_close; @@ -142,6 +158,13 @@ static driver_t cxl_driver = { sizeof(struct port_info) }; +/* T5 VI (vcxl) interface */ +static driver_t vcxl_driver = { + "vcxl", + vcxgbe_methods, + sizeof(struct vi_info) +}; + static struct cdevsw t5_cdevsw = { .d_version = D_VERSION, .d_flags = 0, @@ -156,7 +179,6 @@ static void cxgbe_init(void *); static int cxgbe_ioctl(struct ifnet *, unsigned long, caddr_t); static int cxgbe_transmit(struct ifnet *, struct mbuf *); static void cxgbe_qflush(struct ifnet *); -static uint64_t cxgbe_get_counter(struct ifnet *, ift_counter); static int cxgbe_media_change(struct ifnet *); static void cxgbe_media_status(struct ifnet *, struct ifmediareq *); @@ -327,6 +349,19 @@ TUNABLE_INT("hw.cxgbe.fcoecaps_allowed", static int t5_write_combine = 0; TUNABLE_INT("hw.cxl.write_combine", &t5_write_combine); +static int t4_num_vis = 1; +TUNABLE_INT("hw.cxgbe.num_vis", &t4_num_vis); + +/* Functions used by extra VIs to obtain unique MAC addresses for each VI. */ +static int vi_mac_funcs[] = { + FW_VI_FUNC_OFLD, + FW_VI_FUNC_IWARP, + FW_VI_FUNC_OPENISCSI, + FW_VI_FUNC_OPENFCOE, + FW_VI_FUNC_FOISCSI, + FW_VI_FUNC_FOFCOE, +}; + struct intrs_and_queues { uint16_t intr_type; /* INTx, MSI, or MSI-X */ uint16_t nirq; /* Total # of vectors */ @@ -370,7 +405,7 @@ static int validate_mt_off_len(struct ad uint32_t *); static void memwin_info(struct adapter *, int, uint32_t *, uint32_t *); static uint32_t position_memwin(struct adapter *, int, uint32_t); -static int cfg_itype_and_nqueues(struct adapter *, int, int, +static int cfg_itype_and_nqueues(struct adapter *, int, int, int, struct intrs_and_queues *); static int prep_firmware(struct adapter *); static int partition_resources(struct adapter *, const struct firmware *, @@ -380,8 +415,8 @@ static int get_params__post_init(struct static int set_params__post_init(struct adapter *); static void t4_set_desc(struct adapter *); static void build_medialist(struct port_info *, struct ifmedia *); -static int cxgbe_init_synchronized(struct port_info *); -static int cxgbe_uninit_synchronized(struct port_info *); +static int cxgbe_init_synchronized(struct vi_info *); +static int cxgbe_uninit_synchronized(struct vi_info *); static int setup_intr_handlers(struct adapter *); static void quiesce_txq(struct adapter *, struct sge_txq *); static void quiesce_wrq(struct adapter *, struct sge_wrq *); @@ -393,6 +428,7 @@ static int t4_free_irq(struct adapter *, static void reg_block_dump(struct adapter *, uint8_t *, unsigned int, unsigned int); static void t4_get_regs(struct adapter *, struct t4_regdump *, uint8_t *); +static void vi_refresh_stats(struct adapter *, struct vi_info *); static void cxgbe_refresh_stats(struct adapter *, struct port_info *); static void cxgbe_tick(void *); static void cxgbe_vlan_config(void *, struct ifnet *, uint16_t); @@ -400,8 +436,8 @@ static int cpl_not_handled(struct sge_iq struct mbuf *); static int an_not_handled(struct sge_iq *, const struct rsp_ctrl *); static int fw_msg_not_handled(struct adapter *, const __be64 *); -static int t4_sysctls(struct adapter *); -static int cxgbe_sysctls(struct port_info *); +static void t4_sysctls(struct adapter *); +static void cxgbe_sysctls(struct port_info *); static int sysctl_int_array(SYSCTL_HANDLER_ARGS); static int sysctl_bitfield(SYSCTL_HANDLER_ARGS); static int sysctl_btphy(SYSCTL_HANDLER_ARGS); @@ -459,7 +495,7 @@ static int read_i2c(struct adapter *, st static int set_sched_class(struct adapter *, struct t4_sched_params *); static int set_sched_queue(struct adapter *, struct t4_sched_queue *); #ifdef TCP_OFFLOAD -static int toe_capability(struct port_info *, int); +static int toe_capability(struct vi_info *, int); #endif static int mod_event(module_t, int, void *); @@ -604,7 +640,7 @@ static int t4_attach(device_t dev) { struct adapter *sc; - int rc = 0, i, n10g, n1g, rqidx, tqidx; + int rc = 0, i, j, n10g, n1g, rqidx, tqidx; struct intrs_and_queues iaq; struct sge *s; #ifdef TCP_OFFLOAD @@ -613,6 +649,7 @@ t4_attach(device_t dev) #ifdef DEV_NETMAP int nm_rqidx, nm_tqidx; #endif + int num_vis; sc = device_get_softc(dev); sc->dev = dev; @@ -646,7 +683,7 @@ t4_attach(device_t dev) mtx_init(&sc->sfl_lock, "starving freelists", 0, MTX_DEF); TAILQ_INIT(&sc->sfl); - callout_init(&sc->sfl_callout, 1); + callout_init_mtx(&sc->sfl_callout, &sc->sfl_lock, 0); mtx_init(&sc->regwin_lock, "register and memory window", 0, MTX_DEF); @@ -731,6 +768,27 @@ t4_attach(device_t dev) goto done; /* error message displayed already */ /* + * Number of VIs to create per-port. The first VI is the + * "main" regular VI for the port. The second VI is used for + * netmap if present, and any remaining VIs are used for + * additional virtual interfaces. + * + * Limit the number of VIs per port to the number of available + * MAC addresses per port. + */ + if (t4_num_vis >= 1) + num_vis = t4_num_vis; + else + num_vis = 1; +#ifdef DEV_NETMAP + num_vis++; +#endif + if (num_vis > nitems(vi_mac_funcs)) { + num_vis = nitems(vi_mac_funcs); + device_printf(dev, "Number of VIs limited to %d\n", num_vis); + } + + /* * First pass over all the ports - allocate VIs and initialize some * basic parameters like mac address, port type, etc. We also figure * out whether a port is 10G or 1G and use that information when @@ -739,6 +797,7 @@ t4_attach(device_t dev) n10g = n1g = 0; for_each_port(sc, i) { struct port_info *pi; + struct vi_info *vi; pi = malloc(sizeof(*pi), M_CXGBE, M_ZERO | M_WAITOK); sc->port[i] = pi; @@ -746,12 +805,19 @@ t4_attach(device_t dev) /* These must be set before t4_port_init */ pi->adapter = sc; pi->port_id = i; + pi->nvi = num_vis; + pi->vi = malloc(sizeof(struct vi_info) * num_vis, M_CXGBE, + M_ZERO | M_WAITOK); - /* Allocate the vi and initialize parameters like mac addr */ + /* + * Allocate the "main" VI and initialize parameters + * like mac addr. + */ rc = -t4_port_init(pi, sc->mbox, sc->pf, 0); if (rc != 0) { device_printf(dev, "unable to initialize port %d: %d\n", i, rc); + free(pi->vi, M_CXGBE); free(pi, M_CXGBE); sc->port[i] = NULL; goto done; @@ -765,6 +831,7 @@ t4_attach(device_t dev) rc = -t4_link_start(sc, sc->mbox, pi->tx_chan, &pi->link_cfg); if (rc != 0) { device_printf(dev, "port %d l1cfg failed: %d\n", i, rc); + free(pi->vi, M_CXGBE); free(pi, M_CXGBE); sc->port[i] = NULL; goto done; @@ -777,19 +844,25 @@ t4_attach(device_t dev) if (is_10G_port(pi) || is_40G_port(pi)) { n10g++; - pi->tmr_idx = t4_tmr_idx_10g; - pi->pktc_idx = t4_pktc_idx_10g; + for_each_vi(pi, j, vi) { + vi->tmr_idx = t4_tmr_idx_10g; + vi->pktc_idx = t4_pktc_idx_10g; + } } else { n1g++; - pi->tmr_idx = t4_tmr_idx_1g; - pi->pktc_idx = t4_pktc_idx_1g; + for_each_vi(pi, j, vi) { + vi->tmr_idx = t4_tmr_idx_1g; + vi->pktc_idx = t4_pktc_idx_1g; + } } - pi->xact_addr_filt = -1; pi->linkdnrc = -1; - pi->qsize_rxq = t4_qsize_rxq; - pi->qsize_txq = t4_qsize_txq; + for_each_vi(pi, j, vi) { + vi->qsize_rxq = t4_qsize_rxq; + vi->qsize_txq = t4_qsize_txq; + vi->pi = pi; + } pi->dev = device_add_child(dev, is_t4(sc) ? "cxgbe" : "cxl", -1); if (pi->dev == NULL) { @@ -798,13 +871,17 @@ t4_attach(device_t dev) rc = ENXIO; goto done; } + pi->vi[0].dev = pi->dev; device_set_softc(pi->dev, pi); } /* * Interrupt type, # of interrupts, # of rx/tx queues, etc. */ - rc = cfg_itype_and_nqueues(sc, n10g, n1g, &iaq); +#ifdef DEV_NETMAP + num_vis--; +#endif + rc = cfg_itype_and_nqueues(sc, n10g, n1g, num_vis, &iaq); if (rc != 0) goto done; /* error message displayed already */ @@ -814,6 +891,10 @@ t4_attach(device_t dev) s = &sc->sge; s->nrxq = n10g * iaq.nrxq10g + n1g * iaq.nrxq1g; s->ntxq = n10g * iaq.ntxq10g + n1g * iaq.ntxq1g; + if (num_vis > 1) { + s->nrxq += (n10g + n1g) * (num_vis - 1); + s->ntxq += (n10g + n1g) * (num_vis - 1); + } s->neq = s->ntxq + s->nrxq; /* the free list in an rxq is an eq */ s->neq += sc->params.nports + 1;/* ctrl queues: 1 per port + 1 mgmt */ s->niq = s->nrxq + 1; /* 1 extra for firmware event queue */ @@ -821,6 +902,10 @@ t4_attach(device_t dev) if (is_offload(sc)) { s->nofldrxq = n10g * iaq.nofldrxq10g + n1g * iaq.nofldrxq1g; s->nofldtxq = n10g * iaq.nofldtxq10g + n1g * iaq.nofldtxq1g; + if (num_vis > 1) { + s->nofldrxq += (n10g + n1g) * (num_vis - 1); + s->nofldtxq += (n10g + n1g) * (num_vis - 1); + } s->neq += s->nofldtxq + s->nofldrxq; s->niq += s->nofldrxq; @@ -871,57 +956,68 @@ t4_attach(device_t dev) #endif for_each_port(sc, i) { struct port_info *pi = sc->port[i]; + struct vi_info *vi; if (pi == NULL) continue; - pi->first_rxq = rqidx; - pi->first_txq = tqidx; - if (is_10G_port(pi) || is_40G_port(pi)) { - pi->flags |= iaq.intr_flags_10g; - pi->nrxq = iaq.nrxq10g; - pi->ntxq = iaq.ntxq10g; - } else { - pi->flags |= iaq.intr_flags_1g; - pi->nrxq = iaq.nrxq1g; - pi->ntxq = iaq.ntxq1g; - } + for_each_vi(pi, j, vi) { +#ifdef DEV_NETMAP + if (j == 1) { + vi->flags |= VI_NETMAP | INTR_RXQ; + vi->first_rxq = nm_rqidx; + vi->first_txq = nm_tqidx; + if (is_10G_port(pi) || is_40G_port(pi)) { + vi->nrxq = iaq.nnmrxq10g; + vi->ntxq = iaq.nnmtxq10g; + } else { + vi->nrxq = iaq.nnmrxq1g; + vi->ntxq = iaq.nnmtxq1g; + } + nm_rqidx += vi->nrxq; + nm_tqidx += vi->ntxq; + continue; + } +#endif - if (pi->ntxq > 1) - pi->rsrv_noflowq = iaq.rsrv_noflowq ? 1 : 0; - else - pi->rsrv_noflowq = 0; + vi->first_rxq = rqidx; + vi->first_txq = tqidx; + if (is_10G_port(pi) || is_40G_port(pi)) { + vi->flags |= iaq.intr_flags_10g & INTR_RXQ; + vi->nrxq = j == 0 ? iaq.nrxq10g : 1; + vi->ntxq = j == 0 ? iaq.ntxq10g : 1; + } else { + vi->flags |= iaq.intr_flags_1g & INTR_RXQ; + vi->nrxq = j == 0 ? iaq.nrxq1g : 1; + vi->ntxq = j == 0 ? iaq.ntxq1g : 1; + } + + if (vi->ntxq > 1) + vi->rsrv_noflowq = iaq.rsrv_noflowq ? 1 : 0; + else + vi->rsrv_noflowq = 0; + + rqidx += vi->nrxq; + tqidx += vi->ntxq; - rqidx += pi->nrxq; - tqidx += pi->ntxq; #ifdef TCP_OFFLOAD - if (is_offload(sc)) { - pi->first_ofld_rxq = ofld_rqidx; - pi->first_ofld_txq = ofld_tqidx; + if (!is_offload(sc)) + continue; + vi->first_ofld_rxq = ofld_rqidx; + vi->first_ofld_txq = ofld_tqidx; if (is_10G_port(pi) || is_40G_port(pi)) { - pi->nofldrxq = iaq.nofldrxq10g; - pi->nofldtxq = iaq.nofldtxq10g; + vi->flags |= iaq.intr_flags_10g & INTR_OFLD_RXQ; + vi->nofldrxq = j == 0 ? iaq.nofldrxq10g : 1; + vi->nofldtxq = j == 0 ? iaq.nofldtxq10g : 1; } else { - pi->nofldrxq = iaq.nofldrxq1g; - pi->nofldtxq = iaq.nofldtxq1g; + vi->flags |= iaq.intr_flags_1g & INTR_OFLD_RXQ; + vi->nofldrxq = j == 0 ? iaq.nofldrxq1g : 1; + vi->nofldtxq = j == 0 ? iaq.nofldtxq1g : 1; } - ofld_rqidx += pi->nofldrxq; - ofld_tqidx += pi->nofldtxq; - } + ofld_rqidx += vi->nofldrxq; + ofld_tqidx += vi->nofldtxq; #endif -#ifdef DEV_NETMAP - pi->first_nm_rxq = nm_rqidx; - pi->first_nm_txq = nm_tqidx; - if (is_10G_port(pi) || is_40G_port(pi)) { - pi->nnmrxq = iaq.nnmrxq10g; - pi->nnmtxq = iaq.nnmtxq10g; - } else { - pi->nnmrxq = iaq.nnmrxq1g; - pi->nnmtxq = iaq.nnmtxq1g; } - nm_rqidx += pi->nnmrxq; - nm_tqidx += pi->nnmtxq; -#endif } rc = setup_intr_handlers(sc); @@ -996,11 +1092,12 @@ t4_detach(device_t dev) for (i = 0; i < MAX_NPORTS; i++) { pi = sc->port[i]; if (pi) { - t4_free_vi(sc, sc->mbox, sc->pf, 0, pi->viid); + t4_free_vi(sc, sc->mbox, sc->pf, 0, pi->vi[0].viid); if (pi->dev) device_delete_child(dev, pi->dev); mtx_destroy(&pi->pi_lock); + free(pi->vi, M_CXGBE); free(pi, M_CXGBE); } } @@ -1052,6 +1149,7 @@ t4_detach(device_t dev) mtx_destroy(&sc->sc_lock); } + callout_drain(&sc->sfl_callout); if (mtx_initialized(&sc->tids.ftid_lock)) mtx_destroy(&sc->tids.ftid_lock); if (mtx_initialized(&sc->sfl_lock)) @@ -1084,12 +1182,13 @@ cxgbe_probe(device_t dev) #define T4_CAP_ENABLE (T4_CAP) static int -cxgbe_attach(device_t dev) +cxgbe_vi_attach(device_t dev, struct vi_info *vi) { - struct port_info *pi = device_get_softc(dev); struct ifnet *ifp; - char *s; - int n, o; + struct sbuf *sb; + + vi->xact_addr_filt = -1; + callout_init(&vi->tick, 1); /* Allocate an ifnet and set it up */ ifp = if_alloc(IFT_ETHER); @@ -1097,10 +1196,8 @@ cxgbe_attach(device_t dev) device_printf(dev, "Cannot allocate ifnet\n"); return (ENOMEM); } - pi->ifp = ifp; - ifp->if_softc = pi; - - callout_init(&pi->tick, 1); + vi->ifp = ifp; + ifp->if_softc = vi; if_initname(ifp, device_get_name(dev), device_get_unit(dev)); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; @@ -1113,7 +1210,7 @@ cxgbe_attach(device_t dev) ifp->if_capabilities = T4_CAP; #ifdef TCP_OFFLOAD - if (is_offload(pi->adapter)) + if (vi->nofldrxq != 0) ifp->if_capabilities |= IFCAP_TOE; #endif ifp->if_capenable = T4_CAP_ENABLE; @@ -1124,99 +1221,121 @@ cxgbe_attach(device_t dev) ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS; ifp->if_hw_tsomaxsegsize = 65536; - /* Initialize ifmedia for this port */ - ifmedia_init(&pi->media, IFM_IMASK, cxgbe_media_change, + /* Initialize ifmedia for this VI */ + ifmedia_init(&vi->media, IFM_IMASK, cxgbe_media_change, cxgbe_media_status); - build_medialist(pi, &pi->media); + build_medialist(vi->pi, &vi->media); - pi->vlan_c = EVENTHANDLER_REGISTER(vlan_config, cxgbe_vlan_config, ifp, + vi->vlan_c = EVENTHANDLER_REGISTER(vlan_config, cxgbe_vlan_config, ifp, EVENTHANDLER_PRI_ANY); - ether_ifattach(ifp, pi->hw_addr); + ether_ifattach(ifp, vi->hw_addr); - n = 128; - s = malloc(n, M_CXGBE, M_WAITOK); - o = snprintf(s, n, "%d txq, %d rxq (NIC)", pi->ntxq, pi->nrxq); - MPASS(n > o); + sb = sbuf_new_auto(); + sbuf_printf(sb, "%d txq, %d rxq (NIC)", vi->ntxq, vi->nrxq); #ifdef TCP_OFFLOAD - if (is_offload(pi->adapter)) { - o += snprintf(s + o, n - o, "; %d txq, %d rxq (TOE)", - pi->nofldtxq, pi->nofldrxq); - MPASS(n > o); - } -#endif -#ifdef DEV_NETMAP - o += snprintf(s + o, n - o, "; %d txq, %d rxq (netmap)", pi->nnmtxq, - pi->nnmrxq); - MPASS(n > o); + if (ifp->if_capabilities & IFCAP_TOE) + sbuf_printf(sb, "; %d txq, %d rxq (TOE)", + vi->nofldtxq, vi->nofldrxq); #endif - device_printf(dev, "%s\n", s); - free(s, M_CXGBE); + sbuf_finish(sb); + device_printf(dev, "%s\n", sbuf_data(sb)); + sbuf_delete(sb); + + vi_sysctls(vi); + + return (0); +} + +static int +cxgbe_attach(device_t dev) +{ + struct port_info *pi = device_get_softc(dev); + struct vi_info *vi; + int i, rc; + + callout_init_mtx(&pi->tick, &pi->pi_lock, 0); + rc = cxgbe_vi_attach(dev, &pi->vi[0]); + if (rc) + return (rc); + + for_each_vi(pi, i, vi) { + if (i == 0) + continue; #ifdef DEV_NETMAP - /* nm_media handled here to keep implementation private to this file */ - ifmedia_init(&pi->nm_media, IFM_IMASK, cxgbe_media_change, - cxgbe_media_status); - build_medialist(pi, &pi->nm_media); - create_netmap_ifnet(pi); /* logs errors it something fails */ + if (vi->flags & VI_NETMAP) { + /* + * media handled here to keep + * implementation private to this file + */ + ifmedia_init(&vi->media, IFM_IMASK, cxgbe_media_change, + cxgbe_media_status); + build_medialist(pi, &vi->media); + vi->dev = device_add_child(dev, is_t4(pi->adapter) ? + "ncxgbe" : "ncxl", device_get_unit(dev)); + } else #endif + vi->dev = device_add_child(dev, is_t4(pi->adapter) ? + "vcxgbe" : "vcxl", -1); + if (vi->dev == NULL) { + device_printf(dev, "failed to add VI %d\n", i); + continue; + } + device_set_softc(vi->dev, vi); + } + cxgbe_sysctls(pi); + bus_generic_attach(dev); + return (0); } +static void +cxgbe_vi_detach(struct vi_info *vi) +{ + struct ifnet *ifp = vi->ifp; + + ether_ifdetach(ifp); + + if (vi->vlan_c) + EVENTHANDLER_DEREGISTER(vlan_config, vi->vlan_c); + + /* Let detach proceed even if these fail. */ + cxgbe_uninit_synchronized(vi); + callout_drain(&vi->tick); + vi_full_uninit(vi); + + ifmedia_removeall(&vi->media); + if_free(vi->ifp); + vi->ifp = NULL; +} + static int cxgbe_detach(device_t dev) { struct port_info *pi = device_get_softc(dev); struct adapter *sc = pi->adapter; - struct ifnet *ifp = pi->ifp; + int rc; - /* Tell if_ioctl and if_init that the port is going away */ - ADAPTER_LOCK(sc); - SET_DOOMED(pi); - wakeup(&sc->flags); - while (IS_BUSY(sc)) - mtx_sleep(&sc->flags, &sc->sc_lock, 0, "t4detach", 0); - SET_BUSY(sc); -#ifdef INVARIANTS - sc->last_op = "t4detach"; - sc->last_op_thr = curthread; - sc->last_op_flags = 0; -#endif - ADAPTER_UNLOCK(sc); + /* Detach the extra VIs first. */ + rc = bus_generic_detach(dev); + if (rc) + return (rc); + device_delete_children(dev); + + doom_vi(sc, &pi->vi[0]); if (pi->flags & HAS_TRACEQ) { sc->traceq = -1; /* cloner should not create ifnet */ t4_tracer_port_detach(sc); } - if (pi->vlan_c) - EVENTHANDLER_DEREGISTER(vlan_config, pi->vlan_c); - - PORT_LOCK(pi); - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - callout_stop(&pi->tick); - PORT_UNLOCK(pi); + cxgbe_vi_detach(&pi->vi[0]); callout_drain(&pi->tick); - /* Let detach proceed even if these fail. */ - cxgbe_uninit_synchronized(pi); - port_full_uninit(pi); - - ifmedia_removeall(&pi->media); - ether_ifdetach(pi->ifp); - if_free(pi->ifp); - -#ifdef DEV_NETMAP - /* XXXNM: equivalent of cxgbe_uninit_synchronized to ifdown nm_ifp */ - destroy_netmap_ifnet(pi); -#endif - - ADAPTER_LOCK(sc); - CLR_BUSY(sc); - wakeup(&sc->flags); - ADAPTER_UNLOCK(sc); + end_synchronized_op(sc, 0); return (0); } @@ -1224,12 +1343,12 @@ cxgbe_detach(device_t dev) static void cxgbe_init(void *arg) { - struct port_info *pi = arg; - struct adapter *sc = pi->adapter; + struct vi_info *vi = arg; + struct adapter *sc = vi->pi->adapter; - if (begin_synchronized_op(sc, pi, SLEEP_OK | INTR_OK, "t4init") != 0) + if (begin_synchronized_op(sc, vi, SLEEP_OK | INTR_OK, "t4init") != 0) return; - cxgbe_init_synchronized(pi); + cxgbe_init_synchronized(vi); end_synchronized_op(sc, 0); } @@ -1237,8 +1356,8 @@ static int cxgbe_ioctl(struct ifnet *ifp, unsigned long cmd, caddr_t data) { int rc = 0, mtu, flags, can_sleep; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 3 00:07:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04FC7A3FA9D; Thu, 3 Dec 2015 00:07:01 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C268413C1; Thu, 3 Dec 2015 00:07:00 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB306xfS074888; Thu, 3 Dec 2015 00:06:59 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB306xTa074887; Thu, 3 Dec 2015 00:06:59 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201512030006.tB306xTa074887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 3 Dec 2015 00:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291666 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 00:07:01 -0000 Author: nwhitehorn Date: Thu Dec 3 00:06:59 2015 New Revision: 291666 URL: https://svnweb.freebsd.org/changeset/base/291666 Log: Fix build on GCC 5.2 where, at least on PPC64, the compiler would "optimize" the malloc() + memset() in the local implementation of calloc() into a call to calloc(), helpfully turning it into an infinite loop. Clean up some unneeded flags on PPC64 while here. MFC after: 1 month Modified: head/libexec/rtld-elf/Makefile Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Thu Dec 3 00:02:01 2015 (r291665) +++ head/libexec/rtld-elf/Makefile Thu Dec 3 00:06:59 2015 (r291666) @@ -13,7 +13,7 @@ SRCS= rtld_start.S \ malloc.c xmalloc.c debug.c libmap.c MAN= rtld.1 CSTD?= gnu99 -CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD +CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -fno-builtin CFLAGS+= -I${SRCTOP}/lib/csu/common .if exists(${.CURDIR}/${MACHINE_ARCH}) RTLD_ARCH= ${MACHINE_ARCH} @@ -22,7 +22,6 @@ RTLD_ARCH= ${MACHINE_CPUARCH} .endif CFLAGS+= -I${.CURDIR}/${RTLD_ARCH} -I${.CURDIR} .if ${MACHINE_ARCH} == "powerpc64" -CFLAGS+= -mcall-aixdesc LDFLAGS+= -nostdlib -e _rtld_start .else LDFLAGS+= -nostdlib -e .rtld_start From owner-svn-src-all@freebsd.org Thu Dec 3 00:08:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBA1DA3FB65; Thu, 3 Dec 2015 00:08:51 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88C391775; Thu, 3 Dec 2015 00:08:51 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB308oGY074993; Thu, 3 Dec 2015 00:08:50 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB308ojQ074991; Thu, 3 Dec 2015 00:08:50 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201512030008.tB308ojQ074991@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 3 Dec 2015 00:08:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291667 - in head/sys/boot/powerpc: . boot1.chrp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 00:08:51 -0000 Author: nwhitehorn Date: Thu Dec 3 00:08:50 2015 New Revision: 291667 URL: https://svnweb.freebsd.org/changeset/base/291667 Log: Clean up PowerPC bootloader compiler flags to fix the build with GCC 5.2 and binutils 2.25. Modified: head/sys/boot/powerpc/Makefile.inc head/sys/boot/powerpc/boot1.chrp/Makefile Modified: head/sys/boot/powerpc/Makefile.inc ============================================================================== --- head/sys/boot/powerpc/Makefile.inc Thu Dec 3 00:06:59 2015 (r291666) +++ head/sys/boot/powerpc/Makefile.inc Thu Dec 3 00:08:50 2015 (r291667) @@ -2,7 +2,6 @@ .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -mcpu=powerpc -LDFLAGS+= -m elf32ppc_fbsd .endif .include "../Makefile.inc" Modified: head/sys/boot/powerpc/boot1.chrp/Makefile ============================================================================== --- head/sys/boot/powerpc/boot1.chrp/Makefile Thu Dec 3 00:06:59 2015 (r291666) +++ head/sys/boot/powerpc/boot1.chrp/Makefile Thu Dec 3 00:08:50 2015 (r291667) @@ -12,7 +12,7 @@ SRCS= boot1.c ashldi3.c syncicache.c MAN= -CFLAGS= -ffreestanding -msoft-float -Os \ +CFLAGS= -ffreestanding -msoft-float \ -I${.CURDIR}/../../common -I${.CURDIR}/../../../ \ -D_STANDALONE LDFLAGS=-nostdlib -static -Wl,-N From owner-svn-src-all@freebsd.org Thu Dec 3 00:10:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01B50A3FCA7; Thu, 3 Dec 2015 00:10:59 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC1151AA7; Thu, 3 Dec 2015 00:10:58 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB30AvND077050; Thu, 3 Dec 2015 00:10:57 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB30AvNc077043; Thu, 3 Dec 2015 00:10:57 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201512030010.tB30AvNc077043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 3 Dec 2015 00:10:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291668 - in head: lib/csu/powerpc64 libexec/rtld-elf libexec/rtld-elf/powerpc64 sys/powerpc/include sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 00:10:59 -0000 Author: nwhitehorn Date: Thu Dec 3 00:10:57 2015 New Revision: 291668 URL: https://svnweb.freebsd.org/changeset/base/291668 Log: Provide support for ELFv2 userland if using a newer compiler (recent clang or gcc) and binutils >= 2.24. Not enabled by default. Modified: head/lib/csu/powerpc64/crti.S head/libexec/rtld-elf/powerpc64/reloc.c head/libexec/rtld-elf/powerpc64/rtld_start.S head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h head/sys/powerpc/include/asm.h head/sys/powerpc/powerpc/sigcode64.S Modified: head/lib/csu/powerpc64/crti.S ============================================================================== --- head/lib/csu/powerpc64/crti.S Thu Dec 3 00:08:50 2015 (r291667) +++ head/lib/csu/powerpc64/crti.S Thu Dec 3 00:10:57 2015 (r291668) @@ -26,34 +26,59 @@ #include __FBSDID("$FreeBSD$"); +#ifdef _CALL_ELF +.abiversion _CALL_ELF +#endif + .section .init,"ax",@progbits - .align 2 + .p2align 2 .globl _init +#if !defined(_CALL_ELF) || _CALL_ELF == 1 .section ".opd","aw" - .align 3 + .p2align 3 _init: .quad .L._init,.TOC.@tocbase,0 .previous .type _init,@function - .align 4 + .p2align 4 .L._init: +#else + .p2align 4 + .globl _init + .type _init,@function +_init: + addis %r2, %r12, (.TOC.-_init)@ha + addi %r2, %r2, (.TOC.-_init)@l + .localentry _init, .-_init +#endif stdu 1,-48(1) mflr 0 std 0,64(1) +/* Fini */ .section .fini,"ax",@progbits - .align 2 + .p2align 2 .globl _fini +#if !defined(_CALL_ELF) || _CALL_ELF == 1 .section ".opd","aw" - .align 3 + .p2align 3 _fini: .quad .L._fini,.TOC.@tocbase,0 .previous .type _fini,@function - .align 4 + .p2align 4 .L._fini: +#else + .p2align 4 + .globl _fini + .type _fini,@function +_fini: + addis %r2, %r12, (.TOC.-_fini)@ha + addi %r2, %r2, (.TOC.-_fini)@l + .localentry _fini, .-_fini +#endif stdu 1,-48(1) mflr 0 std 0,64(1) Modified: head/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc64/reloc.c Thu Dec 3 00:08:50 2015 (r291667) +++ head/libexec/rtld-elf/powerpc64/reloc.c Thu Dec 3 00:10:57 2015 (r291668) @@ -43,11 +43,13 @@ #include "debug.h" #include "rtld.h" +#if !defined(_CALL_ELF) || _CALL_ELF == 1 struct funcdesc { Elf_Addr addr; Elf_Addr toc; Elf_Addr env; }; +#endif /* * Process the R_PPC_COPY relocations @@ -336,11 +338,14 @@ static int reloc_plt_object(Obj_Entry *obj, const Elf_Rela *rela) { Elf_Addr *where = (Elf_Addr *)(obj->relocbase + rela->r_offset); +#if !defined(_CALL_ELF) || _CALL_ELF == 1 Elf_Addr *glink; +#endif long reloff; reloff = rela - obj->pltrela; +#if !defined(_CALL_ELF) || _CALL_ELF == 1 if (obj->priv == NULL) obj->priv = xmalloc(obj->pltrelasize); glink = obj->priv + reloff*sizeof(Elf_Addr)*2; @@ -351,6 +356,10 @@ reloc_plt_object(Obj_Entry *obj, const E ((struct funcdesc *)(where))->env = (Elf_Addr)glink; *(glink++) = (Elf_Addr)obj; *(glink++) = reloff*sizeof(Elf_Rela); +#else + dbg(" reloc_plt_object: where=%p,reloff=%lx,glink=%#lx", (void *)where, reloff, obj->glink); + *where = (Elf_Addr)obj->glink + 4*reloff + 32; +#endif return (0); } @@ -416,7 +425,11 @@ reloc_jmpslots(Obj_Entry *obj, int flags if (def == &sym_zero) { /* Zero undefined weak symbols */ +#if !defined(_CALL_ELF) || _CALL_ELF == 1 bzero(where, sizeof(struct funcdesc)); +#else + *where = 0; +#endif } else { reloc_jmpslot(where, target, defobj, obj, (const Elf_Rel *) rela); @@ -436,9 +449,6 @@ Elf_Addr reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *defobj, const Obj_Entry *obj, const Elf_Rel *rel) { - dbg(" reloc_jmpslot: where=%p, target=%p (%#lx + %#lx)", - (void *)wherep, (void *)target, *(Elf_Addr *)target, - (Elf_Addr)defobj->relocbase); /* * At the PLT entry pointed at by `wherep', construct @@ -446,6 +456,11 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr * address. */ +#if !defined(_CALL_ELF) || _CALL_ELF == 1 + dbg(" reloc_jmpslot: where=%p, target=%p (%#lx + %#lx)", + (void *)wherep, (void *)target, *(Elf_Addr *)target, + (Elf_Addr)defobj->relocbase); + memcpy(wherep, (void *)target, sizeof(struct funcdesc)); if (((struct funcdesc *)(wherep))->addr < (Elf_Addr)defobj->relocbase) { /* @@ -459,8 +474,14 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr ((struct funcdesc *)(wherep))->toc += (Elf_Addr)defobj->relocbase; } +#else + dbg(" reloc_jmpslot: where=%p, target=%p", (void *)wherep, + (void *)target); + + *wherep = target; +#endif - __asm __volatile("dcbst 0,%0; sync" :: "r"(wherep) : "memory"); + __asm __volatile("sync" ::: "memory"); return (target); } @@ -485,6 +506,20 @@ reloc_gnu_ifunc(Obj_Entry *obj, int flag void init_pltgot(Obj_Entry *obj) { +#if defined(_CALL_ELF) && _CALL_ELF == 2 + Elf_Addr *pltcall; + + pltcall = obj->pltgot; + + if (pltcall == NULL) { + return; + } + + pltcall[0] = (Elf_Addr)&_rtld_bind_start; + pltcall[1] = (Elf_Addr)obj; + + __asm __volatile("sync" ::: "memory"); +#endif } void Modified: head/libexec/rtld-elf/powerpc64/rtld_start.S ============================================================================== --- head/libexec/rtld-elf/powerpc64/rtld_start.S Thu Dec 3 00:08:50 2015 (r291667) +++ head/libexec/rtld-elf/powerpc64/rtld_start.S Thu Dec 3 00:10:57 2015 (r291668) @@ -82,9 +82,13 @@ _ENTRY(_rtld_start) bl _rtld /* &_start = _rtld(sp, &exit_proc, &obj_main)*/ nop +#if !defined(_CALL_ELF) || _CALL_ELF == 1 ld %r2,8(%r3) ld %r11,16(%r3) ld %r3,0(%r3) +#else + mr %r12,%r3 +#endif mtlr %r3 /* @@ -106,7 +110,11 @@ _ENTRY(_rtld_start) * _rtld_bind_start() * * Call into the MI binder. This routine is reached via the PLT call cell - * On entry, %r11 contains a pointer to the (object, relocation) tuple. + * + * For ELFv1, on entry, %r11 contains a pointer to the (object, relocation) + * tuple. + * + * For ELFv2, %r11 contains an object pointer and %r0 contains the PLT index. * * Save all registers, call into the binder to resolve and fixup the external * routine, and then transfer to the external routine on return. @@ -114,6 +122,7 @@ _ENTRY(_rtld_start) .globl _rtld_bind _ENTRY(_rtld_bind_start) + mr %r12,%r0 # shunt r0 immediately to r12 for ELFv2 mflr %r0 std %r0,16(%r1) # save lr mfcr %r0 @@ -121,7 +130,7 @@ _ENTRY(_rtld_bind_start) stdu %r1,-48-12*8(%r1) # stack space for 8 regs + header # + 2 save regs - std %r3,64+0*8(%r1) # save r3-r31 + std %r3,64+0*8(%r1) # save r3-r10 (arguments) std %r4,64+1*8(%r1) std %r5,64+2*8(%r1) std %r6,64+3*8(%r1) @@ -129,19 +138,27 @@ _ENTRY(_rtld_bind_start) std %r8,64+5*8(%r1) std %r9,64+6*8(%r1) std %r10,64+7*8(%r1) - std %r12,64+8*8(%r1) +#if !defined(_CALL_ELF) || _CALL_ELF == 1 ld %r3,0(%r11) ld %r4,8(%r11) +#else + mr %r3,%r11 + mulli %r4,%r12,24 /* Multiply index by sizeof(Elf_Rela) */ +#endif bl _rtld_bind # target addr = _rtld_bind(obj, reloff) nop +#if !defined(_CALL_ELF) || _CALL_ELF == 1 ld %r2,8(%r3) ld %r11,16(%r3) ld %r3,0(%r3) +#else + mr %r12,%r3 +#endif mtctr %r3 # move absolute target addr into ctr - ld %r3,64+0*8(%r1) # restore r3-r31 + ld %r3,64+0*8(%r1) # restore r3-r10 ld %r4,64+1*8(%r1) ld %r5,64+2*8(%r1) ld %r6,64+3*8(%r1) @@ -149,7 +166,6 @@ _ENTRY(_rtld_bind_start) ld %r8,64+5*8(%r1) ld %r9,64+6*8(%r1) ld %r10,64+7*8(%r1) - ld %r12,64+8*8(%r1) ld %r1,0(%r1) # restore stack ld %r0,8(%r1) # restore cr Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Thu Dec 3 00:08:50 2015 (r291667) +++ head/libexec/rtld-elf/rtld.c Thu Dec 3 00:10:57 2015 (r291668) @@ -1148,7 +1148,7 @@ digest_dynamic1(Obj_Entry *obj, int earl #ifdef __mips__ case DT_MIPS_LOCAL_GOTNO: obj->local_gotno = dynp->d_un.d_val; - break; + break; case DT_MIPS_SYMTABNO: obj->symtabno = dynp->d_un.d_val; @@ -1163,6 +1163,12 @@ digest_dynamic1(Obj_Entry *obj, int earl break; #endif +#ifdef __powerpc64__ + case DT_PPC64_GLINK: + obj->glink = (Elf_Addr) (obj->relocbase + dynp->d_un.d_ptr); + break; +#endif + case DT_FLAGS_1: if (dynp->d_un.d_val & DF_1_NOOPEN) obj->z_noopen = true; Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Thu Dec 3 00:08:50 2015 (r291667) +++ head/libexec/rtld-elf/rtld.h Thu Dec 3 00:10:57 2015 (r291668) @@ -187,6 +187,9 @@ typedef struct Struct_Obj_Entry { Elf_Word symtabno; /* Number of dynamic symbols */ Elf_Word gotsym; /* First dynamic symbol in GOT */ #endif +#ifdef __powerpc64__ + Elf_Addr glink; /* GLINK PLT call stub section */ +#endif const Elf_Verneed *verneed; /* Required versions. */ Elf_Word verneednum; /* Number of entries in verneed table */ Modified: head/sys/powerpc/include/asm.h ============================================================================== --- head/sys/powerpc/include/asm.h Thu Dec 3 00:08:50 2015 (r291667) +++ head/sys/powerpc/include/asm.h Thu Dec 3 00:10:57 2015 (r291668) @@ -61,17 +61,26 @@ #define HIDENAME(asmsym) __CONCAT(.,asmsym) #endif +#if !defined(_CALL_ELF) || _CALL_ELF == 1 #ifdef _KERNEL +/* ELFv1 kernel uses global dot symbols */ #define DOT_LABEL(name) __CONCAT(.,name) #define TYPE_ENTRY(name) .size name,24; \ .type DOT_LABEL(name),@function; \ .globl DOT_LABEL(name); #define END_SIZE(name) .size DOT_LABEL(name),.-DOT_LABEL(name); #else /* !_KERNEL */ +/* ELFv1 user code uses local function entry points */ #define DOT_LABEL(name) __CONCAT(.L.,name) #define TYPE_ENTRY(name) .type name,@function; #define END_SIZE(name) .size name,.-DOT_LABEL(name); #endif /* _KERNEL */ +#else +/* ELFv2 doesn't have any of this complication */ +#define DOT_LABEL(name) name +#define TYPE_ENTRY(name) .type name,@function; +#define END_SIZE(name) .size name,.-DOT_LABEL(name); +#endif #define _GLOBAL(name) \ .data; \ Modified: head/sys/powerpc/powerpc/sigcode64.S ============================================================================== --- head/sys/powerpc/powerpc/sigcode64.S Thu Dec 3 00:08:50 2015 (r291667) +++ head/sys/powerpc/powerpc/sigcode64.S Thu Dec 3 00:10:57 2015 (r291668) @@ -57,6 +57,7 @@ CNAME(sigcode64): CNAME(sigcode64_elfv2): addi 1,1,-112 /* reserved space for callee */ + mflr 12 /* ELFv2 wants the address in r12 */ blrl addi 3,1,112+SF_UC /* restore sp, and get &frame->sf_uc */ From owner-svn-src-all@freebsd.org Thu Dec 3 02:04:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4E75A3F8AF; Thu, 3 Dec 2015 02:04:23 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 784901E4F; Thu, 3 Dec 2015 02:04:23 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB324M6V009300; Thu, 3 Dec 2015 02:04:22 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB324McQ009299; Thu, 3 Dec 2015 02:04:22 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201512030204.tB324McQ009299@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Thu, 3 Dec 2015 02:04:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291671 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 02:04:23 -0000 Author: mckusick Date: Thu Dec 3 02:04:22 2015 New Revision: 291671 URL: https://svnweb.freebsd.org/changeset/base/291671 Log: We need to zero out the union of pointers in a freed vnode structure. PR: 204949 Fix from: Mateusz Guzik Tested by: Jason Unovitch Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Thu Dec 3 02:00:36 2015 (r291670) +++ head/sys/kern/vfs_subr.c Thu Dec 3 02:04:22 2015 (r291671) @@ -2782,6 +2782,7 @@ _vdrop(struct vnode *vp, bool locked) /* XXX Elsewhere we detect an already freed vnode via NULL v_op. */ vp->v_op = NULL; #endif + bzero(&vp->v_un, sizeof(vp->v_un)); vp->v_iflag = 0; vp->v_vflag = 0; bo->bo_flag = 0; From owner-svn-src-all@freebsd.org Thu Dec 3 05:27:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 935E1A3F415; Thu, 3 Dec 2015 05:27:40 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 615911C8C; Thu, 3 Dec 2015 05:27:40 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB35RdEm067294; Thu, 3 Dec 2015 05:27:39 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB35Rd3p067292; Thu, 3 Dec 2015 05:27:39 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201512030527.tB35Rd3p067292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 3 Dec 2015 05:27:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291676 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 05:27:40 -0000 Author: yongari Date: Thu Dec 3 05:27:39 2015 New Revision: 291676 URL: https://svnweb.freebsd.org/changeset/base/291676 Log: Disable EEE(Energy Efficient Ethernet) for RTL8211F PHY. It seems the EEE made RX MAC enter LPI(Low Power Idle) mode such that dwc(4) was not able to receive packets. Ideally dwc(4) should be able to use EEE to save power during periods of low link utilization(i.e. gating off clock). Due to lack of dwc(4) datasheet it's not easy to take required steps for EEE on LPI enter/exit events. Disabling EEE in PHY seems to be easy workaround until dwc(4) supports EEE. Updating EEE advertisement register on RTL8211F seems to have no effect until reprogramming MII_ANAR, MII_100T2CR and MII_BMCR with auto-negotiation. It's not clear whether it's related with mii_phy_reset()'s BMCR_ISO handling for RTL8211F though. It seems rgephy_reset() needs careful investigation for newer RealTek PHYs. Ganbold submitted working version based on NetBSD change and tested lots of changes I made. Thanks a lot! Submitted by: ganbold (initial version) In collaboration with: ganbold Modified: head/sys/dev/mii/rgephy.c head/sys/dev/mii/rgephyreg.h Modified: head/sys/dev/mii/rgephy.c ============================================================================== --- head/sys/dev/mii/rgephy.c Thu Dec 3 04:35:44 2015 (r291675) +++ head/sys/dev/mii/rgephy.c Thu Dec 3 05:27:39 2015 (r291676) @@ -90,6 +90,7 @@ static void rgephy_reset(struct mii_soft static int rgephy_linkup(struct mii_softc *); static void rgephy_loop(struct mii_softc *); static void rgephy_load_dspcode(struct mii_softc *); +static void rgephy_disable_eee(struct mii_softc *); static const struct mii_phydesc rgephys[] = { MII_PHY_DESC(REALTEK, RTL8169S), @@ -517,10 +518,9 @@ rgephy_reset(struct mii_softc *sc) switch (sc->mii_mpd_rev) { case RGEPHY_8211F: pcr = PHY_READ(sc, RGEPHY_F_MII_PCR1); - if ((pcr & RGEPHY_F_PCR1_MDI_MM) != 0) { - pcr &= ~RGEPHY_F_PCR1_MDI_MM; - PHY_WRITE(sc, RGEPHY_F_MII_PCR1, pcr); - } + pcr &= ~(RGEPHY_F_PCR1_MDI_MM | RGEPHY_F_PCR1_ALDPS_EN); + PHY_WRITE(sc, RGEPHY_F_MII_PCR1, pcr); + rgephy_disable_eee(sc); break; case RGEPHY_8211C: if ((sc->mii_flags & MIIF_PHYPRIV0) == 0) { @@ -548,3 +548,29 @@ rgephy_reset(struct mii_softc *sc) DELAY(1000); rgephy_load_dspcode(sc); } + +static void +rgephy_disable_eee(struct mii_softc *sc) +{ + uint16_t anar; + + PHY_WRITE(sc, RGEPHY_F_EPAGSR, 0x0000); + PHY_WRITE(sc, MII_MMDACR, MMDACR_FN_ADDRESS | + (MMDACR_DADDRMASK & RGEPHY_F_MMD_DEV_7)); + PHY_WRITE(sc, MII_MMDAADR, RGEPHY_F_MMD_EEEAR); + PHY_WRITE(sc, MII_MMDACR, MMDACR_FN_DATANPI | + (MMDACR_DADDRMASK & RGEPHY_F_MMD_DEV_7)); + PHY_WRITE(sc, MII_MMDAADR, 0x0000); + PHY_WRITE(sc, MII_MMDACR, 0x0000); + /* + * XXX + * Restart auto-negotiation to take changes effect. + * This may result in link establishment. + */ + anar = BMSR_MEDIA_TO_ANAR(sc->mii_capabilities) | ANAR_CSMA; + PHY_WRITE(sc, RGEPHY_MII_ANAR, anar); + PHY_WRITE(sc, RGEPHY_MII_1000CTL, RGEPHY_1000CTL_AHD | + RGEPHY_1000CTL_AFD); + PHY_WRITE(sc, RGEPHY_MII_BMCR, RGEPHY_BMCR_RESET | + RGEPHY_BMCR_AUTOEN | RGEPHY_BMCR_STARTNEG); +} Modified: head/sys/dev/mii/rgephyreg.h ============================================================================== --- head/sys/dev/mii/rgephyreg.h Thu Dec 3 04:35:44 2015 (r291675) +++ head/sys/dev/mii/rgephyreg.h Thu Dec 3 05:27:39 2015 (r291676) @@ -183,4 +183,20 @@ #define RGEPHY_F_SSR_MDI 0x0002 /* MDI/MDIX */ #define RGEPHY_F_SSR_JABBER 0x0001 /* Jabber */ +/* RTL8211F */ +#define RGEPHY_F_EPAGSR 0x1F /* Extension page select register */ + +/* RTL8211F */ +#define RGEPHY_F_MMD_DEV_7 0x07 + +/* RTL8211F MMD device 7 */ +#define RGEPHY_F_MMD_EEEAR 0x3C /* EEE advertisement */ +#define EEEAR_1000T 0x0004 /* adv. 1000baseT EEE */ +#define EEEAR_100TX 0x0002 /* adv. 100baseTX EEE */ + +/* RTL8211F MMD device 7 */ +#define RGEPHY_F_MMD_EEELPAR 0x3D /* EEE link partner abilities */ +#define EEELPAR_1000T 0x0004 /* link partner 1000baseT EEE capable */ +#define EEELPAR_100TX 0x0002 /* link partner 100baseTX EEE capable */ + #endif /* _DEV_RGEPHY_MIIREG_H_ */ From owner-svn-src-all@freebsd.org Thu Dec 3 07:13:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6317A3E731; Thu, 3 Dec 2015 07:13:15 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F9A01226; Thu, 3 Dec 2015 07:13:15 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB37DEhc097987; Thu, 3 Dec 2015 07:13:14 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB37DDb1097981; Thu, 3 Dec 2015 07:13:13 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512030713.tB37DDb1097981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 3 Dec 2015 07:13:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291677 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 07:13:15 -0000 Author: arybchik Date: Thu Dec 3 07:13:13 2015 New Revision: 291677 URL: https://svnweb.freebsd.org/changeset/base/291677 Log: sfxge: add MCDI logging support to common code Submitted by: Andy Moreton Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4331 Modified: head/sys/dev/sfxge/common/efsys.h head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_check.h head/sys/dev/sfxge/common/efx_mcdi.c head/sys/dev/sfxge/common/hunt_mcdi.c head/sys/dev/sfxge/common/siena_mcdi.c Modified: head/sys/dev/sfxge/common/efsys.h ============================================================================== --- head/sys/dev/sfxge/common/efsys.h Thu Dec 3 05:27:39 2015 (r291676) +++ head/sys/dev/sfxge/common/efsys.h Thu Dec 3 07:13:13 2015 (r291677) @@ -245,6 +245,7 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b #endif #define EFSYS_OPT_MCDI 1 +#define EFSYS_OPT_MCDI_LOGGING 0 #define EFSYS_OPT_MAC_FALCON_GMAC 0 #define EFSYS_OPT_MAC_FALCON_XMAC 0 Modified: head/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Thu Dec 3 05:27:39 2015 (r291676) +++ head/sys/dev/sfxge/common/efx.h Thu Dec 3 07:13:13 2015 (r291677) @@ -201,12 +201,25 @@ typedef enum efx_mcdi_exception_e { EFX_MCDI_EXCEPTION_MC_BADASSERT, } efx_mcdi_exception_t; +#if EFSYS_OPT_MCDI_LOGGING +typedef enum efx_log_msg_e +{ + EFX_LOG_INVALID, + EFX_LOG_MCDI_REQUEST, + EFX_LOG_MCDI_RESPONSE, +} efx_log_msg_t; +#endif /* EFSYS_OPT_MCDI_LOGGING */ + typedef struct efx_mcdi_transport_s { void *emt_context; efsys_mem_t *emt_dma_mem; void (*emt_execute)(void *, efx_mcdi_req_t *); void (*emt_ev_cpl)(void *); void (*emt_exception)(void *, efx_mcdi_exception_t); +#if EFSYS_OPT_MCDI_LOGGING + void (*emt_logger)(void *, efx_log_msg_t, + void *, size_t, void *, size_t); +#endif /* EFSYS_OPT_MCDI_LOGGING */ } efx_mcdi_transport_t; extern __checkReturn efx_rc_t Modified: head/sys/dev/sfxge/common/efx_check.h ============================================================================== --- head/sys/dev/sfxge/common/efx_check.h Thu Dec 3 05:27:39 2015 (r291676) +++ head/sys/dev/sfxge/common/efx_check.h Thu Dec 3 07:13:13 2015 (r291677) @@ -146,6 +146,13 @@ # error "HUNTINGTON requires MCDI" #endif +/* Support MCDI logging */ +#if EFSYS_OPT_MCDI_LOGGING +# if !EFSYS_OPT_MCDI +# error "MCDI_LOGGING requires MCDI" +# endif +#endif /* EFSYS_OPT_MCDI_LOGGING */ + /* Support LM87 monitor */ #if EFSYS_OPT_MON_LM87 # if !EFSYS_OPT_FALCON Modified: head/sys/dev/sfxge/common/efx_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.c Thu Dec 3 05:27:39 2015 (r291676) +++ head/sys/dev/sfxge/common/efx_mcdi.c Thu Dec 3 07:13:13 2015 (r291677) @@ -468,9 +468,8 @@ efx_mcdi_ev_cpl( } else { emrp->emr_out_length_used = outlen; emrp->emr_rc = 0; - - emcop->emco_request_copyout(enp, emrp); } + emcop->emco_request_copyout(enp, emrp); emtp->emt_ev_cpl(emtp->emt_context); } Modified: head/sys/dev/sfxge/common/hunt_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_mcdi.c Thu Dec 3 05:27:39 2015 (r291676) +++ head/sys/dev/sfxge/common/hunt_mcdi.c Thu Dec 3 07:13:13 2015 (r291677) @@ -143,6 +143,7 @@ hunt_mcdi_request_copyin( efsys_mem_t *esmp = emtp->emt_dma_mem; efx_mcdi_header_type_t hdr_type; efx_dword_t dword; + efx_dword_t hdr[2]; unsigned int xflags; unsigned int pos; size_t offset; @@ -160,7 +161,7 @@ hunt_mcdi_request_copyin( if (hdr_type == EFX_MCDI_HEADER_TYPE_V2) { /* Construct MCDI v2 header */ - EFX_POPULATE_DWORD_8(dword, + EFX_POPULATE_DWORD_8(hdr[0], MCDI_HEADER_CODE, MC_CMD_V2_EXTN, MCDI_HEADER_RESYNC, 1, MCDI_HEADER_DATALEN, 0, @@ -169,17 +170,17 @@ hunt_mcdi_request_copyin( MCDI_HEADER_ERROR, 0, MCDI_HEADER_RESPONSE, 0, MCDI_HEADER_XFLAGS, xflags); - EFSYS_MEM_WRITED(esmp, offset, &dword); - offset += sizeof (dword); + EFSYS_MEM_WRITED(esmp, offset, &hdr[0]); + offset += sizeof (efx_dword_t); - EFX_POPULATE_DWORD_2(dword, + EFX_POPULATE_DWORD_2(hdr[1], MC_CMD_V2_EXTN_IN_EXTENDED_CMD, emrp->emr_cmd, MC_CMD_V2_EXTN_IN_ACTUAL_LEN, emrp->emr_in_length); - EFSYS_MEM_WRITED(esmp, offset, &dword); - offset += sizeof (dword); + EFSYS_MEM_WRITED(esmp, offset, &hdr[1]); + offset += sizeof (efx_dword_t); } else { /* Construct MCDI v1 header */ - EFX_POPULATE_DWORD_8(dword, + EFX_POPULATE_DWORD_8(hdr[0], MCDI_HEADER_CODE, emrp->emr_cmd, MCDI_HEADER_RESYNC, 1, MCDI_HEADER_DATALEN, emrp->emr_in_length, @@ -188,10 +189,18 @@ hunt_mcdi_request_copyin( MCDI_HEADER_ERROR, 0, MCDI_HEADER_RESPONSE, 0, MCDI_HEADER_XFLAGS, xflags); - EFSYS_MEM_WRITED(esmp, offset, &dword); - offset += sizeof (dword); + EFSYS_MEM_WRITED(esmp, 0, &hdr[0]); + offset += sizeof (efx_dword_t); } +#if EFSYS_OPT_MCDI_LOGGING + if (emtp->emt_logger != NULL) { + emtp->emt_logger(emtp->emt_context, EFX_LOG_MCDI_REQUEST, + &hdr, offset, + emrp->emr_in_buf, emrp->emr_in_length); + } +#endif /* EFSYS_OPT_MCDI_LOGGING */ + /* Construct the payload */ for (pos = 0; pos < emrp->emr_in_length; pos += sizeof (efx_dword_t)) { memcpy(&dword, MCDI_IN(*emrp, efx_dword_t, pos), @@ -224,8 +233,7 @@ hunt_mcdi_request_copyout( efsys_mem_t *esmp = emtp->emt_dma_mem; unsigned int pos; unsigned int offset; - efx_dword_t hdr; - efx_dword_t hdr2; + efx_dword_t hdr[2]; efx_dword_t data; size_t bytes; @@ -233,16 +241,16 @@ hunt_mcdi_request_copyout( return; /* Read the command header to detect MCDI response format */ - EFSYS_MEM_READD(esmp, 0, &hdr); - if (EFX_DWORD_FIELD(hdr, MCDI_HEADER_CODE) == MC_CMD_V2_EXTN) { + EFSYS_MEM_READD(esmp, 0, &hdr[0]); + if (EFX_DWORD_FIELD(hdr[0], MCDI_HEADER_CODE) == MC_CMD_V2_EXTN) { offset = 2 * sizeof (efx_dword_t); /* * Read the actual payload length. The length given in the event * is only correct for responses with the V1 format. */ - EFSYS_MEM_READD(esmp, sizeof (efx_dword_t), &hdr2); - emrp->emr_out_length_used = EFX_DWORD_FIELD(hdr2, + EFSYS_MEM_READD(esmp, sizeof (efx_dword_t), &hdr[1]); + emrp->emr_out_length_used = EFX_DWORD_FIELD(hdr[1], MC_CMD_V2_EXTN_IN_ACTUAL_LEN); } else { offset = sizeof (efx_dword_t); @@ -255,6 +263,15 @@ hunt_mcdi_request_copyout( memcpy(MCDI_OUT(*emrp, efx_dword_t, pos), &data, MIN(sizeof (data), bytes - pos)); } + +#if EFSYS_OPT_MCDI_LOGGING + if (emtp->emt_logger != NULL) { + emtp->emt_logger(emtp->emt_context, + EFX_LOG_MCDI_RESPONSE, + &hdr, offset, + emrp->emr_out_buf, emrp->emr_out_length_used); + } +#endif /* EFSYS_OPT_MCDI_LOGGING */ } __checkReturn boolean_t @@ -265,7 +282,7 @@ hunt_mcdi_request_poll( const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; efsys_mem_t *esmp = emtp->emt_dma_mem; efx_mcdi_req_t *emrp; - efx_dword_t dword; + efx_dword_t hdr[2]; unsigned int seq; unsigned int cmd; unsigned int length; @@ -285,23 +302,21 @@ hunt_mcdi_request_poll( offset = 0; /* Read the command header */ - EFSYS_MEM_READD(esmp, offset, &dword); + EFSYS_MEM_READD(esmp, offset, &hdr[0]); offset += sizeof (efx_dword_t); - if (EFX_DWORD_FIELD(dword, MCDI_HEADER_RESPONSE) == 0) { + if (EFX_DWORD_FIELD(hdr[0], MCDI_HEADER_RESPONSE) == 0) { EFSYS_UNLOCK(enp->en_eslp, state); return (B_FALSE); } - if (EFX_DWORD_FIELD(dword, MCDI_HEADER_CODE) == MC_CMD_V2_EXTN) { - efx_dword_t dword2; - - EFSYS_MEM_READD(esmp, offset, &dword2); + if (EFX_DWORD_FIELD(hdr[0], MCDI_HEADER_CODE) == MC_CMD_V2_EXTN) { + EFSYS_MEM_READD(esmp, offset, &hdr[1]); offset += sizeof (efx_dword_t); - cmd = EFX_DWORD_FIELD(dword2, MC_CMD_V2_EXTN_IN_EXTENDED_CMD); - length = EFX_DWORD_FIELD(dword2, MC_CMD_V2_EXTN_IN_ACTUAL_LEN); + cmd = EFX_DWORD_FIELD(hdr[1], MC_CMD_V2_EXTN_IN_EXTENDED_CMD); + length = EFX_DWORD_FIELD(hdr[1], MC_CMD_V2_EXTN_IN_ACTUAL_LEN); } else { - cmd = EFX_DWORD_FIELD(dword, MCDI_HEADER_CODE); - length = EFX_DWORD_FIELD(dword, MCDI_HEADER_DATALEN); + cmd = EFX_DWORD_FIELD(hdr[0], MCDI_HEADER_CODE); + length = EFX_DWORD_FIELD(hdr[0], MCDI_HEADER_DATALEN); } /* Request complete */ @@ -309,7 +324,7 @@ hunt_mcdi_request_poll( seq = (emip->emi_seq - 1) & EFX_MASK32(MCDI_HEADER_SEQ); /* Check for synchronous reboot */ - if (EFX_DWORD_FIELD(dword, MCDI_HEADER_ERROR) != 0 && length == 0) { + if (EFX_DWORD_FIELD(hdr[0], MCDI_HEADER_ERROR) != 0 && length == 0) { /* The MC has rebooted since the request was sent. */ EFSYS_SPIN(EFX_MCDI_STATUS_SLEEP_US); hunt_mcdi_poll_reboot(enp); @@ -326,22 +341,31 @@ hunt_mcdi_request_poll( /* Check that the returned data is consistent */ if (cmd != emrp->emr_cmd || - EFX_DWORD_FIELD(dword, MCDI_HEADER_SEQ) != seq) { + EFX_DWORD_FIELD(hdr[0], MCDI_HEADER_SEQ) != seq) { /* Response is for a different request */ rc = EIO; goto fail2; } - if (EFX_DWORD_FIELD(dword, MCDI_HEADER_ERROR)) { - efx_dword_t errdword; + if (EFX_DWORD_FIELD(hdr[0], MCDI_HEADER_ERROR)) { + efx_dword_t err[2]; int errcode; int argnum; /* Read error code (and arg num for MCDI v2 commands) */ - EFSYS_MEM_READD(esmp, offset + MC_CMD_ERR_CODE_OFST, &errdword); - errcode = EFX_DWORD_FIELD(errdword, EFX_DWORD_0); + EFSYS_MEM_READD(esmp, offset + MC_CMD_ERR_CODE_OFST, &err[0]); + errcode = EFX_DWORD_FIELD(err[0], EFX_DWORD_0); - EFSYS_MEM_READD(esmp, offset + MC_CMD_ERR_ARG_OFST, &errdword); - argnum = EFX_DWORD_FIELD(errdword, EFX_DWORD_0); + EFSYS_MEM_READD(esmp, offset + MC_CMD_ERR_ARG_OFST, &err[1]); + argnum = EFX_DWORD_FIELD(err[1], EFX_DWORD_0); + +#if EFSYS_OPT_MCDI_LOGGING + if (emtp->emt_logger != NULL) { + emtp->emt_logger(emtp->emt_context, + EFX_LOG_MCDI_RESPONSE, + &hdr, offset, + &err, sizeof (err)); + } +#endif /* EFSYS_OPT_MCDI_LOGGING */ rc = efx_mcdi_request_errcode(errcode); if (!emrp->emr_quiet) { Modified: head/sys/dev/sfxge/common/siena_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/siena_mcdi.c Thu Dec 3 05:27:39 2015 (r291676) +++ head/sys/dev/sfxge/common/siena_mcdi.c Thu Dec 3 07:13:13 2015 (r291677) @@ -61,7 +61,11 @@ siena_mcdi_request_copyin( __in boolean_t ev_cpl, __in boolean_t new_epoch) { +#if EFSYS_OPT_MCDI_LOGGING + const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; +#endif efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); + efx_dword_t hdr; efx_dword_t dword; unsigned int xflags; unsigned int pdur; @@ -80,15 +84,24 @@ siena_mcdi_request_copyin( xflags |= MCDI_HEADER_XFLAGS_EVREQ; /* Construct the header in shared memory */ - EFX_POPULATE_DWORD_6(dword, + EFX_POPULATE_DWORD_6(hdr, MCDI_HEADER_CODE, emrp->emr_cmd, MCDI_HEADER_RESYNC, 1, MCDI_HEADER_DATALEN, emrp->emr_in_length, MCDI_HEADER_SEQ, seq, MCDI_HEADER_RESPONSE, 0, MCDI_HEADER_XFLAGS, xflags); - EFX_BAR_TBL_WRITED(enp, FR_CZ_MC_TREG_SMEM, pdur, &dword, B_TRUE); + EFX_BAR_TBL_WRITED(enp, FR_CZ_MC_TREG_SMEM, pdur, &hdr, B_TRUE); + +#if EFSYS_OPT_MCDI_LOGGING + if (emtp->emt_logger != NULL) { + emtp->emt_logger(emtp->emt_context, EFX_LOG_MCDI_REQUEST, + &hdr, sizeof (hdr), + emrp->emr_in_buf, emrp->emr_in_length); + } +#endif /* EFSYS_OPT_MCDI_LOGGING */ + /* Construct the payload */ for (pos = 0; pos < emrp->emr_in_length; pos += sizeof (efx_dword_t)) { memcpy(&dword, MCDI_IN(*emrp, efx_dword_t, pos), MIN(sizeof (dword), emrp->emr_in_length - pos)); @@ -106,6 +119,10 @@ siena_mcdi_request_copyout( __in efx_nic_t *enp, __in efx_mcdi_req_t *emrp) { +#if EFSYS_OPT_MCDI_LOGGING + const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; + efx_dword_t hdr; +#endif efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); unsigned int pos; unsigned int pdur; @@ -124,6 +141,17 @@ siena_mcdi_request_copyout( MIN(sizeof (data), bytes - pos)); } } + +#if EFSYS_OPT_MCDI_LOGGING + if (emtp->emt_logger != NULL) { + EFX_BAR_TBL_READD(enp, FR_CZ_MC_TREG_SMEM, pdur, &hdr, B_FALSE); + + emtp->emt_logger(emtp->emt_context, + EFX_LOG_MCDI_RESPONSE, + &hdr, sizeof (hdr), + emrp->emr_out_buf, emrp->emr_out_length_used); + } +#endif /* EFSYS_OPT_MCDI_LOGGING */ } efx_rc_t @@ -167,9 +195,12 @@ siena_mcdi_poll_reboot( siena_mcdi_request_poll( __in efx_nic_t *enp) { +#if EFSYS_OPT_MCDI_LOGGING + const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; +#endif efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip); efx_mcdi_req_t *emrp; - efx_dword_t dword; + efx_dword_t hdr; unsigned int pdur; unsigned int seq; unsigned int length; @@ -199,8 +230,8 @@ siena_mcdi_request_poll( pdur = SIENA_MCDI_PDU(emip); /* Read the command header */ - EFX_BAR_TBL_READD(enp, FR_CZ_MC_TREG_SMEM, pdur, &dword, B_FALSE); - if (EFX_DWORD_FIELD(dword, MCDI_HEADER_RESPONSE) == 0) { + EFX_BAR_TBL_READD(enp, FR_CZ_MC_TREG_SMEM, pdur, &hdr, B_FALSE); + if (EFX_DWORD_FIELD(hdr, MCDI_HEADER_RESPONSE) == 0) { EFSYS_UNLOCK(enp->en_eslp, state); return (B_FALSE); } @@ -210,8 +241,8 @@ siena_mcdi_request_poll( seq = (emip->emi_seq - 1) & EFX_MASK32(MCDI_HEADER_SEQ); /* Check for synchronous reboot */ - if (EFX_DWORD_FIELD(dword, MCDI_HEADER_ERROR) != 0 && - EFX_DWORD_FIELD(dword, MCDI_HEADER_DATALEN) == 0) { + if (EFX_DWORD_FIELD(hdr, MCDI_HEADER_ERROR) != 0 && + EFX_DWORD_FIELD(hdr, MCDI_HEADER_DATALEN) == 0) { /* Consume status word */ EFSYS_SPIN(EFX_MCDI_STATUS_SLEEP_US); siena_mcdi_poll_reboot(enp); @@ -223,15 +254,15 @@ siena_mcdi_request_poll( EFSYS_UNLOCK(enp->en_eslp, state); /* Check that the returned data is consistent */ - if (EFX_DWORD_FIELD(dword, MCDI_HEADER_CODE) != emrp->emr_cmd || - EFX_DWORD_FIELD(dword, MCDI_HEADER_SEQ) != seq) { + if (EFX_DWORD_FIELD(hdr, MCDI_HEADER_CODE) != emrp->emr_cmd || + EFX_DWORD_FIELD(hdr, MCDI_HEADER_SEQ) != seq) { /* Response is for a different request */ rc = EIO; goto fail3; } - length = EFX_DWORD_FIELD(dword, MCDI_HEADER_DATALEN); - if (EFX_DWORD_FIELD(dword, MCDI_HEADER_ERROR)) { + length = EFX_DWORD_FIELD(hdr, MCDI_HEADER_DATALEN); + if (EFX_DWORD_FIELD(hdr, MCDI_HEADER_ERROR)) { efx_dword_t errdword; int errcode; @@ -240,6 +271,16 @@ siena_mcdi_request_poll( pdur + 1 + (MC_CMD_ERR_CODE_OFST >> 2), &errdword, B_FALSE); errcode = EFX_DWORD_FIELD(errdword, EFX_DWORD_0); + +#if EFSYS_OPT_MCDI_LOGGING + if (emtp->emt_logger != NULL) { + emtp->emt_logger(emtp->emt_context, + EFX_LOG_MCDI_RESPONSE, + &hdr, sizeof (hdr), + &errdword, sizeof (errdword)); + } +#endif /* EFSYS_OPT_MCDI_LOGGING */ + rc = efx_mcdi_request_errcode(errcode); if (!emrp->emr_quiet) { EFSYS_PROBE2(mcdi_err, int, emrp->emr_cmd, From owner-svn-src-all@freebsd.org Thu Dec 3 07:22:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6ED63A3E9C4; Thu, 3 Dec 2015 07:22:54 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2236C1823; Thu, 3 Dec 2015 07:22:54 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB37Mrcv001013; Thu, 3 Dec 2015 07:22:53 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB37MrwI001012; Thu, 3 Dec 2015 07:22:53 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512030722.tB37MrwI001012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 3 Dec 2015 07:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291678 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 07:22:54 -0000 Author: arybchik Date: Thu Dec 3 07:22:53 2015 New Revision: 291678 URL: https://svnweb.freebsd.org/changeset/base/291678 Log: sfxge: sync TLV layout headers with firmwaresrc for event merging config Submitted by: Tom Millington 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 3 07:13:13 2015 (r291677) +++ head/sys/dev/sfxge/common/ef10_tlv_layout.h Thu Dec 3 07:22:53 2015 (r291678) @@ -330,7 +330,7 @@ struct tlv_tmp_gubbins { uint64_t tx1_tags; /* Bitmap */ uint64_t dl_tags; /* Bitmap */ uint32_t flags; -#define TLV_DPCPU_TX_STRIPE (1) /* TX striping is on */ +#define TLV_DPCPU_TX_STRIPE (1) /* No longer used, has no effect */ #define TLV_DPCPU_BIU_TAGS (2) /* Use BIU tag manager */ #define TLV_DPCPU_TX0_TAGS (4) /* tx0_tags is valid */ #define TLV_DPCPU_TX1_TAGS (8) /* tx1_tags is valid */ @@ -688,4 +688,42 @@ struct tlv_ocsd { #define TLV_OCSD_ENABLED 1 /* Default */ }; +/* Descriptor cache config. + * + * Sets the sizes of the TX and RX descriptor caches as a power of 2. It also + * sets the total number of VIs. When the number of VIs is reduced VIs are taken + * away from the highest numbered port first, so a vi_count of 1024 means 1024 + * VIs on the first port and 0 on the second (on a Torino). + */ + +#define TLV_TAG_DESCRIPTOR_CACHE_CONFIG (0x101d0000) + +struct tlv_descriptor_cache_config { + uint32_t tag; + uint32_t length; + uint8_t rx_desc_cache_size; + uint8_t tx_desc_cache_size; + uint16_t vi_count; +}; +#define TLV_DESC_CACHE_DEFAULT (0xff) +#define TLV_VI_COUNT_DEFAULT (0xffff) + +/* RX event merging config (read batching). + * + * Sets the global maximum number of events for the merging bins, and the + * global timeout configuration for the bins. + */ + +#define TLV_TAG_RX_EVENT_MERGING_CONFIG (0x101e0000) + +struct tlv_rx_event_merging_config { + uint32_t tag; + uint32_t length; + uint32_t max_events; +#define TLV_RX_EVENT_MERGING_CONFIG_MAX_EVENTS_MAX ((1 << 4) - 1) + uint32_t timeout_ns; +}; +#define TLV_RX_EVENT_MERGING_MAX_EVENTS_DEFAULT 7 +#define TLV_RX_EVENT_MERGING_TIMEOUT_NS_DEFAULT 8740 + #endif /* CI_MGMT_TLV_LAYOUT_H */ From owner-svn-src-all@freebsd.org Thu Dec 3 07:25:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA493A3EA23; Thu, 3 Dec 2015 07:25:00 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 865CA19AA; Thu, 3 Dec 2015 07:25:00 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB37OxhF001118; Thu, 3 Dec 2015 07:24:59 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB37OxEc001117; Thu, 3 Dec 2015 07:24:59 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512030724.tB37OxEc001117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 3 Dec 2015 07:24:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291679 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 07:25:00 -0000 Author: arybchik Date: Thu Dec 3 07:24:59 2015 New Revision: 291679 URL: https://svnweb.freebsd.org/changeset/base/291679 Log: sfxge: add markers for autogenerated defines Move use defines outside. Submitted by: Guido Barzini Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/efx_regs_ef10.h Modified: head/sys/dev/sfxge/common/efx_regs_ef10.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs_ef10.h Thu Dec 3 07:22:53 2015 (r291678) +++ head/sys/dev/sfxge/common/efx_regs_ef10.h Thu Dec 3 07:24:59 2015 (r291679) @@ -37,6 +37,14 @@ extern "C" { #endif +/************************************************************************** + * NOTE: the line below marks the start of the autogenerated section + * EF10 registers and descriptors + * + ************************************************************************** + */ + + /* * BIU_HW_REV_ID_REG(32bit): * @@ -182,30 +190,6 @@ extern "C" { #define ERF_DZ_TX_DESC_LWORD_LBN 0 #define ERF_DZ_TX_DESC_LWORD_WIDTH 32 -/* - * The workaround for bug 35388 requires multiplexing writes through - * the ERF_DZ_TX_DESC_WPTR address. - * TX_DESC_UPD: 0ppppppppppp (bit 11 lost) - * EVQ_RPTR: 1000hhhhhhhh, 1001llllllll (split into high and low bits) - * EVQ_TMR: 11mmvvvvvvvv (bits 8:13 of value lost) - */ -#define ER_DD_EVQ_INDIRECT_OFST (ER_DZ_TX_DESC_UPD_REG_OFST + 2 * 4) -#define ER_DD_EVQ_INDIRECT_STEP ER_DZ_TX_DESC_UPD_REG_STEP -#define ERF_DD_EVQ_IND_RPTR_FLAGS_LBN 8 -#define ERF_DD_EVQ_IND_RPTR_FLAGS_WIDTH 4 -#define EFE_DD_EVQ_IND_RPTR_FLAGS_HIGH 8 -#define EFE_DD_EVQ_IND_RPTR_FLAGS_LOW 9 -#define ERF_DD_EVQ_IND_RPTR_LBN 0 -#define ERF_DD_EVQ_IND_RPTR_WIDTH 8 -#define ERF_DD_EVQ_IND_TIMER_FLAGS_LBN 10 -#define ERF_DD_EVQ_IND_TIMER_FLAGS_WIDTH 2 -#define EFE_DD_EVQ_IND_TIMER_FLAGS 3 -#define ERF_DD_EVQ_IND_TIMER_MODE_LBN 8 -#define ERF_DD_EVQ_IND_TIMER_MODE_WIDTH 2 -#define ERF_DD_EVQ_IND_TIMER_VAL_LBN 0 -#define ERF_DD_EVQ_IND_TIMER_VAL_WIDTH 8 - - /* ES_DRIVER_EV */ #define ESF_DZ_DRV_CODE_LBN 60 #define ESF_DZ_DRV_CODE_WIDTH 4 @@ -2935,6 +2919,35 @@ extern "C" { #define ESE_DZ_TO_PORT_B 0x2 #define ESE_DZ_TO_PORT_A 0x1 #define ESE_DZ_PM_IPI_NOOP 0x0 + +/************************************************************************* + * NOTE: the comment line above marks the end of the autogenerated section + */ + +/* + * The workaround for bug 35388 requires multiplexing writes through + * the ERF_DZ_TX_DESC_WPTR address. + * TX_DESC_UPD: 0ppppppppppp (bit 11 lost) + * EVQ_RPTR: 1000hhhhhhhh, 1001llllllll (split into high and low bits) + * EVQ_TMR: 11mmvvvvvvvv (bits 8:13 of value lost) + */ +#define ER_DD_EVQ_INDIRECT_OFST (ER_DZ_TX_DESC_UPD_REG_OFST + 2 * 4) +#define ER_DD_EVQ_INDIRECT_STEP ER_DZ_TX_DESC_UPD_REG_STEP +#define ERF_DD_EVQ_IND_RPTR_FLAGS_LBN 8 +#define ERF_DD_EVQ_IND_RPTR_FLAGS_WIDTH 4 +#define EFE_DD_EVQ_IND_RPTR_FLAGS_HIGH 8 +#define EFE_DD_EVQ_IND_RPTR_FLAGS_LOW 9 +#define ERF_DD_EVQ_IND_RPTR_LBN 0 +#define ERF_DD_EVQ_IND_RPTR_WIDTH 8 +#define ERF_DD_EVQ_IND_TIMER_FLAGS_LBN 10 +#define ERF_DD_EVQ_IND_TIMER_FLAGS_WIDTH 2 +#define EFE_DD_EVQ_IND_TIMER_FLAGS 3 +#define ERF_DD_EVQ_IND_TIMER_MODE_LBN 8 +#define ERF_DD_EVQ_IND_TIMER_MODE_WIDTH 2 +#define ERF_DD_EVQ_IND_TIMER_VAL_LBN 0 +#define ERF_DD_EVQ_IND_TIMER_VAL_WIDTH 8 + + #ifdef __cplusplus } #endif From owner-svn-src-all@freebsd.org Thu Dec 3 07:28:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED195A3EAC3; Thu, 3 Dec 2015 07:28:58 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFD6A1B33; Thu, 3 Dec 2015 07:28:58 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB37SvmF001275; Thu, 3 Dec 2015 07:28:57 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB37Svcg001274; Thu, 3 Dec 2015 07:28:57 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512030728.tB37Svcg001274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 3 Dec 2015 07:28:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291680 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 07:28:59 -0000 Author: arybchik Date: Thu Dec 3 07:28:57 2015 New Revision: 291680 URL: https://svnweb.freebsd.org/changeset/base/291680 Log: sfxge: remove internal register definitions that should not be used by host code Submitted by: Guido Barzini Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/efx_regs_ef10.h Modified: head/sys/dev/sfxge/common/efx_regs_ef10.h ============================================================================== --- head/sys/dev/sfxge/common/efx_regs_ef10.h Thu Dec 3 07:24:59 2015 (r291679) +++ head/sys/dev/sfxge/common/efx_regs_ef10.h Thu Dec 3 07:28:57 2015 (r291680) @@ -44,7 +44,6 @@ extern "C" { ************************************************************************** */ - /* * BIU_HW_REV_ID_REG(32bit): * @@ -190,6 +189,7 @@ extern "C" { #define ERF_DZ_TX_DESC_LWORD_LBN 0 #define ERF_DZ_TX_DESC_LWORD_WIDTH 32 + /* ES_DRIVER_EV */ #define ESF_DZ_DRV_CODE_LBN 60 #define ESF_DZ_DRV_CODE_WIDTH 4 @@ -226,1310 +226,6 @@ extern "C" { #define ESF_DZ_EV_DATA_WIDTH 60 -/* ES_FF_UMSG_CPU2DL_DESC_FETCH */ -#define ESF_DZ_C2DDF_DSCR_CACHE_RPTR_LBN 208 -#define ESF_DZ_C2DDF_DSCR_CACHE_RPTR_WIDTH 6 -#define ESF_DZ_C2DDF_QID_LBN 160 -#define ESF_DZ_C2DDF_QID_WIDTH 11 -#define ESF_DZ_C2DDF_DSCR_BASE_PAGE_ID_LBN 64 -#define ESF_DZ_C2DDF_DSCR_BASE_PAGE_ID_WIDTH 18 -#define ESF_DZ_C2DDF_DSCR_HW_RPTR_LBN 48 -#define ESF_DZ_C2DDF_DSCR_HW_RPTR_WIDTH 12 -#define ESF_DZ_C2DDF_DSCR_HW_WPTR_LBN 32 -#define ESF_DZ_C2DDF_DSCR_HW_WPTR_WIDTH 12 -#define ESF_DZ_C2DDF_OID_LBN 16 -#define ESF_DZ_C2DDF_OID_WIDTH 12 -#define ESF_DZ_C2DDF_DSCR_SIZE_LBN 13 -#define ESF_DZ_C2DDF_DSCR_SIZE_WIDTH 3 -#define ESE_DZ_C2DDF_DSCR_SIZE_512 7 -#define ESE_DZ_C2DDF_DSCR_SIZE_1K 6 -#define ESE_DZ_C2DDF_DSCR_SIZE_2K 5 -#define ESE_DZ_C2DDF_DSCR_SIZE_4K 4 -#define ESF_DZ_C2DDF_BIU_ARGS_LBN 0 -#define ESF_DZ_C2DDF_BIU_ARGS_WIDTH 13 - - -/* ES_FF_UMSG_CPU2DL_DESC_PUSH */ -#define ESF_DZ_C2DDP_DSCR_HW_RPTR_LBN 224 -#define ESF_DZ_C2DDP_DSCR_HW_RPTR_WIDTH 12 -#define ESF_DZ_C2DDP_DESC_DW0_LBN 128 -#define ESF_DZ_C2DDP_DESC_DW0_WIDTH 32 -#define ESF_DZ_C2DDP_DESC_DW1_LBN 160 -#define ESF_DZ_C2DDP_DESC_DW1_WIDTH 32 -#define ESF_DZ_C2DDP_DESC_LBN 128 -#define ESF_DZ_C2DDP_DESC_WIDTH 64 -#define ESF_DZ_C2DDP_QID_LBN 64 -#define ESF_DZ_C2DDP_QID_WIDTH 11 -#define ESF_DZ_C2DDP_DSCR_HW_WPTR_LBN 32 -#define ESF_DZ_C2DDP_DSCR_HW_WPTR_WIDTH 12 -#define ESF_DZ_C2DDP_OID_LBN 16 -#define ESF_DZ_C2DDP_OID_WIDTH 12 -#define ESF_DZ_C2DDP_DSCR_SIZE_LBN 0 -#define ESF_DZ_C2DDP_DSCR_SIZE_WIDTH 3 -#define ESE_DZ_C2DDF_DSCR_SIZE_512 7 -#define ESE_DZ_C2DDF_DSCR_SIZE_1K 6 -#define ESE_DZ_C2DDF_DSCR_SIZE_2K 5 -#define ESE_DZ_C2DDF_DSCR_SIZE_4K 4 - - -/* ES_FF_UMSG_CPU2DL_GPRD */ -#define ESF_DZ_C2DG_ENCODED_HOST_ADDR_DW0_LBN 64 -#define ESF_DZ_C2DG_ENCODED_HOST_ADDR_DW0_WIDTH 32 -#define ESF_DZ_C2DG_ENCODED_HOST_ADDR_DW1_LBN 96 -#define ESF_DZ_C2DG_ENCODED_HOST_ADDR_DW1_WIDTH 16 -#define ESF_DZ_C2DG_ENCODED_HOST_ADDR_LBN 64 -#define ESF_DZ_C2DG_ENCODED_HOST_ADDR_WIDTH 48 -#define ESF_DZ_C2DG_SMC_ADDR_LBN 16 -#define ESF_DZ_C2DG_SMC_ADDR_WIDTH 16 -#define ESF_DZ_C2DG_BIU_ARGS_LBN 0 -#define ESF_DZ_C2DG_BIU_ARGS_WIDTH 14 - - -/* ES_FF_UMSG_CPU2EV_SOFT */ -#define ESF_DZ_C2ES_TBD_LBN 0 -#define ESF_DZ_C2ES_TBD_WIDTH 1 - - -/* ES_FF_UMSG_CPU2EV_TXCMPLT */ -#define ESF_DZ_C2ET_EV_SOFT2_LBN 48 -#define ESF_DZ_C2ET_EV_SOFT2_WIDTH 16 -#define ESF_DZ_C2ET_EV_CODE_LBN 42 -#define ESF_DZ_C2ET_EV_CODE_WIDTH 4 -#define ESF_DZ_C2ET_EV_OVERRIDE_HOLDOFF_LBN 41 -#define ESF_DZ_C2ET_EV_OVERRIDE_HOLDOFF_WIDTH 1 -#define ESF_DZ_C2ET_EV_DROP_EVENT_LBN 40 -#define ESF_DZ_C2ET_EV_DROP_EVENT_WIDTH 1 -#define ESF_DZ_C2ET_EV_CAN_MERGE_LBN 39 -#define ESF_DZ_C2ET_EV_CAN_MERGE_WIDTH 1 -#define ESF_DZ_C2ET_EV_SOFT1_LBN 32 -#define ESF_DZ_C2ET_EV_SOFT1_WIDTH 7 -#define ESF_DZ_C2ET_DSCR_IDX_LBN 16 -#define ESF_DZ_C2ET_DSCR_IDX_WIDTH 16 -#define ESF_DZ_C2ET_EV_QID_LBN 5 -#define ESF_DZ_C2ET_EV_QID_WIDTH 11 -#define ESF_DZ_C2ET_EV_QLABEL_LBN 0 -#define ESF_DZ_C2ET_EV_QLABEL_WIDTH 5 - - -/* ES_FF_UMSG_CPU2RXDP_INGR_BUFOP */ -#define ESF_DZ_C2RIB_EV_DISABLE_LBN 191 -#define ESF_DZ_C2RIB_EV_DISABLE_WIDTH 1 -#define ESF_DZ_C2RIB_EV_SOFT_LBN 188 -#define ESF_DZ_C2RIB_EV_SOFT_WIDTH 3 -#define ESF_DZ_C2RIB_EV_DESC_PTR_LBN 176 -#define ESF_DZ_C2RIB_EV_DESC_PTR_WIDTH 12 -#define ESF_DZ_C2RIB_EV_ARG1_LBN 160 -#define ESF_DZ_C2RIB_EV_ARG1_WIDTH 16 -#define ESF_DZ_C2RIB_ENCODED_HOST_ADDR_DW0_LBN 64 -#define ESF_DZ_C2RIB_ENCODED_HOST_ADDR_DW0_WIDTH 32 -#define ESF_DZ_C2RIB_ENCODED_HOST_ADDR_DW1_LBN 96 -#define ESF_DZ_C2RIB_ENCODED_HOST_ADDR_DW1_WIDTH 16 -#define ESF_DZ_C2RIB_ENCODED_HOST_ADDR_LBN 64 -#define ESF_DZ_C2RIB_ENCODED_HOST_ADDR_WIDTH 48 -#define ESF_DZ_C2RIB_BIU_ARGS_LBN 16 -#define ESF_DZ_C2RIB_BIU_ARGS_WIDTH 13 -#define ESF_DZ_C2RIB_EV_QID_LBN 5 -#define ESF_DZ_C2RIB_EV_QID_WIDTH 11 -#define ESF_DZ_C2RIB_EV_QLABEL_LBN 0 -#define ESF_DZ_C2RIB_EV_QLABEL_WIDTH 5 - - -/* ES_FF_UMSG_CPU2RXDP_INGR_PDISP */ -#define ESF_DZ_C2RIP_BUF_LEN_LBN 240 -#define ESF_DZ_C2RIP_BUF_LEN_WIDTH 16 -#define ESF_DZ_C2RIP_ENCODED_HOST_ADDR_DW0_LBN 192 -#define ESF_DZ_C2RIP_ENCODED_HOST_ADDR_DW0_WIDTH 32 -#define ESF_DZ_C2RIP_ENCODED_HOST_ADDR_DW1_LBN 224 -#define ESF_DZ_C2RIP_ENCODED_HOST_ADDR_DW1_WIDTH 16 -#define ESF_DZ_C2RIP_ENCODED_HOST_ADDR_LBN 192 -#define ESF_DZ_C2RIP_ENCODED_HOST_ADDR_WIDTH 48 -#define ESF_DZ_C2RIP_EV_DISABLE_LBN 191 -#define ESF_DZ_C2RIP_EV_DISABLE_WIDTH 1 -#define ESF_DZ_C2RIP_EV_SOFT_LBN 188 -#define ESF_DZ_C2RIP_EV_SOFT_WIDTH 3 -#define ESF_DZ_C2RIP_EV_DESC_PTR_LBN 176 -#define ESF_DZ_C2RIP_EV_DESC_PTR_WIDTH 12 -#define ESF_DZ_C2RIP_EV_ARG1_LBN 160 -#define ESF_DZ_C2RIP_EV_ARG1_WIDTH 16 -#define ESF_DZ_C2RIP_UPD_CRC_MODE_LBN 157 -#define ESF_DZ_C2RIP_UPD_CRC_MODE_WIDTH 3 -#define ESE_DZ_C2RIP_FCOIP_FCOE 4 -#define ESE_DZ_C2RIP_ISCSI_HDR_AND_PYLD 3 -#define ESE_DZ_C2RIP_ISCSI_HDR 2 -#define ESE_DZ_C2RIP_FCOE 1 -#define ESE_DZ_C2RIP_OFF 0 -#define ESF_DZ_C2RIP_BIU_ARGS_LBN 144 -#define ESF_DZ_C2RIP_BIU_ARGS_WIDTH 13 -#define ESF_DZ_C2RIP_EV_QID_LBN 133 -#define ESF_DZ_C2RIP_EV_QID_WIDTH 11 -#define ESF_DZ_C2RIP_EV_QLABEL_LBN 128 -#define ESF_DZ_C2RIP_EV_QLABEL_WIDTH 5 -#define ESF_DZ_C2RIP_PEDIT_DELTA_LBN 104 -#define ESF_DZ_C2RIP_PEDIT_DELTA_WIDTH 8 -#define ESF_DZ_C2RIP_PYLOAD_OFST_LBN 96 -#define ESF_DZ_C2RIP_PYLOAD_OFST_WIDTH 8 -#define ESF_DZ_C2RIP_L4_HDR_OFST_LBN 88 -#define ESF_DZ_C2RIP_L4_HDR_OFST_WIDTH 8 -#define ESF_DZ_C2RIP_L3_HDR_OFST_LBN 80 -#define ESF_DZ_C2RIP_L3_HDR_OFST_WIDTH 8 -#define ESF_DZ_C2RIP_IS_UDP_LBN 69 -#define ESF_DZ_C2RIP_IS_UDP_WIDTH 1 -#define ESF_DZ_C2RIP_IS_TCP_LBN 68 -#define ESF_DZ_C2RIP_IS_TCP_WIDTH 1 -#define ESF_DZ_C2RIP_IS_IPV6_LBN 67 -#define ESF_DZ_C2RIP_IS_IPV6_WIDTH 1 -#define ESF_DZ_C2RIP_IS_IPV4_LBN 66 -#define ESF_DZ_C2RIP_IS_IPV4_WIDTH 1 -#define ESF_DZ_C2RIP_IS_FCOE_LBN 65 -#define ESF_DZ_C2RIP_IS_FCOE_WIDTH 1 -#define ESF_DZ_C2RIP_PARSE_INCOMP_LBN 64 -#define ESF_DZ_C2RIP_PARSE_INCOMP_WIDTH 1 -#define ESF_DZ_C2RIP_FINFO_WRD3_LBN 48 -#define ESF_DZ_C2RIP_FINFO_WRD3_WIDTH 16 -#define ESF_DZ_C2RIP_FINFO_WRD2_LBN 32 -#define ESF_DZ_C2RIP_FINFO_WRD2_WIDTH 16 -#define ESF_DZ_C2RIP_FINFO_WRD1_LBN 16 -#define ESF_DZ_C2RIP_FINFO_WRD1_WIDTH 16 -#define ESF_DZ_C2RIP_FINFO_SRCDST_LBN 0 -#define ESF_DZ_C2RIP_FINFO_SRCDST_WIDTH 16 - - -/* ES_FF_UMSG_CPU2RXDP_INGR_SOFT */ -#define ESF_DZ_C2RIS_SOFT3_LBN 48 -#define ESF_DZ_C2RIS_SOFT3_WIDTH 16 -#define ESF_DZ_C2RIS_SOFT2_LBN 32 -#define ESF_DZ_C2RIS_SOFT2_WIDTH 16 -#define ESF_DZ_C2RIS_SOFT1_LBN 16 -#define ESF_DZ_C2RIS_SOFT1_WIDTH 16 -#define ESF_DZ_C2RIS_SOFT0_LBN 0 -#define ESF_DZ_C2RIS_SOFT0_WIDTH 16 - - -/* ES_FF_UMSG_CPU2SMC_BUFLKUP */ -#define ESF_DZ_C2SB_PAGE_ID_LBN 16 -#define ESF_DZ_C2SB_PAGE_ID_WIDTH 18 -#define ESF_DZ_C2SB_EXP_PAGE_ID_LBN 0 -#define ESF_DZ_C2SB_EXP_PAGE_ID_WIDTH 12 - - -/* ES_FF_UMSG_CPU2SMC_DESCOP */ -#define ESF_DZ_C2SD_LEN_LBN 112 -#define ESF_DZ_C2SD_LEN_WIDTH 14 -#define ESF_DZ_C2SD_ENCODED_HOST_ADDR_DW0_LBN 64 -#define ESF_DZ_C2SD_ENCODED_HOST_ADDR_DW0_WIDTH 32 -#define ESF_DZ_C2SD_ENCODED_HOST_ADDR_DW1_LBN 96 -#define ESF_DZ_C2SD_ENCODED_HOST_ADDR_DW1_WIDTH 16 -#define ESF_DZ_C2SD_ENCODED_HOST_ADDR_LBN 64 -#define ESF_DZ_C2SD_ENCODED_HOST_ADDR_WIDTH 48 -#define ESF_DZ_C2SD_OFFSET_LBN 80 -#define ESF_DZ_C2SD_OFFSET_WIDTH 8 -#define ESF_DZ_C2SD_QID_LBN 32 -#define ESF_DZ_C2SD_QID_WIDTH 11 -#define ESF_DZ_C2SD_CONT_LBN 16 -#define ESF_DZ_C2SD_CONT_WIDTH 1 -#define ESF_DZ_C2SD_TYPE_LBN 0 -#define ESF_DZ_C2SD_TYPE_WIDTH 1 - - -/* ES_FF_UMSG_CPU2SMC_GPOP */ -#define ESF_DZ_C2SG_DATA_DW0_LBN 64 -#define ESF_DZ_C2SG_DATA_DW0_WIDTH 32 -#define ESF_DZ_C2SG_DATA_DW1_LBN 96 -#define ESF_DZ_C2SG_DATA_DW1_WIDTH 32 -#define ESF_DZ_C2SG_DATA_LBN 64 -#define ESF_DZ_C2SG_DATA_WIDTH 64 -#define ESF_DZ_C2SG_SOFT_LBN 48 -#define ESF_DZ_C2SG_SOFT_WIDTH 4 -#define ESF_DZ_C2SG_REFLECT_LBN 32 -#define ESF_DZ_C2SG_REFLECT_WIDTH 1 -#define ESF_DZ_C2SG_ADDR_LBN 0 -#define ESF_DZ_C2SG_ADDR_WIDTH 16 - - -/* ES_FF_UMSG_CPU2TXDP_DMA_BUFREQ */ -#define ESF_DZ_C2TDB_BUF_LEN_LBN 176 -#define ESF_DZ_C2TDB_BUF_LEN_WIDTH 16 -#define ESF_DZ_C2TDB_ENCODED_HOST_ADDR_DW0_LBN 128 -#define ESF_DZ_C2TDB_ENCODED_HOST_ADDR_DW0_WIDTH 32 -#define ESF_DZ_C2TDB_ENCODED_HOST_ADDR_DW1_LBN 160 -#define ESF_DZ_C2TDB_ENCODED_HOST_ADDR_DW1_WIDTH 16 -#define ESF_DZ_C2TDB_ENCODED_HOST_ADDR_LBN 128 -#define ESF_DZ_C2TDB_ENCODED_HOST_ADDR_WIDTH 48 -#define ESF_DZ_C2TDB_SOFT_LBN 112 -#define ESF_DZ_C2TDB_SOFT_WIDTH 14 -#define ESF_DZ_C2TDB_DESC_IDX_LBN 96 -#define ESF_DZ_C2TDB_DESC_IDX_WIDTH 16 -#define ESF_DZ_C2TDB_UPD_CRC_MODE_LBN 93 -#define ESF_DZ_C2TDB_UPD_CRC_MODE_WIDTH 3 -#define ESE_DZ_C2RIP_FCOIP_FCOE 4 -#define ESE_DZ_C2RIP_ISCSI_HDR_AND_PYLD 3 -#define ESE_DZ_C2RIP_ISCSI_HDR 2 -#define ESE_DZ_C2RIP_FCOE 1 -#define ESE_DZ_C2RIP_OFF 0 -#define ESF_DZ_C2TDB_BIU_ARGS_LBN 80 -#define ESF_DZ_C2TDB_BIU_ARGS_WIDTH 13 -#define ESF_DZ_C2TDB_CONT_LBN 64 -#define ESF_DZ_C2TDB_CONT_WIDTH 1 -#define ESF_DZ_C2TDB_FINFO_WRD3_LBN 48 -#define ESF_DZ_C2TDB_FINFO_WRD3_WIDTH 16 -#define ESF_DZ_C2TDB_FINFO_WRD2_LBN 32 -#define ESF_DZ_C2TDB_FINFO_WRD2_WIDTH 16 -#define ESF_DZ_C2TDB_FINFO_WRD1_LBN 16 -#define ESF_DZ_C2TDB_FINFO_WRD1_WIDTH 16 -#define ESF_DZ_C2TDB_FINFO_SRCDST_LBN 0 -#define ESF_DZ_C2TDB_FINFO_SRCDST_WIDTH 16 - - -/* ES_FF_UMSG_CPU2TXDP_DMA_PKTABORT */ -#define ESF_DZ_C2TDP_SOFT_LBN 48 -#define ESF_DZ_C2TDP_SOFT_WIDTH 14 -#define ESF_DZ_C2TDP_DESC_IDX_LBN 32 -#define ESF_DZ_C2TDP_DESC_IDX_WIDTH 16 -#define ESF_DZ_C2TDP_BIU_ARGS_LBN 16 -#define ESF_DZ_C2TDP_BIU_ARGS_WIDTH 14 - - -/* ES_FF_UMSG_CPU2TXDP_DMA_SOFT */ -#define ESF_DZ_C2TDS_SOFT3_LBN 48 -#define ESF_DZ_C2TDS_SOFT3_WIDTH 16 -#define ESF_DZ_C2TDS_SOFT2_LBN 32 -#define ESF_DZ_C2TDS_SOFT2_WIDTH 16 -#define ESF_DZ_C2TDS_SOFT1_LBN 16 -#define ESF_DZ_C2TDS_SOFT1_WIDTH 16 -#define ESF_DZ_C2TDS_SOFT0_LBN 0 -#define ESF_DZ_C2TDS_SOFT0_WIDTH 16 - - -/* ES_FF_UMSG_CPU2TXDP_EGR */ -#define ESF_DZ_C2TE_RMON_SOFT_LBN 240 -#define ESF_DZ_C2TE_RMON_SOFT_WIDTH 1 -#define ESF_DZ_C2TE_VLAN_PRIO_LBN 224 -#define ESF_DZ_C2TE_VLAN_PRIO_WIDTH 3 -#define ESF_DZ_C2TE_VLAN_LBN 208 -#define ESF_DZ_C2TE_VLAN_WIDTH 1 -#define ESF_DZ_C2TE_QID_LBN 192 -#define ESF_DZ_C2TE_QID_WIDTH 11 -#define ESF_DZ_C2TE_PEDIT_DELTA_LBN 168 -#define ESF_DZ_C2TE_PEDIT_DELTA_WIDTH 8 -#define ESF_DZ_C2TE_PYLOAD_OFST_LBN 160 -#define ESF_DZ_C2TE_PYLOAD_OFST_WIDTH 8 -#define ESF_DZ_C2TE_L4_HDR_OFST_LBN 152 -#define ESF_DZ_C2TE_L4_HDR_OFST_WIDTH 8 -#define ESF_DZ_C2TE_L3_HDR_OFST_LBN 144 -#define ESF_DZ_C2TE_L3_HDR_OFST_WIDTH 8 -#define ESF_DZ_C2TE_IS_UDP_LBN 133 -#define ESF_DZ_C2TE_IS_UDP_WIDTH 1 -#define ESF_DZ_C2TE_IS_TCP_LBN 132 -#define ESF_DZ_C2TE_IS_TCP_WIDTH 1 -#define ESF_DZ_C2TE_IS_IPV6_LBN 131 -#define ESF_DZ_C2TE_IS_IPV6_WIDTH 1 -#define ESF_DZ_C2TE_IS_IPV4_LBN 130 -#define ESF_DZ_C2TE_IS_IPV4_WIDTH 1 -#define ESF_DZ_C2TE_IS_FCOE_LBN 129 -#define ESF_DZ_C2TE_IS_FCOE_WIDTH 1 -#define ESF_DZ_C2TE_PARSE_INCOMP_LBN 128 -#define ESF_DZ_C2TE_PARSE_INCOMP_WIDTH 1 -#define ESF_DZ_C2TE_UPD_CRC_MODE_LBN 98 -#define ESF_DZ_C2TE_UPD_CRC_MODE_WIDTH 3 -#define ESE_DZ_C2RIP_FCOIP_FCOE 4 -#define ESE_DZ_C2RIP_ISCSI_HDR_AND_PYLD 3 -#define ESE_DZ_C2RIP_ISCSI_HDR 2 -#define ESE_DZ_C2RIP_FCOE 1 -#define ESE_DZ_C2RIP_OFF 0 -#define ESF_DZ_C2TE_UPD_TCPUDPCSUM_MODE_LBN 97 -#define ESF_DZ_C2TE_UPD_TCPUDPCSUM_MODE_WIDTH 1 -#define ESF_DZ_C2TE_UPD_IPCSUM_MODE_LBN 96 -#define ESF_DZ_C2TE_UPD_IPCSUM_MODE_WIDTH 1 -#define ESF_DZ_C2TE_PKT_LEN_LBN 64 -#define ESF_DZ_C2TE_PKT_LEN_WIDTH 16 -#define ESF_DZ_C2TE_FINFO_WRD3_LBN 48 -#define ESF_DZ_C2TE_FINFO_WRD3_WIDTH 16 -#define ESF_DZ_C2TE_FINFO_WRD2_LBN 32 -#define ESF_DZ_C2TE_FINFO_WRD2_WIDTH 16 -#define ESF_DZ_C2TE_FINFO_WRD1_LBN 16 -#define ESF_DZ_C2TE_FINFO_WRD1_WIDTH 16 -#define ESF_DZ_C2TE_FINFO_SRCDST_LBN 0 -#define ESF_DZ_C2TE_FINFO_SRCDST_WIDTH 16 - - -/* ES_FF_UMSG_CPU2TXDP_EGR_SOFT */ -#define ESF_DZ_C2TES_SOFT3_LBN 48 -#define ESF_DZ_C2TES_SOFT3_WIDTH 16 -#define ESF_DZ_C2TES_SOFT2_LBN 32 -#define ESF_DZ_C2TES_SOFT2_WIDTH 16 -#define ESF_DZ_C2TES_SOFT1_LBN 16 -#define ESF_DZ_C2TES_SOFT1_WIDTH 16 -#define ESF_DZ_C2TES_SOFT0_LBN 0 -#define ESF_DZ_C2TES_SOFT0_WIDTH 16 - - -/* ES_FF_UMSG_DL2CPU_DESC_FETCH */ -#define ESF_DZ_D2CDF_REFL_DSCR_HW_WPTR_LBN 64 -#define ESF_DZ_D2CDF_REFL_DSCR_HW_WPTR_WIDTH 12 -#define ESF_DZ_D2CDF_FAIL_LBN 48 -#define ESF_DZ_D2CDF_FAIL_WIDTH 1 -#define ESF_DZ_D2CDF_QID_LBN 32 -#define ESF_DZ_D2CDF_QID_WIDTH 11 -#define ESF_DZ_D2CDF_NUM_DESC_LBN 16 -#define ESF_DZ_D2CDF_NUM_DESC_WIDTH 7 -#define ESF_DZ_D2CDF_NEW_DSCR_HW_RPTR_LBN 0 -#define ESF_DZ_D2CDF_NEW_DSCR_HW_RPTR_WIDTH 12 - - -/* ES_FF_UMSG_DL2CPU_GPRD */ -#define ESF_DZ_D2CG_BIU_ARGS_LBN 0 -#define ESF_DZ_D2CG_BIU_ARGS_WIDTH 14 - - -/* ES_FF_UMSG_DPCPU_PACER_TXQ_D_R_I_REQ */ -#define ESF_DZ_FRM_LEN_LBN 16 -#define ESF_DZ_FRM_LEN_WIDTH 15 -#define ESF_DZ_TXQ_ID_LBN 0 -#define ESF_DZ_TXQ_ID_WIDTH 10 - - -/* ES_FF_UMSG_PACER_BKT_TBL_RD_REQ */ -#define ESF_DZ_BKT_ID_LBN 0 -#define ESF_DZ_BKT_ID_WIDTH 10 - - -/* ES_FF_UMSG_PACER_BKT_TBL_RD_RSP */ -#define ESF_DZ_DUE_TIME_LBN 80 -#define ESF_DZ_DUE_TIME_WIDTH 16 -#define ESF_DZ_LAST_FILL_TIME_LBN 64 -#define ESF_DZ_LAST_FILL_TIME_WIDTH 16 -#define ESF_DZ_RATE_REC_LBN 48 -#define ESF_DZ_RATE_REC_WIDTH 16 -#define ESF_DZ_RATE_LBN 32 -#define ESF_DZ_RATE_WIDTH 16 -#define ESF_DZ_FILL_LEVEL_LBN 16 -#define ESF_DZ_FILL_LEVEL_WIDTH 16 -#define ESF_DZ_IDLE_LBN 15 -#define ESF_DZ_IDLE_WIDTH 1 -#define ESF_DZ_USED_LBN 14 -#define ESF_DZ_USED_WIDTH 1 -#define ESF_DZ_MAX_FILL_REG_LBN 12 -#define ESF_DZ_MAX_FILL_REG_WIDTH 2 -#define ESF_DZ_BKT_ID_LBN 0 -#define ESF_DZ_BKT_ID_WIDTH 10 - - -/* ES_FF_UMSG_PACER_BKT_TBL_WR_REQ */ -#define ESF_DZ_RATE_REC_LBN 48 -#define ESF_DZ_RATE_REC_WIDTH 16 -#define ESF_DZ_RATE_LBN 32 -#define ESF_DZ_RATE_WIDTH 16 -#define ESF_DZ_FILL_LEVEL_LBN 16 -#define ESF_DZ_FILL_LEVEL_WIDTH 16 -#define ESF_DZ_IDLE_LBN 15 -#define ESF_DZ_IDLE_WIDTH 1 -#define ESF_DZ_USED_LBN 14 -#define ESF_DZ_USED_WIDTH 1 -#define ESF_DZ_MAX_FILL_REG_LBN 12 -#define ESF_DZ_MAX_FILL_REG_WIDTH 2 -#define ESF_DZ_BKT_ID_LBN 0 -#define ESF_DZ_BKT_ID_WIDTH 10 - - -/* ES_FF_UMSG_PACER_TXQ_TBL_RD_REQ */ -#define ESF_DZ_TXQ_ID_LBN 0 -#define ESF_DZ_TXQ_ID_WIDTH 10 - - -/* ES_FF_UMSG_PACER_TXQ_TBL_RD_RSP */ -#define ESF_DZ_MAX_BKT2_LBN 112 -#define ESF_DZ_MAX_BKT2_WIDTH 10 -#define ESF_DZ_MAX_BKT1_LBN 96 -#define ESF_DZ_MAX_BKT1_WIDTH 10 -#define ESF_DZ_MAX_BKT0_LBN 80 -#define ESF_DZ_MAX_BKT0_WIDTH 10 -#define ESF_DZ_MIN_BKT_LBN 64 -#define ESF_DZ_MIN_BKT_WIDTH 10 -#define ESF_DZ_LABEL_LBN 48 -#define ESF_DZ_LABEL_WIDTH 4 -#define ESF_DZ_PQ_FLAGS_LBN 32 -#define ESF_DZ_PQ_FLAGS_WIDTH 3 -#define ESF_DZ_DSBL_LBN 16 -#define ESF_DZ_DSBL_WIDTH 1 -#define ESF_DZ_TXQ_ID_LBN 0 -#define ESF_DZ_TXQ_ID_WIDTH 10 - - -/* ES_FF_UMSG_PACER_TXQ_TBL_WR_REQ */ -#define ESF_DZ_MAX_BKT2_LBN 112 -#define ESF_DZ_MAX_BKT2_WIDTH 10 -#define ESF_DZ_MAX_BKT1_LBN 96 -#define ESF_DZ_MAX_BKT1_WIDTH 10 -#define ESF_DZ_MAX_BKT0_LBN 80 -#define ESF_DZ_MAX_BKT0_WIDTH 10 -#define ESF_DZ_MIN_BKT_LBN 64 -#define ESF_DZ_MIN_BKT_WIDTH 10 -#define ESF_DZ_LABEL_LBN 48 -#define ESF_DZ_LABEL_WIDTH 4 -#define ESF_DZ_PQ_FLAGS_LBN 32 -#define ESF_DZ_PQ_FLAGS_WIDTH 3 -#define ESF_DZ_DSBL_LBN 16 -#define ESF_DZ_DSBL_WIDTH 1 -#define ESF_DZ_TXQ_ID_LBN 0 -#define ESF_DZ_TXQ_ID_WIDTH 10 - - -/* ES_FF_UMSG_PE */ -#define ESF_DZ_PE_PKT_OFST_LBN 47 -#define ESF_DZ_PE_PKT_OFST_WIDTH 17 -#define ESF_DZ_PE_PEDIT_DELTA_LBN 40 -#define ESF_DZ_PE_PEDIT_DELTA_WIDTH 8 -#define ESF_DZ_PE_PYLOAD_OFST_LBN 32 -#define ESF_DZ_PE_PYLOAD_OFST_WIDTH 8 -#define ESF_DZ_PE_L4_HDR_OFST_LBN 24 -#define ESF_DZ_PE_L4_HDR_OFST_WIDTH 8 -#define ESF_DZ_PE_L3_HDR_OFST_LBN 16 -#define ESF_DZ_PE_L3_HDR_OFST_WIDTH 8 -#define ESF_DZ_PE_HAVE_UDP_HDR_LBN 5 -#define ESF_DZ_PE_HAVE_UDP_HDR_WIDTH 1 -#define ESF_DZ_PE_HAVE_TCP_HDR_LBN 4 -#define ESF_DZ_PE_HAVE_TCP_HDR_WIDTH 1 -#define ESF_DZ_PE_HAVE_IPV6_HDR_LBN 3 -#define ESF_DZ_PE_HAVE_IPV6_HDR_WIDTH 1 -#define ESF_DZ_PE_HAVE_IPV4_HDR_LBN 2 -#define ESF_DZ_PE_HAVE_IPV4_HDR_WIDTH 1 -#define ESF_DZ_PE_HAVE_FCOE_LBN 1 -#define ESF_DZ_PE_HAVE_FCOE_WIDTH 1 -#define ESF_DZ_PE_PARSE_INCOMP_LBN 0 -#define ESF_DZ_PE_PARSE_INCOMP_WIDTH 1 - - -/* ES_FF_UMSG_RXDP_EGR2CPU_SOFT */ -#define ESF_DZ_RE2CS_SOFT3_LBN 48 -#define ESF_DZ_RE2CS_SOFT3_WIDTH 16 -#define ESF_DZ_RE2CS_SOFT2_LBN 32 -#define ESF_DZ_RE2CS_SOFT2_WIDTH 16 -#define ESF_DZ_RE2CS_SOFT1_LBN 16 -#define ESF_DZ_RE2CS_SOFT1_WIDTH 16 -#define ESF_DZ_RE2CS_SOFT0_LBN 0 -#define ESF_DZ_RE2CS_SOFT0_WIDTH 16 - - -/* ES_FF_UMSG_RXDP_INGR2CPU */ -#define ESF_DZ_RI2C_QUEUE_ID_LBN 224 -#define ESF_DZ_RI2C_QUEUE_ID_WIDTH 11 -#define ESF_DZ_RI2C_LEN_LBN 208 -#define ESF_DZ_RI2C_LEN_WIDTH 16 -#define ESF_DZ_RI2C_L4_CLASS_LBN 205 -#define ESF_DZ_RI2C_L4_CLASS_WIDTH 3 -#define ESF_DZ_RI2C_L3_CLASS_LBN 202 -#define ESF_DZ_RI2C_L3_CLASS_WIDTH 3 -#define ESF_DZ_RI2C_ETHTAG_CLASS_LBN 199 -#define ESF_DZ_RI2C_ETHTAG_CLASS_WIDTH 3 -#define ESF_DZ_RI2C_ETHBASE_CLASS_LBN 196 -#define ESF_DZ_RI2C_ETHBASE_CLASS_WIDTH 3 -#define ESF_DZ_RI2C_MAC_CLASS_LBN 195 -#define ESF_DZ_RI2C_MAC_CLASS_WIDTH 1 -#define ESF_DZ_RI2C_PKT_OFST_LBN 176 -#define ESF_DZ_RI2C_PKT_OFST_WIDTH 16 -#define ESF_DZ_RI2C_PEDIT_DELTA_LBN 168 -#define ESF_DZ_RI2C_PEDIT_DELTA_WIDTH 8 -#define ESF_DZ_RI2C_PYLOAD_OFST_LBN 160 -#define ESF_DZ_RI2C_PYLOAD_OFST_WIDTH 8 -#define ESF_DZ_RI2C_L4_HDR_OFST_LBN 152 -#define ESF_DZ_RI2C_L4_HDR_OFST_WIDTH 8 -#define ESF_DZ_RI2C_L3_HDR_OFST_LBN 144 -#define ESF_DZ_RI2C_L3_HDR_OFST_WIDTH 8 -#define ESF_DZ_RI2C_HAVE_UDP_HDR_LBN 133 -#define ESF_DZ_RI2C_HAVE_UDP_HDR_WIDTH 1 -#define ESF_DZ_RI2C_HAVE_TCP_HDR_LBN 132 -#define ESF_DZ_RI2C_HAVE_TCP_HDR_WIDTH 1 -#define ESF_DZ_RI2C_HAVE_IPV6_HDR_LBN 131 -#define ESF_DZ_RI2C_HAVE_IPV6_HDR_WIDTH 1 -#define ESF_DZ_RI2C_HAVE_IPV4_HDR_LBN 130 -#define ESF_DZ_RI2C_HAVE_IPV4_HDR_WIDTH 1 -#define ESF_DZ_RI2C_HAVE_FCOE_LBN 129 -#define ESF_DZ_RI2C_HAVE_FCOE_WIDTH 1 -#define ESF_DZ_RI2C_PARSE_INCOMP_LBN 128 -#define ESF_DZ_RI2C_PARSE_INCOMP_WIDTH 1 -#define ESF_DZ_RI2C_EFINFO_WRD3_LBN 112 -#define ESF_DZ_RI2C_EFINFO_WRD3_WIDTH 16 -#define ESF_DZ_RI2C_EFINFO_WRD2_LBN 96 -#define ESF_DZ_RI2C_EFINFO_WRD2_WIDTH 16 -#define ESF_DZ_RI2C_EFINFO_WRD1_LBN 80 -#define ESF_DZ_RI2C_EFINFO_WRD1_WIDTH 16 -#define ESF_DZ_RI2C_EFINFO_WRD0_LBN 64 -#define ESF_DZ_RI2C_EFINFO_WRD0_WIDTH 16 -#define ESF_DZ_RI2C_FINFO_WRD3_LBN 48 -#define ESF_DZ_RI2C_FINFO_WRD3_WIDTH 16 -#define ESF_DZ_RI2C_FINFO_WRD2_LBN 32 -#define ESF_DZ_RI2C_FINFO_WRD2_WIDTH 16 -#define ESF_DZ_RI2C_FINFO_WRD1_LBN 16 -#define ESF_DZ_RI2C_FINFO_WRD1_WIDTH 16 -#define ESF_DZ_RI2C_FINFO_SRCDST_LBN 0 -#define ESF_DZ_RI2C_FINFO_SRCDST_WIDTH 16 - - -/* ES_FF_UMSG_SMC2CPU_BUFLKUP */ -#define ESF_DZ_S2CB_ENCODED_PAGE_ADDR_DW0_LBN 0 -#define ESF_DZ_S2CB_ENCODED_PAGE_ADDR_DW0_WIDTH 32 -#define ESF_DZ_S2CB_ENCODED_PAGE_ADDR_DW1_LBN 32 -#define ESF_DZ_S2CB_ENCODED_PAGE_ADDR_DW1_WIDTH 16 -#define ESF_DZ_S2CB_ENCODED_PAGE_ADDR_LBN 0 -#define ESF_DZ_S2CB_ENCODED_PAGE_ADDR_WIDTH 48 -#define ESF_DZ_S2CB_FAIL_LBN 32 -#define ESF_DZ_S2CB_FAIL_WIDTH 1 - - -/* ES_FF_UMSG_SMC2CPU_DESCRD */ -#define ESF_DZ_S2CD_BUF_LEN_LBN 112 -#define ESF_DZ_S2CD_BUF_LEN_WIDTH 14 -#define ESF_DZ_S2CD_ENCODED_HOST_ADDR_DW0_LBN 64 -#define ESF_DZ_S2CD_ENCODED_HOST_ADDR_DW0_WIDTH 32 -#define ESF_DZ_S2CD_ENCODED_HOST_ADDR_DW1_LBN 96 -#define ESF_DZ_S2CD_ENCODED_HOST_ADDR_DW1_WIDTH 16 -#define ESF_DZ_S2CD_ENCODED_HOST_ADDR_LBN 64 -#define ESF_DZ_S2CD_ENCODED_HOST_ADDR_WIDTH 48 -#define ESF_DZ_S2CD_CONT_LBN 16 -#define ESF_DZ_S2CD_CONT_WIDTH 1 -#define ESF_DZ_S2CD_TYPE_LBN 0 -#define ESF_DZ_S2CD_TYPE_WIDTH 1 - - -/* ES_FF_UMSG_SMC2CPU_GPRD */ -#define ESF_DZ_S2CG_DATA_DW0_LBN 64 -#define ESF_DZ_S2CG_DATA_DW0_WIDTH 32 -#define ESF_DZ_S2CG_DATA_DW1_LBN 96 -#define ESF_DZ_S2CG_DATA_DW1_WIDTH 32 -#define ESF_DZ_S2CG_DATA_LBN 64 -#define ESF_DZ_S2CG_DATA_WIDTH 64 -#define ESF_DZ_S2CG_SOFT_LBN 48 -#define ESF_DZ_S2CG_SOFT_WIDTH 4 -#define ESF_DZ_S2CG_FAIL_LBN 32 -#define ESF_DZ_S2CG_FAIL_WIDTH 1 - - -/* ES_FF_UMSG_TXDP_DMA2CPU_PKTRDY */ -#define ESF_DZ_TD2CP_L4_CLASS_LBN 250 -#define ESF_DZ_TD2CP_L4_CLASS_WIDTH 3 -#define ESF_DZ_TD2CP_L3_CLASS_LBN 247 -#define ESF_DZ_TD2CP_L3_CLASS_WIDTH 3 -#define ESF_DZ_TD2CP_ETHTAG_CLASS_LBN 244 -#define ESF_DZ_TD2CP_ETHTAG_CLASS_WIDTH 3 -#define ESF_DZ_TD2CP_ETHBASE_CLASS_LBN 241 -#define ESF_DZ_TD2CP_ETHBASE_CLASS_WIDTH 3 -#define ESF_DZ_TD2CP_MAC_CLASS_LBN 240 -#define ESF_DZ_TD2CP_MAC_CLASS_WIDTH 1 -#define ESF_DZ_TD2CP_PCIE_ERR_OR_ABORT_LBN 239 -#define ESF_DZ_TD2CP_PCIE_ERR_OR_ABORT_WIDTH 1 -#define ESF_DZ_TD2CP_PKT_ABORT_LBN 238 -#define ESF_DZ_TD2CP_PKT_ABORT_WIDTH 1 -#define ESF_DZ_TD2CP_SOFT_LBN 224 -#define ESF_DZ_TD2CP_SOFT_WIDTH 14 -#define ESF_DZ_TD2CP_DESC_IDX_LBN 208 -#define ESF_DZ_TD2CP_DESC_IDX_WIDTH 16 -#define ESF_DZ_TD2CP_PKT_LEN_LBN 192 -#define ESF_DZ_TD2CP_PKT_LEN_WIDTH 16 -#define ESF_DZ_TD2CP_PKT_OFFST_OR_FIRST_DESC_IDX_LBN 176 -#define ESF_DZ_TD2CP_PKT_OFFST_OR_FIRST_DESC_IDX_WIDTH 7 -#define ESF_DZ_TD2CP_PEDIT_DELTA_LBN 168 -#define ESF_DZ_TD2CP_PEDIT_DELTA_WIDTH 8 -#define ESF_DZ_TD2CP_PYLOAD_OFST_LBN 160 -#define ESF_DZ_TD2CP_PYLOAD_OFST_WIDTH 8 -#define ESF_DZ_TD2CP_L4_HDR_OFST_LBN 152 -#define ESF_DZ_TD2CP_L4_HDR_OFST_WIDTH 8 -#define ESF_DZ_TD2CP_L3_HDR_OFST_LBN 144 -#define ESF_DZ_TD2CP_L3_HDR_OFST_WIDTH 8 -#define ESF_DZ_TD2CP_IS_UDP_LBN 133 -#define ESF_DZ_TD2CP_IS_UDP_WIDTH 1 -#define ESF_DZ_TD2CP_IS_TCP_LBN 132 -#define ESF_DZ_TD2CP_IS_TCP_WIDTH 1 -#define ESF_DZ_TD2CP_IS_IPV6_LBN 131 -#define ESF_DZ_TD2CP_IS_IPV6_WIDTH 1 -#define ESF_DZ_TD2CP_IS_IPV4_LBN 130 -#define ESF_DZ_TD2CP_IS_IPV4_WIDTH 1 -#define ESF_DZ_TD2CP_IS_FCOE_LBN 129 -#define ESF_DZ_TD2CP_IS_FCOE_WIDTH 1 -#define ESF_DZ_TD2CP_PARSE_INCOMP_LBN 128 -#define ESF_DZ_TD2CP_PARSE_INCOMP_WIDTH 1 -#define ESF_DZ_TD2CP_EFINFO_WRD3_LBN 112 -#define ESF_DZ_TD2CP_EFINFO_WRD3_WIDTH 16 -#define ESF_DZ_TD2CP_EFINFO_WRD2_LBN 96 -#define ESF_DZ_TD2CP_EFINFO_WRD2_WIDTH 16 -#define ESF_DZ_TD2CP_EFINFO_WRD1_LBN 80 -#define ESF_DZ_TD2CP_EFINFO_WRD1_WIDTH 16 -#define ESF_DZ_TD2CP_EFINFO_WRD0_LBN 64 -#define ESF_DZ_TD2CP_EFINFO_WRD0_WIDTH 16 -#define ESF_DZ_TD2CP_FINFO_WRD3_LBN 48 -#define ESF_DZ_TD2CP_FINFO_WRD3_WIDTH 16 -#define ESF_DZ_TD2CP_FINFO_WRD2_LBN 32 -#define ESF_DZ_TD2CP_FINFO_WRD2_WIDTH 16 -#define ESF_DZ_TD2CP_FINFO_WRD1_LBN 16 -#define ESF_DZ_TD2CP_FINFO_WRD1_WIDTH 16 -#define ESF_DZ_TD2CP_FINFO_SRCDST_LBN 0 -#define ESF_DZ_TD2CP_FINFO_SRCDST_WIDTH 16 - - -/* ES_FF_UMSG_TXDP_DMA2CPU_SOFT */ -#define ESF_DZ_TD2CS_SOFT3_LBN 48 -#define ESF_DZ_TD2CS_SOFT3_WIDTH 16 -#define ESF_DZ_TD2CS_SOFT2_LBN 32 -#define ESF_DZ_TD2CS_SOFT2_WIDTH 16 -#define ESF_DZ_TD2CS_SOFT1_LBN 16 -#define ESF_DZ_TD2CS_SOFT1_WIDTH 16 -#define ESF_DZ_TD2CS_SOFT0_LBN 0 -#define ESF_DZ_TD2CS_SOFT0_WIDTH 16 - - -/* ES_FF_UMSG_TXDP_EGR2CPU_SOFT */ -#define ESF_DZ_TE2CS_SOFT3_LBN 48 -#define ESF_DZ_TE2CS_SOFT3_WIDTH 16 -#define ESF_DZ_TE2CS_SOFT2_LBN 32 -#define ESF_DZ_TE2CS_SOFT2_WIDTH 16 -#define ESF_DZ_TE2CS_SOFT1_LBN 16 -#define ESF_DZ_TE2CS_SOFT1_WIDTH 16 -#define ESF_DZ_TE2CS_SOFT0_LBN 0 -#define ESF_DZ_TE2CS_SOFT0_WIDTH 16 - - -/* ES_FF_UMSG_VICTL2CPU */ -#define ESF_DZ_V2C_DESC_WORD3_LBN 112 -#define ESF_DZ_V2C_DESC_WORD3_WIDTH 17 -#define ESF_DZ_V2C_DESC_WORD2_LBN 96 -#define ESF_DZ_V2C_DESC_WORD2_WIDTH 16 -#define ESF_DZ_V2C_DESC_WORD1_LBN 80 -#define ESF_DZ_V2C_DESC_WORD1_WIDTH 16 -#define ESF_DZ_V2C_DESC_WORD0_LBN 64 -#define ESF_DZ_V2C_DESC_WORD0_WIDTH 16 -#define ESF_DZ_V2C_NEW_DSCR_WPTR_LBN 32 -#define ESF_DZ_V2C_NEW_DSCR_WPTR_WIDTH 12 -#define ESF_DZ_V2C_DESC_PUSH_LBN 16 -#define ESF_DZ_V2C_DESC_PUSH_WIDTH 1 - - -/* ES_LUE_DB_MATCH_ENTRY */ -#define ESF_DZ_LUE_DSCRMNTR_LBN 140 -#define ESF_DZ_LUE_DSCRMNTR_WIDTH 6 -#define ESF_DZ_LUE_MATCH_VAL_DW0_LBN 44 -#define ESF_DZ_LUE_MATCH_VAL_DW0_WIDTH 32 -#define ESF_DZ_LUE_MATCH_VAL_DW1_LBN 76 -#define ESF_DZ_LUE_MATCH_VAL_DW1_WIDTH 32 -#define ESF_DZ_LUE_MATCH_VAL_DW2_LBN 108 -#define ESF_DZ_LUE_MATCH_VAL_DW2_WIDTH 32 -#define ESF_DZ_LUE_MATCH_VAL_LBN 44 -#define ESF_DZ_LUE_MATCH_VAL_WIDTH 96 -#define ESF_DZ_LUE_ME_SOFT_LBN 35 -#define ESF_DZ_LUE_ME_SOFT_WIDTH 9 -#define ESF_DZ_LUE_TX_MCAST_LBN 33 -#define ESF_DZ_LUE_TX_MCAST_WIDTH 2 -#define ESF_DZ_LUE_TX_DOMAIN_LBN 25 -#define ESF_DZ_LUE_TX_DOMAIN_WIDTH 8 -#define ESF_DZ_LUE_RX_MCAST_LBN 24 -#define ESF_DZ_LUE_RX_MCAST_WIDTH 1 -#define ESE_DZ_LUE_MULTI 1 -#define ESE_DZ_LUE_SINGLE 0 -#define ESF_DZ_LUE_RCPNTR_LBN 0 -#define ESF_DZ_LUE_RCPNTR_WIDTH 24 - - -/* ES_LUE_DB_NONMATCH_ENTRY */ -#define ESF_DZ_LUE_DSCRMNTR_LBN 140 -#define ESF_DZ_LUE_DSCRMNTR_WIDTH 6 -#define ESF_DZ_LUE_TERMINAL_LBN 139 -#define ESF_DZ_LUE_TERMINAL_WIDTH 1 -#define ESF_DZ_LUE_LAST_LBN 138 -#define ESF_DZ_LUE_LAST_WIDTH 1 -#define ESF_DZ_LUE_NE_SOFT_LBN 137 -#define ESF_DZ_LUE_NE_SOFT_WIDTH 1 -#define ESF_DZ_LUE_RCPNTR_NUM_LBN 134 -#define ESF_DZ_LUE_RCPNTR_NUM_WIDTH 3 -#define ESF_DZ_LUE_RCPNTR0_LBN 110 -#define ESF_DZ_LUE_RCPNTR0_WIDTH 24 -#define ESF_DZ_LUE_RCPNTR1_LBN 86 -#define ESF_DZ_LUE_RCPNTR1_WIDTH 24 -#define ESF_DZ_LUE_RCPNTR2_LBN 62 -#define ESF_DZ_LUE_RCPNTR2_WIDTH 24 -#define ESF_DZ_LUE_RCPNTR3_LBN 38 -#define ESF_DZ_LUE_RCPNTR3_WIDTH 24 -#define ESF_DZ_LUE_RCPNTR4_LBN 14 -#define ESF_DZ_LUE_RCPNTR4_WIDTH 24 -#define ESF_DZ_LUE_RCPNTR_NE_PTR_LBN 0 -#define ESF_DZ_LUE_RCPNTR_NE_PTR_WIDTH 14 - - -/* ES_LUE_MC_DIRECT_REQUEST_MSG */ -#define ESF_DZ_MC2L_DR_PAD_DW0_LBN 22 -#define ESF_DZ_MC2L_DR_PAD_DW0_WIDTH 32 -#define ESF_DZ_MC2L_DR_PAD_DW1_LBN 54 -#define ESF_DZ_MC2L_DR_PAD_DW1_WIDTH 32 -#define ESF_DZ_MC2L_DR_PAD_DW2_LBN 86 -#define ESF_DZ_MC2L_DR_PAD_DW2_WIDTH 32 -#define ESF_DZ_MC2L_DR_PAD_DW3_LBN 118 -#define ESF_DZ_MC2L_DR_PAD_DW3_WIDTH 32 -#define ESF_DZ_MC2L_DR_PAD_DW4_LBN 150 -#define ESF_DZ_MC2L_DR_PAD_DW4_WIDTH 18 -#define ESF_DZ_MC2L_DR_PAD_LBN 22 -#define ESF_DZ_MC2L_DR_PAD_WIDTH 146 -#define ESF_DZ_MC2L_DR_ADDR_LBN 8 -#define ESF_DZ_MC2L_DR_ADDR_WIDTH 14 -#define ESF_DZ_MC2L_DR_THREAD_ID_LBN 5 -#define ESF_DZ_MC2L_DR_THREAD_ID_WIDTH 3 -#define ESF_DZ_MC2L_DR_CLIENT_ID_LBN 2 -#define ESF_DZ_MC2L_DR_CLIENT_ID_WIDTH 3 -#define ESF_DZ_MC2L_DR_OP_LBN 0 -#define ESF_DZ_MC2L_DR_OP_WIDTH 2 -#define ESE_DZ_LUE_GP_WR 3 -#define ESE_DZ_LUE_GP_RD 2 -#define ESE_DZ_LUE_DIR_REQ 1 -#define ESE_DZ_LUE_MATCH_REQ 0 - - -/* ES_LUE_MC_DIRECT_RESPONSE_MSG */ -#define ESF_DZ_L2MC_DR_PAD_LBN 146 -#define ESF_DZ_L2MC_DR_PAD_WIDTH 8 -#define ESF_DZ_L2MC_DR_RCPNT_PTR_LBN 132 -#define ESF_DZ_L2MC_DR_RCPNT_PTR_WIDTH 14 -#define ESF_DZ_L2MC_DR_RCPNT4_LBN 108 -#define ESF_DZ_L2MC_DR_RCPNT4_WIDTH 24 -#define ESF_DZ_L2MC_DR_RCPNT3_LBN 84 -#define ESF_DZ_L2MC_DR_RCPNT3_WIDTH 24 -#define ESF_DZ_L2MC_DR_RCPNT2_LBN 60 -#define ESF_DZ_L2MC_DR_RCPNT2_WIDTH 24 -#define ESF_DZ_L2MC_DR_RCPNT1_LBN 36 -#define ESF_DZ_L2MC_DR_RCPNT1_WIDTH 24 -#define ESF_DZ_L2MC_DR_RCPNT0_LBN 12 -#define ESF_DZ_L2MC_DR_RCPNT0_WIDTH 24 -#define ESF_DZ_L2MC_DR_RCPNT_NUM_LBN 9 -#define ESF_DZ_L2MC_DR_RCPNT_NUM_WIDTH 3 -#define ESF_DZ_L2MC_DR_LAST_LBN 8 -#define ESF_DZ_L2MC_DR_LAST_WIDTH 1 -#define ESF_DZ_L2MC_DR_THREAD_ID_LBN 5 -#define ESF_DZ_L2MC_DR_THREAD_ID_WIDTH 3 -#define ESF_DZ_L2MC_DR_CLIENT_ID_LBN 2 -#define ESF_DZ_L2MC_DR_CLIENT_ID_WIDTH 3 -#define ESF_DZ_L2MC_DR_OP_LBN 0 -#define ESF_DZ_L2MC_DR_OP_WIDTH 2 -#define ESE_DZ_LUE_GP_WR 3 -#define ESE_DZ_LUE_GP_RD 2 -#define ESE_DZ_LUE_DIR_REQ 1 -#define ESE_DZ_LUE_MATCH_REQ 0 - - -/* ES_LUE_MC_GP_RD_REQUEST_MSG */ -#define ESF_DZ_MC2L_GPR_PAD_DW0_LBN 22 -#define ESF_DZ_MC2L_GPR_PAD_DW0_WIDTH 32 -#define ESF_DZ_MC2L_GPR_PAD_DW1_LBN 54 -#define ESF_DZ_MC2L_GPR_PAD_DW1_WIDTH 32 -#define ESF_DZ_MC2L_GPR_PAD_DW2_LBN 86 -#define ESF_DZ_MC2L_GPR_PAD_DW2_WIDTH 32 -#define ESF_DZ_MC2L_GPR_PAD_DW3_LBN 118 -#define ESF_DZ_MC2L_GPR_PAD_DW3_WIDTH 32 -#define ESF_DZ_MC2L_GPR_PAD_DW4_LBN 150 -#define ESF_DZ_MC2L_GPR_PAD_DW4_WIDTH 18 -#define ESF_DZ_MC2L_GPR_PAD_LBN 22 -#define ESF_DZ_MC2L_GPR_PAD_WIDTH 146 -#define ESF_DZ_MC2L_GPR_ADDR_LBN 8 -#define ESF_DZ_MC2L_GPR_ADDR_WIDTH 14 -#define ESF_DZ_MC2L_GPR_THREAD_ID_LBN 5 -#define ESF_DZ_MC2L_GPR_THREAD_ID_WIDTH 3 -#define ESF_DZ_MC2L_GPR_CLIENT_ID_LBN 2 -#define ESF_DZ_MC2L_GPR_CLIENT_ID_WIDTH 3 -#define ESF_DZ_MC2L_GPR_OP_LBN 0 -#define ESF_DZ_MC2L_GPR_OP_WIDTH 2 -#define ESE_DZ_LUE_GP_WR 3 -#define ESE_DZ_LUE_GP_RD 2 -#define ESE_DZ_LUE_DIR_REQ 1 -#define ESE_DZ_LUE_MATCH_REQ 0 - - -/* ES_LUE_MC_GP_RD_RESPONSE_MSG */ -#define ESF_DZ_L2MC_GPR_DATA_DW0_LBN 8 -#define ESF_DZ_L2MC_GPR_DATA_DW0_WIDTH 32 -#define ESF_DZ_L2MC_GPR_DATA_DW1_LBN 40 -#define ESF_DZ_L2MC_GPR_DATA_DW1_WIDTH 32 -#define ESF_DZ_L2MC_GPR_DATA_DW2_LBN 72 -#define ESF_DZ_L2MC_GPR_DATA_DW2_WIDTH 32 -#define ESF_DZ_L2MC_GPR_DATA_DW3_LBN 104 -#define ESF_DZ_L2MC_GPR_DATA_DW3_WIDTH 32 -#define ESF_DZ_L2MC_GPR_DATA_DW4_LBN 136 -#define ESF_DZ_L2MC_GPR_DATA_DW4_WIDTH 18 -#define ESF_DZ_L2MC_GPR_DATA_LBN 8 -#define ESF_DZ_L2MC_GPR_DATA_WIDTH 146 -#define ESF_DZ_L2MC_GPR_THREAD_ID_LBN 5 -#define ESF_DZ_L2MC_GPR_THREAD_ID_WIDTH 3 -#define ESF_DZ_L2MC_GPR_CLIENT_ID_LBN 2 -#define ESF_DZ_L2MC_GPR_CLIENT_ID_WIDTH 3 -#define ESF_DZ_L2MC_GPR_OP_LBN 0 -#define ESF_DZ_L2MC_GPR_OP_WIDTH 2 -#define ESE_DZ_LUE_GP_WR 3 -#define ESE_DZ_LUE_GP_RD 2 -#define ESE_DZ_LUE_DIR_REQ 1 -#define ESE_DZ_LUE_MATCH_REQ 0 - - -/* ES_LUE_MC_GP_WR_REQUEST_MSG */ -#define ESF_DZ_MC2L_GPW_DATA_DW0_LBN 22 -#define ESF_DZ_MC2L_GPW_DATA_DW0_WIDTH 32 -#define ESF_DZ_MC2L_GPW_DATA_DW1_LBN 54 -#define ESF_DZ_MC2L_GPW_DATA_DW1_WIDTH 32 -#define ESF_DZ_MC2L_GPW_DATA_DW2_LBN 86 -#define ESF_DZ_MC2L_GPW_DATA_DW2_WIDTH 32 -#define ESF_DZ_MC2L_GPW_DATA_DW3_LBN 118 -#define ESF_DZ_MC2L_GPW_DATA_DW3_WIDTH 32 -#define ESF_DZ_MC2L_GPW_DATA_DW4_LBN 150 -#define ESF_DZ_MC2L_GPW_DATA_DW4_WIDTH 18 -#define ESF_DZ_MC2L_GPW_DATA_LBN 22 -#define ESF_DZ_MC2L_GPW_DATA_WIDTH 146 -#define ESF_DZ_MC2L_GPW_ADDR_LBN 8 -#define ESF_DZ_MC2L_GPW_ADDR_WIDTH 14 -#define ESF_DZ_MC2L_GPW_THREAD_ID_LBN 5 -#define ESF_DZ_MC2L_GPW_THREAD_ID_WIDTH 3 -#define ESF_DZ_MC2L_GPW_CLIENT_ID_LBN 2 -#define ESF_DZ_MC2L_GPW_CLIENT_ID_WIDTH 3 -#define ESF_DZ_MC2L_GPW_OP_LBN 0 -#define ESF_DZ_MC2L_GPW_OP_WIDTH 2 -#define ESE_DZ_LUE_GP_WR 3 -#define ESE_DZ_LUE_GP_RD 2 -#define ESE_DZ_LUE_DIR_REQ 1 -#define ESE_DZ_LUE_MATCH_REQ 0 - - -/* ES_LUE_MC_MATCH_REQUEST_MSG */ -#define ESF_DZ_MC2L_MR_PAD_LBN 137 -#define ESF_DZ_MC2L_MR_PAD_WIDTH 31 -#define ESF_DZ_MC2L_MR_HASH2_LBN 124 -#define ESF_DZ_MC2L_MR_HASH2_WIDTH 13 -#define ESF_DZ_MC2L_MR_HASH1_LBN 110 -#define ESF_DZ_MC2L_MR_HASH1_WIDTH 14 -#define ESF_DZ_MC2L_MR_MATCH_BITS_DW0_LBN 14 -#define ESF_DZ_MC2L_MR_MATCH_BITS_DW0_WIDTH 32 -#define ESF_DZ_MC2L_MR_MATCH_BITS_DW1_LBN 46 -#define ESF_DZ_MC2L_MR_MATCH_BITS_DW1_WIDTH 32 -#define ESF_DZ_MC2L_MR_MATCH_BITS_DW2_LBN 78 -#define ESF_DZ_MC2L_MR_MATCH_BITS_DW2_WIDTH 32 -#define ESF_DZ_MC2L_MR_MATCH_BITS_LBN 14 -#define ESF_DZ_MC2L_MR_MATCH_BITS_WIDTH 96 -#define ESF_DZ_MC2L_MR_DSCRMNTR_LBN 8 -#define ESF_DZ_MC2L_MR_DSCRMNTR_WIDTH 6 -#define ESF_DZ_MC2L_MR_THREAD_ID_LBN 5 -#define ESF_DZ_MC2L_MR_THREAD_ID_WIDTH 3 -#define ESF_DZ_MC2L_MR_CLIENT_ID_LBN 2 -#define ESF_DZ_MC2L_MR_CLIENT_ID_WIDTH 3 -#define ESF_DZ_MC2L_MR_OP_LBN 0 -#define ESF_DZ_MC2L_MR_OP_WIDTH 2 -#define ESE_DZ_LUE_GP_WR 3 -#define ESE_DZ_LUE_GP_RD 2 -#define ESE_DZ_LUE_DIR_REQ 1 -#define ESE_DZ_LUE_MATCH_REQ 0 - - -/* ES_LUE_MC_MATCH_RESPONSE_MSG */ -#define ESF_DZ_L2MC_MR_PAD_DW0_LBN 53 -#define ESF_DZ_L2MC_MR_PAD_DW0_WIDTH 32 -#define ESF_DZ_L2MC_MR_PAD_DW1_LBN 85 -#define ESF_DZ_L2MC_MR_PAD_DW1_WIDTH 32 -#define ESF_DZ_L2MC_MR_PAD_DW2_LBN 117 -#define ESF_DZ_L2MC_MR_PAD_DW2_WIDTH 32 -#define ESF_DZ_L2MC_MR_PAD_DW3_LBN 149 -#define ESF_DZ_L2MC_MR_PAD_DW3_WIDTH 5 -#define ESF_DZ_L2MC_MR_PAD_LBN 53 -#define ESF_DZ_L2MC_MR_PAD_WIDTH 101 -#define ESF_DZ_L2MC_MR_LUE_RCPNT_LBN 29 -#define ESF_DZ_L2MC_MR_LUE_RCPNT_WIDTH 24 -#define ESF_DZ_L2MC_MR_RX_MCAST_LBN 28 -#define ESF_DZ_L2MC_MR_RX_MCAST_WIDTH 1 -#define ESF_DZ_L2MC_MR_TX_DOMAIN_LBN 20 -#define ESF_DZ_L2MC_MR_TX_DOMAIN_WIDTH 8 -#define ESF_DZ_L2MC_MR_TX_MCAST_LBN 18 -#define ESF_DZ_L2MC_MR_TX_MCAST_WIDTH 2 -#define ESF_DZ_L2MC_MR_SOFT_LBN 9 -#define ESF_DZ_L2MC_MR_SOFT_WIDTH 9 -#define ESF_DZ_L2MC_MR_MATCH_LBN 8 -#define ESF_DZ_L2MC_MR_MATCH_WIDTH 1 -#define ESF_DZ_L2MC_MR_THREAD_ID_LBN 5 -#define ESF_DZ_L2MC_MR_THREAD_ID_WIDTH 3 -#define ESF_DZ_L2MC_MR_CLIENT_ID_LBN 2 -#define ESF_DZ_L2MC_MR_CLIENT_ID_WIDTH 3 -#define ESF_DZ_L2MC_MR_OP_LBN 0 -#define ESF_DZ_L2MC_MR_OP_WIDTH 2 -#define ESE_DZ_LUE_GP_WR 3 -#define ESE_DZ_LUE_GP_RD 2 -#define ESE_DZ_LUE_DIR_REQ 1 -#define ESE_DZ_LUE_MATCH_REQ 0 - - -/* ES_LUE_MSG_BASE_REQ */ -#define ESF_DZ_LUE_HW_REQ_BASE_REQ_MSG_DATA_DW0_LBN 8 -#define ESF_DZ_LUE_HW_REQ_BASE_REQ_MSG_DATA_DW0_WIDTH 32 -#define ESF_DZ_LUE_HW_REQ_BASE_REQ_MSG_DATA_DW1_LBN 40 -#define ESF_DZ_LUE_HW_REQ_BASE_REQ_MSG_DATA_DW1_WIDTH 32 -#define ESF_DZ_LUE_HW_REQ_BASE_REQ_MSG_DATA_DW2_LBN 72 -#define ESF_DZ_LUE_HW_REQ_BASE_REQ_MSG_DATA_DW2_WIDTH 32 -#define ESF_DZ_LUE_HW_REQ_BASE_REQ_MSG_DATA_DW3_LBN 104 -#define ESF_DZ_LUE_HW_REQ_BASE_REQ_MSG_DATA_DW3_WIDTH 32 -#define ESF_DZ_LUE_HW_REQ_BASE_REQ_MSG_DATA_DW4_LBN 136 -#define ESF_DZ_LUE_HW_REQ_BASE_REQ_MSG_DATA_DW4_WIDTH 32 -#define ESF_DZ_LUE_HW_REQ_BASE_REQ_MSG_DATA_LBN 8 -#define ESF_DZ_LUE_HW_REQ_BASE_REQ_MSG_DATA_WIDTH 160 -#define ESF_DZ_LUE_HW_REQ_BASE_THREAD_ID_LBN 5 -#define ESF_DZ_LUE_HW_REQ_BASE_THREAD_ID_WIDTH 3 -#define ESF_DZ_LUE_HW_REQ_BASE_CLIENT_ID_LBN 2 -#define ESF_DZ_LUE_HW_REQ_BASE_CLIENT_ID_WIDTH 3 -#define ESE_DZ_LUE_MC_ID 7 -#define ESE_DZ_LUE_MATCH_REQ_FIFO_ID 3 -#define ESE_DZ_LUE_TX_DICPU_ID 1 -#define ESE_DZ_LUE_RX_DICPU_ID 0 -#define ESF_DZ_LUE_HW_REQ_BASE_OP_LBN 0 -#define ESF_DZ_LUE_HW_REQ_BASE_OP_WIDTH 2 -#define ESE_DZ_LUE_GP_WR 3 -#define ESE_DZ_LUE_GP_RD 2 -#define ESE_DZ_LUE_DIR_REQ 1 -#define ESE_DZ_LUE_MATCH_REQ 0 - - -/* ES_LUE_MSG_BASE_RESP */ -#define ESF_DZ_LUE_HW_RSP_BASE_RSP_DATA_DW0_LBN 8 -#define ESF_DZ_LUE_HW_RSP_BASE_RSP_DATA_DW0_WIDTH 32 -#define ESF_DZ_LUE_HW_RSP_BASE_RSP_DATA_DW1_LBN 40 -#define ESF_DZ_LUE_HW_RSP_BASE_RSP_DATA_DW1_WIDTH 32 -#define ESF_DZ_LUE_HW_RSP_BASE_RSP_DATA_DW2_LBN 72 -#define ESF_DZ_LUE_HW_RSP_BASE_RSP_DATA_DW2_WIDTH 32 -#define ESF_DZ_LUE_HW_RSP_BASE_RSP_DATA_DW3_LBN 104 -#define ESF_DZ_LUE_HW_RSP_BASE_RSP_DATA_DW3_WIDTH 32 -#define ESF_DZ_LUE_HW_RSP_BASE_RSP_DATA_DW4_LBN 136 -#define ESF_DZ_LUE_HW_RSP_BASE_RSP_DATA_DW4_WIDTH 18 -#define ESF_DZ_LUE_HW_RSP_BASE_RSP_DATA_LBN 8 -#define ESF_DZ_LUE_HW_RSP_BASE_RSP_DATA_WIDTH 146 -#define ESF_DZ_LUE_HW_RSP_BASE_THREAD_ID_LBN 5 -#define ESF_DZ_LUE_HW_RSP_BASE_THREAD_ID_WIDTH 3 -#define ESF_DZ_LUE_HW_RSP_BASE_CLIENT_ID_LBN 2 -#define ESF_DZ_LUE_HW_RSP_BASE_CLIENT_ID_WIDTH 3 -#define ESE_DZ_LUE_MC_ID 7 -#define ESE_DZ_LUE_MATCH_REQ_FIFO_ID 3 -#define ESE_DZ_LUE_TX_DICPU_ID 1 -#define ESE_DZ_LUE_RX_DICPU_ID 0 -#define ESF_DZ_LUE_HW_RSP_BASE_OP_LBN 0 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 3 07:42:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 883E1A3EDC6; Thu, 3 Dec 2015 07:42:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55179103E; Thu, 3 Dec 2015 07:42:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB37g0jk004290; Thu, 3 Dec 2015 07:42:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB37g0B0004289; Thu, 3 Dec 2015 07:42:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512030742.tB37g0B0004289@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 3 Dec 2015 07:42:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291681 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 07:42:01 -0000 Author: ngie Date: Thu Dec 3 07:42:00 2015 New Revision: 291681 URL: https://svnweb.freebsd.org/changeset/base/291681 Log: Fix a typo in a comment (spacial -> special) Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Thu Dec 3 07:28:57 2015 (r291680) +++ head/share/mk/src.libnames.mk Thu Dec 3 07:42:00 2015 (r291681) @@ -272,7 +272,7 @@ _DP_rpcsec_gss= gssapi _DP_smb= kiconv _DP_ulog= md -# Define spacial cases +# Define special cases LDADD_supcplusplus= -lsupc++ LIBATF_C= ${DESTDIR}${LIBDIR}/libprivateatf-c.a LIBATF_CXX= ${DESTDIR}${LIBDIR}/libprivateatf-c++.a From owner-svn-src-all@freebsd.org Thu Dec 3 08:06:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E6B3A3F700; Thu, 3 Dec 2015 08:06:12 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F04FF11B9; Thu, 3 Dec 2015 08:06:11 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB386B4p012499; Thu, 3 Dec 2015 08:06:11 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB386BX3012498; Thu, 3 Dec 2015 08:06:11 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512030806.tB386BX3012498@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 3 Dec 2015 08:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291682 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 08:06:12 -0000 Author: arybchik Date: Thu Dec 3 08:06:10 2015 New Revision: 291682 URL: https://svnweb.freebsd.org/changeset/base/291682 Log: sfxge: regenerate MCDI headers 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 3 07:42:00 2015 (r291681) +++ head/sys/dev/sfxge/common/efx_regs_mcdi.h Thu Dec 3 08:06:10 2015 (r291682) @@ -4451,8 +4451,12 @@ /* MC_CMD_DRV_ATTACH_IN msgrequest */ #define MC_CMD_DRV_ATTACH_IN_LEN 12 -/* new state (0=detached, 1=attached) to set if UPDATE=1 */ +/* new state to set if UPDATE=1 */ #define MC_CMD_DRV_ATTACH_IN_NEW_STATE_OFST 0 +#define MC_CMD_DRV_ATTACH_LBN 0 +#define MC_CMD_DRV_ATTACH_WIDTH 1 +#define MC_CMD_DRV_PREBOOT_LBN 1 +#define MC_CMD_DRV_PREBOOT_WIDTH 1 /* 1 to set new state, or 0 to just report the existing state */ #define MC_CMD_DRV_ATTACH_IN_UPDATE_OFST 4 /* preferred datapath firmware (for Huntington; ignored for Siena) */ @@ -4474,12 +4478,12 @@ /* MC_CMD_DRV_ATTACH_OUT msgresponse */ #define MC_CMD_DRV_ATTACH_OUT_LEN 4 -/* previous or existing state (0=detached, 1=attached) */ +/* previous or existing state, see the bitmask at NEW_STATE */ #define MC_CMD_DRV_ATTACH_OUT_OLD_STATE_OFST 0 /* MC_CMD_DRV_ATTACH_EXT_OUT msgresponse */ #define MC_CMD_DRV_ATTACH_EXT_OUT_LEN 8 -/* previous or existing state (0=detached, 1=attached) */ +/* previous or existing state, see the bitmask at NEW_STATE */ #define MC_CMD_DRV_ATTACH_EXT_OUT_OLD_STATE_OFST 0 /* Flags associated with this function */ #define MC_CMD_DRV_ATTACH_EXT_OUT_FUNC_FLAGS_OFST 4 @@ -4491,6 +4495,10 @@ #define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL 0x1 /* enum: The function can perform privileged operations */ #define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED 0x2 +/* enum: The function does not have an active port associated with it. The port + * refers to the Sorrento external FPGA port. + */ +#define MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_NO_ACTIVE_PORT 0x3 /***********************************/ @@ -5230,6 +5238,55 @@ #define MC_CMD_SET_MAC_IN_FLAG_INCLUDE_FCS_LBN 0 #define MC_CMD_SET_MAC_IN_FLAG_INCLUDE_FCS_WIDTH 1 +/* MC_CMD_SET_MAC_EXT_IN msgrequest */ +#define MC_CMD_SET_MAC_EXT_IN_LEN 32 +/* The MTU is the MTU programmed directly into the XMAC/GMAC (inclusive of + * EtherII, VLAN, bug16011 padding). + */ +#define MC_CMD_SET_MAC_EXT_IN_MTU_OFST 0 +#define MC_CMD_SET_MAC_EXT_IN_DRAIN_OFST 4 +#define MC_CMD_SET_MAC_EXT_IN_ADDR_OFST 8 +#define MC_CMD_SET_MAC_EXT_IN_ADDR_LEN 8 +#define MC_CMD_SET_MAC_EXT_IN_ADDR_LO_OFST 8 +#define MC_CMD_SET_MAC_EXT_IN_ADDR_HI_OFST 12 +#define MC_CMD_SET_MAC_EXT_IN_REJECT_OFST 16 +#define MC_CMD_SET_MAC_EXT_IN_REJECT_UNCST_LBN 0 +#define MC_CMD_SET_MAC_EXT_IN_REJECT_UNCST_WIDTH 1 +#define MC_CMD_SET_MAC_EXT_IN_REJECT_BRDCST_LBN 1 +#define MC_CMD_SET_MAC_EXT_IN_REJECT_BRDCST_WIDTH 1 +#define MC_CMD_SET_MAC_EXT_IN_FCNTL_OFST 20 +/* enum: Flow control is off. */ +/* MC_CMD_FCNTL_OFF 0x0 */ +/* enum: Respond to flow control. */ +/* MC_CMD_FCNTL_RESPOND 0x1 */ +/* enum: Respond to and Issue flow control. */ +/* MC_CMD_FCNTL_BIDIR 0x2 */ +/* enum: Auto neg flow control. */ +/* MC_CMD_FCNTL_AUTO 0x3 */ +/* enum: Priority flow control (eftest builds only). */ +/* MC_CMD_FCNTL_QBB 0x4 */ +/* enum: Issue flow control. */ +/* MC_CMD_FCNTL_GENERATE 0x5 */ +#define MC_CMD_SET_MAC_EXT_IN_FLAGS_OFST 24 +#define MC_CMD_SET_MAC_EXT_IN_FLAG_INCLUDE_FCS_LBN 0 +#define MC_CMD_SET_MAC_EXT_IN_FLAG_INCLUDE_FCS_WIDTH 1 +/* Select which parameters to configure. A parameter will only be modified if + * the corresponding control flag is set. If SET_MAC_ENHANCED is not set in + * capabilities then this field is ignored (and all flags are assumed to be + * set). + */ +#define MC_CMD_SET_MAC_EXT_IN_CONTROL_OFST 28 +#define MC_CMD_SET_MAC_EXT_IN_CFG_MTU_LBN 0 +#define MC_CMD_SET_MAC_EXT_IN_CFG_MTU_WIDTH 1 +#define MC_CMD_SET_MAC_EXT_IN_CFG_DRAIN_LBN 1 +#define MC_CMD_SET_MAC_EXT_IN_CFG_DRAIN_WIDTH 1 +#define MC_CMD_SET_MAC_EXT_IN_CFG_REJECT_LBN 2 +#define MC_CMD_SET_MAC_EXT_IN_CFG_REJECT_WIDTH 1 +#define MC_CMD_SET_MAC_EXT_IN_CFG_FCNTL_LBN 3 +#define MC_CMD_SET_MAC_EXT_IN_CFG_FCNTL_WIDTH 1 +#define MC_CMD_SET_MAC_EXT_IN_CFG_FCS_LBN 4 +#define MC_CMD_SET_MAC_EXT_IN_CFG_FCS_WIDTH 1 + /* MC_CMD_SET_MAC_OUT msgresponse */ #define MC_CMD_SET_MAC_OUT_LEN 0 @@ -5831,6 +5888,26 @@ #define MC_CMD_NVRAM_INFO_OUT_PHYSDEV_OFST 16 #define MC_CMD_NVRAM_INFO_OUT_PHYSADDR_OFST 20 +/* MC_CMD_NVRAM_INFO_V2_OUT msgresponse */ +#define MC_CMD_NVRAM_INFO_V2_OUT_LEN 28 +#define MC_CMD_NVRAM_INFO_V2_OUT_TYPE_OFST 0 +/* Enum values, see field(s): */ +/* MC_CMD_NVRAM_TYPES/MC_CMD_NVRAM_TYPES_OUT/TYPES */ +#define MC_CMD_NVRAM_INFO_V2_OUT_SIZE_OFST 4 +#define MC_CMD_NVRAM_INFO_V2_OUT_ERASESIZE_OFST 8 +#define MC_CMD_NVRAM_INFO_V2_OUT_FLAGS_OFST 12 +#define MC_CMD_NVRAM_INFO_V2_OUT_PROTECTED_LBN 0 +#define MC_CMD_NVRAM_INFO_V2_OUT_PROTECTED_WIDTH 1 +#define MC_CMD_NVRAM_INFO_V2_OUT_TLV_LBN 1 +#define MC_CMD_NVRAM_INFO_V2_OUT_TLV_WIDTH 1 +#define MC_CMD_NVRAM_INFO_V2_OUT_A_B_LBN 7 +#define MC_CMD_NVRAM_INFO_V2_OUT_A_B_WIDTH 1 +#define MC_CMD_NVRAM_INFO_V2_OUT_PHYSDEV_OFST 16 +#define MC_CMD_NVRAM_INFO_V2_OUT_PHYSADDR_OFST 20 +/* Writes must be multiples of this size. Added to support the MUM on Sorrento. + */ +#define MC_CMD_NVRAM_INFO_V2_OUT_WRITESIZE_OFST 24 + /***********************************/ /* MC_CMD_NVRAM_UPDATE_START @@ -6214,6 +6291,8 @@ #define MC_CMD_SENSOR_CCOM_AVREG_1V8_SUPPLY 0x39 /* enum: CCOM AVREG 1v8 supply (external ADC): mV */ #define MC_CMD_SENSOR_CCOM_AVREG_1V8_SUPPLY_EXTADC 0x3a +/* enum: CCOM RTS temperature: degC */ +#define MC_CMD_SENSOR_CONTROLLER_RTS 0x3b /* enum: Not a sensor: reserved for the next page flag */ #define MC_CMD_SENSOR_PAGE1_NEXT 0x3f /* enum: controller internal temperature sensor voltage on master core @@ -6942,6 +7021,10 @@ * operations */ #define MC_CMD_MUM_OP_QSFP 0xc +/* enum: Request discrete and SODIMM DDR info (type, size, speed grade, voltage + * level) from MUM + */ +#define MC_CMD_MUM_OP_READ_DDR_INFO 0xd /* MC_CMD_MUM_IN_NULL msgrequest */ #define MC_CMD_MUM_IN_NULL_LEN 4 @@ -7127,6 +7210,10 @@ #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_FLAGS_OFST 8 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_OVERCLOCK_110_LBN 0 #define MC_CMD_MUM_IN_PROGRAM_CLOCKS_OVERCLOCK_110_WIDTH 1 +#define MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_NIC_FROM_FPGA_LBN 1 +#define MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_NIC_FROM_FPGA_WIDTH 1 +#define MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_REF_FROM_XO_LBN 2 +#define MC_CMD_MUM_IN_PROGRAM_CLOCKS_CLOCK_REF_FROM_XO_WIDTH 1 /* MC_CMD_MUM_IN_FPGA_LOAD msgrequest */ #define MC_CMD_MUM_IN_FPGA_LOAD_LEN 8 @@ -7196,6 +7283,11 @@ #define MC_CMD_MUM_IN_QSFP_POLL_BIST_HDR_OFST 4 #define MC_CMD_MUM_IN_QSFP_POLL_BIST_IDX_OFST 8 +/* MC_CMD_MUM_IN_READ_DDR_INFO msgrequest */ +#define MC_CMD_MUM_IN_READ_DDR_INFO_LEN 4 +/* MUM cmd header */ +/* MC_CMD_MUM_IN_CMD_OFST 0 */ + /* MC_CMD_MUM_OUT msgresponse */ #define MC_CMD_MUM_OUT_LEN 0 @@ -7338,6 +7430,69 @@ #define MC_CMD_MUM_OUT_QSFP_POLL_BIST_LEN 4 #define MC_CMD_MUM_OUT_QSFP_POLL_BIST_TEST_OFST 0 +/* MC_CMD_MUM_OUT_READ_DDR_INFO msgresponse */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_LENMIN 24 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_LENMAX 248 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_LEN(num) (8+8*(num)) +/* Discrete (soldered) DDR resistor strap info */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_DISCRETE_DDR_INFO_OFST 0 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_VRATIO_LBN 0 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_VRATIO_WIDTH 16 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED1_LBN 16 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED1_WIDTH 16 +/* Number of SODIMM info records */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_NUM_RECORDS_OFST 4 +/* Array of SODIMM info records */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_OFST 8 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_LEN 8 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_LO_OFST 8 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_HI_OFST 12 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_MINNUM 2 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_SODIMM_INFO_RECORD_MAXNUM 30 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_BANK_ID_LBN 0 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_BANK_ID_WIDTH 8 +/* enum: SODIMM bank 1 (Top SODIMM for Sorrento) */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_BANK1 0x0 +/* enum: SODIMM bank 2 (Bottom SODDIMM for Sorrento) */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_BANK2 0x1 +/* enum: Total number of SODIMM banks */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_NUM_BANKS 0x2 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_TYPE_LBN 8 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_TYPE_WIDTH 8 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_RANK_LBN 16 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_RANK_WIDTH 4 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_VOLTAGE_LBN 20 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_VOLTAGE_WIDTH 4 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_NOT_POWERED 0x0 /* enum */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_1V25 0x1 /* enum */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_1V35 0x2 /* enum */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_1V5 0x3 /* enum */ +/* enum: Values 5-15 are reserved for future usage */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_1V8 0x4 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_SIZE_LBN 24 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_SIZE_WIDTH 8 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_SPEED_LBN 32 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_SPEED_WIDTH 16 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_STATE_LBN 48 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_STATE_WIDTH 4 +/* enum: No module present */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_ABSENT 0x0 +/* enum: Module present supported and powered on */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_POWERED 0x1 +/* enum: Module present but bad type */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_BAD_TYPE 0x2 +/* enum: Module present but incompatible voltage */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_BAD_VOLTAGE 0x3 +/* enum: Module present but unknown SPD */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_BAD_SPD 0x4 +/* enum: Module present but slot cannot support it */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_PRESENT_BAD_SLOT 0x5 +/* enum: Modules may or may not be present, but cannot establish contact by I2C + */ +#define MC_CMD_MUM_OUT_READ_DDR_INFO_NOT_REACHABLE 0x6 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED2_LBN 52 +#define MC_CMD_MUM_OUT_READ_DDR_INFO_RESERVED2_WIDTH 12 + /* MC_CMD_RESOURCE_SPECIFIER enum */ /* enum: Any */ #define MC_CMD_RESOURCE_INSTANCE_ANY 0xffffffff @@ -7410,6 +7565,8 @@ #define NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG 0x500 /* enum: Expansion ROM configuration data for port 0 */ #define NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT0 0x600 +/* enum: Synonym for EXPROM_CONFIG_PORT0 as used in pmap files */ +#define NVRAM_PARTITION_TYPE_EXPROM_CONFIG 0x600 /* enum: Expansion ROM configuration data for port 1 */ #define NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT1 0x601 /* enum: Expansion ROM configuration data for port 2 */ @@ -7418,6 +7575,8 @@ #define NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT3 0x603 /* enum: Non-volatile log output partition */ #define NVRAM_PARTITION_TYPE_LOG 0x700 +/* enum: Non-volatile log output of second core on dual-core device */ +#define NVRAM_PARTITION_TYPE_LOG_SLAVE 0x701 /* enum: Device state dump output partition */ #define NVRAM_PARTITION_TYPE_DUMP 0x800 /* enum: Application license key storage partition */ @@ -7450,6 +7609,20 @@ #define NVRAM_PARTITION_TYPE_MUM_USER_ROM 0xc05 /* enum: MUM fuses and lockbits partition. */ #define NVRAM_PARTITION_TYPE_MUM_FUSELOCK 0xc06 +/* enum: UEFI expansion ROM if separate from PXE */ +#define NVRAM_PARTITION_TYPE_EXPANSION_UEFI 0xd00 +/* enum: Spare partition 0 */ +#define NVRAM_PARTITION_TYPE_SPARE_0 0x1000 +/* enum: Spare partition 1 */ +#define NVRAM_PARTITION_TYPE_SPARE_1 0x1100 +/* enum: Spare partition 2 */ +#define NVRAM_PARTITION_TYPE_SPARE_2 0x1200 +/* enum: Spare partition 3 */ +#define NVRAM_PARTITION_TYPE_SPARE_3 0x1300 +/* enum: Spare partition 4 */ +#define NVRAM_PARTITION_TYPE_SPARE_4 0x1400 +/* enum: Spare partition 5 */ +#define NVRAM_PARTITION_TYPE_SPARE_5 0x1500 /* enum: Start of reserved value range (firmware may use for any purpose) */ #define NVRAM_PARTITION_TYPE_RESERVED_VALUES_MIN 0xff00 /* enum: End of reserved value range (firmware may use for any purpose) */ @@ -7699,6 +7872,8 @@ #define MC_CMD_INIT_RXQ_IN_FLAG_PREFIX_WIDTH 1 #define MC_CMD_INIT_RXQ_IN_FLAG_DISABLE_SCATTER_LBN 9 #define MC_CMD_INIT_RXQ_IN_FLAG_DISABLE_SCATTER_WIDTH 1 +#define MC_CMD_INIT_RXQ_IN_FLAG_FORCE_EV_MERGING_LBN 10 +#define MC_CMD_INIT_RXQ_IN_FLAG_FORCE_EV_MERGING_WIDTH 1 /* Owner ID to use if in buffer mode (zero if physical) */ #define MC_CMD_INIT_RXQ_IN_OWNER_ID_OFST 20 /* The port ID associated with the v-adaptor which should contain this DMAQ. */ @@ -7759,6 +7934,8 @@ #define MC_CMD_INIT_RXQ_EXT_IN_PS_BUFF_64K 0x4 /* enum */ #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_WANT_OUTER_CLASSES_LBN 18 #define MC_CMD_INIT_RXQ_EXT_IN_FLAG_WANT_OUTER_CLASSES_WIDTH 1 +#define MC_CMD_INIT_RXQ_EXT_IN_FLAG_FORCE_EV_MERGING_LBN 19 +#define MC_CMD_INIT_RXQ_EXT_IN_FLAG_FORCE_EV_MERGING_WIDTH 1 /* Owner ID to use if in buffer mode (zero if physical) */ #define MC_CMD_INIT_RXQ_EXT_IN_OWNER_ID_OFST 20 /* The port ID associated with the v-adaptor which should contain this DMAQ. */ @@ -8091,6 +8268,46 @@ #define MC_CMD_PROXY_CONFIGURE_IN_ALLOWED_MCDI_MASK_OFST 44 #define MC_CMD_PROXY_CONFIGURE_IN_ALLOWED_MCDI_MASK_LEN 64 +/* MC_CMD_PROXY_CONFIGURE_EXT_IN msgrequest */ +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_LEN 112 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_FLAGS_OFST 0 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_ENABLE_LBN 0 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_ENABLE_WIDTH 1 +/* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS + * of blocks, each of the size REQUEST_BLOCK_SIZE. + */ +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BUFF_ADDR_OFST 4 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BUFF_ADDR_LEN 8 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BUFF_ADDR_LO_OFST 4 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BUFF_ADDR_HI_OFST 8 +/* Must be a power of 2 */ +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_STATUS_BLOCK_SIZE_OFST 12 +/* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS + * of blocks, each of the size REPLY_BLOCK_SIZE. + */ +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BUFF_ADDR_OFST 16 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BUFF_ADDR_LEN 8 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BUFF_ADDR_LO_OFST 16 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BUFF_ADDR_HI_OFST 20 +/* Must be a power of 2 */ +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_REQUEST_BLOCK_SIZE_OFST 24 +/* Host provides a contiguous memory buffer that contains at least NUM_BLOCKS + * of blocks, each of the size STATUS_BLOCK_SIZE. This buffer is only needed if + * host intends to complete proxied operations by using MC_CMD_PROXY_CMD. + */ +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BUFF_ADDR_OFST 28 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BUFF_ADDR_LEN 8 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BUFF_ADDR_LO_OFST 28 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BUFF_ADDR_HI_OFST 32 +/* Must be a power of 2, or zero if this buffer is not provided */ +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_REPLY_BLOCK_SIZE_OFST 36 +/* Applies to all three buffers */ +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_NUM_BLOCKS_OFST 40 +/* A bit mask defining which MCDI operations may be proxied */ +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_ALLOWED_MCDI_MASK_OFST 44 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_ALLOWED_MCDI_MASK_LEN 64 +#define MC_CMD_PROXY_CONFIGURE_EXT_IN_RESERVED_OFST 108 + /* MC_CMD_PROXY_CONFIGURE_OUT msgresponse */ #define MC_CMD_PROXY_CONFIGURE_OUT_LEN 0 @@ -9439,6 +9656,16 @@ #define MC_CMD_GET_CAPABILITIES_OUT_LEN 20 /* First word of flags. */ #define MC_CMD_GET_CAPABILITIES_OUT_FLAGS1_OFST 0 +#define MC_CMD_GET_CAPABILITIES_OUT_DRV_ATTACH_PREBOOT_LBN 7 +#define MC_CMD_GET_CAPABILITIES_OUT_DRV_ATTACH_PREBOOT_WIDTH 1 +#define MC_CMD_GET_CAPABILITIES_OUT_RX_FORCE_EVENT_MERGING_LBN 8 +#define MC_CMD_GET_CAPABILITIES_OUT_RX_FORCE_EVENT_MERGING_WIDTH 1 +#define MC_CMD_GET_CAPABILITIES_OUT_SET_MAC_ENHANCED_LBN 9 +#define MC_CMD_GET_CAPABILITIES_OUT_SET_MAC_ENHANCED_WIDTH 1 +#define MC_CMD_GET_CAPABILITIES_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_LBN 10 +#define MC_CMD_GET_CAPABILITIES_OUT_UNKNOWN_UCAST_DST_FILTER_ALWAYS_MULTI_RECIPIENT_WIDTH 1 +#define MC_CMD_GET_CAPABILITIES_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 11 +#define MC_CMD_GET_CAPABILITIES_OUT_VADAPTOR_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1 #define MC_CMD_GET_CAPABILITIES_OUT_TX_MAC_SECURITY_FILTERING_LBN 12 #define MC_CMD_GET_CAPABILITIES_OUT_TX_MAC_SECURITY_FILTERING_WIDTH 1 #define MC_CMD_GET_CAPABILITIES_OUT_ADDITIONAL_RSS_MODES_LBN 13 @@ -9506,6 +9733,8 @@ #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_RX_HDR_SPLIT 0x107 /* enum: RXDP Test firmware image 8 */ #define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_DISABLE_DL 0x108 +/* enum: RXDP Test firmware image 9 */ +#define MC_CMD_GET_CAPABILITIES_OUT_RXDP_TEST_FW_DOORBELL_DELAY 0x10b /* TxDPCPU firmware id. */ #define MC_CMD_GET_CAPABILITIES_OUT_TX_DPCPU_FW_ID_OFST 6 #define MC_CMD_GET_CAPABILITIES_OUT_TX_DPCPU_FW_ID_LEN 2 @@ -9851,6 +10080,26 @@ /***********************************/ +/* MC_CMD_VSWITCH_QUERY + * read some config of v-switch. For now this command is an empty placeholder. + * It may be used to check if a v-switch is connected to a given EVB port (if + * not, then the command returns ENOENT). + */ +#define MC_CMD_VSWITCH_QUERY 0x63 +#undef MC_CMD_0x63_PRIVILEGE_CTG + +#define MC_CMD_0x63_PRIVILEGE_CTG SRIOV_CTG_GENERAL + +/* MC_CMD_VSWITCH_QUERY_IN msgrequest */ +#define MC_CMD_VSWITCH_QUERY_IN_LEN 4 +/* The port to which the v-switch is connected. */ +#define MC_CMD_VSWITCH_QUERY_IN_UPSTREAM_PORT_ID_OFST 0 + +/* MC_CMD_VSWITCH_QUERY_OUT msgresponse */ +#define MC_CMD_VSWITCH_QUERY_OUT_LEN 0 + + +/***********************************/ /* MC_CMD_VPORT_ALLOC * allocate a v-port. */ @@ -9887,6 +10136,8 @@ #define MC_CMD_VPORT_ALLOC_IN_FLAGS_OFST 8 #define MC_CMD_VPORT_ALLOC_IN_FLAG_AUTO_PORT_LBN 0 #define MC_CMD_VPORT_ALLOC_IN_FLAG_AUTO_PORT_WIDTH 1 +#define MC_CMD_VPORT_ALLOC_IN_FLAG_VLAN_RESTRICT_LBN 1 +#define MC_CMD_VPORT_ALLOC_IN_FLAG_VLAN_RESTRICT_WIDTH 1 /* The number of VLAN tags to insert/remove. An error will be returned if * incompatible with the number of VLAN tags specified for the upstream * v-switch. @@ -9940,6 +10191,8 @@ #define MC_CMD_VADAPTOR_ALLOC_IN_FLAGS_OFST 8 #define MC_CMD_VADAPTOR_ALLOC_IN_FLAG_AUTO_VADAPTOR_LBN 0 #define MC_CMD_VADAPTOR_ALLOC_IN_FLAG_AUTO_VADAPTOR_WIDTH 1 +#define MC_CMD_VADAPTOR_ALLOC_IN_FLAG_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_LBN 1 +#define MC_CMD_VADAPTOR_ALLOC_IN_FLAG_PERMIT_SET_MAC_WHEN_FILTERS_INSTALLED_WIDTH 1 /* The number of VLAN tags to strip on receive */ #define MC_CMD_VADAPTOR_ALLOC_IN_NUM_VLANS_OFST 12 /* The number of VLAN tags to transparently insert/remove. */ @@ -10021,6 +10274,30 @@ /***********************************/ +/* MC_CMD_VADAPTOR_QUERY + * read some config of v-adaptor. + */ +#define MC_CMD_VADAPTOR_QUERY 0x61 +#undef MC_CMD_0x61_PRIVILEGE_CTG + +#define MC_CMD_0x61_PRIVILEGE_CTG SRIOV_CTG_GENERAL + +/* MC_CMD_VADAPTOR_QUERY_IN msgrequest */ +#define MC_CMD_VADAPTOR_QUERY_IN_LEN 4 +/* The port to which the v-adaptor is connected. */ +#define MC_CMD_VADAPTOR_QUERY_IN_UPSTREAM_PORT_ID_OFST 0 + +/* MC_CMD_VADAPTOR_QUERY_OUT msgresponse */ +#define MC_CMD_VADAPTOR_QUERY_OUT_LEN 12 +/* The EVB port flags as defined at MC_CMD_VPORT_ALLOC. */ +#define MC_CMD_VADAPTOR_QUERY_OUT_PORT_FLAGS_OFST 0 +/* The v-adaptor flags as defined at MC_CMD_VADAPTOR_ALLOC. */ +#define MC_CMD_VADAPTOR_QUERY_OUT_VADAPTOR_FLAGS_OFST 4 +/* The number of VLAN tags that may still be added */ +#define MC_CMD_VADAPTOR_QUERY_OUT_NUM_AVAILABLE_VLAN_TAGS_OFST 8 + + +/***********************************/ /* MC_CMD_EVB_PORT_ASSIGN * assign a port to a PCI function. */ @@ -10558,6 +10835,76 @@ /***********************************/ +/* MC_CMD_VPORT_RECONFIGURE + * Replace VLAN tags and/or MAC addresses of an existing v-port. If the v-port + * has already been passed to another function (v-port's user), then that + * function will be reset before applying the changes. + */ +#define MC_CMD_VPORT_RECONFIGURE 0xeb +#undef MC_CMD_0xeb_PRIVILEGE_CTG + +#define MC_CMD_0xeb_PRIVILEGE_CTG SRIOV_CTG_GENERAL + +/* MC_CMD_VPORT_RECONFIGURE_IN msgrequest */ +#define MC_CMD_VPORT_RECONFIGURE_IN_LEN 44 +/* The handle of the v-port */ +#define MC_CMD_VPORT_RECONFIGURE_IN_VPORT_ID_OFST 0 +/* Flags requesting what should be changed. */ +#define MC_CMD_VPORT_RECONFIGURE_IN_FLAGS_OFST 4 +#define MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_VLAN_TAGS_LBN 0 +#define MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_VLAN_TAGS_WIDTH 1 +#define MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_MACADDRS_LBN 1 +#define MC_CMD_VPORT_RECONFIGURE_IN_REPLACE_MACADDRS_WIDTH 1 +/* The number of VLAN tags to insert/remove. An error will be returned if + * incompatible with the number of VLAN tags specified for the upstream + * v-switch. + */ +#define MC_CMD_VPORT_RECONFIGURE_IN_NUM_VLAN_TAGS_OFST 8 +/* The actual VLAN tags to insert/remove */ +#define MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAGS_OFST 12 +#define MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_0_LBN 0 +#define MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_0_WIDTH 16 +#define MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_1_LBN 16 +#define MC_CMD_VPORT_RECONFIGURE_IN_VLAN_TAG_1_WIDTH 16 +/* The number of MAC addresses to add */ +#define MC_CMD_VPORT_RECONFIGURE_IN_NUM_MACADDRS_OFST 16 +/* MAC addresses to add */ +#define MC_CMD_VPORT_RECONFIGURE_IN_MACADDRS_OFST 20 +#define MC_CMD_VPORT_RECONFIGURE_IN_MACADDRS_LEN 6 +#define MC_CMD_VPORT_RECONFIGURE_IN_MACADDRS_NUM 4 + +/* MC_CMD_VPORT_RECONFIGURE_OUT msgresponse */ +#define MC_CMD_VPORT_RECONFIGURE_OUT_LEN 4 +#define MC_CMD_VPORT_RECONFIGURE_OUT_FLAGS_OFST 0 +#define MC_CMD_VPORT_RECONFIGURE_OUT_RESET_DONE_LBN 0 +#define MC_CMD_VPORT_RECONFIGURE_OUT_RESET_DONE_WIDTH 1 + + +/***********************************/ +/* MC_CMD_EVB_PORT_QUERY + * read some config of v-port. + */ +#define MC_CMD_EVB_PORT_QUERY 0x62 +#undef MC_CMD_0x62_PRIVILEGE_CTG + +#define MC_CMD_0x62_PRIVILEGE_CTG SRIOV_CTG_GENERAL + +/* MC_CMD_EVB_PORT_QUERY_IN msgrequest */ +#define MC_CMD_EVB_PORT_QUERY_IN_LEN 4 +/* The handle of the v-port */ +#define MC_CMD_EVB_PORT_QUERY_IN_PORT_ID_OFST 0 + +/* MC_CMD_EVB_PORT_QUERY_OUT msgresponse */ +#define MC_CMD_EVB_PORT_QUERY_OUT_LEN 8 +/* The EVB port flags as defined at MC_CMD_VPORT_ALLOC. */ +#define MC_CMD_EVB_PORT_QUERY_OUT_PORT_FLAGS_OFST 0 +/* The number of VLAN tags that may be used on a v-adaptor connected to this + * EVB port. + */ +#define MC_CMD_EVB_PORT_QUERY_OUT_NUM_AVAILABLE_VLAN_TAGS_OFST 4 + + +/***********************************/ /* MC_CMD_DUMP_BUFTBL_ENTRIES * Dump buffer table entries, mainly for command client debug use. Dumps * absolute entries, and does not use chunk handles. All entries must be in @@ -10601,6 +10948,14 @@ #define MC_CMD_SET_RXDP_CONFIG_IN_DATA_OFST 0 #define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_DMA_LBN 0 #define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_DMA_WIDTH 1 +#define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_LEN_LBN 1 +#define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_LEN_WIDTH 2 +/* enum: pad to 64 bytes */ +#define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_64 0x0 +/* enum: pad to 128 bytes (Medford only) */ +#define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_128 0x1 +/* enum: pad to 256 bytes (Medford only) */ +#define MC_CMD_SET_RXDP_CONFIG_IN_PAD_HOST_256 0x2 /* MC_CMD_SET_RXDP_CONFIG_OUT msgresponse */ #define MC_CMD_SET_RXDP_CONFIG_OUT_LEN 0 @@ -10623,6 +10978,10 @@ #define MC_CMD_GET_RXDP_CONFIG_OUT_DATA_OFST 0 #define MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_DMA_LBN 0 #define MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_DMA_WIDTH 1 +#define MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_LEN_LBN 1 +#define MC_CMD_GET_RXDP_CONFIG_OUT_PAD_HOST_LEN_WIDTH 2 +/* Enum values, see field(s): */ +/* MC_CMD_SET_RXDP_CONFIG/MC_CMD_SET_RXDP_CONFIG_IN/PAD_HOST_LEN */ /***********************************/ @@ -11508,6 +11867,10 @@ #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP4 0x5 /* enum: DFE Tap5 (0 - max negative, 32 - zero, 63 - max positive) */ #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_TAP5 0x6 +/* enum: DFE DLev */ +#define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_DFE_DLEV 0x7 +/* enum: Figure of Merit */ +#define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_FOM 0x8 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_LANE_LBN 8 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_PARAM_LANE_WIDTH 4 #define MC_CMD_PCIE_TUNE_RXEQ_GET_OUT_LANE_0 0x0 /* enum */ @@ -12133,12 +12496,27 @@ #define MC_CMD_PRIVILEGE_MASK_IN_GRP_ONLOAD 0x4 /* enum */ #define MC_CMD_PRIVILEGE_MASK_IN_GRP_PTP 0x8 /* enum */ #define MC_CMD_PRIVILEGE_MASK_IN_GRP_INSECURE_FILTERS 0x10 /* enum */ -#define MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING 0x20 /* enum */ +/* enum: Deprecated. Equivalent to MAC_SPOOFING_TX combined with CHANGE_MAC. */ +#define MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING 0x20 #define MC_CMD_PRIVILEGE_MASK_IN_GRP_UNICAST 0x40 /* enum */ #define MC_CMD_PRIVILEGE_MASK_IN_GRP_MULTICAST 0x80 /* enum */ #define MC_CMD_PRIVILEGE_MASK_IN_GRP_BROADCAST 0x100 /* enum */ #define MC_CMD_PRIVILEGE_MASK_IN_GRP_ALL_MULTICAST 0x200 /* enum */ #define MC_CMD_PRIVILEGE_MASK_IN_GRP_PROMISCUOUS 0x400 /* enum */ +/* enum: Allows to set the TX packets' source MAC address to any arbitrary MAC + * adress. + */ +#define MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING_TX 0x800 +/* enum: Privilege that allows a Function to change the MAC address configured + * in its associated vAdapter/vPort. + */ +#define MC_CMD_PRIVILEGE_MASK_IN_GRP_CHANGE_MAC 0x1000 +/* enum: Privilege that allows a Function to install filters that specify VLANs + * that are not in the permit list for the associated vPort. This privilege is + * primarily to support ESX where vPorts are created that restrict traffic to + * only a set of permitted VLANs. See the vPort flag FLAG_VLAN_RESTRICT. + */ +#define MC_CMD_PRIVILEGE_MASK_IN_GRP_UNRESTRICTED_VLAN 0x2000 /* enum: Set this bit to indicate that a new privilege mask is to be set, * otherwise the command will only read the existing mask. */ @@ -12396,7 +12774,7 @@ /* Sector type */ #define MC_CMD_XPM_WRITE_SECTOR_IN_TYPE_OFST 4 /* Enum values, see field(s): */ -/* MC_CMD_XPM_READ_SECTOR_OUT/TYPE */ +/* MC_CMD_XPM_READ_SECTOR/MC_CMD_XPM_READ_SECTOR_OUT/TYPE */ /* Sector size */ #define MC_CMD_XPM_WRITE_SECTOR_IN_SIZE_OFST 8 /* Sector data */ @@ -12516,4 +12894,54 @@ /* MC_CMD_XPM_WRITE_TEST_OUT msgresponse */ #define MC_CMD_XPM_WRITE_TEST_OUT_LEN 0 + +/***********************************/ +/* MC_CMD_EXEC_SIGNED + * Check the CMAC of the contents of IMEM and DMEM against the value supplied + * and if correct begin execution from the start of IMEM. The caller supplies a + * key ID, the length of IMEM and DMEM to validate and the expected CMAC. CMAC + * computation runs from the start of IMEM, and from the start of DMEM + 16k, + * to match flash booting. The command will respond with EINVAL if the CMAC + * does match, otherwise it will respond with success before it jumps to IMEM. + */ +#define MC_CMD_EXEC_SIGNED 0x10c +#undef MC_CMD_0x10c_PRIVILEGE_CTG + +#define MC_CMD_0x10c_PRIVILEGE_CTG SRIOV_CTG_ADMIN + +/* MC_CMD_EXEC_SIGNED_IN msgrequest */ +#define MC_CMD_EXEC_SIGNED_IN_LEN 28 +/* the length of code to include in the CMAC */ +#define MC_CMD_EXEC_SIGNED_IN_CODELEN_OFST 0 +/* the length of date to include in the CMAC */ +#define MC_CMD_EXEC_SIGNED_IN_DATALEN_OFST 4 +/* the XPM sector containing the key to use */ +#define MC_CMD_EXEC_SIGNED_IN_KEYSECTOR_OFST 8 +/* the expected CMAC value */ +#define MC_CMD_EXEC_SIGNED_IN_CMAC_OFST 12 +#define MC_CMD_EXEC_SIGNED_IN_CMAC_LEN 16 + +/* MC_CMD_EXEC_SIGNED_OUT msgresponse */ +#define MC_CMD_EXEC_SIGNED_OUT_LEN 0 + + +/***********************************/ +/* MC_CMD_PREPARE_SIGNED + * Prepare to upload a signed image. This will scrub the specified length of + * the data region, which must be at least as large as the DATALEN supplied to + * MC_CMD_EXEC_SIGNED. + */ +#define MC_CMD_PREPARE_SIGNED 0x10d +#undef MC_CMD_0x10d_PRIVILEGE_CTG + +#define MC_CMD_0x10d_PRIVILEGE_CTG SRIOV_CTG_ADMIN + +/* MC_CMD_PREPARE_SIGNED_IN msgrequest */ +#define MC_CMD_PREPARE_SIGNED_IN_LEN 4 +/* the length of data area to clear */ +#define MC_CMD_PREPARE_SIGNED_IN_DATALEN_OFST 0 + +/* MC_CMD_PREPARE_SIGNED_OUT msgresponse */ +#define MC_CMD_PREPARE_SIGNED_OUT_LEN 0 + #endif /* _SIENA_MC_DRIVER_PCOL_H */ From owner-svn-src-all@freebsd.org Thu Dec 3 08:24:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0E59A3FD64; Thu, 3 Dec 2015 08:24:46 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6D09C1ED0; Thu, 3 Dec 2015 08:24:46 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id D40DB2BFB; Thu, 3 Dec 2015 08:24:45 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id CCC2747B94; Thu, 3 Dec 2015 09:24:45 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r287084 - in stable/10/usr.sbin/pw: . tests References: <201508232142.t7NLgSXX033227@repo.freebsd.org> <867fkxcbq9.fsf@desk.des.no> <20151202215958.GD20169@ivaldir.etoilebsd.net> Date: Thu, 03 Dec 2015 09:24:45 +0100 In-Reply-To: <20151202215958.GD20169@ivaldir.etoilebsd.net> (Baptiste Daroussin's message of "Wed, 2 Dec 2015 22:59:58 +0100") Message-ID: <86egf4uegi.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 08:24:47 -0000 Baptiste Daroussin writes: > Or a fix can be made, if you provide an example of the failing case, I > would be able to fix it and add it to the regression tests. Any operation that specifies a GECOS containing multibyte characters. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Thu Dec 3 08:36:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA9A2A3FFAF; Thu, 3 Dec 2015 08:36:01 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6ED3213DB; Thu, 3 Dec 2015 08:36:01 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wmww144 with SMTP id w144so10962987wmw.1; Thu, 03 Dec 2015 00:35:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Zq0srK43GnH/vywVfOhRj1jKj6wq91BRen0Dqn7T3kg=; b=BscHOP7fIbFuAvfJCcD9Q4UgSw4iam+FTggwidXlSMh69W9V5aIfGEdNCbYLpGqNoA sI/VcrTQaihKKAzAd+cblqOt5tlPQbRxL+Bg/BK5wMQ7hZBUTC0tdpaOcX69NblkMmy2 UsqtIpKjy22pvHBXNSuXX3cEiv4WpBLEUo1vvIQgzku++iInX6ukLWhFZksb6LgcS9eY LKwR6Di/aQnDEb7N2slliwDNXRk+1fzhE3Vt2di3wumd0JmGztE2bZvCIczEnw4/91iq 9iWaf2XuXJeqfumz+vbyObQQO9hIELg7g8Q4K2IKC3+FKo5MzlnTFucLvXNKoSqw6LvL 9gIQ== X-Received: by 10.28.48.10 with SMTP id w10mr46988940wmw.39.1449131759771; Thu, 03 Dec 2015 00:35:59 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id c13sm34254065wmd.14.2015.12.03.00.35.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Dec 2015 00:35:59 -0800 (PST) Sender: Baptiste Daroussin Date: Thu, 3 Dec 2015 09:35:56 +0100 From: Baptiste Daroussin To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r287084 - in stable/10/usr.sbin/pw: . tests Message-ID: <20151203083556.GF20169@ivaldir.etoilebsd.net> References: <201508232142.t7NLgSXX033227@repo.freebsd.org> <867fkxcbq9.fsf@desk.des.no> <20151202215958.GD20169@ivaldir.etoilebsd.net> <86egf4uegi.fsf@desk.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RE3pQJLXZi4fr8Xo" Content-Disposition: inline In-Reply-To: <86egf4uegi.fsf@desk.des.no> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 08:36:02 -0000 --RE3pQJLXZi4fr8Xo Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 03, 2015 at 09:24:45AM +0100, Dag-Erling Sm=F8rgrav wrote: > Baptiste Daroussin writes: > > Or a fix can be made, if you provide an example of the failing case, I > > would be able to fix it and add it to the regression tests. >=20 > Any operation that specifies a GECOS containing multibyte characters. >=20 Right so it is fixed. Bapt --RE3pQJLXZi4fr8Xo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlZf/usACgkQ8kTtMUmk6EyD0QCgjAS+5LIWdJIkVBlAZ+Fku4a2 51MAn0owjh2zu9rGlUCSJubTl88OBOJK =QnHU -----END PGP SIGNATURE----- --RE3pQJLXZi4fr8Xo-- From owner-svn-src-all@freebsd.org Thu Dec 3 08:50:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6EBEA3C305; Thu, 3 Dec 2015 08:50:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E6311BCA; Thu, 3 Dec 2015 08:50:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tB38oSVu043356 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 3 Dec 2015 10:50:28 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tB38oSVu043356 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tB38oSE7043355; Thu, 3 Dec 2015 10:50:28 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 3 Dec 2015 10:50:28 +0200 From: Konstantin Belousov To: Nathan Whitehorn Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291666 - head/libexec/rtld-elf Message-ID: <20151203085028.GH2405@kib.kiev.ua> References: <201512030006.tB306xTa074887@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201512030006.tB306xTa074887@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 08:50:34 -0000 On Thu, Dec 03, 2015 at 12:06:59AM +0000, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Thu Dec 3 00:06:59 2015 > New Revision: 291666 > URL: https://svnweb.freebsd.org/changeset/base/291666 > > Log: > Fix build on GCC 5.2 where, at least on PPC64, the compiler would "optimize" > the malloc() + memset() in the local implementation of calloc() into a call > to calloc(), helpfully turning it into an infinite loop. Clean up some > unneeded flags on PPC64 while here. > > MFC after: 1 month > > Modified: > head/libexec/rtld-elf/Makefile > > Modified: head/libexec/rtld-elf/Makefile > ============================================================================== > --- head/libexec/rtld-elf/Makefile Thu Dec 3 00:02:01 2015 (r291665) > +++ head/libexec/rtld-elf/Makefile Thu Dec 3 00:06:59 2015 (r291666) > @@ -13,7 +13,7 @@ SRCS= rtld_start.S \ > malloc.c xmalloc.c debug.c libmap.c > MAN= rtld.1 > CSTD?= gnu99 > -CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD > +CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -fno-builtin > CFLAGS+= -I${SRCTOP}/lib/csu/common > .if exists(${.CURDIR}/${MACHINE_ARCH}) > RTLD_ARCH= ${MACHINE_ARCH} > @@ -22,7 +22,6 @@ RTLD_ARCH= ${MACHINE_CPUARCH} > .endif > CFLAGS+= -I${.CURDIR}/${RTLD_ARCH} -I${.CURDIR} > .if ${MACHINE_ARCH} == "powerpc64" > -CFLAGS+= -mcall-aixdesc I wanted to set -ffreestanding for rtld compilation, but considered it only a minor issue. Could you test this instead of -fno-builtin, please ? > LDFLAGS+= -nostdlib -e _rtld_start > .else > LDFLAGS+= -nostdlib -e .rtld_start From owner-svn-src-all@freebsd.org Thu Dec 3 09:22:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D799FA3CC34; Thu, 3 Dec 2015 09:22:44 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 495C112C7; Thu, 3 Dec 2015 09:22:44 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 1C4FF2CE0; Thu, 3 Dec 2015 09:22:43 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 454853FC43; Thu, 3 Dec 2015 10:22:45 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r287084 - in stable/10/usr.sbin/pw: . tests References: <201508232142.t7NLgSXX033227@repo.freebsd.org> <867fkxcbq9.fsf@desk.des.no> <20151202215958.GD20169@ivaldir.etoilebsd.net> <86egf4uegi.fsf@desk.des.no> <20151203083556.GF20169@ivaldir.etoilebsd.net> Date: Thu, 03 Dec 2015 10:22:45 +0100 In-Reply-To: <20151203083556.GF20169@ivaldir.etoilebsd.net> (Baptiste Daroussin's message of "Thu, 3 Dec 2015 09:35:56 +0100") Message-ID: <86lh9bubru.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 09:22:44 -0000 Baptiste Daroussin writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Baptiste Daroussin writes: > > > Or a fix can be made, if you provide an example of the failing case, I > > > would be able to fix it and add it to the regression tests. > > Any operation that specifies a GECOS containing multibyte characters. > Right so it is fixed. Not really. After your latest commit, it will appear to work, but it will still be broken. A proper fix would entail converting all input to wide strings, validating it as such and converting back before output. Also, the validation is based on blacklisting specific characters which are considered unsafe instead of whitelisting those that are known to be safe. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Thu Dec 3 09:37:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F087A3CE84; Thu, 3 Dec 2015 09:37:22 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 075F1196D; Thu, 3 Dec 2015 09:37:21 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB39bLFk038117; Thu, 3 Dec 2015 09:37:21 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB39bK7p038114; Thu, 3 Dec 2015 09:37:20 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201512030937.tB39bK7p038114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Thu, 3 Dec 2015 09:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291683 - in head/sys: arm/amlogic/aml8726 boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 09:37:22 -0000 Author: ganbold Date: Thu Dec 3 09:37:20 2015 New Revision: 291683 URL: https://svnweb.freebsd.org/changeset/base/291683 Log: Add glue driver for Amlogic Meson Gigabit Ethernet Controller and enable it for Odroid C1 board. Together with r291676 change, dwc(4) can receive packets now. Added: head/sys/arm/amlogic/aml8726/aml8726_if_dwc.c (contents, props changed) Modified: head/sys/arm/amlogic/aml8726/files.aml8726 head/sys/boot/fdt/dts/arm/odroidc1.dts Added: head/sys/arm/amlogic/aml8726/aml8726_if_dwc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/amlogic/aml8726/aml8726_if_dwc.c Thu Dec 3 09:37:20 2015 (r291683) @@ -0,0 +1,98 @@ +/*- + * Copyright (c) 2015 Ganbold Tsagaankhuu + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "if_dwc_if.h" + +static int +aml8726_if_dwc_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "amlogic,meson6-dwmac")) + return (ENXIO); + device_set_desc(dev, "Amlogic Meson Gigabit Ethernet Controller"); + + return (BUS_PROBE_DEFAULT); +} + +static int +aml8726_if_dwc_init(device_t dev) +{ + + return (0); +} + +static int +aml8726_if_dwc_mac_type(device_t dev) +{ + + return (DWC_GMAC_ALT_DESC); +} + +static int +aml8726_if_dwc_mii_clk(device_t dev) +{ + + return (GMAC_MII_CLK_100_150M_DIV62); +} + +static device_method_t aml8726_dwc_methods[] = { + DEVMETHOD(device_probe, aml8726_if_dwc_probe), + + DEVMETHOD(if_dwc_init, aml8726_if_dwc_init), + DEVMETHOD(if_dwc_mac_type, aml8726_if_dwc_mac_type), + DEVMETHOD(if_dwc_mii_clk, aml8726_if_dwc_mii_clk), + + DEVMETHOD_END +}; + +static devclass_t aml8726_dwc_devclass; + +extern driver_t dwc_driver; + +DEFINE_CLASS_1(dwc, aml8726_dwc_driver, aml8726_dwc_methods, + sizeof(struct dwc_softc), dwc_driver); +DRIVER_MODULE(aml8726_dwc, simplebus, aml8726_dwc_driver, + aml8726_dwc_devclass, 0, 0); + +MODULE_DEPEND(aml8726_dwc, dwc, 1, 1, 1); Modified: head/sys/arm/amlogic/aml8726/files.aml8726 ============================================================================== --- head/sys/arm/amlogic/aml8726/files.aml8726 Thu Dec 3 08:06:10 2015 (r291682) +++ head/sys/arm/amlogic/aml8726/files.aml8726 Thu Dec 3 09:37:20 2015 (r291683) @@ -28,3 +28,4 @@ arm/amlogic/aml8726/aml8726_pinctrl.c o arm/amlogic/aml8726/uart_dev_aml8726.c optional uart arm/amlogic/aml8726/aml8726_usb_phy-m3.c optional dwcotg usb gpio arm/amlogic/aml8726/aml8726_usb_phy-m6.c optional dwcotg usb gpio +arm/amlogic/aml8726/aml8726_if_dwc.c optional dwc Modified: head/sys/boot/fdt/dts/arm/odroidc1.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/odroidc1.dts Thu Dec 3 08:06:10 2015 (r291682) +++ head/sys/boot/fdt/dts/arm/odroidc1.dts Thu Dec 3 09:37:20 2015 (r291683) @@ -323,7 +323,7 @@ eth@c9410000 { /* ethernet */ - compatible = "snps,dwmac"; + compatible = "amlogic,meson6-dwmac"; reg = <0xc9410000 0x2000>; /* ahbbus 0x410000 */ interrupts = <0 8 1>; #address-cells = <1>; From owner-svn-src-all@freebsd.org Thu Dec 3 09:40:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 495B5A3CF4A; Thu, 3 Dec 2015 09:40:37 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E02161B68; Thu, 3 Dec 2015 09:40:36 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wmvv187 with SMTP id v187so17922549wmv.1; Thu, 03 Dec 2015 01:40:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=KyMiyzGQ05E53TEM04FC0VuvV1p268iU8UmVpoIy474=; b=lYRtia2Y3tQvjJ1peqXeGdrJ+TDfMTg7gfNHFq/8ZZJqAzpeVxXdJyxJjWbyFB0u9X 6jcXPjqwCr3XRiSJ1nB3wPaFabCBA+kluNeqoTwKPyXT1XmdNFZrG6TafmBRsnGG/iHY mxpMRAqLZbwji/MyhfD1cvZ7GvR70lt88GYy4dzL5IH6iY11OisteoWSbw1nUDcOzKvu xWZwgsSAmiwo1nyzrsEp9tHdRflYZUIHB3AldJB6Q5jynvzDG1EwqSznjJUOuJRiw9Av JukSHNWLqXi5v07c9zZoWsE1mo/OFWYz+aMqd744JWgwNUg0GwIAedXNGVTF8JkTtqZ9 08EQ== X-Received: by 10.28.148.147 with SMTP id w141mr11748587wmd.14.1449135634434; Thu, 03 Dec 2015 01:40:34 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id lx4sm6702398wjb.5.2015.12.03.01.40.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Dec 2015 01:40:33 -0800 (PST) Sender: Baptiste Daroussin Date: Thu, 3 Dec 2015 10:40:31 +0100 From: Baptiste Daroussin To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r287084 - in stable/10/usr.sbin/pw: . tests Message-ID: <20151203094031.GG20169@ivaldir.etoilebsd.net> References: <201508232142.t7NLgSXX033227@repo.freebsd.org> <867fkxcbq9.fsf@desk.des.no> <20151202215958.GD20169@ivaldir.etoilebsd.net> <86egf4uegi.fsf@desk.des.no> <20151203083556.GF20169@ivaldir.etoilebsd.net> <86lh9bubru.fsf@desk.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xs+9IvWevLaxKUtW" Content-Disposition: inline In-Reply-To: <86lh9bubru.fsf@desk.des.no> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 09:40:37 -0000 --xs+9IvWevLaxKUtW Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 03, 2015 at 10:22:45AM +0100, Dag-Erling Sm=F8rgrav wrote: > Baptiste Daroussin writes: > > Dag-Erling Sm=F8rgrav writes: > > > Baptiste Daroussin writes: > > > > Or a fix can be made, if you provide an example of the failing case= , I > > > > would be able to fix it and add it to the regression tests. > > > Any operation that specifies a GECOS containing multibyte characters. > > Right so it is fixed. >=20 > Not really. After your latest commit, it will appear to work, but it > will still be broken. A proper fix would entail converting all input to > wide strings, validating it as such and converting back before output. > Also, the validation is based on blacklisting specific characters which > are considered unsafe instead of whitelisting those that are known to be > safe. Yes but that was already broken before my work, so doing that would be an entirely new and willing project but in term of "regression" the regression= has been fixed. reverting the work I have done will not change that. The interesting thing is the validator was there before my changes, and not changed at all in the process of adding validation, so depending on the com= mand you were using your multibyte input for gecos may or may not have been reje= cted already! the behaviour we have now is better in the sense that it is consis= tent in that regards. So imho reverting is really not needed. Now if one wants to make that properly handled using wide char, then you ha= ve a lot of tools and interfaces to work on not only pw(8) Best regards, Bapt --xs+9IvWevLaxKUtW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlZgDg8ACgkQ8kTtMUmk6ExvXgCdFsbGhb63hB6KsPlVPgMWCrLP BJsAnA6iZCBEv7x1GJBCAMfjwSejODVd =vyYi -----END PGP SIGNATURE----- --xs+9IvWevLaxKUtW-- From owner-svn-src-all@freebsd.org Thu Dec 3 10:17:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E754A3E76B; Thu, 3 Dec 2015 10:17:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5370F1C6F; Thu, 3 Dec 2015 10:17:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3AH11Q049737; Thu, 3 Dec 2015 10:17:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3AH18o049736; Thu, 3 Dec 2015 10:17:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201512031017.tB3AH18o049736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 3 Dec 2015 10:17:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291684 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 10:17:02 -0000 Author: hselasky Date: Thu Dec 3 10:17:01 2015 New Revision: 291684 URL: https://svnweb.freebsd.org/changeset/base/291684 Log: Update the mlx5en(4) manual page. MFC after: 1 week Submitted by: Mark Bloch Sponsored by: Mellanox Technologies Differential Revision: https://reviews.freebsd.org/D4348 Modified: head/share/man/man4/mlx5en.4 Modified: head/share/man/man4/mlx5en.4 ============================================================================== --- head/share/man/man4/mlx5en.4 Thu Dec 3 09:37:20 2015 (r291683) +++ head/share/man/man4/mlx5en.4 Thu Dec 3 10:17:01 2015 (r291684) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2015 +.Dd December 3, 2015 .Dt mlx5en 4 .Os .Sh NAME @@ -40,6 +40,12 @@ kernel configuration file: .Cd "device mlx5en" .Ed .Pp +To load the driver as a module at run-time, +run the following command as root: +.Bd -literal -offset indent +kldload mlx5en +.Ed +.Pp To load the driver as a module at boot time, place the following lines in .Xr loader.conf 5 : From owner-svn-src-all@freebsd.org Thu Dec 3 10:29:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E353DA3EAFB; Thu, 3 Dec 2015 10:29:44 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 5A61D1314; Thu, 3 Dec 2015 10:29:44 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 60FF52FAD; Thu, 3 Dec 2015 10:29:42 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 8D7073FCF2; Thu, 3 Dec 2015 11:29:44 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Baptiste Daroussin Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r287084 - in stable/10/usr.sbin/pw: . tests References: <201508232142.t7NLgSXX033227@repo.freebsd.org> <867fkxcbq9.fsf@desk.des.no> <20151202215958.GD20169@ivaldir.etoilebsd.net> <86egf4uegi.fsf@desk.des.no> <20151203083556.GF20169@ivaldir.etoilebsd.net> <86lh9bubru.fsf@desk.des.no> <20151203094031.GG20169@ivaldir.etoilebsd.net> Date: Thu, 03 Dec 2015 11:29:44 +0100 In-Reply-To: <20151203094031.GG20169@ivaldir.etoilebsd.net> (Baptiste Daroussin's message of "Thu, 3 Dec 2015 10:40:31 +0100") Message-ID: <86fuzjhlk7.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 10:29:45 -0000 Baptiste Daroussin writes: > The interesting thing is the validator was there before my changes, and n= ot > changed at all in the process of adding validation, so depending on the c= ommand > you were using your multibyte input for gecos may or may not have been re= jected > already! "pw useradd" worked fine in 10.1, so what exactly changed? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@freebsd.org Thu Dec 3 10:33:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 674D1A3EC5C; Thu, 3 Dec 2015 10:33:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E6D3183A; Thu, 3 Dec 2015 10:33:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3AXv3H055313; Thu, 3 Dec 2015 10:33:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3AXvvN055312; Thu, 3 Dec 2015 10:33:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201512031033.tB3AXvvN055312@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 3 Dec 2015 10:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291685 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 10:33:58 -0000 Author: kib Date: Thu Dec 3 10:33:57 2015 New Revision: 291685 URL: https://svnweb.freebsd.org/changeset/base/291685 Log: Fix build for !TCP_OFFLOAD case. Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Dec 3 10:17:01 2015 (r291684) +++ head/sys/dev/cxgbe/t4_main.c Thu Dec 3 10:33:57 2015 (r291685) @@ -3718,8 +3718,8 @@ setup_intr_handlers(struct adapter *sc) vi->nintr++; } } - } #endif + } } MPASS(irq == &sc->irq[sc->intr_count]); From owner-svn-src-all@freebsd.org Thu Dec 3 10:59:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A20A2A3F2CD; Thu, 3 Dec 2015 10:59:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5213C13D1; Thu, 3 Dec 2015 10:59:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3AxAhR061345; Thu, 3 Dec 2015 10:59:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3AxAjI061344; Thu, 3 Dec 2015 10:59:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201512031059.tB3AxAjI061344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 3 Dec 2015 10:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291686 - head/sys/x86/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 10:59:11 -0000 Author: kib Date: Thu Dec 3 10:59:10 2015 New Revision: 291686 URL: https://svnweb.freebsd.org/changeset/base/291686 Log: In the SandyBridge x2APIC workaround detection code, only fetch the environment variable when SandyBridge CPU is detected. Reduce code duplication. Sponsored by: The FreeBSD Foundation Modified: head/sys/x86/acpica/madt.c Modified: head/sys/x86/acpica/madt.c ============================================================================== --- head/sys/x86/acpica/madt.c Thu Dec 3 10:33:57 2015 (r291685) +++ head/sys/x86/acpica/madt.c Thu Dec 3 10:59:10 2015 (r291686) @@ -166,37 +166,30 @@ madt_setup_local(void) } else if (vm_guest == VM_GUEST_XEN) { x2apic_mode = 0; reason = "due to running under XEN"; - } else if (vm_guest == VM_GUEST_NO) { + } else if (vm_guest == VM_GUEST_NO && + CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) == 0x2a) { hw_vendor = kern_getenv("smbios.planar.maker"); /* - * It seems that some Lenovo SandyBridge-based - * notebook BIOSes have a bug which prevents - * booting AP in x2APIC mode. Since the only - * way to detect mobile CPU is to check - * northbridge pci id, which cannot be done - * that early, disable x2APIC for all Lenovo - * SandyBridge machines. + * It seems that some Lenovo and ASUS + * SandyBridge-based notebook BIOSes have a + * bug which prevents booting AP in x2APIC + * mode. Since the only way to detect mobile + * CPU is to check northbridge pci id, which + * cannot be done that early, disable x2APIC + * for all Lenovo and ASUS SandyBridge + * machines. */ - if (hw_vendor != NULL && - !strcmp(hw_vendor, "LENOVO") && - CPUID_TO_FAMILY(cpu_id) == 0x6 && - CPUID_TO_MODEL(cpu_id) == 0x2a) { - x2apic_mode = 0; - reason = - "for a suspected Lenovo SandyBridge BIOS bug"; + if (hw_vendor != NULL) { + if (!strcmp(hw_vendor, "LENOVO") || + !strcmp(hw_vendor, + "ASUSTeK Computer Inc.")) { + x2apic_mode = 0; + reason = + "for a suspected SandyBridge BIOS bug"; + } + freeenv(hw_vendor); } - /* - * Same reason, ASUS SandyBridge. - */ - if (hw_vendor != NULL && - !strcmp(hw_vendor, "ASUSTeK Computer Inc.") && - CPUID_TO_FAMILY(cpu_id) == 0x6 && - CPUID_TO_MODEL(cpu_id) == 0x2a) { - x2apic_mode = 0; - reason = - "for a suspected ASUS SandyBridge BIOS bug"; - } - freeenv(hw_vendor); } TUNABLE_INT_FETCH("hw.x2apic_enable", &x2apic_mode); if (!x2apic_mode && reason != NULL && bootverbose) From owner-svn-src-all@freebsd.org Thu Dec 3 11:04:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6BC9BA3F46E; Thu, 3 Dec 2015 11:04:54 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07CD31908; Thu, 3 Dec 2015 11:04:54 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: by wmww144 with SMTP id w144so16074006wmw.1; Thu, 03 Dec 2015 03:04:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=6Jowi9b9+/R44crja+5NZUmHwHJUPbdR4STqUQoj/U4=; b=EQYyiEJlFV1dTbDMbXnHthK5TKSCpuFJ8bgoEx2Rq62Y3nJ3Jcc3NXuMLo2RfliKd2 ljDgZab6n2RIx+ycnYPuRRqmaN3WOcIGWsDS9YWcKMD0M1j9Md9BCzw/gX67eATyBr3V eTuRT3f+UKgNPTy0VAFA75V9r/YBWL121WYpgV02VHb1NDYsdSimYx9TLCa3dXJzbzzn 8dJDCiUorS+Vo2zSpnK5EpeTMi6Q1mFJkjPg624Ud1bF5uvLXAZaQBA5ACFxmu813na/ NTeS4ib9VJTLSkWYqt79a+4jEnb/U1L1cX5f4CCeHeEvVv/SYnCtMU4YefyqkedebOb+ cINw== X-Received: by 10.28.189.11 with SMTP id n11mr53095182wmf.27.1449140691743; Thu, 03 Dec 2015 03:04:51 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by smtp.gmail.com with ESMTPSA id u139sm35101060wmu.22.2015.12.03.03.04.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Dec 2015 03:04:50 -0800 (PST) Sender: Baptiste Daroussin Date: Thu, 3 Dec 2015 12:04:49 +0100 From: Baptiste Daroussin To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r287084 - in stable/10/usr.sbin/pw: . tests Message-ID: <20151203110448.GA9130@ivaldir.etoilebsd.net> References: <201508232142.t7NLgSXX033227@repo.freebsd.org> <867fkxcbq9.fsf@desk.des.no> <20151202215958.GD20169@ivaldir.etoilebsd.net> <86egf4uegi.fsf@desk.des.no> <20151203083556.GF20169@ivaldir.etoilebsd.net> <86lh9bubru.fsf@desk.des.no> <20151203094031.GG20169@ivaldir.etoilebsd.net> <86fuzjhlk7.fsf@desk.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ew6BAiZeqk4r7MaW" Content-Disposition: inline In-Reply-To: <86fuzjhlk7.fsf@desk.des.no> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 11:04:54 -0000 --ew6BAiZeqk4r7MaW Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 03, 2015 at 11:29:44AM +0100, Dag-Erling Sm=F8rgrav wrote: > Baptiste Daroussin writes: > > The interesting thing is the validator was there before my changes, and= not > > changed at all in the process of adding validation, so depending on the= command > > you were using your multibyte input for gecos may or may not have been = rejected > > already! >=20 > "pw useradd" worked fine in 10.1, so what exactly changed? >=20 some commands where calling pw_checknames, somewhere not, pw useradd was no= t so it din't try to validate the gecos input, others were. Bapt --ew6BAiZeqk4r7MaW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlZgIdAACgkQ8kTtMUmk6EzOKQCguCEYKslIwWS9yNv7YiENBCZc IGMAnjaY+AJic/UDvfAB7tZBgjcNR39Z =zaRD -----END PGP SIGNATURE----- --ew6BAiZeqk4r7MaW-- From owner-svn-src-all@freebsd.org Thu Dec 3 11:05:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 135DAA3F51E; Thu, 3 Dec 2015 11:05:37 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C909F1A87; Thu, 3 Dec 2015 11:05:36 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3B5ZAp064166; Thu, 3 Dec 2015 11:05:35 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3B5ZUO064164; Thu, 3 Dec 2015 11:05:35 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201512031105.tB3B5ZUO064164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 3 Dec 2015 11:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291687 - in stable/10/sys: dev/xen/control x86/xen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 11:05:37 -0000 Author: royger Date: Thu Dec 3 11:05:35 2015 New Revision: 291687 URL: https://svnweb.freebsd.org/changeset/base/291687 Log: MFC r291024: xen: fix dropping bitmap IPIs during resume Sponsored by: Citrix Systems R&D Modified: stable/10/sys/dev/xen/control/control.c stable/10/sys/x86/xen/hvm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/xen/control/control.c ============================================================================== --- stable/10/sys/dev/xen/control/control.c Thu Dec 3 10:59:10 2015 (r291686) +++ stable/10/sys/dev/xen/control/control.c Thu Dec 3 11:05:35 2015 (r291687) @@ -127,6 +127,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -403,6 +404,8 @@ xctrl_suspend() gnttab_resume(); #ifdef SMP + /* Send an IPI_BITMAP in case there are pending bitmap IPIs. */ + lapic_ipi_vectored(IPI_BITMAP_VECTOR, APIC_IPI_DEST_ALL); if (smp_started && !CPU_EMPTY(&cpu_suspend_map)) { /* * Now that event channels have been initialized, Modified: stable/10/sys/x86/xen/hvm.c ============================================================================== --- stable/10/sys/x86/xen/hvm.c Thu Dec 3 10:59:10 2015 (r291686) +++ stable/10/sys/x86/xen/hvm.c Thu Dec 3 11:05:35 2015 (r291687) @@ -72,7 +72,6 @@ static driver_filter_t xen_cpustop_handl static driver_filter_t xen_cpususpend_handler; static driver_filter_t xen_cpustophard_handler; static void xen_ipi_vectored(u_int vector, int dest); -static void xen_hvm_cpu_resume(void); #endif static void xen_hvm_cpu_init(void); @@ -84,9 +83,6 @@ extern void pmap_lazyfix_action(void); extern int pmap_pcid_enabled; #endif -/* Variables used by mp_machdep to perform the bitmap IPI */ -extern volatile u_int cpu_ipi_pending[MAXCPU]; - /*---------------------------------- Macros ----------------------------------*/ #define IPI_TO_IDX(ipi) ((ipi) - APIC_IPI_INTS) @@ -110,7 +106,7 @@ enum xen_domain_type xen_domain_type = X struct cpu_ops xen_hvm_cpu_ops = { .ipi_vectored = lapic_ipi_vectored, .cpu_init = xen_hvm_cpu_init, - .cpu_resume = xen_hvm_cpu_resume + .cpu_resume = xen_hvm_cpu_init }; #endif @@ -312,21 +308,6 @@ xen_ipi_vectored(u_int vector, int dest) /*---------------------- XEN diverged cpu operations -------------------------*/ static void -xen_hvm_cpu_resume(void) -{ - u_int cpuid = PCPU_GET(cpuid); - - /* - * Reset pending bitmap IPIs, because Xen doesn't preserve pending - * event channels on migration. - */ - cpu_ipi_pending[cpuid] = 0; - - /* register vcpu_info area */ - xen_hvm_cpu_init(); -} - -static void xen_cpu_ipi_init(int cpu) { xen_intr_handle_t *ipi_handle; From owner-svn-src-all@freebsd.org Thu Dec 3 11:14:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE6CEA3F727; Thu, 3 Dec 2015 11:14:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3B221ED9; Thu, 3 Dec 2015 11:14:16 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3BEFpx067088; Thu, 3 Dec 2015 11:14:15 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3BEFSa067079; Thu, 3 Dec 2015 11:14:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201512031114.tB3BEFSa067079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 3 Dec 2015 11:14:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291688 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 11:14:17 -0000 Author: kib Date: Thu Dec 3 11:14:14 2015 New Revision: 291688 URL: https://svnweb.freebsd.org/changeset/base/291688 Log: For amd64 non-PCID machines, and for i386 machines with support for the PG_G global pte flag, pmap_invalidate_all() fails to flush global TLB entries [*]. This is because TLB shootdown handler for such configs reloads CR3, and on i386 pmap_invalidate_all() does the same for the initiating CPU. Note that current code does not issue total invalidation requests for the kernel_pmap. Rename amd64 function invltlb_globpcid() to invltlb_glob(), it is not specific for PCID for quite some time, and implement the same functionality for i386. Use the function instead of invltlb() in shootdown handlers and in i386 pmap_invalidate_all(), but only for the kernel pmap (which maps pages with the PG_G attribute set), which takes care of PG_G TLB entries on flush. To detect the affected pmap in i386 TLB shootdown handler, pmap should be passed to the smp_masked_invltlb() function, which makes amd64 and i386 TLB shootdown code almost identical. Merge the code under x86/. Noted by: jhb [*] Reviewed by: cem, jhb, pho Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D4346 Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/amd64/pmap.c head/sys/amd64/include/cpufunc.h head/sys/amd64/include/smp.h head/sys/i386/i386/mp_machdep.c head/sys/i386/i386/pmap.c head/sys/i386/include/pmap.h head/sys/i386/include/smp.h head/sys/x86/x86/mp_x86.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Thu Dec 3 11:05:35 2015 (r291687) +++ head/sys/amd64/amd64/mp_machdep.c Thu Dec 3 11:14:14 2015 (r291688) @@ -87,11 +87,6 @@ extern struct pcpu __pcpu[]; char *doublefault_stack; char *nmi_stack; -/* Variables needed for SMP tlb shootdown. */ -static vm_offset_t smp_tlb_addr1, smp_tlb_addr2; -static pmap_t smp_tlb_pmap; -volatile int smp_tlb_wait; - extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); /* @@ -410,121 +405,6 @@ start_ap(int apic_id) return 0; /* return FAILURE */ } -/* - * Flush the TLB on other CPU's - */ - -static void -smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap, - vm_offset_t addr1, vm_offset_t addr2) -{ - int cpu, ncpu, othercpus; - - othercpus = mp_ncpus - 1; /* does not shootdown self */ - - /* - * Check for other cpus. Return if none. - */ - if (CPU_ISFULLSET(&mask)) { - if (othercpus < 1) - return; - } else { - CPU_CLR(PCPU_GET(cpuid), &mask); - if (CPU_EMPTY(&mask)) - return; - } - - if (!(read_rflags() & PSL_I)) - panic("%s: interrupts disabled", __func__); - mtx_lock_spin(&smp_ipi_mtx); - smp_tlb_addr1 = addr1; - smp_tlb_addr2 = addr2; - smp_tlb_pmap = pmap; - smp_tlb_wait = 0; - if (CPU_ISFULLSET(&mask)) { - ncpu = othercpus; - ipi_all_but_self(vector); - } else { - ncpu = 0; - while ((cpu = CPU_FFS(&mask)) != 0) { - cpu--; - CPU_CLR(cpu, &mask); - CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, - cpu, vector); - ipi_send_cpu(cpu, vector); - ncpu++; - } - } - while (smp_tlb_wait < ncpu) - ia32_pause(); - mtx_unlock_spin(&smp_ipi_mtx); -} - -void -smp_masked_invltlb(cpuset_t mask, pmap_t pmap) -{ - - if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, pmap, 0, 0); -#ifdef COUNT_XINVLTLB_HITS - ipi_global++; -#endif - } -} - -void -smp_masked_invlpg(cpuset_t mask, vm_offset_t addr) -{ - - if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLPG, NULL, addr, 0); -#ifdef COUNT_XINVLTLB_HITS - ipi_page++; -#endif - } -} - -void -smp_masked_invlpg_range(cpuset_t mask, vm_offset_t addr1, vm_offset_t addr2) -{ - - if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLRNG, NULL, - addr1, addr2); -#ifdef COUNT_XINVLTLB_HITS - ipi_range++; - ipi_range_size += (addr2 - addr1) / PAGE_SIZE; -#endif - } -} - -void -smp_cache_flush(void) -{ - - if (smp_started) { - smp_targeted_tlb_shootdown(all_cpus, IPI_INVLCACHE, NULL, - 0, 0); - } -} - -/* - * Handlers for TLB related IPIs - */ -void -invltlb_handler(void) -{ -#ifdef COUNT_XINVLTLB_HITS - xhits_gbl[PCPU_GET(cpuid)]++; -#endif /* COUNT_XINVLTLB_HITS */ -#ifdef COUNT_IPIS - (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; -#endif /* COUNT_IPIS */ - - invltlb(); - atomic_add_int(&smp_tlb_wait, 1); -} - void invltlb_invpcid_handler(void) { @@ -556,7 +436,7 @@ invltlb_pcid_handler(void) #endif /* COUNT_IPIS */ if (smp_tlb_pmap == kernel_pmap) { - invltlb_globpcid(); + invltlb_glob(); } else { /* * The current pmap might not be equal to @@ -572,38 +452,3 @@ invltlb_pcid_handler(void) } atomic_add_int(&smp_tlb_wait, 1); } - -void -invlpg_handler(void) -{ -#ifdef COUNT_XINVLTLB_HITS - xhits_pg[PCPU_GET(cpuid)]++; -#endif /* COUNT_XINVLTLB_HITS */ -#ifdef COUNT_IPIS - (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; -#endif /* COUNT_IPIS */ - - invlpg(smp_tlb_addr1); - atomic_add_int(&smp_tlb_wait, 1); -} - -void -invlrng_handler(void) -{ - vm_offset_t addr; - -#ifdef COUNT_XINVLTLB_HITS - xhits_rng[PCPU_GET(cpuid)]++; -#endif /* COUNT_XINVLTLB_HITS */ -#ifdef COUNT_IPIS - (*ipi_invlrng_counts[PCPU_GET(cpuid)])++; -#endif /* COUNT_IPIS */ - - addr = smp_tlb_addr1; - do { - invlpg(addr); - addr += PAGE_SIZE; - } while (addr < smp_tlb_addr2); - - atomic_add_int(&smp_tlb_wait, 1); -} Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Dec 3 11:05:35 2015 (r291687) +++ head/sys/amd64/amd64/pmap.c Thu Dec 3 11:14:14 2015 (r291688) @@ -1321,7 +1321,7 @@ pmap_update_pde_invalidate(pmap_t pmap, * Promotion: flush every 4KB page mapping from the TLB, * including any global (PG_G) mappings. */ - invltlb_globpcid(); + invltlb_glob(); } } #ifdef SMP @@ -1482,7 +1482,7 @@ pmap_invalidate_all(pmap_t pmap) bzero(&d, sizeof(d)); invpcid(&d, INVPCID_CTXGLOB); } else { - invltlb_globpcid(); + invltlb_glob(); } mask = &all_cpus; } else { @@ -1653,7 +1653,7 @@ pmap_invalidate_all(pmap_t pmap) bzero(&d, sizeof(d)); invpcid(&d, INVPCID_CTXGLOB); } else { - invltlb_globpcid(); + invltlb_glob(); } } else if (pmap == PCPU_GET(curpmap)) { if (pmap_pcid_enabled) { Modified: head/sys/amd64/include/cpufunc.h ============================================================================== --- head/sys/amd64/include/cpufunc.h Thu Dec 3 11:05:35 2015 (r291687) +++ head/sys/amd64/include/cpufunc.h Thu Dec 3 11:14:14 2015 (r291688) @@ -505,7 +505,7 @@ invltlb(void) * Operations that Invalidate TLBs and Paging-Structure Caches. */ static __inline void -invltlb_globpcid(void) +invltlb_glob(void) { uint64_t cr4; Modified: head/sys/amd64/include/smp.h ============================================================================== --- head/sys/amd64/include/smp.h Thu Dec 3 11:05:35 2015 (r291687) +++ head/sys/amd64/include/smp.h Thu Dec 3 11:14:14 2015 (r291688) @@ -25,6 +25,8 @@ #include #include +struct pmap; + /* global symbols in mpboot.S */ extern char mptramp_start[]; extern char mptramp_end[]; @@ -53,6 +55,7 @@ extern u_int ipi_global; extern u_int ipi_page; extern u_int ipi_range; extern u_int ipi_range_size; +extern struct pmap *smp_tlb_pmap; extern volatile int smp_tlb_wait; @@ -86,8 +89,6 @@ inthand_t IDTVEC(justreturn), /* interrupt CPU with minimum overhead */ IDTVEC(rendezvous); /* handle CPU rendezvous */ -struct pmap; - /* functions in mp_machdep.c */ void assign_cpu_ids(void); void cpu_add(u_int apic_id, char boot_cpu); Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Thu Dec 3 11:05:35 2015 (r291687) +++ head/sys/i386/i386/mp_machdep.c Thu Dec 3 11:14:14 2015 (r291688) @@ -132,11 +132,6 @@ __FBSDID("$FreeBSD$"); extern struct pcpu __pcpu[]; -/* Variables needed for SMP tlb shootdown. */ -vm_offset_t smp_tlb_addr1; -vm_offset_t smp_tlb_addr2; -volatile int smp_tlb_wait; - /* * Local data and functions. */ @@ -487,201 +482,3 @@ start_ap(int apic_id) } return 0; /* return FAILURE */ } - -/* - * Flush the TLB on all other CPU's - */ -static void -smp_tlb_shootdown(u_int vector, vm_offset_t addr1, vm_offset_t addr2) -{ - u_int ncpu; - - ncpu = mp_ncpus - 1; /* does not shootdown self */ - if (ncpu < 1) - return; /* no other cpus */ - if (!(read_eflags() & PSL_I)) - panic("%s: interrupts disabled", __func__); - mtx_lock_spin(&smp_ipi_mtx); - smp_tlb_addr1 = addr1; - smp_tlb_addr2 = addr2; - smp_tlb_wait = 0; - ipi_all_but_self(vector); - while (smp_tlb_wait < ncpu) - ia32_pause(); - mtx_unlock_spin(&smp_ipi_mtx); -} - -static void -smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, vm_offset_t addr1, vm_offset_t addr2) -{ - int cpu, ncpu, othercpus; - - othercpus = mp_ncpus - 1; - if (CPU_ISFULLSET(&mask)) { - if (othercpus < 1) - return; - } else { - CPU_CLR(PCPU_GET(cpuid), &mask); - if (CPU_EMPTY(&mask)) - return; - } - if (!(read_eflags() & PSL_I)) - panic("%s: interrupts disabled", __func__); - mtx_lock_spin(&smp_ipi_mtx); - smp_tlb_addr1 = addr1; - smp_tlb_addr2 = addr2; - atomic_store_rel_int(&smp_tlb_wait, 0); - if (CPU_ISFULLSET(&mask)) { - ncpu = othercpus; - ipi_all_but_self(vector); - } else { - ncpu = 0; - while ((cpu = CPU_FFS(&mask)) != 0) { - cpu--; - CPU_CLR(cpu, &mask); - CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, - vector); - ipi_send_cpu(cpu, vector); - ncpu++; - } - } - while (smp_tlb_wait < ncpu) - ia32_pause(); - mtx_unlock_spin(&smp_ipi_mtx); -} - -void -smp_invltlb(void) -{ - - if (smp_started) { - smp_tlb_shootdown(IPI_INVLTLB, 0, 0); -#ifdef COUNT_XINVLTLB_HITS - ipi_global++; -#endif - } -} - -void -smp_invlpg(vm_offset_t addr) -{ - - if (smp_started) { - smp_tlb_shootdown(IPI_INVLPG, addr, 0); -#ifdef COUNT_XINVLTLB_HITS - ipi_page++; -#endif - } -} - -void -smp_invlpg_range(vm_offset_t addr1, vm_offset_t addr2) -{ - - if (smp_started) { - smp_tlb_shootdown(IPI_INVLRNG, addr1, addr2); -#ifdef COUNT_XINVLTLB_HITS - ipi_range++; - ipi_range_size += (addr2 - addr1) / PAGE_SIZE; -#endif - } -} - -void -smp_masked_invltlb(cpuset_t mask) -{ - - if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, 0, 0); -#ifdef COUNT_XINVLTLB_HITS - ipi_masked_global++; -#endif - } -} - -void -smp_masked_invlpg(cpuset_t mask, vm_offset_t addr) -{ - - if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLPG, addr, 0); -#ifdef COUNT_XINVLTLB_HITS - ipi_masked_page++; -#endif - } -} - -void -smp_masked_invlpg_range(cpuset_t mask, vm_offset_t addr1, vm_offset_t addr2) -{ - - if (smp_started) { - smp_targeted_tlb_shootdown(mask, IPI_INVLRNG, addr1, addr2); -#ifdef COUNT_XINVLTLB_HITS - ipi_masked_range++; - ipi_masked_range_size += (addr2 - addr1) / PAGE_SIZE; -#endif - } -} - -void -smp_cache_flush(void) -{ - - if (smp_started) - smp_tlb_shootdown(IPI_INVLCACHE, 0, 0); -} - -/* - * Handlers for TLB related IPIs - */ -void -invltlb_handler(void) -{ - uint64_t cr3; -#ifdef COUNT_XINVLTLB_HITS - xhits_gbl[PCPU_GET(cpuid)]++; -#endif /* COUNT_XINVLTLB_HITS */ -#ifdef COUNT_IPIS - (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; -#endif /* COUNT_IPIS */ - - cr3 = rcr3(); - load_cr3(cr3); - atomic_add_int(&smp_tlb_wait, 1); -} - -void -invlpg_handler(void) -{ -#ifdef COUNT_XINVLTLB_HITS - xhits_pg[PCPU_GET(cpuid)]++; -#endif /* COUNT_XINVLTLB_HITS */ -#ifdef COUNT_IPIS - (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; -#endif /* COUNT_IPIS */ - - invlpg(smp_tlb_addr1); - - atomic_add_int(&smp_tlb_wait, 1); -} - -void -invlrng_handler(void) -{ - vm_offset_t addr; -#ifdef COUNT_XINVLTLB_HITS - xhits_rng[PCPU_GET(cpuid)]++; -#endif /* COUNT_XINVLTLB_HITS */ -#ifdef COUNT_IPIS - (*ipi_invlrng_counts[PCPU_GET(cpuid)])++; -#endif /* COUNT_IPIS */ - - addr = smp_tlb_addr1; - do { - invlpg(addr); - addr += PAGE_SIZE; - } while (addr < smp_tlb_addr2); - - atomic_add_int(&smp_tlb_wait, 1); -} Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Thu Dec 3 11:05:35 2015 (r291687) +++ head/sys/i386/i386/pmap.c Thu Dec 3 11:14:14 2015 (r291688) @@ -655,7 +655,7 @@ pmap_set_pg(void) va = KERNBASE + KERNLOAD; while (va < endva) { pdir_pde(PTD, va) |= pgeflag; - invltlb(); /* Play it safe, invltlb() every time */ + invltlb_glob(); /* Play it safe, invltlb() every time */ va += NBPDR; } } else { @@ -664,7 +664,7 @@ pmap_set_pg(void) pte = vtopte(va); if (*pte) *pte |= pgeflag; - invltlb(); /* Play it safe, invltlb() every time */ + invltlb_glob(); /* Play it safe, invltlb() every time */ va += PAGE_SIZE; } } @@ -973,6 +973,22 @@ pmap_update_pde_invalidate(vm_offset_t v load_cr4(cr4 | CR4_PGE); } } + +void +invltlb_glob(void) +{ + uint64_t cr4; + + if (pgeflag == 0) { + invltlb(); + } else { + cr4 = rcr4(); + load_cr4(cr4 & ~CR4_PGE); + load_cr4(cr4 | CR4_PGE); + } +} + + #ifdef SMP /* * For SMP, these functions have to use the IPI mechanism for coherence. @@ -996,13 +1012,13 @@ pmap_update_pde_invalidate(vm_offset_t v void pmap_invalidate_page(pmap_t pmap, vm_offset_t va) { - cpuset_t other_cpus; + cpuset_t *mask, other_cpus; u_int cpuid; sched_pin(); if (pmap == kernel_pmap || !CPU_CMP(&pmap->pm_active, &all_cpus)) { invlpg(va); - smp_invlpg(va); + mask = &all_cpus; } else { cpuid = PCPU_GET(cpuid); other_cpus = all_cpus; @@ -1010,16 +1026,16 @@ pmap_invalidate_page(pmap_t pmap, vm_off if (CPU_ISSET(cpuid, &pmap->pm_active)) invlpg(va); CPU_AND(&other_cpus, &pmap->pm_active); - if (!CPU_EMPTY(&other_cpus)) - smp_masked_invlpg(other_cpus, va); + mask = &other_cpus; } + smp_masked_invlpg(*mask, va); sched_unpin(); } void pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { - cpuset_t other_cpus; + cpuset_t *mask, other_cpus; vm_offset_t addr; u_int cpuid; @@ -1027,7 +1043,7 @@ pmap_invalidate_range(pmap_t pmap, vm_of if (pmap == kernel_pmap || !CPU_CMP(&pmap->pm_active, &all_cpus)) { for (addr = sva; addr < eva; addr += PAGE_SIZE) invlpg(addr); - smp_invlpg_range(sva, eva); + mask = &all_cpus; } else { cpuid = PCPU_GET(cpuid); other_cpus = all_cpus; @@ -1036,22 +1052,25 @@ pmap_invalidate_range(pmap_t pmap, vm_of for (addr = sva; addr < eva; addr += PAGE_SIZE) invlpg(addr); CPU_AND(&other_cpus, &pmap->pm_active); - if (!CPU_EMPTY(&other_cpus)) - smp_masked_invlpg_range(other_cpus, sva, eva); + mask = &other_cpus; } + smp_masked_invlpg_range(*mask, sva, eva); sched_unpin(); } void pmap_invalidate_all(pmap_t pmap) { - cpuset_t other_cpus; + cpuset_t *mask, other_cpus; u_int cpuid; sched_pin(); - if (pmap == kernel_pmap || !CPU_CMP(&pmap->pm_active, &all_cpus)) { + if (pmap == kernel_pmap) { + invltlb_glob(); + mask = &all_cpus; + } else if (!CPU_CMP(&pmap->pm_active, &all_cpus)) { invltlb(); - smp_invltlb(); + mask = &all_cpus; } else { cpuid = PCPU_GET(cpuid); other_cpus = all_cpus; @@ -1059,9 +1078,9 @@ pmap_invalidate_all(pmap_t pmap) if (CPU_ISSET(cpuid, &pmap->pm_active)) invltlb(); CPU_AND(&other_cpus, &pmap->pm_active); - if (!CPU_EMPTY(&other_cpus)) - smp_masked_invltlb(other_cpus); + mask = &other_cpus; } + smp_masked_invltlb(*mask, pmap); sched_unpin(); } @@ -1193,7 +1212,9 @@ PMAP_INLINE void pmap_invalidate_all(pmap_t pmap) { - if (pmap == kernel_pmap || !CPU_EMPTY(&pmap->pm_active)) + if (pmap == kernel_pmap) + invltlb_glob(); + else if (!CPU_EMPTY(&pmap->pm_active)) invltlb(); } Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Thu Dec 3 11:05:35 2015 (r291687) +++ head/sys/i386/include/pmap.h Thu Dec 3 11:14:14 2015 (r291688) @@ -394,6 +394,8 @@ void pmap_invalidate_cache_pages(vm_page void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, boolean_t force); +void invltlb_glob(void); + #endif /* _KERNEL */ #endif /* !LOCORE */ Modified: head/sys/i386/include/smp.h ============================================================================== --- head/sys/i386/include/smp.h Thu Dec 3 11:05:35 2015 (r291687) +++ head/sys/i386/include/smp.h Thu Dec 3 11:14:14 2015 (r291688) @@ -53,10 +53,6 @@ extern u_int ipi_global; extern u_int ipi_page; extern u_int ipi_range; extern u_int ipi_range_size; -extern u_int ipi_masked_global; -extern u_int ipi_masked_page; -extern u_int ipi_masked_range; -extern u_int ipi_masked_range_size; struct cpu_info { int cpu_present:1; @@ -105,13 +101,10 @@ void ipi_selected(cpuset_t cpus, u_int i u_int mp_bootaddress(u_int); void set_interrupt_apic_ids(void); void smp_cache_flush(void); -void smp_invlpg(vm_offset_t addr); void smp_masked_invlpg(cpuset_t mask, vm_offset_t addr); -void smp_invlpg_range(vm_offset_t startva, vm_offset_t endva); void smp_masked_invlpg_range(cpuset_t mask, vm_offset_t startva, vm_offset_t endva); -void smp_invltlb(void); -void smp_masked_invltlb(cpuset_t mask); +void smp_masked_invltlb(cpuset_t mask, struct pmap *pmap); void mem_range_AP_init(void); void topo_probe(void); void ipi_send_cpu(int cpu, u_int ipi); Modified: head/sys/x86/x86/mp_x86.c ============================================================================== --- head/sys/x86/x86/mp_x86.c Thu Dec 3 11:05:35 2015 (r291687) +++ head/sys/x86/x86/mp_x86.c Thu Dec 3 11:14:14 2015 (r291688) @@ -713,19 +713,6 @@ SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_p SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_range, CTLFLAG_RW, &ipi_range, 0, ""); SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_range_size, CTLFLAG_RW, &ipi_range_size, 0, ""); - -u_int ipi_masked_global; -u_int ipi_masked_page; -u_int ipi_masked_range; -u_int ipi_masked_range_size; -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_masked_global, CTLFLAG_RW, - &ipi_masked_global, 0, ""); -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_masked_page, CTLFLAG_RW, - &ipi_masked_page, 0, ""); -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_masked_range, CTLFLAG_RW, - &ipi_masked_range, 0, ""); -SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_masked_range_size, CTLFLAG_RW, - &ipi_masked_range_size, 0, ""); #endif /* COUNT_XINVLTLB_HITS */ /* @@ -1090,3 +1077,165 @@ mp_ipi_intrcnt(void *dummy) } SYSINIT(mp_ipi_intrcnt, SI_SUB_INTR, SI_ORDER_MIDDLE, mp_ipi_intrcnt, NULL); #endif + +/* + * Flush the TLB on other CPU's + */ + +/* Variables needed for SMP tlb shootdown. */ +static vm_offset_t smp_tlb_addr1, smp_tlb_addr2; +pmap_t smp_tlb_pmap; +volatile int smp_tlb_wait; + +#ifdef __amd64__ +#define read_eflags() read_rflags() +#endif + +static void +smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, pmap_t pmap, + vm_offset_t addr1, vm_offset_t addr2) +{ + int cpu, ncpu, othercpus; + + othercpus = mp_ncpus - 1; /* does not shootdown self */ + + /* + * Check for other cpus. Return if none. + */ + if (CPU_ISFULLSET(&mask)) { + if (othercpus < 1) + return; + } else { + CPU_CLR(PCPU_GET(cpuid), &mask); + if (CPU_EMPTY(&mask)) + return; + } + + if (!(read_eflags() & PSL_I)) + panic("%s: interrupts disabled", __func__); + mtx_lock_spin(&smp_ipi_mtx); + smp_tlb_addr1 = addr1; + smp_tlb_addr2 = addr2; + smp_tlb_pmap = pmap; + smp_tlb_wait = 0; + if (CPU_ISFULLSET(&mask)) { + ncpu = othercpus; + ipi_all_but_self(vector); + } else { + ncpu = 0; + while ((cpu = CPU_FFS(&mask)) != 0) { + cpu--; + CPU_CLR(cpu, &mask); + CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, + cpu, vector); + ipi_send_cpu(cpu, vector); + ncpu++; + } + } + while (smp_tlb_wait < ncpu) + ia32_pause(); + mtx_unlock_spin(&smp_ipi_mtx); +} + +void +smp_masked_invltlb(cpuset_t mask, pmap_t pmap) +{ + + if (smp_started) { + smp_targeted_tlb_shootdown(mask, IPI_INVLTLB, pmap, 0, 0); +#ifdef COUNT_XINVLTLB_HITS + ipi_global++; +#endif + } +} + +void +smp_masked_invlpg(cpuset_t mask, vm_offset_t addr) +{ + + if (smp_started) { + smp_targeted_tlb_shootdown(mask, IPI_INVLPG, NULL, addr, 0); +#ifdef COUNT_XINVLTLB_HITS + ipi_page++; +#endif + } +} + +void +smp_masked_invlpg_range(cpuset_t mask, vm_offset_t addr1, vm_offset_t addr2) +{ + + if (smp_started) { + smp_targeted_tlb_shootdown(mask, IPI_INVLRNG, NULL, + addr1, addr2); +#ifdef COUNT_XINVLTLB_HITS + ipi_range++; + ipi_range_size += (addr2 - addr1) / PAGE_SIZE; +#endif + } +} + +void +smp_cache_flush(void) +{ + + if (smp_started) { + smp_targeted_tlb_shootdown(all_cpus, IPI_INVLCACHE, NULL, + 0, 0); + } +} + +/* + * Handlers for TLB related IPIs + */ +void +invltlb_handler(void) +{ +#ifdef COUNT_XINVLTLB_HITS + xhits_gbl[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invltlb_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + if (smp_tlb_pmap == kernel_pmap) + invltlb_glob(); + else + invltlb(); + atomic_add_int(&smp_tlb_wait, 1); +} + +void +invlpg_handler(void) +{ +#ifdef COUNT_XINVLTLB_HITS + xhits_pg[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlpg_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + invlpg(smp_tlb_addr1); + atomic_add_int(&smp_tlb_wait, 1); +} + +void +invlrng_handler(void) +{ + vm_offset_t addr; + +#ifdef COUNT_XINVLTLB_HITS + xhits_rng[PCPU_GET(cpuid)]++; +#endif /* COUNT_XINVLTLB_HITS */ +#ifdef COUNT_IPIS + (*ipi_invlrng_counts[PCPU_GET(cpuid)])++; +#endif /* COUNT_IPIS */ + + addr = smp_tlb_addr1; + do { + invlpg(addr); + addr += PAGE_SIZE; + } while (addr < smp_tlb_addr2); + + atomic_add_int(&smp_tlb_wait, 1); +} From owner-svn-src-all@freebsd.org Thu Dec 3 11:24:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C196A3FA8F; Thu, 3 Dec 2015 11:24:13 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE45C15B0; Thu, 3 Dec 2015 11:24:12 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3BOBMh070025; Thu, 3 Dec 2015 11:24:11 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3BOBRu070023; Thu, 3 Dec 2015 11:24:11 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201512031124.tB3BOBRu070023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 3 Dec 2015 11:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291689 - in head/sys: conf dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 11:24:13 -0000 Author: andrew Date: Thu Dec 3 11:24:11 2015 New Revision: 291689 URL: https://svnweb.freebsd.org/changeset/base/291689 Log: Add support for a generic AHCI attachment. This allows us to attach to a typically memory mapped bus, for example on the AMD Opteron A1100 the AHCI device is mapped in the CPUs address space, and not through a PCI controller. Further work is needed for this to work with ACPI as this is expected to be common on ARMv8 servers. Reviewed by: mav, mmel Obtained from: mmel, ABT Systems Ltd Relnotes: yes Sponsored by: SoftIron Inc Differential Revision: https://reviews.freebsd.org/D4269 Added: head/sys/dev/ahci/ahci_generic.c - copied, changed from r291244, head/sys/dev/ahci/ahci_pci.c Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Thu Dec 3 11:14:14 2015 (r291688) +++ head/sys/conf/files.arm64 Thu Dec 3 11:24:11 2015 (r291689) @@ -57,6 +57,7 @@ arm64/cloudabi64/cloudabi64_sysvec.c opt crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/acpica/acpi_if.m optional acpi +dev/ahci/ahci_generic.c optional ahci fdt dev/fdt/fdt_arm64.c optional fdt dev/hwpmc/hwpmc_arm64.c optional hwpmc dev/hwpmc/hwpmc_arm64_md.c optional hwpmc Copied and modified: head/sys/dev/ahci/ahci_generic.c (from r291244, head/sys/dev/ahci/ahci_pci.c) ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Tue Nov 24 09:45:36 2015 (r291244, copy source) +++ head/sys/dev/ahci/ahci_generic.c Thu Dec 3 11:24:11 2015 (r291689) @@ -37,559 +37,83 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include #include -#include -#include -#include "ahci.h" - -static int force_ahci = 1; -TUNABLE_INT("hw.ahci.force", &force_ahci); - -static const struct { - uint32_t id; - uint8_t rev; - const char *name; - int quirks; -} ahci_ids[] = { - {0x43801002, 0x00, "AMD SB600", - AHCI_Q_NOMSI | AHCI_Q_ATI_PMP_BUG | AHCI_Q_MAXIO_64K}, - {0x43901002, 0x00, "AMD SB7x0/SB8x0/SB9x0", - AHCI_Q_ATI_PMP_BUG | AHCI_Q_1MSI}, - {0x43911002, 0x00, "AMD SB7x0/SB8x0/SB9x0", - AHCI_Q_ATI_PMP_BUG | AHCI_Q_1MSI}, - {0x43921002, 0x00, "AMD SB7x0/SB8x0/SB9x0", - AHCI_Q_ATI_PMP_BUG | AHCI_Q_1MSI}, - {0x43931002, 0x00, "AMD SB7x0/SB8x0/SB9x0", - AHCI_Q_ATI_PMP_BUG | AHCI_Q_1MSI}, - {0x43941002, 0x00, "AMD SB7x0/SB8x0/SB9x0", - AHCI_Q_ATI_PMP_BUG | AHCI_Q_1MSI}, - /* Not sure SB8x0/SB9x0 needs this quirk. Be conservative though */ - {0x43951002, 0x00, "AMD SB8x0/SB9x0", AHCI_Q_ATI_PMP_BUG}, - {0x78001022, 0x00, "AMD Hudson-2", 0}, - {0x78011022, 0x00, "AMD Hudson-2", 0}, - {0x78021022, 0x00, "AMD Hudson-2", 0}, - {0x78031022, 0x00, "AMD Hudson-2", 0}, - {0x78041022, 0x00, "AMD Hudson-2", 0}, - {0x06111b21, 0x00, "ASMedia ASM2106", 0}, - {0x06121b21, 0x00, "ASMedia ASM1061", 0}, - {0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE}, - {0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE}, - {0x26818086, 0x00, "Intel ESB2", 0}, - {0x26828086, 0x00, "Intel ESB2", 0}, - {0x26838086, 0x00, "Intel ESB2", 0}, - {0x27c18086, 0x00, "Intel ICH7", 0}, - {0x27c38086, 0x00, "Intel ICH7", 0}, - {0x27c58086, 0x00, "Intel ICH7M", 0}, - {0x27c68086, 0x00, "Intel ICH7M", 0}, - {0x28218086, 0x00, "Intel ICH8", 0}, - {0x28228086, 0x00, "Intel ICH8", 0}, - {0x28248086, 0x00, "Intel ICH8", 0}, - {0x28298086, 0x00, "Intel ICH8M", 0}, - {0x282a8086, 0x00, "Intel ICH8M", 0}, - {0x29228086, 0x00, "Intel ICH9", 0}, - {0x29238086, 0x00, "Intel ICH9", 0}, - {0x29248086, 0x00, "Intel ICH9", 0}, - {0x29258086, 0x00, "Intel ICH9", 0}, - {0x29278086, 0x00, "Intel ICH9", 0}, - {0x29298086, 0x00, "Intel ICH9M", 0}, - {0x292a8086, 0x00, "Intel ICH9M", 0}, - {0x292b8086, 0x00, "Intel ICH9M", 0}, - {0x292c8086, 0x00, "Intel ICH9M", 0}, - {0x292f8086, 0x00, "Intel ICH9M", 0}, - {0x294d8086, 0x00, "Intel ICH9", 0}, - {0x294e8086, 0x00, "Intel ICH9M", 0}, - {0x3a058086, 0x00, "Intel ICH10", 0}, - {0x3a228086, 0x00, "Intel ICH10", 0}, - {0x3a258086, 0x00, "Intel ICH10", 0}, - {0x3b228086, 0x00, "Intel 5 Series/3400 Series", 0}, - {0x3b238086, 0x00, "Intel 5 Series/3400 Series", 0}, - {0x3b258086, 0x00, "Intel 5 Series/3400 Series", 0}, - {0x3b298086, 0x00, "Intel 5 Series/3400 Series", 0}, - {0x3b2c8086, 0x00, "Intel 5 Series/3400 Series", 0}, - {0x3b2f8086, 0x00, "Intel 5 Series/3400 Series", 0}, - {0x1c028086, 0x00, "Intel Cougar Point", 0}, - {0x1c038086, 0x00, "Intel Cougar Point", 0}, - {0x1c048086, 0x00, "Intel Cougar Point", 0}, - {0x1c058086, 0x00, "Intel Cougar Point", 0}, - {0x1d028086, 0x00, "Intel Patsburg", 0}, - {0x1d048086, 0x00, "Intel Patsburg", 0}, - {0x1d068086, 0x00, "Intel Patsburg", 0}, - {0x28268086, 0x00, "Intel Patsburg (RAID)", 0}, - {0x1e028086, 0x00, "Intel Panther Point", 0}, - {0x1e038086, 0x00, "Intel Panther Point", 0}, - {0x1e048086, 0x00, "Intel Panther Point (RAID)", 0}, - {0x1e058086, 0x00, "Intel Panther Point (RAID)", 0}, - {0x1e068086, 0x00, "Intel Panther Point (RAID)", 0}, - {0x1e078086, 0x00, "Intel Panther Point (RAID)", 0}, - {0x1e0e8086, 0x00, "Intel Panther Point (RAID)", 0}, - {0x1e0f8086, 0x00, "Intel Panther Point (RAID)", 0}, - {0x1f228086, 0x00, "Intel Avoton", 0}, - {0x1f238086, 0x00, "Intel Avoton", 0}, - {0x1f248086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f258086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f268086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f278086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f2e8086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f2f8086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f328086, 0x00, "Intel Avoton", 0}, - {0x1f338086, 0x00, "Intel Avoton", 0}, - {0x1f348086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f358086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f368086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f378086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f3e8086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f3f8086, 0x00, "Intel Avoton (RAID)", 0}, - {0x23a38086, 0x00, "Intel Coleto Creek", 0}, - {0x28238086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x28278086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x8c028086, 0x00, "Intel Lynx Point", 0}, - {0x8c038086, 0x00, "Intel Lynx Point", 0}, - {0x8c048086, 0x00, "Intel Lynx Point (RAID)", 0}, - {0x8c058086, 0x00, "Intel Lynx Point (RAID)", 0}, - {0x8c068086, 0x00, "Intel Lynx Point (RAID)", 0}, - {0x8c078086, 0x00, "Intel Lynx Point (RAID)", 0}, - {0x8c0e8086, 0x00, "Intel Lynx Point (RAID)", 0}, - {0x8c0f8086, 0x00, "Intel Lynx Point (RAID)", 0}, - {0x8c828086, 0x00, "Intel Wildcat Point", 0}, - {0x8c838086, 0x00, "Intel Wildcat Point", 0}, - {0x8c848086, 0x00, "Intel Wildcat Point (RAID)", 0}, - {0x8c858086, 0x00, "Intel Wildcat Point (RAID)", 0}, - {0x8c868086, 0x00, "Intel Wildcat Point (RAID)", 0}, - {0x8c878086, 0x00, "Intel Wildcat Point (RAID)", 0}, - {0x8c8e8086, 0x00, "Intel Wildcat Point (RAID)", 0}, - {0x8c8f8086, 0x00, "Intel Wildcat Point (RAID)", 0}, - {0x8d028086, 0x00, "Intel Wellsburg", 0}, - {0x8d048086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x8d068086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x8d628086, 0x00, "Intel Wellsburg", 0}, - {0x8d648086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x8d668086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x8d6e8086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x9c028086, 0x00, "Intel Lynx Point-LP", 0}, - {0x9c038086, 0x00, "Intel Lynx Point-LP", 0}, - {0x9c048086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, - {0x9c058086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, - {0x9c068086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, - {0x9c078086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, - {0x9c0e8086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, - {0x9c0f8086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, - {0x23238086, 0x00, "Intel DH89xxCC", 0}, - {0x2360197b, 0x00, "JMicron JMB360", 0}, - {0x2361197b, 0x00, "JMicron JMB361", AHCI_Q_NOFORCE}, - {0x2362197b, 0x00, "JMicron JMB362", 0}, - {0x2363197b, 0x00, "JMicron JMB363", AHCI_Q_NOFORCE}, - {0x2365197b, 0x00, "JMicron JMB365", AHCI_Q_NOFORCE}, - {0x2366197b, 0x00, "JMicron JMB366", AHCI_Q_NOFORCE}, - {0x2368197b, 0x00, "JMicron JMB368", AHCI_Q_NOFORCE}, - {0x611111ab, 0x00, "Marvell 88SE6111", AHCI_Q_NOFORCE | AHCI_Q_NOPMP | - AHCI_Q_1CH | AHCI_Q_EDGEIS}, - {0x612111ab, 0x00, "Marvell 88SE6121", AHCI_Q_NOFORCE | AHCI_Q_NOPMP | - AHCI_Q_2CH | AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, - {0x614111ab, 0x00, "Marvell 88SE6141", AHCI_Q_NOFORCE | AHCI_Q_NOPMP | - AHCI_Q_4CH | AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, - {0x614511ab, 0x00, "Marvell 88SE6145", AHCI_Q_NOFORCE | AHCI_Q_NOPMP | - AHCI_Q_4CH | AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, - {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS}, - {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_ALTSIG}, - {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2}, - {0x91251b4b, 0x00, "Marvell 88SE9125", 0}, - {0x91281b4b, 0x00, "Marvell 88SE9128", AHCI_Q_ALTSIG}, - {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_ALTSIG}, - {0x91721b4b, 0x00, "Marvell 88SE9172", 0}, - {0x91821b4b, 0x00, "Marvell 88SE9182", 0}, - {0x91831b4b, 0x00, "Marvell 88SS9183", 0}, - {0x91a01b4b, 0x00, "Marvell 88SE91Ax", 0}, - {0x92151b4b, 0x00, "Marvell 88SE9215", 0}, - {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_ALTSIG}, - {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_ALTSIG}, - {0x92351b4b, 0x00, "Marvell 88SE9235", 0}, - {0x06201103, 0x00, "HighPoint RocketRAID 620", 0}, - {0x06201b4b, 0x00, "HighPoint RocketRAID 620", 0}, - {0x06221103, 0x00, "HighPoint RocketRAID 622", 0}, - {0x06221b4b, 0x00, "HighPoint RocketRAID 622", 0}, - {0x06401103, 0x00, "HighPoint RocketRAID 640", 0}, - {0x06401b4b, 0x00, "HighPoint RocketRAID 640", 0}, - {0x06441103, 0x00, "HighPoint RocketRAID 644", 0}, - {0x06441b4b, 0x00, "HighPoint RocketRAID 644", 0}, - {0x06411103, 0x00, "HighPoint RocketRAID 640L", 0}, - {0x06421103, 0x00, "HighPoint RocketRAID 642L", 0}, - {0x06451103, 0x00, "HighPoint RocketRAID 644L", 0}, - {0x044c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x044d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x044e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x044f10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x045c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x045d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x045e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x045f10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x055010de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055110de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055210de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055310de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055410de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055510de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055610de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055710de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055810de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055910de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055A10de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055B10de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x058410de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x07f010de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f110de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f210de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f310de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f410de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f510de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f610de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f710de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f810de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f910de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07fa10de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07fb10de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x0ad010de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad110de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad210de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad310de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad410de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad510de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad610de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad710de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad810de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad910de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ada10de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0adb10de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ab410de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0ab510de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0ab610de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0ab710de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0ab810de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0ab910de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0aba10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0abb10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0abc10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0abd10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0abe10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0abf10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0d8410de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8510de, 0x00, "NVIDIA MCP89", AHCI_Q_NOFORCE|AHCI_Q_NOAA}, - {0x0d8610de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8710de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8810de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8910de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8a10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8b10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8c10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8d10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8e10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8f10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x3781105a, 0x00, "Promise TX8660", 0}, - {0x33491106, 0x00, "VIA VT8251", AHCI_Q_NOPMP|AHCI_Q_NONCQ}, - {0x62871106, 0x00, "VIA VT8251", AHCI_Q_NOPMP|AHCI_Q_NONCQ}, - {0x11841039, 0x00, "SiS 966", 0}, - {0x11851039, 0x00, "SiS 968", 0}, - {0x01861039, 0x00, "SiS 968", 0}, - {0xa01c177d, 0x00, "ThunderX", AHCI_Q_ABAR0|AHCI_Q_1MSI}, - {0x00311c36, 0x00, "Annapurna", AHCI_Q_FORCE_PI|AHCI_Q_RESTORE_CAP}, - {0x00000000, 0x00, NULL, 0} + +#include +#include + +#include + +#include +#include + +static struct ofw_compat_data compat_data[] = { + {"generic-ahci", 1}, + {"snps,dwc-ahci", 1}, + {NULL, 0} }; static int -ahci_pci_ctlr_reset(device_t dev) +ahci_gen_ctlr_reset(device_t dev) { - if (pci_read_config(dev, PCIR_DEVVENDOR, 4) == 0x28298086 && - (pci_read_config(dev, 0x92, 1) & 0xfe) == 0x04) - pci_write_config(dev, 0x92, 0x01, 1); return ahci_ctlr_reset(dev); } static int ahci_probe(device_t dev) { - char buf[64]; - int i, valid = 0; - uint32_t devid = pci_get_devid(dev); - uint8_t revid = pci_get_revid(dev); - - /* - * Ensure it is not a PCI bridge (some vendors use - * the same PID and VID in PCI bridge and AHCI cards). - */ - if (pci_get_class(dev) == PCIC_BRIDGE) - return (ENXIO); - /* Is this a possible AHCI candidate? */ - if (pci_get_class(dev) == PCIC_STORAGE && - pci_get_subclass(dev) == PCIS_STORAGE_SATA && - pci_get_progif(dev) == PCIP_STORAGE_SATA_AHCI_1_0) - valid = 1; - else if (pci_get_class(dev) == PCIC_STORAGE && - pci_get_subclass(dev) == PCIS_STORAGE_RAID) - valid = 2; - /* Is this a known AHCI chip? */ - for (i = 0; ahci_ids[i].id != 0; i++) { - if (ahci_ids[i].id == devid && - ahci_ids[i].rev <= revid && - (valid || (force_ahci == 1 && - !(ahci_ids[i].quirks & AHCI_Q_NOFORCE)))) { - /* Do not attach JMicrons with single PCI function. */ - if (pci_get_vendor(dev) == 0x197b && - (pci_read_config(dev, 0xdf, 1) & 0x40) == 0) - return (ENXIO); - snprintf(buf, sizeof(buf), "%s AHCI SATA controller", - ahci_ids[i].name); - device_set_desc_copy(dev, buf); - return (BUS_PROBE_DEFAULT); - } - } - if (valid != 1) + if (!ofw_bus_status_okay(dev)) return (ENXIO); - device_set_desc_copy(dev, "AHCI SATA controller"); - return (BUS_PROBE_DEFAULT); -} - -static int -ahci_ata_probe(device_t dev) -{ - char buf[64]; - int i; - uint32_t devid = pci_get_devid(dev); - uint8_t revid = pci_get_revid(dev); - if ((intptr_t)device_get_ivars(dev) >= 0) + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) return (ENXIO); - /* Is this a known AHCI chip? */ - for (i = 0; ahci_ids[i].id != 0; i++) { - if (ahci_ids[i].id == devid && - ahci_ids[i].rev <= revid) { - snprintf(buf, sizeof(buf), "%s AHCI SATA controller", - ahci_ids[i].name); - device_set_desc_copy(dev, buf); - return (BUS_PROBE_DEFAULT); - } - } + device_set_desc_copy(dev, "AHCI SATA controller"); return (BUS_PROBE_DEFAULT); } static int -ahci_pci_read_msix_bars(device_t dev, uint8_t *table_bar, uint8_t *pba_bar) -{ - int cap_offset = 0, ret; - uint32_t val; - - if ((table_bar == NULL) || (pba_bar == NULL)) - return (EINVAL); - - ret = pci_find_cap(dev, PCIY_MSIX, &cap_offset); - if (ret != 0) - return (EINVAL); - - val = pci_read_config(dev, cap_offset + PCIR_MSIX_TABLE, 4); - *table_bar = PCIR_BAR(val & PCIM_MSIX_BIR_MASK); - - val = pci_read_config(dev, cap_offset + PCIR_MSIX_PBA, 4); - *pba_bar = PCIR_BAR(val & PCIM_MSIX_BIR_MASK); - - return (0); -} - -static int -ahci_pci_attach(device_t dev) +ahci_gen_attach(device_t dev) { struct ahci_controller *ctlr = device_get_softc(dev); - int error, i; - uint32_t devid = pci_get_devid(dev); - uint8_t revid = pci_get_revid(dev); - int msi_count, msix_count; - uint8_t table_bar = 0, pba_bar = 0; - - msi_count = pci_msi_count(dev); - msix_count = pci_msix_count(dev); - - i = 0; - while (ahci_ids[i].id != 0 && - (ahci_ids[i].id != devid || - ahci_ids[i].rev > revid)) - i++; - ctlr->quirks = ahci_ids[i].quirks; - /* Limit speed for my onboard JMicron external port. - * It is not eSATA really, limit to SATA 1 */ - if (pci_get_devid(dev) == 0x2363197b && - pci_get_subvendor(dev) == 0x1043 && - pci_get_subdevice(dev) == 0x81e4) - ctlr->quirks |= AHCI_Q_SATA1_UNIT0; - ctlr->vendorid = pci_get_vendor(dev); - ctlr->deviceid = pci_get_device(dev); - ctlr->subvendorid = pci_get_subvendor(dev); - ctlr->subdeviceid = pci_get_subdevice(dev); - - /* Default AHCI Base Address is BAR(5), Cavium uses BAR(0) */ - if (ctlr->quirks & AHCI_Q_ABAR0) - ctlr->r_rid = PCIR_BAR(0); - else - ctlr->r_rid = PCIR_BAR(5); - if (!(ctlr->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &ctlr->r_rid, RF_ACTIVE))) - return ENXIO; - - /* Read MSI-x BAR IDs if supported */ - if (msix_count > 0) { - error = ahci_pci_read_msix_bars(dev, &table_bar, &pba_bar); - if (error == 0) { - ctlr->r_msix_tab_rid = table_bar; - ctlr->r_msix_pba_rid = pba_bar; - } else { - /* Failed to read BARs, disable MSI-x */ - msix_count = 0; - } - } + int error; - /* Allocate resources for MSI-x table and PBA */ - if (msix_count > 0) { - /* - * Allocate new MSI-x table only if not - * allocated before. - */ - ctlr->r_msix_table = NULL; - if (ctlr->r_msix_tab_rid != ctlr->r_rid) { - /* Separate BAR for MSI-x */ - ctlr->r_msix_table = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &ctlr->r_msix_tab_rid, RF_ACTIVE); - if (ctlr->r_msix_table == NULL) { - ahci_free_mem(dev); - return (ENXIO); - } - } - - /* - * Allocate new PBA table only if not - * allocated before. - */ - ctlr->r_msix_pba = NULL; - if ((ctlr->r_msix_pba_rid != ctlr->r_msix_tab_rid) && - (ctlr->r_msix_pba_rid != ctlr->r_rid)) { - /* Separate BAR for PBA */ - ctlr->r_msix_pba = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &ctlr->r_msix_pba_rid, RF_ACTIVE); - if (ctlr->r_msix_pba == NULL) { - ahci_free_mem(dev); - return (ENXIO); - } - } - } + ctlr->r_rid = 0; + ctlr->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &ctlr->r_rid, + RF_ACTIVE); + if (ctlr->r_mem == NULL) + return (ENXIO); - pci_enable_busmaster(dev); - /* Reset controller */ - if ((error = ahci_pci_ctlr_reset(dev)) != 0) { - ahci_free_mem(dev); - return (error); - }; - - /* Setup interrupts. */ - - /* Setup MSI register parameters */ - /* Process hints. */ - if (ctlr->quirks & AHCI_Q_NOMSI) - ctlr->msi = 0; - else if (ctlr->quirks & AHCI_Q_1MSI) - ctlr->msi = 1; - else - ctlr->msi = 2; - resource_int_value(device_get_name(dev), - device_get_unit(dev), "msi", &ctlr->msi); + /* Setup controller defaults. */ ctlr->numirqs = 1; - if (msi_count == 0 && msix_count == 0) - ctlr->msi = 0; - if (ctlr->msi < 0) - ctlr->msi = 0; - else if (ctlr->msi == 1) { - msi_count = min(1, msi_count); - msix_count = min(1, msix_count); - } else if (ctlr->msi > 1) - ctlr->msi = 2; - - /* Allocate MSI/MSI-x if needed/present. */ - if (ctlr->msi > 0) { - error = ENXIO; - - /* Try to allocate MSI-x first */ - if (msix_count > 0) { - error = pci_alloc_msix(dev, &msix_count); - if (error == 0) - ctlr->numirqs = msix_count; - } - - /* - * Try to allocate MSI if msi_count is greater than 0 - * and if MSI-x allocation failed. - */ - if ((error != 0) && (msi_count > 0)) { - error = pci_alloc_msi(dev, &msi_count); - if (error == 0) - ctlr->numirqs = msi_count; - } - - /* Both MSI and MSI-x allocations failed */ - if (error != 0) { - ctlr->msi = 0; - device_printf(dev, "Failed to allocate MSI/MSI-x, " - "falling back to INTx\n"); - } - } - error = ahci_attach(dev); + /* Reset controller */ + if ((error = ahci_gen_ctlr_reset(dev)) == 0) + error = ahci_attach(dev); + if (error != 0) { - if (ctlr->msi > 0) - pci_release_msi(dev); - ahci_free_mem(dev); + if (ctlr->r_mem != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, + ctlr->r_mem); } return error; } static int -ahci_pci_detach(device_t dev) +ahci_gen_detach(device_t dev) { ahci_detach(dev); - pci_release_msi(dev); return (0); } -static int -ahci_pci_suspend(device_t dev) -{ - struct ahci_controller *ctlr = device_get_softc(dev); - - bus_generic_suspend(dev); - /* Disable interupts, so the state change(s) doesn't trigger */ - ATA_OUTL(ctlr->r_mem, AHCI_GHC, - ATA_INL(ctlr->r_mem, AHCI_GHC) & (~AHCI_GHC_IE)); - return 0; -} - -static int -ahci_pci_resume(device_t dev) -{ - int res; - - if ((res = ahci_pci_ctlr_reset(dev)) != 0) - return (res); - ahci_ctlr_setup(dev); - return (bus_generic_resume(dev)); -} - -devclass_t ahci_devclass; +static devclass_t ahci_gen_devclass; static device_method_t ahci_methods[] = { DEVMETHOD(device_probe, ahci_probe), - DEVMETHOD(device_attach, ahci_pci_attach), - DEVMETHOD(device_detach, ahci_pci_detach), - DEVMETHOD(device_suspend, ahci_pci_suspend), - DEVMETHOD(device_resume, ahci_pci_resume), + DEVMETHOD(device_attach, ahci_gen_attach), + DEVMETHOD(device_detach, ahci_gen_detach), DEVMETHOD(bus_print_child, ahci_print_child), DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), DEVMETHOD(bus_release_resource, ahci_release_resource), @@ -600,28 +124,8 @@ static device_method_t ahci_methods[] = DEVMETHOD_END }; static driver_t ahci_driver = { - "ahci", - ahci_methods, - sizeof(struct ahci_controller) -}; -DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, NULL, NULL); -static device_method_t ahci_ata_methods[] = { - DEVMETHOD(device_probe, ahci_ata_probe), - DEVMETHOD(device_attach, ahci_pci_attach), - DEVMETHOD(device_detach, ahci_pci_detach), - DEVMETHOD(device_suspend, ahci_pci_suspend), - DEVMETHOD(device_resume, ahci_pci_resume), - DEVMETHOD(bus_print_child, ahci_print_child), - DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), - DEVMETHOD(bus_release_resource, ahci_release_resource), - DEVMETHOD(bus_setup_intr, ahci_setup_intr), - DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), - DEVMETHOD(bus_child_location_str, ahci_child_location_str), - DEVMETHOD_END -}; -static driver_t ahci_ata_driver = { - "ahci", - ahci_ata_methods, - sizeof(struct ahci_controller) + "ahci", + ahci_methods, + sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, NULL, NULL); +DRIVER_MODULE(ahci, simplebus, ahci_driver, ahci_gen_devclass, NULL, NULL); From owner-svn-src-all@freebsd.org Thu Dec 3 11:34:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C835FA3FF1D; Thu, 3 Dec 2015 11:34:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DF521016; Thu, 3 Dec 2015 11:34:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tB3BY7nu082491 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 3 Dec 2015 13:34:07 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tB3BY7nu082491 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tB3BY7Dl082490; Thu, 3 Dec 2015 13:34:07 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 3 Dec 2015 13:34:07 +0200 From: Konstantin Belousov To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291689 - in head/sys: conf dev/ahci Message-ID: <20151203113407.GJ2405@kib.kiev.ua> References: <201512031124.tB3BOBRu070023@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201512031124.tB3BOBRu070023@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 11:34:13 -0000 On Thu, Dec 03, 2015 at 11:24:11AM +0000, Andrew Turner wrote: > Author: andrew > Date: Thu Dec 3 11:24:11 2015 > New Revision: 291689 > URL: https://svnweb.freebsd.org/changeset/base/291689 > > Log: > Add support for a generic AHCI attachment. This allows us to attach to a > typically memory mapped bus, for example on the AMD Opteron A1100 the AHCI > device is mapped in the CPUs address space, and not through a PCI > controller. > > Further work is needed for this to work with ACPI as this is expected to be > common on ARMv8 servers. > > Reviewed by: mav, mmel > Obtained from: mmel, ABT Systems Ltd > Relnotes: yes > Sponsored by: SoftIron Inc > Differential Revision: https://reviews.freebsd.org/D4269 > > Added: > head/sys/dev/ahci/ahci_generic.c > - copied, changed from r291244, head/sys/dev/ahci/ahci_pci.c > Modified: > head/sys/conf/files.arm64 Should the new file added to the ahci.ko module Makefile, at least on arm64 ? From owner-svn-src-all@freebsd.org Thu Dec 3 11:45:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6014A400E0; Thu, 3 Dec 2015 11:45:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 768771503; Thu, 3 Dec 2015 11:45:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3BjCmO075864; Thu, 3 Dec 2015 11:45:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3BjCUJ075863; Thu, 3 Dec 2015 11:45:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201512031145.tB3BjCUJ075863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 3 Dec 2015 11:45:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291690 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 11:45:13 -0000 Author: hselasky Date: Thu Dec 3 11:45:12 2015 New Revision: 291690 URL: https://svnweb.freebsd.org/changeset/base/291690 Log: Remove incorrect defines. The proper version of these macros is defined in linux/etherdevice.h. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/compat.h Modified: head/sys/compat/linuxkpi/common/include/linux/compat.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/compat.h Thu Dec 3 11:24:11 2015 (r291689) +++ head/sys/compat/linuxkpi/common/include/linux/compat.h Thu Dec 3 11:45:12 2015 (r291690) @@ -31,8 +31,4 @@ #ifndef _LINUX_COMPAT_H_ #define _LINUX_COMPAT_H_ -#define is_multicast_ether_addr(x) 0 -#define is_broadcast_ether_addr(x) 0 - - #endif /* _LINUX_COMPAT_H_ */ From owner-svn-src-all@freebsd.org Thu Dec 3 12:17:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81F1DA40E03; Thu, 3 Dec 2015 12:17:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A62918EB; Thu, 3 Dec 2015 12:17:10 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3CH9WK084554; Thu, 3 Dec 2015 12:17:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3CH9m8084553; Thu, 3 Dec 2015 12:17:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201512031217.tB3CH9m8084553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 3 Dec 2015 12:17:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291691 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 12:17:10 -0000 Author: emaste Date: Thu Dec 3 12:17:09 2015 New Revision: 291691 URL: https://svnweb.freebsd.org/changeset/base/291691 Log: newvers: Honour SOURCE_DATE_EPOCH as a build reproducibility measure One reason the kernel does not build reproducibly is that it includes a timestamp in the version string. SOURCE_DATE_EPOCH provides a standard method to address this: it should be set to the last modification time of the source, and build processes use the specified timestamp instead of the "current" date and time. This change uses SOURCE_DATE_EPOCH if it is set; how it gets set needs to be addressed elsewhere. Reviewed by: bapt MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Thu Dec 3 11:45:12 2015 (r291690) +++ head/sys/conf/newvers.sh Thu Dec 3 12:17:09 2015 (r291691) @@ -97,7 +97,15 @@ then fi touch version -v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} t=`date` +v=`cat version` u=${USER:-root} d=`pwd` h=${HOSTNAME:-`hostname`} +if [ -n "$SOURCE_DATE_EPOCH" ]; then + if ! t=`date -r $SOURCE_DATE_EPOCH 2>/dev/null`; then + echo "Invalid SOURCE_DATE_EPOCH" >&2 + exit 1 + fi +else + t=`date` +fi i=`${MAKE:-make} -V KERN_IDENT` compiler_v=$($(${MAKE:-make} -V CC) -v 2>&1 | grep -w 'version') From owner-svn-src-all@freebsd.org Thu Dec 3 12:21:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEF8BA40F80; Thu, 3 Dec 2015 12:21:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9DB581CF6; Thu, 3 Dec 2015 12:21:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3CLI2w084901; Thu, 3 Dec 2015 12:21:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3CLIwU084900; Thu, 3 Dec 2015 12:21:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201512031221.tB3CLIwU084900@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 3 Dec 2015 12:21:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291692 - head/contrib/elftoolchain/readelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 12:21:20 -0000 Author: emaste Date: Thu Dec 3 12:21:18 2015 New Revision: 291692 URL: https://svnweb.freebsd.org/changeset/base/291692 Log: readelf: add Xen ELF notes Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D4356 Modified: head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Thu Dec 3 12:17:09 2015 (r291691) +++ head/contrib/elftoolchain/readelf/readelf.c Thu Dec 3 12:21:18 2015 (r291692) @@ -332,6 +332,7 @@ static const char *note_type_gnu(unsigne static const char *note_type_netbsd(unsigned int nt); static const char *note_type_openbsd(unsigned int nt); static const char *note_type_unknown(unsigned int nt); +static const char *note_type_xen(unsigned int nt); static const char *option_kind(uint8_t kind); static const char *phdr_type(unsigned int ptype); static const char *ppc_abi_fp(uint64_t fp); @@ -1585,6 +1586,8 @@ note_type(const char *name, unsigned int return note_type_netbsd(nt); else if (strcmp(name, "OpenBSD") == 0 && et != ET_CORE) return note_type_openbsd(nt); + else if (strcmp(name, "Xen") == 0 && et != ET_CORE) + return note_type_xen(nt); return note_type_unknown(nt); } @@ -1693,6 +1696,32 @@ note_type_unknown(unsigned int nt) return (s_nt); } +static const char * +note_type_xen(unsigned int nt) +{ + switch (nt) { + case 0: return "XEN_ELFNOTE_INFO"; + case 1: return "XEN_ELFNOTE_ENTRY"; + case 2: return "XEN_ELFNOTE_HYPERCALL_PAGE"; + case 3: return "XEN_ELFNOTE_VIRT_BASE"; + case 4: return "XEN_ELFNOTE_PADDR_OFFSET"; + case 5: return "XEN_ELFNOTE_XEN_VERSION"; + case 6: return "XEN_ELFNOTE_GUEST_OS"; + case 7: return "XEN_ELFNOTE_GUEST_VERSION"; + case 8: return "XEN_ELFNOTE_LOADER"; + case 9: return "XEN_ELFNOTE_PAE_MODE"; + case 10: return "XEN_ELFNOTE_FEATURES"; + case 11: return "XEN_ELFNOTE_BSD_SYMTAB"; + case 12: return "XEN_ELFNOTE_HV_START_LOW"; + case 13: return "XEN_ELFNOTE_L1_MFN_VALID"; + case 14: return "XEN_ELFNOTE_SUSPEND_CANCEL"; + case 15: return "XEN_ELFNOTE_INIT_P2M"; + case 16: return "XEN_ELFNOTE_MOD_START_PFN"; + case 17: return "XEN_ELFNOTE_SUPPORTED_FEATURES"; + default: return (note_type_unknown(nt)); + } +} + static struct { const char *name; int value; From owner-svn-src-all@freebsd.org Thu Dec 3 12:51:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E95F1A3E960; Thu, 3 Dec 2015 12:51:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFC4C10B4; Thu, 3 Dec 2015 12:51:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3Cps1I096086; Thu, 3 Dec 2015 12:51:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3CpsmR096085; Thu, 3 Dec 2015 12:51:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201512031251.tB3CpsmR096085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 3 Dec 2015 12:51:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291693 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 12:51:56 -0000 Author: hselasky Date: Thu Dec 3 12:51:54 2015 New Revision: 291693 URL: https://svnweb.freebsd.org/changeset/base/291693 Log: Add some structures and defines which will be used when decoding small form factor, SFF, standards compliant ethernet EEPROMs. MFC after: 1 week Obtained from: Linux Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/etherdevice.h Modified: head/sys/compat/linuxkpi/common/include/linux/etherdevice.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/etherdevice.h Thu Dec 3 12:21:18 2015 (r291692) +++ head/sys/compat/linuxkpi/common/include/linux/etherdevice.h Thu Dec 3 12:51:54 2015 (r291693) @@ -29,6 +29,25 @@ #include +#define ETH_MODULE_SFF_8079 1 +#define ETH_MODULE_SFF_8079_LEN 256 +#define ETH_MODULE_SFF_8472 2 +#define ETH_MODULE_SFF_8472_LEN 512 +#define ETH_MODULE_SFF_8636 3 +#define ETH_MODULE_SFF_8636_LEN 256 +#define ETH_MODULE_SFF_8436 4 +#define ETH_MODULE_SFF_8436_LEN 256 + +struct ethtool_eeprom { + u32 offset; + u32 len; +}; + +struct ethtool_modinfo { + u32 type; + u32 eeprom_len; +}; + static inline bool is_zero_ether_addr(const u8 * addr) { From owner-svn-src-all@freebsd.org Thu Dec 3 13:00:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6ABF8A3EA94 for ; Thu, 3 Dec 2015 13:00:47 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 08D7014BA for ; Thu, 3 Dec 2015 13:00:46 +0000 (UTC) (envelope-from joerg@britannica.bec.de) X-RZG-AUTH: :JiIXek6mfvEEUpFQdo7Fj1/zg48CFjWjQuEfXeSt/nWoxdY2dvuAIbsw5PvjGQjhWhuV+jPrsk4RQSkbXXm+20XbQAzoKw== X-RZG-CLASS-ID: mo00 Received: from britannica.bec.de (p20030057E21B0F0045F17A0CE9168729.dip0.t-ipconnect.de [IPv6:2003:57:e21b:f00:45f1:7a0c:e916:8729]) by smtp.strato.de (RZmta 37.14 AUTH) with ESMTPSA id u0393drB3D0fHJd (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Thu, 3 Dec 2015 14:00:41 +0100 (CET) Date: Thu, 3 Dec 2015 14:00:40 +0100 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Subject: Re: svn commit: r291666 - head/libexec/rtld-elf Message-ID: <20151203130040.GA8786@britannica.bec.de> References: <201512030006.tB306xTa074887@repo.freebsd.org> <20151203085028.GH2405@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151203085028.GH2405@kib.kiev.ua> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 13:00:47 -0000 On Thu, Dec 03, 2015 at 10:50:28AM +0200, Konstantin Belousov wrote: > > Modified: head/libexec/rtld-elf/Makefile > > ============================================================================== > > --- head/libexec/rtld-elf/Makefile Thu Dec 3 00:02:01 2015 (r291665) > > +++ head/libexec/rtld-elf/Makefile Thu Dec 3 00:06:59 2015 (r291666) > > @@ -13,7 +13,7 @@ SRCS= rtld_start.S \ > > malloc.c xmalloc.c debug.c libmap.c > > MAN= rtld.1 > > CSTD?= gnu99 > > -CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD > > +CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -fno-builtin > > CFLAGS+= -I${SRCTOP}/lib/csu/common > > .if exists(${.CURDIR}/${MACHINE_ARCH}) > > RTLD_ARCH= ${MACHINE_ARCH} > > @@ -22,7 +22,6 @@ RTLD_ARCH= ${MACHINE_CPUARCH} > > .endif > > CFLAGS+= -I${.CURDIR}/${RTLD_ARCH} -I${.CURDIR} > > .if ${MACHINE_ARCH} == "powerpc64" > > -CFLAGS+= -mcall-aixdesc > I wanted to set -ffreestanding for rtld compilation, but considered it only > a minor issue. Could you test this instead of -fno-builtin, please ? I don't tthink either should be used -- -fno-builtin is certainly a very blunt hammer. Are you sure that doesn't disable all kinds of useful things like optimisations of the string functions etc? A more selective approach would to add something like: void *real_malloc(size_t) __asm__("malloc"); and call that. I would call it a bug that -fno-builtin-calloc does not work. Joerg From owner-svn-src-all@freebsd.org Thu Dec 3 13:29:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 09EBAA3F05C; Thu, 3 Dec 2015 13:29:23 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCC301141; Thu, 3 Dec 2015 13:29:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3DTLjw005171; Thu, 3 Dec 2015 13:29:21 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3DTLa6005160; Thu, 3 Dec 2015 13:29:21 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201512031329.tB3DTLa6005160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 3 Dec 2015 13:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291694 - in head/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 13:29:23 -0000 Author: hselasky Date: Thu Dec 3 13:29:20 2015 New Revision: 291694 URL: https://svnweb.freebsd.org/changeset/base/291694 Log: Updated the mlx4 and mlxen drivers to the latest version, v2.1.6: - Added support for dumping the SFP EEPROM content to dmesg. - Fixed handling of network interface capability IOCTLs. - Fixed race when loading and unloading the mlxen driver by applying appropriate locking. - Removed two unused C-files. MFC after: 1 week Submitted by: Mark Bloch Sponsored by: Mellanox Technologies Differential Revision: https://reviews.freebsd.org/D4283 Deleted: head/sys/ofed/drivers/net/mlx4/en_ethtool.c head/sys/ofed/drivers/net/mlx4/en_selftest.c Modified: head/sys/ofed/drivers/net/mlx4/en_main.c head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/ofed/drivers/net/mlx4/en_port.c head/sys/ofed/drivers/net/mlx4/en_rx.c head/sys/ofed/drivers/net/mlx4/en_tx.c head/sys/ofed/drivers/net/mlx4/main.c head/sys/ofed/drivers/net/mlx4/mlx4.h head/sys/ofed/drivers/net/mlx4/mlx4_en.h head/sys/ofed/drivers/net/mlx4/mlx4_stats.h head/sys/ofed/drivers/net/mlx4/port.c head/sys/ofed/include/linux/mlx4/cq.h head/sys/ofed/include/linux/mlx4/device.h head/sys/ofed/include/linux/mlx4/qp.h Modified: head/sys/ofed/drivers/net/mlx4/en_main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_main.c Thu Dec 3 12:51:54 2015 (r291693) +++ head/sys/ofed/drivers/net/mlx4/en_main.c Thu Dec 3 13:29:20 2015 (r291694) @@ -42,16 +42,7 @@ #include "mlx4_en.h" -MODULE_AUTHOR("Liran Liss, Yevgeny Petrilin"); -MODULE_DESCRIPTION("Mellanox ConnectX HCA Ethernet driver"); -MODULE_LICENSE("Dual BSD/GPL"); -#ifdef __linux__ -MODULE_VERSION(DRV_VERSION " ("DRV_RELDATE")"); -#endif - -static const char mlx4_en_version[] = - DRV_NAME ": Mellanox ConnectX HCA Ethernet driver v" - DRV_VERSION " (" DRV_RELDATE ")\n"; +/* Mellanox ConnectX HCA Ethernet driver */ #define MLX4_EN_PARM_INT(X, def_val, desc) \ static unsigned int X = def_val;\ @@ -176,8 +167,6 @@ static void *mlx4_en_add(struct mlx4_dev int i; int err; - printk_once(KERN_INFO "%s", mlx4_en_version); - mdev = kzalloc(sizeof *mdev, GFP_KERNEL); if (!mdev) { dev_err(&dev->pdev->dev, "Device struct alloc failed, " Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Dec 3 12:51:54 2015 (r291693) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Dec 3 13:29:20 2015 (r291694) @@ -658,8 +658,10 @@ static void mlx4_en_cache_mclist(struct continue; /* Make sure the list didn't grow. */ tmp = kzalloc(sizeof(struct mlx4_en_mc_list), GFP_ATOMIC); - if (tmp == NULL) + if (tmp == NULL) { + en_err(priv, "Failed to allocate multicast list\n"); break; + } memcpy(tmp->addr, LLADDR((struct sockaddr_dl *)ifma->ifma_addr), ETH_ALEN); list_add_tail(&tmp->list, &priv->mc_list); @@ -970,12 +972,12 @@ static void mlx4_en_do_set_rx_mode(struc if (!mlx4_en_QUERY_PORT(mdev, priv->port)) { if (priv->port_state.link_state) { priv->last_link_state = MLX4_DEV_EVENT_PORT_UP; - /* Important note: the following call for if_link_state_change - * is needed for interface up scenario (start port, link state - * change) */ /* update netif baudrate */ priv->dev->if_baudrate = IF_Mbps(priv->port_state.link_speed); + /* Important note: the following call for if_link_state_change + * is needed for interface up scenario (start port, link state + * change) */ if_link_state_change(priv->dev, LINK_STATE_UP); en_dbg(HW, priv, "Link Up\n"); } @@ -1195,8 +1197,8 @@ static void mlx4_en_linkstate(struct wor /* update netif baudrate */ priv->dev->if_baudrate = 0; - /* make sure the port is up before notifying the OS. - * This is tricky since we get here on INIT_PORT and + /* make sure the port is up before notifying the OS. + * This is tricky since we get here on INIT_PORT and * in such case we can't tell the OS the port is up. * To solve this there is a call to if_link_state_change * in set_rx_mode. @@ -1574,6 +1576,7 @@ static void mlx4_en_clear_stats(struct n priv->tx_ring[i]->bytes = 0; priv->tx_ring[i]->packets = 0; priv->tx_ring[i]->tx_csum = 0; + priv->tx_ring[i]->oversized_packets = 0; } for (i = 0; i < priv->rx_ring_num; i++) { priv->rx_ring[i]->bytes = 0; @@ -1643,8 +1646,6 @@ void mlx4_en_free_resources(struct mlx4_ if (priv->sysctl) sysctl_ctx_free(&priv->stat_ctx); - - } int mlx4_en_alloc_resources(struct mlx4_en_priv *priv) @@ -1729,8 +1730,11 @@ void mlx4_en_destroy_netdev(struct net_d EVENTHANDLER_DEREGISTER(vlan_unconfig, priv->vlan_detach); /* Unregister device - this will close the port if it was up */ - if (priv->registered) + if (priv->registered) { + mutex_lock(&mdev->state_lock); ether_ifdetach(dev); + mutex_unlock(&mdev->state_lock); + } if (priv->allocated) mlx4_free_hwq_res(mdev->dev, &priv->res, MLX4_EN_PAGE_SIZE); @@ -1808,13 +1812,6 @@ static int mlx4_en_calc_media(struct mlx active = IFM_ETHER; if (priv->last_link_state == MLX4_DEV_EVENT_PORT_DOWN) return (active); - /* - * [ShaharK] mlx4_en_QUERY_PORT sleeps and cannot be called under a - * non-sleepable lock. - * I moved it to the periodic mlx4_en_do_get_stats. - if (mlx4_en_QUERY_PORT(priv->mdev, priv->port)) - return (active); - */ active |= IFM_FDX; trans_type = priv->port_state.transciver; /* XXX I don't know all of the transceiver values. */ @@ -1947,12 +1944,55 @@ static int mlx4_en_ioctl(struct ifnet *d case SIOCSIFCAP: mutex_lock(&mdev->state_lock); mask = ifr->ifr_reqcap ^ dev->if_capenable; - if (mask & IFCAP_HWCSUM) - dev->if_capenable ^= IFCAP_HWCSUM; - if (mask & IFCAP_TSO4) + if (mask & IFCAP_TXCSUM) { + dev->if_capenable ^= IFCAP_TXCSUM; + dev->if_hwassist ^= (CSUM_TCP | CSUM_UDP | CSUM_IP); + + if (IFCAP_TSO4 & dev->if_capenable && + !(IFCAP_TXCSUM & dev->if_capenable)) { + dev->if_capenable &= ~IFCAP_TSO4; + dev->if_hwassist &= ~CSUM_IP_TSO; + if_printf(dev, + "tso4 disabled due to -txcsum.\n"); + } + } + if (mask & IFCAP_TXCSUM_IPV6) { + dev->if_capenable ^= IFCAP_TXCSUM_IPV6; + dev->if_hwassist ^= (CSUM_UDP_IPV6 | CSUM_TCP_IPV6); + + if (IFCAP_TSO6 & dev->if_capenable && + !(IFCAP_TXCSUM_IPV6 & dev->if_capenable)) { + dev->if_capenable &= ~IFCAP_TSO6; + dev->if_hwassist &= ~CSUM_IP6_TSO; + if_printf(dev, + "tso6 disabled due to -txcsum6.\n"); + } + } + if (mask & IFCAP_RXCSUM) + dev->if_capenable ^= IFCAP_RXCSUM; + if (mask & IFCAP_RXCSUM_IPV6) + dev->if_capenable ^= IFCAP_RXCSUM_IPV6; + + if (mask & IFCAP_TSO4) { + if (!(IFCAP_TSO4 & dev->if_capenable) && + !(IFCAP_TXCSUM & dev->if_capenable)) { + if_printf(dev, "enable txcsum first.\n"); + error = EAGAIN; + goto out; + } dev->if_capenable ^= IFCAP_TSO4; - if (mask & IFCAP_TSO6) + dev->if_hwassist ^= CSUM_IP_TSO; + } + if (mask & IFCAP_TSO6) { + if (!(IFCAP_TSO6 & dev->if_capenable) && + !(IFCAP_TXCSUM_IPV6 & dev->if_capenable)) { + if_printf(dev, "enable txcsum6 first.\n"); + error = EAGAIN; + goto out; + } dev->if_capenable ^= IFCAP_TSO6; + dev->if_hwassist ^= CSUM_IP6_TSO; + } if (mask & IFCAP_LRO) dev->if_capenable ^= IFCAP_LRO; if (mask & IFCAP_VLAN_HWTAGGING) @@ -1963,9 +2003,11 @@ static int mlx4_en_ioctl(struct ifnet *d dev->if_capenable ^= IFCAP_WOL_MAGIC; if (dev->if_drv_flags & IFF_DRV_RUNNING) mlx4_en_start_port(dev); +out: mutex_unlock(&mdev->state_lock); VLAN_CAPABILITIES(dev); break; +#if __FreeBSD_version >= 1100036 case SIOCGI2C: { struct ifi2creq i2c; @@ -1989,6 +2031,7 @@ static int mlx4_en_ioctl(struct ifnet *d error = copyout(&i2c, ifr->ifr_data, sizeof(i2c)); break; } +#endif default: error = ether_ioctl(dev, command, data); break; @@ -2088,7 +2131,6 @@ int mlx4_en_init_netdev(struct mlx4_en_d for (i = 0; i < MLX4_EN_MAC_HASH_SIZE; ++i) INIT_HLIST_HEAD(&priv->mac_hash[i]); - /* Query for default mac and max mtu */ priv->max_mtu = mdev->dev->caps.eth_mtu_cap[priv->port]; priv->mac = mdev->dev->caps.def_mac[priv->port]; @@ -2104,8 +2146,6 @@ int mlx4_en_init_netdev(struct mlx4_en_d goto out; } - - priv->stride = roundup_pow_of_two(sizeof(struct mlx4_en_rx_desc) + DS_SIZE); @@ -2127,7 +2167,7 @@ int mlx4_en_init_netdev(struct mlx4_en_d /* * Set driver features */ - dev->if_capabilities |= IFCAP_RXCSUM | IFCAP_TXCSUM; + dev->if_capabilities |= IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6; dev->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING; dev->if_capabilities |= IFCAP_VLAN_HWCSUM | IFCAP_VLAN_HWFILTER; dev->if_capabilities |= IFCAP_LINKSTATE | IFCAP_JUMBO_MTU; @@ -2136,10 +2176,12 @@ int mlx4_en_init_netdev(struct mlx4_en_d if (mdev->LSO_support) dev->if_capabilities |= IFCAP_TSO4 | IFCAP_TSO6 | IFCAP_VLAN_HWTSO; +#if __FreeBSD_version >= 1100000 /* set TSO limits so that we don't have to drop TX packets */ - dev->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); - dev->if_hw_tsomaxsegcount = 16; - dev->if_hw_tsomaxsegsize = 65536; /* XXX can do up to 4GByte */ + dev->if_hw_tsomax = MLX4_EN_TX_MAX_PAYLOAD_SIZE - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN) /* hdr */; + dev->if_hw_tsomaxsegcount = MLX4_EN_TX_MAX_MBUF_FRAGS - 1 /* hdr */; + dev->if_hw_tsomaxsegsize = MLX4_EN_TX_MAX_MBUF_SIZE; +#endif dev->if_capenable = dev->if_capabilities; @@ -2148,6 +2190,8 @@ int mlx4_en_init_netdev(struct mlx4_en_d dev->if_hwassist |= CSUM_TSO; if (dev->if_capenable & IFCAP_TXCSUM) dev->if_hwassist |= (CSUM_TCP | CSUM_UDP | CSUM_IP); + if (dev->if_capenable & IFCAP_TXCSUM_IPV6) + dev->if_hwassist |= (CSUM_UDP_IPV6 | CSUM_TCP_IPV6); /* Register for VLAN events */ @@ -2210,8 +2254,6 @@ int mlx4_en_init_netdev(struct mlx4_en_d if (mdev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_TS) queue_delayed_work(mdev->workqueue, &priv->service_task, SERVICE_TASK_DELAY); - - return 0; out: @@ -2293,6 +2335,162 @@ static int mlx4_en_set_tx_ring_size(SYSC return (error); } +static int mlx4_en_get_module_info(struct net_device *dev, + struct ethtool_modinfo *modinfo) +{ + struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_dev *mdev = priv->mdev; + int ret; + u8 data[4]; + + /* Read first 2 bytes to get Module & REV ID */ + ret = mlx4_get_module_info(mdev->dev, priv->port, + 0/*offset*/, 2/*size*/, data); + + if (ret < 2) { + en_err(priv, "Failed to read eeprom module first two bytes, error: 0x%x\n", -ret); + return -EIO; + } + + switch (data[0] /* identifier */) { + case MLX4_MODULE_ID_QSFP: + modinfo->type = ETH_MODULE_SFF_8436; + modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN; + break; + case MLX4_MODULE_ID_QSFP_PLUS: + if (data[1] >= 0x3) { /* revision id */ + modinfo->type = ETH_MODULE_SFF_8636; + modinfo->eeprom_len = ETH_MODULE_SFF_8636_LEN; + } else { + modinfo->type = ETH_MODULE_SFF_8436; + modinfo->eeprom_len = ETH_MODULE_SFF_8436_LEN; + } + break; + case MLX4_MODULE_ID_QSFP28: + modinfo->type = ETH_MODULE_SFF_8636; + modinfo->eeprom_len = ETH_MODULE_SFF_8636_LEN; + break; + case MLX4_MODULE_ID_SFP: + modinfo->type = ETH_MODULE_SFF_8472; + modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN; + break; + default: + en_err(priv, "mlx4_en_get_module_info : Not recognized cable type\n"); + return -EINVAL; + } + + return 0; +} + +static int mlx4_en_get_module_eeprom(struct net_device *dev, + struct ethtool_eeprom *ee, + u8 *data) +{ + struct mlx4_en_priv *priv = netdev_priv(dev); + struct mlx4_en_dev *mdev = priv->mdev; + int offset = ee->offset; + int i = 0, ret; + + if (ee->len == 0) + return -EINVAL; + + memset(data, 0, ee->len); + + while (i < ee->len) { + en_dbg(DRV, priv, + "mlx4_get_module_info i(%d) offset(%d) len(%d)\n", + i, offset, ee->len - i); + + ret = mlx4_get_module_info(mdev->dev, priv->port, + offset, ee->len - i, data + i); + + if (!ret) /* Done reading */ + return 0; + + if (ret < 0) { + en_err(priv, + "mlx4_get_module_info i(%d) offset(%d) bytes_to_read(%d) - FAILED (0x%x)\n", + i, offset, ee->len - i, ret); + return -1; + } + + i += ret; + offset += ret; + } + return 0; +} + +static void mlx4_en_print_eeprom(u8 *data, __u32 len) +{ + int i; + int j = 0; + int row = 0; + const int NUM_OF_BYTES = 16; + + printf("\nOffset\t\tValues\n"); + printf("------\t\t------\n"); + while(row < len){ + printf("0x%04x\t\t",row); + for(i=0; i < NUM_OF_BYTES; i++){ + printf("%02x ", data[j]); + row++; + j++; + } + printf("\n"); + } +} + +/* Read cable EEPROM module information by first inspecting the first + * two bytes to get the length and then read the rest of the information. + * The information is printed to dmesg. */ +static int mlx4_en_read_eeprom(SYSCTL_HANDLER_ARGS) +{ + + u8* data; + int error; + int result = 0; + struct mlx4_en_priv *priv; + struct net_device *dev; + struct ethtool_modinfo modinfo; + struct ethtool_eeprom ee; + + error = sysctl_handle_int(oidp, &result, 0, req); + if (error || !req->newptr) + return (error); + + if (result == 1) { + priv = arg1; + dev = priv->dev; + data = kmalloc(PAGE_SIZE, GFP_KERNEL); + + error = mlx4_en_get_module_info(dev, &modinfo); + if (error) { + en_err(priv, + "mlx4_en_get_module_info returned with error - FAILED (0x%x)\n", + -error); + goto out; + } + + ee.len = modinfo.eeprom_len; + ee.offset = 0; + + error = mlx4_en_get_module_eeprom(dev, &ee, data); + if (error) { + en_err(priv, + "mlx4_en_get_module_eeprom returned with error - FAILED (0x%x)\n", + -error); + /* Continue printing partial information in case of an error */ + } + + /* EEPROM information will be printed in dmesg */ + mlx4_en_print_eeprom(data, ee.len); +out: + kfree(data); + } + /* Return zero to prevent sysctl failure. */ + return (0); +} + static int mlx4_en_set_tx_ppp(SYSCTL_HANDLER_ARGS) { struct mlx4_en_priv *priv; @@ -2418,7 +2616,7 @@ static void mlx4_en_sysctl_conf(struct m /* Add coalescer configuration. */ coal = SYSCTL_ADD_NODE(ctx, node_list, OID_AUTO, "coalesce", CTLFLAG_RD, NULL, "Interrupt coalesce configuration"); - coal_list = SYSCTL_CHILDREN(node); + coal_list = SYSCTL_CHILDREN(coal); SYSCTL_ADD_UINT(ctx, coal_list, OID_AUTO, "pkt_rate_low", CTLFLAG_RW, &priv->pkt_rate_low, 0, "Packets per-second for minimum delay"); @@ -2437,11 +2635,14 @@ static void mlx4_en_sysctl_conf(struct m SYSCTL_ADD_UINT(ctx, coal_list, OID_AUTO, "adaptive_rx_coal", CTLFLAG_RW, &priv->adaptive_rx_coal, 0, "Enable adaptive rx coalescing"); + /* EEPROM support */ + SYSCTL_ADD_PROC(ctx, node_list, OID_AUTO, "eeprom_info", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, priv, 0, + mlx4_en_read_eeprom, "I", "EEPROM information"); } static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv) { - struct net_device *dev; struct sysctl_ctx_list *ctx; struct sysctl_oid *node; struct sysctl_oid_list *node_list; @@ -2452,8 +2653,6 @@ static void mlx4_en_sysctl_stat(struct m char namebuf[128]; int i; - dev = priv->dev; - ctx = &priv->stat_ctx; sysctl_ctx_init(ctx); node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(priv->sysctl), OID_AUTO, @@ -2481,6 +2680,8 @@ static void mlx4_en_sysctl_stat(struct m &priv->port_stats.wake_queue, "Queue resumed after full"); SYSCTL_ADD_ULONG(ctx, node_list, OID_AUTO, "tx_timeout", CTLFLAG_RD, &priv->port_stats.tx_timeout, "Transmit timeouts"); + SYSCTL_ADD_ULONG(ctx, node_list, OID_AUTO, "tx_oversized_packets", CTLFLAG_RD, + &priv->port_stats.oversized_packets, "TX oversized packets, m_defrag failed"); SYSCTL_ADD_ULONG(ctx, node_list, OID_AUTO, "rx_alloc_failed", CTLFLAG_RD, &priv->port_stats.rx_alloc_failed, "RX failed to allocate mbuf"); SYSCTL_ADD_ULONG(ctx, node_list, OID_AUTO, "rx_chksum_good", CTLFLAG_RD, @@ -2564,7 +2765,7 @@ struct mlx4_en_pkt_stats { SYSCTL_ADD_ULONG(ctx, node_list, OID_AUTO, "tx_packets", CTLFLAG_RD, &priv->pkstats.tx_packets, "TX packets"); SYSCTL_ADD_ULONG(ctx, node_list, OID_AUTO, "tx_bytes", CTLFLAG_RD, - &priv->pkstats.tx_packets, "TX Bytes"); + &priv->pkstats.tx_bytes, "TX Bytes"); SYSCTL_ADD_ULONG(ctx, node_list, OID_AUTO, "tx_multicast_packets", CTLFLAG_RD, &priv->pkstats.tx_multicast_packets, "TX Multicast Packets"); SYSCTL_ADD_ULONG(ctx, node_list, OID_AUTO, "tx_broadcast_packets", CTLFLAG_RD, @@ -2605,8 +2806,8 @@ struct mlx4_en_pkt_stats { CTLFLAG_RD, &tx_ring->packets, "TX packets"); SYSCTL_ADD_ULONG(ctx, ring_list, OID_AUTO, "bytes", CTLFLAG_RD, &tx_ring->bytes, "TX bytes"); - } + for (i = 0; i < priv->rx_ring_num; i++) { rx_ring = priv->rx_ring[i]; snprintf(namebuf, sizeof(namebuf), "rx_ring%d", i); Modified: head/sys/ofed/drivers/net/mlx4/en_port.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_port.c Thu Dec 3 12:51:54 2015 (r291693) +++ head/sys/ofed/drivers/net/mlx4/en_port.c Thu Dec 3 13:29:20 2015 (r291694) @@ -194,6 +194,7 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_e priv->port_stats.tx_chksum_offload += priv->tx_ring[i]->tx_csum; priv->port_stats.queue_stopped += priv->tx_ring[i]->queue_stopped; priv->port_stats.wake_queue += priv->tx_ring[i]->wake_queue; + priv->port_stats.oversized_packets += priv->tx_ring[i]->oversized_packets; } /* RX Statistics */ priv->pkstats.rx_packets = be64_to_cpu(mlx4_en_stats->RTOT_prio_0) + @@ -546,8 +547,9 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_e } if (!mlx4_is_mfunc(mdev->dev)) { +/* netdevice stats format */ +#if __FreeBSD_version >= 1100000 if (reset == 0) { - /* netdevice stats format */ dev = mdev->pndev[port]; if_inc_counter(dev, IFCOUNTER_IPACKETS, priv->pkstats.rx_packets - priv->pkstats_last.rx_packets); @@ -567,6 +569,18 @@ int mlx4_en_DUMP_ETH_STATS(struct mlx4_e priv->pkstats.tx_multicast_packets - priv->pkstats_last.tx_multicast_packets); } priv->pkstats_last = priv->pkstats; +#else + dev = mdev->pndev[port]; + dev->if_ipackets = priv->pkstats.rx_packets; + dev->if_opackets = priv->pkstats.tx_packets; + dev->if_ibytes = priv->pkstats.rx_bytes; + dev->if_obytes = priv->pkstats.tx_bytes; + dev->if_ierrors = priv->pkstats.rx_errors; + dev->if_iqdrops = priv->pkstats.rx_dropped; + dev->if_imcasts = priv->pkstats.rx_multicast_packets; + dev->if_omcasts = priv->pkstats.tx_multicast_packets; + dev->if_collisions = 0; +#endif } spin_unlock(&priv->stats_lock); Modified: head/sys/ofed/drivers/net/mlx4/en_rx.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_rx.c Thu Dec 3 12:51:54 2015 (r291693) +++ head/sys/ofed/drivers/net/mlx4/en_rx.c Thu Dec 3 13:29:20 2015 (r291694) @@ -49,7 +49,8 @@ static void mlx4_en_init_rx_desc(struct struct mlx4_en_rx_ring *ring, int index) { - struct mlx4_en_rx_desc *rx_desc = ring->buf + ring->stride * index; + struct mlx4_en_rx_desc *rx_desc = (struct mlx4_en_rx_desc *) + (ring->buf + (ring->stride * index)); int possible_frags; int i; @@ -102,7 +103,8 @@ static int mlx4_en_alloc_buf(struct mlx4 static int mlx4_en_prepare_rx_desc(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring *ring, int index) { - struct mlx4_en_rx_desc *rx_desc = ring->buf + (index * ring->stride); + struct mlx4_en_rx_desc *rx_desc = (struct mlx4_en_rx_desc *) + (ring->buf + (index * ring->stride)); struct mbuf **mb_list = ring->rx_info + (index << priv->log_rx_info); int i; @@ -130,7 +132,8 @@ static void mlx4_en_free_rx_desc(struct struct mlx4_en_frag_info *frag_info; struct mlx4_en_dev *mdev = priv->mdev; struct mbuf **mb_list; - struct mlx4_en_rx_desc *rx_desc = ring->buf + (index << ring->log_stride); + struct mlx4_en_rx_desc *rx_desc = (struct mlx4_en_rx_desc *) + (ring->buf + (index << ring->log_stride)); dma_addr_t dma; int nr; @@ -574,7 +577,8 @@ int mlx4_en_process_rx_cq(struct net_dev while (XNOR(cqe->owner_sr_opcode & MLX4_CQE_OWNER_MASK, cons_index & size)) { mb_list = ring->rx_info + (index << priv->log_rx_info); - rx_desc = ring->buf + (index << ring->log_stride); + rx_desc = (struct mlx4_en_rx_desc *) + (ring->buf + (index << ring->log_stride)); /* * make sure we read the CQE after we read the ownership bit @@ -611,7 +615,8 @@ int mlx4_en_process_rx_cq(struct net_dev mb->m_pkthdr.ether_vtag = be16_to_cpu(cqe->sl_vid); mb->m_flags |= M_VLANTAG; } - if (likely(dev->if_capabilities & IFCAP_RXCSUM) && + if (likely(dev->if_capenable & + (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) && (cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPOK)) && (cqe->checksum == cpu_to_be16(0xffff))) { priv->port_stats.rx_chksum_good++; @@ -692,6 +697,7 @@ void mlx4_en_rx_irq(struct mlx4_cq *mcq) // Because there is no NAPI in freeBSD done = mlx4_en_poll_rx_cq(cq, MLX4_EN_RX_BUDGET); if (priv->port_up && (done == MLX4_EN_RX_BUDGET) ) { + cq->curr_poll_rx_cpu_id = curcpu; taskqueue_enqueue(cq->tq, &cq->cq_task); } else { @@ -702,8 +708,15 @@ void mlx4_en_rx_irq(struct mlx4_cq *mcq) void mlx4_en_rx_que(void *context, int pending) { struct mlx4_en_cq *cq; + struct thread *td; cq = context; + td = curthread; + + thread_lock(td); + sched_bind(td, cq->curr_poll_rx_cpu_id); + thread_unlock(td); + while (mlx4_en_poll_rx_cq(cq, MLX4_EN_RX_BUDGET) == MLX4_EN_RX_BUDGET); mlx4_en_arm_cq(cq->dev->if_softc, cq); @@ -841,8 +854,8 @@ int mlx4_en_config_rss_steer(struct mlx4 else rss_rings = priv->prof->rss_rings; - ptr = ((void *) &context) + offsetof(struct mlx4_qp_context, pri_path) - + MLX4_RSS_OFFSET_IN_QPC_PRI_PATH; + ptr = ((u8 *)&context) + offsetof(struct mlx4_qp_context, pri_path) + + MLX4_RSS_OFFSET_IN_QPC_PRI_PATH; rss_context = ptr; rss_context->base_qpn = cpu_to_be32(ilog2(rss_rings) << 24 | (rss_map->base_qpn)); Modified: head/sys/ofed/drivers/net/mlx4/en_tx.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_tx.c Thu Dec 3 12:51:54 2015 (r291693) +++ head/sys/ofed/drivers/net/mlx4/en_tx.c Thu Dec 3 13:29:20 2015 (r291694) @@ -249,7 +249,8 @@ static void mlx4_en_stamp_wqe(struct mlx int index, u8 owner) { struct mlx4_en_tx_info *tx_info = &ring->tx_info[index]; - struct mlx4_en_tx_desc *tx_desc = ring->buf + index * TXBB_SIZE; + struct mlx4_en_tx_desc *tx_desc = (struct mlx4_en_tx_desc *) + (ring->buf + index * TXBB_SIZE); void *end = ring->buf + ring->buf_size; __be32 *ptr = (__be32 *)tx_desc; __be32 stamp = cpu_to_be32(STAMP_VAL | (!!owner << STAMP_SHIFT)); @@ -268,7 +269,7 @@ static void mlx4_en_stamp_wqe(struct mlx *ptr = stamp; ptr += STAMP_DWORDS; if ((void *)ptr >= end) { - ptr = ring->buf; + ptr = (__be32 *)ring->buf; stamp ^= cpu_to_be32(0x80000000); } } @@ -280,7 +281,8 @@ static u32 mlx4_en_free_tx_desc(struct m { struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_en_tx_info *tx_info = &ring->tx_info[index]; - struct mlx4_en_tx_desc *tx_desc = ring->buf + index * TXBB_SIZE; + struct mlx4_en_tx_desc *tx_desc = (struct mlx4_en_tx_desc *) + (ring->buf + index * TXBB_SIZE); struct mlx4_wqe_data_seg *data = (void *) tx_desc + tx_info->data_offset; struct mbuf *mb = tx_info->mb; void *end = ring->buf + ring->buf_size; @@ -307,7 +309,8 @@ static u32 mlx4_en_free_tx_desc(struct m } else { if (!tx_info->inl) { if ((void *) data >= end) { - data = ring->buf + ((void *)data - end); + data = (struct mlx4_wqe_data_seg *) + (ring->buf + ((void *)data - end)); } if (tx_info->linear) { @@ -321,7 +324,7 @@ static u32 mlx4_en_free_tx_desc(struct m for (i = 0; i < frags; i++) { /* Check for wraparound before unmapping */ if ((void *) data >= end) - data = ring->buf; + data = (struct mlx4_wqe_data_seg *)ring->buf; pci_unmap_single(mdev->pdev, (dma_addr_t) be64_to_cpu(data->addr), data->byte_count, PCI_DMA_TODEVICE); @@ -522,7 +525,7 @@ static struct mlx4_en_tx_desc *mlx4_en_b } /* Return real descriptor location */ - return ring->buf + index * TXBB_SIZE; + return (struct mlx4_en_tx_desc *)(ring->buf + index * TXBB_SIZE); } static inline void mlx4_en_xmit_poll(struct mlx4_en_priv *priv, int tx_ind) @@ -723,18 +726,14 @@ u16 mlx4_en_select_queue(struct net_devi up = (vlan_tag >> 13) % MLX4_EN_NUM_UP; } #endif - /* check if flowid is set */ - if (M_HASHTYPE_GET(mb) != M_HASHTYPE_NONE) - queue_index = mb->m_pkthdr.flowid; - else - queue_index = m_ether_tcpip_hash(MBUF_HASHFLAG_L3 | MBUF_HASHFLAG_L4, mb, hashrandom); + queue_index = m_ether_tcpip_hash(MBUF_HASHFLAG_L3 | MBUF_HASHFLAG_L4, mb, hashrandom); return ((queue_index % rings_p_up) + (up * rings_p_up)); } -static void mlx4_bf_copy(void __iomem *dst, unsigned long *src, unsigned bytecnt) +static void mlx4_bf_copy(void __iomem *dst, volatile unsigned long *src, unsigned bytecnt) { - __iowrite64_copy(dst, src, bytecnt / 8); + __iowrite64_copy(dst, __DEVOLATILE(void *, src), bytecnt / 8); } static u64 mlx4_en_mac_to_u64(u8 *addr) @@ -843,7 +842,7 @@ retry: /* See if we have enough space for whole descriptor TXBB for setting * SW ownership on next descriptor; if not, use a bounce buffer. */ if (likely(index + nr_txbb <= ring_size)) - tx_desc = ring->buf + index * TXBB_SIZE; + tx_desc = (struct mlx4_en_tx_desc *)(ring->buf + index * TXBB_SIZE); else { tx_desc = (struct mlx4_en_tx_desc *) ring->bounce_buf; bounce = true; @@ -1018,10 +1017,13 @@ mlx4_en_transmit_locked(struct ifnet *de } enqueued = 0; - if (m != NULL) { - if ((err = drbr_enqueue(dev, ring->br, m)) != 0) - return (err); - } + if (m != NULL) + /* + * If we can't insert mbuf into drbr, try to xmit anyway. + * We keep the error we got so we could return that after xmit. + */ + err = drbr_enqueue(dev, ring->br, m); + /* Process the queue */ while ((next = drbr_peek(dev, ring->br)) != NULL) { if ((err = mlx4_en_xmit(dev, tx_ind, &next)) != 0) { @@ -1075,10 +1077,14 @@ mlx4_en_transmit(struct ifnet *dev, stru int i, err = 0; /* Compute which queue to use */ - i = mlx4_en_select_queue(dev, m); + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) { + i = m->m_pkthdr.flowid % priv->tx_ring_num; + } + else { + i = mlx4_en_select_queue(dev, m); + } ring = priv->tx_ring[i]; - if (spin_trylock(&ring->tx_lock)) { err = mlx4_en_transmit_locked(dev, i, m); spin_unlock(&ring->tx_lock); Modified: head/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/main.c Thu Dec 3 12:51:54 2015 (r291693) +++ head/sys/ofed/drivers/net/mlx4/main.c Thu Dec 3 13:29:20 2015 (r291694) @@ -33,7 +33,7 @@ * SOFTWARE. */ -#include +#include #include #include #include @@ -53,9 +53,7 @@ #include "icm.h" #include "mlx4_stats.h" -MODULE_AUTHOR("Roland Dreier"); -MODULE_DESCRIPTION("Mellanox ConnectX HCA low-level driver"); -MODULE_LICENSE("Dual BSD/GPL"); +/* Mellanox ConnectX HCA low-level driver */ struct workqueue_struct *mlx4_wq; @@ -173,7 +171,7 @@ MODULE_PARM_DESC(enable_64b_cqe_eqe, #define PF_CONTEXT_BEHAVIOUR_MASK MLX4_FUNC_CAP_64B_EQE_CQE static char mlx4_version[] __devinitdata = - DRV_NAME ": Mellanox ConnectX core driver v" + DRV_NAME ": Mellanox ConnectX VPI driver v" DRV_VERSION " (" DRV_RELDATE ")\n"; static int log_num_mac = 7; @@ -1295,6 +1293,43 @@ static inline int ibta_mtu_to_int(enum i } } +static ssize_t +show_board(struct device *device, struct device_attribute *attr, + char *buf) +{ + struct mlx4_hca_info *info = container_of(attr, struct mlx4_hca_info, + board_attr); + struct mlx4_dev *mdev = info->dev; + + return sprintf(buf, "%.*s\n", MLX4_BOARD_ID_LEN, + mdev->board_id); +} + +static ssize_t +show_hca(struct device *device, struct device_attribute *attr, + char *buf) +{ + struct mlx4_hca_info *info = container_of(attr, struct mlx4_hca_info, + hca_attr); + struct mlx4_dev *mdev = info->dev; + + return sprintf(buf, "MT%d\n", mdev->pdev->device); +} + +static ssize_t +show_firmware_version(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + struct mlx4_hca_info *info = container_of(attr, struct mlx4_hca_info, + firmware_attr); + struct mlx4_dev *mdev = info->dev; + + return sprintf(buf, "%d.%d.%d\n", (int)(mdev->caps.fw_ver >> 32), + (int)(mdev->caps.fw_ver >> 16) & 0xffff, + (int)mdev->caps.fw_ver & 0xffff); +} + static ssize_t show_port_ib_mtu(struct device *dev, struct device_attribute *attr, char *buf) @@ -2937,6 +2972,30 @@ no_msi: no_irq: dev->caps.num_comp_vectors = 0; dev->caps.comp_pool = 0; + return; +} + +static void +mlx4_init_hca_info(struct mlx4_dev *dev) +{ + struct mlx4_hca_info *info = &mlx4_priv(dev)->hca_info; + + info->dev = dev; + + info->firmware_attr = (struct device_attribute)__ATTR(fw_ver, S_IRUGO, + show_firmware_version, NULL); + if (device_create_file(&dev->pdev->dev, &info->firmware_attr)) + mlx4_err(dev, "Failed to add file firmware version"); + + info->hca_attr = (struct device_attribute)__ATTR(hca, S_IRUGO, show_hca, + NULL); + if (device_create_file(&dev->pdev->dev, &info->hca_attr)) + mlx4_err(dev, "Failed to add file hca type"); + + info->board_attr = (struct device_attribute)__ATTR(board_id, S_IRUGO, + show_board, NULL); + if (device_create_file(&dev->pdev->dev, &info->board_attr)) + mlx4_err(dev, "Failed to add file board id type"); } static int mlx4_init_port_info(struct mlx4_dev *dev, int port) @@ -2990,6 +3049,14 @@ static int mlx4_init_port_info(struct ml return err; } +static void +mlx4_cleanup_hca_info(struct mlx4_hca_info *info) +{ + device_remove_file(&info->dev->pdev->dev, &info->firmware_attr); + device_remove_file(&info->dev->pdev->dev, &info->board_attr); + device_remove_file(&info->dev->pdev->dev, &info->hca_attr); +} + static void mlx4_cleanup_port_info(struct mlx4_port_info *info) { if (info->port < 0) @@ -3347,6 +3414,7 @@ slave_start: goto err_steer; mlx4_init_quotas(dev); + mlx4_init_hca_info(dev); for (port = 1; port <= dev->caps.num_ports; port++) { err = mlx4_init_port_info(dev, port); @@ -3439,8 +3507,7 @@ err_disable_pdev: static int __devinit mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) { - printk_once(KERN_INFO "%s", mlx4_version); - + device_set_desc(pdev->dev.bsddev, mlx4_version); return __mlx4_init_one(pdev, id->driver_data); } @@ -3460,6 +3527,7 @@ static void mlx4_remove_one(struct pci_d mlx4_stop_sense(dev); mlx4_unregister_device(dev); + mlx4_cleanup_hca_info(&priv->hca_info); for (p = 1; p <= dev->caps.num_ports; p++) { mlx4_cleanup_port_info(&priv->port[p]); mlx4_CLOSE_PORT(dev, p); Modified: head/sys/ofed/drivers/net/mlx4/mlx4.h ============================================================================== --- head/sys/ofed/drivers/net/mlx4/mlx4.h Thu Dec 3 12:51:54 2015 (r291693) +++ head/sys/ofed/drivers/net/mlx4/mlx4.h Thu Dec 3 13:29:20 2015 (r291694) @@ -51,7 +51,7 @@ #define DRV_NAME "mlx4_core" #define PFX DRV_NAME ": " -#define DRV_VERSION "2.1" +#define DRV_VERSION "2.1.6" #define DRV_RELDATE __DATE__ #define DRV_STACK_NAME "Linux-MLNX_OFED" @@ -755,6 +755,13 @@ struct mlx4_set_port_rqp_calc_context { __be32 mcast; }; +struct mlx4_hca_info { + struct mlx4_dev *dev; + struct device_attribute firmware_attr; + struct device_attribute hca_attr; + struct device_attribute board_attr; +}; + struct mlx4_port_info { struct mlx4_dev *dev; int port; @@ -845,6 +852,7 @@ struct mlx4_priv { struct mlx4_uar driver_uar; void __iomem *kar; struct mlx4_port_info port[MLX4_MAX_PORTS + 1]; + struct mlx4_hca_info hca_info; struct mlx4_sense sense; struct mutex port_mutex; struct mlx4_msix_ctl msix_ctl; Modified: head/sys/ofed/drivers/net/mlx4/mlx4_en.h ============================================================================== --- head/sys/ofed/drivers/net/mlx4/mlx4_en.h Thu Dec 3 12:51:54 2015 (r291693) +++ head/sys/ofed/drivers/net/mlx4/mlx4_en.h Thu Dec 3 13:29:20 2015 (r291694) @@ -59,8 +59,6 @@ #include "mlx4_stats.h" #define DRV_NAME "mlx4_en" -#define DRV_VERSION "2.1" -#define DRV_RELDATE __DATE__ #define MLX4_EN_MSG_LEVEL (NETIF_MSG_LINK | NETIF_MSG_IFDOWN) @@ -154,7 +152,7 @@ enum { #define MLX4_EN_NUM_UP 1 #define MAX_TX_RINGS (MLX4_EN_MAX_TX_RING_P_UP * \ - MLX4_EN_NUM_UP) + MLX4_EN_NUM_UP) #define MLX4_EN_DEF_TX_RING_SIZE 1024 #define MLX4_EN_DEF_RX_RING_SIZE 1024 @@ -265,9 +263,16 @@ struct mlx4_en_tx_desc { #define MLX4_EN_USE_SRQ 0x01000000 -#define MLX4_EN_TX_BUDGET 64*4 //Compensate for no NAPI in freeBSD - might need some fine tunning in the future. #define MLX4_EN_RX_BUDGET 64 +#define MLX4_EN_TX_MAX_DESC_SIZE 512 /* bytes */ +#define MLX4_EN_TX_MAX_MBUF_SIZE 65536 /* bytes */ +#define MLX4_EN_TX_MAX_PAYLOAD_SIZE 65536 /* bytes */ +#define MLX4_EN_TX_MAX_MBUF_FRAGS \ + ((MLX4_EN_TX_MAX_DESC_SIZE - 128) / DS_SIZE_ALIGNMENT) /* units */ +#define MLX4_EN_TX_WQE_MAX_WQEBBS \ + (MLX4_EN_TX_MAX_DESC_SIZE / TXBB_SIZE) /* units */ + #define MLX4_EN_CX3_LOW_ID 0x1000 #define MLX4_EN_CX3_HIGH_ID 0x1005 @@ -282,7 +287,7 @@ struct mlx4_en_tx_ring { u32 cons; u32 buf_size; u32 doorbell_qpn; - void *buf; + u8 *buf; u16 poll_cnt; int blocked; struct mlx4_en_tx_info *tx_info; @@ -300,6 +305,7 @@ struct mlx4_en_tx_ring { unsigned long packets; unsigned long tx_csum; unsigned long queue_stopped; + unsigned long oversized_packets; unsigned long wake_queue; struct mlx4_bf bf; bool bf_enabled; @@ -339,7 +345,7 @@ struct mlx4_en_rx_ring { u32 rx_buf_size; u32 rx_mb_size; int qpn; - void *buf; + u8 *buf; void *rx_info; unsigned long errors; unsigned long bytes; @@ -400,6 +406,7 @@ struct mlx4_en_cq { #define MLX4_EN_OPCODE_ERROR 0x1e u32 tot_rx; u32 tot_tx; + u32 curr_poll_rx_cpu_id; #ifdef CONFIG_NET_RX_BUSY_POLL unsigned int state; @@ -641,7 +648,6 @@ struct mlx4_en_priv { unsigned long last_ifq_jiffies; u64 if_counters_rx_errors; u64 if_counters_rx_no_buffer; - }; enum mlx4_en_wol { Modified: head/sys/ofed/drivers/net/mlx4/mlx4_stats.h ============================================================================== --- head/sys/ofed/drivers/net/mlx4/mlx4_stats.h Thu Dec 3 12:51:54 2015 (r291693) +++ head/sys/ofed/drivers/net/mlx4/mlx4_stats.h Thu Dec 3 13:29:20 2015 (r291694) @@ -124,6 +124,7 @@ struct mlx4_en_port_stats { unsigned long queue_stopped; unsigned long wake_queue; unsigned long tx_timeout; + unsigned long oversized_packets; unsigned long rx_alloc_failed; unsigned long rx_chksum_good; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 3 14:17:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BFA8A3F9AC; Thu, 3 Dec 2015 14:17:30 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C35F214CE; Thu, 3 Dec 2015 14:17:29 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3EHS6v019182; Thu, 3 Dec 2015 14:17:28 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3EHSZB019181; Thu, 3 Dec 2015 14:17:28 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201512031417.tB3EHSZB019181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 3 Dec 2015 14:17:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291695 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 14:17:30 -0000 Author: avos Date: Thu Dec 3 14:17:28 2015 New Revision: 291695 URL: https://svnweb.freebsd.org/changeset/base/291695 Log: urtwn(4): move duplicate code from urtwn_(r92c/r88e)_dma_init() to urtwn_dma_init() (noop). Reviewed by: kevlo Approved by: adrian (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D4271 Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Thu Dec 3 13:29:20 2015 (r291694) +++ head/sys/dev/usb/wlan/if_urtwn.c Thu Dec 3 14:17:28 2015 (r291695) @@ -2748,8 +2748,23 @@ fail: static __inline int urtwn_dma_init(struct urtwn_softc *sc) { + int error; + + /* Initialize LLT table. */ + error = urtwn_llt_init(sc); + if (error != 0) + return (error); + + error = sc->sc_dma_init(sc); + if (error != 0) + return (error); - return sc->sc_dma_init(sc); + /* Set Tx/Rx transfer page size. */ + urtwn_write_1(sc, R92C_PBP, + SM(R92C_PBP_PSRX, R92C_PBP_128) | + SM(R92C_PBP_PSTX, R92C_PBP_128)); + + return (0); } static int @@ -2757,12 +2772,6 @@ urtwn_r92c_dma_init(struct urtwn_softc * { int hashq, hasnq, haslq, nqueues, nqpages, nrempages; uint32_t reg; - int error; - - /* Initialize LLT table. */ - error = urtwn_llt_init(sc); - if (error != 0) - return (error); /* Get Tx queues to USB endpoints mapping. */ hashq = hasnq = haslq = 0; @@ -2825,10 +2834,6 @@ urtwn_r92c_dma_init(struct urtwn_softc * /* Set Tx/Rx transfer page boundary. */ urtwn_write_2(sc, R92C_TRXFF_BNDY + 2, 0x27ff); - /* Set Tx/Rx transfer page size. */ - urtwn_write_1(sc, R92C_PBP, - SM(R92C_PBP_PSRX, R92C_PBP_128) | - SM(R92C_PBP_PSTX, R92C_PBP_128)); return (0); } @@ -2838,12 +2843,6 @@ urtwn_r88e_dma_init(struct urtwn_softc * struct usb_interface *iface; uint32_t reg; int nqueues; - int error; - - /* Initialize LLT table. */ - error = urtwn_llt_init(sc); - if (error != 0) - return (error); /* Get Tx queues to USB endpoints mapping. */ iface = usbd_get_iface(sc->sc_udev, 0); @@ -2875,11 +2874,6 @@ urtwn_r88e_dma_init(struct urtwn_softc * /* Set Tx/Rx transfer page boundary. */ urtwn_write_2(sc, R92C_TRXFF_BNDY + 2, 0x23ff); - /* Set Tx/Rx transfer page size. */ - urtwn_write_1(sc, R92C_PBP, - SM(R92C_PBP_PSRX, R92C_PBP_128) | - SM(R92C_PBP_PSTX, R92C_PBP_128)); - return (0); } From owner-svn-src-all@freebsd.org Thu Dec 3 14:21:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B1E0A3FC15; Thu, 3 Dec 2015 14:21:57 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11D991B73; Thu, 3 Dec 2015 14:21:56 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3ELuJZ020097; Thu, 3 Dec 2015 14:21:56 GMT (envelope-from fanf@FreeBSD.org) Received: (from fanf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3ELtNO020094; Thu, 3 Dec 2015 14:21:55 GMT (envelope-from fanf@FreeBSD.org) Message-Id: <201512031421.tB3ELtNO020094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fanf set sender to fanf@FreeBSD.org using -f From: Tony Finch Date: Thu, 3 Dec 2015 14:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291696 - head/usr.bin/unifdef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 14:21:57 -0000 Author: fanf Date: Thu Dec 3 14:21:55 2015 New Revision: 291696 URL: https://svnweb.freebsd.org/changeset/base/291696 Log: Update to upstream version 2.11 Improved #if expression evaluator and safer modify-in-place. Obtained from: http://dotat.at/prog/unifdef MFC after: 1 week Modified: head/usr.bin/unifdef/unifdef.1 head/usr.bin/unifdef/unifdef.c head/usr.bin/unifdef/unifdef.h Modified: head/usr.bin/unifdef/unifdef.1 ============================================================================== --- head/usr.bin/unifdef/unifdef.1 Thu Dec 3 14:17:28 2015 (r291695) +++ head/usr.bin/unifdef/unifdef.1 Thu Dec 3 14:21:55 2015 (r291696) @@ -1,6 +1,6 @@ .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. -.\" Copyright (c) 2002 - 2013 Tony Finch . All rights reserved. +.\" Copyright (c) 2002 - 2015 Tony Finch . All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Dave Yost. It was rewritten to support ANSI C by Tony Finch. @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 7, 2014 +.Dd December 3, 2015 .Dt UNIFDEF 1 PRM .Os " " .Sh NAME @@ -122,10 +122,13 @@ the .Fn defined operator, the operators -.Ic \&! , < , > , -.Ic <= , >= , == , != , +.Ic \&! , ~ , - +(unary), +.Ic * , / , % , + , - , +.Ic < , <= , > , >= , == , != , & , ^ , \&| , .Ic && , || , and parenthesized expressions. +Division by zero is treated as an unknown value. A kind of .Dq "short circuit" evaluation is used for the @@ -253,6 +256,11 @@ are set to the given value. Function-like macro definitions (with arguments) are treated as if they are set to 1. .Pp +.Em Warning: +string literals and character constants are not parsed correctly in +.Fl f +files. +.Pp .It Fl b Replace removed lines with blank lines instead of deleting them. @@ -325,12 +333,19 @@ It would be rude to strip them out, just .Pp .It Fl m Modify one or more input files in place. +If an input file is not modified, +the original is preserved instead of being overwritten with an identical copy. .Pp .It Fl M Ar backext Modify input files in place, and keep backups of the original files by appending the .Ar backext to the input filenames. +A zero length +.Ar backext +behaves the same as the +.Fl m +option. .Pp .It Fl n Add @@ -433,23 +448,29 @@ command line options are given. .Sh DIAGNOSTICS .Bl -item .It -Too many levels of nesting. +.Tn EOF +in comment .It Inappropriate .Ic #elif , .Ic #else or -.Ic #endif . +.Ic #endif +.It +Missing macro name in #define or #undef .It -Obfuscated preprocessor control line. +Obfuscated preprocessor control line .It Premature .Tn EOF (with the line number of the most recent unterminated -.Ic #if ) . +.Ic #if ) .It -.Tn EOF -in comment. +Too many levels of nesting +.It +Unrecognized preprocessor directive +.It +Unterminated char or string literal .El .Sh SEE ALSO .Xr cpp 1 , @@ -475,6 +496,12 @@ rewrote it to support .Sh BUGS Expression evaluation is very limited. .Pp +Character constants are not evaluated. +String literals and character constants in +.Fl f +definition files are ignored rather than parsed as +part of a macro's replacement tokens. +.Pp Handling one line at a time means preprocessor directives split across more than one physical line (because of comments or backslash-newline) Modified: head/usr.bin/unifdef/unifdef.c ============================================================================== --- head/usr.bin/unifdef/unifdef.c Thu Dec 3 14:17:28 2015 (r291695) +++ head/usr.bin/unifdef/unifdef.c Thu Dec 3 14:21:55 2015 (r291696) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002 - 2014 Tony Finch + * Copyright (c) 2002 - 2015 Tony Finch * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -46,7 +46,7 @@ #include "unifdef.h" static const char copyright[] = - "@(#) $Version: unifdef-2.10 $\n" + "@(#) $Version: unifdef-2.11 $\n" "@(#) $FreeBSD$\n" "@(#) $Author: Tony Finch (dot@dotat.at) $\n" "@(#) $URL: http://dotat.at/prog/unifdef $\n" @@ -208,6 +208,7 @@ static bool firstsym; /* di static int exitmode; /* exit status mode */ static int exitstat; /* program exit status */ +static bool altered; /* was this file modified? */ static void addsym1(bool, bool, char *); static void addsym2(bool, const char *, const char *); @@ -312,7 +313,8 @@ main(int argc, char *argv[]) break; case 'M': /* modify in place and keep backup */ inplace = true; - backext = optarg; + if (strlen(optarg) > 0) + backext = optarg; break; case 'n': /* add #line directive after deleted lines */ lnnum = true; @@ -350,6 +352,8 @@ main(int argc, char *argv[]) errx(2, "-o cannot be used with multiple input files"); if (argc > 1 && !inplace) errx(2, "multiple input files require -m or -M"); + if (argc == 0 && inplace) + errx(2, "-m requires an input file"); if (argc == 0) argc = 1; if (argc == 1 && !inplace && ofilename == NULL) @@ -416,7 +420,11 @@ processinout(const char *ifn, const char err(2, "can't rename \"%s\" to \"%s\"", ofn, backname); free(backname); } - if (replace(tempname, ofn) < 0) + /* leave file unmodified if unifdef made no changes */ + if (!altered && backext == NULL) { + if (remove(tempname) < 0) + warn("can't remove \"%s\"", tempname); + } else if (replace(tempname, ofn) < 0) err(2, "can't rename \"%s\" to \"%s\"", tempname, ofn); free(tempname); tempname = NULL; @@ -638,6 +646,7 @@ keywordedit(const char *replacement) { snprintf(keyword, tline + sizeof(tline) - keyword, "%s%s", replacement, newline); + altered = true; print(); } static void @@ -700,7 +709,7 @@ flushline(bool keep) } else { if (lnblank && fputs(newline, output) == EOF) closeio(); - exitstat = 1; + altered = true; delcount += 1; blankcount = 0; } @@ -752,6 +761,7 @@ process(void) zerosyms = true; newline = NULL; linenum = 0; + altered = false; while (lineval != LT_EOF) { lineval = parseline(); trans_table[ifstate[depth]][lineval](); @@ -759,6 +769,7 @@ process(void) linenum, linetype_name[lineval], ifstate_name[ifstate[depth]], depth); } + exitstat |= altered; } /* @@ -892,6 +903,40 @@ static Linetype op_and(long *p, Linetype return (*p = 0, LT_FALSE); return op_strict(p, a && b, at, bt); } +static Linetype op_blsh(long *p, Linetype at, long a, Linetype bt, long b) { + return op_strict(p, a << b, at, bt); +} +static Linetype op_brsh(long *p, Linetype at, long a, Linetype bt, long b) { + return op_strict(p, a >> b, at, bt); +} +static Linetype op_add(long *p, Linetype at, long a, Linetype bt, long b) { + return op_strict(p, a + b, at, bt); +} +static Linetype op_sub(long *p, Linetype at, long a, Linetype bt, long b) { + return op_strict(p, a - b, at, bt); +} +static Linetype op_mul(long *p, Linetype at, long a, Linetype bt, long b) { + return op_strict(p, a * b, at, bt); +} +static Linetype op_div(long *p, Linetype at, long a, Linetype bt, long b) { + if (bt != LT_TRUE) { + debug("eval division by zero"); + return (LT_ERROR); + } + return op_strict(p, a / b, at, bt); +} +static Linetype op_mod(long *p, Linetype at, long a, Linetype bt, long b) { + return op_strict(p, a % b, at, bt); +} +static Linetype op_bor(long *p, Linetype at, long a, Linetype bt, long b) { + return op_strict(p, a | b, at, bt); +} +static Linetype op_bxor(long *p, Linetype at, long a, Linetype bt, long b) { + return op_strict(p, a ^ b, at, bt); +} +static Linetype op_band(long *p, Linetype at, long a, Linetype bt, long b) { + return op_strict(p, a & b, at, bt); +} /* * An evaluation function takes three arguments, as follows: (1) a pointer to @@ -915,10 +960,15 @@ static eval_fn eval_table, eval_unary; * calls the inner function with its first argument pointing to the next * element of the table. Innermost expressions have special non-table-driven * handling. + * + * The stop characters help with lexical analysis: an operator is not + * recognized if it is followed by one of the stop characters because + * that would make it a different operator. */ struct op { const char *str; Linetype (*fn)(long *, Linetype, long, Linetype, long); + const char *stop; }; struct ops { eval_fn *inner; @@ -927,12 +977,22 @@ struct ops { static const struct ops eval_ops[] = { { eval_table, { { "||", op_or } } }, { eval_table, { { "&&", op_and } } }, + { eval_table, { { "|", op_bor, "|" } } }, + { eval_table, { { "^", op_bxor } } }, + { eval_table, { { "&", op_band, "&" } } }, { eval_table, { { "==", op_eq }, { "!=", op_ne } } }, - { eval_unary, { { "<=", op_le }, + { eval_table, { { "<=", op_le }, { ">=", op_ge }, - { "<", op_lt }, - { ">", op_gt } } } + { "<", op_lt, "<=" }, + { ">", op_gt, ">=" } } }, + { eval_table, { { "<<", op_blsh }, + { ">>", op_brsh } } }, + { eval_table, { { "+", op_add }, + { "-", op_sub } } }, + { eval_unary, { { "*", op_mul }, + { "/", op_div }, + { "%", op_mod } } }, }; /* Current operator precedence level */ @@ -966,6 +1026,26 @@ eval_unary(const struct ops *ops, long * *valp = !*valp; lt = *valp ? LT_TRUE : LT_FALSE; } + } else if (*cp == '~') { + debug("eval%d ~", prec(ops)); + cp++; + lt = eval_unary(ops, valp, &cp); + if (lt == LT_ERROR) + return (LT_ERROR); + if (lt != LT_IF) { + *valp = ~(*valp); + lt = *valp ? LT_TRUE : LT_FALSE; + } + } else if (*cp == '-') { + debug("eval%d -", prec(ops)); + cp++; + lt = eval_unary(ops, valp, &cp); + if (lt == LT_ERROR) + return (LT_ERROR); + if (lt != LT_IF) { + *valp = -(*valp); + lt = *valp ? LT_TRUE : LT_FALSE; + } } else if (*cp == '(') { cp++; debug("eval%d (", prec(ops)); @@ -1040,7 +1120,7 @@ eval_table(const struct ops *ops, long * { const struct op *op; const char *cp; - long val; + long val = 0; Linetype lt, rt; debug("eval%d", prec(ops)); @@ -1050,9 +1130,16 @@ eval_table(const struct ops *ops, long * return (LT_ERROR); for (;;) { cp = skipcomment(cp); - for (op = ops->op; op->str != NULL; op++) - if (strncmp(cp, op->str, strlen(op->str)) == 0) - break; + for (op = ops->op; op->str != NULL; op++) { + if (strncmp(cp, op->str, strlen(op->str)) == 0) { + /* assume only one-char operators have stop chars */ + if (op->stop != NULL && cp[1] != '\0' && + strchr(op->stop, cp[1]) != NULL) + continue; + else + break; + } + } if (op->str == NULL) break; cp += strlen(op->str); @@ -1123,10 +1210,14 @@ skiphash(void) static const char * skipline(const char *cp) { + const char *pcp; if (*cp != '\0') linestate = LS_DIRTY; - while (*cp != '\0') - cp = skipcomment(cp + 1); + while (*cp != '\0') { + cp = skipcomment(pcp = cp); + if (pcp == cp) + cp++; + } return (cp); } @@ -1202,9 +1293,9 @@ skipcomment(const char *cp) cp += 2; } else if (strncmp(cp, "\n", 1) == 0) { if (incomment == CHAR_LITERAL) - error("unterminated char literal"); + error("Unterminated char literal"); else - error("unterminated string literal"); + error("Unterminated string literal"); } else cp += 1; continue; @@ -1478,7 +1569,7 @@ defundef(void) if ((cp = matchsym("define", kw)) != NULL) { sym = getsym(&cp); if (sym == NULL) - error("missing macro name in #define"); + error("Missing macro name in #define"); if (*cp == '(') { val = "1"; } else { @@ -1490,12 +1581,12 @@ defundef(void) } else if ((cp = matchsym("undef", kw)) != NULL) { sym = getsym(&cp); if (sym == NULL) - error("missing macro name in #undef"); + error("Missing macro name in #undef"); cp = skipcomment(cp); debug("#undef"); addsym2(false, sym, NULL); } else { - error("unrecognized preprocessor directive"); + error("Unrecognized preprocessor directive"); } skipline(cp); done: @@ -1567,5 +1658,5 @@ error(const char *msg) warnx("%s: %d: %s (#if line %d depth %d)", filename, linenum, msg, stifline[depth], depth); closeio(); - errx(2, "output may be truncated"); + errx(2, "Output may be truncated"); } Modified: head/usr.bin/unifdef/unifdef.h ============================================================================== --- head/usr.bin/unifdef/unifdef.h Thu Dec 3 14:17:28 2015 (r291695) +++ head/usr.bin/unifdef/unifdef.h Thu Dec 3 14:21:55 2015 (r291696) @@ -36,7 +36,7 @@ #include #include -/* portabiity stubs */ +/* portability stubs */ #define fbinmode(fp) (fp) From owner-svn-src-all@freebsd.org Thu Dec 3 14:32:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B8F4DA3FF74; Thu, 3 Dec 2015 14:32:55 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8422518D5; Thu, 3 Dec 2015 14:32:55 +0000 (UTC) (envelope-from fanf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3EWsT8025017; Thu, 3 Dec 2015 14:32:54 GMT (envelope-from fanf@FreeBSD.org) Received: (from fanf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3EWsVt025016; Thu, 3 Dec 2015 14:32:54 GMT (envelope-from fanf@FreeBSD.org) Message-Id: <201512031432.tB3EWsVt025016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fanf set sender to fanf@FreeBSD.org using -f From: Tony Finch Date: Thu, 3 Dec 2015 14:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291697 - head/usr.bin/unifdef X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 14:32:55 -0000 Author: fanf Date: Thu Dec 3 14:32:54 2015 New Revision: 291697 URL: https://svnweb.freebsd.org/changeset/base/291697 Log: Avoid -Wmissing-initializer Modified: head/usr.bin/unifdef/unifdef.c Modified: head/usr.bin/unifdef/unifdef.c ============================================================================== --- head/usr.bin/unifdef/unifdef.c Thu Dec 3 14:21:55 2015 (r291696) +++ head/usr.bin/unifdef/unifdef.c Thu Dec 3 14:32:54 2015 (r291697) @@ -975,24 +975,24 @@ struct ops { struct op op[5]; }; static const struct ops eval_ops[] = { - { eval_table, { { "||", op_or } } }, - { eval_table, { { "&&", op_and } } }, + { eval_table, { { "||", op_or, NULL } } }, + { eval_table, { { "&&", op_and, NULL } } }, { eval_table, { { "|", op_bor, "|" } } }, - { eval_table, { { "^", op_bxor } } }, + { eval_table, { { "^", op_bxor, NULL } } }, { eval_table, { { "&", op_band, "&" } } }, - { eval_table, { { "==", op_eq }, - { "!=", op_ne } } }, - { eval_table, { { "<=", op_le }, - { ">=", op_ge }, + { eval_table, { { "==", op_eq, NULL }, + { "!=", op_ne, NULL } } }, + { eval_table, { { "<=", op_le, NULL }, + { ">=", op_ge, NULL }, { "<", op_lt, "<=" }, { ">", op_gt, ">=" } } }, - { eval_table, { { "<<", op_blsh }, - { ">>", op_brsh } } }, - { eval_table, { { "+", op_add }, - { "-", op_sub } } }, - { eval_unary, { { "*", op_mul }, - { "/", op_div }, - { "%", op_mod } } }, + { eval_table, { { "<<", op_blsh, NULL }, + { ">>", op_brsh, NULL } } }, + { eval_table, { { "+", op_add, NULL }, + { "-", op_sub, NULL } } }, + { eval_unary, { { "*", op_mul, NULL }, + { "/", op_div, NULL }, + { "%", op_mod, NULL } } }, }; /* Current operator precedence level */ From owner-svn-src-all@freebsd.org Thu Dec 3 14:38:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C28DEA3F07F; Thu, 3 Dec 2015 14:38:56 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A3ED1B41; Thu, 3 Dec 2015 14:38:56 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3EctFG025254; Thu, 3 Dec 2015 14:38:55 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3EctBu025253; Thu, 3 Dec 2015 14:38:55 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201512031438.tB3EctBu025253@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Thu, 3 Dec 2015 14:38:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291698 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 14:38:57 -0000 Author: avos Date: Thu Dec 3 14:38:55 2015 New Revision: 291698 URL: https://svnweb.freebsd.org/changeset/base/291698 Log: urtwn(4): add error handling for urtwn_write_X() functions. - Call ieee80211_stop() when urtwn_init() fails (i.e., stop vap explicitly) - Return an error when urtwn_write_() fails. - Handle errors from them in: * urtwn_fw_cmd(); * urtwn_llt_write(); * urtwn_efuse_*(); * urtwn_*_power_on(); * urtwn_*_dma_init(); * urtwn_mac_init(); * urtwn_init(); Tested with RTL8188EU, STA mode Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4291 Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Thu Dec 3 14:32:54 2015 (r291697) +++ head/sys/dev/usb/wlan/if_urtwn.c Thu Dec 3 14:38:55 2015 (r291698) @@ -195,12 +195,12 @@ static void urtwn_free_rx_list(struct u static void urtwn_free_tx_list(struct urtwn_softc *); static struct urtwn_data * _urtwn_getbuf(struct urtwn_softc *); static struct urtwn_data * urtwn_getbuf(struct urtwn_softc *); -static int urtwn_write_region_1(struct urtwn_softc *, uint16_t, +static usb_error_t urtwn_write_region_1(struct urtwn_softc *, uint16_t, uint8_t *, int); -static void urtwn_write_1(struct urtwn_softc *, uint16_t, uint8_t); -static void urtwn_write_2(struct urtwn_softc *, uint16_t, uint16_t); -static void urtwn_write_4(struct urtwn_softc *, uint16_t, uint32_t); -static int urtwn_read_region_1(struct urtwn_softc *, uint16_t, +static usb_error_t urtwn_write_1(struct urtwn_softc *, uint16_t, uint8_t); +static usb_error_t urtwn_write_2(struct urtwn_softc *, uint16_t, uint16_t); +static usb_error_t urtwn_write_4(struct urtwn_softc *, uint16_t, uint32_t); +static usb_error_t urtwn_read_region_1(struct urtwn_softc *, uint16_t, uint8_t *, int); static uint8_t urtwn_read_1(struct urtwn_softc *, uint16_t); static uint16_t urtwn_read_2(struct urtwn_softc *, uint16_t); @@ -223,7 +223,7 @@ static void urtwn_dump_rom_contents(str #endif static int urtwn_efuse_read(struct urtwn_softc *, uint8_t *, uint16_t); -static void urtwn_efuse_switch_power(struct urtwn_softc *); +static int urtwn_efuse_switch_power(struct urtwn_softc *); static int urtwn_read_chipid(struct urtwn_softc *); static int urtwn_read_rom(struct urtwn_softc *); static int urtwn_r88e_read_rom(struct urtwn_softc *); @@ -267,7 +267,7 @@ static int urtwn_fw_loadpage(struct urt static int urtwn_load_firmware(struct urtwn_softc *); static int urtwn_r92c_dma_init(struct urtwn_softc *); static int urtwn_r88e_dma_init(struct urtwn_softc *); -static void urtwn_mac_init(struct urtwn_softc *); +static int urtwn_mac_init(struct urtwn_softc *); static void urtwn_bb_init(struct urtwn_softc *); static void urtwn_rf_init(struct urtwn_softc *); static void urtwn_cam_init(struct urtwn_softc *); @@ -298,7 +298,7 @@ static void urtwn_set_chan(struct urtwn struct ieee80211_channel *); static void urtwn_iq_calib(struct urtwn_softc *); static void urtwn_lc_calib(struct urtwn_softc *); -static void urtwn_init(struct urtwn_softc *); +static int urtwn_init(struct urtwn_softc *); static void urtwn_stop(struct urtwn_softc *); static void urtwn_abort_xfers(struct urtwn_softc *); static int urtwn_raw_xmit(struct ieee80211_node *, struct mbuf *, @@ -516,9 +516,10 @@ urtwn_detach(device_t self) /* Prevent further ioctls. */ URTWN_LOCK(sc); sc->sc_flags |= URTWN_DETACHED; - urtwn_stop(sc); URTWN_UNLOCK(sc); + urtwn_stop(sc); + callout_drain(&sc->sc_watchdog_ch); /* stop all USB transfers */ @@ -1051,7 +1052,7 @@ urtwn_getbuf(struct urtwn_softc *sc) return (bf); } -static int +static usb_error_t urtwn_write_region_1(struct urtwn_softc *sc, uint16_t addr, uint8_t *buf, int len) { @@ -1065,28 +1066,27 @@ urtwn_write_region_1(struct urtwn_softc return (urtwn_do_request(sc, &req, buf)); } -static void +static usb_error_t urtwn_write_1(struct urtwn_softc *sc, uint16_t addr, uint8_t val) { - urtwn_write_region_1(sc, addr, &val, 1); + return (urtwn_write_region_1(sc, addr, &val, sizeof(val))); } - -static void +static usb_error_t urtwn_write_2(struct urtwn_softc *sc, uint16_t addr, uint16_t val) { val = htole16(val); - urtwn_write_region_1(sc, addr, (uint8_t *)&val, 2); + return (urtwn_write_region_1(sc, addr, (uint8_t *)&val, sizeof(val))); } -static void +static usb_error_t urtwn_write_4(struct urtwn_softc *sc, uint16_t addr, uint32_t val) { val = htole32(val); - urtwn_write_region_1(sc, addr, (uint8_t *)&val, 4); + return (urtwn_write_region_1(sc, addr, (uint8_t *)&val, sizeof(val))); } -static int +static usb_error_t urtwn_read_region_1(struct urtwn_softc *sc, uint16_t addr, uint8_t *buf, int len) { @@ -1134,6 +1134,7 @@ static int urtwn_fw_cmd(struct urtwn_softc *sc, uint8_t id, const void *buf, int len) { struct r92c_fw_cmd cmd; + usb_error_t error; int ntries; /* Wait for current FW box to be empty. */ @@ -1155,10 +1156,14 @@ urtwn_fw_cmd(struct urtwn_softc *sc, uin memcpy(cmd.msg, buf, len); /* Write the first word last since that will trigger the FW. */ - urtwn_write_region_1(sc, R92C_HMEBOX_EXT(sc->fwcur), + error = urtwn_write_region_1(sc, R92C_HMEBOX_EXT(sc->fwcur), (uint8_t *)&cmd + 4, 2); - urtwn_write_region_1(sc, R92C_HMEBOX(sc->fwcur), + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); + error = urtwn_write_region_1(sc, R92C_HMEBOX(sc->fwcur), (uint8_t *)&cmd + 0, 4); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); sc->fwcur = (sc->fwcur + 1) % R92C_H2C_NBOX; return (0); @@ -1221,12 +1226,15 @@ urtwn_rf_read(struct urtwn_softc *sc, in static int urtwn_llt_write(struct urtwn_softc *sc, uint32_t addr, uint32_t data) { + usb_error_t error; int ntries; - urtwn_write_4(sc, R92C_LLT_INIT, + error = urtwn_write_4(sc, R92C_LLT_INIT, SM(R92C_LLT_INIT_OP, R92C_LLT_INIT_OP_WRITE) | SM(R92C_LLT_INIT_ADDR, addr) | SM(R92C_LLT_INIT_DATA, data)); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); /* Wait for write operation to complete. */ for (ntries = 0; ntries < 20; ntries++) { if (MS(urtwn_read_4(sc, R92C_LLT_INIT), R92C_LLT_INIT_OP) == @@ -1241,6 +1249,7 @@ static int urtwn_efuse_read_next(struct urtwn_softc *sc, uint8_t *val) { uint32_t reg; + usb_error_t error; int ntries; if (sc->last_rom_addr >= URTWN_EFUSE_MAX_LEN) @@ -1250,7 +1259,9 @@ urtwn_efuse_read_next(struct urtwn_softc reg = RW(reg, R92C_EFUSE_CTRL_ADDR, sc->last_rom_addr); reg &= ~R92C_EFUSE_CTRL_VALID; - urtwn_write_4(sc, R92C_EFUSE_CTRL, reg); + error = urtwn_write_4(sc, R92C_EFUSE_CTRL, reg); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); /* Wait for read operation to complete. */ for (ntries = 0; ntries < 100; ntries++) { reg = urtwn_read_4(sc, R92C_EFUSE_CTRL); @@ -1327,7 +1338,7 @@ urtwn_efuse_read(struct urtwn_softc *sc, uint8_t msk, off, reg; int error; - urtwn_efuse_switch_power(sc); + URTWN_CHK(urtwn_efuse_switch_power(sc)); /* Read full ROM image. */ sc->last_rom_addr = 0; @@ -1370,29 +1381,40 @@ end: #undef URTWN_CHK } -static void +static int urtwn_efuse_switch_power(struct urtwn_softc *sc) { + usb_error_t error; uint32_t reg; - urtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_ON); + error = urtwn_write_1(sc, R92C_EFUSE_ACCESS, R92C_EFUSE_ACCESS_ON); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); reg = urtwn_read_2(sc, R92C_SYS_ISO_CTRL); if (!(reg & R92C_SYS_ISO_CTRL_PWC_EV12V)) { - urtwn_write_2(sc, R92C_SYS_ISO_CTRL, + error = urtwn_write_2(sc, R92C_SYS_ISO_CTRL, reg | R92C_SYS_ISO_CTRL_PWC_EV12V); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); } reg = urtwn_read_2(sc, R92C_SYS_FUNC_EN); if (!(reg & R92C_SYS_FUNC_EN_ELDR)) { - urtwn_write_2(sc, R92C_SYS_FUNC_EN, + error = urtwn_write_2(sc, R92C_SYS_FUNC_EN, reg | R92C_SYS_FUNC_EN_ELDR); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); } reg = urtwn_read_2(sc, R92C_SYS_CLKR); if ((reg & (R92C_SYS_CLKR_LOADER_EN | R92C_SYS_CLKR_ANA8M)) != (R92C_SYS_CLKR_LOADER_EN | R92C_SYS_CLKR_ANA8M)) { - urtwn_write_2(sc, R92C_SYS_CLKR, + error = urtwn_write_2(sc, R92C_SYS_CLKR, reg | R92C_SYS_CLKR_LOADER_EN | R92C_SYS_CLKR_ANA8M); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); } + + return (0); } static int @@ -2360,24 +2382,23 @@ static void urtwn_parent(struct ieee80211com *ic) { struct urtwn_softc *sc = ic->ic_softc; - int startall = 0; URTWN_LOCK(sc); if (sc->sc_flags & URTWN_DETACHED) { URTWN_UNLOCK(sc); return; } - if (ic->ic_nrunning > 0) { - if ((sc->sc_flags & URTWN_RUNNING) == 0) { - urtwn_init(sc); - startall = 1; - } - } else if (sc->sc_flags & URTWN_RUNNING) - urtwn_stop(sc); URTWN_UNLOCK(sc); - if (startall) - ieee80211_start_all(ic); + if (ic->ic_nrunning > 0) { + if (urtwn_init(sc) != 0) { + struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); + if (vap != NULL) + ieee80211_stop(vap); + } else + ieee80211_start_all(ic); + } else + urtwn_stop(sc); } static __inline int @@ -2391,6 +2412,7 @@ static int urtwn_r92c_power_on(struct urtwn_softc *sc) { uint32_t reg; + usb_error_t error; int ntries; /* Wait for autoload done bit. */ @@ -2406,24 +2428,34 @@ urtwn_r92c_power_on(struct urtwn_softc * } /* Unlock ISO/CLK/Power control register. */ - urtwn_write_1(sc, R92C_RSV_CTRL, 0); + error = urtwn_write_1(sc, R92C_RSV_CTRL, 0); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); /* Move SPS into PWM mode. */ - urtwn_write_1(sc, R92C_SPS0_CTRL, 0x2b); + error = urtwn_write_1(sc, R92C_SPS0_CTRL, 0x2b); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); urtwn_ms_delay(sc); reg = urtwn_read_1(sc, R92C_LDOV12D_CTRL); if (!(reg & R92C_LDOV12D_CTRL_LDV12_EN)) { - urtwn_write_1(sc, R92C_LDOV12D_CTRL, + error = urtwn_write_1(sc, R92C_LDOV12D_CTRL, reg | R92C_LDOV12D_CTRL_LDV12_EN); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); urtwn_ms_delay(sc); - urtwn_write_1(sc, R92C_SYS_ISO_CTRL, + error = urtwn_write_1(sc, R92C_SYS_ISO_CTRL, urtwn_read_1(sc, R92C_SYS_ISO_CTRL) & ~R92C_SYS_ISO_CTRL_MD2PP); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); } /* Auto enable WLAN. */ - urtwn_write_2(sc, R92C_APS_FSMCO, + error = urtwn_write_2(sc, R92C_APS_FSMCO, urtwn_read_2(sc, R92C_APS_FSMCO) | R92C_APS_FSMCO_APFM_ONMAC); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); for (ntries = 0; ntries < 1000; ntries++) { if (!(urtwn_read_2(sc, R92C_APS_FSMCO) & R92C_APS_FSMCO_APFM_ONMAC)) @@ -2437,17 +2469,23 @@ urtwn_r92c_power_on(struct urtwn_softc * } /* Enable radio, GPIO and LED functions. */ - urtwn_write_2(sc, R92C_APS_FSMCO, + error = urtwn_write_2(sc, R92C_APS_FSMCO, R92C_APS_FSMCO_AFSM_HSUS | R92C_APS_FSMCO_PDN_EN | R92C_APS_FSMCO_PFM_ALDN); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); /* Release RF digital isolation. */ - urtwn_write_2(sc, R92C_SYS_ISO_CTRL, + error = urtwn_write_2(sc, R92C_SYS_ISO_CTRL, urtwn_read_2(sc, R92C_SYS_ISO_CTRL) & ~R92C_SYS_ISO_CTRL_DIOR); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); /* Initialize MAC. */ - urtwn_write_1(sc, R92C_APSD_CTRL, + error = urtwn_write_1(sc, R92C_APSD_CTRL, urtwn_read_1(sc, R92C_APSD_CTRL) & ~R92C_APSD_CTRL_OFF); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); for (ntries = 0; ntries < 200; ntries++) { if (!(urtwn_read_1(sc, R92C_APSD_CTRL) & R92C_APSD_CTRL_OFF_STATUS)) @@ -2466,9 +2504,13 @@ urtwn_r92c_power_on(struct urtwn_softc * R92C_CR_TXDMA_EN | R92C_CR_RXDMA_EN | R92C_CR_PROTOCOL_EN | R92C_CR_SCHEDULE_EN | R92C_CR_MACTXEN | R92C_CR_MACRXEN | R92C_CR_ENSEC; - urtwn_write_2(sc, R92C_CR, reg); + error = urtwn_write_2(sc, R92C_CR, reg); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); - urtwn_write_1(sc, 0xfe10, 0x19); + error = urtwn_write_1(sc, 0xfe10, 0x19); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); return (0); } @@ -2476,6 +2518,7 @@ static int urtwn_r88e_power_on(struct urtwn_softc *sc) { uint32_t reg; + usb_error_t error; int ntries; /* Wait for power ready bit. */ @@ -2491,24 +2534,34 @@ urtwn_r88e_power_on(struct urtwn_softc * } /* Reset BB. */ - urtwn_write_1(sc, R92C_SYS_FUNC_EN, + error = urtwn_write_1(sc, R92C_SYS_FUNC_EN, urtwn_read_1(sc, R92C_SYS_FUNC_EN) & ~(R92C_SYS_FUNC_EN_BBRSTB | R92C_SYS_FUNC_EN_BB_GLB_RST)); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); - urtwn_write_1(sc, R92C_AFE_XTAL_CTRL + 2, + error = urtwn_write_1(sc, R92C_AFE_XTAL_CTRL + 2, urtwn_read_1(sc, R92C_AFE_XTAL_CTRL + 2) | 0x80); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); /* Disable HWPDN. */ - urtwn_write_2(sc, R92C_APS_FSMCO, + error = urtwn_write_2(sc, R92C_APS_FSMCO, urtwn_read_2(sc, R92C_APS_FSMCO) & ~R92C_APS_FSMCO_APDM_HPDN); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); /* Disable WL suspend. */ - urtwn_write_2(sc, R92C_APS_FSMCO, + error = urtwn_write_2(sc, R92C_APS_FSMCO, urtwn_read_2(sc, R92C_APS_FSMCO) & ~(R92C_APS_FSMCO_AFSM_HSUS | R92C_APS_FSMCO_AFSM_PCIE)); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); - urtwn_write_2(sc, R92C_APS_FSMCO, + error = urtwn_write_2(sc, R92C_APS_FSMCO, urtwn_read_2(sc, R92C_APS_FSMCO) | R92C_APS_FSMCO_APFM_ONMAC); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); for (ntries = 0; ntries < 5000; ntries++) { if (!(urtwn_read_2(sc, R92C_APS_FSMCO) & R92C_APS_FSMCO_APFM_ONMAC)) @@ -2519,16 +2572,22 @@ urtwn_r88e_power_on(struct urtwn_softc * return (ETIMEDOUT); /* Enable LDO normal mode. */ - urtwn_write_1(sc, R92C_LPLDO_CTRL, + error = urtwn_write_1(sc, R92C_LPLDO_CTRL, urtwn_read_1(sc, R92C_LPLDO_CTRL) & ~0x10); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); /* Enable MAC DMA/WMAC/SCHEDULE/SEC blocks. */ - urtwn_write_2(sc, R92C_CR, 0); + error = urtwn_write_2(sc, R92C_CR, 0); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); reg = urtwn_read_2(sc, R92C_CR); reg |= R92C_CR_HCI_TXDMA_EN | R92C_CR_HCI_RXDMA_EN | R92C_CR_TXDMA_EN | R92C_CR_RXDMA_EN | R92C_CR_PROTOCOL_EN | R92C_CR_SCHEDULE_EN | R92C_CR_ENSEC | R92C_CR_CALTMR_EN; - urtwn_write_2(sc, R92C_CR, reg); + error = urtwn_write_2(sc, R92C_CR, reg); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); return (0); } @@ -2598,7 +2657,8 @@ static int urtwn_fw_loadpage(struct urtwn_softc *sc, int page, const uint8_t *buf, int len) { uint32_t reg; - int off, mlen, error = 0; + usb_error_t error = USB_ERR_NORMAL_COMPLETION; + int off, mlen; reg = urtwn_read_4(sc, R92C_MCUFWDL); reg = RW(reg, R92C_MCUFWDL_PAGE, page); @@ -2615,7 +2675,7 @@ urtwn_fw_loadpage(struct urtwn_softc *sc /* XXX fix this deconst */ error = urtwn_write_region_1(sc, off, __DECONST(uint8_t *, buf), mlen); - if (error != 0) + if (error != USB_ERR_NORMAL_COMPLETION) break; off += mlen; buf += mlen; @@ -2748,6 +2808,7 @@ fail: static __inline int urtwn_dma_init(struct urtwn_softc *sc) { + usb_error_t usb_err; int error; /* Initialize LLT table. */ @@ -2760,9 +2821,11 @@ urtwn_dma_init(struct urtwn_softc *sc) return (error); /* Set Tx/Rx transfer page size. */ - urtwn_write_1(sc, R92C_PBP, + usb_err = urtwn_write_1(sc, R92C_PBP, SM(R92C_PBP_PSRX, R92C_PBP_128) | SM(R92C_PBP_PSTX, R92C_PBP_128)); + if (usb_err != USB_ERR_NORMAL_COMPLETION) + return (EIO); return (0); } @@ -2771,6 +2834,7 @@ static int urtwn_r92c_dma_init(struct urtwn_softc *sc) { int hashq, hasnq, haslq, nqueues, nqpages, nrempages; + usb_error_t error; uint32_t reg; /* Get Tx queues to USB endpoints mapping. */ @@ -2792,8 +2856,10 @@ urtwn_r92c_dma_init(struct urtwn_softc * nrempages = (R92C_TX_PAGE_COUNT - R92C_PUBQ_NPAGES) % nqueues; /* Set number of pages for normal priority queue. */ - urtwn_write_1(sc, R92C_RQPN_NPQ, hasnq ? nqpages : 0); - urtwn_write_4(sc, R92C_RQPN, + error = urtwn_write_1(sc, R92C_RQPN_NPQ, hasnq ? nqpages : 0); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); + error = urtwn_write_4(sc, R92C_RQPN, /* Set number of pages for public queue. */ SM(R92C_RQPN_PUBQ, R92C_PUBQ_NPAGES) | /* Set number of pages for high priority queue. */ @@ -2802,12 +2868,24 @@ urtwn_r92c_dma_init(struct urtwn_softc * SM(R92C_RQPN_LPQ, haslq ? nqpages : 0) | /* Load values. */ R92C_RQPN_LD); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); - urtwn_write_1(sc, R92C_TXPKTBUF_BCNQ_BDNY, R92C_TX_PAGE_BOUNDARY); - urtwn_write_1(sc, R92C_TXPKTBUF_MGQ_BDNY, R92C_TX_PAGE_BOUNDARY); - urtwn_write_1(sc, R92C_TXPKTBUF_WMAC_LBK_BF_HD, R92C_TX_PAGE_BOUNDARY); - urtwn_write_1(sc, R92C_TRXFF_BNDY, R92C_TX_PAGE_BOUNDARY); - urtwn_write_1(sc, R92C_TDECTRL + 1, R92C_TX_PAGE_BOUNDARY); + error = urtwn_write_1(sc, R92C_TXPKTBUF_BCNQ_BDNY, R92C_TX_PAGE_BOUNDARY); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); + error = urtwn_write_1(sc, R92C_TXPKTBUF_MGQ_BDNY, R92C_TX_PAGE_BOUNDARY); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); + error = urtwn_write_1(sc, R92C_TXPKTBUF_WMAC_LBK_BF_HD, R92C_TX_PAGE_BOUNDARY); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); + error = urtwn_write_1(sc, R92C_TRXFF_BNDY, R92C_TX_PAGE_BOUNDARY); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); + error = urtwn_write_1(sc, R92C_TDECTRL + 1, R92C_TX_PAGE_BOUNDARY); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); /* Set queue to USB pipe mapping. */ reg = urtwn_read_2(sc, R92C_TRXDMA_CTRL); @@ -2829,10 +2907,14 @@ urtwn_r92c_dma_init(struct urtwn_softc * reg |= R92C_TRXDMA_CTRL_QMAP_HQ_LQ; } else reg |= R92C_TRXDMA_CTRL_QMAP_3EP; - urtwn_write_2(sc, R92C_TRXDMA_CTRL, reg); + error = urtwn_write_2(sc, R92C_TRXDMA_CTRL, reg); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); /* Set Tx/Rx transfer page boundary. */ - urtwn_write_2(sc, R92C_TRXFF_BNDY + 2, 0x27ff); + error = urtwn_write_2(sc, R92C_TRXFF_BNDY + 2, 0x27ff); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); return (0); } @@ -2842,6 +2924,7 @@ urtwn_r88e_dma_init(struct urtwn_softc * { struct usb_interface *iface; uint32_t reg; + usb_error_t error; int nqueues; /* Get Tx queues to USB endpoints mapping. */ @@ -2851,14 +2934,28 @@ urtwn_r88e_dma_init(struct urtwn_softc * return (EIO); /* Set number of pages for normal priority queue. */ - urtwn_write_2(sc, R92C_RQPN_NPQ, 0x000d); - urtwn_write_4(sc, R92C_RQPN, 0x808e000d); + error = urtwn_write_2(sc, R92C_RQPN_NPQ, 0x000d); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); + error = urtwn_write_4(sc, R92C_RQPN, 0x808e000d); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); - urtwn_write_1(sc, R92C_TXPKTBUF_BCNQ_BDNY, R88E_TX_PAGE_BOUNDARY); - urtwn_write_1(sc, R92C_TXPKTBUF_MGQ_BDNY, R88E_TX_PAGE_BOUNDARY); - urtwn_write_1(sc, R92C_TXPKTBUF_WMAC_LBK_BF_HD, R88E_TX_PAGE_BOUNDARY); - urtwn_write_1(sc, R92C_TRXFF_BNDY, R88E_TX_PAGE_BOUNDARY); - urtwn_write_1(sc, R92C_TDECTRL + 1, R88E_TX_PAGE_BOUNDARY); + error = urtwn_write_1(sc, R92C_TXPKTBUF_BCNQ_BDNY, R88E_TX_PAGE_BOUNDARY); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); + error = urtwn_write_1(sc, R92C_TXPKTBUF_MGQ_BDNY, R88E_TX_PAGE_BOUNDARY); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); + error = urtwn_write_1(sc, R92C_TXPKTBUF_WMAC_LBK_BF_HD, R88E_TX_PAGE_BOUNDARY); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); + error = urtwn_write_1(sc, R92C_TRXFF_BNDY, R88E_TX_PAGE_BOUNDARY); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); + error = urtwn_write_1(sc, R92C_TDECTRL + 1, R88E_TX_PAGE_BOUNDARY); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); /* Set queue to USB pipe mapping. */ reg = urtwn_read_2(sc, R92C_TRXDMA_CTRL); @@ -2869,31 +2966,42 @@ urtwn_r88e_dma_init(struct urtwn_softc * reg |= R92C_TRXDMA_CTRL_QMAP_HQ_NQ; else reg |= R92C_TRXDMA_CTRL_QMAP_3EP; - urtwn_write_2(sc, R92C_TRXDMA_CTRL, reg); + error = urtwn_write_2(sc, R92C_TRXDMA_CTRL, reg); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); /* Set Tx/Rx transfer page boundary. */ - urtwn_write_2(sc, R92C_TRXFF_BNDY + 2, 0x23ff); + error = urtwn_write_2(sc, R92C_TRXFF_BNDY + 2, 0x23ff); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); return (0); } -static void +static int urtwn_mac_init(struct urtwn_softc *sc) { + usb_error_t error; int i; /* Write MAC initialization values. */ if (sc->chip & URTWN_CHIP_88E) { for (i = 0; i < nitems(rtl8188eu_mac); i++) { - urtwn_write_1(sc, rtl8188eu_mac[i].reg, + error = urtwn_write_1(sc, rtl8188eu_mac[i].reg, rtl8188eu_mac[i].val); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); } urtwn_write_1(sc, R92C_MAX_AGGR_NUM, 0x07); } else { for (i = 0; i < nitems(rtl8192cu_mac); i++) - urtwn_write_1(sc, rtl8192cu_mac[i].reg, + error = urtwn_write_1(sc, rtl8192cu_mac[i].reg, rtl8192cu_mac[i].val); + if (error != USB_ERR_NORMAL_COMPLETION) + return (EIO); } + + return (0); } static void @@ -3711,19 +3819,21 @@ urtwn_lc_calib(struct urtwn_softc *sc) } } -static void +static int urtwn_init(struct urtwn_softc *sc) { struct ieee80211com *ic = &sc->sc_ic; struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps); uint8_t macaddr[IEEE80211_ADDR_LEN]; uint32_t reg; + usb_error_t usb_err = USB_ERR_NORMAL_COMPLETION; int error; - URTWN_ASSERT_LOCKED(sc); - - if (sc->sc_flags & URTWN_RUNNING) - urtwn_stop(sc); + URTWN_LOCK(sc); + if (sc->sc_flags & URTWN_RUNNING) { + URTWN_UNLOCK(sc); + return (0); + } /* Init firmware commands ring. */ sc->fwcur = 0; @@ -3752,22 +3862,36 @@ urtwn_init(struct urtwn_softc *sc) /* Init interrupts. */ if (sc->chip & URTWN_CHIP_88E) { - urtwn_write_4(sc, R88E_HISR, 0xffffffff); - urtwn_write_4(sc, R88E_HIMR, R88E_HIMR_CPWM | R88E_HIMR_CPWM2 | + usb_err = urtwn_write_4(sc, R88E_HISR, 0xffffffff); + if (usb_err != USB_ERR_NORMAL_COMPLETION) + goto fail; + usb_err = urtwn_write_4(sc, R88E_HIMR, R88E_HIMR_CPWM | R88E_HIMR_CPWM2 | R88E_HIMR_TBDER | R88E_HIMR_PSTIMEOUT); - urtwn_write_4(sc, R88E_HIMRE, R88E_HIMRE_RXFOVW | + if (usb_err != USB_ERR_NORMAL_COMPLETION) + goto fail; + usb_err = urtwn_write_4(sc, R88E_HIMRE, R88E_HIMRE_RXFOVW | R88E_HIMRE_TXFOVW | R88E_HIMRE_RXERR | R88E_HIMRE_TXERR); - urtwn_write_1(sc, R92C_USB_SPECIAL_OPTION, + if (usb_err != USB_ERR_NORMAL_COMPLETION) + goto fail; + usb_err = urtwn_write_1(sc, R92C_USB_SPECIAL_OPTION, urtwn_read_1(sc, R92C_USB_SPECIAL_OPTION) | R92C_USB_SPECIAL_OPTION_INT_BULK_SEL); + if (usb_err != USB_ERR_NORMAL_COMPLETION) + goto fail; } else { - urtwn_write_4(sc, R92C_HISR, 0xffffffff); - urtwn_write_4(sc, R92C_HIMR, 0xffffffff); + usb_err = urtwn_write_4(sc, R92C_HISR, 0xffffffff); + if (usb_err != USB_ERR_NORMAL_COMPLETION) + goto fail; + usb_err = urtwn_write_4(sc, R92C_HIMR, 0xffffffff); + if (usb_err != USB_ERR_NORMAL_COMPLETION) + goto fail; } /* Set MAC address. */ IEEE80211_ADDR_COPY(macaddr, vap ? vap->iv_myaddr : ic->ic_macaddr); - urtwn_write_region_1(sc, R92C_MACID, macaddr, IEEE80211_ADDR_LEN); + usb_err = urtwn_write_region_1(sc, R92C_MACID, macaddr, IEEE80211_ADDR_LEN); + if (usb_err != USB_ERR_NORMAL_COMPLETION) + goto fail; /* Set initial network type. */ urtwn_set_mode(sc, R92C_MSR_INFRA); @@ -3842,7 +3966,12 @@ urtwn_init(struct urtwn_softc *sc) goto fail; /* Initialize MAC/BB/RF blocks. */ - urtwn_mac_init(sc); + error = urtwn_mac_init(sc); + if (error != 0) { + device_printf(sc->sc_dev, + "%s: error while initializing MAC block\n", __func__); + goto fail; + } urtwn_bb_init(sc); urtwn_rf_init(sc); @@ -3858,10 +3987,14 @@ urtwn_init(struct urtwn_softc *sc) /* Turn CCK and OFDM blocks on. */ reg = urtwn_bb_read(sc, R92C_FPGA0_RFMOD); reg |= R92C_RFMOD_CCK_EN; - urtwn_bb_write(sc, R92C_FPGA0_RFMOD, reg); + usb_err = urtwn_bb_write(sc, R92C_FPGA0_RFMOD, reg); + if (usb_err != USB_ERR_NORMAL_COMPLETION) + goto fail; reg = urtwn_bb_read(sc, R92C_FPGA0_RFMOD); reg |= R92C_RFMOD_OFDM_EN; - urtwn_bb_write(sc, R92C_FPGA0_RFMOD, reg); + usb_err = urtwn_bb_write(sc, R92C_FPGA0_RFMOD, reg); + if (usb_err != USB_ERR_NORMAL_COMPLETION) + goto fail; /* Clear per-station keys table. */ urtwn_cam_init(sc); @@ -3897,19 +4030,30 @@ urtwn_init(struct urtwn_softc *sc) callout_reset(&sc->sc_watchdog_ch, hz, urtwn_watchdog, sc); fail: - return; + if (usb_err != USB_ERR_NORMAL_COMPLETION) + error = EIO; + + URTWN_UNLOCK(sc); + + return (error); } static void urtwn_stop(struct urtwn_softc *sc) { - URTWN_ASSERT_LOCKED(sc); + URTWN_LOCK(sc); + if (!(sc->sc_flags & URTWN_RUNNING)) { + URTWN_UNLOCK(sc); + return; + } + sc->sc_flags &= ~URTWN_RUNNING; callout_stop(&sc->sc_watchdog_ch); urtwn_abort_xfers(sc); urtwn_drain_mbufq(sc); + URTWN_UNLOCK(sc); } static void From owner-svn-src-all@freebsd.org Thu Dec 3 14:56:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF079A3F5C8; Thu, 3 Dec 2015 14:56:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F14518B3; Thu, 3 Dec 2015 14:56:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3EuHci030972; Thu, 3 Dec 2015 14:56:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3EuHVs030967; Thu, 3 Dec 2015 14:56:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201512031456.tB3EuHVs030967@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 3 Dec 2015 14:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291699 - in head/sys: modules/mlxen ofed/drivers/net/mlx4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 14:56:18 -0000 Author: hselasky Date: Thu Dec 3 14:56:17 2015 New Revision: 291699 URL: https://svnweb.freebsd.org/changeset/base/291699 Log: Convert the mlxen driver to use the BUSDMA(9) APIs instead of vtophys() when loading mbufs for transmission and reception. While at it all pointer arithmetic and cast qualifier issues were fixed, mostly related to transmission and reception. MFC after: 1 week Sponsored by: Mellanox Technologies Differential Revision: https://reviews.freebsd.org/D4284 Modified: head/sys/modules/mlxen/Makefile head/sys/ofed/drivers/net/mlx4/en_netdev.c head/sys/ofed/drivers/net/mlx4/en_rx.c head/sys/ofed/drivers/net/mlx4/en_tx.c head/sys/ofed/drivers/net/mlx4/mlx4_en.h Modified: head/sys/modules/mlxen/Makefile ============================================================================== --- head/sys/modules/mlxen/Makefile Thu Dec 3 14:38:55 2015 (r291698) +++ head/sys/modules/mlxen/Makefile Thu Dec 3 14:56:17 2015 (r291699) @@ -11,5 +11,3 @@ CFLAGS+= -I${.CURDIR}/../../ofed/include CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include .include - -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Dec 3 14:38:55 2015 (r291698) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Dec 3 14:56:17 2015 (r291699) @@ -1247,7 +1247,6 @@ int mlx4_en_start_port(struct net_device PAGE_SIZE); priv->rx_alloc_order = get_order(priv->rx_alloc_size); priv->rx_buf_size = roundup_pow_of_two(priv->rx_mb_size); - priv->log_rx_info = ROUNDUP_LOG2(sizeof(struct mlx4_en_rx_buf)); en_dbg(DRV, priv, "Rx buf size:%d\n", priv->rx_mb_size); /* Configure rx cq's and rings */ @@ -2091,8 +2090,6 @@ int mlx4_en_init_netdev(struct mlx4_en_d priv->port = port; priv->port_up = false; priv->flags = prof->flags; - priv->ctrl_flags = cpu_to_be32(MLX4_WQE_CTRL_CQ_UPDATE | - MLX4_WQE_CTRL_SOLICITED); priv->num_tx_rings_p_up = mdev->profile.num_tx_rings_p_up; priv->tx_ring_num = prof->tx_ring_num; @@ -2108,7 +2105,7 @@ int mlx4_en_init_netdev(struct mlx4_en_d err = -ENOMEM; goto out; } - + priv->rx_ring_num = prof->rx_ring_num; priv->cqe_factor = (mdev->dev->caps.cqe_size == 64) ? 1 : 0; priv->mac_index = -1; Modified: head/sys/ofed/drivers/net/mlx4/en_rx.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_rx.c Thu Dec 3 14:38:55 2015 (r291698) +++ head/sys/ofed/drivers/net/mlx4/en_rx.c Thu Dec 3 14:56:17 2015 (r291699) @@ -54,104 +54,133 @@ static void mlx4_en_init_rx_desc(struct int possible_frags; int i; - /* Set size and memtype fields */ - for (i = 0; i < priv->num_frags; i++) { - rx_desc->data[i].byte_count = - cpu_to_be32(priv->frag_info[i].frag_size); - rx_desc->data[i].lkey = cpu_to_be32(priv->mdev->mr.key); - } + rx_desc->data[0].byte_count = cpu_to_be32(priv->rx_mb_size); + rx_desc->data[0].lkey = cpu_to_be32(priv->mdev->mr.key); - /* If the number of used fragments does not fill up the ring stride, - * * remaining (unused) fragments must be padded with null address/size - * * and a special memory key */ + /* + * If the number of used fragments does not fill up the ring + * stride, remaining (unused) fragments must be padded with + * null address/size and a special memory key: + */ possible_frags = (ring->stride - sizeof(struct mlx4_en_rx_desc)) / DS_SIZE; - for (i = priv->num_frags; i < possible_frags; i++) { + for (i = 1; i < possible_frags; i++) { rx_desc->data[i].byte_count = 0; rx_desc->data[i].lkey = cpu_to_be32(MLX4_EN_MEMTYPE_PAD); rx_desc->data[i].addr = 0; } - } -static int mlx4_en_alloc_buf(struct mlx4_en_priv *priv, - struct mlx4_en_rx_desc *rx_desc, - struct mbuf **mb_list, - int i) +static int +mlx4_en_alloc_buf(struct mlx4_en_rx_ring *ring, + __be64 *pdma, struct mlx4_en_rx_mbuf *mb_list) { - struct mlx4_en_dev *mdev = priv->mdev; - struct mlx4_en_frag_info *frag_info = &priv->frag_info[i]; + bus_dma_segment_t segs[1]; + bus_dmamap_t map; struct mbuf *mb; - dma_addr_t dma; + int nsegs; + int err; - if (i == 0) - mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, frag_info->frag_size); - else - mb = m_getjcl(M_NOWAIT, MT_DATA, 0, frag_info->frag_size); - if (mb == NULL) { - priv->port_stats.rx_alloc_failed++; - return -ENOMEM; + /* try to allocate a new spare mbuf */ + if (unlikely(ring->spare.mbuf == NULL)) { + mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, ring->rx_mb_size); + if (unlikely(mb == NULL)) + return (-ENOMEM); + /* setup correct length */ + mb->m_len = ring->rx_mb_size; + + /* load spare mbuf into BUSDMA */ + err = -bus_dmamap_load_mbuf_sg(ring->dma_tag, ring->spare.dma_map, + mb, segs, &nsegs, BUS_DMA_NOWAIT); + if (unlikely(err != 0)) { + m_freem(mb); + return (err); + } + KASSERT(nsegs == 1, + ("Number of segments is expected to be one")); + + /* store spare info */ + ring->spare.mbuf = mb; + ring->spare.paddr_be = cpu_to_be64(segs[0].ds_addr); + + bus_dmamap_sync(ring->dma_tag, ring->spare.dma_map, + BUS_DMASYNC_PREREAD); } - dma = pci_map_single(mdev->pdev, mb->m_data, frag_info->frag_size, - PCI_DMA_FROMDEVICE); - rx_desc->data[i].addr = cpu_to_be64(dma); - mb_list[i] = mb; - return 0; -} + /* synchronize and unload the current mbuf, if any */ + if (likely(mb_list->mbuf != NULL)) { + bus_dmamap_sync(ring->dma_tag, mb_list->dma_map, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(ring->dma_tag, mb_list->dma_map); + } -static int mlx4_en_prepare_rx_desc(struct mlx4_en_priv *priv, - struct mlx4_en_rx_ring *ring, int index) -{ - struct mlx4_en_rx_desc *rx_desc = (struct mlx4_en_rx_desc *) - (ring->buf + (index * ring->stride)); - struct mbuf **mb_list = ring->rx_info + (index << priv->log_rx_info); - int i; + mb = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, ring->rx_mb_size); + if (unlikely(mb == NULL)) + goto use_spare; - for (i = 0; i < priv->num_frags; i++) - if (mlx4_en_alloc_buf(priv, rx_desc, mb_list, i)) - goto err; + /* setup correct length */ + mb->m_len = ring->rx_mb_size; + + err = -bus_dmamap_load_mbuf_sg(ring->dma_tag, mb_list->dma_map, + mb, segs, &nsegs, BUS_DMA_NOWAIT); + if (unlikely(err != 0)) { + m_freem(mb); + goto use_spare; + } + KASSERT(nsegs == 1, ("Number of segments is expected to be one")); - return 0; + *pdma = cpu_to_be64(segs[0].ds_addr); + mb_list->mbuf = mb; -err: - while (i--) - m_free(mb_list[i]); - return -ENOMEM; + bus_dmamap_sync(ring->dma_tag, mb_list->dma_map, BUS_DMASYNC_PREREAD); + return (0); + +use_spare: + /* swap DMA maps */ + map = mb_list->dma_map; + mb_list->dma_map = ring->spare.dma_map; + ring->spare.dma_map = map; + + /* swap MBUFs */ + mb_list->mbuf = ring->spare.mbuf; + ring->spare.mbuf = NULL; + + /* store physical address */ + *pdma = ring->spare.paddr_be; + return (0); } -static inline void mlx4_en_update_rx_prod_db(struct mlx4_en_rx_ring *ring) +static void +mlx4_en_free_buf(struct mlx4_en_rx_ring *ring, struct mlx4_en_rx_mbuf *mb_list) { - *ring->wqres.db.db = cpu_to_be32(ring->prod & 0xffff); + bus_dmamap_t map = mb_list->dma_map; + bus_dmamap_sync(ring->dma_tag, map, BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(ring->dma_tag, map); + m_freem(mb_list->mbuf); + mb_list->mbuf = NULL; /* safety clearing */ } -static void mlx4_en_free_rx_desc(struct mlx4_en_priv *priv, - struct mlx4_en_rx_ring *ring, - int index) +static int +mlx4_en_prepare_rx_desc(struct mlx4_en_priv *priv, + struct mlx4_en_rx_ring *ring, int index) { - struct mlx4_en_frag_info *frag_info; - struct mlx4_en_dev *mdev = priv->mdev; - struct mbuf **mb_list; struct mlx4_en_rx_desc *rx_desc = (struct mlx4_en_rx_desc *) - (ring->buf + (index << ring->log_stride)); - dma_addr_t dma; - int nr; - - mb_list = ring->rx_info + (index << priv->log_rx_info); - for (nr = 0; nr < priv->num_frags; nr++) { - en_dbg(DRV, priv, "Freeing fragment:%d\n", nr); - frag_info = &priv->frag_info[nr]; - dma = be64_to_cpu(rx_desc->data[nr].addr); - -#if BITS_PER_LONG == 64 - en_dbg(DRV, priv, "Unmaping buffer at dma:0x%lx\n", (u64) dma); -#elif BITS_PER_LONG == 32 - en_dbg(DRV, priv, "Unmaping buffer at dma:0x%llx\n", (u64) dma); -#endif - pci_unmap_single(mdev->pdev, dma, frag_info->frag_size, - PCI_DMA_FROMDEVICE); - m_free(mb_list[nr]); + (ring->buf + (index * ring->stride)); + struct mlx4_en_rx_mbuf *mb_list = ring->mbuf + index; + + mb_list->mbuf = NULL; + + if (mlx4_en_alloc_buf(ring, &rx_desc->data[0].addr, mb_list)) { + priv->port_stats.rx_alloc_failed++; + return (-ENOMEM); } + return (0); +} + +static inline void +mlx4_en_update_rx_prod_db(struct mlx4_en_rx_ring *ring) +{ + *ring->wqres.db.db = cpu_to_be32(ring->prod & 0xffff); } static int mlx4_en_fill_rx_buffers(struct mlx4_en_priv *priv) @@ -194,7 +223,8 @@ reduce_rings: while (ring->actual_size > new_size) { ring->actual_size--; ring->prod--; - mlx4_en_free_rx_desc(priv, ring, ring->actual_size); + mlx4_en_free_buf(ring, + ring->mbuf + ring->actual_size); } } @@ -214,100 +244,106 @@ static void mlx4_en_free_rx_buf(struct m while (ring->cons != ring->prod) { index = ring->cons & ring->size_mask; en_dbg(DRV, priv, "Processing descriptor:%d\n", index); - mlx4_en_free_rx_desc(priv, ring, index); + mlx4_en_free_buf(ring, ring->mbuf + index); ++ring->cons; } } -#if MLX4_EN_MAX_RX_FRAGS == 3 -static int frag_sizes[] = { - FRAG_SZ0, - FRAG_SZ1, - FRAG_SZ2, -}; -#elif MLX4_EN_MAX_RX_FRAGS == 2 -static int frag_sizes[] = { - FRAG_SZ0, - FRAG_SZ1, -}; -#else -#error "Unknown MAX_RX_FRAGS" -#endif - void mlx4_en_calc_rx_buf(struct net_device *dev) { struct mlx4_en_priv *priv = netdev_priv(dev); int eff_mtu = dev->if_mtu + ETH_HLEN + VLAN_HLEN + ETH_FCS_LEN; - int buf_size = 0; - int i, frag; - for (i = 0, frag = 0; buf_size < eff_mtu; frag++, i++) { - /* - * Allocate small to large but only as much as is needed for - * the tail. - */ - while (i > 0 && eff_mtu - buf_size <= frag_sizes[i - 1]) - i--; - priv->frag_info[frag].frag_size = frag_sizes[i]; - priv->frag_info[frag].frag_prefix_size = buf_size; - buf_size += priv->frag_info[frag].frag_size; - } + if (eff_mtu > MJUM16BYTES) { + en_err(priv, "MTU(%d) is too big\n", dev->if_mtu); + eff_mtu = MJUM16BYTES; + } else if (eff_mtu > MJUM9BYTES) { + eff_mtu = MJUM16BYTES; + } else if (eff_mtu > MJUMPAGESIZE) { + eff_mtu = MJUM9BYTES; + } else if (eff_mtu > MCLBYTES) { + eff_mtu = MJUMPAGESIZE; + } else { + eff_mtu = MCLBYTES; + } - priv->num_frags = frag; priv->rx_mb_size = eff_mtu; - priv->log_rx_info = - ROUNDUP_LOG2(priv->num_frags * sizeof(struct mbuf *)); - en_dbg(DRV, priv, "Rx buffer scatter-list (effective-mtu:%d " - "num_frags:%d):\n", eff_mtu, priv->num_frags); - for (i = 0; i < priv->num_frags; i++) { - en_dbg(DRV, priv, " frag:%d - size:%d prefix:%d\n", i, - priv->frag_info[i].frag_size, - priv->frag_info[i].frag_prefix_size); - } + en_dbg(DRV, priv, "Effective RX MTU: %d bytes\n", eff_mtu); } - int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring **pring, u32 size, int node) { struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_en_rx_ring *ring; - int err = -ENOMEM; + int err; int tmp; + uint32_t x; ring = kzalloc(sizeof(struct mlx4_en_rx_ring), GFP_KERNEL); if (!ring) { en_err(priv, "Failed to allocate RX ring structure\n"); return -ENOMEM; } - + + /* Create DMA descriptor TAG */ + if ((err = -bus_dma_tag_create( + bus_get_dma_tag(mdev->pdev->dev.bsddev), + 1, /* any alignment */ + 0, /* no boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MJUM16BYTES, /* maxsize */ + 1, /* nsegments */ + MJUM16BYTES, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockfuncarg */ + &ring->dma_tag))) { + en_err(priv, "Failed to create DMA tag\n"); + goto err_ring; + } + ring->prod = 0; ring->cons = 0; ring->size = size; ring->size_mask = size - 1; - ring->stride = roundup_pow_of_two(sizeof(struct mlx4_en_rx_desc) + - DS_SIZE * MLX4_EN_MAX_RX_FRAGS); + ring->stride = roundup_pow_of_two( + sizeof(struct mlx4_en_rx_desc) + DS_SIZE); ring->log_stride = ffs(ring->stride) - 1; ring->buf_size = ring->size * ring->stride + TXBB_SIZE; - tmp = size * roundup_pow_of_two(MLX4_EN_MAX_RX_FRAGS * - sizeof(struct mbuf *)); + tmp = size * sizeof(struct mlx4_en_rx_mbuf); - ring->rx_info = kmalloc(tmp, GFP_KERNEL); - if (!ring->rx_info) { + ring->mbuf = kzalloc(tmp, GFP_KERNEL); + if (ring->mbuf == NULL) { err = -ENOMEM; - goto err_ring; + goto err_dma_tag; } - en_dbg(DRV, priv, "Allocated rx_info ring at addr:%p size:%d\n", - ring->rx_info, tmp); + err = -bus_dmamap_create(ring->dma_tag, 0, &ring->spare.dma_map); + if (err != 0) + goto err_info; + + for (x = 0; x != size; x++) { + err = -bus_dmamap_create(ring->dma_tag, 0, + &ring->mbuf[x].dma_map); + if (err != 0) { + while (x--) + bus_dmamap_destroy(ring->dma_tag, + ring->mbuf[x].dma_map); + goto err_info; + } + } + en_dbg(DRV, priv, "Allocated MBUF ring at addr:%p size:%d\n", + ring->mbuf, tmp); err = mlx4_alloc_hwq_res(mdev->dev, &ring->wqres, ring->buf_size, 2 * PAGE_SIZE); if (err) - goto err_info; + goto err_dma_map; err = mlx4_en_map_buffer(&ring->wqres.buf); if (err) { @@ -320,23 +356,29 @@ int mlx4_en_create_rx_ring(struct mlx4_e err_hwq: mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size); +err_dma_map: + for (x = 0; x != size; x++) { + bus_dmamap_destroy(ring->dma_tag, + ring->mbuf[x].dma_map); + } + bus_dmamap_destroy(ring->dma_tag, ring->spare.dma_map); err_info: - vfree(ring->rx_info); + vfree(ring->mbuf); +err_dma_tag: + bus_dma_tag_destroy(ring->dma_tag); err_ring: kfree(ring); - - return err; + return (err); } - int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv) { struct mlx4_en_rx_ring *ring; int i; int ring_ind; int err; - int stride = roundup_pow_of_two(sizeof(struct mlx4_en_rx_desc) + - DS_SIZE * priv->num_frags); + int stride = roundup_pow_of_two( + sizeof(struct mlx4_en_rx_desc) + DS_SIZE); for (ring_ind = 0; ring_ind < priv->rx_ring_num; ring_ind++) { ring = priv->rx_ring[ring_ind]; @@ -412,10 +454,22 @@ void mlx4_en_destroy_rx_ring(struct mlx4 { struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_en_rx_ring *ring = *pring; + uint32_t x; mlx4_en_unmap_buffer(&ring->wqres.buf); mlx4_free_hwq_res(mdev->dev, &ring->wqres, size * stride + TXBB_SIZE); - vfree(ring->rx_info); + for (x = 0; x != size; x++) + bus_dmamap_destroy(ring->dma_tag, ring->mbuf[x].dma_map); + /* free spare mbuf, if any */ + if (ring->spare.mbuf != NULL) { + bus_dmamap_sync(ring->dma_tag, ring->spare.dma_map, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(ring->dma_tag, ring->spare.dma_map); + m_freem(ring->spare.mbuf); + } + bus_dmamap_destroy(ring->dma_tag, ring->spare.dma_map); + vfree(ring->mbuf); + bus_dma_tag_destroy(ring->dma_tag); kfree(ring); *pring = NULL; #ifdef CONFIG_RFS_ACCEL @@ -423,7 +477,6 @@ void mlx4_en_destroy_rx_ring(struct mlx4 #endif } - void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring *ring) { @@ -472,69 +525,27 @@ static inline int invalid_cqe(struct mlx return 0; } - -/* Unmap a completed descriptor and free unused pages */ -static int mlx4_en_complete_rx_desc(struct mlx4_en_priv *priv, - struct mlx4_en_rx_desc *rx_desc, - struct mbuf **mb_list, - int length) -{ - struct mlx4_en_dev *mdev = priv->mdev; - struct mlx4_en_frag_info *frag_info; - dma_addr_t dma; - struct mbuf *mb; - int nr; - - mb = mb_list[0]; - mb->m_pkthdr.len = length; - /* Collect used fragments while replacing them in the HW descirptors */ - for (nr = 0; nr < priv->num_frags; nr++) { - frag_info = &priv->frag_info[nr]; - if (length <= frag_info->frag_prefix_size) - break; - if (nr) - mb->m_next = mb_list[nr]; - mb = mb_list[nr]; - mb->m_len = frag_info->frag_size; - dma = be64_to_cpu(rx_desc->data[nr].addr); - - /* Allocate a replacement page */ - if (mlx4_en_alloc_buf(priv, rx_desc, mb_list, nr)) - goto fail; - - /* Unmap buffer */ - pci_unmap_single(mdev->pdev, dma, frag_info->frag_size, - PCI_DMA_FROMDEVICE); - } - /* Adjust size of last fragment to match actual length */ - mb->m_len = length - priv->frag_info[nr - 1].frag_prefix_size; - mb->m_next = NULL; - return 0; - -fail: - /* Drop all accumulated fragments (which have already been replaced in - * the descriptor) of this packet; remaining fragments are reused... */ - while (nr > 0) { - nr--; - m_free(mb_list[nr]); - } - return -ENOMEM; - -} - -static struct mbuf *mlx4_en_rx_mb(struct mlx4_en_priv *priv, - struct mlx4_en_rx_desc *rx_desc, - struct mbuf **mb_list, - unsigned int length) +static struct mbuf * +mlx4_en_rx_mb(struct mlx4_en_priv *priv, struct mlx4_en_rx_ring *ring, + struct mlx4_en_rx_desc *rx_desc, struct mlx4_en_rx_mbuf *mb_list, + int length) { struct mbuf *mb; - mb = mb_list[0]; - /* Move relevant fragments to mb */ - if (unlikely(mlx4_en_complete_rx_desc(priv, rx_desc, mb_list, length))) - return NULL; + /* get mbuf */ + mb = mb_list->mbuf; - return mb; + /* collect used fragment while atomically replacing it */ + if (mlx4_en_alloc_buf(ring, &rx_desc->data[0].addr, mb_list)) + return (NULL); + + /* range check hardware computed value */ + if (unlikely(length > mb->m_len)) + length = mb->m_len; + + /* update total packet length in packet header */ + mb->m_len = mb->m_pkthdr.len = length; + return (mb); } /* For cpu arch with cache line of 64B the performance is better when cqe size==64B @@ -548,7 +559,7 @@ int mlx4_en_process_rx_cq(struct net_dev struct mlx4_en_priv *priv = netdev_priv(dev); struct mlx4_cqe *cqe; struct mlx4_en_rx_ring *ring = priv->rx_ring[cq->ring]; - struct mbuf **mb_list; + struct mlx4_en_rx_mbuf *mb_list; struct mlx4_en_rx_desc *rx_desc; struct mbuf *mb; struct mlx4_cq *mcq = &cq->mcq; @@ -576,7 +587,7 @@ int mlx4_en_process_rx_cq(struct net_dev /* Process all completed CQEs */ while (XNOR(cqe->owner_sr_opcode & MLX4_CQE_OWNER_MASK, cons_index & size)) { - mb_list = ring->rx_info + (index << priv->log_rx_info); + mb_list = ring->mbuf + index; rx_desc = (struct mlx4_en_rx_desc *) (ring->buf + (index << ring->log_stride)); @@ -593,8 +604,9 @@ int mlx4_en_process_rx_cq(struct net_dev */ length = be32_to_cpu(cqe->byte_cnt); length -= ring->fcs_del; - mb = mlx4_en_rx_mb(priv, rx_desc, mb_list, length); - if (!mb) { + + mb = mlx4_en_rx_mb(priv, ring, rx_desc, mb_list, length); + if (unlikely(!mb)) { ring->errors++; goto next; } Modified: head/sys/ofed/drivers/net/mlx4/en_tx.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_tx.c Thu Dec 3 14:38:55 2015 (r291698) +++ head/sys/ofed/drivers/net/mlx4/en_tx.c Thu Dec 3 14:56:17 2015 (r291699) @@ -67,6 +67,7 @@ int mlx4_en_create_tx_ring(struct mlx4_e { struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_en_tx_ring *ring; + uint32_t x; int tmp; int err; @@ -79,11 +80,26 @@ int mlx4_en_create_tx_ring(struct mlx4_e } } + /* Create DMA descriptor TAG */ + if ((err = -bus_dma_tag_create( + bus_get_dma_tag(mdev->pdev->dev.bsddev), + 1, /* any alignment */ + 0, /* no boundary */ + BUS_SPACE_MAXADDR, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filter, filterarg */ + MLX4_EN_TX_MAX_PAYLOAD_SIZE, /* maxsize */ + MLX4_EN_TX_MAX_MBUF_FRAGS, /* nsegments */ + MLX4_EN_TX_MAX_MBUF_SIZE, /* maxsegsize */ + 0, /* flags */ + NULL, NULL, /* lockfunc, lockfuncarg */ + &ring->dma_tag))) + goto done; + ring->size = size; ring->size_mask = size - 1; ring->stride = stride; - ring->full_size = ring->size - HEADROOM - MAX_DESC_TXBBS; - ring->inline_thold = min(inline_thold, MAX_INLINE); + ring->inline_thold = MAX(MIN_PKT_LEN, MIN(inline_thold, MAX_INLINE)); mtx_init(&ring->tx_lock.m, "mlx4 tx", NULL, MTX_DEF); mtx_init(&ring->comp_lock.m, "mlx4 comp", NULL, MTX_DEF); @@ -92,30 +108,36 @@ int mlx4_en_create_tx_ring(struct mlx4_e M_WAITOK, &ring->tx_lock.m); if (ring->br == NULL) { en_err(priv, "Failed allocating tx_info ring\n"); - return -ENOMEM; + err = -ENOMEM; + goto err_free_dma_tag; } tmp = size * sizeof(struct mlx4_en_tx_info); - ring->tx_info = vmalloc_node(tmp, node); + ring->tx_info = kzalloc_node(tmp, GFP_KERNEL, node); if (!ring->tx_info) { - ring->tx_info = vmalloc(tmp); + ring->tx_info = kzalloc(tmp, GFP_KERNEL); if (!ring->tx_info) { err = -ENOMEM; goto err_ring; } } - en_dbg(DRV, priv, "Allocated tx_info ring at addr:%p size:%d\n", - ring->tx_info, tmp); - - ring->bounce_buf = kmalloc_node(MAX_DESC_SIZE, GFP_KERNEL, node); - if (!ring->bounce_buf) { - ring->bounce_buf = kmalloc(MAX_DESC_SIZE, GFP_KERNEL); - if (!ring->bounce_buf) { - err = -ENOMEM; + /* Create DMA descriptor MAPs */ + for (x = 0; x != size; x++) { + err = -bus_dmamap_create(ring->dma_tag, 0, + &ring->tx_info[x].dma_map); + if (err != 0) { + while (x--) { + bus_dmamap_destroy(ring->dma_tag, + ring->tx_info[x].dma_map); + } goto err_info; } } + + en_dbg(DRV, priv, "Allocated tx_info ring at addr:%p size:%d\n", + ring->tx_info, tmp); + ring->buf_size = ALIGN(size * ring->stride, MLX4_EN_PAGE_SIZE); /* Allocate HW buffers on provided NUMA node */ @@ -123,7 +145,7 @@ int mlx4_en_create_tx_ring(struct mlx4_e 2 * PAGE_SIZE); if (err) { en_err(priv, "Failed allocating hwq resources\n"); - goto err_bounce; + goto err_dma_map; } err = mlx4_en_map_buffer(&ring->wqres.buf); @@ -173,12 +195,16 @@ err_map: mlx4_en_unmap_buffer(&ring->wqres.buf); err_hwq_res: mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size); -err_bounce: - kfree(ring->bounce_buf); +err_dma_map: + for (x = 0; x != size; x++) + bus_dmamap_destroy(ring->dma_tag, ring->tx_info[x].dma_map); err_info: vfree(ring->tx_info); err_ring: buf_ring_free(ring->br, M_DEVBUF); +err_free_dma_tag: + bus_dma_tag_destroy(ring->dma_tag); +done: kfree(ring); return err; } @@ -188,6 +214,7 @@ void mlx4_en_destroy_tx_ring(struct mlx4 { struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_en_tx_ring *ring = *pring; + uint32_t x; en_dbg(DRV, priv, "Destroying tx ring, qpn: %d\n", ring->qpn); buf_ring_free(ring->br, M_DEVBUF); @@ -198,10 +225,12 @@ void mlx4_en_destroy_tx_ring(struct mlx4 mlx4_qp_release_range(priv->mdev->dev, ring->qpn, 1); mlx4_en_unmap_buffer(&ring->wqres.buf); mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size); - kfree(ring->bounce_buf); + for (x = 0; x != ring->size; x++) + bus_dmamap_destroy(ring->dma_tag, ring->tx_info[x].dma_map); vfree(ring->tx_info); mtx_destroy(&ring->tx_lock.m); mtx_destroy(&ring->comp_lock.m); + bus_dma_tag_destroy(ring->dma_tag); kfree(ring); *pring = NULL; } @@ -219,7 +248,6 @@ int mlx4_en_activate_tx_ring(struct mlx4 ring->last_nr_txbb = 1; ring->poll_cnt = 0; ring->blocked = 0; - memset(ring->tx_info, 0, ring->size * sizeof(struct mlx4_en_tx_info)); memset(ring->buf, 0, ring->buf_size); ring->qp_state = MLX4_QP_STATE_RST; @@ -244,99 +272,63 @@ void mlx4_en_deactivate_tx_ring(struct m MLX4_QP_STATE_RST, NULL, 0, 0, &ring->qp); } -static void mlx4_en_stamp_wqe(struct mlx4_en_priv *priv, - struct mlx4_en_tx_ring *ring, - int index, u8 owner) +static volatile struct mlx4_wqe_data_seg * +mlx4_en_store_inline_lso_data(volatile struct mlx4_wqe_data_seg *dseg, + struct mbuf *mb, int len, __be32 owner_bit) { - struct mlx4_en_tx_info *tx_info = &ring->tx_info[index]; - struct mlx4_en_tx_desc *tx_desc = (struct mlx4_en_tx_desc *) - (ring->buf + index * TXBB_SIZE); - void *end = ring->buf + ring->buf_size; - __be32 *ptr = (__be32 *)tx_desc; - __be32 stamp = cpu_to_be32(STAMP_VAL | (!!owner << STAMP_SHIFT)); - int i; - - /* Optimize the common case when there are no wraparounds */ - if (likely((void *)tx_desc + tx_info->nr_txbb * TXBB_SIZE <= end)) - /* Stamp the freed descriptor */ - for (i = 0; i < tx_info->nr_txbb * TXBB_SIZE; i += STAMP_STRIDE) { - *ptr = stamp; - ptr += STAMP_DWORDS; - } - else - /* Stamp the freed descriptor */ - for (i = 0; i < tx_info->nr_txbb * TXBB_SIZE; i += STAMP_STRIDE) { - *ptr = stamp; - ptr += STAMP_DWORDS; - if ((void *)ptr >= end) { - ptr = (__be32 *)ring->buf; - stamp ^= cpu_to_be32(0x80000000); - } - } + uint8_t *inl = __DEVOLATILE(uint8_t *, dseg); + + /* copy data into place */ + m_copydata(mb, 0, len, inl + 4); + dseg += DIV_ROUND_UP(4 + len, DS_SIZE_ALIGNMENT); + return (dseg); } -static u32 mlx4_en_free_tx_desc(struct mlx4_en_priv *priv, - struct mlx4_en_tx_ring *ring, - int index, u8 owner, u64 timestamp) +static void +mlx4_en_store_inline_lso_header(volatile struct mlx4_wqe_data_seg *dseg, + int len, __be32 owner_bit) +{ +} + +static void +mlx4_en_stamp_wqe(struct mlx4_en_priv *priv, + struct mlx4_en_tx_ring *ring, u32 index, u8 owner) { - struct mlx4_en_dev *mdev = priv->mdev; struct mlx4_en_tx_info *tx_info = &ring->tx_info[index]; struct mlx4_en_tx_desc *tx_desc = (struct mlx4_en_tx_desc *) - (ring->buf + index * TXBB_SIZE); - struct mlx4_wqe_data_seg *data = (void *) tx_desc + tx_info->data_offset; - struct mbuf *mb = tx_info->mb; - void *end = ring->buf + ring->buf_size; - int frags = tx_info->nr_segs;; - int i; - - /* Optimize the common case when there are no wraparounds */ - if (likely((void *) tx_desc + tx_info->nr_txbb * TXBB_SIZE <= end)) { - if (!tx_info->inl) { - if (tx_info->linear) { - dma_unmap_single(priv->ddev, - (dma_addr_t) be64_to_cpu(data->addr), - be32_to_cpu(data->byte_count), - PCI_DMA_TODEVICE); - ++data; - } + (ring->buf + (index * TXBB_SIZE)); + volatile __be32 *ptr = (__be32 *)tx_desc; + const __be32 stamp = cpu_to_be32(STAMP_VAL | + ((u32)owner << STAMP_SHIFT)); + u32 i; + + /* Stamp the freed descriptor */ + for (i = 0; i < tx_info->nr_txbb * TXBB_SIZE; i += STAMP_STRIDE) { + *ptr = stamp; + ptr += STAMP_DWORDS; + } +} - for (i = 0; i < frags; i++) { - pci_unmap_single(mdev->pdev, - (dma_addr_t) be64_to_cpu(data[i].addr), - data[i].byte_count, PCI_DMA_TODEVICE); - } - } - } else { - if (!tx_info->inl) { - if ((void *) data >= end) { - data = (struct mlx4_wqe_data_seg *) - (ring->buf + ((void *)data - end)); - } +static u32 +mlx4_en_free_tx_desc(struct mlx4_en_priv *priv, + struct mlx4_en_tx_ring *ring, u32 index) +{ + struct mlx4_en_tx_info *tx_info; + struct mbuf *mb; - if (tx_info->linear) { - dma_unmap_single(priv->ddev, - (dma_addr_t) be64_to_cpu(data->addr), - be32_to_cpu(data->byte_count), - PCI_DMA_TODEVICE); - ++data; - } + tx_info = &ring->tx_info[index]; + mb = tx_info->mb; + + if (mb == NULL) + goto done; + + bus_dmamap_sync(ring->dma_tag, tx_info->dma_map, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(ring->dma_tag, tx_info->dma_map); - for (i = 0; i < frags; i++) { - /* Check for wraparound before unmapping */ - if ((void *) data >= end) - data = (struct mlx4_wqe_data_seg *)ring->buf; - pci_unmap_single(mdev->pdev, - (dma_addr_t) be64_to_cpu(data->addr), - data->byte_count, PCI_DMA_TODEVICE); - ++data; - } - } - } - /* Send a copy of the frame to the BPF listener */ - if (priv->dev && priv->dev->if_bpf) - ETHER_BPF_MTAP(priv->dev, mb); m_freem(mb); - return tx_info->nr_txbb; +done: + return (tx_info->nr_txbb); } int mlx4_en_free_tx_buf(struct net_device *dev, struct mlx4_en_tx_ring *ring) @@ -356,8 +348,7 @@ int mlx4_en_free_tx_buf(struct net_devic while (ring->cons != ring->prod) { ring->last_nr_txbb = mlx4_en_free_tx_desc(priv, ring, - ring->cons & ring->size_mask, - !!(ring->cons & ring->size), 0); + ring->cons & ring->size_mask); ring->cons += ring->last_nr_txbb; cnt++; } @@ -368,6 +359,14 @@ int mlx4_en_free_tx_buf(struct net_devic return cnt; } +static bool +mlx4_en_tx_ring_is_full(struct mlx4_en_tx_ring *ring) +{ + int wqs; + wqs = ring->size - (ring->prod - ring->cons); + return (wqs < (HEADROOM + (2 * MLX4_EN_TX_WQE_MAX_WQEBBS))); +} + static int mlx4_en_process_tx_cq(struct net_device *dev, struct mlx4_en_cq *cq) { @@ -383,12 +382,7 @@ static int mlx4_en_process_tx_cq(struct int size = cq->size; u32 size_mask = ring->size_mask; struct mlx4_cqe *buf = cq->buf; - u32 packets = 0; - u32 bytes = 0; int factor = priv->cqe_factor; - u64 timestamp = 0; - int done = 0; - if (!priv->port_up) return 0; @@ -423,16 +417,12 @@ static int mlx4_en_process_tx_cq(struct ring_index = (ring_index + ring->last_nr_txbb) & size_mask; /* free next descriptor */ ring->last_nr_txbb = mlx4_en_free_tx_desc( - priv, ring, ring_index, - !!((ring->cons + txbbs_skipped) & - ring->size), timestamp); + priv, ring, ring_index); mlx4_en_stamp_wqe(priv, ring, stamp_index, !!((ring->cons + txbbs_stamp) & ring->size)); stamp_index = ring_index; txbbs_stamp = txbbs_skipped; - packets++; - bytes += ring->tx_info[ring_index].nr_bytes; } while (ring_index != new_index); ++cons_index; @@ -451,15 +441,14 @@ static int mlx4_en_process_tx_cq(struct ring->cons += txbbs_skipped; /* Wakeup Tx queue if it was stopped and ring is not full */ - if (unlikely(ring->blocked) && - (ring->prod - ring->cons) <= ring->full_size) { + if (unlikely(ring->blocked) && !mlx4_en_tx_ring_is_full(ring)) { ring->blocked = 0; if (atomic_fetchadd_int(&priv->blocked, -1) == 1) atomic_clear_int(&dev->if_drv_flags ,IFF_DRV_OACTIVE); ring->wake_queue++; priv->port_stats.wake_queue++; } - return done; + return (0); } void mlx4_en_tx_irq(struct mlx4_cq *mcq) @@ -500,34 +489,6 @@ void mlx4_en_poll_tx_cq(unsigned long da spin_unlock(&ring->comp_lock); } -static struct mlx4_en_tx_desc *mlx4_en_bounce_to_desc(struct mlx4_en_priv *priv, - struct mlx4_en_tx_ring *ring, - u32 index, - unsigned int desc_size) -{ - u32 copy = (ring->size - index) * TXBB_SIZE; - int i; - - for (i = desc_size - copy - 4; i >= 0; i -= 4) { - if ((i & (TXBB_SIZE - 1)) == 0) - wmb(); - - *((u32 *) (ring->buf + i)) = - *((u32 *) (ring->bounce_buf + copy + i)); - } - - for (i = copy - 4; i >= 4 ; i -= 4) { - if ((i & (TXBB_SIZE - 1)) == 0) - wmb(); - - *((u32 *) (ring->buf + index * TXBB_SIZE + i)) = - *((u32 *) (ring->bounce_buf + i)); - } - - /* Return real descriptor location */ - return (struct mlx4_en_tx_desc *)(ring->buf + index * TXBB_SIZE); -} - static inline void mlx4_en_xmit_poll(struct mlx4_en_priv *priv, int tx_ind) { struct mlx4_en_cq *cq = priv->tx_cq[tx_ind]; @@ -546,30 +507,22 @@ static inline void mlx4_en_xmit_poll(str *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 3 15:19:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26C47A3FE30; Thu, 3 Dec 2015 15:19:31 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB4F71BDD; Thu, 3 Dec 2015 15:19:30 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3FJTYj036894; Thu, 3 Dec 2015 15:19:29 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3FJTmP036890; Thu, 3 Dec 2015 15:19:29 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201512031519.tB3FJTmP036890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 3 Dec 2015 15:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291700 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 15:19:31 -0000 Author: tuexen Date: Thu Dec 3 15:19:29 2015 New Revision: 291700 URL: https://svnweb.freebsd.org/changeset/base/291700 Log: Ensure that outgoing streams get reset when they run dry. MFC after: 1 week Modified: head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_timer.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Thu Dec 3 14:56:17 2015 (r291699) +++ head/sys/netinet/sctp_indata.c Thu Dec 3 15:19:29 2015 (r291700) @@ -2763,6 +2763,11 @@ sctp_process_segment_range(struct sctp_t panic("No chunks on the queues for sid %u.", tp1->rec.data.stream_number); #endif } + if ((stcb->asoc.strmout[tp1->rec.data.stream_number].chunks_on_queues == 0) && + (stcb->asoc.strmout[tp1->rec.data.stream_number].state == SCTP_STREAM_RESET_PENDING) && + TAILQ_EMPTY(&stcb->asoc.strmout[tp1->rec.data.stream_number].outqueue)) { + stcb->asoc.trigger_reset = 1; + } tp1->sent = SCTP_DATAGRAM_NR_ACKED; if (tp1->data) { /* @@ -3736,6 +3741,11 @@ sctp_express_handle_sack(struct sctp_tcb #endif } } + if ((asoc->strmout[tp1->rec.data.stream_number].chunks_on_queues == 0) && + (asoc->strmout[tp1->rec.data.stream_number].state == SCTP_STREAM_RESET_PENDING) && + TAILQ_EMPTY(&asoc->strmout[tp1->rec.data.stream_number].outqueue)) { + asoc->trigger_reset = 1; + } TAILQ_REMOVE(&asoc->sent_queue, tp1, sctp_next); if (tp1->data) { /* sa_ignore NO_NULL_CHK */ @@ -4461,6 +4471,11 @@ sctp_handle_sack(struct mbuf *m, int off #endif } } + if ((asoc->strmout[tp1->rec.data.stream_number].chunks_on_queues == 0) && + (asoc->strmout[tp1->rec.data.stream_number].state == SCTP_STREAM_RESET_PENDING) && + TAILQ_EMPTY(&asoc->strmout[tp1->rec.data.stream_number].outqueue)) { + asoc->trigger_reset = 1; + } TAILQ_REMOVE(&asoc->sent_queue, tp1, sctp_next); if (PR_SCTP_ENABLED(tp1->flags)) { if (asoc->pr_sctp_cnt != 0) Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Thu Dec 3 14:56:17 2015 (r291699) +++ head/sys/netinet/sctp_input.c Thu Dec 3 15:19:29 2015 (r291700) @@ -6024,7 +6024,7 @@ trigger_send: if (!TAILQ_EMPTY(&stcb->asoc.control_send_queue)) { cnt_ctrl_ready = stcb->asoc.ctrl_queue_cnt - stcb->asoc.ecn_echo_cnt_onq; } - if (cnt_ctrl_ready || + if (cnt_ctrl_ready || stcb->asoc.trigger_reset || ((un_sent) && (stcb->asoc.peers_rwnd > 0 || (stcb->asoc.peers_rwnd <= 0 && stcb->asoc.total_flight == 0)))) { Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Thu Dec 3 14:56:17 2015 (r291699) +++ head/sys/netinet/sctp_output.c Thu Dec 3 15:19:29 2015 (r291700) @@ -9897,7 +9897,6 @@ sctp_chunk_output(struct sctp_inpcb *inp asoc = &stcb->asoc; do_it_again: /* The Nagle algorithm is only applied when handling a send call. */ - stcb->asoc.trigger_reset = 0; if (from_where == SCTP_OUTPUT_FROM_USR_SEND) { if (sctp_is_feature_on(inp, SCTP_PCB_FLAGS_NODELAY)) { nagle_on = 0; @@ -9914,7 +9913,8 @@ do_it_again: if ((un_sent <= 0) && (TAILQ_EMPTY(&asoc->control_send_queue)) && (TAILQ_EMPTY(&asoc->asconf_send_queue)) && - (asoc->sent_queue_retran_cnt == 0)) { + (asoc->sent_queue_retran_cnt == 0) && + (asoc->trigger_reset == 0)) { /* Nothing to do unless there is something to be sent left */ return; } @@ -11885,6 +11885,7 @@ sctp_send_stream_reset_out_if_possible(s uint32_t seq; asoc = &stcb->asoc; + asoc->trigger_reset = 0; if (asoc->stream_reset_outstanding) { return (EALREADY); } Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Thu Dec 3 14:56:17 2015 (r291699) +++ head/sys/netinet/sctp_timer.c Thu Dec 3 15:19:29 2015 (r291700) @@ -442,6 +442,11 @@ sctp_recover_sent_list(struct sctp_tcb * asoc->strmout[chk->rec.data.stream_number].chunks_on_queues--; } } + if ((asoc->strmout[chk->rec.data.stream_number].chunks_on_queues == 0) && + (asoc->strmout[chk->rec.data.stream_number].state == SCTP_STREAM_RESET_PENDING) && + TAILQ_EMPTY(&asoc->strmout[chk->rec.data.stream_number].outqueue)) { + asoc->trigger_reset = 1; + } TAILQ_REMOVE(&asoc->sent_queue, chk, sctp_next); if (PR_SCTP_ENABLED(chk->flags)) { if (asoc->pr_sctp_cnt != 0) From owner-svn-src-all@freebsd.org Thu Dec 3 15:41:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 022DFA4046C; Thu, 3 Dec 2015 15:41:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3DBA1A46; Thu, 3 Dec 2015 15:41:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3FfALE042743; Thu, 3 Dec 2015 15:41:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3FfAna042742; Thu, 3 Dec 2015 15:41:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201512031541.tB3FfAna042742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 3 Dec 2015 15:41:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291701 - head/contrib/llvm/tools/clang/tools/driver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 15:41:12 -0000 Author: dim Date: Thu Dec 3 15:41:10 2015 New Revision: 291701 URL: https://svnweb.freebsd.org/changeset/base/291701 Log: In assembler mode, clang defaulted to DWARF3, if only -g was specified. Change this to DWARF2, in the simplest way possible. (Upstream, this was fixed in clang trunk r250173, but this was done along with a lot of shuffling around of debug option handling, so it cannot be applied as-is.) Noticed by: des MFC after: 3 days Modified: head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp Modified: head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp ============================================================================== --- head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp Thu Dec 3 15:19:29 2015 (r291700) +++ head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp Thu Dec 3 15:41:10 2015 (r291701) @@ -141,7 +141,7 @@ public: RelaxAll = 0; NoExecStack = 0; FatalWarnings = 0; - DwarfVersion = 3; + DwarfVersion = 2; } static bool CreateFromArgs(AssemblerInvocation &Res, From owner-svn-src-all@freebsd.org Thu Dec 3 15:49:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C0DCA405D7 for ; Thu, 3 Dec 2015 15:49:16 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BBAB1038 for ; Thu, 3 Dec 2015 15:49:16 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound2.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Thu, 3 Dec 2015 15:49:44 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id tB3Fn7tP019386; Thu, 3 Dec 2015 08:49:07 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1449157747.1262.98.camel@freebsd.org> Subject: Re: svn commit: r291699 - in head/sys: modules/mlxen ofed/drivers/net/mlx4 From: Ian Lepore To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 03 Dec 2015 08:49:07 -0700 In-Reply-To: <201512031456.tB3EuHVs030967@repo.freebsd.org> References: <201512031456.tB3EuHVs030967@repo.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 15:49:16 -0000 On Thu, 2015-12-03 at 14:56 +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Dec 3 14:56:17 2015 > New Revision: 291699 > URL: https://svnweb.freebsd.org/changeset/base/291699 > > Log: > Convert the mlxen driver to use the BUSDMA(9) APIs instead of > vtophys() when loading mbufs for transmission and reception. While > at > it all pointer arithmetic and cast qualifier issues were fixed, > mostly > related to transmission and reception. > > MFC after: 1 week > Sponsored by: Mellanox Technologies > Differential Revision: https://reviews.freebsd.org/D4284 > > Modified: > head/sys/modules/mlxen/Makefile > head/sys/ofed/drivers/net/mlx4/en_netdev.c > head/sys/ofed/drivers/net/mlx4/en_rx.c > head/sys/ofed/drivers/net/mlx4/en_tx.c > head/sys/ofed/drivers/net/mlx4/mlx4_en.h > > [...] > + /* load spare mbuf into BUSDMA */ > + err = -bus_dmamap_load_mbuf_sg(ring->dma_tag, ring > ->spare.dma_map, > + mb, segs, &nsegs, BUS_DMA_NOWAIT); > + if (unlikely(err != 0)) { > + m_freem(mb); > + return (err); > + } > + KASSERT(nsegs == 1, > + ("Number of segments is expected to be one")); > + This KASSERT() (and others like it following map loads) could never fire, because the dma tag is created with maxsegs 1. If the buffer can't be mapped as a single segment the map load would return EFBIG error. -- Ian From owner-svn-src-all@freebsd.org Thu Dec 3 15:53:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE80CA40856; Thu, 3 Dec 2015 15:53:41 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE93C1860; Thu, 3 Dec 2015 15:53:41 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id tB3FgZXL030103 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 3 Dec 2015 07:42:35 -0800 Subject: Re: svn commit: r291666 - head/libexec/rtld-elf To: Konstantin Belousov References: <201512030006.tB306xTa074887@repo.freebsd.org> <20151203085028.GH2405@kib.kiev.ua> Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org From: Nathan Whitehorn Message-ID: <566062EB.7070200@freebsd.org> Date: Thu, 3 Dec 2015 07:42:35 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151203085028.GH2405@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVbP1BfLrC3LIoFyLQvaeFden0742msbAiVxF6zdn8trpu96a74E1V3tj8ZROWWEtvGACnuHm22Kq7VFRifEnwuCdVlSC44510M= X-Sonic-ID: C;3FFdedSZ5RGQMuK7sH9FTg== M;KDWmedSZ5RGQMuK7sH9FTg== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 15:53:42 -0000 On 12/03/15 00:50, Konstantin Belousov wrote: > On Thu, Dec 03, 2015 at 12:06:59AM +0000, Nathan Whitehorn wrote: >> Author: nwhitehorn >> Date: Thu Dec 3 00:06:59 2015 >> New Revision: 291666 >> URL: https://svnweb.freebsd.org/changeset/base/291666 >> >> Log: >> Fix build on GCC 5.2 where, at least on PPC64, the compiler would "optimize" >> the malloc() + memset() in the local implementation of calloc() into a call >> to calloc(), helpfully turning it into an infinite loop. Clean up some >> unneeded flags on PPC64 while here. >> >> MFC after: 1 month >> >> Modified: >> head/libexec/rtld-elf/Makefile >> >> Modified: head/libexec/rtld-elf/Makefile >> ============================================================================== >> --- head/libexec/rtld-elf/Makefile Thu Dec 3 00:02:01 2015 (r291665) >> +++ head/libexec/rtld-elf/Makefile Thu Dec 3 00:06:59 2015 (r291666) >> @@ -13,7 +13,7 @@ SRCS= rtld_start.S \ >> malloc.c xmalloc.c debug.c libmap.c >> MAN= rtld.1 >> CSTD?= gnu99 >> -CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD >> +CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -fno-builtin >> CFLAGS+= -I${SRCTOP}/lib/csu/common >> .if exists(${.CURDIR}/${MACHINE_ARCH}) >> RTLD_ARCH= ${MACHINE_ARCH} >> @@ -22,7 +22,6 @@ RTLD_ARCH= ${MACHINE_CPUARCH} >> .endif >> CFLAGS+= -I${.CURDIR}/${RTLD_ARCH} -I${.CURDIR} >> .if ${MACHINE_ARCH} == "powerpc64" >> -CFLAGS+= -mcall-aixdesc > I wanted to set -ffreestanding for rtld compilation, but considered it only > a minor issue. Could you test this instead of -fno-builtin, please ? > Sure, I'll test it today. -Nathan From owner-svn-src-all@freebsd.org Thu Dec 3 16:12:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A838A40B2F; Thu, 3 Dec 2015 16:12:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CFD691257; Thu, 3 Dec 2015 16:12:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:7b8:3a7::f415:879d:d8a4:552d] (unknown [IPv6:2001:7b8:3a7:0:f415:879d:d8a4:552d]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 9068933922; Thu, 3 Dec 2015 17:12:45 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_F7E7F9CF-70D3-4C07-908C-924E7900328C"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: svn commit: r291701 - head/contrib/llvm/tools/clang/tools/driver X-Pgp-Agent: GPGMail 2.6b2 From: Dimitry Andric In-Reply-To: <201512031541.tB3FfAna042742@repo.freebsd.org> Date: Thu, 3 Dec 2015 17:12:40 +0100 Message-Id: <98A73AB6-AE53-425B-826F-B6336F212E0C@FreeBSD.org> References: <201512031541.tB3FfAna042742@repo.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3096.5) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 16:12:48 -0000 --Apple-Mail=_F7E7F9CF-70D3-4C07-908C-924E7900328C Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 03 Dec 2015, at 16:41, Dimitry Andric wrote: > > Author: dim > Date: Thu Dec 3 15:41:10 2015 > New Revision: 291701 > URL: https://svnweb.freebsd.org/changeset/base/291701 > > Log: > In assembler mode, clang defaulted to DWARF3, if only -g was specified. > Change this to DWARF2, in the simplest way possible. Note that this problem caused some object files, such as /usr/lib/crt*.o to contain debug information with DWARF3 version markings. Since these are linked into almost all executables, gdb from base would therefore complain that it could not debug such executables. E.g, if you were building world with DEBUG_FLAGS=-g, you should rebuild and reinstall it, to make it debuggable with gdb from base. Also note that lldb and gdb from ports do support DWARF3 and higher, and are highly recommended above gdb from base. -Dimitry --Apple-Mail=_F7E7F9CF-70D3-4C07-908C-924E7900328C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.28 iEYEARECAAYFAlZgaf0ACgkQsF6jCi4glqMW8gCgz1FjJefU/I/tY+nmOYt/akwX iqMAnRnsZ5cUtoY7QerhrCwJUXDq1VXJ =lBvl -----END PGP SIGNATURE----- --Apple-Mail=_F7E7F9CF-70D3-4C07-908C-924E7900328C-- From owner-svn-src-all@freebsd.org Thu Dec 3 16:24:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B463A40D26; Thu, 3 Dec 2015 16:24:56 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 37CA91B71; Thu, 3 Dec 2015 16:24:56 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3GOtKD056837; Thu, 3 Dec 2015 16:24:55 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3GOt4S056836; Thu, 3 Dec 2015 16:24:55 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201512031624.tB3GOt4S056836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 3 Dec 2015 16:24:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291702 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 16:24:56 -0000 Author: nwhitehorn Date: Thu Dec 3 16:24:55 2015 New Revision: 291702 URL: https://svnweb.freebsd.org/changeset/base/291702 Log: Bump MAXCPU. We already run on hardware with 32 threads and the same hardware is available commercially with up to 96 threads per socket. MFC after: 3 weeks Modified: head/sys/powerpc/include/param.h Modified: head/sys/powerpc/include/param.h ============================================================================== --- head/sys/powerpc/include/param.h Thu Dec 3 15:41:10 2015 (r291701) +++ head/sys/powerpc/include/param.h Thu Dec 3 16:24:55 2015 (r291702) @@ -69,7 +69,7 @@ #if defined(SMP) || defined(KLD_MODULE) #ifndef MAXCPU -#define MAXCPU 32 +#define MAXCPU 256 #endif #else #define MAXCPU 1 From owner-svn-src-all@freebsd.org Thu Dec 3 16:54:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 131D7A3F4F2; Thu, 3 Dec 2015 16:54:47 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7D0B10BE; Thu, 3 Dec 2015 16:54:46 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3GsjwL066385; Thu, 3 Dec 2015 16:54:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3GsjWA066384; Thu, 3 Dec 2015 16:54:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201512031654.tB3GsjWA066384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 3 Dec 2015 16:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291703 - head/etc/devd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 16:54:47 -0000 Author: hselasky Date: Thu Dec 3 16:54:45 2015 New Revision: 291703 URL: https://svnweb.freebsd.org/changeset/base/291703 Log: Regenerate usb.conf . MFC after: 1 week Modified: head/etc/devd/usb.conf Modified: head/etc/devd/usb.conf ============================================================================== --- head/etc/devd/usb.conf Thu Dec 3 16:24:55 2015 (r291702) +++ head/etc/devd/usb.conf Thu Dec 3 16:54:45 2015 (r291703) @@ -169,7 +169,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0409"; - match "product" "(0x00d5|0x00d6|0x00d7|0x8024|0x8025)"; + match "product" "(0x00d5|0x00d6|0x00d7)"; + action "kldload -n uipaq"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0409"; + match "product" "0x0249"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0409"; + match "product" "(0x8024|0x8025)"; action "kldload -n uipaq"; }; @@ -521,6 +537,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x04bb"; + match "product" "0x093f"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x04bb"; match "product" "(0x0944|0x0945|0x0947|0x0948)"; action "kldload -n if_run"; }; @@ -1064,6 +1088,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x057c"; + match "product" "0x8401"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0584"; match "product" "0xb000"; action "kldload -n uplcom"; @@ -1089,7 +1121,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0586"; - match "product" "(0x3416|0x341a|0x341e)"; + match "product" "0x3416"; + action "kldload -n if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0586"; + match "product" "0x3417"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0586"; + match "product" "(0x341a|0x341e)"; action "kldload -n if_run"; }; @@ -1153,7 +1201,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x05ac"; - match "product" "(0x0230|0x0231|0x0232|0x0236|0x0237|0x0238|0x023f|0x0240|0x0241|0x0242|0x0243|0x0244|0x0245|0x0246|0x0247|0x0249|0x024a|0x024b|0x024c|0x024d|0x024e|0x0252|0x0253|0x0254|0x0259|0x025a|0x025b|0x0262|0x0263|0x0264|0x0290|0x0291|0x0292)"; + match "product" "(0x0230|0x0231|0x0232|0x0236|0x0237|0x0238|0x023f|0x0240|0x0241|0x0242|0x0243|0x0244|0x0245|0x0246|0x0247|0x0249|0x024a|0x024b|0x024c|0x024d|0x024e|0x0252|0x0253|0x0254|0x0259|0x025a|0x025b|0x0262|0x0263|0x0264|0x0272|0x0273|0x0274|0x0290|0x0291|0x0292)"; action "kldload -n wsp"; }; @@ -1721,6 +1769,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x07d1"; + match "product" "0x3a09"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07d1"; match "product" "0x3a0c"; action "kldload -n if_uath"; }; @@ -1729,6 +1785,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x07d1"; + match "product" "0x3a0f"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07d1"; match "product" "(0x3c03|0x3c04|0x3c06|0x3c07)"; action "kldload -n if_rum"; }; @@ -1737,7 +1801,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x07d1"; - match "product" "(0x3c09|0x3c0a|0x3c0b|0x3c0d|0x3c0e|0x3c0f|0x3c11|0x3c13|0x3c15|0x3c16)"; + match "product" "(0x3c09|0x3c0a|0x3c0b|0x3c0d|0x3c0e|0x3c0f)"; + action "kldload -n if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07d1"; + match "product" "0x3c10"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x07d1"; + match "product" "(0x3c11|0x3c13|0x3c15|0x3c16)"; action "kldload -n if_run"; }; @@ -1848,6 +1928,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x083a"; + match "product" "0xf522"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0841"; match "product" "0x0001"; action "kldload -n urio"; @@ -1921,7 +2009,39 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0846"; - match "product" "(0x9021|0x9041)"; + match "product" "(0x9001|0x9010)"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0846"; + match "product" "0x9012"; + action "kldload -n if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0846"; + match "product" "0x9021"; + action "kldload -n if_urtwn"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0846"; + match "product" "0x9040"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0846"; + match "product" "0x9041"; action "kldload -n if_urtwn"; }; @@ -2184,6 +2304,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0ace"; + match "product" "0x1221"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0af0"; match "product" "(0x5000|0x6000|0x6050|0x6100|0x6150|0x6200|0x6250|0x6300|0x6350|0x6500|0x6501|0x6600|0x6601|0x6701)"; action "kldload -n u3g"; @@ -2545,6 +2673,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0bda"; + match "product" "0x8152"; + action "kldload -n if_ure"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0bda"; match "product" "0x8170"; action "kldload -n if_urtwn"; }; @@ -2793,13 +2929,37 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0cde"; - match "product" "(0x0022|0x0025)"; + match "product" "0x0022"; action "kldload -n if_run"; }; nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0cde"; + match "product" "0x0023"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0cde"; + match "product" "0x0025"; + action "kldload -n if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0cde"; + match "product" "0x0026"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0cf3"; match "product" "(0x0001|0x0003|0x0005)"; action "kldload -n if_uath"; @@ -2809,7 +2969,31 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0cf3"; - match "product" "(0x3002|0x3004|0x311d|0xe004|0xe019)"; + match "product" "(0x1001|0x1002|0x1010|0x1011)"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0cf3"; + match "product" "(0x3002|0x3004|0x311d)"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0cf3"; + match "product" "0x9170"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0cf3"; + match "product" "(0xe004|0xe019)"; action "kldload -n ng_ubt"; }; @@ -3529,7 +3713,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1199"; - match "product" "(0x6802|0x6803|0x6804|0x6805|0x6808|0x6809|0x6812|0x6813|0x6815|0x6816|0x6820|0x6820|0x6821|0x6822|0x6832|0x6833|0x6834|0x6835|0x6838|0x6839|0x683a|0x683b|0x683c|0x683d|0x683e|0x6850|0x6851|0x6852|0x6853|0x6855|0x6856|0x6859|0x685a|0x6880|0x6890|0x6891|0x6892|0x6893|0x68a3)"; + match "product" "(0x6802|0x6803|0x6804|0x6805|0x6808|0x6809|0x6812|0x6813|0x6815|0x6816|0x6820|0x6821|0x6822|0x6832|0x6833|0x6834|0x6835|0x6838|0x6839|0x683a|0x683b|0x683c|0x683d|0x683e|0x6850|0x6851|0x6852|0x6853|0x6855|0x6856|0x6859|0x685a|0x6880|0x6890|0x6891|0x6892|0x6893|0x68a3)"; action "kldload -n u3g"; }; @@ -3545,7 +3729,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1199"; - match "product" "0x68aa"; + match "product" "(0x68aa|0x68c0|0x9041)"; action "kldload -n u3g"; }; @@ -3657,7 +3841,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x12d1"; - match "product" "(0x1803|0x1c05|0x1c0b)"; + match "product" "(0x1573|0x1803|0x1c05|0x1c0b)"; action "kldload -n u3g"; }; @@ -3849,6 +4033,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1435"; + match "product" "0x0326"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x1435"; match "product" "0x0427"; action "kldload -n if_upgt"; }; @@ -3865,6 +4057,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1435"; + match "product" "0x0804"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x1435"; match "product" "(0x0826|0x082a)"; action "kldload -n if_uath"; }; @@ -4529,7 +4729,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x19d2"; - match "product" "(0x0001|0x0002|0x0003|0x0004|0x0005|0x0006|0x0007|0x0008|0x0009|0x000a|0x000b|0x000c|0x000d|0x000e|0x000f|0x0010|0x0011|0x0012|0x0013|0x0014|0x0015|0x0016|0x0017|0x0018|0x0019|0x0020|0x0021|0x0022|0x0023|0x0024|0x0025|0x0026|0x0027|0x0028|0x0029|0x0030|0x0031|0x0032|0x0033|0x0037|0x0039|0x0042|0x0043|0x0048|0x0049|0x0051|0x0052|0x0053|0x0054|0x0055|0x0057|0x0058|0x0059|0x0060|0x0061|0x0062|0x0063|0x0064|0x0066|0x0069|0x0070|0x0073|0x0076|0x0078|0x0082|0x0086|0x0117|0x1179|0x1181|0x1420|0x1514|0x1516|0x2000|0x2002|0x2003|0xffdd|0xffde|0xfff1|0xfff5|0xfffe)"; + match "product" "(0x0001|0x0002|0x0003|0x0004|0x0005|0x0006|0x0007|0x0008|0x0009|0x000a|0x000b|0x000c|0x000d|0x000e|0x000f|0x0010|0x0011|0x0012|0x0013|0x0014|0x0015|0x0016|0x0017|0x0018|0x0019|0x0020|0x0021|0x0022|0x0023|0x0024|0x0025|0x0026|0x0027|0x0028|0x0029|0x0030|0x0031|0x0032|0x0033|0x0037|0x0039|0x0042|0x0043|0x0048|0x0049|0x0051|0x0052|0x0053|0x0054|0x0055|0x0057|0x0058|0x0059|0x0060|0x0061|0x0062|0x0063|0x0064|0x0066|0x0069|0x0070|0x0073|0x0076|0x0078|0x0082|0x0086|0x0103|0x0117|0x1179|0x1181|0x1420|0x1514|0x1516|0x2000|0x2002|0x2003|0xffdd|0xffde|0xfff1|0xfff5|0xfffe)"; action "kldload -n u3g"; }; @@ -4841,6 +5041,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2019"; + match "product" "0x5304"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2019"; match "product" "0xab01"; action "kldload -n if_rum"; }; @@ -5312,6 +5520,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0xcace"; + match "product" "0x0300"; + action "kldload -n if_otus"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0xdaae"; match "product" "0xead6"; action "kldload -n uslcom"; @@ -5585,5 +5801,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2688 USB entries processed +# 2719 USB entries processed From owner-svn-src-all@freebsd.org Thu Dec 3 16:57:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37719A3F5CA; Thu, 3 Dec 2015 16:57:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1527412C4; Thu, 3 Dec 2015 16:57:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 30F32B97D; Thu, 3 Dec 2015 11:57:46 -0500 (EST) From: John Baldwin To: Nathan Whitehorn Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291702 - head/sys/powerpc/include Date: Thu, 03 Dec 2015 08:56:38 -0800 Message-ID: <4783557.BT6zBG17cM@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201512031624.tB3GOt4S056836@repo.freebsd.org> References: <201512031624.tB3GOt4S056836@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 03 Dec 2015 11:57:46 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 16:57:47 -0000 On Thursday, December 03, 2015 04:24:55 PM Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Thu Dec 3 16:24:55 2015 > New Revision: 291702 > URL: https://svnweb.freebsd.org/changeset/base/291702 > > Log: > Bump MAXCPU. We already run on hardware with 32 threads and the same hardware > is available commercially with up to 96 threads per socket. > > MFC after: 3 weeks For powerpc this is probably fine, but the current implementation of the cpuset APIs results in old binaries not working after you merge a bump to MAXCPU. (I should fix the cpuset APIs to be more forgiving but just haven't gotten to it.) I had to revert a similar bump from stable/10 for amd64 because of the breakage. -- John Baldwin From owner-svn-src-all@freebsd.org Thu Dec 3 16:57:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BA37A3F5C3; Thu, 3 Dec 2015 16:57:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 794DA12C2; Thu, 3 Dec 2015 16:57:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E559FB958; Thu, 3 Dec 2015 11:57:44 -0500 (EST) From: John Baldwin To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291685 - head/sys/dev/cxgbe Date: Thu, 03 Dec 2015 08:57:41 -0800 Message-ID: <2419521.P0l5Jx2QqX@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201512031033.tB3AXvvN055312@repo.freebsd.org> References: <201512031033.tB3AXvvN055312@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 03 Dec 2015 11:57:45 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 16:57:46 -0000 On Thursday, December 03, 2015 10:33:57 AM Konstantin Belousov wrote: > Author: kib > Date: Thu Dec 3 10:33:57 2015 > New Revision: 291685 > URL: https://svnweb.freebsd.org/changeset/base/291685 > > Log: > Fix build for !TCP_OFFLOAD case. > > Modified: > head/sys/dev/cxgbe/t4_main.c Sorry for breaking the build. :( Thanks for fixing. -- John Baldwin From owner-svn-src-all@freebsd.org Thu Dec 3 17:02:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E308A3F895; Thu, 3 Dec 2015 17:02:10 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38B0C1C06; Thu, 3 Dec 2015 17:02:10 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id tB3H23T1030546 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 3 Dec 2015 09:02:04 -0800 Subject: Re: svn commit: r291702 - head/sys/powerpc/include To: John Baldwin References: <201512031624.tB3GOt4S056836@repo.freebsd.org> <4783557.BT6zBG17cM@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Nathan Whitehorn Message-ID: <5660758B.4020802@freebsd.org> Date: Thu, 3 Dec 2015 09:02:03 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <4783557.BT6zBG17cM@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVap455dMLNZ1+aksX/da1GApgdkXSWaZx/wm3pqW8pJfdAkhQhZd27cMoB5tj2xMmmbK2Nj34J3Xmo9wFs5g2Qmiso3rBW5O9k= X-Sonic-ID: C;6uSvk9+Z5RGKbuK7sH9FTg== M;gLj1k9+Z5RGKbuK7sH9FTg== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 17:02:10 -0000 On 12/03/15 08:56, John Baldwin wrote: > On Thursday, December 03, 2015 04:24:55 PM Nathan Whitehorn wrote: >> Author: nwhitehorn >> Date: Thu Dec 3 16:24:55 2015 >> New Revision: 291702 >> URL: https://svnweb.freebsd.org/changeset/base/291702 >> >> Log: >> Bump MAXCPU. We already run on hardware with 32 threads and the same hardware >> is available commercially with up to 96 threads per socket. >> >> MFC after: 3 weeks > For powerpc this is probably fine, but the current implementation of the > cpuset APIs results in old binaries not working after you merge a bump to > MAXCPU. (I should fix the cpuset APIs to be more forgiving but just > haven't gotten to it.) I had to revert a similar bump from stable/10 for > amd64 because of the breakage. > Good to know. I think I will just cancel the MFC, then. -Nathan From owner-svn-src-all@freebsd.org Thu Dec 3 17:03:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AD41A3F90B; Thu, 3 Dec 2015 17:03:35 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 550A21DA7; Thu, 3 Dec 2015 17:03:34 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from zeppelin.tachypleus.net (75-101-50-44.static.sonic.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id tB3H3WNc032044 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 3 Dec 2015 09:03:33 -0800 Subject: Re: svn commit: r291666 - head/libexec/rtld-elf To: Konstantin Belousov References: <201512030006.tB306xTa074887@repo.freebsd.org> <20151203085028.GH2405@kib.kiev.ua> <566062EB.7070200@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Nathan Whitehorn Message-ID: <566075E4.8090202@freebsd.org> Date: Thu, 3 Dec 2015 09:03:32 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <566062EB.7070200@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVagjeNpbLLbB2v0rChELCDGVREbelZumGEKJIsB3lhyE4D+LVVTYj/CgGsJIycp2KupHitduvD6pGOUhHWhUv47JBhc8wJ0704= X-Sonic-ID: C;HFy4yN+Z5RG4VuK7sH9FTg== M;bvHzyN+Z5RG4VuK7sH9FTg== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 17:03:35 -0000 On 12/03/15 07:42, Nathan Whitehorn wrote: > > > On 12/03/15 00:50, Konstantin Belousov wrote: >> On Thu, Dec 03, 2015 at 12:06:59AM +0000, Nathan Whitehorn wrote: >>> Author: nwhitehorn >>> Date: Thu Dec 3 00:06:59 2015 >>> New Revision: 291666 >>> URL: https://svnweb.freebsd.org/changeset/base/291666 >>> >>> Log: >>> Fix build on GCC 5.2 where, at least on PPC64, the compiler would >>> "optimize" >>> the malloc() + memset() in the local implementation of calloc() >>> into a call >>> to calloc(), helpfully turning it into an infinite loop. Clean up >>> some >>> unneeded flags on PPC64 while here. >>> MFC after: 1 month >>> >>> Modified: >>> head/libexec/rtld-elf/Makefile >>> >>> Modified: head/libexec/rtld-elf/Makefile >>> ============================================================================== >>> >>> --- head/libexec/rtld-elf/Makefile Thu Dec 3 00:02:01 2015 >>> (r291665) >>> +++ head/libexec/rtld-elf/Makefile Thu Dec 3 00:06:59 2015 >>> (r291666) >>> @@ -13,7 +13,7 @@ SRCS= rtld_start.S \ >>> malloc.c xmalloc.c debug.c libmap.c >>> MAN= rtld.1 >>> CSTD?= gnu99 >>> -CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD >>> +CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -fno-builtin >>> CFLAGS+= -I${SRCTOP}/lib/csu/common >>> .if exists(${.CURDIR}/${MACHINE_ARCH}) >>> RTLD_ARCH= ${MACHINE_ARCH} >>> @@ -22,7 +22,6 @@ RTLD_ARCH= ${MACHINE_CPUARCH} >>> .endif >>> CFLAGS+= -I${.CURDIR}/${RTLD_ARCH} -I${.CURDIR} >>> .if ${MACHINE_ARCH} == "powerpc64" >>> -CFLAGS+= -mcall-aixdesc >> I wanted to set -ffreestanding for rtld compilation, but considered >> it only >> a minor issue. Could you test this instead of -fno-builtin, please ? >> > > Sure, I'll test it today. > -Nathan > > -ffreestanding works just as well for this as -fno-builtin. Would you like to make the change? -Nathan From owner-svn-src-all@freebsd.org Thu Dec 3 17:14:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 354CEA3FB65; Thu, 3 Dec 2015 17:14:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BDFDC1584; Thu, 3 Dec 2015 17:14:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tB3HEAZR071421 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 3 Dec 2015 19:14:11 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tB3HEAZR071421 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tB3HEA1m071420; Thu, 3 Dec 2015 19:14:10 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 3 Dec 2015 19:14:10 +0200 From: Konstantin Belousov To: Nathan Whitehorn Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291666 - head/libexec/rtld-elf Message-ID: <20151203171410.GL2405@kib.kiev.ua> References: <201512030006.tB306xTa074887@repo.freebsd.org> <20151203085028.GH2405@kib.kiev.ua> <566062EB.7070200@freebsd.org> <566075E4.8090202@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <566075E4.8090202@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 17:14:20 -0000 On Thu, Dec 03, 2015 at 09:03:32AM -0800, Nathan Whitehorn wrote: > > > On 12/03/15 07:42, Nathan Whitehorn wrote: > > > > > > On 12/03/15 00:50, Konstantin Belousov wrote: > >> On Thu, Dec 03, 2015 at 12:06:59AM +0000, Nathan Whitehorn wrote: > >>> Author: nwhitehorn > >>> Date: Thu Dec 3 00:06:59 2015 > >>> New Revision: 291666 > >>> URL: https://svnweb.freebsd.org/changeset/base/291666 > >>> > >>> Log: > >>> Fix build on GCC 5.2 where, at least on PPC64, the compiler would > >>> "optimize" > >>> the malloc() + memset() in the local implementation of calloc() > >>> into a call > >>> to calloc(), helpfully turning it into an infinite loop. Clean up > >>> some > >>> unneeded flags on PPC64 while here. > >>> MFC after: 1 month > >>> > >>> Modified: > >>> head/libexec/rtld-elf/Makefile > >>> > >>> Modified: head/libexec/rtld-elf/Makefile > >>> ============================================================================== > >>> > >>> --- head/libexec/rtld-elf/Makefile Thu Dec 3 00:02:01 2015 > >>> (r291665) > >>> +++ head/libexec/rtld-elf/Makefile Thu Dec 3 00:06:59 2015 > >>> (r291666) > >>> @@ -13,7 +13,7 @@ SRCS= rtld_start.S \ > >>> malloc.c xmalloc.c debug.c libmap.c > >>> MAN= rtld.1 > >>> CSTD?= gnu99 > >>> -CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD > >>> +CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -fno-builtin > >>> CFLAGS+= -I${SRCTOP}/lib/csu/common > >>> .if exists(${.CURDIR}/${MACHINE_ARCH}) > >>> RTLD_ARCH= ${MACHINE_ARCH} > >>> @@ -22,7 +22,6 @@ RTLD_ARCH= ${MACHINE_CPUARCH} > >>> .endif > >>> CFLAGS+= -I${.CURDIR}/${RTLD_ARCH} -I${.CURDIR} > >>> .if ${MACHINE_ARCH} == "powerpc64" > >>> -CFLAGS+= -mcall-aixdesc > >> I wanted to set -ffreestanding for rtld compilation, but considered > >> it only > >> a minor issue. Could you test this instead of -fno-builtin, please ? > >> > > > > Sure, I'll test it today. > > -Nathan > > > > > > -ffreestanding works just as well for this as -fno-builtin. Would you > like to make the change? Please go ahead. From owner-svn-src-all@freebsd.org Thu Dec 3 17:21:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 952FEA3FD2B; Thu, 3 Dec 2015 17:21:11 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 707211AEA; Thu, 3 Dec 2015 17:21:11 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3HLAoW075170; Thu, 3 Dec 2015 17:21:10 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3HLAXe075169; Thu, 3 Dec 2015 17:21:10 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201512031721.tB3HLAXe075169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 3 Dec 2015 17:21:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291704 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 17:21:11 -0000 Author: cem Date: Thu Dec 3 17:21:10 2015 New Revision: 291704 URL: https://svnweb.freebsd.org/changeset/base/291704 Log: Pull vm_object_scan_all_shadowed out of vm_object_backing_scan These two functions were largely unrelated, they just used the same same loop logic to walk through a backing object's memq. Pull out the all_shadowed test as its own function and eliminate OBSC_TEST_ALL_SHADOWED. Rename vm_object_backing_scan to vm_object_collapse_scan. No functional change. Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4335 Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Thu Dec 3 16:54:45 2015 (r291703) +++ head/sys/vm/vm_object.c Thu Dec 3 17:21:10 2015 (r291704) @@ -1419,12 +1419,11 @@ retry: VM_OBJECT_WLOCK(new_object); } -#define OBSC_TEST_ALL_SHADOWED 0x0001 #define OBSC_COLLAPSE_NOWAIT 0x0002 #define OBSC_COLLAPSE_WAIT 0x0004 static vm_page_t -vm_object_backing_scan_wait(vm_object_t object, vm_page_t p, vm_page_t next, +vm_object_collapse_scan_wait(vm_object_t object, vm_page_t p, vm_page_t next, int op) { vm_object_t backing_object; @@ -1452,192 +1451,185 @@ vm_object_backing_scan_wait(vm_object_t } static bool -vm_object_backing_scan(vm_object_t object, int op) +vm_object_scan_all_shadowed(vm_object_t object) { vm_object_t backing_object; - vm_page_t next, p, pp; + vm_page_t p, pp; vm_pindex_t backing_offset_index, new_pindex; VM_OBJECT_ASSERT_WLOCKED(object); VM_OBJECT_ASSERT_WLOCKED(object->backing_object); backing_object = object->backing_object; - backing_offset_index = OFF_TO_IDX(object->backing_object_offset); /* - * Initial conditions + * Initial conditions: + * + * We do not want to have to test for the existence of cache or swap + * pages in the backing object. XXX but with the new swapper this + * would be pretty easy to do. */ - if (op & OBSC_TEST_ALL_SHADOWED) { + if (backing_object->type != OBJT_DEFAULT) + return (false); + + backing_offset_index = OFF_TO_IDX(object->backing_object_offset); + + for (p = TAILQ_FIRST(&backing_object->memq); p != NULL; + p = TAILQ_NEXT(p, listq)) { + new_pindex = p->pindex - backing_offset_index; + + /* + * Ignore pages outside the parent object's range and outside + * the parent object's mapping of the backing object. + */ + if (p->pindex < backing_offset_index || + new_pindex >= object->size) + continue; + /* - * We do not want to have to test for the existence of cache - * or swap pages in the backing object. XXX but with the - * new swapper this would be pretty easy to do. + * See if the parent has the page or if the parent's object + * pager has the page. If the parent has the page but the page + * is not valid, the parent's object pager must have the page. * - * XXX what about anonymous MAP_SHARED memory that hasn't - * been ZFOD faulted yet? If we do not test for this, the - * shadow test may succeed! XXX + * If this fails, the parent does not completely shadow the + * object and we might as well give up now. */ - if (backing_object->type != OBJT_DEFAULT) { + pp = vm_page_lookup(object, new_pindex); + if ((pp == NULL || pp->valid == 0) && + !vm_pager_has_page(object, new_pindex, NULL, NULL)) return (false); - } } - if (op & OBSC_COLLAPSE_WAIT) { + return (true); +} + +static bool +vm_object_collapse_scan(vm_object_t object, int op) +{ + vm_object_t backing_object; + vm_page_t next, p, pp; + vm_pindex_t backing_offset_index, new_pindex; + + VM_OBJECT_ASSERT_WLOCKED(object); + VM_OBJECT_ASSERT_WLOCKED(object->backing_object); + + backing_object = object->backing_object; + backing_offset_index = OFF_TO_IDX(object->backing_object_offset); + + /* + * Initial conditions + */ + if ((op & OBSC_COLLAPSE_WAIT) != 0) vm_object_set_flag(backing_object, OBJ_DEAD); - } /* * Our scan */ - p = TAILQ_FIRST(&backing_object->memq); - while (p) { + for (p = TAILQ_FIRST(&backing_object->memq); p != NULL; p = next) { next = TAILQ_NEXT(p, listq); new_pindex = p->pindex - backing_offset_index; - if (op & OBSC_TEST_ALL_SHADOWED) { - /* - * Ignore pages outside the parent object's range - * and outside the parent object's mapping of the - * backing object. - * - * Note that we do not busy the backing object's - * page. - */ - if (p->pindex < backing_offset_index || - new_pindex >= object->size) { - p = next; - continue; - } - - /* - * See if the parent has the page or if the parent's - * object pager has the page. If the parent has the - * page but the page is not valid, the parent's - * object pager must have the page. - * - * If this fails, the parent does not completely shadow - * the object and we might as well give up now. - */ - - pp = vm_page_lookup(object, new_pindex); - if ((pp == NULL || pp->valid == 0) && - !vm_pager_has_page(object, new_pindex, NULL, NULL)) - return (false); - } /* * Check for busy page */ - if (op & (OBSC_COLLAPSE_WAIT | OBSC_COLLAPSE_NOWAIT)) { - if (vm_page_busied(p)) { - p = vm_object_backing_scan_wait(object, p, - next, op); - continue; - } - - KASSERT(p->object == backing_object, - ("vm_object_backing_scan: object mismatch")); - - if (p->pindex < backing_offset_index || - new_pindex >= object->size) { - if (backing_object->type == OBJT_SWAP) - swap_pager_freespace(backing_object, - p->pindex, 1); + if (vm_page_busied(p)) { + next = vm_object_collapse_scan_wait(object, p, next, op); + continue; + } - /* - * Page is out of the parent object's range, we - * can simply destroy it. - */ - vm_page_lock(p); - KASSERT(!pmap_page_is_mapped(p), - ("freeing mapped page %p", p)); - if (p->wire_count == 0) - vm_page_free(p); - else - vm_page_remove(p); - vm_page_unlock(p); - p = next; - continue; - } + KASSERT(p->object == backing_object, + ("vm_object_collapse_scan: object mismatch")); - pp = vm_page_lookup(object, new_pindex); - if (pp != NULL && vm_page_busied(pp)) { - /* - * The page in the parent is busy and - * possibly not (yet) valid. Until - * its state is finalized by the busy - * bit owner, we can't tell whether it - * shadows the original page. - * Therefore, we must either skip it - * and the original (backing_object) - * page or wait for its state to be - * finalized. - * - * This is due to a race with vm_fault() - * where we must unbusy the original - * (backing_obj) page before we can - * (re)lock the parent. Hence we can - * get here. - */ - p = vm_object_backing_scan_wait(object, pp, - next, op); - continue; - } - - KASSERT(pp == NULL || pp->valid != 0, - ("unbusy invalid page %p", pp)); + if (p->pindex < backing_offset_index || + new_pindex >= object->size) { + if (backing_object->type == OBJT_SWAP) + swap_pager_freespace(backing_object, p->pindex, + 1); - if (pp != NULL || vm_pager_has_page(object, - new_pindex, NULL, NULL)) { - /* - * The page already exists in the - * parent OR swap exists for this - * location in the parent. Leave the - * parent's page alone. Destroy the - * original page from the backing - * object. - */ - if (backing_object->type == OBJT_SWAP) - swap_pager_freespace(backing_object, - p->pindex, 1); - vm_page_lock(p); - KASSERT(!pmap_page_is_mapped(p), - ("freeing mapped page %p", p)); - if (p->wire_count == 0) - vm_page_free(p); - else - vm_page_remove(p); - vm_page_unlock(p); - p = next; - continue; - } + /* + * Page is out of the parent object's range, we can + * simply destroy it. + */ + vm_page_lock(p); + KASSERT(!pmap_page_is_mapped(p), + ("freeing mapped page %p", p)); + if (p->wire_count == 0) + vm_page_free(p); + else + vm_page_remove(p); + vm_page_unlock(p); + continue; + } + pp = vm_page_lookup(object, new_pindex); + if (pp != NULL && vm_page_busied(pp)) { /* - * Page does not exist in parent, rename the - * page from the backing object to the main object. + * The page in the parent is busy and possibly not + * (yet) valid. Until its state is finalized by the + * busy bit owner, we can't tell whether it shadows the + * original page. Therefore, we must either skip it + * and the original (backing_object) page or wait for + * its state to be finalized. * - * If the page was mapped to a process, it can remain - * mapped through the rename. - * vm_page_rename() will handle dirty and cache. + * This is due to a race with vm_fault() where we must + * unbusy the original (backing_obj) page before we can + * (re)lock the parent. Hence we can get here. */ - if (vm_page_rename(p, object, new_pindex)) { - p = vm_object_backing_scan_wait(object, NULL, - next, op); - continue; - } + next = vm_object_collapse_scan_wait(object, pp, next, + op); + continue; + } - /* Use the old pindex to free the right page. */ - if (backing_object->type == OBJT_SWAP) - swap_pager_freespace(backing_object, - new_pindex + backing_offset_index, 1); + KASSERT(pp == NULL || pp->valid != 0, + ("unbusy invalid page %p", pp)); -#if VM_NRESERVLEVEL > 0 + if (pp != NULL || vm_pager_has_page(object, new_pindex, NULL, + NULL)) { /* - * Rename the reservation. + * The page already exists in the parent OR swap exists + * for this location in the parent. Leave the parent's + * page alone. Destroy the original page from the + * backing object. */ - vm_reserv_rename(p, object, backing_object, - backing_offset_index); -#endif + if (backing_object->type == OBJT_SWAP) + swap_pager_freespace(backing_object, p->pindex, + 1); + vm_page_lock(p); + KASSERT(!pmap_page_is_mapped(p), + ("freeing mapped page %p", p)); + if (p->wire_count == 0) + vm_page_free(p); + else + vm_page_remove(p); + vm_page_unlock(p); + continue; + } + + /* + * Page does not exist in parent, rename the page from the + * backing object to the main object. + * + * If the page was mapped to a process, it can remain mapped + * through the rename. vm_page_rename() will handle dirty and + * cache. + */ + if (vm_page_rename(p, object, new_pindex)) { + next = vm_object_collapse_scan_wait(object, NULL, next, + op); + continue; } - p = next; + + /* Use the old pindex to free the right page. */ + if (backing_object->type == OBJT_SWAP) + swap_pager_freespace(backing_object, + new_pindex + backing_offset_index, 1); + +#if VM_NRESERVLEVEL > 0 + /* + * Rename the reservation. + */ + vm_reserv_rename(p, object, backing_object, + backing_offset_index); +#endif } return (true); } @@ -1659,7 +1651,7 @@ vm_object_qcollapse(vm_object_t object) if (backing_object->ref_count != 1) return; - vm_object_backing_scan(object, OBSC_COLLAPSE_NOWAIT); + vm_object_collapse_scan(object, OBSC_COLLAPSE_NOWAIT); } /* @@ -1717,15 +1709,15 @@ vm_object_collapse(vm_object_t object) * all the resident pages in the entire backing object. * * This is ignoring pager-backed pages such as swap pages. - * vm_object_backing_scan fails the shadowing test in this + * vm_object_collapse_scan fails the shadowing test in this * case. */ if (backing_object->ref_count == 1) { /* * If there is exactly one reference to the backing - * object, we can collapse it into the parent. + * object, we can collapse it into the parent. */ - vm_object_backing_scan(object, OBSC_COLLAPSE_WAIT); + vm_object_collapse_scan(object, OBSC_COLLAPSE_WAIT); #if VM_NRESERVLEVEL > 0 /* @@ -1806,8 +1798,7 @@ vm_object_collapse(vm_object_t object) * there is nothing we can do so we give up. */ if (object->resident_page_count != object->size && - !vm_object_backing_scan(object, - OBSC_TEST_ALL_SHADOWED)) { + !vm_object_scan_all_shadowed(object)) { VM_OBJECT_WUNLOCK(backing_object); break; } From owner-svn-src-all@freebsd.org Thu Dec 3 17:22:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45872A3FDA7; Thu, 3 Dec 2015 17:22:47 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 116A51F0D; Thu, 3 Dec 2015 17:22:46 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3HMk6w075277; Thu, 3 Dec 2015 17:22:46 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3HMk1g075276; Thu, 3 Dec 2015 17:22:46 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201512031722.tB3HMk1g075276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 3 Dec 2015 17:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291705 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 17:22:47 -0000 Author: cem Date: Thu Dec 3 17:22:45 2015 New Revision: 291705 URL: https://svnweb.freebsd.org/changeset/base/291705 Log: if_ntb: Log error *before* zeroing relevant variables Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Thu Dec 3 17:21:10 2015 (r291704) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Thu Dec 3 17:22:45 2015 (r291705) @@ -1358,10 +1358,10 @@ ntb_set_mw(struct ntb_transport_ctx *nt, mw->virt_addr = contigmalloc(mw->buff_size, M_NTB_IF, M_ZERO, 0, mw->addr_limit, mw->xlat_align, 0); if (mw->virt_addr == NULL) { + ntb_printf(0, "Unable to allocate MW buffer of size %zu/%zu\n", + mw->buff_size, mw->xlat_size); mw->xlat_size = 0; mw->buff_size = 0; - printf("ntb: Unable to allocate MW buffer of size %zu\n", - mw->xlat_size); return (ENOMEM); } /* TODO: replace with bus_space_* functions */ From owner-svn-src-all@freebsd.org Thu Dec 3 17:22:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0DD0A3FDDB; Thu, 3 Dec 2015 17:22:56 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B037D106D; Thu, 3 Dec 2015 17:22:56 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3HMtBu075327; Thu, 3 Dec 2015 17:22:55 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3HMtCP075326; Thu, 3 Dec 2015 17:22:55 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201512031722.tB3HMtCP075326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 3 Dec 2015 17:22:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291706 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 17:22:57 -0000 Author: cem Date: Thu Dec 3 17:22:55 2015 New Revision: 291706 URL: https://svnweb.freebsd.org/changeset/base/291706 Log: if_ntb: Don't roundup MW size to full BAR size unnecessarily Note that the MW allocation still must be BAR *aligned*. So, this only loosens the constraints on MW allocation slightly. BAR-aligned does not play well with large (GB+) BAR sizes. Going forward, if anyone cares about if_ntb on very large BARs, I suggest they add functionality to allocate a smaller window than the BAR size, and set the BAR range to cover a window much larger than the allocated window. This will require negotiating a window offset and limit for protocol traffic. None of this is implemented in this revision. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Thu Dec 3 17:22:45 2015 (r291705) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Thu Dec 3 17:22:55 2015 (r291706) @@ -1342,7 +1342,7 @@ ntb_set_mw(struct ntb_transport_ctx *nt, return (EINVAL); xlat_size = roundup(size, mw->xlat_align_size); - buff_size = roundup(size, mw->xlat_align); + buff_size = xlat_size; /* No need to re-setup */ if (mw->xlat_size == xlat_size) From owner-svn-src-all@freebsd.org Thu Dec 3 17:23:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88ADBA3FE08; Thu, 3 Dec 2015 17:23:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F152710AB; Thu, 3 Dec 2015 17:22:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3HMxYI075379; Thu, 3 Dec 2015 17:22:59 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3HMwmK075374; Thu, 3 Dec 2015 17:22:58 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201512031722.tB3HMwmK075374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 3 Dec 2015 17:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r291707 - in vendor-crypto/openssl/dist: . apps crypto crypto/aes/asm crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/buffer crypto/cms crypto/comp crypto/conf crypto/dh crypto/ds... X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 17:23:00 -0000 Author: jkim Date: Thu Dec 3 17:22:58 2015 New Revision: 291707 URL: https://svnweb.freebsd.org/changeset/base/291707 Log: Import OpenSSL 1.0.2e. Added: vendor-crypto/openssl/dist/CONTRIBUTING vendor-crypto/openssl/dist/appveyor.yml vendor-crypto/openssl/dist/doc/dir-locals.example.el vendor-crypto/openssl/dist/doc/openssl-c-indent.el vendor-crypto/openssl/dist/doc/ssl/SSL_check_chain.pod vendor-crypto/openssl/dist/ssl/clienthellotest.c (contents, props changed) vendor-crypto/openssl/dist/util/toutf8.sh (contents, props changed) Deleted: vendor-crypto/openssl/dist/doc/openssl_button.gif vendor-crypto/openssl/dist/doc/openssl_button.html vendor-crypto/openssl/dist/util/pod2mantest Modified: vendor-crypto/openssl/dist/CHANGES vendor-crypto/openssl/dist/Configure vendor-crypto/openssl/dist/FAQ vendor-crypto/openssl/dist/FREEBSD-upgrade vendor-crypto/openssl/dist/Makefile vendor-crypto/openssl/dist/Makefile.org vendor-crypto/openssl/dist/NEWS vendor-crypto/openssl/dist/README vendor-crypto/openssl/dist/apps/Makefile vendor-crypto/openssl/dist/apps/app_rand.c vendor-crypto/openssl/dist/apps/apps.c vendor-crypto/openssl/dist/apps/asn1pars.c vendor-crypto/openssl/dist/apps/ca.c vendor-crypto/openssl/dist/apps/ecparam.c vendor-crypto/openssl/dist/apps/engine.c vendor-crypto/openssl/dist/apps/ocsp.c vendor-crypto/openssl/dist/apps/pkcs12.c vendor-crypto/openssl/dist/apps/s_cb.c vendor-crypto/openssl/dist/apps/s_client.c vendor-crypto/openssl/dist/apps/s_server.c vendor-crypto/openssl/dist/crypto/aes/asm/aes-586.pl vendor-crypto/openssl/dist/crypto/aes/asm/aesni-mb-x86_64.pl vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha1-x86_64.pl vendor-crypto/openssl/dist/crypto/aes/asm/aesni-sha256-x86_64.pl vendor-crypto/openssl/dist/crypto/aes/asm/aesni-x86.pl vendor-crypto/openssl/dist/crypto/aes/asm/vpaes-ppc.pl vendor-crypto/openssl/dist/crypto/asn1/asn1_par.c vendor-crypto/openssl/dist/crypto/asn1/d2i_pr.c vendor-crypto/openssl/dist/crypto/asn1/tasn_dec.c vendor-crypto/openssl/dist/crypto/asn1/x_bignum.c vendor-crypto/openssl/dist/crypto/asn1/x_pubkey.c vendor-crypto/openssl/dist/crypto/asn1/x_x509.c vendor-crypto/openssl/dist/crypto/asn1/x_x509a.c vendor-crypto/openssl/dist/crypto/bio/b_dump.c vendor-crypto/openssl/dist/crypto/bio/bss_file.c vendor-crypto/openssl/dist/crypto/bn/asm/armv4-gf2m.pl vendor-crypto/openssl/dist/crypto/bn/asm/ia64.S vendor-crypto/openssl/dist/crypto/bn/asm/ppc64-mont.pl vendor-crypto/openssl/dist/crypto/bn/asm/rsaz-x86_64.pl vendor-crypto/openssl/dist/crypto/bn/asm/s390x-gf2m.pl vendor-crypto/openssl/dist/crypto/bn/asm/s390x.S vendor-crypto/openssl/dist/crypto/bn/asm/x86-gf2m.pl vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gcc.c vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-gf2m.pl vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-mont.pl vendor-crypto/openssl/dist/crypto/bn/asm/x86_64-mont5.pl vendor-crypto/openssl/dist/crypto/bn/bn_exp.c vendor-crypto/openssl/dist/crypto/bn/bn_gcd.c vendor-crypto/openssl/dist/crypto/bn/bn_gf2m.c vendor-crypto/openssl/dist/crypto/bn/bn_mont.c vendor-crypto/openssl/dist/crypto/bn/bn_recp.c vendor-crypto/openssl/dist/crypto/bn/bn_x931p.c vendor-crypto/openssl/dist/crypto/bn/bntest.c vendor-crypto/openssl/dist/crypto/bn/rsaz_exp.h vendor-crypto/openssl/dist/crypto/buffer/buf_str.c vendor-crypto/openssl/dist/crypto/buffer/buffer.h vendor-crypto/openssl/dist/crypto/cms/cms_enc.c vendor-crypto/openssl/dist/crypto/cms/cms_pwri.c vendor-crypto/openssl/dist/crypto/cms/cms_sd.c vendor-crypto/openssl/dist/crypto/cms/cms_smime.c vendor-crypto/openssl/dist/crypto/comp/c_zlib.c vendor-crypto/openssl/dist/crypto/conf/conf_def.c vendor-crypto/openssl/dist/crypto/conf/conf_sap.c vendor-crypto/openssl/dist/crypto/cryptlib.c vendor-crypto/openssl/dist/crypto/dh/dh.h vendor-crypto/openssl/dist/crypto/dh/dhtest.c vendor-crypto/openssl/dist/crypto/dsa/dsa_ameth.c vendor-crypto/openssl/dist/crypto/dsa/dsa_gen.c vendor-crypto/openssl/dist/crypto/ec/Makefile vendor-crypto/openssl/dist/crypto/ec/asm/ecp_nistz256-x86_64.pl vendor-crypto/openssl/dist/crypto/ec/ec.h vendor-crypto/openssl/dist/crypto/ec/ec_asn1.c vendor-crypto/openssl/dist/crypto/ec/ec_key.c vendor-crypto/openssl/dist/crypto/ecdsa/ecdsa.h vendor-crypto/openssl/dist/crypto/ecdsa/ecs_lib.c vendor-crypto/openssl/dist/crypto/engine/eng_cryptodev.c vendor-crypto/openssl/dist/crypto/engine/eng_list.c vendor-crypto/openssl/dist/crypto/evp/e_aes_cbc_hmac_sha256.c vendor-crypto/openssl/dist/crypto/evp/e_des3.c vendor-crypto/openssl/dist/crypto/evp/encode.c vendor-crypto/openssl/dist/crypto/evp/evp_key.c vendor-crypto/openssl/dist/crypto/evp/evp_lib.c vendor-crypto/openssl/dist/crypto/evp/evp_pbe.c vendor-crypto/openssl/dist/crypto/evp/p_lib.c vendor-crypto/openssl/dist/crypto/evp/pmeth_gn.c vendor-crypto/openssl/dist/crypto/hmac/hm_ameth.c vendor-crypto/openssl/dist/crypto/jpake/jpake.c vendor-crypto/openssl/dist/crypto/mem_clr.c vendor-crypto/openssl/dist/crypto/modes/asm/aesni-gcm-x86_64.pl vendor-crypto/openssl/dist/crypto/modes/asm/ghash-armv4.pl vendor-crypto/openssl/dist/crypto/modes/asm/ghash-sparcv9.pl vendor-crypto/openssl/dist/crypto/modes/asm/ghash-x86.pl vendor-crypto/openssl/dist/crypto/modes/asm/ghash-x86_64.pl vendor-crypto/openssl/dist/crypto/modes/asm/ghashp8-ppc.pl vendor-crypto/openssl/dist/crypto/modes/asm/ghashv8-armx.pl vendor-crypto/openssl/dist/crypto/modes/wrap128.c vendor-crypto/openssl/dist/crypto/ocsp/ocsp_lib.c vendor-crypto/openssl/dist/crypto/ocsp/ocsp_prn.c vendor-crypto/openssl/dist/crypto/opensslconf.h vendor-crypto/openssl/dist/crypto/opensslconf.h.in vendor-crypto/openssl/dist/crypto/opensslv.h vendor-crypto/openssl/dist/crypto/pem/pem_info.c vendor-crypto/openssl/dist/crypto/pem/pvkfmt.c vendor-crypto/openssl/dist/crypto/perlasm/ppc-xlate.pl vendor-crypto/openssl/dist/crypto/pkcs12/p12_add.c vendor-crypto/openssl/dist/crypto/pkcs12/p12_crpt.c vendor-crypto/openssl/dist/crypto/pkcs12/p12_mutl.c vendor-crypto/openssl/dist/crypto/pkcs7/pk7_doit.c vendor-crypto/openssl/dist/crypto/pkcs7/pk7_smime.c vendor-crypto/openssl/dist/crypto/ppccap.c vendor-crypto/openssl/dist/crypto/rc4/asm/rc4-x86_64.pl vendor-crypto/openssl/dist/crypto/rsa/rsa_ameth.c vendor-crypto/openssl/dist/crypto/rsa/rsa_gen.c vendor-crypto/openssl/dist/crypto/rsa/rsa_sign.c vendor-crypto/openssl/dist/crypto/rsa/rsa_test.c vendor-crypto/openssl/dist/crypto/sha/asm/sha1-586.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha1-mb-x86_64.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha1-x86_64.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha256-586.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha256-mb-x86_64.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-586.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-parisc.pl vendor-crypto/openssl/dist/crypto/sha/asm/sha512-x86_64.pl vendor-crypto/openssl/dist/crypto/sparccpuid.S vendor-crypto/openssl/dist/crypto/sparcv9cap.c vendor-crypto/openssl/dist/crypto/srp/srp_vfy.c vendor-crypto/openssl/dist/crypto/ts/ts_rsp_verify.c vendor-crypto/openssl/dist/crypto/whrlpool/asm/wp-mmx.pl vendor-crypto/openssl/dist/crypto/x509/x509_lu.c vendor-crypto/openssl/dist/crypto/x509/x509_vfy.c vendor-crypto/openssl/dist/crypto/x509/x509_vpm.c vendor-crypto/openssl/dist/crypto/x509v3/v3_cpols.c vendor-crypto/openssl/dist/crypto/x509v3/v3_ncons.c vendor-crypto/openssl/dist/crypto/x509v3/v3_pci.c vendor-crypto/openssl/dist/crypto/x509v3/v3_pcia.c vendor-crypto/openssl/dist/crypto/x509v3/v3_purp.c vendor-crypto/openssl/dist/crypto/x509v3/v3_scts.c vendor-crypto/openssl/dist/crypto/x509v3/v3_utl.c vendor-crypto/openssl/dist/doc/HOWTO/keys.txt vendor-crypto/openssl/dist/doc/README vendor-crypto/openssl/dist/doc/apps/dgst.pod vendor-crypto/openssl/dist/doc/apps/genrsa.pod vendor-crypto/openssl/dist/doc/apps/pkcs12.pod vendor-crypto/openssl/dist/doc/apps/req.pod vendor-crypto/openssl/dist/doc/apps/x509.pod vendor-crypto/openssl/dist/doc/crypto/BIO_read.pod vendor-crypto/openssl/dist/doc/crypto/BN_rand.pod vendor-crypto/openssl/dist/doc/crypto/DSA_generate_parameters.pod vendor-crypto/openssl/dist/doc/crypto/EC_GROUP_copy.pod vendor-crypto/openssl/dist/doc/crypto/EC_KEY_new.pod vendor-crypto/openssl/dist/doc/crypto/EVP_DigestVerifyInit.pod vendor-crypto/openssl/dist/doc/crypto/EVP_EncryptInit.pod vendor-crypto/openssl/dist/doc/crypto/EVP_SealInit.pod vendor-crypto/openssl/dist/doc/crypto/EVP_SignInit.pod vendor-crypto/openssl/dist/doc/crypto/X509_check_host.pod vendor-crypto/openssl/dist/doc/crypto/buffer.pod vendor-crypto/openssl/dist/doc/crypto/d2i_X509_NAME.pod vendor-crypto/openssl/dist/doc/crypto/engine.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_add_extra_chain_cert.pod vendor-crypto/openssl/dist/doc/ssl/SSL_CTX_get0_param.pod vendor-crypto/openssl/dist/e_os.h vendor-crypto/openssl/dist/engines/e_chil.c vendor-crypto/openssl/dist/ssl/Makefile vendor-crypto/openssl/dist/ssl/bio_ssl.c vendor-crypto/openssl/dist/ssl/d1_both.c vendor-crypto/openssl/dist/ssl/d1_clnt.c vendor-crypto/openssl/dist/ssl/d1_meth.c vendor-crypto/openssl/dist/ssl/d1_srvr.c vendor-crypto/openssl/dist/ssl/s23_clnt.c vendor-crypto/openssl/dist/ssl/s3_both.c vendor-crypto/openssl/dist/ssl/s3_cbc.c vendor-crypto/openssl/dist/ssl/s3_clnt.c vendor-crypto/openssl/dist/ssl/s3_enc.c vendor-crypto/openssl/dist/ssl/s3_lib.c vendor-crypto/openssl/dist/ssl/s3_pkt.c vendor-crypto/openssl/dist/ssl/s3_srvr.c vendor-crypto/openssl/dist/ssl/ssl.h vendor-crypto/openssl/dist/ssl/ssl_asn1.c vendor-crypto/openssl/dist/ssl/ssl_cert.c vendor-crypto/openssl/dist/ssl/ssl_ciph.c vendor-crypto/openssl/dist/ssl/ssl_err.c vendor-crypto/openssl/dist/ssl/ssl_lib.c vendor-crypto/openssl/dist/ssl/ssl_locl.h vendor-crypto/openssl/dist/ssl/ssl_rsa.c vendor-crypto/openssl/dist/ssl/ssl_sess.c vendor-crypto/openssl/dist/ssl/ssltest.c vendor-crypto/openssl/dist/ssl/t1_enc.c vendor-crypto/openssl/dist/ssl/t1_lib.c vendor-crypto/openssl/dist/ssl/tls1.h vendor-crypto/openssl/dist/util/domd vendor-crypto/openssl/dist/util/indent.pro vendor-crypto/openssl/dist/util/mk1mf.pl vendor-crypto/openssl/dist/util/mkrc.pl vendor-crypto/openssl/dist/util/mkstack.pl vendor-crypto/openssl/dist/util/pl/VC-32.pl vendor-crypto/openssl/dist/util/selftest.pl Modified: vendor-crypto/openssl/dist/CHANGES ============================================================================== --- vendor-crypto/openssl/dist/CHANGES Thu Dec 3 17:22:55 2015 (r291706) +++ vendor-crypto/openssl/dist/CHANGES Thu Dec 3 17:22:58 2015 (r291707) @@ -2,6 +2,64 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2d and 1.0.2e [3 Dec 2015] + + *) BN_mod_exp may produce incorrect results on x86_64 + + There is a carry propagating bug in the x86_64 Montgomery squaring + procedure. No EC algorithms are affected. Analysis suggests that attacks + against RSA and DSA as a result of this defect would be very difficult to + perform and are not believed likely. Attacks against DH are considered just + feasible (although very difficult) because most of the work necessary to + deduce information about a private key may be performed offline. The amount + of resources required for such an attack would be very significant and + likely only accessible to a limited number of attackers. An attacker would + additionally need online access to an unpatched system using the target + private key in a scenario with persistent DH parameters and a private + key that is shared between multiple clients. For example this can occur by + default in OpenSSL DHE based SSL/TLS ciphersuites. + + This issue was reported to OpenSSL by Hanno Böck. + (CVE-2015-3193) + [Andy Polyakov] + + *) Certificate verify crash with missing PSS parameter + + The signature verification routines will crash with a NULL pointer + dereference if presented with an ASN.1 signature using the RSA PSS + algorithm and absent mask generation function parameter. Since these + routines are used to verify certificate signature algorithms this can be + used to crash any certificate verification operation and exploited in a + DoS attack. Any application which performs certificate verification is + vulnerable including OpenSSL clients and servers which enable client + authentication. + + This issue was reported to OpenSSL by Loïc Jonas Etienne (Qnective AG). + (CVE-2015-3194) + [Stephen Henson] + + *) X509_ATTRIBUTE memory leak + + When presented with a malformed X509_ATTRIBUTE structure OpenSSL will leak + memory. This structure is used by the PKCS#7 and CMS routines so any + application which reads PKCS#7 or CMS data from untrusted sources is + affected. SSL/TLS is not affected. + + This issue was reported to OpenSSL by Adam Langley (Google/BoringSSL) using + libFuzzer. + (CVE-2015-3195) + [Stephen Henson] + + *) Rewrite EVP_DecodeUpdate (base64 decoding) to fix several bugs. + This changes the decoding behaviour for some invalid messages, + though the change is mostly in the more lenient direction, and + legacy behaviour is preserved as much as possible. + [Emilia Käsper] + + *) In DSA_generate_parameters_ex, if the provided seed is too short, + return an error + [Rich Salz and Ismo Puustinen ] + Changes between 1.0.2c and 1.0.2d [9 Jul 2015] *) Alternate chains certificate forgery @@ -15,8 +73,18 @@ This issue was reported to OpenSSL by Adam Langley/David Benjamin (Google/BoringSSL). + (CVE-2015-1793) [Matt Caswell] + *) Race condition handling PSK identify hint + + If PSK identity hints are received by a multi-threaded client then + the values are wrongly updated in the parent SSL_CTX structure. This can + result in a race condition potentially leading to a double free of the + identify hint data. + (CVE-2015-3196) + [Stephen Henson] + Changes between 1.0.2b and 1.0.2c [12 Jun 2015] *) Fix HMAC ABI incompatibility. The previous version introduced an ABI @@ -55,9 +123,9 @@ callbacks. This issue was reported to OpenSSL by Robert Swiecki (Google), and - independently by Hanno Böck. + independently by Hanno Böck. (CVE-2015-1789) - [Emilia Käsper] + [Emilia Käsper] *) PKCS7 crash with missing EnvelopedContent @@ -71,7 +139,7 @@ This issue was reported to OpenSSL by Michal Zalewski (Google). (CVE-2015-1790) - [Emilia Käsper] + [Emilia Käsper] *) CMS verify infinite loop with unknown hash function @@ -201,7 +269,7 @@ This issue was reported to OpenSSL by Michal Zalewski (Google). (CVE-2015-0289) - [Emilia Käsper] + [Emilia Käsper] *) DoS via reachable assert in SSLv2 servers fix @@ -209,10 +277,10 @@ servers that both support SSLv2 and enable export cipher suites by sending a specially crafted SSLv2 CLIENT-MASTER-KEY message. - This issue was discovered by Sean Burford (Google) and Emilia Käsper + This issue was discovered by Sean Burford (Google) and Emilia Käsper (OpenSSL development team). (CVE-2015-0293) - [Emilia Käsper] + [Emilia Käsper] *) Empty CKE with client auth and DHE fix @@ -272,6 +340,10 @@ Changes between 1.0.1l and 1.0.2 [22 Jan 2015] + *) Change RSA and DH/DSA key generation apps to generate 2048-bit + keys by default. + [Kurt Roeckx] + *) Facilitate "universal" ARM builds targeting range of ARM ISAs, e.g. ARMv5 through ARMv8, as opposite to "locking" it to single one. So far those who have to target multiple plaforms would compromise @@ -717,12 +789,12 @@ version does not match the session's version. Resuming with a different version, while not strictly forbidden by the RFC, is of questionable sanity and breaks all known clients. - [David Benjamin, Emilia Käsper] + [David Benjamin, Emilia Käsper] *) Tighten handling of the ChangeCipherSpec (CCS) message: reject early CCS messages during renegotiation. (Note that because renegotiation is encrypted, this early CCS was not exploitable.) - [Emilia Käsper] + [Emilia Käsper] *) Tighten client-side session ticket handling during renegotiation: ensure that the client only accepts a session ticket if the server sends @@ -733,7 +805,7 @@ Similarly, ensure that the client requires a session ticket if one was advertised in the ServerHello. Previously, a TLS client would ignore a missing NewSessionTicket message. - [Emilia Käsper] + [Emilia Käsper] Changes between 1.0.1i and 1.0.1j [15 Oct 2014] @@ -813,10 +885,10 @@ with a null pointer dereference (read) by specifying an anonymous (EC)DH ciphersuite and sending carefully crafted handshake messages. - Thanks to Felix Gröbert (Google) for discovering and researching this + Thanks to Felix Gröbert (Google) for discovering and researching this issue. (CVE-2014-3510) - [Emilia Käsper] + [Emilia Käsper] *) By sending carefully crafted DTLS packets an attacker could cause openssl to leak memory. This can be exploited through a Denial of Service attack. @@ -853,7 +925,7 @@ properly negotiated with the client. This can be exploited through a Denial of Service attack. - Thanks to Joonas Kuorilehto and Riku Hietamäki (Codenomicon) for + Thanks to Joonas Kuorilehto and Riku Hietamäki (Codenomicon) for discovering and researching this issue. (CVE-2014-5139) [Steve Henson] @@ -865,7 +937,7 @@ Thanks to Ivan Fratric (Google) for discovering this issue. (CVE-2014-3508) - [Emilia Käsper, and Steve Henson] + [Emilia Käsper, and Steve Henson] *) Fix ec_GFp_simple_points_make_affine (thus, EC_POINTs_mul etc.) for corner cases. (Certain input points at infinity could lead to @@ -895,22 +967,22 @@ client or server. This is potentially exploitable to run arbitrary code on a vulnerable client or server. - Thanks to Jüri Aedla for reporting this issue. (CVE-2014-0195) - [Jüri Aedla, Steve Henson] + Thanks to Jüri Aedla for reporting this issue. (CVE-2014-0195) + [Jüri Aedla, Steve Henson] *) Fix bug in TLS code where clients enable anonymous ECDH ciphersuites are subject to a denial of service attack. - Thanks to Felix Gröbert and Ivan Fratric at Google for discovering + Thanks to Felix Gröbert and Ivan Fratric at Google for discovering this issue. (CVE-2014-3470) - [Felix Gröbert, Ivan Fratric, Steve Henson] + [Felix Gröbert, Ivan Fratric, Steve Henson] *) Harmonize version and its documentation. -f flag is used to display compilation flags. [mancha ] *) Fix eckey_priv_encode so it immediately returns an error upon a failure - in i2d_ECPrivateKey. + in i2d_ECPrivateKey. Thanks to Ted Unangst for feedback on this issue. [mancha ] *) Fix some double frees. These are not thought to be exploitable. @@ -982,9 +1054,9 @@ Thanks go to Nadhem Alfardan and Kenny Paterson of the Information Security Group at Royal Holloway, University of London (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and - Emilia Käsper for the initial patch. + Emilia Käsper for the initial patch. (CVE-2013-0169) - [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] *) Fix flaw in AESNI handling of TLS 1.2 and 1.1 records for CBC mode ciphersuites which can be exploited in a denial of service attack. @@ -1159,7 +1231,7 @@ EC_GROUP_new_by_curve_name() will automatically use these (while EC_GROUP_new_curve_GFp() currently prefers the more flexible implementations). - [Emilia Käsper, Adam Langley, Bodo Moeller (Google)] + [Emilia Käsper, Adam Langley, Bodo Moeller (Google)] *) Use type ossl_ssize_t instad of ssize_t which isn't available on all platforms. Move ssize_t definition from e_os.h to the public @@ -1435,7 +1507,7 @@ [Adam Langley (Google)] *) Fix spurious failures in ecdsatest.c. - [Emilia Käsper (Google)] + [Emilia Käsper (Google)] *) Fix the BIO_f_buffer() implementation (which was mixing different interpretations of the '..._len' fields). @@ -1449,7 +1521,7 @@ lock to call BN_BLINDING_invert_ex, and avoids one use of BN_BLINDING_update for each BN_BLINDING structure (previously, the last update always remained unused). - [Emilia Käsper (Google)] + [Emilia Käsper (Google)] *) In ssl3_clear, preserve s3->init_extra along with s3->rbuf. [Bob Buckholz (Google)] @@ -2258,7 +2330,7 @@ *) Add RFC 3161 compliant time stamp request creation, response generation and response verification functionality. - [Zoltán Glózik , The OpenTSA Project] + [Zoltán Glózik , The OpenTSA Project] *) Add initial support for TLS extensions, specifically for the server_name extension so far. The SSL_SESSION, SSL_CTX, and SSL data structures now @@ -3426,7 +3498,7 @@ *) BN_CTX_get() should return zero-valued bignums, providing the same initialised value as BN_new(). - [Geoff Thorpe, suggested by Ulf Möller] + [Geoff Thorpe, suggested by Ulf Möller] *) Support for inhibitAnyPolicy certificate extension. [Steve Henson] @@ -3445,7 +3517,7 @@ some point, these tighter rules will become openssl's default to improve maintainability, though the assert()s and other overheads will remain only in debugging configurations. See bn.h for more details. - [Geoff Thorpe, Nils Larsch, Ulf Möller] + [Geoff Thorpe, Nils Larsch, Ulf Möller] *) BN_CTX_init() has been deprecated, as BN_CTX is an opaque structure that can only be obtained through BN_CTX_new() (which implicitly @@ -3512,7 +3584,7 @@ [Douglas Stebila (Sun Microsystems Laboratories)] *) Add the possibility to load symbols globally with DSO. - [Götz Babin-Ebell via Richard Levitte] + [Götz Babin-Ebell via Richard Levitte] *) Add the functions ERR_set_mark() and ERR_pop_to_mark() for better control of the error stack. @@ -4227,7 +4299,7 @@ [Steve Henson] *) Undo Cygwin change. - [Ulf Möller] + [Ulf Möller] *) Added support for proxy certificates according to RFC 3820. Because they may be a security thread to unaware applications, @@ -4260,11 +4332,11 @@ [Stephen Henson, reported by UK NISCC] *) Use Windows randomness collection on Cygwin. - [Ulf Möller] + [Ulf Möller] *) Fix hang in EGD/PRNGD query when communication socket is closed prematurely by EGD/PRNGD. - [Darren Tucker via Lutz Jänicke, resolves #1014] + [Darren Tucker via Lutz Jänicke, resolves #1014] *) Prompt for pass phrases when appropriate for PKCS12 input format. [Steve Henson] @@ -4726,7 +4798,7 @@ pointers passed to them whenever necessary. Otherwise it is possible the caller may have overwritten (or deallocated) the original string data when a later ENGINE operation tries to use the stored values. - [Götz Babin-Ebell ] + [Götz Babin-Ebell ] *) Improve diagnostics in file reading and command-line digests. [Ben Laurie aided and abetted by Solar Designer ] @@ -6831,7 +6903,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) BN_sqr() bug fix. - [Ulf Möller, reported by Jim Ellis ] + [Ulf Möller, reported by Jim Ellis ] *) Rabin-Miller test analyses assume uniformly distributed witnesses, so use BN_pseudo_rand_range() instead of using BN_pseudo_rand() @@ -6991,7 +7063,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Fix OAEP check. - [Ulf Möller, Bodo Möller] + [Ulf Möller, Bodo Möller] *) The countermeasure against Bleichbacher's attack on PKCS #1 v1.5 RSA encryption was accidentally removed in s3_srvr.c in OpenSSL 0.9.5 @@ -7253,10 +7325,10 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Use better test patterns in bntest. - [Ulf Möller] + [Ulf Möller] *) rand_win.c fix for Borland C. - [Ulf Möller] + [Ulf Möller] *) BN_rshift bugfix for n == 0. [Bodo Moeller] @@ -7401,14 +7473,14 @@ des-cbc 3624.96k 5258.21k *) New BIO_shutdown_wr macro, which invokes the BIO_C_SHUTDOWN_WR BIO_ctrl (for BIO pairs). - [Bodo Möller] + [Bodo Möller] *) Add DSO method for VMS. [Richard Levitte] *) Bug fix: Montgomery multiplication could produce results with the wrong sign. - [Ulf Möller] + [Ulf Möller] *) Add RPM specification openssl.spec and modify it to build three packages. The default package contains applications, application @@ -7426,7 +7498,7 @@ des-cbc 3624.96k 5258.21k *) Don't set the two most significant bits to one when generating a random number < q in the DSA library. - [Ulf Möller] + [Ulf Möller] *) New SSL API mode 'SSL_MODE_AUTO_RETRY'. This disables the default behaviour that SSL_read may result in SSL_ERROR_WANT_READ (even if @@ -7692,7 +7764,7 @@ des-cbc 3624.96k 5258.21k *) Randomness polling function for Win9x, as described in: Peter Gutmann, Software Generation of Practically Strong Random Numbers. - [Ulf Möller] + [Ulf Möller] *) Fix so PRNG is seeded in req if using an already existing DSA key. @@ -7912,7 +7984,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Eliminate non-ANSI declarations in crypto.h and stack.h. - [Ulf Möller] + [Ulf Möller] *) Fix for SSL server purpose checking. Server checking was rejecting certificates which had extended key usage present @@ -7944,7 +8016,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Bugfix for linux-elf makefile.one. - [Ulf Möller] + [Ulf Möller] *) RSA_get_default_method() will now cause a default RSA_METHOD to be chosen if one doesn't exist already. @@ -8033,7 +8105,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) des_quad_cksum() byte order bug fix. - [Ulf Möller, using the problem description in krb4-0.9.7, where + [Ulf Möller, using the problem description in krb4-0.9.7, where the solution is attributed to Derrick J Brashear ] *) Fix so V_ASN1_APP_CHOOSE works again: however its use is strongly @@ -8134,7 +8206,7 @@ des-cbc 3624.96k 5258.21k [Rolf Haberrecker ] *) Assembler module support for Mingw32. - [Ulf Möller] + [Ulf Möller] *) Shared library support for HPUX (in shlib/). [Lutz Jaenicke and Anonymous] @@ -8153,7 +8225,7 @@ des-cbc 3624.96k 5258.21k *) BN_mul bugfix: In bn_mul_part_recursion() only the a>a[n] && b>b[n] case was implemented. This caused BN_div_recp() to fail occasionally. - [Ulf Möller] + [Ulf Möller] *) Add an optional second argument to the set_label() in the perl assembly language builder. If this argument exists and is set @@ -8183,14 +8255,14 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Fix potential buffer overrun problem in BIO_printf(). - [Ulf Möller, using public domain code by Patrick Powell; problem + [Ulf Möller, using public domain code by Patrick Powell; problem pointed out by David Sacerdote ] *) Support EGD . New functions RAND_egd() and RAND_status(). In the command line application, the EGD socket can be specified like a seed file using RANDFILE or -rand. - [Ulf Möller] + [Ulf Möller] *) Allow the string CERTIFICATE to be tolerated in PKCS#7 structures. Some CAs (e.g. Verisign) distribute certificates in this form. @@ -8223,7 +8295,7 @@ des-cbc 3624.96k 5258.21k #define OPENSSL_ALGORITHM_DEFINES #include defines all pertinent NO_ symbols, such as NO_IDEA, NO_RSA, etc. - [Richard Levitte, Ulf and Bodo Möller] + [Richard Levitte, Ulf and Bodo Möller] *) Bugfix: Tolerate fragmentation and interleaving in the SSL 3/TLS record layer. @@ -8274,17 +8346,17 @@ des-cbc 3624.96k 5258.21k *) Bug fix for BN_div_recp() for numerators with an even number of bits. - [Ulf Möller] + [Ulf Möller] *) More tests in bntest.c, and changed test_bn output. - [Ulf Möller] + [Ulf Möller] *) ./config recognizes MacOS X now. [Andy Polyakov] *) Bug fix for BN_div() when the first words of num and divsor are equal (it gave wrong results if (rem=(n1-q*d0)&BN_MASK2) < d0). - [Ulf Möller] + [Ulf Möller] *) Add support for various broken PKCS#8 formats, and command line options to produce them. @@ -8292,11 +8364,11 @@ des-cbc 3624.96k 5258.21k *) New functions BN_CTX_start(), BN_CTX_get() and BT_CTX_end() to get temporary BIGNUMs from a BN_CTX. - [Ulf Möller] + [Ulf Möller] *) Correct return values in BN_mod_exp_mont() and BN_mod_exp2_mont() for p == 0. - [Ulf Möller] + [Ulf Möller] *) Change the SSLeay_add_all_*() functions to OpenSSL_add_all_*() and include a #define from the old name to the new. The original intent @@ -8320,7 +8392,7 @@ des-cbc 3624.96k 5258.21k *) Source code cleanups: use const where appropriate, eliminate casts, use void * instead of char * in lhash. - [Ulf Möller] + [Ulf Möller] *) Bugfix: ssl3_send_server_key_exchange was not restartable (the state was not changed to SSL3_ST_SW_KEY_EXCH_B, and because of @@ -8365,13 +8437,13 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) New function BN_pseudo_rand(). - [Ulf Möller] + [Ulf Möller] *) Clean up BN_mod_mul_montgomery(): replace the broken (and unreadable) bignum version of BN_from_montgomery() with the working code from SSLeay 0.9.0 (the word based version is faster anyway), and clean up the comments. - [Ulf Möller] + [Ulf Möller] *) Avoid a race condition in s2_clnt.c (function get_server_hello) that made it impossible to use the same SSL_SESSION data structure in @@ -8381,25 +8453,25 @@ des-cbc 3624.96k 5258.21k *) The return value of RAND_load_file() no longer counts bytes obtained by stat(). RAND_load_file(..., -1) is new and uses the complete file to seed the PRNG (previously an explicit byte count was required). - [Ulf Möller, Bodo Möller] + [Ulf Möller, Bodo Möller] *) Clean up CRYPTO_EX_DATA functions, some of these didn't have prototypes used (char *) instead of (void *) and had casts all over the place. [Steve Henson] *) Make BN_generate_prime() return NULL on error if ret!=NULL. - [Ulf Möller] + [Ulf Möller] *) Retain source code compatibility for BN_prime_checks macro: BN_is_prime(..., BN_prime_checks, ...) now uses BN_prime_checks_for_size to determine the appropriate number of Rabin-Miller iterations. - [Ulf Möller] + [Ulf Möller] *) Diffie-Hellman uses "safe" primes: DH_check() return code renamed to DH_CHECK_P_NOT_SAFE_PRIME. (Check if this is true? OpenPGP calls them "strong".) - [Ulf Möller] + [Ulf Möller] *) Merge the functionality of "dh" and "gendh" programs into a new program "dhparam". The old programs are retained for now but will handle DH keys @@ -8455,7 +8527,7 @@ des-cbc 3624.96k 5258.21k *) Add missing #ifndefs that caused missing symbols when building libssl as a shared library without RSA. Use #ifndef NO_SSL2 instead of NO_RSA in ssl/s2*.c. - [Kris Kennaway , modified by Ulf Möller] + [Kris Kennaway , modified by Ulf Möller] *) Precautions against using the PRNG uninitialized: RAND_bytes() now has a return value which indicates the quality of the random data @@ -8464,7 +8536,7 @@ des-cbc 3624.96k 5258.21k guaranteed to be unique but not unpredictable. RAND_add is like RAND_seed, but takes an extra argument for an entropy estimate (RAND_seed always assumes full entropy). - [Ulf Möller] + [Ulf Möller] *) Do more iterations of Rabin-Miller probable prime test (specifically, 3 for 1024-bit primes, 6 for 512-bit primes, 12 for 256-bit primes @@ -8494,7 +8566,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Honor the no-xxx Configure options when creating .DEF files. - [Ulf Möller] + [Ulf Möller] *) Add PKCS#10 attributes to field table: challengePassword, unstructuredName and unstructuredAddress. These are taken from @@ -9328,7 +9400,7 @@ des-cbc 3624.96k 5258.21k *) More DES library cleanups: remove references to srand/rand and delete an unused file. - [Ulf Möller] + [Ulf Möller] *) Add support for the the free Netwide assembler (NASM) under Win32, since not many people have MASM (ml) and it can be hard to obtain. @@ -9417,7 +9489,7 @@ des-cbc 3624.96k 5258.21k worked. *) Fix problems with no-hmac etc. - [Ulf Möller, pointed out by Brian Wellington ] + [Ulf Möller, pointed out by Brian Wellington ] *) New functions RSA_get_default_method(), RSA_set_method() and RSA_get_method(). These allows replacement of RSA_METHODs without having @@ -9534,7 +9606,7 @@ des-cbc 3624.96k 5258.21k [Ben Laurie] *) DES library cleanups. - [Ulf Möller] + [Ulf Möller] *) Add support for PKCS#5 v2.0 PBE algorithms. This will permit PKCS#8 to be used with any cipher unlike PKCS#5 v1.5 which can at most handle 64 bit @@ -9577,7 +9649,7 @@ des-cbc 3624.96k 5258.21k [Christian Forster ] *) config now generates no-xxx options for missing ciphers. - [Ulf Möller] + [Ulf Möller] *) Support the EBCDIC character set (work in progress). File ebcdic.c not yet included because it has a different license. @@ -9690,7 +9762,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Move openssl.cnf out of lib/. - [Ulf Möller] + [Ulf Möller] *) Fix various things to let OpenSSL even pass ``egcc -pipe -O2 -Wall -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes @@ -9747,10 +9819,10 @@ des-cbc 3624.96k 5258.21k [Ben Laurie] *) Support Borland C++ builder. - [Janez Jere , modified by Ulf Möller] + [Janez Jere , modified by Ulf Möller] *) Support Mingw32. - [Ulf Möller] + [Ulf Möller] *) SHA-1 cleanups and performance enhancements. [Andy Polyakov ] @@ -9759,7 +9831,7 @@ des-cbc 3624.96k 5258.21k [Andy Polyakov ] *) Accept any -xxx and +xxx compiler options in Configure. - [Ulf Möller] + [Ulf Möller] *) Update HPUX configuration. [Anonymous] @@ -9792,7 +9864,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) OAEP decoding bug fix. - [Ulf Möller] + [Ulf Möller] *) Support INSTALL_PREFIX for package builders, as proposed by David Harris. @@ -9815,21 +9887,21 @@ des-cbc 3624.96k 5258.21k [Niels Poppe ] *) New Configure option no- (rsa, idea, rc5, ...). - [Ulf Möller] + [Ulf Möller] *) Add the PKCS#12 API documentation to openssl.txt. Preliminary support for extension adding in x509 utility. [Steve Henson] *) Remove NOPROTO sections and error code comments. - [Ulf Möller] + [Ulf Möller] *) Partial rewrite of the DEF file generator to now parse the ANSI prototypes. [Steve Henson] *) New Configure options --prefix=DIR and --openssldir=DIR. - [Ulf Möller] + [Ulf Möller] *) Complete rewrite of the error code script(s). It is all now handled by one script at the top level which handles error code gathering, @@ -9858,7 +9930,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Move the autogenerated header file parts to crypto/opensslconf.h. - [Ulf Möller] + [Ulf Möller] *) Fix new 56-bit DES export ciphersuites: they were using 7 bytes instead of 8 of keying material. Merlin has also confirmed interop with this fix @@ -9876,13 +9948,13 @@ des-cbc 3624.96k 5258.21k [Andy Polyakov ] *) Change functions to ANSI C. - [Ulf Möller] + [Ulf Möller] *) Fix typos in error codes. - [Martin Kraemer , Ulf Möller] + [Martin Kraemer , Ulf Möller] *) Remove defunct assembler files from Configure. - [Ulf Möller] + [Ulf Möller] *) SPARC v8 assembler BIGNUM implementation. [Andy Polyakov ] @@ -9919,7 +9991,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) New Configure option "rsaref". - [Ulf Möller] + [Ulf Möller] *) Don't auto-generate pem.h. [Bodo Moeller] @@ -9967,7 +10039,7 @@ des-cbc 3624.96k 5258.21k *) New functions DSA_do_sign and DSA_do_verify to provide access to the raw DSA values prior to ASN.1 encoding. - [Ulf Möller] + [Ulf Möller] *) Tweaks to Configure [Niels Poppe ] @@ -9977,11 +10049,11 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) New variables $(RANLIB) and $(PERL) in the Makefiles. - [Ulf Möller] + [Ulf Möller] *) New config option to avoid instructions that are illegal on the 80386. The default code is faster, but requires at least a 486. - [Ulf Möller] + [Ulf Möller] *) Got rid of old SSL2_CLIENT_VERSION (inconsistently used) and SSL2_SERVER_VERSION (not used at all) macros, which are now the @@ -10520,7 +10592,7 @@ des-cbc 3624.96k 5258.21k Hagino ] *) File was opened incorrectly in randfile.c. - [Ulf Möller ] + [Ulf Möller ] *) Beginning of support for GeneralizedTime. d2i, i2d, check and print functions. Also ASN1_TIME suite which is a CHOICE of UTCTime or @@ -10530,7 +10602,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Correct Linux 1 recognition in config. - [Ulf Möller ] + [Ulf Möller ] *) Remove pointless MD5 hash when using DSA keys in ca. [Anonymous ] @@ -10677,7 +10749,7 @@ des-cbc 3624.96k 5258.21k *) Fix the RSA header declarations that hid a bug I fixed in 0.9.0b but was already fixed by Eric for 0.9.1 it seems. - [Ben Laurie - pointed out by Ulf Möller ] + [Ben Laurie - pointed out by Ulf Möller ] *) Autodetect FreeBSD3. [Ben Laurie] Added: vendor-crypto/openssl/dist/CONTRIBUTING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-crypto/openssl/dist/CONTRIBUTING Thu Dec 3 17:22:58 2015 (r291707) @@ -0,0 +1,38 @@ +HOW TO CONTRIBUTE TO OpenSSL +---------------------------- + +Development is coordinated on the openssl-dev mailing list (see +http://www.openssl.org for information on subscribing). If you +would like to submit a patch, send it to rt@openssl.org with +the string "[PATCH]" in the subject. Please be sure to include a +textual explanation of what your patch does. + +You can also make GitHub pull requests. If you do this, please also send +mail to rt@openssl.org with a brief description and a link to the PR so +that we can more easily keep track of it. + +If you are unsure as to whether a feature will be useful for the general +OpenSSL community please discuss it on the openssl-dev mailing list first. +Someone may be already working on the same thing or there may be a good +reason as to why that feature isn't implemented. + +Patches should be as up to date as possible, preferably relative to the +current Git or the last snapshot. They should follow our coding style +(see https://www.openssl.org/policies/codingstyle.html) and compile without +warnings using the --strict-warnings flag. OpenSSL compiles on many varied +platforms: try to ensure you only use portable features. + +Our preferred format for patch files is "git format-patch" output. For example +to provide a patch file containing the last commit in your local git repository +use the following command: + +# git format-patch --stdout HEAD^ >mydiffs.patch + +Another method of creating an acceptable patch file without using git is as +follows: + +# cd openssl-work +# [your changes] +# ./Configure dist; make clean +# cd .. +# diff -ur openssl-orig openssl-work > mydiffs.patch Modified: vendor-crypto/openssl/dist/Configure ============================================================================== --- vendor-crypto/openssl/dist/Configure Thu Dec 3 17:22:55 2015 (r291706) +++ vendor-crypto/openssl/dist/Configure Thu Dec 3 17:22:58 2015 (r291707) @@ -416,6 +416,7 @@ my %table=( "linux-ia64-icc","icc:-DL_ENDIAN -O2 -Wall::-D_REENTRANT::-ldl -no_cpprt:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "linux-x86_64-clang", "clang: -m64 -DL_ENDIAN -O3 -Wall -Wextra $clang_disabled_warnings -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"debug-linux-x86_64-clang", "clang: -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -g -Wall -Wextra $clang_disabled_warnings -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "linux-x86_64-icc", "icc:-DL_ENDIAN -O2::-D_REENTRANT::-ldl -no_cpprt:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "linux-x32", "gcc:-mx32 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32", "linux64-s390x", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", @@ -1646,21 +1647,22 @@ if ($shlib_version_number =~ /(^[0-9]*)\ $shlib_minor=$2; } +my $ecc = $cc; +$ecc = "clang" if `$cc --version 2>&1` =~ /clang/; + if ($strict_warnings) { - my $ecc = $cc; - $ecc = "clang" if `$cc --version 2>&1` =~ /clang/; my $wopt; die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc$/ or $ecc =~ /clang$/); foreach $wopt (split /\s+/, $gcc_devteam_warn) { - $cflags .= " $wopt" unless ($cflags =~ /$wopt/) + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) } if ($ecc eq "clang") { foreach $wopt (split /\s+/, $clang_devteam_warn) { - $cflags .= " $wopt" unless ($cflags =~ /$wopt/) + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) } } } @@ -1713,6 +1715,7 @@ while () s/^AR=\s*ar/AR= $ar/; s/^RANLIB=.*/RANLIB= $ranlib/; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc"; + s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang"; } s/^CFLAG=.*$/CFLAG= $cflags/; s/^DEPFLAG=.*$/DEPFLAG=$depflags/; Modified: vendor-crypto/openssl/dist/FAQ ============================================================================== --- vendor-crypto/openssl/dist/FAQ Thu Dec 3 17:22:55 2015 (r291706) +++ vendor-crypto/openssl/dist/FAQ Thu Dec 3 17:22:58 2015 (r291707) @@ -1,1053 +1,2 @@ -OpenSSL - Frequently Asked Questions --------------------------------------- - -[MISC] Miscellaneous questions - -* Which is the current version of OpenSSL? -* Where is the documentation? -* How can I contact the OpenSSL developers? -* Where can I get a compiled version of OpenSSL? -* Why aren't tools like 'autoconf' and 'libtool' used? -* What is an 'engine' version? -* How do I check the authenticity of the OpenSSL distribution? -* How does the versioning scheme work? - -[LEGAL] Legal questions - -* Do I need patent licenses to use OpenSSL? -* Can I use OpenSSL with GPL software? - -[USER] Questions on using the OpenSSL applications - -* Why do I get a "PRNG not seeded" error message? -* Why do I get an "unable to write 'random state'" error message? -* How do I create certificates or certificate requests? -* Why can't I create certificate requests? -* Why does fail with a certificate verify error? -* Why can I only use weak ciphers when I connect to a server using OpenSSL? -* How can I create DSA certificates? -* Why can't I make an SSL connection using a DSA certificate? -* How can I remove the passphrase on a private key? -* Why can't I use OpenSSL certificates with SSL client authentication? -* Why does my browser give a warning about a mismatched hostname? -* How do I install a CA certificate into a browser? -* Why is OpenSSL x509 DN output not conformant to RFC2253? -* What is a "128 bit certificate"? Can I create one with OpenSSL? -* Why does OpenSSL set the authority key identifier extension incorrectly? -* How can I set up a bundle of commercial root CA certificates? - -[BUILD] Questions about building and testing OpenSSL - -* Why does the linker complain about undefined symbols? -* Why does the OpenSSL test fail with "bc: command not found"? -* Why does the OpenSSL test fail with "bc: 1 no implemented"? -* Why does the OpenSSL test fail with "bc: stack empty"? -* Why does the OpenSSL compilation fail on Alpha Tru64 Unix? -* Why does the OpenSSL compilation fail with "ar: command not found"? -* Why does the OpenSSL compilation fail on Win32 with VC++? -* What is special about OpenSSL on Redhat? -* Why does the OpenSSL compilation fail on MacOS X? -* Why does the OpenSSL test suite fail on MacOS X? -* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]? -* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"? -* Why does the OpenSSL test suite fail in sha512t on x86 CPU? -* Why does compiler fail to compile sha512.c? -* Test suite still fails, what to do? -* I think I've found a bug, what should I do? -* I'm SURE I've found a bug, how do I report it? -* I've found a security issue, how do I report it? - -[PROG] Questions about programming with OpenSSL - -* Is OpenSSL thread-safe? -* I've compiled a program under Windows and it crashes: why? -* How do I read or write a DER encoded buffer using the ASN1 functions? -* OpenSSL uses DER but I need BER format: does OpenSSL support BER? -* I've tried using and I get errors why? -* I've called and it fails, why? -* I just get a load of numbers for the error output, what do they mean? -* Why do I get errors about unknown algorithms? -* Why can't the OpenSSH configure script detect OpenSSL? -* Can I use OpenSSL's SSL library with non-blocking I/O? -* Why doesn't my server application receive a client certificate? -* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? -* I think I've detected a memory leak, is this a bug? -* Why does Valgrind complain about the use of uninitialized data? -* Why doesn't a memory BIO work when a file does? -* Where are the declarations and implementations of d2i_X509() etc? - -=============================================================================== - -[MISC] ======================================================================== - -* Which is the current version of OpenSSL? - -The current version is available from . -OpenSSL 1.0.1a was released on Apr 19th, 2012. - -In addition to the current stable release, you can also access daily -snapshots of the OpenSSL development version at , or get it by anonymous Git access. - - -* Where is the documentation? - -OpenSSL is a library that provides cryptographic functionality to -applications such as secure web servers. Be sure to read the -documentation of the application you want to use. The INSTALL file -explains how to install this library. - -OpenSSL includes a command line utility that can be used to perform a -variety of cryptographic functions. It is described in the openssl(1) -manpage. Documentation for developers is currently being written. Many -manual pages are available; overviews over libcrypto and -libssl are given in the crypto(3) and ssl(3) manpages. - -The OpenSSL manpages are installed in /usr/local/ssl/man/ (or a -different directory if you specified one as described in INSTALL). -In addition, you can read the most current versions at -. Note that the online documents refer -to the very latest development versions of OpenSSL and may include features -not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. The pod format -documentation is included in each OpenSSL distribution under the docs -directory. - -There is some documentation about certificate extensions and PKCS#12 -in doc/openssl.txt - -The original SSLeay documentation is included in OpenSSL as -doc/ssleay.txt. It may be useful when none of the other resources -help, but please note that it reflects the obsolete version SSLeay -0.6.6. - - -* How can I contact the OpenSSL developers? - -The README file describes how to submit bug reports and patches to -OpenSSL. Information on the OpenSSL mailing lists is available from -. - - -* Where can I get a compiled version of OpenSSL? - -You can finder pointers to binary distributions in - . - -Some applications that use OpenSSL are distributed in binary form. -When using such an application, you don't need to install OpenSSL -yourself; the application will include the required parts (e.g. DLLs). - -If you want to build OpenSSL on a Windows system and you don't have *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 3 17:23:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B603A3FE91; Thu, 3 Dec 2015 17:23:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4CD6136C; Thu, 3 Dec 2015 17:23:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3HNaOu075442; Thu, 3 Dec 2015 17:23:36 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3HNaLP075441; Thu, 3 Dec 2015 17:23:36 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201512031723.tB3HNaLP075441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 3 Dec 2015 17:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r291708 - vendor-crypto/openssl/1.0.2e X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 17:23:37 -0000 Author: jkim Date: Thu Dec 3 17:23:35 2015 New Revision: 291708 URL: https://svnweb.freebsd.org/changeset/base/291708 Log: Tag OpenSSL 1.0.2e. Added: vendor-crypto/openssl/1.0.2e/ - copied from r291707, vendor-crypto/openssl/dist/ From owner-svn-src-all@freebsd.org Thu Dec 3 17:24:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3061CA3FEDD; Thu, 3 Dec 2015 17:24:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAEAA151E; Thu, 3 Dec 2015 17:24:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3HOGW9075513; Thu, 3 Dec 2015 17:24:16 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3HOGxe075508; Thu, 3 Dec 2015 17:24:16 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201512031724.tB3HOGxe075508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 3 Dec 2015 17:24:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r291709 - in vendor-crypto/openssl/dist-1.0.1: . apps crypto crypto/aes/asm crypto/asn1 crypto/bio crypto/bn crypto/bn/asm crypto/buffer crypto/cms crypto/comp crypto/conf crypto/dsa cr... X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 17:24:18 -0000 Author: jkim Date: Thu Dec 3 17:24:16 2015 New Revision: 291709 URL: https://svnweb.freebsd.org/changeset/base/291709 Log: Import OpenSSL 1.0.1q. Added: vendor-crypto/openssl/dist-1.0.1/CONTRIBUTING vendor-crypto/openssl/dist-1.0.1/appveyor.yml vendor-crypto/openssl/dist-1.0.1/doc/dir-locals.example.el vendor-crypto/openssl/dist-1.0.1/doc/openssl-c-indent.el vendor-crypto/openssl/dist-1.0.1/ssl/clienthellotest.c (contents, props changed) vendor-crypto/openssl/dist-1.0.1/util/toutf8.sh (contents, props changed) Deleted: vendor-crypto/openssl/dist-1.0.1/util/pod2mantest Modified: vendor-crypto/openssl/dist-1.0.1/CHANGES vendor-crypto/openssl/dist-1.0.1/Configure vendor-crypto/openssl/dist-1.0.1/FAQ vendor-crypto/openssl/dist-1.0.1/FREEBSD-upgrade vendor-crypto/openssl/dist-1.0.1/Makefile vendor-crypto/openssl/dist-1.0.1/Makefile.org vendor-crypto/openssl/dist-1.0.1/NEWS vendor-crypto/openssl/dist-1.0.1/README vendor-crypto/openssl/dist-1.0.1/apps/Makefile vendor-crypto/openssl/dist-1.0.1/apps/apps.c vendor-crypto/openssl/dist-1.0.1/apps/asn1pars.c vendor-crypto/openssl/dist-1.0.1/apps/ca.c vendor-crypto/openssl/dist-1.0.1/apps/ecparam.c vendor-crypto/openssl/dist-1.0.1/apps/engine.c vendor-crypto/openssl/dist-1.0.1/apps/ocsp.c vendor-crypto/openssl/dist-1.0.1/apps/pkcs12.c vendor-crypto/openssl/dist-1.0.1/apps/s_client.c vendor-crypto/openssl/dist-1.0.1/apps/s_server.c vendor-crypto/openssl/dist-1.0.1/crypto/aes/asm/aes-586.pl vendor-crypto/openssl/dist-1.0.1/crypto/aes/asm/aesni-x86.pl vendor-crypto/openssl/dist-1.0.1/crypto/asn1/asn1_par.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/d2i_pr.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/tasn_dec.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/x_bignum.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/x_pubkey.c vendor-crypto/openssl/dist-1.0.1/crypto/asn1/x_x509.c vendor-crypto/openssl/dist-1.0.1/crypto/bio/b_dump.c vendor-crypto/openssl/dist-1.0.1/crypto/bio/bss_file.c vendor-crypto/openssl/dist-1.0.1/crypto/bn/asm/armv4-gf2m.pl vendor-crypto/openssl/dist-1.0.1/crypto/bn/asm/ia64.S vendor-crypto/openssl/dist-1.0.1/crypto/bn/asm/s390x-gf2m.pl vendor-crypto/openssl/dist-1.0.1/crypto/bn/asm/x86-gf2m.pl vendor-crypto/openssl/dist-1.0.1/crypto/bn/asm/x86_64-gcc.c vendor-crypto/openssl/dist-1.0.1/crypto/bn/asm/x86_64-gf2m.pl vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_exp.c vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_gcd.c vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_gf2m.c vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_mont.c vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_recp.c vendor-crypto/openssl/dist-1.0.1/crypto/bn/bn_x931p.c vendor-crypto/openssl/dist-1.0.1/crypto/bn/bntest.c vendor-crypto/openssl/dist-1.0.1/crypto/buffer/buf_str.c vendor-crypto/openssl/dist-1.0.1/crypto/buffer/buffer.h vendor-crypto/openssl/dist-1.0.1/crypto/cms/cms_enc.c vendor-crypto/openssl/dist-1.0.1/crypto/cms/cms_pwri.c vendor-crypto/openssl/dist-1.0.1/crypto/cms/cms_smime.c vendor-crypto/openssl/dist-1.0.1/crypto/comp/c_zlib.c vendor-crypto/openssl/dist-1.0.1/crypto/conf/conf_def.c vendor-crypto/openssl/dist-1.0.1/crypto/conf/conf_sap.c vendor-crypto/openssl/dist-1.0.1/crypto/cryptlib.c vendor-crypto/openssl/dist-1.0.1/crypto/dsa/dsa_ameth.c vendor-crypto/openssl/dist-1.0.1/crypto/dsa/dsa_gen.c vendor-crypto/openssl/dist-1.0.1/crypto/ec/ec.h vendor-crypto/openssl/dist-1.0.1/crypto/ec/ec_asn1.c vendor-crypto/openssl/dist-1.0.1/crypto/ec/ec_key.c vendor-crypto/openssl/dist-1.0.1/crypto/engine/eng_cryptodev.c vendor-crypto/openssl/dist-1.0.1/crypto/engine/eng_list.c vendor-crypto/openssl/dist-1.0.1/crypto/evp/e_des3.c vendor-crypto/openssl/dist-1.0.1/crypto/evp/encode.c vendor-crypto/openssl/dist-1.0.1/crypto/evp/evp_key.c vendor-crypto/openssl/dist-1.0.1/crypto/evp/evp_lib.c vendor-crypto/openssl/dist-1.0.1/crypto/evp/evp_pbe.c vendor-crypto/openssl/dist-1.0.1/crypto/evp/p_lib.c vendor-crypto/openssl/dist-1.0.1/crypto/evp/pmeth_gn.c vendor-crypto/openssl/dist-1.0.1/crypto/hmac/hm_ameth.c vendor-crypto/openssl/dist-1.0.1/crypto/jpake/jpake.c vendor-crypto/openssl/dist-1.0.1/crypto/mem_clr.c vendor-crypto/openssl/dist-1.0.1/crypto/modes/asm/ghash-armv4.pl vendor-crypto/openssl/dist-1.0.1/crypto/modes/asm/ghash-x86.pl vendor-crypto/openssl/dist-1.0.1/crypto/ocsp/ocsp_lib.c vendor-crypto/openssl/dist-1.0.1/crypto/ocsp/ocsp_prn.c vendor-crypto/openssl/dist-1.0.1/crypto/opensslconf.h vendor-crypto/openssl/dist-1.0.1/crypto/opensslconf.h.in vendor-crypto/openssl/dist-1.0.1/crypto/opensslv.h vendor-crypto/openssl/dist-1.0.1/crypto/pem/pem_info.c vendor-crypto/openssl/dist-1.0.1/crypto/pem/pvkfmt.c vendor-crypto/openssl/dist-1.0.1/crypto/pkcs12/p12_add.c vendor-crypto/openssl/dist-1.0.1/crypto/pkcs12/p12_crpt.c vendor-crypto/openssl/dist-1.0.1/crypto/pkcs12/p12_mutl.c vendor-crypto/openssl/dist-1.0.1/crypto/pkcs7/pk7_doit.c vendor-crypto/openssl/dist-1.0.1/crypto/rc4/asm/rc4-x86_64.pl vendor-crypto/openssl/dist-1.0.1/crypto/rsa/rsa_ameth.c vendor-crypto/openssl/dist-1.0.1/crypto/rsa/rsa_gen.c vendor-crypto/openssl/dist-1.0.1/crypto/rsa/rsa_sign.c vendor-crypto/openssl/dist-1.0.1/crypto/rsa/rsa_test.c vendor-crypto/openssl/dist-1.0.1/crypto/sha/asm/sha1-586.pl vendor-crypto/openssl/dist-1.0.1/crypto/sha/asm/sha256-586.pl vendor-crypto/openssl/dist-1.0.1/crypto/sha/asm/sha512-586.pl vendor-crypto/openssl/dist-1.0.1/crypto/sha/asm/sha512-parisc.pl vendor-crypto/openssl/dist-1.0.1/crypto/sparccpuid.S vendor-crypto/openssl/dist-1.0.1/crypto/srp/srp_vfy.c vendor-crypto/openssl/dist-1.0.1/crypto/ts/ts_rsp_verify.c vendor-crypto/openssl/dist-1.0.1/crypto/whrlpool/asm/wp-mmx.pl vendor-crypto/openssl/dist-1.0.1/crypto/x509/x509_cmp.c vendor-crypto/openssl/dist-1.0.1/crypto/x509/x509_lu.c vendor-crypto/openssl/dist-1.0.1/crypto/x509v3/v3_cpols.c vendor-crypto/openssl/dist-1.0.1/crypto/x509v3/v3_ncons.c vendor-crypto/openssl/dist-1.0.1/crypto/x509v3/v3_pci.c vendor-crypto/openssl/dist-1.0.1/crypto/x509v3/v3_pcia.c vendor-crypto/openssl/dist-1.0.1/doc/apps/ciphers.pod vendor-crypto/openssl/dist-1.0.1/doc/apps/dgst.pod vendor-crypto/openssl/dist-1.0.1/doc/apps/genrsa.pod vendor-crypto/openssl/dist-1.0.1/doc/apps/req.pod vendor-crypto/openssl/dist-1.0.1/doc/apps/x509.pod vendor-crypto/openssl/dist-1.0.1/doc/crypto/BIO_read.pod vendor-crypto/openssl/dist-1.0.1/doc/crypto/BN_rand.pod vendor-crypto/openssl/dist-1.0.1/doc/crypto/DSA_generate_parameters.pod vendor-crypto/openssl/dist-1.0.1/doc/crypto/EVP_DigestVerifyInit.pod vendor-crypto/openssl/dist-1.0.1/doc/crypto/EVP_SignInit.pod vendor-crypto/openssl/dist-1.0.1/doc/crypto/buffer.pod vendor-crypto/openssl/dist-1.0.1/doc/crypto/d2i_X509_NAME.pod vendor-crypto/openssl/dist-1.0.1/doc/ssl/SSL_CTX_add_extra_chain_cert.pod vendor-crypto/openssl/dist-1.0.1/e_os.h vendor-crypto/openssl/dist-1.0.1/engines/e_chil.c vendor-crypto/openssl/dist-1.0.1/ssl/Makefile vendor-crypto/openssl/dist-1.0.1/ssl/bio_ssl.c vendor-crypto/openssl/dist-1.0.1/ssl/d1_both.c vendor-crypto/openssl/dist-1.0.1/ssl/d1_clnt.c vendor-crypto/openssl/dist-1.0.1/ssl/d1_srvr.c vendor-crypto/openssl/dist-1.0.1/ssl/s23_clnt.c vendor-crypto/openssl/dist-1.0.1/ssl/s3_cbc.c vendor-crypto/openssl/dist-1.0.1/ssl/s3_clnt.c vendor-crypto/openssl/dist-1.0.1/ssl/s3_enc.c vendor-crypto/openssl/dist-1.0.1/ssl/s3_lib.c vendor-crypto/openssl/dist-1.0.1/ssl/s3_srvr.c vendor-crypto/openssl/dist-1.0.1/ssl/ssl.h vendor-crypto/openssl/dist-1.0.1/ssl/ssl3.h vendor-crypto/openssl/dist-1.0.1/ssl/ssl_asn1.c vendor-crypto/openssl/dist-1.0.1/ssl/ssl_cert.c vendor-crypto/openssl/dist-1.0.1/ssl/ssl_ciph.c vendor-crypto/openssl/dist-1.0.1/ssl/ssl_err.c vendor-crypto/openssl/dist-1.0.1/ssl/ssl_lib.c vendor-crypto/openssl/dist-1.0.1/ssl/ssl_locl.h vendor-crypto/openssl/dist-1.0.1/ssl/ssl_rsa.c vendor-crypto/openssl/dist-1.0.1/ssl/ssl_sess.c vendor-crypto/openssl/dist-1.0.1/ssl/ssltest.c vendor-crypto/openssl/dist-1.0.1/ssl/t1_enc.c vendor-crypto/openssl/dist-1.0.1/ssl/t1_lib.c vendor-crypto/openssl/dist-1.0.1/ssl/tls1.h vendor-crypto/openssl/dist-1.0.1/util/indent.pro vendor-crypto/openssl/dist-1.0.1/util/mk1mf.pl vendor-crypto/openssl/dist-1.0.1/util/mkrc.pl vendor-crypto/openssl/dist-1.0.1/util/mkstack.pl vendor-crypto/openssl/dist-1.0.1/util/pl/VC-32.pl vendor-crypto/openssl/dist-1.0.1/util/selftest.pl Modified: vendor-crypto/openssl/dist-1.0.1/CHANGES ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/CHANGES Thu Dec 3 17:23:35 2015 (r291708) +++ vendor-crypto/openssl/dist-1.0.1/CHANGES Thu Dec 3 17:24:16 2015 (r291709) @@ -2,6 +2,45 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1p and 1.0.1q [3 Dec 2015] + + *) Certificate verify crash with missing PSS parameter + + The signature verification routines will crash with a NULL pointer + dereference if presented with an ASN.1 signature using the RSA PSS + algorithm and absent mask generation function parameter. Since these + routines are used to verify certificate signature algorithms this can be + used to crash any certificate verification operation and exploited in a + DoS attack. Any application which performs certificate verification is + vulnerable including OpenSSL clients and servers which enable client + authentication. + + This issue was reported to OpenSSL by Loïc Jonas Etienne (Qnective AG). + (CVE-2015-3194) + [Stephen Henson] + + *) X509_ATTRIBUTE memory leak + + When presented with a malformed X509_ATTRIBUTE structure OpenSSL will leak + memory. This structure is used by the PKCS#7 and CMS routines so any + application which reads PKCS#7 or CMS data from untrusted sources is + affected. SSL/TLS is not affected. + + This issue was reported to OpenSSL by Adam Langley (Google/BoringSSL) using + libFuzzer. + (CVE-2015-3195) + [Stephen Henson] + + *) Rewrite EVP_DecodeUpdate (base64 decoding) to fix several bugs. + This changes the decoding behaviour for some invalid messages, + though the change is mostly in the more lenient direction, and + legacy behaviour is preserved as much as possible. + [Emilia Käsper] + + *) In DSA_generate_parameters_ex, if the provided seed is too short, + return an error + [Rich Salz and Ismo Puustinen ] + Changes between 1.0.1o and 1.0.1p [9 Jul 2015] *) Alternate chains certificate forgery @@ -15,10 +54,19 @@ This issue was reported to OpenSSL by Adam Langley/David Benjamin (Google/BoringSSL). + (CVE-2015-1793) [Matt Caswell] - Changes between 1.0.1n and 1.0.1o [12 Jun 2015] + *) Race condition handling PSK identify hint + + If PSK identity hints are received by a multi-threaded client then + the values are wrongly updated in the parent SSL_CTX structure. This can + result in a race condition potentially leading to a double free of the + identify hint data. + (CVE-2015-3196) + [Stephen Henson] + Changes between 1.0.1n and 1.0.1o [12 Jun 2015] *) Fix HMAC ABI incompatibility. The previous version introduced an ABI incompatibility in the handling of HMAC. The previous ABI has now been restored. @@ -55,9 +103,9 @@ callbacks. This issue was reported to OpenSSL by Robert Swiecki (Google), and - independently by Hanno Böck. + independently by Hanno Böck. (CVE-2015-1789) - [Emilia Käsper] + [Emilia Käsper] *) PKCS7 crash with missing EnvelopedContent @@ -71,7 +119,7 @@ This issue was reported to OpenSSL by Michal Zalewski (Google). (CVE-2015-1790) - [Emilia Käsper] + [Emilia Käsper] *) CMS verify infinite loop with unknown hash function @@ -94,6 +142,9 @@ *) Reject DH handshakes with parameters shorter than 768 bits. [Kurt Roeckx and Emilia Kasper] + *) dhparam: generate 2048-bit parameters by default. + [Kurt Roeckx and Emilia Kasper] + Changes between 1.0.1l and 1.0.1m [19 Mar 2015] *) Segmentation fault in ASN1_TYPE_cmp fix @@ -132,7 +183,7 @@ This issue was reported to OpenSSL by Michal Zalewski (Google). (CVE-2015-0289) - [Emilia Käsper] + [Emilia Käsper] *) DoS via reachable assert in SSLv2 servers fix @@ -140,10 +191,10 @@ servers that both support SSLv2 and enable export cipher suites by sending a specially crafted SSLv2 CLIENT-MASTER-KEY message. - This issue was discovered by Sean Burford (Google) and Emilia Käsper + This issue was discovered by Sean Burford (Google) and Emilia Käsper (OpenSSL development team). (CVE-2015-0293) - [Emilia Käsper] + [Emilia Käsper] *) Use After Free following d2i_ECPrivatekey error fix @@ -288,12 +339,12 @@ version does not match the session's version. Resuming with a different version, while not strictly forbidden by the RFC, is of questionable sanity and breaks all known clients. - [David Benjamin, Emilia Käsper] + [David Benjamin, Emilia Käsper] *) Tighten handling of the ChangeCipherSpec (CCS) message: reject early CCS messages during renegotiation. (Note that because renegotiation is encrypted, this early CCS was not exploitable.) - [Emilia Käsper] + [Emilia Käsper] *) Tighten client-side session ticket handling during renegotiation: ensure that the client only accepts a session ticket if the server sends @@ -304,7 +355,7 @@ Similarly, ensure that the client requires a session ticket if one was advertised in the ServerHello. Previously, a TLS client would ignore a missing NewSessionTicket message. - [Emilia Käsper] + [Emilia Käsper] Changes between 1.0.1i and 1.0.1j [15 Oct 2014] @@ -384,10 +435,10 @@ with a null pointer dereference (read) by specifying an anonymous (EC)DH ciphersuite and sending carefully crafted handshake messages. - Thanks to Felix Gröbert (Google) for discovering and researching this + Thanks to Felix Gröbert (Google) for discovering and researching this issue. (CVE-2014-3510) - [Emilia Käsper] + [Emilia Käsper] *) By sending carefully crafted DTLS packets an attacker could cause openssl to leak memory. This can be exploited through a Denial of Service attack. @@ -424,7 +475,7 @@ properly negotiated with the client. This can be exploited through a Denial of Service attack. - Thanks to Joonas Kuorilehto and Riku Hietamäki (Codenomicon) for + Thanks to Joonas Kuorilehto and Riku Hietamäki (Codenomicon) for discovering and researching this issue. (CVE-2014-5139) [Steve Henson] @@ -436,7 +487,7 @@ Thanks to Ivan Fratric (Google) for discovering this issue. (CVE-2014-3508) - [Emilia Käsper, and Steve Henson] + [Emilia Käsper, and Steve Henson] *) Fix ec_GFp_simple_points_make_affine (thus, EC_POINTs_mul etc.) for corner cases. (Certain input points at infinity could lead to @@ -466,15 +517,15 @@ client or server. This is potentially exploitable to run arbitrary code on a vulnerable client or server. - Thanks to Jüri Aedla for reporting this issue. (CVE-2014-0195) - [Jüri Aedla, Steve Henson] + Thanks to Jüri Aedla for reporting this issue. (CVE-2014-0195) + [Jüri Aedla, Steve Henson] *) Fix bug in TLS code where clients enable anonymous ECDH ciphersuites are subject to a denial of service attack. - Thanks to Felix Gröbert and Ivan Fratric at Google for discovering + Thanks to Felix Gröbert and Ivan Fratric at Google for discovering this issue. (CVE-2014-3470) - [Felix Gröbert, Ivan Fratric, Steve Henson] + [Felix Gröbert, Ivan Fratric, Steve Henson] *) Harmonize version and its documentation. -f flag is used to display compilation flags. @@ -553,9 +604,9 @@ Thanks go to Nadhem Alfardan and Kenny Paterson of the Information Security Group at Royal Holloway, University of London (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and - Emilia Käsper for the initial patch. + Emilia Käsper for the initial patch. (CVE-2013-0169) - [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] *) Fix flaw in AESNI handling of TLS 1.2 and 1.1 records for CBC mode ciphersuites which can be exploited in a denial of service attack. @@ -730,7 +781,7 @@ EC_GROUP_new_by_curve_name() will automatically use these (while EC_GROUP_new_curve_GFp() currently prefers the more flexible implementations). - [Emilia Käsper, Adam Langley, Bodo Moeller (Google)] + [Emilia Käsper, Adam Langley, Bodo Moeller (Google)] *) Use type ossl_ssize_t instad of ssize_t which isn't available on all platforms. Move ssize_t definition from e_os.h to the public @@ -1006,7 +1057,7 @@ [Adam Langley (Google)] *) Fix spurious failures in ecdsatest.c. - [Emilia Käsper (Google)] + [Emilia Käsper (Google)] *) Fix the BIO_f_buffer() implementation (which was mixing different interpretations of the '..._len' fields). @@ -1020,7 +1071,7 @@ lock to call BN_BLINDING_invert_ex, and avoids one use of BN_BLINDING_update for each BN_BLINDING structure (previously, the last update always remained unused). - [Emilia Käsper (Google)] + [Emilia Käsper (Google)] *) In ssl3_clear, preserve s3->init_extra along with s3->rbuf. [Bob Buckholz (Google)] @@ -1829,7 +1880,7 @@ *) Add RFC 3161 compliant time stamp request creation, response generation and response verification functionality. - [Zoltán Glózik , The OpenTSA Project] + [Zoltán Glózik , The OpenTSA Project] *) Add initial support for TLS extensions, specifically for the server_name extension so far. The SSL_SESSION, SSL_CTX, and SSL data structures now @@ -2997,7 +3048,7 @@ *) BN_CTX_get() should return zero-valued bignums, providing the same initialised value as BN_new(). - [Geoff Thorpe, suggested by Ulf Möller] + [Geoff Thorpe, suggested by Ulf Möller] *) Support for inhibitAnyPolicy certificate extension. [Steve Henson] @@ -3016,7 +3067,7 @@ some point, these tighter rules will become openssl's default to improve maintainability, though the assert()s and other overheads will remain only in debugging configurations. See bn.h for more details. - [Geoff Thorpe, Nils Larsch, Ulf Möller] + [Geoff Thorpe, Nils Larsch, Ulf Möller] *) BN_CTX_init() has been deprecated, as BN_CTX is an opaque structure that can only be obtained through BN_CTX_new() (which implicitly @@ -3083,7 +3134,7 @@ [Douglas Stebila (Sun Microsystems Laboratories)] *) Add the possibility to load symbols globally with DSO. - [Götz Babin-Ebell via Richard Levitte] + [Götz Babin-Ebell via Richard Levitte] *) Add the functions ERR_set_mark() and ERR_pop_to_mark() for better control of the error stack. @@ -3798,7 +3849,7 @@ [Steve Henson] *) Undo Cygwin change. - [Ulf Möller] + [Ulf Möller] *) Added support for proxy certificates according to RFC 3820. Because they may be a security thread to unaware applications, @@ -3831,11 +3882,11 @@ [Stephen Henson, reported by UK NISCC] *) Use Windows randomness collection on Cygwin. - [Ulf Möller] + [Ulf Möller] *) Fix hang in EGD/PRNGD query when communication socket is closed prematurely by EGD/PRNGD. - [Darren Tucker via Lutz Jänicke, resolves #1014] + [Darren Tucker via Lutz Jänicke, resolves #1014] *) Prompt for pass phrases when appropriate for PKCS12 input format. [Steve Henson] @@ -4297,7 +4348,7 @@ pointers passed to them whenever necessary. Otherwise it is possible the caller may have overwritten (or deallocated) the original string data when a later ENGINE operation tries to use the stored values. - [Götz Babin-Ebell ] + [Götz Babin-Ebell ] *) Improve diagnostics in file reading and command-line digests. [Ben Laurie aided and abetted by Solar Designer ] @@ -6402,7 +6453,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) BN_sqr() bug fix. - [Ulf Möller, reported by Jim Ellis ] + [Ulf Möller, reported by Jim Ellis ] *) Rabin-Miller test analyses assume uniformly distributed witnesses, so use BN_pseudo_rand_range() instead of using BN_pseudo_rand() @@ -6562,7 +6613,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Fix OAEP check. - [Ulf Möller, Bodo Möller] + [Ulf Möller, Bodo Möller] *) The countermeasure against Bleichbacher's attack on PKCS #1 v1.5 RSA encryption was accidentally removed in s3_srvr.c in OpenSSL 0.9.5 @@ -6824,10 +6875,10 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Use better test patterns in bntest. - [Ulf Möller] + [Ulf Möller] *) rand_win.c fix for Borland C. - [Ulf Möller] + [Ulf Möller] *) BN_rshift bugfix for n == 0. [Bodo Moeller] @@ -6972,14 +7023,14 @@ des-cbc 3624.96k 5258.21k *) New BIO_shutdown_wr macro, which invokes the BIO_C_SHUTDOWN_WR BIO_ctrl (for BIO pairs). - [Bodo Möller] + [Bodo Möller] *) Add DSO method for VMS. [Richard Levitte] *) Bug fix: Montgomery multiplication could produce results with the wrong sign. - [Ulf Möller] + [Ulf Möller] *) Add RPM specification openssl.spec and modify it to build three packages. The default package contains applications, application @@ -6997,7 +7048,7 @@ des-cbc 3624.96k 5258.21k *) Don't set the two most significant bits to one when generating a random number < q in the DSA library. - [Ulf Möller] + [Ulf Möller] *) New SSL API mode 'SSL_MODE_AUTO_RETRY'. This disables the default behaviour that SSL_read may result in SSL_ERROR_WANT_READ (even if @@ -7263,7 +7314,7 @@ des-cbc 3624.96k 5258.21k *) Randomness polling function for Win9x, as described in: Peter Gutmann, Software Generation of Practically Strong Random Numbers. - [Ulf Möller] + [Ulf Möller] *) Fix so PRNG is seeded in req if using an already existing DSA key. @@ -7483,7 +7534,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Eliminate non-ANSI declarations in crypto.h and stack.h. - [Ulf Möller] + [Ulf Möller] *) Fix for SSL server purpose checking. Server checking was rejecting certificates which had extended key usage present @@ -7515,7 +7566,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Bugfix for linux-elf makefile.one. - [Ulf Möller] + [Ulf Möller] *) RSA_get_default_method() will now cause a default RSA_METHOD to be chosen if one doesn't exist already. @@ -7604,7 +7655,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) des_quad_cksum() byte order bug fix. - [Ulf Möller, using the problem description in krb4-0.9.7, where + [Ulf Möller, using the problem description in krb4-0.9.7, where the solution is attributed to Derrick J Brashear ] *) Fix so V_ASN1_APP_CHOOSE works again: however its use is strongly @@ -7705,7 +7756,7 @@ des-cbc 3624.96k 5258.21k [Rolf Haberrecker ] *) Assembler module support for Mingw32. - [Ulf Möller] + [Ulf Möller] *) Shared library support for HPUX (in shlib/). [Lutz Jaenicke and Anonymous] @@ -7724,7 +7775,7 @@ des-cbc 3624.96k 5258.21k *) BN_mul bugfix: In bn_mul_part_recursion() only the a>a[n] && b>b[n] case was implemented. This caused BN_div_recp() to fail occasionally. - [Ulf Möller] + [Ulf Möller] *) Add an optional second argument to the set_label() in the perl assembly language builder. If this argument exists and is set @@ -7754,14 +7805,14 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Fix potential buffer overrun problem in BIO_printf(). - [Ulf Möller, using public domain code by Patrick Powell; problem + [Ulf Möller, using public domain code by Patrick Powell; problem pointed out by David Sacerdote ] *) Support EGD . New functions RAND_egd() and RAND_status(). In the command line application, the EGD socket can be specified like a seed file using RANDFILE or -rand. - [Ulf Möller] + [Ulf Möller] *) Allow the string CERTIFICATE to be tolerated in PKCS#7 structures. Some CAs (e.g. Verisign) distribute certificates in this form. @@ -7794,7 +7845,7 @@ des-cbc 3624.96k 5258.21k #define OPENSSL_ALGORITHM_DEFINES #include defines all pertinent NO_ symbols, such as NO_IDEA, NO_RSA, etc. - [Richard Levitte, Ulf and Bodo Möller] + [Richard Levitte, Ulf and Bodo Möller] *) Bugfix: Tolerate fragmentation and interleaving in the SSL 3/TLS record layer. @@ -7845,17 +7896,17 @@ des-cbc 3624.96k 5258.21k *) Bug fix for BN_div_recp() for numerators with an even number of bits. - [Ulf Möller] + [Ulf Möller] *) More tests in bntest.c, and changed test_bn output. - [Ulf Möller] + [Ulf Möller] *) ./config recognizes MacOS X now. [Andy Polyakov] *) Bug fix for BN_div() when the first words of num and divsor are equal (it gave wrong results if (rem=(n1-q*d0)&BN_MASK2) < d0). - [Ulf Möller] + [Ulf Möller] *) Add support for various broken PKCS#8 formats, and command line options to produce them. @@ -7863,11 +7914,11 @@ des-cbc 3624.96k 5258.21k *) New functions BN_CTX_start(), BN_CTX_get() and BT_CTX_end() to get temporary BIGNUMs from a BN_CTX. - [Ulf Möller] + [Ulf Möller] *) Correct return values in BN_mod_exp_mont() and BN_mod_exp2_mont() for p == 0. - [Ulf Möller] + [Ulf Möller] *) Change the SSLeay_add_all_*() functions to OpenSSL_add_all_*() and include a #define from the old name to the new. The original intent @@ -7891,7 +7942,7 @@ des-cbc 3624.96k 5258.21k *) Source code cleanups: use const where appropriate, eliminate casts, use void * instead of char * in lhash. - [Ulf Möller] + [Ulf Möller] *) Bugfix: ssl3_send_server_key_exchange was not restartable (the state was not changed to SSL3_ST_SW_KEY_EXCH_B, and because of @@ -7936,13 +7987,13 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) New function BN_pseudo_rand(). - [Ulf Möller] + [Ulf Möller] *) Clean up BN_mod_mul_montgomery(): replace the broken (and unreadable) bignum version of BN_from_montgomery() with the working code from SSLeay 0.9.0 (the word based version is faster anyway), and clean up the comments. - [Ulf Möller] + [Ulf Möller] *) Avoid a race condition in s2_clnt.c (function get_server_hello) that made it impossible to use the same SSL_SESSION data structure in @@ -7952,25 +8003,25 @@ des-cbc 3624.96k 5258.21k *) The return value of RAND_load_file() no longer counts bytes obtained by stat(). RAND_load_file(..., -1) is new and uses the complete file to seed the PRNG (previously an explicit byte count was required). - [Ulf Möller, Bodo Möller] + [Ulf Möller, Bodo Möller] *) Clean up CRYPTO_EX_DATA functions, some of these didn't have prototypes used (char *) instead of (void *) and had casts all over the place. [Steve Henson] *) Make BN_generate_prime() return NULL on error if ret!=NULL. - [Ulf Möller] + [Ulf Möller] *) Retain source code compatibility for BN_prime_checks macro: BN_is_prime(..., BN_prime_checks, ...) now uses BN_prime_checks_for_size to determine the appropriate number of Rabin-Miller iterations. - [Ulf Möller] + [Ulf Möller] *) Diffie-Hellman uses "safe" primes: DH_check() return code renamed to DH_CHECK_P_NOT_SAFE_PRIME. (Check if this is true? OpenPGP calls them "strong".) - [Ulf Möller] + [Ulf Möller] *) Merge the functionality of "dh" and "gendh" programs into a new program "dhparam". The old programs are retained for now but will handle DH keys @@ -8026,7 +8077,7 @@ des-cbc 3624.96k 5258.21k *) Add missing #ifndefs that caused missing symbols when building libssl as a shared library without RSA. Use #ifndef NO_SSL2 instead of NO_RSA in ssl/s2*.c. - [Kris Kennaway , modified by Ulf Möller] + [Kris Kennaway , modified by Ulf Möller] *) Precautions against using the PRNG uninitialized: RAND_bytes() now has a return value which indicates the quality of the random data @@ -8035,7 +8086,7 @@ des-cbc 3624.96k 5258.21k guaranteed to be unique but not unpredictable. RAND_add is like RAND_seed, but takes an extra argument for an entropy estimate (RAND_seed always assumes full entropy). - [Ulf Möller] + [Ulf Möller] *) Do more iterations of Rabin-Miller probable prime test (specifically, 3 for 1024-bit primes, 6 for 512-bit primes, 12 for 256-bit primes @@ -8065,7 +8116,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Honor the no-xxx Configure options when creating .DEF files. - [Ulf Möller] + [Ulf Möller] *) Add PKCS#10 attributes to field table: challengePassword, unstructuredName and unstructuredAddress. These are taken from @@ -8899,7 +8950,7 @@ des-cbc 3624.96k 5258.21k *) More DES library cleanups: remove references to srand/rand and delete an unused file. - [Ulf Möller] + [Ulf Möller] *) Add support for the the free Netwide assembler (NASM) under Win32, since not many people have MASM (ml) and it can be hard to obtain. @@ -8988,7 +9039,7 @@ des-cbc 3624.96k 5258.21k worked. *) Fix problems with no-hmac etc. - [Ulf Möller, pointed out by Brian Wellington ] + [Ulf Möller, pointed out by Brian Wellington ] *) New functions RSA_get_default_method(), RSA_set_method() and RSA_get_method(). These allows replacement of RSA_METHODs without having @@ -9105,7 +9156,7 @@ des-cbc 3624.96k 5258.21k [Ben Laurie] *) DES library cleanups. - [Ulf Möller] + [Ulf Möller] *) Add support for PKCS#5 v2.0 PBE algorithms. This will permit PKCS#8 to be used with any cipher unlike PKCS#5 v1.5 which can at most handle 64 bit @@ -9148,7 +9199,7 @@ des-cbc 3624.96k 5258.21k [Christian Forster ] *) config now generates no-xxx options for missing ciphers. - [Ulf Möller] + [Ulf Möller] *) Support the EBCDIC character set (work in progress). File ebcdic.c not yet included because it has a different license. @@ -9261,7 +9312,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Move openssl.cnf out of lib/. - [Ulf Möller] + [Ulf Möller] *) Fix various things to let OpenSSL even pass ``egcc -pipe -O2 -Wall -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes @@ -9318,10 +9369,10 @@ des-cbc 3624.96k 5258.21k [Ben Laurie] *) Support Borland C++ builder. - [Janez Jere , modified by Ulf Möller] + [Janez Jere , modified by Ulf Möller] *) Support Mingw32. - [Ulf Möller] + [Ulf Möller] *) SHA-1 cleanups and performance enhancements. [Andy Polyakov ] @@ -9330,7 +9381,7 @@ des-cbc 3624.96k 5258.21k [Andy Polyakov ] *) Accept any -xxx and +xxx compiler options in Configure. - [Ulf Möller] + [Ulf Möller] *) Update HPUX configuration. [Anonymous] @@ -9363,7 +9414,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) OAEP decoding bug fix. - [Ulf Möller] + [Ulf Möller] *) Support INSTALL_PREFIX for package builders, as proposed by David Harris. @@ -9386,21 +9437,21 @@ des-cbc 3624.96k 5258.21k [Niels Poppe ] *) New Configure option no- (rsa, idea, rc5, ...). - [Ulf Möller] + [Ulf Möller] *) Add the PKCS#12 API documentation to openssl.txt. Preliminary support for extension adding in x509 utility. [Steve Henson] *) Remove NOPROTO sections and error code comments. - [Ulf Möller] + [Ulf Möller] *) Partial rewrite of the DEF file generator to now parse the ANSI prototypes. [Steve Henson] *) New Configure options --prefix=DIR and --openssldir=DIR. - [Ulf Möller] + [Ulf Möller] *) Complete rewrite of the error code script(s). It is all now handled by one script at the top level which handles error code gathering, @@ -9429,7 +9480,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Move the autogenerated header file parts to crypto/opensslconf.h. - [Ulf Möller] + [Ulf Möller] *) Fix new 56-bit DES export ciphersuites: they were using 7 bytes instead of 8 of keying material. Merlin has also confirmed interop with this fix @@ -9447,13 +9498,13 @@ des-cbc 3624.96k 5258.21k [Andy Polyakov ] *) Change functions to ANSI C. - [Ulf Möller] + [Ulf Möller] *) Fix typos in error codes. - [Martin Kraemer , Ulf Möller] + [Martin Kraemer , Ulf Möller] *) Remove defunct assembler files from Configure. - [Ulf Möller] + [Ulf Möller] *) SPARC v8 assembler BIGNUM implementation. [Andy Polyakov ] @@ -9490,7 +9541,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) New Configure option "rsaref". - [Ulf Möller] + [Ulf Möller] *) Don't auto-generate pem.h. [Bodo Moeller] @@ -9538,7 +9589,7 @@ des-cbc 3624.96k 5258.21k *) New functions DSA_do_sign and DSA_do_verify to provide access to the raw DSA values prior to ASN.1 encoding. - [Ulf Möller] + [Ulf Möller] *) Tweaks to Configure [Niels Poppe ] @@ -9548,11 +9599,11 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) New variables $(RANLIB) and $(PERL) in the Makefiles. - [Ulf Möller] + [Ulf Möller] *) New config option to avoid instructions that are illegal on the 80386. The default code is faster, but requires at least a 486. - [Ulf Möller] + [Ulf Möller] *) Got rid of old SSL2_CLIENT_VERSION (inconsistently used) and SSL2_SERVER_VERSION (not used at all) macros, which are now the @@ -10091,7 +10142,7 @@ des-cbc 3624.96k 5258.21k Hagino ] *) File was opened incorrectly in randfile.c. - [Ulf Möller ] + [Ulf Möller ] *) Beginning of support for GeneralizedTime. d2i, i2d, check and print functions. Also ASN1_TIME suite which is a CHOICE of UTCTime or @@ -10101,7 +10152,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Correct Linux 1 recognition in config. - [Ulf Möller ] + [Ulf Möller ] *) Remove pointless MD5 hash when using DSA keys in ca. [Anonymous ] @@ -10248,7 +10299,7 @@ des-cbc 3624.96k 5258.21k *) Fix the RSA header declarations that hid a bug I fixed in 0.9.0b but was already fixed by Eric for 0.9.1 it seems. - [Ben Laurie - pointed out by Ulf Möller ] + [Ben Laurie - pointed out by Ulf Möller ] *) Autodetect FreeBSD3. [Ben Laurie] Added: vendor-crypto/openssl/dist-1.0.1/CONTRIBUTING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-crypto/openssl/dist-1.0.1/CONTRIBUTING Thu Dec 3 17:24:16 2015 (r291709) @@ -0,0 +1,38 @@ +HOW TO CONTRIBUTE TO OpenSSL +---------------------------- + +Development is coordinated on the openssl-dev mailing list (see +http://www.openssl.org for information on subscribing). If you +would like to submit a patch, send it to rt@openssl.org with +the string "[PATCH]" in the subject. Please be sure to include a +textual explanation of what your patch does. + +You can also make GitHub pull requests. If you do this, please also send +mail to rt@openssl.org with a brief description and a link to the PR so +that we can more easily keep track of it. + +If you are unsure as to whether a feature will be useful for the general +OpenSSL community please discuss it on the openssl-dev mailing list first. +Someone may be already working on the same thing or there may be a good +reason as to why that feature isn't implemented. + +Patches should be as up to date as possible, preferably relative to the +current Git or the last snapshot. They should follow our coding style +(see https://www.openssl.org/policies/codingstyle.html) and compile without +warnings using the --strict-warnings flag. OpenSSL compiles on many varied +platforms: try to ensure you only use portable features. + +Our preferred format for patch files is "git format-patch" output. For example +to provide a patch file containing the last commit in your local git repository +use the following command: + +# git format-patch --stdout HEAD^ >mydiffs.patch + +Another method of creating an acceptable patch file without using git is as +follows: + +# cd openssl-work +# [your changes] +# ./Configure dist; make clean +# cd .. +# diff -ur openssl-orig openssl-work > mydiffs.patch Modified: vendor-crypto/openssl/dist-1.0.1/Configure ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/Configure Thu Dec 3 17:23:35 2015 (r291708) +++ vendor-crypto/openssl/dist-1.0.1/Configure Thu Dec 3 17:24:16 2015 (r291709) @@ -105,6 +105,8 @@ my $usage="Usage: Configure [no- my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED"; +my $clang_devteam_warn = "-Wno-unused-parameter -Wno-missing-field-initializers -Wno-language-extension-token -Wno-extended-offsetof -Qunused-arguments"; + my $strict_warnings = 0; my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL"; @@ -197,6 +199,7 @@ my %table=( "debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"debug-linux-x86_64-clang","clang: -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -g -Wall -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "dist", "cc:-O::(unknown)::::::", # Basic configs that should work on any (32 and less bit) box @@ -361,6 +364,7 @@ my %table=( "linux-ia64-ecc","ecc:-DL_ENDIAN -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ia64-icc","icc:-DL_ENDIAN -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"linux-x86_64-clang","clang: -m64 -DL_ENDIAN -O3 -Wall -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "linux64-s390x", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", #### So called "highgprs" target for z/Architecture CPUs # "Highgprs" is kernel feature first implemented in Linux 2.6.32, see @@ -1574,11 +1578,20 @@ if ($shlib_version_number =~ /(^[0-9]*)\ if ($strict_warnings) { + my $ecc = $cc; + $ecc = "clang" if `$cc --version 2>&1` =~ /clang/; my $wopt; - die "ERROR --strict-warnings requires gcc" unless ($cc =~ /gcc$/); + die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc$/ or $ecc =~ /clang$/); foreach $wopt (split /\s+/, $gcc_devteam_warn) { - $cflags .= " $wopt" unless ($cflags =~ /$wopt/) + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) + } + if ($ecc eq "clang") + { + foreach $wopt (split /\s+/, $clang_devteam_warn) + { + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) + } } } Modified: vendor-crypto/openssl/dist-1.0.1/FAQ ============================================================================== --- vendor-crypto/openssl/dist-1.0.1/FAQ Thu Dec 3 17:23:35 2015 (r291708) +++ vendor-crypto/openssl/dist-1.0.1/FAQ Thu Dec 3 17:24:16 2015 (r291709) @@ -1,1039 +1,2 @@ -OpenSSL - Frequently Asked Questions --------------------------------------- - -[MISC] Miscellaneous questions - -* Which is the current version of OpenSSL? -* Where is the documentation? -* How can I contact the OpenSSL developers? -* Where can I get a compiled version of OpenSSL? -* Why aren't tools like 'autoconf' and 'libtool' used? -* What is an 'engine' version? -* How do I check the authenticity of the OpenSSL distribution? -* How does the versioning scheme work? - -[LEGAL] Legal questions - -* Do I need patent licenses to use OpenSSL? -* Can I use OpenSSL with GPL software? - -[USER] Questions on using the OpenSSL applications - -* Why do I get a "PRNG not seeded" error message? -* Why do I get an "unable to write 'random state'" error message? -* How do I create certificates or certificate requests? -* Why can't I create certificate requests? -* Why does fail with a certificate verify error? -* Why can I only use weak ciphers when I connect to a server using OpenSSL? -* How can I create DSA certificates? -* Why can't I make an SSL connection using a DSA certificate? -* How can I remove the passphrase on a private key? -* Why can't I use OpenSSL certificates with SSL client authentication? -* Why does my browser give a warning about a mismatched hostname? -* How do I install a CA certificate into a browser? -* Why is OpenSSL x509 DN output not conformant to RFC2253? -* What is a "128 bit certificate"? Can I create one with OpenSSL? -* Why does OpenSSL set the authority key identifier extension incorrectly? -* How can I set up a bundle of commercial root CA certificates? - -[BUILD] Questions about building and testing OpenSSL - -* Why does the linker complain about undefined symbols? -* Why does the OpenSSL test fail with "bc: command not found"? -* Why does the OpenSSL test fail with "bc: 1 no implemented"? -* Why does the OpenSSL test fail with "bc: stack empty"? -* Why does the OpenSSL compilation fail on Alpha Tru64 Unix? -* Why does the OpenSSL compilation fail with "ar: command not found"? -* Why does the OpenSSL compilation fail on Win32 with VC++? -* What is special about OpenSSL on Redhat? -* Why does the OpenSSL compilation fail on MacOS X? -* Why does the OpenSSL test suite fail on MacOS X? -* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]? -* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"? -* Why does the OpenSSL test suite fail in sha512t on x86 CPU? -* Why does compiler fail to compile sha512.c? -* Test suite still fails, what to do? -* I think I've found a bug, what should I do? -* I'm SURE I've found a bug, how do I report it? -* I've found a security issue, how do I report it? - -[PROG] Questions about programming with OpenSSL - -* Is OpenSSL thread-safe? -* I've compiled a program under Windows and it crashes: why? -* How do I read or write a DER encoded buffer using the ASN1 functions? -* OpenSSL uses DER but I need BER format: does OpenSSL support BER? -* I've tried using and I get errors why? -* I've called and it fails, why? -* I just get a load of numbers for the error output, what do they mean? -* Why do I get errors about unknown algorithms? -* Why can't the OpenSSH configure script detect OpenSSL? -* Can I use OpenSSL's SSL library with non-blocking I/O? -* Why doesn't my server application receive a client certificate? -* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? -* I think I've detected a memory leak, is this a bug? -* Why does Valgrind complain about the use of uninitialized data? -* Why doesn't a memory BIO work when a file does? -* Where are the declarations and implementations of d2i_X509() etc? - -=============================================================================== - -[MISC] ======================================================================== - -* Which is the current version of OpenSSL? - -The current version is available from . -OpenSSL 1.0.1e was released on Feb 11th, 2013. - -In addition to the current stable release, you can also access daily -snapshots of the OpenSSL development version at , or get it by anonymous Git access. - - -* Where is the documentation? - -OpenSSL is a library that provides cryptographic functionality to -applications such as secure web servers. Be sure to read the -documentation of the application you want to use. The INSTALL file -explains how to install this library. - -OpenSSL includes a command line utility that can be used to perform a -variety of cryptographic functions. It is described in the openssl(1) -manpage. Documentation for developers is currently being written. Many -manual pages are available; overviews over libcrypto and -libssl are given in the crypto(3) and ssl(3) manpages. - -The OpenSSL manpages are installed in /usr/local/ssl/man/ (or a -different directory if you specified one as described in INSTALL). -In addition, you can read the most current versions at -. Note that the online documents refer -to the very latest development versions of OpenSSL and may include features -not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. The pod format -documentation is included in each OpenSSL distribution under the docs -directory. - -There is some documentation about certificate extensions and PKCS#12 -in doc/openssl.txt - -The original SSLeay documentation is included in OpenSSL as -doc/ssleay.txt. It may be useful when none of the other resources -help, but please note that it reflects the obsolete version SSLeay -0.6.6. - - -* How can I contact the OpenSSL developers? - -The README file describes how to submit bug reports and patches to -OpenSSL. Information on the OpenSSL mailing lists is available from -. - - -* Where can I get a compiled version of OpenSSL? - -You can finder pointers to binary distributions in - . - -Some applications that use OpenSSL are distributed in binary form. -When using such an application, you don't need to install OpenSSL -yourself; the application will include the required parts (e.g. DLLs). - -If you want to build OpenSSL on a Windows system and you don't have -a C compiler, read the "Mingw32" section of INSTALL.W32 for information -on how to obtain and install the free GNU C compiler. - -A number of Linux and *BSD distributions include OpenSSL. - - -* Why aren't tools like 'autoconf' and 'libtool' used? - -autoconf will probably be used in future OpenSSL versions. If it was -less Unix-centric, it might have been used much earlier. - -* What is an 'engine' version? - -With version 0.9.6 OpenSSL was extended to interface to external crypto -hardware. This was realized in a special release '0.9.6-engine'. With -version 0.9.7 the changes were merged into the main development line, -so that the special release is no longer necessary. - -* How do I check the authenticity of the OpenSSL distribution? - -We provide MD5 digests and ASC signatures of each tarball. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 3 17:25:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72426A3FF2F; Thu, 3 Dec 2015 17:25:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2904917A1; Thu, 3 Dec 2015 17:25:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3HOxnt075576; Thu, 3 Dec 2015 17:24:59 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3HOxQ2075575; Thu, 3 Dec 2015 17:24:59 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201512031724.tB3HOxQ2075575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 3 Dec 2015 17:24:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r291710 - vendor-crypto/openssl/1.0.1q X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 17:25:00 -0000 Author: jkim Date: Thu Dec 3 17:24:59 2015 New Revision: 291710 URL: https://svnweb.freebsd.org/changeset/base/291710 Log: Tag OpenSSL 1.0.1q. Added: vendor-crypto/openssl/1.0.1q/ - copied from r291709, vendor-crypto/openssl/dist-1.0.1/ From owner-svn-src-all@freebsd.org Thu Dec 3 17:25:28 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 387B5A3FFA3; Thu, 3 Dec 2015 17:25:28 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0FB419FF; Thu, 3 Dec 2015 17:25:27 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3HPRYC075754; Thu, 3 Dec 2015 17:25:27 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3HPQn0075751; Thu, 3 Dec 2015 17:25:26 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201512031725.tB3HPQn0075751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 3 Dec 2015 17:25:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r291711 - in vendor-crypto/openssl/dist-0.9.8: . apps crypto crypto/asn1 crypto/des/t crypto/evp doc doc/crypto ssl test util X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 17:25:28 -0000 Author: jkim Date: Thu Dec 3 17:25:26 2015 New Revision: 291711 URL: https://svnweb.freebsd.org/changeset/base/291711 Log: Import OpenSSL 0.9.8zh. Added: vendor-crypto/openssl/dist-0.9.8/doc/dir-locals.example.el vendor-crypto/openssl/dist-0.9.8/doc/openssl-c-indent.el Deleted: vendor-crypto/openssl/dist-0.9.8/crypto/des/t/test vendor-crypto/openssl/dist-0.9.8/test/bctest vendor-crypto/openssl/dist-0.9.8/util/pod2mantest Modified: vendor-crypto/openssl/dist-0.9.8/CHANGES vendor-crypto/openssl/dist-0.9.8/FAQ vendor-crypto/openssl/dist-0.9.8/FREEBSD-Xlist vendor-crypto/openssl/dist-0.9.8/FREEBSD-upgrade vendor-crypto/openssl/dist-0.9.8/Makefile vendor-crypto/openssl/dist-0.9.8/Makefile.org vendor-crypto/openssl/dist-0.9.8/NEWS vendor-crypto/openssl/dist-0.9.8/README vendor-crypto/openssl/dist-0.9.8/apps/asn1pars.c vendor-crypto/openssl/dist-0.9.8/crypto/asn1/asn1_par.c vendor-crypto/openssl/dist-0.9.8/crypto/asn1/tasn_dec.c vendor-crypto/openssl/dist-0.9.8/crypto/evp/e_des3.c vendor-crypto/openssl/dist-0.9.8/crypto/mem_clr.c vendor-crypto/openssl/dist-0.9.8/crypto/opensslv.h vendor-crypto/openssl/dist-0.9.8/doc/crypto/X509_NAME_get_index_by_NID.pod vendor-crypto/openssl/dist-0.9.8/openssl.spec vendor-crypto/openssl/dist-0.9.8/ssl/ssl_sess.c vendor-crypto/openssl/dist-0.9.8/ssl/ssltest.c Modified: vendor-crypto/openssl/dist-0.9.8/CHANGES ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/CHANGES Thu Dec 3 17:24:59 2015 (r291710) +++ vendor-crypto/openssl/dist-0.9.8/CHANGES Thu Dec 3 17:25:26 2015 (r291711) @@ -2,6 +2,20 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8zg and 0.9.8zh [3 Dec 2015] + + *) X509_ATTRIBUTE memory leak + + When presented with a malformed X509_ATTRIBUTE structure OpenSSL will leak + memory. This structure is used by the PKCS#7 and CMS routines so any + application which reads PKCS#7 or CMS data from untrusted sources is + affected. SSL/TLS is not affected. + + This issue was reported to OpenSSL by Adam Langley (Google/BoringSSL) using + libFuzzer. + (CVE-2015-3195) + [Stephen Henson] + Changes between 0.9.8zf and 0.9.8zg [11 Jun 2015] *) Malformed ECParameters causes infinite loop Modified: vendor-crypto/openssl/dist-0.9.8/FAQ ============================================================================== --- vendor-crypto/openssl/dist-0.9.8/FAQ Thu Dec 3 17:24:59 2015 (r291710) +++ vendor-crypto/openssl/dist-0.9.8/FAQ Thu Dec 3 17:25:26 2015 (r291711) @@ -1,1039 +1,2 @@ -OpenSSL - Frequently Asked Questions --------------------------------------- - -[MISC] Miscellaneous questions - -* Which is the current version of OpenSSL? -* Where is the documentation? -* How can I contact the OpenSSL developers? -* Where can I get a compiled version of OpenSSL? -* Why aren't tools like 'autoconf' and 'libtool' used? -* What is an 'engine' version? -* How do I check the authenticity of the OpenSSL distribution? -* How does the versioning scheme work? - -[LEGAL] Legal questions - -* Do I need patent licenses to use OpenSSL? -* Can I use OpenSSL with GPL software? - -[USER] Questions on using the OpenSSL applications - -* Why do I get a "PRNG not seeded" error message? -* Why do I get an "unable to write 'random state'" error message? -* How do I create certificates or certificate requests? -* Why can't I create certificate requests? -* Why does fail with a certificate verify error? -* Why can I only use weak ciphers when I connect to a server using OpenSSL? -* How can I create DSA certificates? -* Why can't I make an SSL connection using a DSA certificate? -* How can I remove the passphrase on a private key? -* Why can't I use OpenSSL certificates with SSL client authentication? -* Why does my browser give a warning about a mismatched hostname? -* How do I install a CA certificate into a browser? -* Why is OpenSSL x509 DN output not conformant to RFC2253? -* What is a "128 bit certificate"? Can I create one with OpenSSL? -* Why does OpenSSL set the authority key identifier extension incorrectly? -* How can I set up a bundle of commercial root CA certificates? - -[BUILD] Questions about building and testing OpenSSL - -* Why does the linker complain about undefined symbols? -* Why does the OpenSSL test fail with "bc: command not found"? -* Why does the OpenSSL test fail with "bc: 1 no implemented"? -* Why does the OpenSSL test fail with "bc: stack empty"? -* Why does the OpenSSL compilation fail on Alpha Tru64 Unix? -* Why does the OpenSSL compilation fail with "ar: command not found"? -* Why does the OpenSSL compilation fail on Win32 with VC++? -* What is special about OpenSSL on Redhat? -* Why does the OpenSSL compilation fail on MacOS X? -* Why does the OpenSSL test suite fail on MacOS X? -* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]? -* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"? -* Why does the OpenSSL test suite fail in sha512t on x86 CPU? -* Why does compiler fail to compile sha512.c? -* Test suite still fails, what to do? -* I think I've found a bug, what should I do? -* I'm SURE I've found a bug, how do I report it? -* I've found a security issue, how do I report it? - -[PROG] Questions about programming with OpenSSL - -* Is OpenSSL thread-safe? -* I've compiled a program under Windows and it crashes: why? -* How do I read or write a DER encoded buffer using the ASN1 functions? -* OpenSSL uses DER but I need BER format: does OpenSSL support BER? -* I've tried using and I get errors why? -* I've called and it fails, why? -* I just get a load of numbers for the error output, what do they mean? -* Why do I get errors about unknown algorithms? -* Why can't the OpenSSH configure script detect OpenSSL? -* Can I use OpenSSL's SSL library with non-blocking I/O? -* Why doesn't my server application receive a client certificate? -* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? -* I think I've detected a memory leak, is this a bug? -* Why does Valgrind complain about the use of uninitialized data? -* Why doesn't a memory BIO work when a file does? -* Where are the declarations and implementations of d2i_X509() etc? - -=============================================================================== - -[MISC] ======================================================================== - -* Which is the current version of OpenSSL? - -The current version is available from . -OpenSSL 1.0.1d was released on Feb 5th, 2013. - -In addition to the current stable release, you can also access daily -snapshots of the OpenSSL development version at , or get it by anonymous Git access. - - -* Where is the documentation? - -OpenSSL is a library that provides cryptographic functionality to -applications such as secure web servers. Be sure to read the -documentation of the application you want to use. The INSTALL file -explains how to install this library. - -OpenSSL includes a command line utility that can be used to perform a -variety of cryptographic functions. It is described in the openssl(1) -manpage. Documentation for developers is currently being written. Many -manual pages are available; overviews over libcrypto and -libssl are given in the crypto(3) and ssl(3) manpages. - -The OpenSSL manpages are installed in /usr/local/ssl/man/ (or a -different directory if you specified one as described in INSTALL). -In addition, you can read the most current versions at -. Note that the online documents refer -to the very latest development versions of OpenSSL and may include features -not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. The pod format -documentation is included in each OpenSSL distribution under the docs -directory. - -There is some documentation about certificate extensions and PKCS#12 -in doc/openssl.txt - -The original SSLeay documentation is included in OpenSSL as -doc/ssleay.txt. It may be useful when none of the other resources -help, but please note that it reflects the obsolete version SSLeay -0.6.6. - - -* How can I contact the OpenSSL developers? - -The README file describes how to submit bug reports and patches to -OpenSSL. Information on the OpenSSL mailing lists is available from -. - - -* Where can I get a compiled version of OpenSSL? - -You can finder pointers to binary distributions in - . - -Some applications that use OpenSSL are distributed in binary form. -When using such an application, you don't need to install OpenSSL -yourself; the application will include the required parts (e.g. DLLs). - -If you want to build OpenSSL on a Windows system and you don't have -a C compiler, read the "Mingw32" section of INSTALL.W32 for information -on how to obtain and install the free GNU C compiler. - -A number of Linux and *BSD distributions include OpenSSL. - - -* Why aren't tools like 'autoconf' and 'libtool' used? - -autoconf will probably be used in future OpenSSL versions. If it was -less Unix-centric, it might have been used much earlier. - -* What is an 'engine' version? - -With version 0.9.6 OpenSSL was extended to interface to external crypto -hardware. This was realized in a special release '0.9.6-engine'. With -version 0.9.7 the changes were merged into the main development line, -so that the special release is no longer necessary. - -* How do I check the authenticity of the OpenSSL distribution? - -We provide MD5 digests and ASC signatures of each tarball. -Use MD5 to check that a tarball from a mirror site is identical: - - md5sum TARBALL | awk '{print $1;}' | cmp - TARBALL.md5 - -You can check authenticity using pgp or gpg. You need the OpenSSL team -member public key used to sign it (download it from a key server, see a -list of keys at ). Then -just do: - - pgp TARBALL.asc - -* How does the versioning scheme work? - -After the release of OpenSSL 1.0.0 the versioning scheme changed. Letter -releases (e.g. 1.0.1a) can only contain bug and security fixes and no -new features. Minor releases change the last number (e.g. 1.0.2) and -can contain new features that retain binary compatibility. Changes to -the middle number are considered major releases and neither source nor -binary compatibility is guaranteed. - -Therefore the answer to the common question "when will feature X be -backported to OpenSSL 1.0.0/0.9.8?" is "never" but it could appear -in the next minor release. - -[LEGAL] ======================================================================= - -* Do I need patent licenses to use OpenSSL? - -The patents section of the README file lists patents that may apply to -you if you want to use OpenSSL. For information on intellectual -property rights, please consult a lawyer. The OpenSSL team does not -offer legal advice. - -You can configure OpenSSL so as not to use IDEA, MDC2 and RC5 by using - ./config no-idea no-mdc2 no-rc5 - - -* Can I use OpenSSL with GPL software? - -On many systems including the major Linux and BSD distributions, yes (the -GPL does not place restrictions on using libraries that are part of the -normal operating system distribution). - -On other systems, the situation is less clear. Some GPL software copyright -holders claim that you infringe on their rights if you use OpenSSL with -their software on operating systems that don't normally include OpenSSL. - -If you develop open source software that uses OpenSSL, you may find it -useful to choose an other license than the GPL, or state explicitly that -"This program is released under the GPL with the additional exemption that -compiling, linking, and/or using OpenSSL is allowed." If you are using -GPL software developed by others, you may want to ask the copyright holder -for permission to use their software with OpenSSL. - - -[USER] ======================================================================== - -* Why do I get a "PRNG not seeded" error message? - -Cryptographic software needs a source of unpredictable data to work -correctly. Many open source operating systems provide a "randomness -device" (/dev/urandom or /dev/random) that serves this purpose. -All OpenSSL versions try to use /dev/urandom by default; starting with -version 0.9.7, OpenSSL also tries /dev/random if /dev/urandom is not -available. - -On other systems, applications have to call the RAND_add() or -RAND_seed() function with appropriate data before generating keys or -performing public key encryption. (These functions initialize the -pseudo-random number generator, PRNG.) Some broken applications do -not do this. As of version 0.9.5, the OpenSSL functions that need -randomness report an error if the random number generator has not been -seeded with at least 128 bits of randomness. If this error occurs and -is not discussed in the documentation of the application you are -using, please contact the author of that application; it is likely -that it never worked correctly. OpenSSL 0.9.5 and later make the -error visible by refusing to perform potentially insecure encryption. - -If you are using Solaris 8, you can add /dev/urandom and /dev/random -devices by installing patch 112438 (Sparc) or 112439 (x86), which are -available via the Patchfinder at -(Solaris 9 includes these devices by default). For /dev/random support -for earlier Solaris versions, see Sun's statement at - -(the SUNWski package is available in patch 105710). - -On systems without /dev/urandom and /dev/random, it is a good idea to -use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for -details. Starting with version 0.9.7, OpenSSL will automatically look -for an EGD socket at /var/run/egd-pool, /dev/egd-pool, /etc/egd-pool and -/etc/entropy. - -Most components of the openssl command line utility automatically try -to seed the random number generator from a file. The name of the -default seeding file is determined as follows: If environment variable -RANDFILE is set, then it names the seeding file. Otherwise if -environment variable HOME is set, then the seeding file is $HOME/.rnd. -If neither RANDFILE nor HOME is set, versions up to OpenSSL 0.9.6 will -use file .rnd in the current directory while OpenSSL 0.9.6a uses no -default seeding file at all. OpenSSL 0.9.6b and later will behave -similarly to 0.9.6a, but will use a default of "C:\" for HOME on -Windows systems if the environment variable has not been set. - -If the default seeding file does not exist or is too short, the "PRNG -not seeded" error message may occur. - -The openssl command line utility will write back a new state to the -default seeding file (and create this file if necessary) unless -there was no sufficient seeding. - -Pointing $RANDFILE to an Entropy Gathering Daemon socket does not work. -Use the "-rand" option of the OpenSSL command line tools instead. -The $RANDFILE environment variable and $HOME/.rnd are only used by the -OpenSSL command line tools. Applications using the OpenSSL library -provide their own configuration options to specify the entropy source, -please check out the documentation coming the with application. - - -* Why do I get an "unable to write 'random state'" error message? - - -Sometimes the openssl command line utility does not abort with -a "PRNG not seeded" error message, but complains that it is -"unable to write 'random state'". This message refers to the -default seeding file (see previous answer). A possible reason -is that no default filename is known because neither RANDFILE -nor HOME is set. (Versions up to 0.9.6 used file ".rnd" in the -current directory in this case, but this has changed with 0.9.6a.) - - -* How do I create certificates or certificate requests? - -Check out the CA.pl(1) manual page. This provides a simple wrapper round -the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check -out the manual pages for the individual utilities and the certificate -extensions documentation (in ca(1), req(1), x509v3_config(5) ) - - -* Why can't I create certificate requests? - -You typically get the error: - - unable to find 'distinguished_name' in config - problems making Certificate Request - -This is because it can't find the configuration file. Check out the -DIAGNOSTICS section of req(1) for more information. - - -* Why does fail with a certificate verify error? - -This problem is usually indicated by log messages saying something like -"unable to get local issuer certificate" or "self signed certificate". -When a certificate is verified its root CA must be "trusted" by OpenSSL -this typically means that the CA certificate must be placed in a directory -or file and the relevant program configured to read it. The OpenSSL program -'verify' behaves in a similar way and issues similar error messages: check -the verify(1) program manual page for more information. - - -* Why can I only use weak ciphers when I connect to a server using OpenSSL? - -This is almost certainly because you are using an old "export grade" browser -which only supports weak encryption. Upgrade your browser to support 128 bit -ciphers. - - -* How can I create DSA certificates? - -Check the CA.pl(1) manual page for a DSA certificate example. - - -* Why can't I make an SSL connection to a server using a DSA certificate? - -Typically you'll see a message saying there are no shared ciphers when -the same setup works fine with an RSA certificate. There are two possible -causes. The client may not support connections to DSA servers most web -browsers (including Netscape and MSIE) only support connections to servers -supporting RSA cipher suites. The other cause is that a set of DH parameters -has not been supplied to the server. DH parameters can be created with the -dhparam(1) command and loaded using the SSL_CTX_set_tmp_dh() for example: -check the source to s_server in apps/s_server.c for an example. - - -* How can I remove the passphrase on a private key? - -Firstly you should be really *really* sure you want to do this. Leaving -a private key unencrypted is a major security risk. If you decide that -you do have to do this check the EXAMPLES sections of the rsa(1) and -dsa(1) manual pages. - - -* Why can't I use OpenSSL certificates with SSL client authentication? - -What will typically happen is that when a server requests authentication -it will either not include your certificate or tell you that you have -no client certificates (Netscape) or present you with an empty list box -(MSIE). The reason for this is that when a server requests a client -certificate it includes a list of CAs names which it will accept. Browsers -will only let you select certificates from the list on the grounds that -there is little point presenting a certificate which the server will -reject. - -The solution is to add the relevant CA certificate to your servers "trusted -CA list". How you do this depends on the server software in uses. You can -print out the servers list of acceptable CAs using the OpenSSL s_client tool: - -openssl s_client -connect www.some.host:443 -prexit - -If your server only requests certificates on certain URLs then you may need -to manually issue an HTTP GET command to get the list when s_client connects: - -GET /some/page/needing/a/certificate.html - -If your CA does not appear in the list then this confirms the problem. - - -* Why does my browser give a warning about a mismatched hostname? - -Browsers expect the server's hostname to match the value in the commonName -(CN) field of the certificate. If it does not then you get a warning. - - -* How do I install a CA certificate into a browser? - -The usual way is to send the DER encoded certificate to the browser as -MIME type application/x-x509-ca-cert, for example by clicking on an appropriate -link. On MSIE certain extensions such as .der or .cacert may also work, or you -can import the certificate using the certificate import wizard. - -You can convert a certificate to DER form using the command: - -openssl x509 -in ca.pem -outform DER -out ca.der - -Occasionally someone suggests using a command such as: - -openssl pkcs12 -export -out cacert.p12 -in cacert.pem -inkey cakey.pem - -DO NOT DO THIS! This command will give away your CAs private key and -reduces its security to zero: allowing anyone to forge certificates in -whatever name they choose. - -* Why is OpenSSL x509 DN output not conformant to RFC2253? - -The ways to print out the oneline format of the DN (Distinguished Name) have -been extended in version 0.9.7 of OpenSSL. Using the new X509_NAME_print_ex() -interface, the "-nameopt" option could be introduded. See the manual -page of the "openssl x509" commandline tool for details. The old behaviour -has however been left as default for the sake of compatibility. - -* What is a "128 bit certificate"? Can I create one with OpenSSL? - -The term "128 bit certificate" is a highly misleading marketing term. It does -*not* refer to the size of the public key in the certificate! A certificate -containing a 128 bit RSA key would have negligible security. - -There were various other names such as "magic certificates", "SGC -certificates", "step up certificates" etc. - -You can't generally create such a certificate using OpenSSL but there is no -need to any more. Nowadays web browsers using unrestricted strong encryption -are generally available. - -When there were tight restrictions on the export of strong encryption -software from the US only weak encryption algorithms could be freely exported -(initially 40 bit and then 56 bit). It was widely recognised that this was -inadequate. A relaxation of the rules allowed the use of strong encryption but -only to an authorised server. - -Two slighly different techniques were developed to support this, one used by -Netscape was called "step up", the other used by MSIE was called "Server Gated -Cryptography" (SGC). When a browser initially connected to a server it would -check to see if the certificate contained certain extensions and was issued by -an authorised authority. If these test succeeded it would reconnect using -strong encryption. - -Only certain (initially one) certificate authorities could issue the -certificates and they generally cost more than ordinary certificates. - -Although OpenSSL can create certificates containing the appropriate extensions -the certificate would not come from a permitted authority and so would not -be recognized. - -The export laws were later changed to allow almost unrestricted use of strong -encryption so these certificates are now obsolete. - - -* Why does OpenSSL set the authority key identifier (AKID) extension incorrectly? - -It doesn't: this extension is often the cause of confusion. - -Consider a certificate chain A->B->C so that A signs B and B signs C. Suppose -certificate C contains AKID. - -The purpose of this extension is to identify the authority certificate B. This -can be done either by including the subject key identifier of B or its issuer -name and serial number. - -In this latter case because it is identifying certifcate B it must contain the -issuer name and serial number of B. - -It is often wrongly assumed that it should contain the subject name of B. If it -did this would be redundant information because it would duplicate the issuer -name of C. - - -* How can I set up a bundle of commercial root CA certificates? - -The OpenSSL software is shipped without any root CA certificate as the -OpenSSL project does not have any policy on including or excluding -any specific CA and does not intend to set up such a policy. Deciding -about which CAs to support is up to application developers or -administrators. - -Other projects do have other policies so you can for example extract the CA -bundle used by Mozilla and/or modssl as described in this article: - - - - -[BUILD] ======================================================================= - -* Why does the linker complain about undefined symbols? - -Maybe the compilation was interrupted, and make doesn't notice that -something is missing. Run "make clean; make". - -If you used ./Configure instead of ./config, make sure that you -selected the right target. File formats may differ slightly between -OS versions (for example sparcv8/sparcv9, or a.out/elf). - -In case you get errors about the following symbols, use the config -option "no-asm", as described in INSTALL: - - BF_cbc_encrypt, BF_decrypt, BF_encrypt, CAST_cbc_encrypt, - CAST_decrypt, CAST_encrypt, RC4, RC5_32_cbc_encrypt, RC5_32_decrypt, - RC5_32_encrypt, bn_add_words, bn_div_words, bn_mul_add_words, - bn_mul_comba4, bn_mul_comba8, bn_mul_words, bn_sqr_comba4, - bn_sqr_comba8, bn_sqr_words, bn_sub_words, des_decrypt3, - des_ede3_cbc_encrypt, des_encrypt, des_encrypt2, des_encrypt3, - des_ncbc_encrypt, md5_block_asm_host_order, sha1_block_asm_data_order - -If none of these helps, you may want to try using the current snapshot. -If the problem persists, please submit a bug report. - - -* Why does the OpenSSL test fail with "bc: command not found"? - -You didn't install "bc", the Unix calculator. If you want to run the -tests, get GNU bc from ftp://ftp.gnu.org or from your OS distributor. - - -* Why does the OpenSSL test fail with "bc: 1 no implemented"? - -On some SCO installations or versions, bc has a bug that gets triggered -when you run the test suite (using "make test"). The message returned is -"bc: 1 not implemented". - -The best way to deal with this is to find another implementation of bc -and compile/install it. GNU bc (see -for download instructions) can be safely used, for example. - - -* Why does the OpenSSL test fail with "bc: stack empty"? - -On some DG/ux versions, bc seems to have a too small stack for calculations -that the OpenSSL bntest throws at it. This gets triggered when you run the -test suite (using "make test"). The message returned is "bc: stack empty". - -The best way to deal with this is to find another implementation of bc -and compile/install it. GNU bc (see -for download instructions) can be safely used, for example. - - -* Why does the OpenSSL compilation fail on Alpha Tru64 Unix? - -On some Alpha installations running Tru64 Unix and Compaq C, the compilation -of crypto/sha/sha_dgst.c fails with the message 'Fatal: Insufficient virtual -memory to continue compilation.' As far as the tests have shown, this may be -a compiler bug. What happens is that it eats up a lot of resident memory -to build something, probably a table. The problem is clearly in the -optimization code, because if one eliminates optimization completely (-O0), -the compilation goes through (and the compiler consumes about 2MB of resident -memory instead of 240MB or whatever one's limit is currently). - -There are three options to solve this problem: - -1. set your current data segment size soft limit higher. Experience shows -that about 241000 kbytes seems to be enough on an AlphaServer DS10. You do -this with the command 'ulimit -Sd nnnnnn', where 'nnnnnn' is the number of -kbytes to set the limit to. - -2. If you have a hard limit that is lower than what you need and you can't -get it changed, you can compile all of OpenSSL with -O0 as optimization -level. This is however not a very nice thing to do for those who expect to -get the best result from OpenSSL. A bit more complicated solution is the -following: - ------ snip:start ----- - make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile.ssl | \ - sed -e 's/ -O[0-9] / -O0 /'`" - rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'` - make ------ snip:end ----- - -This will only compile sha_dgst.c with -O0, the rest with the optimization -level chosen by the configuration process. When the above is done, do the -test and installation and you're set. - -3. Reconfigure the toolkit with no-sha0 option to leave out SHA0. It -should not be used and is not used in SSL/TLS nor any other recognized -protocol in either case. - - -* Why does the OpenSSL compilation fail with "ar: command not found"? - -Getting this message is quite usual on Solaris 2, because Sun has hidden -away 'ar' and other development commands in directories that aren't in -$PATH by default. One of those directories is '/usr/ccs/bin'. The -quickest way to fix this is to do the following (it assumes you use sh -or any sh-compatible shell): - ------ snip:start ----- - PATH=${PATH}:/usr/ccs/bin; export PATH ------ snip:end ----- - -and then redo the compilation. What you should really do is make sure -'/usr/ccs/bin' is permanently in your $PATH, for example through your -'.profile' (again, assuming you use a sh-compatible shell). - - -* Why does the OpenSSL compilation fail on Win32 with VC++? - -Sometimes, you may get reports from VC++ command line (cl) that it -can't find standard include files like stdio.h and other weirdnesses. -One possible cause is that the environment isn't correctly set up. -To solve that problem for VC++ versions up to 6, one should run -VCVARS32.BAT which is found in the 'bin' subdirectory of the VC++ -installation directory (somewhere under 'Program Files'). For VC++ -version 7 (and up?), which is also called VS.NET, the file is called -VSVARS32.BAT instead. -This needs to be done prior to running NMAKE, and the changes are only -valid for the current DOS session. - - -* What is special about OpenSSL on Redhat? - -Red Hat Linux (release 7.0 and later) include a preinstalled limited -version of OpenSSL. For patent reasons, support for IDEA, RC5 and MDC2 -is disabled in this version. The same may apply to other Linux distributions. -Users may therefore wish to install more or all of the features left out. - -To do this you MUST ensure that you do not overwrite the openssl that is in -/usr/bin on your Red Hat machine. Several packages depend on this file, -including sendmail and ssh. /usr/local/bin is a good alternative choice. The -libraries that come with Red Hat 7.0 onwards have different names and so are -not affected. (eg For Red Hat 7.2 they are /lib/libssl.so.0.9.6b and -/lib/libcrypto.so.0.9.6b with symlinks /lib/libssl.so.2 and -/lib/libcrypto.so.2 respectively). - -Please note that we have been advised by Red Hat attempting to recompile the -openssl rpm with all the cryptography enabled will not work. All other -packages depend on the original Red Hat supplied openssl package. It is also -worth noting that due to the way Red Hat supplies its packages, updates to -openssl on each distribution never change the package version, only the -build number. For example, on Red Hat 7.1, the latest openssl package has -version number 0.9.6 and build number 9 even though it contains all the -relevant updates in packages up to and including 0.9.6b. - -A possible way around this is to persuade Red Hat to produce a non-US -version of Red Hat Linux. - -FYI: Patent numbers and expiry dates of US patents: -MDC-2: 4,908,861 13/03/2007 -IDEA: 5,214,703 25/05/2010 -RC5: 5,724,428 03/03/2015 - - -* Why does the OpenSSL compilation fail on MacOS X? - -If the failure happens when trying to build the "openssl" binary, with -a large number of undefined symbols, it's very probable that you have -OpenSSL 0.9.6b delivered with the operating system (you can find out by -running '/usr/bin/openssl version') and that you were trying to build -OpenSSL 0.9.7 or newer. The problem is that the loader ('ld') in -MacOS X has a misfeature that's quite difficult to go around. -Look in the file PROBLEMS for a more detailed explanation and for possible -solutions. - - -* Why does the OpenSSL test suite fail on MacOS X? - -If the failure happens when running 'make test' and the RC4 test fails, -it's very probable that you have OpenSSL 0.9.6b delivered with the -operating system (you can find out by running '/usr/bin/openssl version') -and that you were trying to build OpenSSL 0.9.6d. The problem is that -the loader ('ld') in MacOS X has a misfeature that's quite difficult to -go around and has linked the programs "openssl" and the test programs -with /usr/lib/libcrypto.dylib and /usr/lib/libssl.dylib instead of the -libraries you just built. -Look in the file PROBLEMS for a more detailed explanation and for possible -solutions. - -* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]? - -Failure in BN_sqr test is most likely caused by a failure to configure the -toolkit for current platform or lack of support for the platform in question. -Run './config -t' and './apps/openssl version -p'. Do these platform -identifiers match? If they don't, then you most likely failed to run -./config and you're hereby advised to do so before filing a bug report. -If ./config itself fails to run, then it's most likely problem with your -local environment and you should turn to your system administrator (or -similar). If identifiers match (and/or no alternative identifier is -suggested by ./config script), then the platform is unsupported. There might -or might not be a workaround. Most notably on SPARC64 platforms with GNU -C compiler you should be able to produce a working build by running -'./config -m32'. I understand that -m32 might not be what you want/need, -but the build should be operational. For further details turn to -. - -* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"? - -As of 0.9.7 assembler routines were overhauled for position independence -of the machine code, which is essential for shared library support. For -some reason OpenBSD is equipped with an out-of-date GNU assembler which -finds the new code offensive. To work around the problem, configure with -no-asm (and sacrifice a great deal of performance) or patch your assembler -according to . -For your convenience a pre-compiled replacement binary is provided at -. -Reportedly elder *BSD a.out platforms also suffer from this problem and -remedy should be same. Provided binary is statically linked and should be -working across wider range of *BSD branches, not just OpenBSD. - -* Why does the OpenSSL test suite fail in sha512t on x86 CPU? - -If the test program in question fails withs SIGILL, Illegal Instruction -exception, then you more than likely to run SSE2-capable CPU, such as -Intel P4, under control of kernel which does not support SSE2 -instruction extentions. See accompanying INSTALL file and -OPENSSL_ia32cap(3) documentation page for further information. - -* Why does compiler fail to compile sha512.c? - -OpenSSL SHA-512 implementation depends on compiler support for 64-bit -integer type. Few elder compilers [ULTRIX cc, SCO compiler to mention a -couple] lack support for this and therefore are incapable of compiling -the module in question. The recommendation is to disable SHA-512 by -adding no-sha512 to ./config [or ./Configure] command line. Another -possible alternative might be to switch to GCC. - -* Test suite still fails, what to do? - -Another common reason for failure to complete some particular test is -simply bad code generated by a buggy component in toolchain or deficiency -in run-time environment. There are few cases documented in PROBLEMS file, -consult it for possible workaround before you beat the drum. Even if you -don't find solution or even mention there, do reserve for possibility of -a compiler bug. Compiler bugs might appear in rather bizarre ways, they -never make sense, and tend to emerge when you least expect them. In order -to identify one, drop optimization level, e.g. by editing CFLAG line in -top-level Makefile, recompile and re-run the test. - -* I think I've found a bug, what should I do? - -If you are a new user then it is quite likely you haven't found a bug and -something is happening you aren't familiar with. Check this FAQ, the associated -documentation and the mailing lists for similar queries. If you are still -unsure whether it is a bug or not submit a query to the openssl-users mailing -list. - - -* I'm SURE I've found a bug, how do I report it? - -Bug reports with no security implications should be sent to the request -tracker. This can be done by mailing the report to (or its -alias ), please note that messages sent to the -request tracker also appear in the public openssl-dev mailing list. - -The report should be in plain text. Any patches should be sent as -plain text attachments because some mailers corrupt patches sent inline. -If your issue affects multiple versions of OpenSSL check any patches apply -cleanly and, if possible include patches to each affected version. - -The report should be given a meaningful subject line briefly summarising the -issue. Just "bug in OpenSSL" or "bug in OpenSSL 0.9.8n" is not very helpful. - -By sending reports to the request tracker the bug can then be given a priority -and assigned to the appropriate maintainer. The history of discussions can be -accessed and if the issue has been addressed or a reason why not. If patches -are only sent to openssl-dev they can be mislaid if a team member has to -wade through months of old messages to review the discussion. - -See also - - -* I've found a security issue, how do I report it? - -If you think your bug has security implications then please send it to -openssl-security@openssl.org if you don't get a prompt reply at least -acknowledging receipt then resend or mail it directly to one of the -more active team members (e.g. Steve). - -Note that bugs only present in the openssl utility are not in general -considered to be security issues. - -[PROG] ======================================================================== - -* Is OpenSSL thread-safe? - -Yes (with limitations: an SSL connection may not concurrently be used -by multiple threads). On Windows and many Unix systems, OpenSSL -automatically uses the multi-threaded versions of the standard -libraries. If your platform is not one of these, consult the INSTALL -file. - -Multi-threaded applications must provide two callback functions to -OpenSSL by calling CRYPTO_set_locking_callback() and -CRYPTO_set_id_callback(), for all versions of OpenSSL up to and -including 0.9.8[abc...]. As of version 1.0.0, CRYPTO_set_id_callback() -and associated APIs are deprecated by CRYPTO_THREADID_set_callback() -and friends. This is described in the threads(3) manpage. - -* I've compiled a program under Windows and it crashes: why? - -This is usually because you've missed the comment in INSTALL.W32. -Your application must link against the same version of the Win32 -C-Runtime against which your openssl libraries were linked. The -default version for OpenSSL is /MD - "Multithreaded DLL". - -If you are using Microsoft Visual C++'s IDE (Visual Studio), in -many cases, your new project most likely defaulted to "Debug -Singlethreaded" - /ML. This is NOT interchangeable with /MD and your -program will crash, typically on the first BIO related read or write -operation. - -For each of the six possible link stage configurations within Win32, -your application must link against the same by which OpenSSL was -built. If you are using MS Visual C++ (Studio) this can be changed -by: - - 1. Select Settings... from the Project Menu. - 2. Select the C/C++ Tab. - 3. Select "Code Generation from the "Category" drop down list box - 4. Select the Appropriate library (see table below) from the "Use - run-time library" drop down list box. Perform this step for both - your debug and release versions of your application (look at the - top left of the settings panel to change between the two) - - Single Threaded /ML - MS VC++ often defaults to - this for the release - version of a new project. - Debug Single Threaded /MLd - MS VC++ often defaults to - this for the debug version - of a new project. - Multithreaded /MT - Debug Multithreaded /MTd - Multithreaded DLL /MD - OpenSSL defaults to this. - Debug Multithreaded DLL /MDd - -Note that debug and release libraries are NOT interchangeable. If you -built OpenSSL with /MD your application must use /MD and cannot use /MDd. - -As per 0.9.8 the above limitation is eliminated for .DLLs. OpenSSL -.DLLs compiled with some specific run-time option [we insist on the -default /MD] can be deployed with application compiled with different -option or even different compiler. But there is a catch! Instead of -re-compiling OpenSSL toolkit, as you would have to with prior versions, -you have to compile small C snippet with compiler and/or options of -your choice. The snippet gets installed as -/include/openssl/applink.c and should be either added to -your application project or simply #include-d in one [and only one] -of your application source files. Failure to link this shim module -into your application manifests itself as fatal "no OPENSSL_Applink" -run-time error. An explicit reminder is due that in this situation -[mixing compiler options] it is as important to add CRYPTO_malloc_init -prior first call to OpenSSL. - -* How do I read or write a DER encoded buffer using the ASN1 functions? - -You have two options. You can either use a memory BIO in conjunction -with the i2d_*_bio() or d2i_*_bio() functions or you can use the -i2d_*(), d2i_*() functions directly. Since these are often the -cause of grief here are some code fragments using PKCS7 as an example: - - unsigned char *buf, *p; - int len; - - len = i2d_PKCS7(p7, NULL); - buf = OPENSSL_malloc(len); /* or Malloc, error checking omitted */ - p = buf; - i2d_PKCS7(p7, &p); - -At this point buf contains the len bytes of the DER encoding of -p7. - -The opposite assumes we already have len bytes in buf: - - unsigned char *p; - p = buf; - p7 = d2i_PKCS7(NULL, &p, len); - -At this point p7 contains a valid PKCS7 structure of NULL if an error -occurred. If an error occurred ERR_print_errors(bio) should give more -information. - -The reason for the temporary variable 'p' is that the ASN1 functions -increment the passed pointer so it is ready to read or write the next -structure. This is often a cause of problems: without the temporary -variable the buffer pointer is changed to point just after the data -that has been read or written. This may well be uninitialized data -and attempts to free the buffer will have unpredictable results -because it no longer points to the same address. - - -* OpenSSL uses DER but I need BER format: does OpenSSL support BER? - -The short answer is yes, because DER is a special case of BER and OpenSSL -ASN1 decoders can process BER. - -The longer answer is that ASN1 structures can be encoded in a number of -different ways. One set of ways is the Basic Encoding Rules (BER) with various -permissible encodings. A restriction of BER is the Distinguished Encoding -Rules (DER): these uniquely specify how a given structure is encoded. - -Therefore, because DER is a special case of BER, DER is an acceptable encoding -for BER. - - -* I've tried using and I get errors why? - -This usually happens when you try compiling something using the PKCS#12 -macros with a C++ compiler. There is hardly ever any need to use the -PKCS#12 macros in a program, it is much easier to parse and create -PKCS#12 files using the PKCS12_parse() and PKCS12_create() functions -documented in doc/openssl.txt and with examples in demos/pkcs12. The -'pkcs12' application has to use the macros because it prints out -debugging information. - - -* I've called and it fails, why? - -Before submitting a report or asking in one of the mailing lists, you -should try to determine the cause. In particular, you should call -ERR_print_errors() or ERR_print_errors_fp() after the failed call -and see if the message helps. Note that the problem may occur earlier -than you think -- you should check for errors after every call where -it is possible, otherwise the actual problem may be hidden because -some OpenSSL functions clear the error state. - - -* I just get a load of numbers for the error output, what do they mean? - -The actual format is described in the ERR_print_errors() manual page. -You should call the function ERR_load_crypto_strings() before hand and -the message will be output in text form. If you can't do this (for example -it is a pre-compiled binary) you can use the errstr utility on the error -code itself (the hex digits after the second colon). - - -* Why do I get errors about unknown algorithms? - -The cause is forgetting to load OpenSSL's table of algorithms with -OpenSSL_add_all_algorithms(). See the manual page for more information. This -can cause several problems such as being unable to read in an encrypted -PEM file, unable to decrypt a PKCS#12 file or signature failure when -verifying certificates. - -* Why can't the OpenSSH configure script detect OpenSSL? - -Several reasons for problems with the automatic detection exist. -OpenSSH requires at least version 0.9.5a of the OpenSSL libraries. -Sometimes the distribution has installed an older version in the system -locations that is detected instead of a new one installed. The OpenSSL -library might have been compiled for another CPU or another mode (32/64 bits). -Permissions might be wrong. - -The general answer is to check the config.log file generated when running -the OpenSSH configure script. It should contain the detailed information -on why the OpenSSL library was not detected or considered incompatible. - - -* Can I use OpenSSL's SSL library with non-blocking I/O? - -Yes; make sure to read the SSL_get_error(3) manual page! - -A pitfall to avoid: Don't assume that SSL_read() will just read from -the underlying transport or that SSL_write() will just write to it -- -it is also possible that SSL_write() cannot do any useful work until -there is data to read, or that SSL_read() cannot do anything until it -is possible to send data. One reason for this is that the peer may -request a new TLS/SSL handshake at any time during the protocol, -requiring a bi-directional message exchange; both SSL_read() and -SSL_write() will try to continue any pending handshake. - - -* Why doesn't my server application receive a client certificate? - -Due to the TLS protocol definition, a client will only send a certificate, -if explicitly asked by the server. Use the SSL_VERIFY_PEER flag of the -SSL_CTX_set_verify() function to enable the use of client certificates. - - -* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? - -For OpenSSL 0.9.7 the OID table was extended and corrected. In earlier -versions, uniqueIdentifier was incorrectly used for X.509 certificates. -The correct name according to RFC2256 (LDAP) is x500UniqueIdentifier. -Change your code to use the new name when compiling against OpenSSL 0.9.7. - - -* I think I've detected a memory leak, is this a bug? *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 3 17:26:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20ABBA3FFE2; Thu, 3 Dec 2015 17:26:01 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C81561B3C; Thu, 3 Dec 2015 17:26:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3HPxvi075818; Thu, 3 Dec 2015 17:25:59 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3HPxpg075817; Thu, 3 Dec 2015 17:25:59 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201512031725.tB3HPxpg075817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 3 Dec 2015 17:25:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r291712 - vendor-crypto/openssl/0.9.8zh X-SVN-Group: vendor-crypto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 17:26:01 -0000 Author: jkim Date: Thu Dec 3 17:25:59 2015 New Revision: 291712 URL: https://svnweb.freebsd.org/changeset/base/291712 Log: Tag OpenSSL 0.9.8zh. Added: vendor-crypto/openssl/0.9.8zh/ - copied from r291711, vendor-crypto/openssl/dist-0.9.8/ From owner-svn-src-all@freebsd.org Thu Dec 3 18:04:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88B6AA4087C; Thu, 3 Dec 2015 18:04:44 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53FB21770; Thu, 3 Dec 2015 18:04:44 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3I4hcl087970; Thu, 3 Dec 2015 18:04:43 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3I4hPG087969; Thu, 3 Dec 2015 18:04:43 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201512031804.tB3I4hPG087969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 3 Dec 2015 18:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291713 - stable/10/tests/sys/kern/acct X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 18:04:44 -0000 Author: rodrigc Date: Thu Dec 3 18:04:43 2015 New Revision: 291713 URL: https://svnweb.freebsd.org/changeset/base/291713 Log: Fix bad MFC (r291173) Replace SRCTOP with the relevant path via .CURDIR Reviewed by: bdrewery Modified: stable/10/tests/sys/kern/acct/Makefile Modified: stable/10/tests/sys/kern/acct/Makefile ============================================================================== --- stable/10/tests/sys/kern/acct/Makefile Thu Dec 3 17:25:59 2015 (r291712) +++ stable/10/tests/sys/kern/acct/Makefile Thu Dec 3 18:04:43 2015 (r291713) @@ -10,7 +10,7 @@ CLEANFILES+= convert.c DPSRCS.acct_test= convert.c -convert.c: ${SRCTOP}/sys/kern/kern_acct.c +convert.c: ${.CURDIR:H:H:H:H}/sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >>${.TARGET} From owner-svn-src-all@freebsd.org Thu Dec 3 18:40:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 258B0A40D13 for ; Thu, 3 Dec 2015 18:40:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA8E21F9A for ; Thu, 3 Dec 2015 18:40:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qkao63 with SMTP id o63so33759137qka.2 for ; Thu, 03 Dec 2015 10:40:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=0lNUy0mUjUNycMASxYZglzkfmfRc9xDCwC0IZeU5ydc=; b=01AQ9iYyf9T9V8OYTKyCVpmkilK50yg/i1rROesVF119nXt5BbhbbR5dMLjUJiDeOq llx+KIYu9X82D+x3eGRwT4+Vq/PJyWdB/NN809w7SltZ7hpCHxClYrbd0iapKPtyfSke rKSo4laMl4/cz583UPHwj4j7nJByRcB8fcNPCemTwiIvHtGO9w3Lj2pORUcbTOvAVW4E XjBuDufqdDIXrJN/SKA5bjShDqUbhnDS7cGaFk7H1ByklDWbI8sA7gARWZK8zcEaRnMA jb9g9/rcxvPf7yOo41Kvwo31dup3A3DbazUf0koO4PFDwr7DgrBi9DmFUCaNWgUVcnqo 8hTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=0lNUy0mUjUNycMASxYZglzkfmfRc9xDCwC0IZeU5ydc=; b=YKt92Lx1IOIdNq0YSZW4MXswaqZCeTsvphbeqBSRglT35okdbxf5yNFpwpHJgUpGcf 89+bYjLXxDj4lXBHrBuKxrEfvaaIOTS2eoSiAtsKastFaRwBRbWkCy8VFmUThK/c752L Vg0InUmfOM2c8Y6C8vBHHJ2wZgvenwp/nNENEHtCB3s+spyv+GxEvUFo4bTbZIf6UZBB mqs8nbEoFe4Yg9vc0ipwcZuzLVWDwZy6/kbaNEuMP6+rEKXrE8nNj33ra5bwqlCD5CG0 WBRY2dqlULG6kHIU9q5njZKihNUtbmvjAeqqVLzo6uhiVav/YmaujXIwJmJIg3Q5G/Bi IFSQ== X-Gm-Message-State: ALoCoQkGvK/+JPn0Sn6XRslzyW/JT+MzCqR+9D6c0zMXzhA336xWkw3locFlEjNaO4CCLbeOQAVC MIME-Version: 1.0 X-Received: by 10.55.207.73 with SMTP id e70mr4763824qkj.77.1449168057538; Thu, 03 Dec 2015 10:40:57 -0800 (PST) Sender: wlosh@bsdimp.com Received: by 10.140.27.181 with HTTP; Thu, 3 Dec 2015 10:40:57 -0800 (PST) X-Originating-IP: [192.55.54.58] In-Reply-To: <201512031124.tB3BOBRu070023@repo.freebsd.org> References: <201512031124.tB3BOBRu070023@repo.freebsd.org> Date: Thu, 3 Dec 2015 11:40:57 -0700 X-Google-Sender-Auth: VmhlqF9k4M7rDX0DEbi2mca-SDI Message-ID: Subject: Re: svn commit: r291689 - in head/sys: conf dev/ahci From: Warner Losh To: Andrew Turner Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 18:40:59 -0000 On Thu, Dec 3, 2015 at 4:24 AM, Andrew Turner wrote: > Author: andrew > Date: Thu Dec 3 11:24:11 2015 > New Revision: 291689 > URL: https://svnweb.freebsd.org/changeset/base/291689 > > Log: > Add support for a generic AHCI attachment. This allows us to attach to a > typically memory mapped bus, for example on the AMD Opteron A1100 the > AHCI > device is mapped in the CPUs address space, and not through a PCI > controller. > > Further work is needed for this to work with ACPI as this is expected to > be > common on ARMv8 servers. > We've created a few front ends for a10 and imx6 already. These require special handling of the environment to setup things properly based on implementation specific registers, clocks, gpios, etc. In the arm64 world, is it anticipated that we won't need to do those things? Would it be better to name this ahci_acpi.c instead then? I'd exepect with an acpi attachment, there'd be some ACPI-specific things needed. Warner From owner-svn-src-all@freebsd.org Thu Dec 3 20:54:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E30C5A4049B; Thu, 3 Dec 2015 20:54:57 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0B141FE1; Thu, 3 Dec 2015 20:54:57 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3KsuAN037549; Thu, 3 Dec 2015 20:54:56 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3KsuUw037541; Thu, 3 Dec 2015 20:54:56 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201512032054.tB3KsuUw037541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Thu, 3 Dec 2015 20:54:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291716 - in head: share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/dev/md sys/geom sys/kern sys/pc98/include sys/sys usr.sbin usr.sbin/camdd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 20:54:58 -0000 Author: ken Date: Thu Dec 3 20:54:55 2015 New Revision: 291716 URL: https://svnweb.freebsd.org/changeset/base/291716 Log: Add asynchronous command support to the pass(4) driver, and the new camdd(8) utility. CCBs may be queued to the driver via the new CAMIOQUEUE ioctl, and completed CCBs may be retrieved via the CAMIOGET ioctl. User processes can use poll(2) or kevent(2) to get notification when I/O has completed. While the existing CAMIOCOMMAND blocking ioctl interface only supports user virtual data pointers in a CCB (generally only one per CCB), the new CAMIOQUEUE ioctl supports user virtual and physical address pointers, as well as user virtual and physical scatter/gather lists. This allows user applications to have more flexibility in their data handling operations. Kernel memory for data transferred via the queued interface is allocated from the zone allocator in MAXPHYS sized chunks, and user data is copied in and out. This is likely faster than the vmapbuf()/vunmapbuf() method used by the CAMIOCOMMAND ioctl in configurations with many processors (there are more TLB shootdowns caused by the mapping/unmapping operation) but may not be as fast as running with unmapped I/O. The new memory handling model for user requests also allows applications to send CCBs with request sizes that are larger than MAXPHYS. The pass(4) driver now limits queued requests to the I/O size listed by the SIM driver in the maxio field in the Path Inquiry (XPT_PATH_INQ) CCB. There are some things things would be good to add: 1. Come up with a way to do unmapped I/O on multiple buffers. Currently the unmapped I/O interface operates on a struct bio, which includes only one address and length. It would be nice to be able to send an unmapped scatter/gather list down to busdma. This would allow eliminating the copy we currently do for data. 2. Add an ioctl to list currently outstanding CCBs in the various queues. 3. Add an ioctl to cancel a request, or use the XPT_ABORT CCB to do that. 4. Test physical address support. Virtual pointers and scatter gather lists have been tested, but I have not yet tested physical addresses or scatter/gather lists. 5. Investigate multiple queue support. At the moment there is one queue of commands per pass(4) device. If multiple processes open the device, they will submit I/O into the same queue and get events for the same completions. This is probably the right model for most applications, but it is something that could be changed later on. Also, add a new utility, camdd(8) that uses the asynchronous pass(4) driver interface. This utility is intended to be a basic data transfer/copy utility, a simple benchmark utility, and an example of how to use the asynchronous pass(4) interface. It can copy data to and from pass(4) devices using any target queue depth, starting offset and blocksize for the input and ouptut devices. It currently only supports SCSI devices, but could be easily extended to support ATA devices. It can also copy data to and from regular files, block devices, tape devices, pipes, stdin, and stdout. It does not support queueing multiple commands to any of those targets, since it uses the standard read(2)/write(2)/writev(2)/readv(2) system calls. The I/O is done by two threads, one for the reader and one for the writer. The reader thread sends completed read requests to the writer thread in strictly sequential order, even if they complete out of order. That could be modified later on for random I/O patterns or slightly out of order I/O. camdd(8) uses kqueue(2)/kevent(2) to get I/O completion events from the pass(4) driver and also to send request notifications internally. For pass(4) devcies, camdd(8) uses a single buffer (CAM_DATA_VADDR) per CAM CCB on the reading side, and a scatter/gather list (CAM_DATA_SG) on the writing side. In addition to testing both interfaces, this makes any potential reblocking of I/O easier. No data is copied between the reader and the writer, but rather the reader's buffers are split into multiple I/O requests or combined into a single I/O request depending on the input and output blocksize. For the file I/O path, camdd(8) also uses a single buffer (read(2), write(2), pread(2) or pwrite(2)) on reads, and a scatter/gather list (readv(2), writev(2), preadv(2), pwritev(2)) on writes. Things that would be nice to do for camdd(8) eventually: 1. Add support for I/O pattern generation. Patterns like all zeros, all ones, LBA-based patterns, random patterns, etc. Right Now you can always use /dev/zero, /dev/random, etc. 2. Add support for a "sink" mode, so we do only reads with no writes. Right now, you can use /dev/null. 3. Add support for automatic queue depth probing, so that we can figure out the right queue depth on the input and output side for maximum throughput. At the moment it defaults to 6. 4. Add support for SATA device passthrough I/O. 5. Add support for random LBAs and/or lengths on the input and output sides. 6. Track average per-I/O latency and busy time. The busy time and latency could also feed in to the automatic queue depth determination. sys/cam/scsi/scsi_pass.h: Define two new ioctls, CAMIOQUEUE and CAMIOGET, that queue and fetch asynchronous CAM CCBs respectively. Although these ioctls do not have a declared argument, they both take a union ccb pointer. If we declare a size here, the ioctl code in sys/kern/sys_generic.c will malloc and free a buffer for either the CCB or the CCB pointer (depending on how it is declared). Since we have to keep a copy of the CCB (which is fairly large) anyway, having the ioctl malloc and free a CCB for each call is wasteful. sys/cam/scsi/scsi_pass.c: Add asynchronous CCB support. Add two new ioctls, CAMIOQUEUE and CAMIOGET. CAMIOQUEUE adds a CCB to the incoming queue. The CCB is executed immediately (and moved to the active queue) if it is an immediate CCB, but otherwise it will be executed in passstart() when a CCB is available from the transport layer. When CCBs are completed (because they are immediate or passdone() if they are queued), they are put on the done queue. If we get the final close on the device before all pending I/O is complete, all active I/O is moved to the abandoned queue and we increment the peripheral reference count so that the peripheral driver instance doesn't go away before all pending I/O is done. The new passcreatezone() function is called on the first call to the CAMIOQUEUE ioctl on a given device to allocate the UMA zones for I/O requests and S/G list buffers. This may be good to move off to a taskqueue at some point. The new passmemsetup() function allocates memory and scatter/gather lists to hold the user's data, and copies in any data that needs to be written. For virtual pointers (CAM_DATA_VADDR), the kernel buffer is malloced from the new pass(4) driver malloc bucket. For virtual scatter/gather lists (CAM_DATA_SG), buffers are allocated from a new per-pass(9) UMA zone in MAXPHYS-sized chunks. Physical pointers are passed in unchanged. We have support for up to 16 scatter/gather segments (for the user and kernel S/G lists) in the default struct pass_io_req, so requests with longer S/G lists require an extra kernel malloc. The new passcopysglist() function copies a user scatter/gather list to a kernel scatter/gather list. The number of elements in each list may be different, but (obviously) the amount of data stored has to be identical. The new passmemdone() function copies data out for the CAM_DATA_VADDR and CAM_DATA_SG cases. The new passiocleanup() function restores data pointers in user CCBs and frees memory. Add new functions to support kqueue(2)/kevent(2): passreadfilt() tells kevent whether or not the done queue is empty. passkqfilter() adds a knote to our list. passreadfiltdetach() removes a knote from our list. Add a new function, passpoll(), for poll(2)/select(2) to use. Add devstat(9) support for the queued CCB path. sys/cam/ata/ata_da.c: Add support for the BIO_VLIST bio type. sys/cam/cam_ccb.h: Add a new enumeration for the xflags field in the CCB header. (This doesn't change the CCB header, just adds an enumeration to use.) sys/cam/cam_xpt.c: Add a new function, xpt_setup_ccb_flags(), that allows specifying CCB flags. sys/cam/cam_xpt.h: Add a prototype for xpt_setup_ccb_flags(). sys/cam/scsi/scsi_da.c: Add support for BIO_VLIST. sys/dev/md/md.c: Add BIO_VLIST support to md(4). sys/geom/geom_disk.c: Add BIO_VLIST support to the GEOM disk class. Re-factor the I/O size limiting code in g_disk_start() a bit. sys/kern/subr_bus_dma.c: Change _bus_dmamap_load_vlist() to take a starting offset and length. Add a new function, _bus_dmamap_load_pages(), that will load a list of physical pages starting at an offset. Update _bus_dmamap_load_bio() to allow loading BIO_VLIST bios. Allow unmapped I/O to start at an offset. sys/kern/subr_uio.c: Add two new functions, physcopyin_vlist() and physcopyout_vlist(). sys/pc98/include/bus.h: Guard kernel-only parts of the pc98 machine/bus.h header with #ifdef _KERNEL. This allows userland programs to include to get the definition of bus_addr_t and bus_size_t. sys/sys/bio.h: Add a new bio flag, BIO_VLIST. sys/sys/uio.h: Add prototypes for physcopyin_vlist() and physcopyout_vlist(). share/man/man4/pass.4: Document the CAMIOQUEUE and CAMIOGET ioctls. usr.sbin/Makefile: Add camdd. usr.sbin/camdd/Makefile: Add a makefile for camdd(8). usr.sbin/camdd/camdd.8: Man page for camdd(8). usr.sbin/camdd/camdd.c: The new camdd(8) utility. Sponsored by: Spectra Logic MFC after: 1 week Added: head/usr.sbin/camdd/ head/usr.sbin/camdd/Makefile (contents, props changed) head/usr.sbin/camdd/camdd.8 (contents, props changed) head/usr.sbin/camdd/camdd.c (contents, props changed) Modified: head/share/man/man4/pass.4 head/sys/cam/ata/ata_da.c head/sys/cam/cam_ccb.h head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt.h head/sys/cam/scsi/scsi_da.c head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_pass.h head/sys/dev/md/md.c head/sys/geom/geom_disk.c head/sys/geom/geom_io.c head/sys/kern/subr_bus_dma.c head/sys/kern/subr_uio.c head/sys/pc98/include/bus.h head/sys/sys/bio.h head/sys/sys/uio.h head/usr.sbin/Makefile Modified: head/share/man/man4/pass.4 ============================================================================== --- head/share/man/man4/pass.4 Thu Dec 3 19:52:44 2015 (r291715) +++ head/share/man/man4/pass.4 Thu Dec 3 20:54:55 2015 (r291716) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 10, 1998 +.Dd March 17, 2015 .Dt PASS 4 .Os .Sh NAME @@ -53,9 +53,13 @@ The .Nm driver attaches to every .Tn SCSI +and +.Tn ATA device found in the system. Since it attaches to every device, it provides a generic means of accessing .Tn SCSI +and +.Tn ATA devices, and allows the user to access devices which have no "standard" peripheral driver associated with them. .Sh KERNEL CONFIGURATION @@ -65,10 +69,12 @@ device in the kernel; .Nm devices are automatically allocated as .Tn SCSI +and +.Tn ATA devices are found. .Sh IOCTLS -.Bl -tag -width 012345678901234 -.It CAMIOCOMMAND +.Bl -tag -width 5n +.It CAMIOCOMMAND union ccb * This ioctl takes most kinds of CAM CCBs and passes them through to the CAM transport layer for action. Note that some CCB types are not allowed @@ -79,7 +85,7 @@ Some examples of xpt-only CCBs are XPT_S XPT_DEV_MATCH, XPT_RESET_BUS, XPT_SCAN_LUN, XPT_ENG_INQ, and XPT_ENG_EXEC. These CCB types have various attributes that make it illogical or impossible to service them through the passthrough interface. -.It CAMGETPASSTHRU +.It CAMGETPASSTHRU union ccb * This ioctl takes an XPT_GDEVLIST CCB, and returns the passthrough device corresponding to the device in question. Although this ioctl is available through the @@ -90,6 +96,109 @@ ioctl. It is probably more useful to issue this ioctl through the .Xr xpt 4 device. +.It CAMIOQUEUE union ccb * +Queue a CCB to the +.Xr pass 4 +driver to be executed asynchronously. +The caller may use +.Xr select 2 , +.Xr poll 2 +or +.Xr kevent 2 +to receive notification when the CCB has completed. +.Pp +This ioctl takes most CAM CCBs, but some CCB types are not allowed through +the pass device, and must be sent through the +.Xr xpt 4 +device instead. +Some examples of xpt-only CCBs are XPT_SCAN_BUS, +XPT_DEV_MATCH, XPT_RESET_BUS, XPT_SCAN_LUN, XPT_ENG_INQ, and XPT_ENG_EXEC. +These CCB types have various attributes that make it illogical or +impossible to service them through the passthrough interface. +.Pp +Although the +.Dv CAMIOQUEUE +ioctl is not defined to take an argument, it does require a +pointer to a union ccb. +It is not defined to take an argument to avoid an extra malloc and copy +inside the generic +.Xr ioctl 2 +handler. +.pp +The completed CCB will be returned via the +.Dv CAMIOGET +ioctl. +An error will only be returned from the +.Dv CAMIOQUEUE +ioctl if there is an error allocating memory for the request or copying +memory from userland. +All other errors will be reported as standard CAM CCB status errors. +Since the CCB is not copied back to the user process from the pass driver +in the +.Dv CAMIOQUEUE +ioctl, the user's passed-in CCB will not be modfied. +This is the case even with immediate CCBs. +Instead, the completed CCB must be retrieved via the +.Dv CAMIOGET +ioctl and the status examined. +.Pp +Multiple CCBs may be queued via the +.Dv CAMIOQUEUE +ioctl at any given time, and they may complete in a different order than +the order that they were submitted. +The caller must take steps to identify CCBs that are queued and completed. +The +.Dv periph_priv +structure inside struct ccb_hdr is available for userland use with the +.Dv CAMIOQUEUE +and +.Dv CAMIOGET +ioctls, and will be preserved across calls. +Also, the periph_links linked list pointers inside struct ccb_hdr are +available for userland use with the +.Dv CAMIOQUEUE +and +.Dv CAMIOGET +ioctls and will be preserved across calls. +.It CAMIOGET union ccb * +Retrieve completed CAM CCBs queued via the +.Dv CAMIOQUEUE +ioctl. +An error will only be returned from the +.Dv CAMIOGET +ioctl if the +.Xr pass 4 +driver fails to copy data to the user process or if there are no completed +CCBs available to retrieve. +If no CCBs are available to retrieve, +errno will be set to +.Dv ENOENT . +.Pp +All other errors will be reported as standard CAM CCB status errors. +.Pp +Although the +.Dv CAMIOGET +ioctl is not defined to take an argument, it does require a +pointer to a union ccb. +It is not defined to take an argument to avoid an extra malloc and copy +inside the generic +.Xr ioctl 2 +handler. +.Pp +The pass driver will report via +.Xr select 2 , +.Xr poll 2 +or +.Xr kevent 2 +when a CCB has completed. +One CCB may be retrieved per +.Dv CAMIOGET +call. +CCBs may be returned in an order different than the order they were +submitted. +So the caller should use the +.Dv periph_priv +area inside the CCB header to store pointers to identifying information. .El .Sh FILES .Bl -tag -width /dev/passn -compact @@ -103,18 +212,21 @@ CAM subsystem. .Sh DIAGNOSTICS None. .Sh SEE ALSO +.Xr kqueue 2 , +.Xr poll 2 , +.Xr select 2 , .Xr cam 3 , .Xr cam_cdbparse 3 , .Xr cam 4 , +.Xr cd 4 , +.Xr ctl 4 , +.Xr da 4 , +.Xr sa 4 , .Xr xpt 4 , -.Xr camcontrol 8 +.Xr camcontrol 8 , +.Xr camdd 8 .Sh HISTORY The CAM passthrough driver first appeared in .Fx 3.0 . .Sh AUTHORS .An Kenneth Merry Aq Mt ken@FreeBSD.org -.Sh BUGS -It might be nice to have a way to asynchronously send CCBs through the -passthrough driver. -This would probably require some sort of read/write -interface or an asynchronous ioctl interface. Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Thu Dec 3 19:52:44 2015 (r291715) +++ head/sys/cam/ata/ata_da.c Thu Dec 3 20:54:55 2015 (r291716) @@ -1543,12 +1543,26 @@ adastart(struct cam_periph *periph, unio } switch (bp->bio_cmd) { case BIO_WRITE: - softc->flags |= ADA_FLAG_DIRTY; - /* FALLTHROUGH */ case BIO_READ: { uint64_t lba = bp->bio_pblkno; uint16_t count = bp->bio_bcount / softc->params.secsize; + void *data_ptr; + int rw_op; + + if (bp->bio_cmd == BIO_WRITE) { + softc->flags |= ADA_FLAG_DIRTY; + rw_op = CAM_DIR_OUT; + } else { + rw_op = CAM_DIR_IN; + } + + data_ptr = bp->bio_data; + if ((bp->bio_flags & (BIO_UNMAPPED|BIO_VLIST)) != 0) { + rw_op |= CAM_DATA_BIO; + data_ptr = bp; + } + #ifdef ADA_TEST_FAILURE int fail = 0; @@ -1593,12 +1607,9 @@ adastart(struct cam_periph *periph, unio cam_fill_ataio(ataio, ada_retry_count, adadone, - (bp->bio_cmd == BIO_READ ? CAM_DIR_IN : - CAM_DIR_OUT) | ((bp->bio_flags & BIO_UNMAPPED) - != 0 ? CAM_DATA_BIO : 0), + rw_op, tag_code, - ((bp->bio_flags & BIO_UNMAPPED) != 0) ? (void *)bp : - bp->bio_data, + data_ptr, bp->bio_bcount, ada_default_timeout*1000); Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Thu Dec 3 19:52:44 2015 (r291715) +++ head/sys/cam/cam_ccb.h Thu Dec 3 20:54:55 2015 (r291716) @@ -109,6 +109,12 @@ typedef enum { CAM_UNLOCKED = 0x80000000 /* Call callback without lock. */ } ccb_flags; +typedef enum { + CAM_USER_DATA_ADDR = 0x00000001,/* Userspace data pointers */ + CAM_SG_FORMAT_IOVEC = 0x00000002,/* iovec instead of busdma S/G*/ + CAM_UNMAPPED_BUF = 0x00000004 /* use unmapped I/O */ +} ccb_xflags; + /* XPT Opcodes for xpt_action */ typedef enum { /* Function code flags are bits greater than 0xff */ Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Dec 3 19:52:44 2015 (r291715) +++ head/sys/cam/cam_xpt.c Thu Dec 3 20:54:55 2015 (r291716) @@ -3333,7 +3333,8 @@ xpt_merge_ccb(union ccb *master_ccb, uni } void -xpt_setup_ccb(struct ccb_hdr *ccb_h, struct cam_path *path, u_int32_t priority) +xpt_setup_ccb_flags(struct ccb_hdr *ccb_h, struct cam_path *path, + u_int32_t priority, u_int32_t flags) { CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_setup_ccb\n")); @@ -3351,10 +3352,16 @@ xpt_setup_ccb(struct ccb_hdr *ccb_h, str ccb_h->target_lun = CAM_TARGET_WILDCARD; } ccb_h->pinfo.index = CAM_UNQUEUED_INDEX; - ccb_h->flags = 0; + ccb_h->flags = flags; ccb_h->xflags = 0; } +void +xpt_setup_ccb(struct ccb_hdr *ccb_h, struct cam_path *path, u_int32_t priority) +{ + xpt_setup_ccb_flags(ccb_h, path, priority, /*flags*/ 0); +} + /* Path manipulation functions */ cam_status xpt_create_path(struct cam_path **new_path_ptr, struct cam_periph *perph, Modified: head/sys/cam/cam_xpt.h ============================================================================== --- head/sys/cam/cam_xpt.h Thu Dec 3 19:52:44 2015 (r291715) +++ head/sys/cam/cam_xpt.h Thu Dec 3 20:54:55 2015 (r291716) @@ -70,6 +70,10 @@ void xpt_action_default(union ccb *new union ccb *xpt_alloc_ccb(void); union ccb *xpt_alloc_ccb_nowait(void); void xpt_free_ccb(union ccb *free_ccb); +void xpt_setup_ccb_flags(struct ccb_hdr *ccb_h, + struct cam_path *path, + u_int32_t priority, + u_int32_t flags); void xpt_setup_ccb(struct ccb_hdr *ccb_h, struct cam_path *path, u_int32_t priority); Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Dec 3 19:52:44 2015 (r291715) +++ head/sys/cam/scsi/scsi_da.c Thu Dec 3 20:54:55 2015 (r291716) @@ -2328,29 +2328,40 @@ skipstate: switch (bp->bio_cmd) { case BIO_WRITE: - softc->flags |= DA_FLAG_DIRTY; - /* FALLTHROUGH */ case BIO_READ: + { + void *data_ptr; + int rw_op; + + if (bp->bio_cmd == BIO_WRITE) { + softc->flags |= DA_FLAG_DIRTY; + rw_op = SCSI_RW_WRITE; + } else { + rw_op = SCSI_RW_READ; + } + + data_ptr = bp->bio_data; + if ((bp->bio_flags & (BIO_UNMAPPED|BIO_VLIST)) != 0) { + rw_op |= SCSI_RW_BIO; + data_ptr = bp; + } + scsi_read_write(&start_ccb->csio, /*retries*/da_retry_count, /*cbfcnp*/dadone, /*tag_action*/tag_code, - /*read_op*/(bp->bio_cmd == BIO_READ ? - SCSI_RW_READ : SCSI_RW_WRITE) | - ((bp->bio_flags & BIO_UNMAPPED) != 0 ? - SCSI_RW_BIO : 0), + rw_op, /*byte2*/0, softc->minimum_cmd_size, /*lba*/bp->bio_pblkno, /*block_count*/bp->bio_bcount / softc->params.secsize, - /*data_ptr*/ (bp->bio_flags & - BIO_UNMAPPED) != 0 ? (void *)bp : - bp->bio_data, + data_ptr, /*dxfer_len*/ bp->bio_bcount, /*sense_len*/SSD_FULL_SIZE, da_default_timeout * 1000); break; + } case BIO_FLUSH: /* * BIO_FLUSH doesn't currently communicate Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Thu Dec 3 19:52:44 2015 (r291715) +++ head/sys/cam/scsi/scsi_pass.c Thu Dec 3 20:54:55 2015 (r291716) @@ -28,27 +28,39 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_kdtrace.h" + #include #include #include +#include #include #include -#include -#include -#include -#include +#include #include +#include +#include +#include #include +#include +#include +#include #include +#include +#include +#include + +#include #include #include #include #include +#include #include #include -#include #include +#include #include #include @@ -57,7 +69,11 @@ typedef enum { PASS_FLAG_OPEN = 0x01, PASS_FLAG_LOCKED = 0x02, PASS_FLAG_INVALID = 0x04, - PASS_FLAG_INITIAL_PHYSPATH = 0x08 + PASS_FLAG_INITIAL_PHYSPATH = 0x08, + PASS_FLAG_ZONE_INPROG = 0x10, + PASS_FLAG_ZONE_VALID = 0x20, + PASS_FLAG_UNMAPPED_CAPABLE = 0x40, + PASS_FLAG_ABANDONED_REF_SET = 0x80 } pass_flags; typedef enum { @@ -65,38 +81,104 @@ typedef enum { } pass_state; typedef enum { - PASS_CCB_BUFFER_IO + PASS_CCB_BUFFER_IO, + PASS_CCB_QUEUED_IO } pass_ccb_types; #define ccb_type ppriv_field0 -#define ccb_bp ppriv_ptr1 +#define ccb_ioreq ppriv_ptr1 -struct pass_softc { - pass_state state; - pass_flags flags; - u_int8_t pd_type; - union ccb saved_ccb; - int open_count; - u_int maxio; - struct devstat *device_stats; - struct cdev *dev; - struct cdev *alias_dev; - struct task add_physpath_task; +/* + * The maximum number of memory segments we preallocate. + */ +#define PASS_MAX_SEGS 16 + +typedef enum { + PASS_IO_NONE = 0x00, + PASS_IO_USER_SEG_MALLOC = 0x01, + PASS_IO_KERN_SEG_MALLOC = 0x02, + PASS_IO_ABANDONED = 0x04 +} pass_io_flags; + +struct pass_io_req { + union ccb ccb; + union ccb *alloced_ccb; + union ccb *user_ccb_ptr; + camq_entry user_periph_links; + ccb_ppriv_area user_periph_priv; + struct cam_periph_map_info mapinfo; + pass_io_flags flags; + ccb_flags data_flags; + int num_user_segs; + bus_dma_segment_t user_segs[PASS_MAX_SEGS]; + int num_kern_segs; + bus_dma_segment_t kern_segs[PASS_MAX_SEGS]; + bus_dma_segment_t *user_segptr; + bus_dma_segment_t *kern_segptr; + int num_bufs; + uint32_t dirs[CAM_PERIPH_MAXMAPS]; + uint32_t lengths[CAM_PERIPH_MAXMAPS]; + uint8_t *user_bufs[CAM_PERIPH_MAXMAPS]; + uint8_t *kern_bufs[CAM_PERIPH_MAXMAPS]; + struct bintime start_time; + TAILQ_ENTRY(pass_io_req) links; }; +struct pass_softc { + pass_state state; + pass_flags flags; + u_int8_t pd_type; + union ccb saved_ccb; + int open_count; + u_int maxio; + struct devstat *device_stats; + struct cdev *dev; + struct cdev *alias_dev; + struct task add_physpath_task; + struct task shutdown_kqueue_task; + struct selinfo read_select; + TAILQ_HEAD(, pass_io_req) incoming_queue; + TAILQ_HEAD(, pass_io_req) active_queue; + TAILQ_HEAD(, pass_io_req) abandoned_queue; + TAILQ_HEAD(, pass_io_req) done_queue; + struct cam_periph *periph; + char zone_name[12]; + char io_zone_name[12]; + uma_zone_t pass_zone; + uma_zone_t pass_io_zone; + size_t io_zone_size; +}; static d_open_t passopen; static d_close_t passclose; static d_ioctl_t passioctl; static d_ioctl_t passdoioctl; +static d_poll_t passpoll; +static d_kqfilter_t passkqfilter; +static void passreadfiltdetach(struct knote *kn); +static int passreadfilt(struct knote *kn, long hint); static periph_init_t passinit; static periph_ctor_t passregister; static periph_oninv_t passoninvalidate; static periph_dtor_t passcleanup; -static void pass_add_physpath(void *context, int pending); +static periph_start_t passstart; +static void pass_shutdown_kqueue(void *context, int pending); +static void pass_add_physpath(void *context, int pending); static void passasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg); +static void passdone(struct cam_periph *periph, + union ccb *done_ccb); +static int passcreatezone(struct cam_periph *periph); +static void passiocleanup(struct pass_softc *softc, + struct pass_io_req *io_req); +static int passcopysglist(struct cam_periph *periph, + struct pass_io_req *io_req, + ccb_flags direction); +static int passmemsetup(struct cam_periph *periph, + struct pass_io_req *io_req); +static int passmemdone(struct cam_periph *periph, + struct pass_io_req *io_req); static int passerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags); static int passsendccb(struct cam_periph *periph, union ccb *ccb, @@ -116,9 +198,19 @@ static struct cdevsw pass_cdevsw = { .d_open = passopen, .d_close = passclose, .d_ioctl = passioctl, + .d_poll = passpoll, + .d_kqfilter = passkqfilter, .d_name = "pass", }; +static struct filterops passread_filtops = { + .f_isfd = 1, + .f_detach = passreadfiltdetach, + .f_event = passreadfilt +}; + +static MALLOC_DEFINE(M_SCSIPASS, "scsi_pass", "scsi passthrough buffers"); + static void passinit(void) { @@ -138,6 +230,60 @@ passinit(void) } static void +passrejectios(struct cam_periph *periph) +{ + struct pass_io_req *io_req, *io_req2; + struct pass_softc *softc; + + softc = (struct pass_softc *)periph->softc; + + /* + * The user can no longer get status for I/O on the done queue, so + * clean up all outstanding I/O on the done queue. + */ + TAILQ_FOREACH_SAFE(io_req, &softc->done_queue, links, io_req2) { + TAILQ_REMOVE(&softc->done_queue, io_req, links); + passiocleanup(softc, io_req); + uma_zfree(softc->pass_zone, io_req); + } + + /* + * The underlying device is gone, so we can't issue these I/Os. + * The devfs node has been shut down, so we can't return status to + * the user. Free any I/O left on the incoming queue. + */ + TAILQ_FOREACH_SAFE(io_req, &softc->incoming_queue, links, io_req2) { + TAILQ_REMOVE(&softc->incoming_queue, io_req, links); + passiocleanup(softc, io_req); + uma_zfree(softc->pass_zone, io_req); + } + + /* + * Normally we would put I/Os on the abandoned queue and acquire a + * reference when we saw the final close. But, the device went + * away and devfs may have moved everything off to deadfs by the + * time the I/O done callback is called; as a result, we won't see + * any more closes. So, if we have any active I/Os, we need to put + * them on the abandoned queue. When the abandoned queue is empty, + * we'll release the remaining reference (see below) to the peripheral. + */ + TAILQ_FOREACH_SAFE(io_req, &softc->active_queue, links, io_req2) { + TAILQ_REMOVE(&softc->active_queue, io_req, links); + io_req->flags |= PASS_IO_ABANDONED; + TAILQ_INSERT_TAIL(&softc->abandoned_queue, io_req, links); + } + + /* + * If we put any I/O on the abandoned queue, acquire a reference. + */ + if ((!TAILQ_EMPTY(&softc->abandoned_queue)) + && ((softc->flags & PASS_FLAG_ABANDONED_REF_SET) == 0)) { + cam_periph_doacquire(periph); + softc->flags |= PASS_FLAG_ABANDONED_REF_SET; + } +} + +static void passdevgonecb(void *arg) { struct cam_periph *periph; @@ -165,17 +311,26 @@ passdevgonecb(void *arg) /* * Release the reference held for the device node, it is gone now. + * Accordingly, inform all queued I/Os of their fate. */ cam_periph_release_locked(periph); + passrejectios(periph); /* - * We reference the lock directly here, instead of using + * We reference the SIM lock directly here, instead of using * cam_periph_unlock(). The reason is that the final call to * cam_periph_release_locked() above could result in the periph * getting freed. If that is the case, dereferencing the periph * with a cam_periph_unlock() call would cause a page fault. */ mtx_unlock(mtx); + + /* + * We have to remove our kqueue context from a thread because it + * may sleep. It would be nice if we could get a callback from + * kqueue when it is done cleaning up resources. + */ + taskqueue_enqueue(taskqueue_thread, &softc->shutdown_kqueue_task); } static void @@ -197,12 +352,6 @@ passoninvalidate(struct cam_periph *peri * when it has cleaned up its state. */ destroy_dev_sched_cb(softc->dev, passdevgonecb, periph); - - /* - * XXX Return all queued I/O with ENXIO. - * XXX Handle any transactions queued to the card - * with XPT_ABORT_CCB. - */ } static void @@ -212,9 +361,40 @@ passcleanup(struct cam_periph *periph) softc = (struct pass_softc *)periph->softc; + cam_periph_assert(periph, MA_OWNED); + KASSERT(TAILQ_EMPTY(&softc->active_queue), + ("%s called when there are commands on the active queue!\n", + __func__)); + KASSERT(TAILQ_EMPTY(&softc->abandoned_queue), + ("%s called when there are commands on the abandoned queue!\n", + __func__)); + KASSERT(TAILQ_EMPTY(&softc->incoming_queue), + ("%s called when there are commands on the incoming queue!\n", + __func__)); + KASSERT(TAILQ_EMPTY(&softc->done_queue), + ("%s called when there are commands on the done queue!\n", + __func__)); + devstat_remove_entry(softc->device_stats); cam_periph_unlock(periph); + + /* + * We call taskqueue_drain() for the physpath task to make sure it + * is complete. We drop the lock because this can potentially + * sleep. XXX KDM that is bad. Need a way to get a callback when + * a taskqueue is drained. + * + * Note that we don't drain the kqueue shutdown task queue. This + * is because we hold a reference on the periph for kqueue, and + * release that reference from the kqueue shutdown task queue. So + * we cannot come into this routine unless we've released that + * reference. Also, because that could be the last reference, we + * could be called from the cam_periph_release() call in + * pass_shutdown_kqueue(). In that case, the taskqueue_drain() + * would deadlock. It would be preferable if we had a way to + * get a callback when a taskqueue is done. + */ taskqueue_drain(taskqueue_thread, &softc->add_physpath_task); cam_periph_lock(periph); @@ -223,10 +403,29 @@ passcleanup(struct cam_periph *periph) } static void +pass_shutdown_kqueue(void *context, int pending) +{ + struct cam_periph *periph; + struct pass_softc *softc; + + periph = context; + softc = periph->softc; + + knlist_clear(&softc->read_select.si_note, /*is_locked*/ 0); + knlist_destroy(&softc->read_select.si_note); + + /* + * Release the reference we held for kqueue. + */ + cam_periph_release(periph); +} + +static void pass_add_physpath(void *context, int pending) { struct cam_periph *periph; struct pass_softc *softc; + struct mtx *mtx; char *physpath; /* @@ -236,34 +435,38 @@ pass_add_physpath(void *context, int pen periph = context; softc = periph->softc; physpath = malloc(MAXPATHLEN, M_DEVBUF, M_WAITOK); - cam_periph_lock(periph); - if (periph->flags & CAM_PERIPH_INVALID) { - cam_periph_unlock(periph); + mtx = cam_periph_mtx(periph); + mtx_lock(mtx); + + if (periph->flags & CAM_PERIPH_INVALID) goto out; - } + if (xpt_getattr(physpath, MAXPATHLEN, "GEOM::physpath", periph->path) == 0 && strlen(physpath) != 0) { - cam_periph_unlock(periph); + mtx_unlock(mtx); make_dev_physpath_alias(MAKEDEV_WAITOK, &softc->alias_dev, softc->dev, softc->alias_dev, physpath); - cam_periph_lock(periph); + mtx_lock(mtx); } +out: /* * Now that we've made our alias, we no longer have to have a * reference to the device. */ - if ((softc->flags & PASS_FLAG_INITIAL_PHYSPATH) == 0) { + if ((softc->flags & PASS_FLAG_INITIAL_PHYSPATH) == 0) softc->flags |= PASS_FLAG_INITIAL_PHYSPATH; - cam_periph_unlock(periph); - dev_rel(softc->dev); - } - else - cam_periph_unlock(periph); -out: + /* + * We always acquire a reference to the periph before queueing this + * task queue function, so it won't go away before we run. + */ + while (pending-- > 0) + cam_periph_release_locked(periph); + mtx_unlock(mtx); + free(physpath, M_DEVBUF); } @@ -291,7 +494,7 @@ passasync(void *callback_arg, u_int32_t * process. */ status = cam_periph_alloc(passregister, passoninvalidate, - passcleanup, NULL, "pass", + passcleanup, passstart, "pass", CAM_PERIPH_BIO, path, passasync, AC_FOUND_DEVICE, cgd); @@ -315,8 +518,19 @@ passasync(void *callback_arg, u_int32_t buftype = (uintptr_t)arg; if (buftype == CDAI_TYPE_PHYS_PATH) { struct pass_softc *softc; + cam_status status; softc = (struct pass_softc *)periph->softc; + /* + * Acquire a reference to the periph before we + * start the taskqueue, so that we don't run into + * a situation where the periph goes away before + * the task queue has a chance to run. + */ + status = cam_periph_acquire(periph); + if (status != CAM_REQ_CMP) + break; + taskqueue_enqueue(taskqueue_thread, &softc->add_physpath_task); } @@ -361,6 +575,17 @@ passregister(struct cam_periph *periph, softc->pd_type = T_DIRECT; periph->softc = softc; + softc->periph = periph; + TAILQ_INIT(&softc->incoming_queue); + TAILQ_INIT(&softc->active_queue); + TAILQ_INIT(&softc->abandoned_queue); + TAILQ_INIT(&softc->done_queue); + snprintf(softc->zone_name, sizeof(softc->zone_name), "%s%d", + periph->periph_name, periph->unit_number); + snprintf(softc->io_zone_name, sizeof(softc->io_zone_name), "%s%dIO", + periph->periph_name, periph->unit_number); + softc->io_zone_size = MAXPHYS; + knlist_init_mtx(&softc->read_select.si_note, cam_periph_mtx(periph)); bzero(&cpi, sizeof(cpi)); xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); @@ -374,6 +599,9 @@ passregister(struct cam_periph *periph, else softc->maxio = cpi.maxio; /* real value */ + if (cpi.hba_misc & PIM_UNMAPPED) + softc->flags |= PASS_FLAG_UNMAPPED_CAPABLE; + /* * We pass in 0 for a blocksize, since we don't * know what the blocksize of this device is, if @@ -391,6 +619,23 @@ passregister(struct cam_periph *periph, DEVSTAT_PRIORITY_PASS); /* + * Initialize the taskqueue handler for shutting down kqueue. + */ + TASK_INIT(&softc->shutdown_kqueue_task, /*priority*/ 0, + pass_shutdown_kqueue, periph); + + /* + * Acquire a reference to the periph that we can release once we've + * cleaned up the kqueue. + */ + if (cam_periph_acquire(periph) != CAM_REQ_CMP) { + xpt_print(periph->path, "%s: lost periph during " + "registration!\n", __func__); + cam_periph_lock(periph); + return (CAM_REQ_CMP_ERR); + } + + /* * Acquire a reference to the periph before we create the devfs * instance for it. We'll release this reference once the devfs * instance has been freed. @@ -408,12 +653,15 @@ passregister(struct cam_periph *periph, periph->periph_name, periph->unit_number); /* - * Now that we have made the devfs instance, hold a reference to it - * until the task queue has run to setup the physical path alias. - * That way devfs won't get rid of the device before we add our - * alias. + * Hold a reference to the periph before we create the physical + * path alias so it can't go away. */ - dev_ref(softc->dev); + if (cam_periph_acquire(periph) != CAM_REQ_CMP) { + xpt_print(periph->path, "%s: lost periph during " + "registration!\n", __func__); + cam_periph_lock(periph); + return (CAM_REQ_CMP_ERR); + } cam_periph_lock(periph); softc->dev->si_drv1 = periph; @@ -514,6 +762,55 @@ passclose(struct cdev *dev, int flag, in softc = periph->softc; softc->open_count--; + if (softc->open_count == 0) { + struct pass_io_req *io_req, *io_req2; + int need_unlock; + + need_unlock = 0; + + TAILQ_FOREACH_SAFE(io_req, &softc->done_queue, links, io_req2) { + TAILQ_REMOVE(&softc->done_queue, io_req, links); + passiocleanup(softc, io_req); + uma_zfree(softc->pass_zone, io_req); + } + + TAILQ_FOREACH_SAFE(io_req, &softc->incoming_queue, links, + io_req2) { + TAILQ_REMOVE(&softc->incoming_queue, io_req, links); + passiocleanup(softc, io_req); + uma_zfree(softc->pass_zone, io_req); + } + + /* + * If there are any active I/Os, we need to forcibly acquire a + * reference to the peripheral so that we don't go away + * before they complete. We'll release the reference when + * the abandoned queue is empty. + */ + io_req = TAILQ_FIRST(&softc->active_queue); + if ((io_req != NULL) + && (softc->flags & PASS_FLAG_ABANDONED_REF_SET) == 0) { + cam_periph_doacquire(periph); + softc->flags |= PASS_FLAG_ABANDONED_REF_SET; + } + + /* + * Since the I/O in the active queue is not under our + * control, just set a flag so that we can clean it up when + * it completes and put it on the abandoned queue. This + * will prevent our sending spurious completions in the + * event that the device is opened again before these I/Os + * complete. + */ + TAILQ_FOREACH_SAFE(io_req, &softc->active_queue, links, + io_req2) { + TAILQ_REMOVE(&softc->active_queue, io_req, links); + io_req->flags |= PASS_IO_ABANDONED; + TAILQ_INSERT_TAIL(&softc->abandoned_queue, io_req, + links); + } + } + cam_periph_release_locked(periph); /* @@ -533,121 +830,1338 @@ passclose(struct cdev *dev, int flag, in return (0); } -static int -passioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) -{ - int error; - - if ((error = passdoioctl(dev, cmd, addr, flag, td)) == ENOTTY) { - error = cam_compat_ioctl(dev, cmd, addr, flag, td, passdoioctl); - } - return (error); -} -static int -passdoioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +static void +passstart(struct cam_periph *periph, union ccb *start_ccb) { - struct cam_periph *periph; - int error; - uint32_t priority; - - periph = (struct cam_periph *)dev->si_drv1; - if (periph == NULL) - return(ENXIO); - - cam_periph_lock(periph); - - error = 0; - - switch (cmd) { + struct pass_softc *softc; - case CAMIOCOMMAND: - { - union ccb *inccb; - union ccb *ccb; - int ccb_malloced; + softc = (struct pass_softc *)periph->softc; - inccb = (union ccb *)addr; + switch (softc->state) { + case PASS_STATE_NORMAL: { + struct pass_io_req *io_req; /* - * Some CCB types, like scan bus and scan lun can only go - * through the transport layer device. + * Check for any queued I/O requests that require an + * allocated slot. */ - if (inccb->ccb_h.func_code & XPT_FC_XPT_ONLY) { - xpt_print(periph->path, "CCB function code %#x is " - "restricted to the XPT device\n", - inccb->ccb_h.func_code); - error = ENODEV; + io_req = TAILQ_FIRST(&softc->incoming_queue); + if (io_req == NULL) { + xpt_release_ccb(start_ccb); break; } + TAILQ_REMOVE(&softc->incoming_queue, io_req, links); + TAILQ_INSERT_TAIL(&softc->active_queue, io_req, links); + /* + * Merge the user's CCB into the allocated CCB. + */ + xpt_merge_ccb(start_ccb, &io_req->ccb); + start_ccb->ccb_h.ccb_type = PASS_CCB_QUEUED_IO; + start_ccb->ccb_h.ccb_ioreq = io_req; + start_ccb->ccb_h.cbfcnp = passdone; + io_req->alloced_ccb = start_ccb; + binuptime(&io_req->start_time); + devstat_start_transaction(softc->device_stats, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 3 21:13:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FF91A40828; Thu, 3 Dec 2015 21:13:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E81201C40; Thu, 3 Dec 2015 21:13:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3LD506043194; Thu, 3 Dec 2015 21:13:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3LD5GO043192; Thu, 3 Dec 2015 21:13:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512032113.tB3LD5GO043192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 3 Dec 2015 21:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291717 - in head: targets/pseudo/userland usr.sbin/camdd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 21:13:07 -0000 Author: bdrewery Date: Thu Dec 3 21:13:05 2015 New Revision: 291717 URL: https://svnweb.freebsd.org/changeset/base/291717 Log: DIRDEPS_BUILD: Connect usr.sbin/camdd Sponsored by: EMC / Isilon Storage Division Added: head/usr.sbin/camdd/Makefile.depend (contents, props changed) Modified: head/targets/pseudo/userland/Makefile.depend Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Thu Dec 3 20:54:55 2015 (r291716) +++ head/targets/pseudo/userland/Makefile.depend Thu Dec 3 21:13:05 2015 (r291717) @@ -824,6 +824,7 @@ DIRDEPS.amd64= \ usr.sbin/bhyveload \ usr.sbin/boot0cfg \ usr.sbin/btxld \ + usr.sbin/camdd \ usr.sbin/cpucontrol \ usr.sbin/hyperv/tools \ usr.sbin/kgmon \ Added: head/usr.sbin/camdd/Makefile.depend ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/camdd/Makefile.depend Thu Dec 3 21:13:05 2015 (r291717) @@ -0,0 +1,25 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcam \ + lib/libcompiler_rt \ + lib/libexpat \ + lib/libmt \ + lib/libsbuf \ + lib/libthr \ + lib/libutil \ + lib/libz \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif From owner-svn-src-all@freebsd.org Thu Dec 3 21:13:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38997A4084C; Thu, 3 Dec 2015 21:13:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E91981C5C; Thu, 3 Dec 2015 21:13:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3LD8fF043239; Thu, 3 Dec 2015 21:13:08 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3LD84r043238; Thu, 3 Dec 2015 21:13:08 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512032113.tB3LD84r043238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 3 Dec 2015 21:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291718 - head/usr.sbin/camdd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 21:13:10 -0000 Author: bdrewery Date: Thu Dec 3 21:13:08 2015 New Revision: 291718 URL: https://svnweb.freebsd.org/changeset/base/291718 Log: Use proper LIBADD. Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/camdd/Makefile Modified: head/usr.sbin/camdd/Makefile ============================================================================== --- head/usr.sbin/camdd/Makefile Thu Dec 3 21:13:05 2015 (r291717) +++ head/usr.sbin/camdd/Makefile Thu Dec 3 21:13:08 2015 (r291718) @@ -3,8 +3,7 @@ PROG= camdd SRCS= camdd.c SDIR= ${.CURDIR}/../../sys -DPADD= ${LIBCAM} ${LIBMT} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} ${LIBTHR} -LDADD= -lcam -lmt -lsbuf -lbsdxml -lutil -lthr +LIBADD= cam mt sbuf bsdxml util pthread NO_WTHREAD_SAFETY= 1 MAN= camdd.8 From owner-svn-src-all@freebsd.org Thu Dec 3 21:13:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D067A408AB; Thu, 3 Dec 2015 21:13:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id E51691EF6; Thu, 3 Dec 2015 21:13:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id D0518121E; Thu, 3 Dec 2015 21:13:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 8C1701838D; Thu, 3 Dec 2015 21:13:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id m9QndeDWY8YV; Thu, 3 Dec 2015 21:13:28 +0000 (UTC) Subject: Re: svn commit: r291716 - in head: share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/dev/md sys/geom sys/kern sys/pc98/include sys/sys usr.sbin usr.sbin/camdd DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 9C8B918386 To: "Kenneth D. Merry" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201512032054.tB3KsuUw037541@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <5660B075.8040806@FreeBSD.org> Date: Thu, 3 Dec 2015 13:13:25 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201512032054.tB3KsuUw037541@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 21:13:34 -0000 On 12/3/15 12:54 PM, Kenneth D. Merry wrote: > Author: ken > Date: Thu Dec 3 20:54:55 2015 > New Revision: 291716 > URL: https://svnweb.freebsd.org/changeset/base/291716 > > Log: > Add asynchronous command support to the pass(4) driver, and the new > camdd(8) utility. > > CCBs may be queued to the driver via the new CAMIOQUEUE ioctl, and > completed CCBs may be retrieved via the CAMIOGET ioctl. User > processes can use poll(2) or kevent(2) to get notification when > I/O has completed. > > While the existing CAMIOCOMMAND blocking ioctl interface only > supports user virtual data pointers in a CCB (generally only > one per CCB), the new CAMIOQUEUE ioctl supports user virtual and > physical address pointers, as well as user virtual and physical > scatter/gather lists. This allows user applications to have more > flexibility in their data handling operations. > > Kernel memory for data transferred via the queued interface is > allocated from the zone allocator in MAXPHYS sized chunks, and user > data is copied in and out. This is likely faster than the > vmapbuf()/vunmapbuf() method used by the CAMIOCOMMAND ioctl in > configurations with many processors (there are more TLB shootdowns > caused by the mapping/unmapping operation) but may not be as fast > as running with unmapped I/O. > > The new memory handling model for user requests also allows > applications to send CCBs with request sizes that are larger than > MAXPHYS. The pass(4) driver now limits queued requests to the I/O > size listed by the SIM driver in the maxio field in the Path > Inquiry (XPT_PATH_INQ) CCB. > > There are some things things would be good to add: > > 1. Come up with a way to do unmapped I/O on multiple buffers. > Currently the unmapped I/O interface operates on a struct bio, > which includes only one address and length. It would be nice > to be able to send an unmapped scatter/gather list down to > busdma. This would allow eliminating the copy we currently do > for data. > > 2. Add an ioctl to list currently outstanding CCBs in the various > queues. > > 3. Add an ioctl to cancel a request, or use the XPT_ABORT CCB to do > that. > > 4. Test physical address support. Virtual pointers and scatter > gather lists have been tested, but I have not yet tested > physical addresses or scatter/gather lists. > > 5. Investigate multiple queue support. At the moment there is one > queue of commands per pass(4) device. If multiple processes > open the device, they will submit I/O into the same queue and > get events for the same completions. This is probably the right > model for most applications, but it is something that could be > changed later on. > > Also, add a new utility, camdd(8) that uses the asynchronous pass(4) > driver interface. > > This utility is intended to be a basic data transfer/copy utility, > a simple benchmark utility, and an example of how to use the > asynchronous pass(4) interface. > > It can copy data to and from pass(4) devices using any target queue > depth, starting offset and blocksize for the input and ouptut devices. > It currently only supports SCSI devices, but could be easily extended > to support ATA devices. > > It can also copy data to and from regular files, block devices, tape > devices, pipes, stdin, and stdout. It does not support queueing > multiple commands to any of those targets, since it uses the standard > read(2)/write(2)/writev(2)/readv(2) system calls. > > The I/O is done by two threads, one for the reader and one for the > writer. The reader thread sends completed read requests to the > writer thread in strictly sequential order, even if they complete > out of order. That could be modified later on for random I/O patterns > or slightly out of order I/O. > > camdd(8) uses kqueue(2)/kevent(2) to get I/O completion events from > the pass(4) driver and also to send request notifications internally. > > For pass(4) devcies, camdd(8) uses a single buffer (CAM_DATA_VADDR) > per CAM CCB on the reading side, and a scatter/gather list > (CAM_DATA_SG) on the writing side. In addition to testing both > interfaces, this makes any potential reblocking of I/O easier. No > data is copied between the reader and the writer, but rather the > reader's buffers are split into multiple I/O requests or combined > into a single I/O request depending on the input and output blocksize. > > For the file I/O path, camdd(8) also uses a single buffer (read(2), > write(2), pread(2) or pwrite(2)) on reads, and a scatter/gather list > (readv(2), writev(2), preadv(2), pwritev(2)) on writes. > > Things that would be nice to do for camdd(8) eventually: > > 1. Add support for I/O pattern generation. Patterns like all > zeros, all ones, LBA-based patterns, random patterns, etc. Right > Now you can always use /dev/zero, /dev/random, etc. > > 2. Add support for a "sink" mode, so we do only reads with no > writes. Right now, you can use /dev/null. > > 3. Add support for automatic queue depth probing, so that we can > figure out the right queue depth on the input and output side > for maximum throughput. At the moment it defaults to 6. > > 4. Add support for SATA device passthrough I/O. > > 5. Add support for random LBAs and/or lengths on the input and > output sides. > > 6. Track average per-I/O latency and busy time. The busy time > and latency could also feed in to the automatic queue depth > determination. > > sys/cam/scsi/scsi_pass.h: > Define two new ioctls, CAMIOQUEUE and CAMIOGET, that queue > and fetch asynchronous CAM CCBs respectively. > > Although these ioctls do not have a declared argument, they > both take a union ccb pointer. If we declare a size here, > the ioctl code in sys/kern/sys_generic.c will malloc and free > a buffer for either the CCB or the CCB pointer (depending on > how it is declared). Since we have to keep a copy of the > CCB (which is fairly large) anyway, having the ioctl malloc > and free a CCB for each call is wasteful. > > sys/cam/scsi/scsi_pass.c: > Add asynchronous CCB support. > > Add two new ioctls, CAMIOQUEUE and CAMIOGET. > > CAMIOQUEUE adds a CCB to the incoming queue. The CCB is > executed immediately (and moved to the active queue) if it > is an immediate CCB, but otherwise it will be executed > in passstart() when a CCB is available from the transport layer. > > When CCBs are completed (because they are immediate or > passdone() if they are queued), they are put on the done > queue. > > If we get the final close on the device before all pending > I/O is complete, all active I/O is moved to the abandoned > queue and we increment the peripheral reference count so > that the peripheral driver instance doesn't go away before > all pending I/O is done. > > The new passcreatezone() function is called on the first > call to the CAMIOQUEUE ioctl on a given device to allocate > the UMA zones for I/O requests and S/G list buffers. This > may be good to move off to a taskqueue at some point. > The new passmemsetup() function allocates memory and > scatter/gather lists to hold the user's data, and copies > in any data that needs to be written. For virtual pointers > (CAM_DATA_VADDR), the kernel buffer is malloced from the > new pass(4) driver malloc bucket. For virtual > scatter/gather lists (CAM_DATA_SG), buffers are allocated > from a new per-pass(9) UMA zone in MAXPHYS-sized chunks. > Physical pointers are passed in unchanged. We have support > for up to 16 scatter/gather segments (for the user and > kernel S/G lists) in the default struct pass_io_req, so > requests with longer S/G lists require an extra kernel malloc. > > The new passcopysglist() function copies a user scatter/gather > list to a kernel scatter/gather list. The number of elements > in each list may be different, but (obviously) the amount of data > stored has to be identical. > > The new passmemdone() function copies data out for the > CAM_DATA_VADDR and CAM_DATA_SG cases. > > The new passiocleanup() function restores data pointers in > user CCBs and frees memory. > > Add new functions to support kqueue(2)/kevent(2): > > passreadfilt() tells kevent whether or not the done > queue is empty. > > passkqfilter() adds a knote to our list. > > passreadfiltdetach() removes a knote from our list. > > Add a new function, passpoll(), for poll(2)/select(2) > to use. > > Add devstat(9) support for the queued CCB path. > > sys/cam/ata/ata_da.c: > Add support for the BIO_VLIST bio type. > > sys/cam/cam_ccb.h: > Add a new enumeration for the xflags field in the CCB header. > (This doesn't change the CCB header, just adds an enumeration to > use.) > > sys/cam/cam_xpt.c: > Add a new function, xpt_setup_ccb_flags(), that allows specifying > CCB flags. > > sys/cam/cam_xpt.h: > Add a prototype for xpt_setup_ccb_flags(). > > sys/cam/scsi/scsi_da.c: > Add support for BIO_VLIST. > > sys/dev/md/md.c: > Add BIO_VLIST support to md(4). > > sys/geom/geom_disk.c: > Add BIO_VLIST support to the GEOM disk class. Re-factor the I/O size > limiting code in g_disk_start() a bit. > > sys/kern/subr_bus_dma.c: > Change _bus_dmamap_load_vlist() to take a starting offset and > length. > > Add a new function, _bus_dmamap_load_pages(), that will load a list > of physical pages starting at an offset. > > Update _bus_dmamap_load_bio() to allow loading BIO_VLIST bios. > Allow unmapped I/O to start at an offset. > > sys/kern/subr_uio.c: > Add two new functions, physcopyin_vlist() and physcopyout_vlist(). > > sys/pc98/include/bus.h: > Guard kernel-only parts of the pc98 machine/bus.h header with > #ifdef _KERNEL. > > This allows userland programs to include to get the > definition of bus_addr_t and bus_size_t. > > sys/sys/bio.h: > Add a new bio flag, BIO_VLIST. > > sys/sys/uio.h: > Add prototypes for physcopyin_vlist() and physcopyout_vlist(). > > share/man/man4/pass.4: > Document the CAMIOQUEUE and CAMIOGET ioctls. > > usr.sbin/Makefile: > Add camdd. > > usr.sbin/camdd/Makefile: > Add a makefile for camdd(8). > > usr.sbin/camdd/camdd.8: > Man page for camdd(8). > > usr.sbin/camdd/camdd.c: > The new camdd(8) utility. > > Sponsored by: Spectra Logic > MFC after: 1 week > > Added: > head/usr.sbin/camdd/ > head/usr.sbin/camdd/Makefile (contents, props changed) > +++ usr.sbin/camdd/Makefile > @@ -0,0 +1,11 @@ > +# $FreeBSD$ > + > +PROG= camdd > +SRCS= camdd.c > +SDIR= ${.CURDIR}/../../sys > +DPADD= ${LIBCAM} ${LIBMT} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} ${LIBTHR} > +LDADD= -lcam -lmt -lsbuf -lbsdxml -lutil -lthr We use LIBADD in head now, not DPADD and LDADD. See r291718. -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Thu Dec 3 21:13:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C460A408D8; Thu, 3 Dec 2015 21:13:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE0F51F19; Thu, 3 Dec 2015 21:13:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3LDaG2043303; Thu, 3 Dec 2015 21:13:36 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3LDaKF043298; Thu, 3 Dec 2015 21:13:36 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201512032113.tB3LDaKF043298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 3 Dec 2015 21:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291719 - in head: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto/bn c... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 21:13:38 -0000 Author: jkim Date: Thu Dec 3 21:13:35 2015 New Revision: 291719 URL: https://svnweb.freebsd.org/changeset/base/291719 Log: Merge OpenSSL 1.0.2e. Added: head/crypto/openssl/CONTRIBUTING - copied unchanged from r291707, vendor-crypto/openssl/dist/CONTRIBUTING head/crypto/openssl/appveyor.yml - copied unchanged from r291707, vendor-crypto/openssl/dist/appveyor.yml head/crypto/openssl/doc/dir-locals.example.el - copied unchanged from r291707, vendor-crypto/openssl/dist/doc/dir-locals.example.el head/crypto/openssl/doc/openssl-c-indent.el - copied unchanged from r291707, vendor-crypto/openssl/dist/doc/openssl-c-indent.el head/crypto/openssl/doc/ssl/SSL_check_chain.pod - copied unchanged from r291707, vendor-crypto/openssl/dist/doc/ssl/SSL_check_chain.pod head/crypto/openssl/ssl/clienthellotest.c - copied unchanged from r291707, vendor-crypto/openssl/dist/ssl/clienthellotest.c head/crypto/openssl/util/toutf8.sh - copied unchanged from r291707, vendor-crypto/openssl/dist/util/toutf8.sh head/secure/lib/libssl/man/SSL_check_chain.3 (contents, props changed) Deleted: head/crypto/openssl/doc/openssl_button.gif head/crypto/openssl/doc/openssl_button.html head/crypto/openssl/util/pod2mantest Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Configure head/crypto/openssl/FAQ head/crypto/openssl/Makefile head/crypto/openssl/Makefile.org head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/apps/Makefile head/crypto/openssl/apps/app_rand.c head/crypto/openssl/apps/apps.c head/crypto/openssl/apps/asn1pars.c head/crypto/openssl/apps/ca.c head/crypto/openssl/apps/ecparam.c head/crypto/openssl/apps/engine.c head/crypto/openssl/apps/ocsp.c head/crypto/openssl/apps/pkcs12.c head/crypto/openssl/apps/s_cb.c head/crypto/openssl/apps/s_client.c head/crypto/openssl/apps/s_server.c head/crypto/openssl/crypto/aes/asm/aes-586.pl head/crypto/openssl/crypto/aes/asm/aesni-mb-x86_64.pl head/crypto/openssl/crypto/aes/asm/aesni-sha1-x86_64.pl head/crypto/openssl/crypto/aes/asm/aesni-sha256-x86_64.pl head/crypto/openssl/crypto/aes/asm/aesni-x86.pl head/crypto/openssl/crypto/aes/asm/vpaes-ppc.pl head/crypto/openssl/crypto/asn1/asn1_par.c head/crypto/openssl/crypto/asn1/d2i_pr.c head/crypto/openssl/crypto/asn1/tasn_dec.c head/crypto/openssl/crypto/asn1/x_bignum.c head/crypto/openssl/crypto/asn1/x_pubkey.c head/crypto/openssl/crypto/asn1/x_x509.c head/crypto/openssl/crypto/asn1/x_x509a.c head/crypto/openssl/crypto/bio/b_dump.c head/crypto/openssl/crypto/bio/bss_file.c head/crypto/openssl/crypto/bn/asm/armv4-gf2m.pl head/crypto/openssl/crypto/bn/asm/ia64.S head/crypto/openssl/crypto/bn/asm/ppc64-mont.pl head/crypto/openssl/crypto/bn/asm/rsaz-x86_64.pl head/crypto/openssl/crypto/bn/asm/s390x-gf2m.pl head/crypto/openssl/crypto/bn/asm/s390x.S head/crypto/openssl/crypto/bn/asm/x86-gf2m.pl head/crypto/openssl/crypto/bn/asm/x86_64-gcc.c head/crypto/openssl/crypto/bn/asm/x86_64-gf2m.pl head/crypto/openssl/crypto/bn/asm/x86_64-mont.pl head/crypto/openssl/crypto/bn/asm/x86_64-mont5.pl head/crypto/openssl/crypto/bn/bn_exp.c head/crypto/openssl/crypto/bn/bn_gcd.c head/crypto/openssl/crypto/bn/bn_gf2m.c head/crypto/openssl/crypto/bn/bn_mont.c head/crypto/openssl/crypto/bn/bn_recp.c head/crypto/openssl/crypto/bn/bn_x931p.c head/crypto/openssl/crypto/bn/bntest.c head/crypto/openssl/crypto/bn/rsaz_exp.h head/crypto/openssl/crypto/buffer/buf_str.c head/crypto/openssl/crypto/buffer/buffer.h head/crypto/openssl/crypto/cms/cms_enc.c head/crypto/openssl/crypto/cms/cms_pwri.c head/crypto/openssl/crypto/cms/cms_sd.c head/crypto/openssl/crypto/cms/cms_smime.c head/crypto/openssl/crypto/comp/c_zlib.c head/crypto/openssl/crypto/conf/conf_def.c head/crypto/openssl/crypto/conf/conf_sap.c head/crypto/openssl/crypto/cryptlib.c head/crypto/openssl/crypto/dh/dh.h head/crypto/openssl/crypto/dh/dhtest.c head/crypto/openssl/crypto/dsa/dsa_ameth.c head/crypto/openssl/crypto/dsa/dsa_gen.c head/crypto/openssl/crypto/ec/Makefile head/crypto/openssl/crypto/ec/asm/ecp_nistz256-x86_64.pl head/crypto/openssl/crypto/ec/ec.h head/crypto/openssl/crypto/ec/ec_asn1.c head/crypto/openssl/crypto/ec/ec_key.c head/crypto/openssl/crypto/ecdsa/ecdsa.h head/crypto/openssl/crypto/ecdsa/ecs_lib.c head/crypto/openssl/crypto/engine/eng_cryptodev.c head/crypto/openssl/crypto/engine/eng_list.c head/crypto/openssl/crypto/evp/e_aes_cbc_hmac_sha256.c head/crypto/openssl/crypto/evp/e_des3.c head/crypto/openssl/crypto/evp/encode.c head/crypto/openssl/crypto/evp/evp_key.c head/crypto/openssl/crypto/evp/evp_lib.c head/crypto/openssl/crypto/evp/evp_pbe.c head/crypto/openssl/crypto/evp/p_lib.c head/crypto/openssl/crypto/evp/pmeth_gn.c head/crypto/openssl/crypto/hmac/hm_ameth.c head/crypto/openssl/crypto/jpake/jpake.c head/crypto/openssl/crypto/mem_clr.c head/crypto/openssl/crypto/modes/asm/aesni-gcm-x86_64.pl head/crypto/openssl/crypto/modes/asm/ghash-armv4.pl head/crypto/openssl/crypto/modes/asm/ghash-sparcv9.pl head/crypto/openssl/crypto/modes/asm/ghash-x86.pl head/crypto/openssl/crypto/modes/asm/ghash-x86_64.pl head/crypto/openssl/crypto/modes/asm/ghashp8-ppc.pl head/crypto/openssl/crypto/modes/asm/ghashv8-armx.pl head/crypto/openssl/crypto/modes/wrap128.c head/crypto/openssl/crypto/ocsp/ocsp_lib.c head/crypto/openssl/crypto/ocsp/ocsp_prn.c head/crypto/openssl/crypto/opensslconf.h head/crypto/openssl/crypto/opensslconf.h.in head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/pem/pem_info.c head/crypto/openssl/crypto/pem/pvkfmt.c head/crypto/openssl/crypto/perlasm/ppc-xlate.pl head/crypto/openssl/crypto/pkcs12/p12_add.c head/crypto/openssl/crypto/pkcs12/p12_crpt.c head/crypto/openssl/crypto/pkcs12/p12_mutl.c head/crypto/openssl/crypto/pkcs7/pk7_doit.c head/crypto/openssl/crypto/pkcs7/pk7_smime.c head/crypto/openssl/crypto/ppccap.c head/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl head/crypto/openssl/crypto/rsa/rsa_ameth.c head/crypto/openssl/crypto/rsa/rsa_gen.c head/crypto/openssl/crypto/rsa/rsa_sign.c head/crypto/openssl/crypto/rsa/rsa_test.c head/crypto/openssl/crypto/sha/asm/sha1-586.pl head/crypto/openssl/crypto/sha/asm/sha1-mb-x86_64.pl head/crypto/openssl/crypto/sha/asm/sha1-x86_64.pl head/crypto/openssl/crypto/sha/asm/sha256-586.pl head/crypto/openssl/crypto/sha/asm/sha256-mb-x86_64.pl head/crypto/openssl/crypto/sha/asm/sha512-586.pl head/crypto/openssl/crypto/sha/asm/sha512-parisc.pl head/crypto/openssl/crypto/sha/asm/sha512-x86_64.pl head/crypto/openssl/crypto/sparccpuid.S head/crypto/openssl/crypto/sparcv9cap.c head/crypto/openssl/crypto/srp/srp_vfy.c head/crypto/openssl/crypto/ts/ts_rsp_verify.c head/crypto/openssl/crypto/whrlpool/asm/wp-mmx.pl head/crypto/openssl/crypto/x509/x509_lu.c head/crypto/openssl/crypto/x509/x509_vfy.c head/crypto/openssl/crypto/x509/x509_vpm.c head/crypto/openssl/crypto/x509v3/v3_cpols.c head/crypto/openssl/crypto/x509v3/v3_ncons.c head/crypto/openssl/crypto/x509v3/v3_pci.c head/crypto/openssl/crypto/x509v3/v3_pcia.c head/crypto/openssl/crypto/x509v3/v3_purp.c head/crypto/openssl/crypto/x509v3/v3_scts.c head/crypto/openssl/crypto/x509v3/v3_utl.c head/crypto/openssl/doc/HOWTO/keys.txt head/crypto/openssl/doc/README head/crypto/openssl/doc/apps/dgst.pod head/crypto/openssl/doc/apps/genrsa.pod head/crypto/openssl/doc/apps/pkcs12.pod head/crypto/openssl/doc/apps/req.pod head/crypto/openssl/doc/apps/x509.pod head/crypto/openssl/doc/crypto/BIO_read.pod head/crypto/openssl/doc/crypto/BN_rand.pod head/crypto/openssl/doc/crypto/DSA_generate_parameters.pod head/crypto/openssl/doc/crypto/EC_KEY_new.pod head/crypto/openssl/doc/crypto/EVP_DigestVerifyInit.pod head/crypto/openssl/doc/crypto/EVP_EncryptInit.pod head/crypto/openssl/doc/crypto/EVP_SealInit.pod head/crypto/openssl/doc/crypto/EVP_SignInit.pod head/crypto/openssl/doc/crypto/X509_check_host.pod head/crypto/openssl/doc/crypto/buffer.pod head/crypto/openssl/doc/crypto/d2i_X509_NAME.pod head/crypto/openssl/doc/crypto/engine.pod head/crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod head/crypto/openssl/doc/ssl/SSL_CTX_get0_param.pod head/crypto/openssl/e_os.h head/crypto/openssl/engines/e_chil.c head/crypto/openssl/ssl/Makefile head/crypto/openssl/ssl/bio_ssl.c head/crypto/openssl/ssl/d1_both.c head/crypto/openssl/ssl/d1_clnt.c head/crypto/openssl/ssl/d1_meth.c head/crypto/openssl/ssl/d1_srvr.c head/crypto/openssl/ssl/s23_clnt.c head/crypto/openssl/ssl/s3_both.c head/crypto/openssl/ssl/s3_cbc.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_enc.c head/crypto/openssl/ssl/s3_lib.c head/crypto/openssl/ssl/s3_pkt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssl.h head/crypto/openssl/ssl/ssl_asn1.c head/crypto/openssl/ssl/ssl_cert.c head/crypto/openssl/ssl/ssl_ciph.c head/crypto/openssl/ssl/ssl_err.c head/crypto/openssl/ssl/ssl_lib.c head/crypto/openssl/ssl/ssl_locl.h head/crypto/openssl/ssl/ssl_rsa.c head/crypto/openssl/ssl/ssl_sess.c head/crypto/openssl/ssl/ssltest.c head/crypto/openssl/ssl/t1_enc.c head/crypto/openssl/ssl/t1_lib.c head/crypto/openssl/ssl/tls1.h head/crypto/openssl/util/domd head/crypto/openssl/util/indent.pro head/crypto/openssl/util/mk1mf.pl head/crypto/openssl/util/mkrc.pl head/crypto/openssl/util/mkstack.pl head/crypto/openssl/util/pl/VC-32.pl head/crypto/openssl/util/selftest.pl head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/Makefile.man head/secure/lib/libcrypto/amd64/x86_64-mont5.S head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_TIME_set.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/EC_GFp_simple_method.3 head/secure/lib/libcrypto/man/EC_GROUP_copy.3 head/secure/lib/libcrypto/man/EC_GROUP_new.3 head/secure/lib/libcrypto/man/EC_KEY_new.3 head/secure/lib/libcrypto/man/EC_POINT_add.3 head/secure/lib/libcrypto/man/EC_POINT_new.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_instrument_bus.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_check_host.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_ECPKParameters.3 head/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ec.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/Makefile.man head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CONF_CTX_new.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set1_prefix.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set_flags.3 head/secure/lib/libssl/man/SSL_CONF_CTX_set_ssl_ctx.3 head/secure/lib/libssl/man/SSL_CONF_cmd.3 head/secure/lib/libssl/man/SSL_CONF_cmd_argv.3 head/secure/lib/libssl/man/SSL_CTX_add1_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get0_param.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set1_curves.3 head/secure/lib/libssl/man/SSL_CTX_set1_verify_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_custom_cli_ext.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_CTX_use_serverinfo.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Thu Dec 3 21:13:08 2015 (r291718) +++ head/crypto/openssl/CHANGES Thu Dec 3 21:13:35 2015 (r291719) @@ -2,6 +2,64 @@ OpenSSL CHANGES _______________ + Changes between 1.0.2d and 1.0.2e [3 Dec 2015] + + *) BN_mod_exp may produce incorrect results on x86_64 + + There is a carry propagating bug in the x86_64 Montgomery squaring + procedure. No EC algorithms are affected. Analysis suggests that attacks + against RSA and DSA as a result of this defect would be very difficult to + perform and are not believed likely. Attacks against DH are considered just + feasible (although very difficult) because most of the work necessary to + deduce information about a private key may be performed offline. The amount + of resources required for such an attack would be very significant and + likely only accessible to a limited number of attackers. An attacker would + additionally need online access to an unpatched system using the target + private key in a scenario with persistent DH parameters and a private + key that is shared between multiple clients. For example this can occur by + default in OpenSSL DHE based SSL/TLS ciphersuites. + + This issue was reported to OpenSSL by Hanno Böck. + (CVE-2015-3193) + [Andy Polyakov] + + *) Certificate verify crash with missing PSS parameter + + The signature verification routines will crash with a NULL pointer + dereference if presented with an ASN.1 signature using the RSA PSS + algorithm and absent mask generation function parameter. Since these + routines are used to verify certificate signature algorithms this can be + used to crash any certificate verification operation and exploited in a + DoS attack. Any application which performs certificate verification is + vulnerable including OpenSSL clients and servers which enable client + authentication. + + This issue was reported to OpenSSL by Loïc Jonas Etienne (Qnective AG). + (CVE-2015-3194) + [Stephen Henson] + + *) X509_ATTRIBUTE memory leak + + When presented with a malformed X509_ATTRIBUTE structure OpenSSL will leak + memory. This structure is used by the PKCS#7 and CMS routines so any + application which reads PKCS#7 or CMS data from untrusted sources is + affected. SSL/TLS is not affected. + + This issue was reported to OpenSSL by Adam Langley (Google/BoringSSL) using + libFuzzer. + (CVE-2015-3195) + [Stephen Henson] + + *) Rewrite EVP_DecodeUpdate (base64 decoding) to fix several bugs. + This changes the decoding behaviour for some invalid messages, + though the change is mostly in the more lenient direction, and + legacy behaviour is preserved as much as possible. + [Emilia Käsper] + + *) In DSA_generate_parameters_ex, if the provided seed is too short, + return an error + [Rich Salz and Ismo Puustinen ] + Changes between 1.0.2c and 1.0.2d [9 Jul 2015] *) Alternate chains certificate forgery @@ -15,8 +73,18 @@ This issue was reported to OpenSSL by Adam Langley/David Benjamin (Google/BoringSSL). + (CVE-2015-1793) [Matt Caswell] + *) Race condition handling PSK identify hint + + If PSK identity hints are received by a multi-threaded client then + the values are wrongly updated in the parent SSL_CTX structure. This can + result in a race condition potentially leading to a double free of the + identify hint data. + (CVE-2015-3196) + [Stephen Henson] + Changes between 1.0.2b and 1.0.2c [12 Jun 2015] *) Fix HMAC ABI incompatibility. The previous version introduced an ABI @@ -55,9 +123,9 @@ callbacks. This issue was reported to OpenSSL by Robert Swiecki (Google), and - independently by Hanno Böck. + independently by Hanno Böck. (CVE-2015-1789) - [Emilia Käsper] + [Emilia Käsper] *) PKCS7 crash with missing EnvelopedContent @@ -71,7 +139,7 @@ This issue was reported to OpenSSL by Michal Zalewski (Google). (CVE-2015-1790) - [Emilia Käsper] + [Emilia Käsper] *) CMS verify infinite loop with unknown hash function @@ -201,7 +269,7 @@ This issue was reported to OpenSSL by Michal Zalewski (Google). (CVE-2015-0289) - [Emilia Käsper] + [Emilia Käsper] *) DoS via reachable assert in SSLv2 servers fix @@ -209,10 +277,10 @@ servers that both support SSLv2 and enable export cipher suites by sending a specially crafted SSLv2 CLIENT-MASTER-KEY message. - This issue was discovered by Sean Burford (Google) and Emilia Käsper + This issue was discovered by Sean Burford (Google) and Emilia Käsper (OpenSSL development team). (CVE-2015-0293) - [Emilia Käsper] + [Emilia Käsper] *) Empty CKE with client auth and DHE fix @@ -272,6 +340,10 @@ Changes between 1.0.1l and 1.0.2 [22 Jan 2015] + *) Change RSA and DH/DSA key generation apps to generate 2048-bit + keys by default. + [Kurt Roeckx] + *) Facilitate "universal" ARM builds targeting range of ARM ISAs, e.g. ARMv5 through ARMv8, as opposite to "locking" it to single one. So far those who have to target multiple plaforms would compromise @@ -717,12 +789,12 @@ version does not match the session's version. Resuming with a different version, while not strictly forbidden by the RFC, is of questionable sanity and breaks all known clients. - [David Benjamin, Emilia Käsper] + [David Benjamin, Emilia Käsper] *) Tighten handling of the ChangeCipherSpec (CCS) message: reject early CCS messages during renegotiation. (Note that because renegotiation is encrypted, this early CCS was not exploitable.) - [Emilia Käsper] + [Emilia Käsper] *) Tighten client-side session ticket handling during renegotiation: ensure that the client only accepts a session ticket if the server sends @@ -733,7 +805,7 @@ Similarly, ensure that the client requires a session ticket if one was advertised in the ServerHello. Previously, a TLS client would ignore a missing NewSessionTicket message. - [Emilia Käsper] + [Emilia Käsper] Changes between 1.0.1i and 1.0.1j [15 Oct 2014] @@ -813,10 +885,10 @@ with a null pointer dereference (read) by specifying an anonymous (EC)DH ciphersuite and sending carefully crafted handshake messages. - Thanks to Felix Gröbert (Google) for discovering and researching this + Thanks to Felix Gröbert (Google) for discovering and researching this issue. (CVE-2014-3510) - [Emilia Käsper] + [Emilia Käsper] *) By sending carefully crafted DTLS packets an attacker could cause openssl to leak memory. This can be exploited through a Denial of Service attack. @@ -853,7 +925,7 @@ properly negotiated with the client. This can be exploited through a Denial of Service attack. - Thanks to Joonas Kuorilehto and Riku Hietamäki (Codenomicon) for + Thanks to Joonas Kuorilehto and Riku Hietamäki (Codenomicon) for discovering and researching this issue. (CVE-2014-5139) [Steve Henson] @@ -865,7 +937,7 @@ Thanks to Ivan Fratric (Google) for discovering this issue. (CVE-2014-3508) - [Emilia Käsper, and Steve Henson] + [Emilia Käsper, and Steve Henson] *) Fix ec_GFp_simple_points_make_affine (thus, EC_POINTs_mul etc.) for corner cases. (Certain input points at infinity could lead to @@ -895,22 +967,22 @@ client or server. This is potentially exploitable to run arbitrary code on a vulnerable client or server. - Thanks to Jüri Aedla for reporting this issue. (CVE-2014-0195) - [Jüri Aedla, Steve Henson] + Thanks to Jüri Aedla for reporting this issue. (CVE-2014-0195) + [Jüri Aedla, Steve Henson] *) Fix bug in TLS code where clients enable anonymous ECDH ciphersuites are subject to a denial of service attack. - Thanks to Felix Gröbert and Ivan Fratric at Google for discovering + Thanks to Felix Gröbert and Ivan Fratric at Google for discovering this issue. (CVE-2014-3470) - [Felix Gröbert, Ivan Fratric, Steve Henson] + [Felix Gröbert, Ivan Fratric, Steve Henson] *) Harmonize version and its documentation. -f flag is used to display compilation flags. [mancha ] *) Fix eckey_priv_encode so it immediately returns an error upon a failure - in i2d_ECPrivateKey. + in i2d_ECPrivateKey. Thanks to Ted Unangst for feedback on this issue. [mancha ] *) Fix some double frees. These are not thought to be exploitable. @@ -982,9 +1054,9 @@ Thanks go to Nadhem Alfardan and Kenny Paterson of the Information Security Group at Royal Holloway, University of London (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and - Emilia Käsper for the initial patch. + Emilia Käsper for the initial patch. (CVE-2013-0169) - [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] *) Fix flaw in AESNI handling of TLS 1.2 and 1.1 records for CBC mode ciphersuites which can be exploited in a denial of service attack. @@ -1159,7 +1231,7 @@ EC_GROUP_new_by_curve_name() will automatically use these (while EC_GROUP_new_curve_GFp() currently prefers the more flexible implementations). - [Emilia Käsper, Adam Langley, Bodo Moeller (Google)] + [Emilia Käsper, Adam Langley, Bodo Moeller (Google)] *) Use type ossl_ssize_t instad of ssize_t which isn't available on all platforms. Move ssize_t definition from e_os.h to the public @@ -1435,7 +1507,7 @@ [Adam Langley (Google)] *) Fix spurious failures in ecdsatest.c. - [Emilia Käsper (Google)] + [Emilia Käsper (Google)] *) Fix the BIO_f_buffer() implementation (which was mixing different interpretations of the '..._len' fields). @@ -1449,7 +1521,7 @@ lock to call BN_BLINDING_invert_ex, and avoids one use of BN_BLINDING_update for each BN_BLINDING structure (previously, the last update always remained unused). - [Emilia Käsper (Google)] + [Emilia Käsper (Google)] *) In ssl3_clear, preserve s3->init_extra along with s3->rbuf. [Bob Buckholz (Google)] @@ -2258,7 +2330,7 @@ *) Add RFC 3161 compliant time stamp request creation, response generation and response verification functionality. - [Zoltán Glózik , The OpenTSA Project] + [Zoltán Glózik , The OpenTSA Project] *) Add initial support for TLS extensions, specifically for the server_name extension so far. The SSL_SESSION, SSL_CTX, and SSL data structures now @@ -3426,7 +3498,7 @@ *) BN_CTX_get() should return zero-valued bignums, providing the same initialised value as BN_new(). - [Geoff Thorpe, suggested by Ulf Möller] + [Geoff Thorpe, suggested by Ulf Möller] *) Support for inhibitAnyPolicy certificate extension. [Steve Henson] @@ -3445,7 +3517,7 @@ some point, these tighter rules will become openssl's default to improve maintainability, though the assert()s and other overheads will remain only in debugging configurations. See bn.h for more details. - [Geoff Thorpe, Nils Larsch, Ulf Möller] + [Geoff Thorpe, Nils Larsch, Ulf Möller] *) BN_CTX_init() has been deprecated, as BN_CTX is an opaque structure that can only be obtained through BN_CTX_new() (which implicitly @@ -3512,7 +3584,7 @@ [Douglas Stebila (Sun Microsystems Laboratories)] *) Add the possibility to load symbols globally with DSO. - [Götz Babin-Ebell via Richard Levitte] + [Götz Babin-Ebell via Richard Levitte] *) Add the functions ERR_set_mark() and ERR_pop_to_mark() for better control of the error stack. @@ -4227,7 +4299,7 @@ [Steve Henson] *) Undo Cygwin change. - [Ulf Möller] + [Ulf Möller] *) Added support for proxy certificates according to RFC 3820. Because they may be a security thread to unaware applications, @@ -4260,11 +4332,11 @@ [Stephen Henson, reported by UK NISCC] *) Use Windows randomness collection on Cygwin. - [Ulf Möller] + [Ulf Möller] *) Fix hang in EGD/PRNGD query when communication socket is closed prematurely by EGD/PRNGD. - [Darren Tucker via Lutz Jänicke, resolves #1014] + [Darren Tucker via Lutz Jänicke, resolves #1014] *) Prompt for pass phrases when appropriate for PKCS12 input format. [Steve Henson] @@ -4726,7 +4798,7 @@ pointers passed to them whenever necessary. Otherwise it is possible the caller may have overwritten (or deallocated) the original string data when a later ENGINE operation tries to use the stored values. - [Götz Babin-Ebell ] + [Götz Babin-Ebell ] *) Improve diagnostics in file reading and command-line digests. [Ben Laurie aided and abetted by Solar Designer ] @@ -6831,7 +6903,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) BN_sqr() bug fix. - [Ulf Möller, reported by Jim Ellis ] + [Ulf Möller, reported by Jim Ellis ] *) Rabin-Miller test analyses assume uniformly distributed witnesses, so use BN_pseudo_rand_range() instead of using BN_pseudo_rand() @@ -6991,7 +7063,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Fix OAEP check. - [Ulf Möller, Bodo Möller] + [Ulf Möller, Bodo Möller] *) The countermeasure against Bleichbacher's attack on PKCS #1 v1.5 RSA encryption was accidentally removed in s3_srvr.c in OpenSSL 0.9.5 @@ -7253,10 +7325,10 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Use better test patterns in bntest. - [Ulf Möller] + [Ulf Möller] *) rand_win.c fix for Borland C. - [Ulf Möller] + [Ulf Möller] *) BN_rshift bugfix for n == 0. [Bodo Moeller] @@ -7401,14 +7473,14 @@ des-cbc 3624.96k 5258.21k *) New BIO_shutdown_wr macro, which invokes the BIO_C_SHUTDOWN_WR BIO_ctrl (for BIO pairs). - [Bodo Möller] + [Bodo Möller] *) Add DSO method for VMS. [Richard Levitte] *) Bug fix: Montgomery multiplication could produce results with the wrong sign. - [Ulf Möller] + [Ulf Möller] *) Add RPM specification openssl.spec and modify it to build three packages. The default package contains applications, application @@ -7426,7 +7498,7 @@ des-cbc 3624.96k 5258.21k *) Don't set the two most significant bits to one when generating a random number < q in the DSA library. - [Ulf Möller] + [Ulf Möller] *) New SSL API mode 'SSL_MODE_AUTO_RETRY'. This disables the default behaviour that SSL_read may result in SSL_ERROR_WANT_READ (even if @@ -7692,7 +7764,7 @@ des-cbc 3624.96k 5258.21k *) Randomness polling function for Win9x, as described in: Peter Gutmann, Software Generation of Practically Strong Random Numbers. - [Ulf Möller] + [Ulf Möller] *) Fix so PRNG is seeded in req if using an already existing DSA key. @@ -7912,7 +7984,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Eliminate non-ANSI declarations in crypto.h and stack.h. - [Ulf Möller] + [Ulf Möller] *) Fix for SSL server purpose checking. Server checking was rejecting certificates which had extended key usage present @@ -7944,7 +8016,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Bugfix for linux-elf makefile.one. - [Ulf Möller] + [Ulf Möller] *) RSA_get_default_method() will now cause a default RSA_METHOD to be chosen if one doesn't exist already. @@ -8033,7 +8105,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) des_quad_cksum() byte order bug fix. - [Ulf Möller, using the problem description in krb4-0.9.7, where + [Ulf Möller, using the problem description in krb4-0.9.7, where the solution is attributed to Derrick J Brashear ] *) Fix so V_ASN1_APP_CHOOSE works again: however its use is strongly @@ -8134,7 +8206,7 @@ des-cbc 3624.96k 5258.21k [Rolf Haberrecker ] *) Assembler module support for Mingw32. - [Ulf Möller] + [Ulf Möller] *) Shared library support for HPUX (in shlib/). [Lutz Jaenicke and Anonymous] @@ -8153,7 +8225,7 @@ des-cbc 3624.96k 5258.21k *) BN_mul bugfix: In bn_mul_part_recursion() only the a>a[n] && b>b[n] case was implemented. This caused BN_div_recp() to fail occasionally. - [Ulf Möller] + [Ulf Möller] *) Add an optional second argument to the set_label() in the perl assembly language builder. If this argument exists and is set @@ -8183,14 +8255,14 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Fix potential buffer overrun problem in BIO_printf(). - [Ulf Möller, using public domain code by Patrick Powell; problem + [Ulf Möller, using public domain code by Patrick Powell; problem pointed out by David Sacerdote ] *) Support EGD . New functions RAND_egd() and RAND_status(). In the command line application, the EGD socket can be specified like a seed file using RANDFILE or -rand. - [Ulf Möller] + [Ulf Möller] *) Allow the string CERTIFICATE to be tolerated in PKCS#7 structures. Some CAs (e.g. Verisign) distribute certificates in this form. @@ -8223,7 +8295,7 @@ des-cbc 3624.96k 5258.21k #define OPENSSL_ALGORITHM_DEFINES #include defines all pertinent NO_ symbols, such as NO_IDEA, NO_RSA, etc. - [Richard Levitte, Ulf and Bodo Möller] + [Richard Levitte, Ulf and Bodo Möller] *) Bugfix: Tolerate fragmentation and interleaving in the SSL 3/TLS record layer. @@ -8274,17 +8346,17 @@ des-cbc 3624.96k 5258.21k *) Bug fix for BN_div_recp() for numerators with an even number of bits. - [Ulf Möller] + [Ulf Möller] *) More tests in bntest.c, and changed test_bn output. - [Ulf Möller] + [Ulf Möller] *) ./config recognizes MacOS X now. [Andy Polyakov] *) Bug fix for BN_div() when the first words of num and divsor are equal (it gave wrong results if (rem=(n1-q*d0)&BN_MASK2) < d0). - [Ulf Möller] + [Ulf Möller] *) Add support for various broken PKCS#8 formats, and command line options to produce them. @@ -8292,11 +8364,11 @@ des-cbc 3624.96k 5258.21k *) New functions BN_CTX_start(), BN_CTX_get() and BT_CTX_end() to get temporary BIGNUMs from a BN_CTX. - [Ulf Möller] + [Ulf Möller] *) Correct return values in BN_mod_exp_mont() and BN_mod_exp2_mont() for p == 0. - [Ulf Möller] + [Ulf Möller] *) Change the SSLeay_add_all_*() functions to OpenSSL_add_all_*() and include a #define from the old name to the new. The original intent @@ -8320,7 +8392,7 @@ des-cbc 3624.96k 5258.21k *) Source code cleanups: use const where appropriate, eliminate casts, use void * instead of char * in lhash. - [Ulf Möller] + [Ulf Möller] *) Bugfix: ssl3_send_server_key_exchange was not restartable (the state was not changed to SSL3_ST_SW_KEY_EXCH_B, and because of @@ -8365,13 +8437,13 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) New function BN_pseudo_rand(). - [Ulf Möller] + [Ulf Möller] *) Clean up BN_mod_mul_montgomery(): replace the broken (and unreadable) bignum version of BN_from_montgomery() with the working code from SSLeay 0.9.0 (the word based version is faster anyway), and clean up the comments. - [Ulf Möller] + [Ulf Möller] *) Avoid a race condition in s2_clnt.c (function get_server_hello) that made it impossible to use the same SSL_SESSION data structure in @@ -8381,25 +8453,25 @@ des-cbc 3624.96k 5258.21k *) The return value of RAND_load_file() no longer counts bytes obtained by stat(). RAND_load_file(..., -1) is new and uses the complete file to seed the PRNG (previously an explicit byte count was required). - [Ulf Möller, Bodo Möller] + [Ulf Möller, Bodo Möller] *) Clean up CRYPTO_EX_DATA functions, some of these didn't have prototypes used (char *) instead of (void *) and had casts all over the place. [Steve Henson] *) Make BN_generate_prime() return NULL on error if ret!=NULL. - [Ulf Möller] + [Ulf Möller] *) Retain source code compatibility for BN_prime_checks macro: BN_is_prime(..., BN_prime_checks, ...) now uses BN_prime_checks_for_size to determine the appropriate number of Rabin-Miller iterations. - [Ulf Möller] + [Ulf Möller] *) Diffie-Hellman uses "safe" primes: DH_check() return code renamed to DH_CHECK_P_NOT_SAFE_PRIME. (Check if this is true? OpenPGP calls them "strong".) - [Ulf Möller] + [Ulf Möller] *) Merge the functionality of "dh" and "gendh" programs into a new program "dhparam". The old programs are retained for now but will handle DH keys @@ -8455,7 +8527,7 @@ des-cbc 3624.96k 5258.21k *) Add missing #ifndefs that caused missing symbols when building libssl as a shared library without RSA. Use #ifndef NO_SSL2 instead of NO_RSA in ssl/s2*.c. - [Kris Kennaway , modified by Ulf Möller] + [Kris Kennaway , modified by Ulf Möller] *) Precautions against using the PRNG uninitialized: RAND_bytes() now has a return value which indicates the quality of the random data @@ -8464,7 +8536,7 @@ des-cbc 3624.96k 5258.21k guaranteed to be unique but not unpredictable. RAND_add is like RAND_seed, but takes an extra argument for an entropy estimate (RAND_seed always assumes full entropy). - [Ulf Möller] + [Ulf Möller] *) Do more iterations of Rabin-Miller probable prime test (specifically, 3 for 1024-bit primes, 6 for 512-bit primes, 12 for 256-bit primes @@ -8494,7 +8566,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Honor the no-xxx Configure options when creating .DEF files. - [Ulf Möller] + [Ulf Möller] *) Add PKCS#10 attributes to field table: challengePassword, unstructuredName and unstructuredAddress. These are taken from @@ -9328,7 +9400,7 @@ des-cbc 3624.96k 5258.21k *) More DES library cleanups: remove references to srand/rand and delete an unused file. - [Ulf Möller] + [Ulf Möller] *) Add support for the the free Netwide assembler (NASM) under Win32, since not many people have MASM (ml) and it can be hard to obtain. @@ -9417,7 +9489,7 @@ des-cbc 3624.96k 5258.21k worked. *) Fix problems with no-hmac etc. - [Ulf Möller, pointed out by Brian Wellington ] + [Ulf Möller, pointed out by Brian Wellington ] *) New functions RSA_get_default_method(), RSA_set_method() and RSA_get_method(). These allows replacement of RSA_METHODs without having @@ -9534,7 +9606,7 @@ des-cbc 3624.96k 5258.21k [Ben Laurie] *) DES library cleanups. - [Ulf Möller] + [Ulf Möller] *) Add support for PKCS#5 v2.0 PBE algorithms. This will permit PKCS#8 to be used with any cipher unlike PKCS#5 v1.5 which can at most handle 64 bit @@ -9577,7 +9649,7 @@ des-cbc 3624.96k 5258.21k [Christian Forster ] *) config now generates no-xxx options for missing ciphers. - [Ulf Möller] + [Ulf Möller] *) Support the EBCDIC character set (work in progress). File ebcdic.c not yet included because it has a different license. @@ -9690,7 +9762,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Move openssl.cnf out of lib/. - [Ulf Möller] + [Ulf Möller] *) Fix various things to let OpenSSL even pass ``egcc -pipe -O2 -Wall -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes @@ -9747,10 +9819,10 @@ des-cbc 3624.96k 5258.21k [Ben Laurie] *) Support Borland C++ builder. - [Janez Jere , modified by Ulf Möller] + [Janez Jere , modified by Ulf Möller] *) Support Mingw32. - [Ulf Möller] + [Ulf Möller] *) SHA-1 cleanups and performance enhancements. [Andy Polyakov ] @@ -9759,7 +9831,7 @@ des-cbc 3624.96k 5258.21k [Andy Polyakov ] *) Accept any -xxx and +xxx compiler options in Configure. - [Ulf Möller] + [Ulf Möller] *) Update HPUX configuration. [Anonymous] @@ -9792,7 +9864,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) OAEP decoding bug fix. - [Ulf Möller] + [Ulf Möller] *) Support INSTALL_PREFIX for package builders, as proposed by David Harris. @@ -9815,21 +9887,21 @@ des-cbc 3624.96k 5258.21k [Niels Poppe ] *) New Configure option no- (rsa, idea, rc5, ...). - [Ulf Möller] + [Ulf Möller] *) Add the PKCS#12 API documentation to openssl.txt. Preliminary support for extension adding in x509 utility. [Steve Henson] *) Remove NOPROTO sections and error code comments. - [Ulf Möller] + [Ulf Möller] *) Partial rewrite of the DEF file generator to now parse the ANSI prototypes. [Steve Henson] *) New Configure options --prefix=DIR and --openssldir=DIR. - [Ulf Möller] + [Ulf Möller] *) Complete rewrite of the error code script(s). It is all now handled by one script at the top level which handles error code gathering, @@ -9858,7 +9930,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Move the autogenerated header file parts to crypto/opensslconf.h. - [Ulf Möller] + [Ulf Möller] *) Fix new 56-bit DES export ciphersuites: they were using 7 bytes instead of 8 of keying material. Merlin has also confirmed interop with this fix @@ -9876,13 +9948,13 @@ des-cbc 3624.96k 5258.21k [Andy Polyakov ] *) Change functions to ANSI C. - [Ulf Möller] + [Ulf Möller] *) Fix typos in error codes. - [Martin Kraemer , Ulf Möller] + [Martin Kraemer , Ulf Möller] *) Remove defunct assembler files from Configure. - [Ulf Möller] + [Ulf Möller] *) SPARC v8 assembler BIGNUM implementation. [Andy Polyakov ] @@ -9919,7 +9991,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) New Configure option "rsaref". - [Ulf Möller] + [Ulf Möller] *) Don't auto-generate pem.h. [Bodo Moeller] @@ -9967,7 +10039,7 @@ des-cbc 3624.96k 5258.21k *) New functions DSA_do_sign and DSA_do_verify to provide access to the raw DSA values prior to ASN.1 encoding. - [Ulf Möller] + [Ulf Möller] *) Tweaks to Configure [Niels Poppe ] @@ -9977,11 +10049,11 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) New variables $(RANLIB) and $(PERL) in the Makefiles. - [Ulf Möller] + [Ulf Möller] *) New config option to avoid instructions that are illegal on the 80386. The default code is faster, but requires at least a 486. - [Ulf Möller] + [Ulf Möller] *) Got rid of old SSL2_CLIENT_VERSION (inconsistently used) and SSL2_SERVER_VERSION (not used at all) macros, which are now the @@ -10520,7 +10592,7 @@ des-cbc 3624.96k 5258.21k Hagino ] *) File was opened incorrectly in randfile.c. - [Ulf Möller ] + [Ulf Möller ] *) Beginning of support for GeneralizedTime. d2i, i2d, check and print functions. Also ASN1_TIME suite which is a CHOICE of UTCTime or @@ -10530,7 +10602,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Correct Linux 1 recognition in config. - [Ulf Möller ] + [Ulf Möller ] *) Remove pointless MD5 hash when using DSA keys in ca. [Anonymous ] @@ -10677,7 +10749,7 @@ des-cbc 3624.96k 5258.21k *) Fix the RSA header declarations that hid a bug I fixed in 0.9.0b but was already fixed by Eric for 0.9.1 it seems. - [Ben Laurie - pointed out by Ulf Möller ] + [Ben Laurie - pointed out by Ulf Möller ] *) Autodetect FreeBSD3. [Ben Laurie] Copied: head/crypto/openssl/CONTRIBUTING (from r291707, vendor-crypto/openssl/dist/CONTRIBUTING) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/crypto/openssl/CONTRIBUTING Thu Dec 3 21:13:35 2015 (r291719, copy of r291707, vendor-crypto/openssl/dist/CONTRIBUTING) @@ -0,0 +1,38 @@ +HOW TO CONTRIBUTE TO OpenSSL +---------------------------- + +Development is coordinated on the openssl-dev mailing list (see +http://www.openssl.org for information on subscribing). If you +would like to submit a patch, send it to rt@openssl.org with +the string "[PATCH]" in the subject. Please be sure to include a +textual explanation of what your patch does. + +You can also make GitHub pull requests. If you do this, please also send +mail to rt@openssl.org with a brief description and a link to the PR so +that we can more easily keep track of it. + +If you are unsure as to whether a feature will be useful for the general +OpenSSL community please discuss it on the openssl-dev mailing list first. +Someone may be already working on the same thing or there may be a good +reason as to why that feature isn't implemented. + +Patches should be as up to date as possible, preferably relative to the +current Git or the last snapshot. They should follow our coding style +(see https://www.openssl.org/policies/codingstyle.html) and compile without +warnings using the --strict-warnings flag. OpenSSL compiles on many varied +platforms: try to ensure you only use portable features. + +Our preferred format for patch files is "git format-patch" output. For example +to provide a patch file containing the last commit in your local git repository +use the following command: + +# git format-patch --stdout HEAD^ >mydiffs.patch + +Another method of creating an acceptable patch file without using git is as +follows: + +# cd openssl-work +# [your changes] +# ./Configure dist; make clean +# cd .. +# diff -ur openssl-orig openssl-work > mydiffs.patch Modified: head/crypto/openssl/Configure ============================================================================== --- head/crypto/openssl/Configure Thu Dec 3 21:13:08 2015 (r291718) +++ head/crypto/openssl/Configure Thu Dec 3 21:13:35 2015 (r291719) @@ -416,6 +416,7 @@ my %table=( "linux-ia64-icc","icc:-DL_ENDIAN -O2 -Wall::-D_REENTRANT::-ldl -no_cpprt:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "linux-x86_64-clang", "clang: -m64 -DL_ENDIAN -O3 -Wall -Wextra $clang_disabled_warnings -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"debug-linux-x86_64-clang", "clang: -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -g -Wall -Wextra $clang_disabled_warnings -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "linux-x86_64-icc", "icc:-DL_ENDIAN -O2::-D_REENTRANT::-ldl -no_cpprt:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "linux-x32", "gcc:-mx32 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-mx32:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::x32", "linux64-s390x", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", @@ -1646,21 +1647,22 @@ if ($shlib_version_number =~ /(^[0-9]*)\ $shlib_minor=$2; } +my $ecc = $cc; +$ecc = "clang" if `$cc --version 2>&1` =~ /clang/; + if ($strict_warnings) { - my $ecc = $cc; - $ecc = "clang" if `$cc --version 2>&1` =~ /clang/; my $wopt; die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc$/ or $ecc =~ /clang$/); foreach $wopt (split /\s+/, $gcc_devteam_warn) { - $cflags .= " $wopt" unless ($cflags =~ /$wopt/) + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) } if ($ecc eq "clang") { foreach $wopt (split /\s+/, $clang_devteam_warn) { - $cflags .= " $wopt" unless ($cflags =~ /$wopt/) + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) } } } @@ -1713,6 +1715,7 @@ while () s/^AR=\s*ar/AR= $ar/; s/^RANLIB=.*/RANLIB= $ranlib/; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc"; + s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang"; } s/^CFLAG=.*$/CFLAG= $cflags/; s/^DEPFLAG=.*$/DEPFLAG=$depflags/; Modified: head/crypto/openssl/FAQ ============================================================================== --- head/crypto/openssl/FAQ Thu Dec 3 21:13:08 2015 (r291718) +++ head/crypto/openssl/FAQ Thu Dec 3 21:13:35 2015 (r291719) @@ -1,1053 +1,2 @@ -OpenSSL - Frequently Asked Questions --------------------------------------- - -[MISC] Miscellaneous questions - -* Which is the current version of OpenSSL? -* Where is the documentation? -* How can I contact the OpenSSL developers? -* Where can I get a compiled version of OpenSSL? -* Why aren't tools like 'autoconf' and 'libtool' used? -* What is an 'engine' version? -* How do I check the authenticity of the OpenSSL distribution? -* How does the versioning scheme work? - -[LEGAL] Legal questions - -* Do I need patent licenses to use OpenSSL? -* Can I use OpenSSL with GPL software? - -[USER] Questions on using the OpenSSL applications - -* Why do I get a "PRNG not seeded" error message? -* Why do I get an "unable to write 'random state'" error message? -* How do I create certificates or certificate requests? -* Why can't I create certificate requests? -* Why does fail with a certificate verify error? -* Why can I only use weak ciphers when I connect to a server using OpenSSL? -* How can I create DSA certificates? -* Why can't I make an SSL connection using a DSA certificate? -* How can I remove the passphrase on a private key? -* Why can't I use OpenSSL certificates with SSL client authentication? -* Why does my browser give a warning about a mismatched hostname? -* How do I install a CA certificate into a browser? -* Why is OpenSSL x509 DN output not conformant to RFC2253? -* What is a "128 bit certificate"? Can I create one with OpenSSL? -* Why does OpenSSL set the authority key identifier extension incorrectly? -* How can I set up a bundle of commercial root CA certificates? - -[BUILD] Questions about building and testing OpenSSL - -* Why does the linker complain about undefined symbols? -* Why does the OpenSSL test fail with "bc: command not found"? -* Why does the OpenSSL test fail with "bc: 1 no implemented"? -* Why does the OpenSSL test fail with "bc: stack empty"? -* Why does the OpenSSL compilation fail on Alpha Tru64 Unix? -* Why does the OpenSSL compilation fail with "ar: command not found"? -* Why does the OpenSSL compilation fail on Win32 with VC++? -* What is special about OpenSSL on Redhat? -* Why does the OpenSSL compilation fail on MacOS X? -* Why does the OpenSSL test suite fail on MacOS X? -* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]? -* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"? -* Why does the OpenSSL test suite fail in sha512t on x86 CPU? -* Why does compiler fail to compile sha512.c? -* Test suite still fails, what to do? -* I think I've found a bug, what should I do? -* I'm SURE I've found a bug, how do I report it? -* I've found a security issue, how do I report it? - -[PROG] Questions about programming with OpenSSL - -* Is OpenSSL thread-safe? -* I've compiled a program under Windows and it crashes: why? -* How do I read or write a DER encoded buffer using the ASN1 functions? -* OpenSSL uses DER but I need BER format: does OpenSSL support BER? -* I've tried using and I get errors why? -* I've called and it fails, why? -* I just get a load of numbers for the error output, what do they mean? -* Why do I get errors about unknown algorithms? -* Why can't the OpenSSH configure script detect OpenSSL? -* Can I use OpenSSL's SSL library with non-blocking I/O? -* Why doesn't my server application receive a client certificate? -* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? -* I think I've detected a memory leak, is this a bug? -* Why does Valgrind complain about the use of uninitialized data? -* Why doesn't a memory BIO work when a file does? -* Where are the declarations and implementations of d2i_X509() etc? - -=============================================================================== - -[MISC] ======================================================================== - -* Which is the current version of OpenSSL? - -The current version is available from . -OpenSSL 1.0.1a was released on Apr 19th, 2012. - -In addition to the current stable release, you can also access daily -snapshots of the OpenSSL development version at , or get it by anonymous Git access. - - -* Where is the documentation? - -OpenSSL is a library that provides cryptographic functionality to -applications such as secure web servers. Be sure to read the -documentation of the application you want to use. The INSTALL file -explains how to install this library. - -OpenSSL includes a command line utility that can be used to perform a -variety of cryptographic functions. It is described in the openssl(1) -manpage. Documentation for developers is currently being written. Many -manual pages are available; overviews over libcrypto and -libssl are given in the crypto(3) and ssl(3) manpages. - -The OpenSSL manpages are installed in /usr/local/ssl/man/ (or a -different directory if you specified one as described in INSTALL). -In addition, you can read the most current versions at -. Note that the online documents refer -to the very latest development versions of OpenSSL and may include features -not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. The pod format -documentation is included in each OpenSSL distribution under the docs -directory. - -There is some documentation about certificate extensions and PKCS#12 -in doc/openssl.txt - -The original SSLeay documentation is included in OpenSSL as -doc/ssleay.txt. It may be useful when none of the other resources -help, but please note that it reflects the obsolete version SSLeay -0.6.6. - - -* How can I contact the OpenSSL developers? - -The README file describes how to submit bug reports and patches to -OpenSSL. Information on the OpenSSL mailing lists is available from -. - - -* Where can I get a compiled version of OpenSSL? - -You can finder pointers to binary distributions in - . - -Some applications that use OpenSSL are distributed in binary form. -When using such an application, you don't need to install OpenSSL -yourself; the application will include the required parts (e.g. DLLs). - -If you want to build OpenSSL on a Windows system and you don't have *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 3 21:16:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48211A409A0; Thu, 3 Dec 2015 21:16:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15317132D; Thu, 3 Dec 2015 21:16:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3LGr8f043461; Thu, 3 Dec 2015 21:16:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3LGrdu043460; Thu, 3 Dec 2015 21:16:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512032116.tB3LGrdu043460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 3 Dec 2015 21:16:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291720 - head/usr.sbin/fstyp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 21:16:54 -0000 Author: bdrewery Date: Thu Dec 3 21:16:52 2015 New Revision: 291720 URL: https://svnweb.freebsd.org/changeset/base/291720 Log: Convert to LIBADD Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/fstyp/Makefile Modified: head/usr.sbin/fstyp/Makefile ============================================================================== --- head/usr.sbin/fstyp/Makefile Thu Dec 3 21:13:35 2015 (r291719) +++ head/usr.sbin/fstyp/Makefile Thu Dec 3 21:16:52 2015 (r291720) @@ -36,8 +36,7 @@ CFLAGS+= -I${.CURDIR}/../../cddl/contrib CFLAGS+=-I${.CURDIR}/../../sys -DPADD= ${LIBGEOM} ${LIBMD} -LDADD= -lgeom -lmd +LIBADD= geom md .if ${MK_ZFS} != "no" DPADD += ${LIBNVPAIR} ${LIBZFS} From owner-svn-src-all@freebsd.org Thu Dec 3 21:18:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B960A40A0E; Thu, 3 Dec 2015 21:18:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 980F71543; Thu, 3 Dec 2015 21:18:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3LIniI043571; Thu, 3 Dec 2015 21:18:49 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3LIns1043566; Thu, 3 Dec 2015 21:18:49 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201512032118.tB3LIns1043566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 3 Dec 2015 21:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291721 - in stable/10: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/asn1 crypto/openssl/crypto/bio crypto/openssl/crypto... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 21:18:51 -0000 Author: jkim Date: Thu Dec 3 21:18:48 2015 New Revision: 291721 URL: https://svnweb.freebsd.org/changeset/base/291721 Log: Merge OpenSSL 1.0.1q. Added: stable/10/crypto/openssl/CONTRIBUTING - copied unchanged from r291709, vendor-crypto/openssl/dist-1.0.1/CONTRIBUTING stable/10/crypto/openssl/appveyor.yml - copied unchanged from r291709, vendor-crypto/openssl/dist-1.0.1/appveyor.yml stable/10/crypto/openssl/doc/dir-locals.example.el - copied unchanged from r291709, vendor-crypto/openssl/dist-1.0.1/doc/dir-locals.example.el stable/10/crypto/openssl/doc/openssl-c-indent.el - copied unchanged from r291709, vendor-crypto/openssl/dist-1.0.1/doc/openssl-c-indent.el stable/10/crypto/openssl/ssl/clienthellotest.c - copied unchanged from r291709, vendor-crypto/openssl/dist-1.0.1/ssl/clienthellotest.c stable/10/crypto/openssl/util/toutf8.sh - copied unchanged from r291709, vendor-crypto/openssl/dist-1.0.1/util/toutf8.sh Deleted: stable/10/crypto/openssl/util/pod2mantest Modified: stable/10/crypto/openssl/CHANGES stable/10/crypto/openssl/Configure stable/10/crypto/openssl/FAQ stable/10/crypto/openssl/Makefile stable/10/crypto/openssl/Makefile.org stable/10/crypto/openssl/NEWS stable/10/crypto/openssl/README stable/10/crypto/openssl/apps/Makefile stable/10/crypto/openssl/apps/apps.c stable/10/crypto/openssl/apps/asn1pars.c stable/10/crypto/openssl/apps/ca.c stable/10/crypto/openssl/apps/ecparam.c stable/10/crypto/openssl/apps/engine.c stable/10/crypto/openssl/apps/ocsp.c stable/10/crypto/openssl/apps/pkcs12.c stable/10/crypto/openssl/apps/s_client.c stable/10/crypto/openssl/apps/s_server.c stable/10/crypto/openssl/crypto/aes/asm/aes-586.pl stable/10/crypto/openssl/crypto/aes/asm/aesni-x86.pl stable/10/crypto/openssl/crypto/asn1/asn1_par.c stable/10/crypto/openssl/crypto/asn1/d2i_pr.c stable/10/crypto/openssl/crypto/asn1/tasn_dec.c stable/10/crypto/openssl/crypto/asn1/x_bignum.c stable/10/crypto/openssl/crypto/asn1/x_pubkey.c stable/10/crypto/openssl/crypto/asn1/x_x509.c stable/10/crypto/openssl/crypto/bio/b_dump.c stable/10/crypto/openssl/crypto/bio/bss_file.c stable/10/crypto/openssl/crypto/bn/asm/armv4-gf2m.pl stable/10/crypto/openssl/crypto/bn/asm/ia64.S stable/10/crypto/openssl/crypto/bn/asm/s390x-gf2m.pl stable/10/crypto/openssl/crypto/bn/asm/x86-gf2m.pl stable/10/crypto/openssl/crypto/bn/asm/x86_64-gcc.c stable/10/crypto/openssl/crypto/bn/asm/x86_64-gf2m.pl stable/10/crypto/openssl/crypto/bn/bn_exp.c stable/10/crypto/openssl/crypto/bn/bn_gcd.c stable/10/crypto/openssl/crypto/bn/bn_gf2m.c stable/10/crypto/openssl/crypto/bn/bn_mont.c stable/10/crypto/openssl/crypto/bn/bn_recp.c stable/10/crypto/openssl/crypto/bn/bn_x931p.c stable/10/crypto/openssl/crypto/bn/bntest.c stable/10/crypto/openssl/crypto/buffer/buf_str.c stable/10/crypto/openssl/crypto/buffer/buffer.h stable/10/crypto/openssl/crypto/cms/cms_enc.c stable/10/crypto/openssl/crypto/cms/cms_pwri.c stable/10/crypto/openssl/crypto/cms/cms_smime.c stable/10/crypto/openssl/crypto/comp/c_zlib.c stable/10/crypto/openssl/crypto/conf/conf_def.c stable/10/crypto/openssl/crypto/conf/conf_sap.c stable/10/crypto/openssl/crypto/cryptlib.c stable/10/crypto/openssl/crypto/dsa/dsa_ameth.c stable/10/crypto/openssl/crypto/dsa/dsa_gen.c stable/10/crypto/openssl/crypto/ec/ec.h stable/10/crypto/openssl/crypto/ec/ec_asn1.c stable/10/crypto/openssl/crypto/ec/ec_key.c stable/10/crypto/openssl/crypto/engine/eng_cryptodev.c stable/10/crypto/openssl/crypto/engine/eng_list.c stable/10/crypto/openssl/crypto/evp/e_des3.c stable/10/crypto/openssl/crypto/evp/encode.c stable/10/crypto/openssl/crypto/evp/evp_key.c stable/10/crypto/openssl/crypto/evp/evp_lib.c stable/10/crypto/openssl/crypto/evp/evp_pbe.c stable/10/crypto/openssl/crypto/evp/p_lib.c stable/10/crypto/openssl/crypto/evp/pmeth_gn.c stable/10/crypto/openssl/crypto/hmac/hm_ameth.c stable/10/crypto/openssl/crypto/jpake/jpake.c stable/10/crypto/openssl/crypto/mem_clr.c stable/10/crypto/openssl/crypto/modes/asm/ghash-armv4.pl stable/10/crypto/openssl/crypto/modes/asm/ghash-x86.pl stable/10/crypto/openssl/crypto/ocsp/ocsp_lib.c stable/10/crypto/openssl/crypto/ocsp/ocsp_prn.c stable/10/crypto/openssl/crypto/opensslconf.h stable/10/crypto/openssl/crypto/opensslconf.h.in stable/10/crypto/openssl/crypto/opensslv.h stable/10/crypto/openssl/crypto/pem/pem_info.c stable/10/crypto/openssl/crypto/pem/pvkfmt.c stable/10/crypto/openssl/crypto/pkcs12/p12_add.c stable/10/crypto/openssl/crypto/pkcs12/p12_crpt.c stable/10/crypto/openssl/crypto/pkcs12/p12_mutl.c stable/10/crypto/openssl/crypto/pkcs7/pk7_doit.c stable/10/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl stable/10/crypto/openssl/crypto/rsa/rsa_ameth.c stable/10/crypto/openssl/crypto/rsa/rsa_gen.c stable/10/crypto/openssl/crypto/rsa/rsa_sign.c stable/10/crypto/openssl/crypto/rsa/rsa_test.c stable/10/crypto/openssl/crypto/sha/asm/sha1-586.pl stable/10/crypto/openssl/crypto/sha/asm/sha256-586.pl stable/10/crypto/openssl/crypto/sha/asm/sha512-586.pl stable/10/crypto/openssl/crypto/sha/asm/sha512-parisc.pl stable/10/crypto/openssl/crypto/sparccpuid.S stable/10/crypto/openssl/crypto/srp/srp_vfy.c stable/10/crypto/openssl/crypto/ts/ts_rsp_verify.c stable/10/crypto/openssl/crypto/whrlpool/asm/wp-mmx.pl stable/10/crypto/openssl/crypto/x509/x509_cmp.c stable/10/crypto/openssl/crypto/x509/x509_lu.c stable/10/crypto/openssl/crypto/x509v3/v3_cpols.c stable/10/crypto/openssl/crypto/x509v3/v3_ncons.c stable/10/crypto/openssl/crypto/x509v3/v3_pci.c stable/10/crypto/openssl/crypto/x509v3/v3_pcia.c stable/10/crypto/openssl/doc/apps/ciphers.pod stable/10/crypto/openssl/doc/apps/dgst.pod stable/10/crypto/openssl/doc/apps/genrsa.pod stable/10/crypto/openssl/doc/apps/req.pod stable/10/crypto/openssl/doc/apps/x509.pod stable/10/crypto/openssl/doc/crypto/BIO_read.pod stable/10/crypto/openssl/doc/crypto/BN_rand.pod stable/10/crypto/openssl/doc/crypto/DSA_generate_parameters.pod stable/10/crypto/openssl/doc/crypto/EVP_DigestVerifyInit.pod stable/10/crypto/openssl/doc/crypto/EVP_SignInit.pod stable/10/crypto/openssl/doc/crypto/buffer.pod stable/10/crypto/openssl/doc/crypto/d2i_X509_NAME.pod stable/10/crypto/openssl/doc/ssl/SSL_CTX_add_extra_chain_cert.pod stable/10/crypto/openssl/e_os.h stable/10/crypto/openssl/engines/e_chil.c stable/10/crypto/openssl/ssl/Makefile stable/10/crypto/openssl/ssl/bio_ssl.c stable/10/crypto/openssl/ssl/d1_both.c stable/10/crypto/openssl/ssl/d1_clnt.c stable/10/crypto/openssl/ssl/d1_srvr.c stable/10/crypto/openssl/ssl/s23_clnt.c stable/10/crypto/openssl/ssl/s3_cbc.c stable/10/crypto/openssl/ssl/s3_clnt.c stable/10/crypto/openssl/ssl/s3_enc.c stable/10/crypto/openssl/ssl/s3_lib.c stable/10/crypto/openssl/ssl/s3_srvr.c stable/10/crypto/openssl/ssl/ssl.h stable/10/crypto/openssl/ssl/ssl3.h stable/10/crypto/openssl/ssl/ssl_asn1.c stable/10/crypto/openssl/ssl/ssl_cert.c stable/10/crypto/openssl/ssl/ssl_ciph.c stable/10/crypto/openssl/ssl/ssl_err.c stable/10/crypto/openssl/ssl/ssl_lib.c stable/10/crypto/openssl/ssl/ssl_locl.h stable/10/crypto/openssl/ssl/ssl_rsa.c stable/10/crypto/openssl/ssl/ssl_sess.c stable/10/crypto/openssl/ssl/ssltest.c stable/10/crypto/openssl/ssl/t1_enc.c stable/10/crypto/openssl/ssl/t1_lib.c stable/10/crypto/openssl/ssl/tls1.h stable/10/crypto/openssl/util/indent.pro stable/10/crypto/openssl/util/mk1mf.pl stable/10/crypto/openssl/util/mkrc.pl stable/10/crypto/openssl/util/mkstack.pl stable/10/crypto/openssl/util/pl/VC-32.pl stable/10/crypto/openssl/util/selftest.pl stable/10/secure/lib/libcrypto/Makefile.inc stable/10/secure/lib/libcrypto/Makefile.man stable/10/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/10/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/10/secure/lib/libcrypto/man/BIO_ctrl.3 stable/10/secure/lib/libcrypto/man/BIO_f_base64.3 stable/10/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/10/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/10/secure/lib/libcrypto/man/BIO_f_md.3 stable/10/secure/lib/libcrypto/man/BIO_f_null.3 stable/10/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/10/secure/lib/libcrypto/man/BIO_find_type.3 stable/10/secure/lib/libcrypto/man/BIO_new.3 stable/10/secure/lib/libcrypto/man/BIO_new_CMS.3 stable/10/secure/lib/libcrypto/man/BIO_push.3 stable/10/secure/lib/libcrypto/man/BIO_read.3 stable/10/secure/lib/libcrypto/man/BIO_s_accept.3 stable/10/secure/lib/libcrypto/man/BIO_s_bio.3 stable/10/secure/lib/libcrypto/man/BIO_s_connect.3 stable/10/secure/lib/libcrypto/man/BIO_s_fd.3 stable/10/secure/lib/libcrypto/man/BIO_s_file.3 stable/10/secure/lib/libcrypto/man/BIO_s_mem.3 stable/10/secure/lib/libcrypto/man/BIO_s_null.3 stable/10/secure/lib/libcrypto/man/BIO_s_socket.3 stable/10/secure/lib/libcrypto/man/BIO_set_callback.3 stable/10/secure/lib/libcrypto/man/BIO_should_retry.3 stable/10/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_start.3 stable/10/secure/lib/libcrypto/man/BN_add.3 stable/10/secure/lib/libcrypto/man/BN_add_word.3 stable/10/secure/lib/libcrypto/man/BN_bn2bin.3 stable/10/secure/lib/libcrypto/man/BN_cmp.3 stable/10/secure/lib/libcrypto/man/BN_copy.3 stable/10/secure/lib/libcrypto/man/BN_generate_prime.3 stable/10/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/10/secure/lib/libcrypto/man/BN_new.3 stable/10/secure/lib/libcrypto/man/BN_num_bytes.3 stable/10/secure/lib/libcrypto/man/BN_rand.3 stable/10/secure/lib/libcrypto/man/BN_set_bit.3 stable/10/secure/lib/libcrypto/man/BN_swap.3 stable/10/secure/lib/libcrypto/man/BN_zero.3 stable/10/secure/lib/libcrypto/man/CMS_add0_cert.3 stable/10/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 stable/10/secure/lib/libcrypto/man/CMS_add1_signer.3 stable/10/secure/lib/libcrypto/man/CMS_compress.3 stable/10/secure/lib/libcrypto/man/CMS_decrypt.3 stable/10/secure/lib/libcrypto/man/CMS_encrypt.3 stable/10/secure/lib/libcrypto/man/CMS_final.3 stable/10/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_type.3 stable/10/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 stable/10/secure/lib/libcrypto/man/CMS_sign.3 stable/10/secure/lib/libcrypto/man/CMS_sign_receipt.3 stable/10/secure/lib/libcrypto/man/CMS_uncompress.3 stable/10/secure/lib/libcrypto/man/CMS_verify.3 stable/10/secure/lib/libcrypto/man/CMS_verify_receipt.3 stable/10/secure/lib/libcrypto/man/CONF_modules_free.3 stable/10/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/10/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/10/secure/lib/libcrypto/man/DH_generate_key.3 stable/10/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DH_new.3 stable/10/secure/lib/libcrypto/man/DH_set_method.3 stable/10/secure/lib/libcrypto/man/DH_size.3 stable/10/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/10/secure/lib/libcrypto/man/DSA_do_sign.3 stable/10/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/10/secure/lib/libcrypto/man/DSA_generate_key.3 stable/10/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DSA_new.3 stable/10/secure/lib/libcrypto/man/DSA_set_method.3 stable/10/secure/lib/libcrypto/man/DSA_sign.3 stable/10/secure/lib/libcrypto/man/DSA_size.3 stable/10/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/10/secure/lib/libcrypto/man/ERR_clear_error.3 stable/10/secure/lib/libcrypto/man/ERR_error_string.3 stable/10/secure/lib/libcrypto/man/ERR_get_error.3 stable/10/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/10/secure/lib/libcrypto/man/ERR_load_strings.3 stable/10/secure/lib/libcrypto/man/ERR_print_errors.3 stable/10/secure/lib/libcrypto/man/ERR_put_error.3 stable/10/secure/lib/libcrypto/man/ERR_remove_state.3 stable/10/secure/lib/libcrypto/man/ERR_set_mark.3 stable/10/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/10/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestSignInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 stable/10/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/10/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_derive.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_sign.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 stable/10/secure/lib/libcrypto/man/EVP_SealInit.3 stable/10/secure/lib/libcrypto/man/EVP_SignInit.3 stable/10/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/10/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/10/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/10/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/10/secure/lib/libcrypto/man/OPENSSL_config.3 stable/10/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/10/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/10/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 stable/10/secure/lib/libcrypto/man/PKCS12_create.3 stable/10/secure/lib/libcrypto/man/PKCS12_parse.3 stable/10/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 stable/10/secure/lib/libcrypto/man/PKCS7_verify.3 stable/10/secure/lib/libcrypto/man/RAND_add.3 stable/10/secure/lib/libcrypto/man/RAND_bytes.3 stable/10/secure/lib/libcrypto/man/RAND_cleanup.3 stable/10/secure/lib/libcrypto/man/RAND_egd.3 stable/10/secure/lib/libcrypto/man/RAND_load_file.3 stable/10/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/10/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/10/secure/lib/libcrypto/man/RSA_check_key.3 stable/10/secure/lib/libcrypto/man/RSA_generate_key.3 stable/10/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/RSA_new.3 stable/10/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/10/secure/lib/libcrypto/man/RSA_print.3 stable/10/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_set_method.3 stable/10/secure/lib/libcrypto/man/RSA_sign.3 stable/10/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/10/secure/lib/libcrypto/man/RSA_size.3 stable/10/secure/lib/libcrypto/man/SMIME_read_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/10/secure/lib/libcrypto/man/SMIME_write_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/10/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/10/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/10/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/10/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 stable/10/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 stable/10/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 stable/10/secure/lib/libcrypto/man/X509_new.3 stable/10/secure/lib/libcrypto/man/X509_verify_cert.3 stable/10/secure/lib/libcrypto/man/bio.3 stable/10/secure/lib/libcrypto/man/blowfish.3 stable/10/secure/lib/libcrypto/man/bn.3 stable/10/secure/lib/libcrypto/man/bn_internal.3 stable/10/secure/lib/libcrypto/man/buffer.3 stable/10/secure/lib/libcrypto/man/crypto.3 stable/10/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/10/secure/lib/libcrypto/man/d2i_CMS_ContentInfo.3 stable/10/secure/lib/libcrypto/man/d2i_DHparams.3 stable/10/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_ECPrivateKey.3 stable/10/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/10/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_X509.3 stable/10/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/10/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/10/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/10/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/10/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/10/secure/lib/libcrypto/man/des.3 stable/10/secure/lib/libcrypto/man/dh.3 stable/10/secure/lib/libcrypto/man/dsa.3 stable/10/secure/lib/libcrypto/man/ecdsa.3 stable/10/secure/lib/libcrypto/man/engine.3 stable/10/secure/lib/libcrypto/man/err.3 stable/10/secure/lib/libcrypto/man/evp.3 stable/10/secure/lib/libcrypto/man/hmac.3 stable/10/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 stable/10/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 stable/10/secure/lib/libcrypto/man/lh_stats.3 stable/10/secure/lib/libcrypto/man/lhash.3 stable/10/secure/lib/libcrypto/man/md5.3 stable/10/secure/lib/libcrypto/man/mdc2.3 stable/10/secure/lib/libcrypto/man/pem.3 stable/10/secure/lib/libcrypto/man/rand.3 stable/10/secure/lib/libcrypto/man/rc4.3 stable/10/secure/lib/libcrypto/man/ripemd.3 stable/10/secure/lib/libcrypto/man/rsa.3 stable/10/secure/lib/libcrypto/man/sha.3 stable/10/secure/lib/libcrypto/man/threads.3 stable/10/secure/lib/libcrypto/man/ui.3 stable/10/secure/lib/libcrypto/man/ui_compat.3 stable/10/secure/lib/libcrypto/man/x509.3 stable/10/secure/lib/libssl/Makefile.man stable/10/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/10/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/10/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/10/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_free.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/10/secure/lib/libssl/man/SSL_CTX_new.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_read_ahead.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 stable/10/secure/lib/libssl/man/SSL_SESSION_free.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/10/secure/lib/libssl/man/SSL_accept.3 stable/10/secure/lib/libssl/man/SSL_alert_type_string.3 stable/10/secure/lib/libssl/man/SSL_clear.3 stable/10/secure/lib/libssl/man/SSL_connect.3 stable/10/secure/lib/libssl/man/SSL_do_handshake.3 stable/10/secure/lib/libssl/man/SSL_free.3 stable/10/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/10/secure/lib/libssl/man/SSL_get_ciphers.3 stable/10/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/10/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/10/secure/lib/libssl/man/SSL_get_error.3 stable/10/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/10/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_get_fd.3 stable/10/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/10/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/10/secure/lib/libssl/man/SSL_get_psk_identity.3 stable/10/secure/lib/libssl/man/SSL_get_rbio.3 stable/10/secure/lib/libssl/man/SSL_get_session.3 stable/10/secure/lib/libssl/man/SSL_get_verify_result.3 stable/10/secure/lib/libssl/man/SSL_get_version.3 stable/10/secure/lib/libssl/man/SSL_library_init.3 stable/10/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/10/secure/lib/libssl/man/SSL_new.3 stable/10/secure/lib/libssl/man/SSL_pending.3 stable/10/secure/lib/libssl/man/SSL_read.3 stable/10/secure/lib/libssl/man/SSL_rstate_string.3 stable/10/secure/lib/libssl/man/SSL_session_reused.3 stable/10/secure/lib/libssl/man/SSL_set_bio.3 stable/10/secure/lib/libssl/man/SSL_set_connect_state.3 stable/10/secure/lib/libssl/man/SSL_set_fd.3 stable/10/secure/lib/libssl/man/SSL_set_session.3 stable/10/secure/lib/libssl/man/SSL_set_shutdown.3 stable/10/secure/lib/libssl/man/SSL_set_verify_result.3 stable/10/secure/lib/libssl/man/SSL_shutdown.3 stable/10/secure/lib/libssl/man/SSL_state_string.3 stable/10/secure/lib/libssl/man/SSL_want.3 stable/10/secure/lib/libssl/man/SSL_write.3 stable/10/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/10/secure/lib/libssl/man/ssl.3 stable/10/secure/usr.bin/openssl/man/CA.pl.1 stable/10/secure/usr.bin/openssl/man/asn1parse.1 stable/10/secure/usr.bin/openssl/man/c_rehash.1 stable/10/secure/usr.bin/openssl/man/ca.1 stable/10/secure/usr.bin/openssl/man/ciphers.1 stable/10/secure/usr.bin/openssl/man/cms.1 stable/10/secure/usr.bin/openssl/man/crl.1 stable/10/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/10/secure/usr.bin/openssl/man/dgst.1 stable/10/secure/usr.bin/openssl/man/dhparam.1 stable/10/secure/usr.bin/openssl/man/dsa.1 stable/10/secure/usr.bin/openssl/man/dsaparam.1 stable/10/secure/usr.bin/openssl/man/ec.1 stable/10/secure/usr.bin/openssl/man/ecparam.1 stable/10/secure/usr.bin/openssl/man/enc.1 stable/10/secure/usr.bin/openssl/man/errstr.1 stable/10/secure/usr.bin/openssl/man/gendsa.1 stable/10/secure/usr.bin/openssl/man/genpkey.1 stable/10/secure/usr.bin/openssl/man/genrsa.1 stable/10/secure/usr.bin/openssl/man/nseq.1 stable/10/secure/usr.bin/openssl/man/ocsp.1 stable/10/secure/usr.bin/openssl/man/openssl.1 stable/10/secure/usr.bin/openssl/man/passwd.1 stable/10/secure/usr.bin/openssl/man/pkcs12.1 stable/10/secure/usr.bin/openssl/man/pkcs7.1 stable/10/secure/usr.bin/openssl/man/pkcs8.1 stable/10/secure/usr.bin/openssl/man/pkey.1 stable/10/secure/usr.bin/openssl/man/pkeyparam.1 stable/10/secure/usr.bin/openssl/man/pkeyutl.1 stable/10/secure/usr.bin/openssl/man/rand.1 stable/10/secure/usr.bin/openssl/man/req.1 stable/10/secure/usr.bin/openssl/man/rsa.1 stable/10/secure/usr.bin/openssl/man/rsautl.1 stable/10/secure/usr.bin/openssl/man/s_client.1 stable/10/secure/usr.bin/openssl/man/s_server.1 stable/10/secure/usr.bin/openssl/man/s_time.1 stable/10/secure/usr.bin/openssl/man/sess_id.1 stable/10/secure/usr.bin/openssl/man/smime.1 stable/10/secure/usr.bin/openssl/man/speed.1 stable/10/secure/usr.bin/openssl/man/spkac.1 stable/10/secure/usr.bin/openssl/man/ts.1 stable/10/secure/usr.bin/openssl/man/tsget.1 stable/10/secure/usr.bin/openssl/man/verify.1 stable/10/secure/usr.bin/openssl/man/version.1 stable/10/secure/usr.bin/openssl/man/x509.1 stable/10/secure/usr.bin/openssl/man/x509v3_config.1 Modified: stable/10/crypto/openssl/CHANGES ============================================================================== --- stable/10/crypto/openssl/CHANGES Thu Dec 3 21:16:52 2015 (r291720) +++ stable/10/crypto/openssl/CHANGES Thu Dec 3 21:18:48 2015 (r291721) @@ -2,6 +2,45 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1p and 1.0.1q [3 Dec 2015] + + *) Certificate verify crash with missing PSS parameter + + The signature verification routines will crash with a NULL pointer + dereference if presented with an ASN.1 signature using the RSA PSS + algorithm and absent mask generation function parameter. Since these + routines are used to verify certificate signature algorithms this can be + used to crash any certificate verification operation and exploited in a + DoS attack. Any application which performs certificate verification is + vulnerable including OpenSSL clients and servers which enable client + authentication. + + This issue was reported to OpenSSL by Loïc Jonas Etienne (Qnective AG). + (CVE-2015-3194) + [Stephen Henson] + + *) X509_ATTRIBUTE memory leak + + When presented with a malformed X509_ATTRIBUTE structure OpenSSL will leak + memory. This structure is used by the PKCS#7 and CMS routines so any + application which reads PKCS#7 or CMS data from untrusted sources is + affected. SSL/TLS is not affected. + + This issue was reported to OpenSSL by Adam Langley (Google/BoringSSL) using + libFuzzer. + (CVE-2015-3195) + [Stephen Henson] + + *) Rewrite EVP_DecodeUpdate (base64 decoding) to fix several bugs. + This changes the decoding behaviour for some invalid messages, + though the change is mostly in the more lenient direction, and + legacy behaviour is preserved as much as possible. + [Emilia Käsper] + + *) In DSA_generate_parameters_ex, if the provided seed is too short, + return an error + [Rich Salz and Ismo Puustinen ] + Changes between 1.0.1o and 1.0.1p [9 Jul 2015] *) Alternate chains certificate forgery @@ -15,10 +54,19 @@ This issue was reported to OpenSSL by Adam Langley/David Benjamin (Google/BoringSSL). + (CVE-2015-1793) [Matt Caswell] - Changes between 1.0.1n and 1.0.1o [12 Jun 2015] + *) Race condition handling PSK identify hint + + If PSK identity hints are received by a multi-threaded client then + the values are wrongly updated in the parent SSL_CTX structure. This can + result in a race condition potentially leading to a double free of the + identify hint data. + (CVE-2015-3196) + [Stephen Henson] + Changes between 1.0.1n and 1.0.1o [12 Jun 2015] *) Fix HMAC ABI incompatibility. The previous version introduced an ABI incompatibility in the handling of HMAC. The previous ABI has now been restored. @@ -55,9 +103,9 @@ callbacks. This issue was reported to OpenSSL by Robert Swiecki (Google), and - independently by Hanno Böck. + independently by Hanno Böck. (CVE-2015-1789) - [Emilia Käsper] + [Emilia Käsper] *) PKCS7 crash with missing EnvelopedContent @@ -71,7 +119,7 @@ This issue was reported to OpenSSL by Michal Zalewski (Google). (CVE-2015-1790) - [Emilia Käsper] + [Emilia Käsper] *) CMS verify infinite loop with unknown hash function @@ -94,6 +142,9 @@ *) Reject DH handshakes with parameters shorter than 768 bits. [Kurt Roeckx and Emilia Kasper] + *) dhparam: generate 2048-bit parameters by default. + [Kurt Roeckx and Emilia Kasper] + Changes between 1.0.1l and 1.0.1m [19 Mar 2015] *) Segmentation fault in ASN1_TYPE_cmp fix @@ -132,7 +183,7 @@ This issue was reported to OpenSSL by Michal Zalewski (Google). (CVE-2015-0289) - [Emilia Käsper] + [Emilia Käsper] *) DoS via reachable assert in SSLv2 servers fix @@ -140,10 +191,10 @@ servers that both support SSLv2 and enable export cipher suites by sending a specially crafted SSLv2 CLIENT-MASTER-KEY message. - This issue was discovered by Sean Burford (Google) and Emilia Käsper + This issue was discovered by Sean Burford (Google) and Emilia Käsper (OpenSSL development team). (CVE-2015-0293) - [Emilia Käsper] + [Emilia Käsper] *) Use After Free following d2i_ECPrivatekey error fix @@ -288,12 +339,12 @@ version does not match the session's version. Resuming with a different version, while not strictly forbidden by the RFC, is of questionable sanity and breaks all known clients. - [David Benjamin, Emilia Käsper] + [David Benjamin, Emilia Käsper] *) Tighten handling of the ChangeCipherSpec (CCS) message: reject early CCS messages during renegotiation. (Note that because renegotiation is encrypted, this early CCS was not exploitable.) - [Emilia Käsper] + [Emilia Käsper] *) Tighten client-side session ticket handling during renegotiation: ensure that the client only accepts a session ticket if the server sends @@ -304,7 +355,7 @@ Similarly, ensure that the client requires a session ticket if one was advertised in the ServerHello. Previously, a TLS client would ignore a missing NewSessionTicket message. - [Emilia Käsper] + [Emilia Käsper] Changes between 1.0.1i and 1.0.1j [15 Oct 2014] @@ -384,10 +435,10 @@ with a null pointer dereference (read) by specifying an anonymous (EC)DH ciphersuite and sending carefully crafted handshake messages. - Thanks to Felix Gröbert (Google) for discovering and researching this + Thanks to Felix Gröbert (Google) for discovering and researching this issue. (CVE-2014-3510) - [Emilia Käsper] + [Emilia Käsper] *) By sending carefully crafted DTLS packets an attacker could cause openssl to leak memory. This can be exploited through a Denial of Service attack. @@ -424,7 +475,7 @@ properly negotiated with the client. This can be exploited through a Denial of Service attack. - Thanks to Joonas Kuorilehto and Riku Hietamäki (Codenomicon) for + Thanks to Joonas Kuorilehto and Riku Hietamäki (Codenomicon) for discovering and researching this issue. (CVE-2014-5139) [Steve Henson] @@ -436,7 +487,7 @@ Thanks to Ivan Fratric (Google) for discovering this issue. (CVE-2014-3508) - [Emilia Käsper, and Steve Henson] + [Emilia Käsper, and Steve Henson] *) Fix ec_GFp_simple_points_make_affine (thus, EC_POINTs_mul etc.) for corner cases. (Certain input points at infinity could lead to @@ -466,15 +517,15 @@ client or server. This is potentially exploitable to run arbitrary code on a vulnerable client or server. - Thanks to Jüri Aedla for reporting this issue. (CVE-2014-0195) - [Jüri Aedla, Steve Henson] + Thanks to Jüri Aedla for reporting this issue. (CVE-2014-0195) + [Jüri Aedla, Steve Henson] *) Fix bug in TLS code where clients enable anonymous ECDH ciphersuites are subject to a denial of service attack. - Thanks to Felix Gröbert and Ivan Fratric at Google for discovering + Thanks to Felix Gröbert and Ivan Fratric at Google for discovering this issue. (CVE-2014-3470) - [Felix Gröbert, Ivan Fratric, Steve Henson] + [Felix Gröbert, Ivan Fratric, Steve Henson] *) Harmonize version and its documentation. -f flag is used to display compilation flags. @@ -553,9 +604,9 @@ Thanks go to Nadhem Alfardan and Kenny Paterson of the Information Security Group at Royal Holloway, University of London (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and - Emilia Käsper for the initial patch. + Emilia Käsper for the initial patch. (CVE-2013-0169) - [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] *) Fix flaw in AESNI handling of TLS 1.2 and 1.1 records for CBC mode ciphersuites which can be exploited in a denial of service attack. @@ -730,7 +781,7 @@ EC_GROUP_new_by_curve_name() will automatically use these (while EC_GROUP_new_curve_GFp() currently prefers the more flexible implementations). - [Emilia Käsper, Adam Langley, Bodo Moeller (Google)] + [Emilia Käsper, Adam Langley, Bodo Moeller (Google)] *) Use type ossl_ssize_t instad of ssize_t which isn't available on all platforms. Move ssize_t definition from e_os.h to the public @@ -1006,7 +1057,7 @@ [Adam Langley (Google)] *) Fix spurious failures in ecdsatest.c. - [Emilia Käsper (Google)] + [Emilia Käsper (Google)] *) Fix the BIO_f_buffer() implementation (which was mixing different interpretations of the '..._len' fields). @@ -1020,7 +1071,7 @@ lock to call BN_BLINDING_invert_ex, and avoids one use of BN_BLINDING_update for each BN_BLINDING structure (previously, the last update always remained unused). - [Emilia Käsper (Google)] + [Emilia Käsper (Google)] *) In ssl3_clear, preserve s3->init_extra along with s3->rbuf. [Bob Buckholz (Google)] @@ -1829,7 +1880,7 @@ *) Add RFC 3161 compliant time stamp request creation, response generation and response verification functionality. - [Zoltán Glózik , The OpenTSA Project] + [Zoltán Glózik , The OpenTSA Project] *) Add initial support for TLS extensions, specifically for the server_name extension so far. The SSL_SESSION, SSL_CTX, and SSL data structures now @@ -2997,7 +3048,7 @@ *) BN_CTX_get() should return zero-valued bignums, providing the same initialised value as BN_new(). - [Geoff Thorpe, suggested by Ulf Möller] + [Geoff Thorpe, suggested by Ulf Möller] *) Support for inhibitAnyPolicy certificate extension. [Steve Henson] @@ -3016,7 +3067,7 @@ some point, these tighter rules will become openssl's default to improve maintainability, though the assert()s and other overheads will remain only in debugging configurations. See bn.h for more details. - [Geoff Thorpe, Nils Larsch, Ulf Möller] + [Geoff Thorpe, Nils Larsch, Ulf Möller] *) BN_CTX_init() has been deprecated, as BN_CTX is an opaque structure that can only be obtained through BN_CTX_new() (which implicitly @@ -3083,7 +3134,7 @@ [Douglas Stebila (Sun Microsystems Laboratories)] *) Add the possibility to load symbols globally with DSO. - [Götz Babin-Ebell via Richard Levitte] + [Götz Babin-Ebell via Richard Levitte] *) Add the functions ERR_set_mark() and ERR_pop_to_mark() for better control of the error stack. @@ -3798,7 +3849,7 @@ [Steve Henson] *) Undo Cygwin change. - [Ulf Möller] + [Ulf Möller] *) Added support for proxy certificates according to RFC 3820. Because they may be a security thread to unaware applications, @@ -3831,11 +3882,11 @@ [Stephen Henson, reported by UK NISCC] *) Use Windows randomness collection on Cygwin. - [Ulf Möller] + [Ulf Möller] *) Fix hang in EGD/PRNGD query when communication socket is closed prematurely by EGD/PRNGD. - [Darren Tucker via Lutz Jänicke, resolves #1014] + [Darren Tucker via Lutz Jänicke, resolves #1014] *) Prompt for pass phrases when appropriate for PKCS12 input format. [Steve Henson] @@ -4297,7 +4348,7 @@ pointers passed to them whenever necessary. Otherwise it is possible the caller may have overwritten (or deallocated) the original string data when a later ENGINE operation tries to use the stored values. - [Götz Babin-Ebell ] + [Götz Babin-Ebell ] *) Improve diagnostics in file reading and command-line digests. [Ben Laurie aided and abetted by Solar Designer ] @@ -6402,7 +6453,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) BN_sqr() bug fix. - [Ulf Möller, reported by Jim Ellis ] + [Ulf Möller, reported by Jim Ellis ] *) Rabin-Miller test analyses assume uniformly distributed witnesses, so use BN_pseudo_rand_range() instead of using BN_pseudo_rand() @@ -6562,7 +6613,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Fix OAEP check. - [Ulf Möller, Bodo Möller] + [Ulf Möller, Bodo Möller] *) The countermeasure against Bleichbacher's attack on PKCS #1 v1.5 RSA encryption was accidentally removed in s3_srvr.c in OpenSSL 0.9.5 @@ -6824,10 +6875,10 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Use better test patterns in bntest. - [Ulf Möller] + [Ulf Möller] *) rand_win.c fix for Borland C. - [Ulf Möller] + [Ulf Möller] *) BN_rshift bugfix for n == 0. [Bodo Moeller] @@ -6972,14 +7023,14 @@ des-cbc 3624.96k 5258.21k *) New BIO_shutdown_wr macro, which invokes the BIO_C_SHUTDOWN_WR BIO_ctrl (for BIO pairs). - [Bodo Möller] + [Bodo Möller] *) Add DSO method for VMS. [Richard Levitte] *) Bug fix: Montgomery multiplication could produce results with the wrong sign. - [Ulf Möller] + [Ulf Möller] *) Add RPM specification openssl.spec and modify it to build three packages. The default package contains applications, application @@ -6997,7 +7048,7 @@ des-cbc 3624.96k 5258.21k *) Don't set the two most significant bits to one when generating a random number < q in the DSA library. - [Ulf Möller] + [Ulf Möller] *) New SSL API mode 'SSL_MODE_AUTO_RETRY'. This disables the default behaviour that SSL_read may result in SSL_ERROR_WANT_READ (even if @@ -7263,7 +7314,7 @@ des-cbc 3624.96k 5258.21k *) Randomness polling function for Win9x, as described in: Peter Gutmann, Software Generation of Practically Strong Random Numbers. - [Ulf Möller] + [Ulf Möller] *) Fix so PRNG is seeded in req if using an already existing DSA key. @@ -7483,7 +7534,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Eliminate non-ANSI declarations in crypto.h and stack.h. - [Ulf Möller] + [Ulf Möller] *) Fix for SSL server purpose checking. Server checking was rejecting certificates which had extended key usage present @@ -7515,7 +7566,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Bugfix for linux-elf makefile.one. - [Ulf Möller] + [Ulf Möller] *) RSA_get_default_method() will now cause a default RSA_METHOD to be chosen if one doesn't exist already. @@ -7604,7 +7655,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) des_quad_cksum() byte order bug fix. - [Ulf Möller, using the problem description in krb4-0.9.7, where + [Ulf Möller, using the problem description in krb4-0.9.7, where the solution is attributed to Derrick J Brashear ] *) Fix so V_ASN1_APP_CHOOSE works again: however its use is strongly @@ -7705,7 +7756,7 @@ des-cbc 3624.96k 5258.21k [Rolf Haberrecker ] *) Assembler module support for Mingw32. - [Ulf Möller] + [Ulf Möller] *) Shared library support for HPUX (in shlib/). [Lutz Jaenicke and Anonymous] @@ -7724,7 +7775,7 @@ des-cbc 3624.96k 5258.21k *) BN_mul bugfix: In bn_mul_part_recursion() only the a>a[n] && b>b[n] case was implemented. This caused BN_div_recp() to fail occasionally. - [Ulf Möller] + [Ulf Möller] *) Add an optional second argument to the set_label() in the perl assembly language builder. If this argument exists and is set @@ -7754,14 +7805,14 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Fix potential buffer overrun problem in BIO_printf(). - [Ulf Möller, using public domain code by Patrick Powell; problem + [Ulf Möller, using public domain code by Patrick Powell; problem pointed out by David Sacerdote ] *) Support EGD . New functions RAND_egd() and RAND_status(). In the command line application, the EGD socket can be specified like a seed file using RANDFILE or -rand. - [Ulf Möller] + [Ulf Möller] *) Allow the string CERTIFICATE to be tolerated in PKCS#7 structures. Some CAs (e.g. Verisign) distribute certificates in this form. @@ -7794,7 +7845,7 @@ des-cbc 3624.96k 5258.21k #define OPENSSL_ALGORITHM_DEFINES #include defines all pertinent NO_ symbols, such as NO_IDEA, NO_RSA, etc. - [Richard Levitte, Ulf and Bodo Möller] + [Richard Levitte, Ulf and Bodo Möller] *) Bugfix: Tolerate fragmentation and interleaving in the SSL 3/TLS record layer. @@ -7845,17 +7896,17 @@ des-cbc 3624.96k 5258.21k *) Bug fix for BN_div_recp() for numerators with an even number of bits. - [Ulf Möller] + [Ulf Möller] *) More tests in bntest.c, and changed test_bn output. - [Ulf Möller] + [Ulf Möller] *) ./config recognizes MacOS X now. [Andy Polyakov] *) Bug fix for BN_div() when the first words of num and divsor are equal (it gave wrong results if (rem=(n1-q*d0)&BN_MASK2) < d0). - [Ulf Möller] + [Ulf Möller] *) Add support for various broken PKCS#8 formats, and command line options to produce them. @@ -7863,11 +7914,11 @@ des-cbc 3624.96k 5258.21k *) New functions BN_CTX_start(), BN_CTX_get() and BT_CTX_end() to get temporary BIGNUMs from a BN_CTX. - [Ulf Möller] + [Ulf Möller] *) Correct return values in BN_mod_exp_mont() and BN_mod_exp2_mont() for p == 0. - [Ulf Möller] + [Ulf Möller] *) Change the SSLeay_add_all_*() functions to OpenSSL_add_all_*() and include a #define from the old name to the new. The original intent @@ -7891,7 +7942,7 @@ des-cbc 3624.96k 5258.21k *) Source code cleanups: use const where appropriate, eliminate casts, use void * instead of char * in lhash. - [Ulf Möller] + [Ulf Möller] *) Bugfix: ssl3_send_server_key_exchange was not restartable (the state was not changed to SSL3_ST_SW_KEY_EXCH_B, and because of @@ -7936,13 +7987,13 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) New function BN_pseudo_rand(). - [Ulf Möller] + [Ulf Möller] *) Clean up BN_mod_mul_montgomery(): replace the broken (and unreadable) bignum version of BN_from_montgomery() with the working code from SSLeay 0.9.0 (the word based version is faster anyway), and clean up the comments. - [Ulf Möller] + [Ulf Möller] *) Avoid a race condition in s2_clnt.c (function get_server_hello) that made it impossible to use the same SSL_SESSION data structure in @@ -7952,25 +8003,25 @@ des-cbc 3624.96k 5258.21k *) The return value of RAND_load_file() no longer counts bytes obtained by stat(). RAND_load_file(..., -1) is new and uses the complete file to seed the PRNG (previously an explicit byte count was required). - [Ulf Möller, Bodo Möller] + [Ulf Möller, Bodo Möller] *) Clean up CRYPTO_EX_DATA functions, some of these didn't have prototypes used (char *) instead of (void *) and had casts all over the place. [Steve Henson] *) Make BN_generate_prime() return NULL on error if ret!=NULL. - [Ulf Möller] + [Ulf Möller] *) Retain source code compatibility for BN_prime_checks macro: BN_is_prime(..., BN_prime_checks, ...) now uses BN_prime_checks_for_size to determine the appropriate number of Rabin-Miller iterations. - [Ulf Möller] + [Ulf Möller] *) Diffie-Hellman uses "safe" primes: DH_check() return code renamed to DH_CHECK_P_NOT_SAFE_PRIME. (Check if this is true? OpenPGP calls them "strong".) - [Ulf Möller] + [Ulf Möller] *) Merge the functionality of "dh" and "gendh" programs into a new program "dhparam". The old programs are retained for now but will handle DH keys @@ -8026,7 +8077,7 @@ des-cbc 3624.96k 5258.21k *) Add missing #ifndefs that caused missing symbols when building libssl as a shared library without RSA. Use #ifndef NO_SSL2 instead of NO_RSA in ssl/s2*.c. - [Kris Kennaway , modified by Ulf Möller] + [Kris Kennaway , modified by Ulf Möller] *) Precautions against using the PRNG uninitialized: RAND_bytes() now has a return value which indicates the quality of the random data @@ -8035,7 +8086,7 @@ des-cbc 3624.96k 5258.21k guaranteed to be unique but not unpredictable. RAND_add is like RAND_seed, but takes an extra argument for an entropy estimate (RAND_seed always assumes full entropy). - [Ulf Möller] + [Ulf Möller] *) Do more iterations of Rabin-Miller probable prime test (specifically, 3 for 1024-bit primes, 6 for 512-bit primes, 12 for 256-bit primes @@ -8065,7 +8116,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Honor the no-xxx Configure options when creating .DEF files. - [Ulf Möller] + [Ulf Möller] *) Add PKCS#10 attributes to field table: challengePassword, unstructuredName and unstructuredAddress. These are taken from @@ -8899,7 +8950,7 @@ des-cbc 3624.96k 5258.21k *) More DES library cleanups: remove references to srand/rand and delete an unused file. - [Ulf Möller] + [Ulf Möller] *) Add support for the the free Netwide assembler (NASM) under Win32, since not many people have MASM (ml) and it can be hard to obtain. @@ -8988,7 +9039,7 @@ des-cbc 3624.96k 5258.21k worked. *) Fix problems with no-hmac etc. - [Ulf Möller, pointed out by Brian Wellington ] + [Ulf Möller, pointed out by Brian Wellington ] *) New functions RSA_get_default_method(), RSA_set_method() and RSA_get_method(). These allows replacement of RSA_METHODs without having @@ -9105,7 +9156,7 @@ des-cbc 3624.96k 5258.21k [Ben Laurie] *) DES library cleanups. - [Ulf Möller] + [Ulf Möller] *) Add support for PKCS#5 v2.0 PBE algorithms. This will permit PKCS#8 to be used with any cipher unlike PKCS#5 v1.5 which can at most handle 64 bit @@ -9148,7 +9199,7 @@ des-cbc 3624.96k 5258.21k [Christian Forster ] *) config now generates no-xxx options for missing ciphers. - [Ulf Möller] + [Ulf Möller] *) Support the EBCDIC character set (work in progress). File ebcdic.c not yet included because it has a different license. @@ -9261,7 +9312,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) Move openssl.cnf out of lib/. - [Ulf Möller] + [Ulf Möller] *) Fix various things to let OpenSSL even pass ``egcc -pipe -O2 -Wall -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes @@ -9318,10 +9369,10 @@ des-cbc 3624.96k 5258.21k [Ben Laurie] *) Support Borland C++ builder. - [Janez Jere , modified by Ulf Möller] + [Janez Jere , modified by Ulf Möller] *) Support Mingw32. - [Ulf Möller] + [Ulf Möller] *) SHA-1 cleanups and performance enhancements. [Andy Polyakov ] @@ -9330,7 +9381,7 @@ des-cbc 3624.96k 5258.21k [Andy Polyakov ] *) Accept any -xxx and +xxx compiler options in Configure. - [Ulf Möller] + [Ulf Möller] *) Update HPUX configuration. [Anonymous] @@ -9363,7 +9414,7 @@ des-cbc 3624.96k 5258.21k [Bodo Moeller] *) OAEP decoding bug fix. - [Ulf Möller] + [Ulf Möller] *) Support INSTALL_PREFIX for package builders, as proposed by David Harris. @@ -9386,21 +9437,21 @@ des-cbc 3624.96k 5258.21k [Niels Poppe ] *) New Configure option no- (rsa, idea, rc5, ...). - [Ulf Möller] + [Ulf Möller] *) Add the PKCS#12 API documentation to openssl.txt. Preliminary support for extension adding in x509 utility. [Steve Henson] *) Remove NOPROTO sections and error code comments. - [Ulf Möller] + [Ulf Möller] *) Partial rewrite of the DEF file generator to now parse the ANSI prototypes. [Steve Henson] *) New Configure options --prefix=DIR and --openssldir=DIR. - [Ulf Möller] + [Ulf Möller] *) Complete rewrite of the error code script(s). It is all now handled by one script at the top level which handles error code gathering, @@ -9429,7 +9480,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Move the autogenerated header file parts to crypto/opensslconf.h. - [Ulf Möller] + [Ulf Möller] *) Fix new 56-bit DES export ciphersuites: they were using 7 bytes instead of 8 of keying material. Merlin has also confirmed interop with this fix @@ -9447,13 +9498,13 @@ des-cbc 3624.96k 5258.21k [Andy Polyakov ] *) Change functions to ANSI C. - [Ulf Möller] + [Ulf Möller] *) Fix typos in error codes. - [Martin Kraemer , Ulf Möller] + [Martin Kraemer , Ulf Möller] *) Remove defunct assembler files from Configure. - [Ulf Möller] + [Ulf Möller] *) SPARC v8 assembler BIGNUM implementation. [Andy Polyakov ] @@ -9490,7 +9541,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) New Configure option "rsaref". - [Ulf Möller] + [Ulf Möller] *) Don't auto-generate pem.h. [Bodo Moeller] @@ -9538,7 +9589,7 @@ des-cbc 3624.96k 5258.21k *) New functions DSA_do_sign and DSA_do_verify to provide access to the raw DSA values prior to ASN.1 encoding. - [Ulf Möller] + [Ulf Möller] *) Tweaks to Configure [Niels Poppe ] @@ -9548,11 +9599,11 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) New variables $(RANLIB) and $(PERL) in the Makefiles. - [Ulf Möller] + [Ulf Möller] *) New config option to avoid instructions that are illegal on the 80386. The default code is faster, but requires at least a 486. - [Ulf Möller] + [Ulf Möller] *) Got rid of old SSL2_CLIENT_VERSION (inconsistently used) and SSL2_SERVER_VERSION (not used at all) macros, which are now the @@ -10091,7 +10142,7 @@ des-cbc 3624.96k 5258.21k Hagino ] *) File was opened incorrectly in randfile.c. - [Ulf Möller ] + [Ulf Möller ] *) Beginning of support for GeneralizedTime. d2i, i2d, check and print functions. Also ASN1_TIME suite which is a CHOICE of UTCTime or @@ -10101,7 +10152,7 @@ des-cbc 3624.96k 5258.21k [Steve Henson] *) Correct Linux 1 recognition in config. - [Ulf Möller ] + [Ulf Möller ] *) Remove pointless MD5 hash when using DSA keys in ca. [Anonymous ] @@ -10248,7 +10299,7 @@ des-cbc 3624.96k 5258.21k *) Fix the RSA header declarations that hid a bug I fixed in 0.9.0b but was already fixed by Eric for 0.9.1 it seems. - [Ben Laurie - pointed out by Ulf Möller ] + [Ben Laurie - pointed out by Ulf Möller ] *) Autodetect FreeBSD3. [Ben Laurie] Copied: stable/10/crypto/openssl/CONTRIBUTING (from r291709, vendor-crypto/openssl/dist-1.0.1/CONTRIBUTING) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/crypto/openssl/CONTRIBUTING Thu Dec 3 21:18:48 2015 (r291721, copy of r291709, vendor-crypto/openssl/dist-1.0.1/CONTRIBUTING) @@ -0,0 +1,38 @@ +HOW TO CONTRIBUTE TO OpenSSL +---------------------------- + +Development is coordinated on the openssl-dev mailing list (see +http://www.openssl.org for information on subscribing). If you +would like to submit a patch, send it to rt@openssl.org with +the string "[PATCH]" in the subject. Please be sure to include a +textual explanation of what your patch does. + +You can also make GitHub pull requests. If you do this, please also send +mail to rt@openssl.org with a brief description and a link to the PR so +that we can more easily keep track of it. + +If you are unsure as to whether a feature will be useful for the general +OpenSSL community please discuss it on the openssl-dev mailing list first. +Someone may be already working on the same thing or there may be a good +reason as to why that feature isn't implemented. + +Patches should be as up to date as possible, preferably relative to the +current Git or the last snapshot. They should follow our coding style +(see https://www.openssl.org/policies/codingstyle.html) and compile without +warnings using the --strict-warnings flag. OpenSSL compiles on many varied +platforms: try to ensure you only use portable features. + +Our preferred format for patch files is "git format-patch" output. For example +to provide a patch file containing the last commit in your local git repository +use the following command: + +# git format-patch --stdout HEAD^ >mydiffs.patch + +Another method of creating an acceptable patch file without using git is as +follows: + +# cd openssl-work +# [your changes] +# ./Configure dist; make clean +# cd .. +# diff -ur openssl-orig openssl-work > mydiffs.patch Modified: stable/10/crypto/openssl/Configure ============================================================================== --- stable/10/crypto/openssl/Configure Thu Dec 3 21:16:52 2015 (r291720) +++ stable/10/crypto/openssl/Configure Thu Dec 3 21:18:48 2015 (r291721) @@ -105,6 +105,8 @@ my $usage="Usage: Configure [no- my $gcc_devteam_warn = "-Wall -pedantic -DPEDANTIC -Wno-long-long -Wsign-compare -Wmissing-prototypes -Wshadow -Wformat -Werror -DCRYPTO_MDEBUG_ALL -DCRYPTO_MDEBUG_ABORT -DREF_CHECK -DOPENSSL_NO_DEPRECATED"; +my $clang_devteam_warn = "-Wno-unused-parameter -Wno-missing-field-initializers -Wno-language-extension-token -Wno-extended-offsetof -Qunused-arguments"; + my $strict_warnings = 0; my $x86_gcc_des="DES_PTR DES_RISC1 DES_UNROLL"; @@ -197,6 +199,7 @@ my %table=( "debug-linux-generic32","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -g -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-linux-generic64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-linux-x86_64","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -g -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"debug-linux-x86_64-clang","clang: -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -m64 -DL_ENDIAN -g -Wall -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "dist", "cc:-O::(unknown)::::::", # Basic configs that should work on any (32 and less bit) box @@ -361,6 +364,7 @@ my %table=( "linux-ia64-ecc","ecc:-DL_ENDIAN -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-ia64-icc","icc:-DL_ENDIAN -O2 -Wall -no_cpprt::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_RISC1 DES_INT:${ia64_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "linux-x86_64", "gcc:-m64 -DL_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", +"linux-x86_64-clang","clang: -m64 -DL_ENDIAN -O3 -Wall -Qunused-arguments::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", "linux64-s390x", "gcc:-m64 -DB_ENDIAN -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${s390x_asm}:64:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64", #### So called "highgprs" target for z/Architecture CPUs # "Highgprs" is kernel feature first implemented in Linux 2.6.32, see @@ -1574,11 +1578,20 @@ if ($shlib_version_number =~ /(^[0-9]*)\ if ($strict_warnings) { + my $ecc = $cc; + $ecc = "clang" if `$cc --version 2>&1` =~ /clang/; my $wopt; - die "ERROR --strict-warnings requires gcc" unless ($cc =~ /gcc$/); + die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc$/ or $ecc =~ /clang$/); foreach $wopt (split /\s+/, $gcc_devteam_warn) { - $cflags .= " $wopt" unless ($cflags =~ /$wopt/) + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) + } + if ($ecc eq "clang") + { + foreach $wopt (split /\s+/, $clang_devteam_warn) + { + $cflags .= " $wopt" unless ($cflags =~ /(^|\s)$wopt(\s|$)/) + } } } Modified: stable/10/crypto/openssl/FAQ ============================================================================== --- stable/10/crypto/openssl/FAQ Thu Dec 3 21:16:52 2015 (r291720) +++ stable/10/crypto/openssl/FAQ Thu Dec 3 21:18:48 2015 (r291721) @@ -1,1039 +1,2 @@ -OpenSSL - Frequently Asked Questions --------------------------------------- - -[MISC] Miscellaneous questions - -* Which is the current version of OpenSSL? -* Where is the documentation? -* How can I contact the OpenSSL developers? -* Where can I get a compiled version of OpenSSL? -* Why aren't tools like 'autoconf' and 'libtool' used? -* What is an 'engine' version? -* How do I check the authenticity of the OpenSSL distribution? -* How does the versioning scheme work? - -[LEGAL] Legal questions - -* Do I need patent licenses to use OpenSSL? -* Can I use OpenSSL with GPL software? - -[USER] Questions on using the OpenSSL applications - -* Why do I get a "PRNG not seeded" error message? -* Why do I get an "unable to write 'random state'" error message? -* How do I create certificates or certificate requests? -* Why can't I create certificate requests? -* Why does fail with a certificate verify error? -* Why can I only use weak ciphers when I connect to a server using OpenSSL? -* How can I create DSA certificates? -* Why can't I make an SSL connection using a DSA certificate? -* How can I remove the passphrase on a private key? -* Why can't I use OpenSSL certificates with SSL client authentication? -* Why does my browser give a warning about a mismatched hostname? -* How do I install a CA certificate into a browser? -* Why is OpenSSL x509 DN output not conformant to RFC2253? -* What is a "128 bit certificate"? Can I create one with OpenSSL? -* Why does OpenSSL set the authority key identifier extension incorrectly? -* How can I set up a bundle of commercial root CA certificates? - -[BUILD] Questions about building and testing OpenSSL - -* Why does the linker complain about undefined symbols? -* Why does the OpenSSL test fail with "bc: command not found"? -* Why does the OpenSSL test fail with "bc: 1 no implemented"? -* Why does the OpenSSL test fail with "bc: stack empty"? -* Why does the OpenSSL compilation fail on Alpha Tru64 Unix? -* Why does the OpenSSL compilation fail with "ar: command not found"? -* Why does the OpenSSL compilation fail on Win32 with VC++? -* What is special about OpenSSL on Redhat? -* Why does the OpenSSL compilation fail on MacOS X? -* Why does the OpenSSL test suite fail on MacOS X? -* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]? -* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"? -* Why does the OpenSSL test suite fail in sha512t on x86 CPU? -* Why does compiler fail to compile sha512.c? -* Test suite still fails, what to do? -* I think I've found a bug, what should I do? -* I'm SURE I've found a bug, how do I report it? -* I've found a security issue, how do I report it? - -[PROG] Questions about programming with OpenSSL - -* Is OpenSSL thread-safe? -* I've compiled a program under Windows and it crashes: why? -* How do I read or write a DER encoded buffer using the ASN1 functions? -* OpenSSL uses DER but I need BER format: does OpenSSL support BER? -* I've tried using and I get errors why? -* I've called and it fails, why? -* I just get a load of numbers for the error output, what do they mean? -* Why do I get errors about unknown algorithms? -* Why can't the OpenSSH configure script detect OpenSSL? -* Can I use OpenSSL's SSL library with non-blocking I/O? -* Why doesn't my server application receive a client certificate? -* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? -* I think I've detected a memory leak, is this a bug? -* Why does Valgrind complain about the use of uninitialized data? -* Why doesn't a memory BIO work when a file does? -* Where are the declarations and implementations of d2i_X509() etc? - -=============================================================================== - -[MISC] ======================================================================== - -* Which is the current version of OpenSSL? - -The current version is available from . -OpenSSL 1.0.1e was released on Feb 11th, 2013. - -In addition to the current stable release, you can also access daily -snapshots of the OpenSSL development version at , or get it by anonymous Git access. - - -* Where is the documentation? - -OpenSSL is a library that provides cryptographic functionality to -applications such as secure web servers. Be sure to read the -documentation of the application you want to use. The INSTALL file -explains how to install this library. - -OpenSSL includes a command line utility that can be used to perform a -variety of cryptographic functions. It is described in the openssl(1) -manpage. Documentation for developers is currently being written. Many -manual pages are available; overviews over libcrypto and -libssl are given in the crypto(3) and ssl(3) manpages. - -The OpenSSL manpages are installed in /usr/local/ssl/man/ (or a -different directory if you specified one as described in INSTALL). -In addition, you can read the most current versions at -. Note that the online documents refer -to the very latest development versions of OpenSSL and may include features -not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. The pod format -documentation is included in each OpenSSL distribution under the docs -directory. - -There is some documentation about certificate extensions and PKCS#12 -in doc/openssl.txt - -The original SSLeay documentation is included in OpenSSL as -doc/ssleay.txt. It may be useful when none of the other resources -help, but please note that it reflects the obsolete version SSLeay -0.6.6. - - -* How can I contact the OpenSSL developers? - -The README file describes how to submit bug reports and patches to -OpenSSL. Information on the OpenSSL mailing lists is available from -. - - -* Where can I get a compiled version of OpenSSL? - -You can finder pointers to binary distributions in - . - -Some applications that use OpenSSL are distributed in binary form. -When using such an application, you don't need to install OpenSSL -yourself; the application will include the required parts (e.g. DLLs). - -If you want to build OpenSSL on a Windows system and you don't have -a C compiler, read the "Mingw32" section of INSTALL.W32 for information -on how to obtain and install the free GNU C compiler. - -A number of Linux and *BSD distributions include OpenSSL. - - -* Why aren't tools like 'autoconf' and 'libtool' used? - -autoconf will probably be used in future OpenSSL versions. If it was -less Unix-centric, it might have been used much earlier. - -* What is an 'engine' version? - -With version 0.9.6 OpenSSL was extended to interface to external crypto -hardware. This was realized in a special release '0.9.6-engine'. With -version 0.9.7 the changes were merged into the main development line, -so that the special release is no longer necessary. - -* How do I check the authenticity of the OpenSSL distribution? - -We provide MD5 digests and ASC signatures of each tarball. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 3 21:19:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95F33A40A60; Thu, 3 Dec 2015 21:19:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 8289017AA; Thu, 3 Dec 2015 21:19:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 7BAAC1831; Thu, 3 Dec 2015 21:19:31 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 39BA2183D4; Thu, 3 Dec 2015 21:19:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id xwosfjIpgCuZ; Thu, 3 Dec 2015 21:19:29 +0000 (UTC) Subject: Re: svn commit: r291720 - head/usr.sbin/fstyp DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com C3C7F183CE To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201512032116.tB3LGrdu043460@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <5660B1E0.90608@FreeBSD.org> Date: Thu, 3 Dec 2015 13:19:28 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <201512032116.tB3LGrdu043460@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 21:19:31 -0000 On 12/3/15 1:16 PM, Bryan Drewery wrote: > Author: bdrewery > Date: Thu Dec 3 21:16:52 2015 > New Revision: 291720 > URL: https://svnweb.freebsd.org/changeset/base/291720 > > Log: > Convert to LIBADD > > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/usr.sbin/fstyp/Makefile > > Modified: head/usr.sbin/fstyp/Makefile > ============================================================================== > --- head/usr.sbin/fstyp/Makefile Thu Dec 3 21:13:35 2015 (r291719) > +++ head/usr.sbin/fstyp/Makefile Thu Dec 3 21:16:52 2015 (r291720) > @@ -36,8 +36,7 @@ CFLAGS+= -I${.CURDIR}/../../cddl/contrib > > CFLAGS+=-I${.CURDIR}/../../sys > > -DPADD= ${LIBGEOM} ${LIBMD} > -LDADD= -lgeom -lmd > +LIBADD= geom md > > .if ${MK_ZFS} != "no" > DPADD += ${LIBNVPAIR} ${LIBZFS} > ZFS libraries are not yet supported in LIBADD. Something I am fixing. -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Thu Dec 3 21:24:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6023AA40BAE; Thu, 3 Dec 2015 21:24:42 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04A5B1D3E; Thu, 3 Dec 2015 21:24:41 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3LOf5V046380; Thu, 3 Dec 2015 21:24:41 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3LOfEX046377; Thu, 3 Dec 2015 21:24:41 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201512032124.tB3LOfEX046377@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 3 Dec 2015 21:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291722 - in stable/9: crypto/openssl crypto/openssl/apps crypto/openssl/crypto crypto/openssl/crypto/asn1 crypto/openssl/crypto/des/t crypto/openssl/crypto/evp crypto/openssl/doc crypt... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 21:24:42 -0000 Author: jkim Date: Thu Dec 3 21:24:40 2015 New Revision: 291722 URL: https://svnweb.freebsd.org/changeset/base/291722 Log: Merge OpenSSL 0.9.8zh. Added: stable/9/crypto/openssl/doc/dir-locals.example.el - copied unchanged from r291711, vendor-crypto/openssl/dist-0.9.8/doc/dir-locals.example.el stable/9/crypto/openssl/doc/openssl-c-indent.el - copied unchanged from r291711, vendor-crypto/openssl/dist-0.9.8/doc/openssl-c-indent.el Deleted: stable/9/crypto/openssl/crypto/des/t/test stable/9/crypto/openssl/test/bctest stable/9/crypto/openssl/util/pod2mantest Modified: stable/9/crypto/openssl/CHANGES stable/9/crypto/openssl/FAQ stable/9/crypto/openssl/Makefile stable/9/crypto/openssl/Makefile.org stable/9/crypto/openssl/NEWS stable/9/crypto/openssl/README stable/9/crypto/openssl/apps/asn1pars.c stable/9/crypto/openssl/crypto/asn1/asn1_par.c stable/9/crypto/openssl/crypto/asn1/tasn_dec.c stable/9/crypto/openssl/crypto/evp/e_des3.c stable/9/crypto/openssl/crypto/mem_clr.c stable/9/crypto/openssl/crypto/opensslv.h stable/9/crypto/openssl/doc/crypto/X509_NAME_get_index_by_NID.pod stable/9/crypto/openssl/openssl.spec stable/9/crypto/openssl/ssl/ssl_sess.c stable/9/crypto/openssl/ssl/ssltest.c stable/9/secure/lib/libcrypto/Makefile.inc stable/9/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/9/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/9/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/9/secure/lib/libcrypto/man/BIO_ctrl.3 stable/9/secure/lib/libcrypto/man/BIO_f_base64.3 stable/9/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/9/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/9/secure/lib/libcrypto/man/BIO_f_md.3 stable/9/secure/lib/libcrypto/man/BIO_f_null.3 stable/9/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/9/secure/lib/libcrypto/man/BIO_find_type.3 stable/9/secure/lib/libcrypto/man/BIO_new.3 stable/9/secure/lib/libcrypto/man/BIO_push.3 stable/9/secure/lib/libcrypto/man/BIO_read.3 stable/9/secure/lib/libcrypto/man/BIO_s_accept.3 stable/9/secure/lib/libcrypto/man/BIO_s_bio.3 stable/9/secure/lib/libcrypto/man/BIO_s_connect.3 stable/9/secure/lib/libcrypto/man/BIO_s_fd.3 stable/9/secure/lib/libcrypto/man/BIO_s_file.3 stable/9/secure/lib/libcrypto/man/BIO_s_mem.3 stable/9/secure/lib/libcrypto/man/BIO_s_null.3 stable/9/secure/lib/libcrypto/man/BIO_s_socket.3 stable/9/secure/lib/libcrypto/man/BIO_set_callback.3 stable/9/secure/lib/libcrypto/man/BIO_should_retry.3 stable/9/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_new.3 stable/9/secure/lib/libcrypto/man/BN_CTX_start.3 stable/9/secure/lib/libcrypto/man/BN_add.3 stable/9/secure/lib/libcrypto/man/BN_add_word.3 stable/9/secure/lib/libcrypto/man/BN_bn2bin.3 stable/9/secure/lib/libcrypto/man/BN_cmp.3 stable/9/secure/lib/libcrypto/man/BN_copy.3 stable/9/secure/lib/libcrypto/man/BN_generate_prime.3 stable/9/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/9/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/9/secure/lib/libcrypto/man/BN_new.3 stable/9/secure/lib/libcrypto/man/BN_num_bytes.3 stable/9/secure/lib/libcrypto/man/BN_rand.3 stable/9/secure/lib/libcrypto/man/BN_set_bit.3 stable/9/secure/lib/libcrypto/man/BN_swap.3 stable/9/secure/lib/libcrypto/man/BN_zero.3 stable/9/secure/lib/libcrypto/man/CONF_modules_free.3 stable/9/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/9/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/9/secure/lib/libcrypto/man/DH_generate_key.3 stable/9/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DH_new.3 stable/9/secure/lib/libcrypto/man/DH_set_method.3 stable/9/secure/lib/libcrypto/man/DH_size.3 stable/9/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/9/secure/lib/libcrypto/man/DSA_do_sign.3 stable/9/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/9/secure/lib/libcrypto/man/DSA_generate_key.3 stable/9/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/9/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/DSA_new.3 stable/9/secure/lib/libcrypto/man/DSA_set_method.3 stable/9/secure/lib/libcrypto/man/DSA_sign.3 stable/9/secure/lib/libcrypto/man/DSA_size.3 stable/9/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/9/secure/lib/libcrypto/man/ERR_clear_error.3 stable/9/secure/lib/libcrypto/man/ERR_error_string.3 stable/9/secure/lib/libcrypto/man/ERR_get_error.3 stable/9/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/9/secure/lib/libcrypto/man/ERR_load_strings.3 stable/9/secure/lib/libcrypto/man/ERR_print_errors.3 stable/9/secure/lib/libcrypto/man/ERR_put_error.3 stable/9/secure/lib/libcrypto/man/ERR_remove_state.3 stable/9/secure/lib/libcrypto/man/ERR_set_mark.3 stable/9/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/9/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/9/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/9/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/9/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/9/secure/lib/libcrypto/man/EVP_SealInit.3 stable/9/secure/lib/libcrypto/man/EVP_SignInit.3 stable/9/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/9/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/9/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/9/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/9/secure/lib/libcrypto/man/OPENSSL_config.3 stable/9/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/9/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/9/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/9/secure/lib/libcrypto/man/PKCS12_create.3 stable/9/secure/lib/libcrypto/man/PKCS12_parse.3 stable/9/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/9/secure/lib/libcrypto/man/PKCS7_sign.3 stable/9/secure/lib/libcrypto/man/PKCS7_verify.3 stable/9/secure/lib/libcrypto/man/RAND_add.3 stable/9/secure/lib/libcrypto/man/RAND_bytes.3 stable/9/secure/lib/libcrypto/man/RAND_cleanup.3 stable/9/secure/lib/libcrypto/man/RAND_egd.3 stable/9/secure/lib/libcrypto/man/RAND_load_file.3 stable/9/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/9/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/9/secure/lib/libcrypto/man/RSA_check_key.3 stable/9/secure/lib/libcrypto/man/RSA_generate_key.3 stable/9/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/9/secure/lib/libcrypto/man/RSA_new.3 stable/9/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/9/secure/lib/libcrypto/man/RSA_print.3 stable/9/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/9/secure/lib/libcrypto/man/RSA_set_method.3 stable/9/secure/lib/libcrypto/man/RSA_sign.3 stable/9/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/9/secure/lib/libcrypto/man/RSA_size.3 stable/9/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/9/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/9/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/9/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/9/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/9/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/9/secure/lib/libcrypto/man/X509_new.3 stable/9/secure/lib/libcrypto/man/bio.3 stable/9/secure/lib/libcrypto/man/blowfish.3 stable/9/secure/lib/libcrypto/man/bn.3 stable/9/secure/lib/libcrypto/man/bn_internal.3 stable/9/secure/lib/libcrypto/man/buffer.3 stable/9/secure/lib/libcrypto/man/crypto.3 stable/9/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/9/secure/lib/libcrypto/man/d2i_DHparams.3 stable/9/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/9/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/9/secure/lib/libcrypto/man/d2i_X509.3 stable/9/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/9/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/9/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/9/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/9/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/9/secure/lib/libcrypto/man/des.3 stable/9/secure/lib/libcrypto/man/dh.3 stable/9/secure/lib/libcrypto/man/dsa.3 stable/9/secure/lib/libcrypto/man/ecdsa.3 stable/9/secure/lib/libcrypto/man/engine.3 stable/9/secure/lib/libcrypto/man/err.3 stable/9/secure/lib/libcrypto/man/evp.3 stable/9/secure/lib/libcrypto/man/hmac.3 stable/9/secure/lib/libcrypto/man/lh_stats.3 stable/9/secure/lib/libcrypto/man/lhash.3 stable/9/secure/lib/libcrypto/man/md5.3 stable/9/secure/lib/libcrypto/man/mdc2.3 stable/9/secure/lib/libcrypto/man/pem.3 stable/9/secure/lib/libcrypto/man/rand.3 stable/9/secure/lib/libcrypto/man/rc4.3 stable/9/secure/lib/libcrypto/man/ripemd.3 stable/9/secure/lib/libcrypto/man/rsa.3 stable/9/secure/lib/libcrypto/man/sha.3 stable/9/secure/lib/libcrypto/man/threads.3 stable/9/secure/lib/libcrypto/man/ui.3 stable/9/secure/lib/libcrypto/man/ui_compat.3 stable/9/secure/lib/libcrypto/man/x509.3 stable/9/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/9/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/9/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/9/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/9/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_free.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/9/secure/lib/libssl/man/SSL_CTX_new.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/9/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/9/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/9/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/9/secure/lib/libssl/man/SSL_SESSION_free.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/9/secure/lib/libssl/man/SSL_accept.3 stable/9/secure/lib/libssl/man/SSL_alert_type_string.3 stable/9/secure/lib/libssl/man/SSL_clear.3 stable/9/secure/lib/libssl/man/SSL_connect.3 stable/9/secure/lib/libssl/man/SSL_do_handshake.3 stable/9/secure/lib/libssl/man/SSL_free.3 stable/9/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/9/secure/lib/libssl/man/SSL_get_ciphers.3 stable/9/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/9/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/9/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/9/secure/lib/libssl/man/SSL_get_error.3 stable/9/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/9/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/9/secure/lib/libssl/man/SSL_get_fd.3 stable/9/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/9/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/9/secure/lib/libssl/man/SSL_get_rbio.3 stable/9/secure/lib/libssl/man/SSL_get_session.3 stable/9/secure/lib/libssl/man/SSL_get_verify_result.3 stable/9/secure/lib/libssl/man/SSL_get_version.3 stable/9/secure/lib/libssl/man/SSL_library_init.3 stable/9/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/9/secure/lib/libssl/man/SSL_new.3 stable/9/secure/lib/libssl/man/SSL_pending.3 stable/9/secure/lib/libssl/man/SSL_read.3 stable/9/secure/lib/libssl/man/SSL_rstate_string.3 stable/9/secure/lib/libssl/man/SSL_session_reused.3 stable/9/secure/lib/libssl/man/SSL_set_bio.3 stable/9/secure/lib/libssl/man/SSL_set_connect_state.3 stable/9/secure/lib/libssl/man/SSL_set_fd.3 stable/9/secure/lib/libssl/man/SSL_set_session.3 stable/9/secure/lib/libssl/man/SSL_set_shutdown.3 stable/9/secure/lib/libssl/man/SSL_set_verify_result.3 stable/9/secure/lib/libssl/man/SSL_shutdown.3 stable/9/secure/lib/libssl/man/SSL_state_string.3 stable/9/secure/lib/libssl/man/SSL_want.3 stable/9/secure/lib/libssl/man/SSL_write.3 stable/9/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/9/secure/lib/libssl/man/ssl.3 stable/9/secure/usr.bin/openssl/man/CA.pl.1 stable/9/secure/usr.bin/openssl/man/asn1parse.1 stable/9/secure/usr.bin/openssl/man/ca.1 stable/9/secure/usr.bin/openssl/man/ciphers.1 stable/9/secure/usr.bin/openssl/man/crl.1 stable/9/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/9/secure/usr.bin/openssl/man/dgst.1 stable/9/secure/usr.bin/openssl/man/dhparam.1 stable/9/secure/usr.bin/openssl/man/dsa.1 stable/9/secure/usr.bin/openssl/man/dsaparam.1 stable/9/secure/usr.bin/openssl/man/ec.1 stable/9/secure/usr.bin/openssl/man/ecparam.1 stable/9/secure/usr.bin/openssl/man/enc.1 stable/9/secure/usr.bin/openssl/man/errstr.1 stable/9/secure/usr.bin/openssl/man/gendsa.1 stable/9/secure/usr.bin/openssl/man/genrsa.1 stable/9/secure/usr.bin/openssl/man/nseq.1 stable/9/secure/usr.bin/openssl/man/ocsp.1 stable/9/secure/usr.bin/openssl/man/openssl.1 stable/9/secure/usr.bin/openssl/man/passwd.1 stable/9/secure/usr.bin/openssl/man/pkcs12.1 stable/9/secure/usr.bin/openssl/man/pkcs7.1 stable/9/secure/usr.bin/openssl/man/pkcs8.1 stable/9/secure/usr.bin/openssl/man/rand.1 stable/9/secure/usr.bin/openssl/man/req.1 stable/9/secure/usr.bin/openssl/man/rsa.1 stable/9/secure/usr.bin/openssl/man/rsautl.1 stable/9/secure/usr.bin/openssl/man/s_client.1 stable/9/secure/usr.bin/openssl/man/s_server.1 stable/9/secure/usr.bin/openssl/man/s_time.1 stable/9/secure/usr.bin/openssl/man/sess_id.1 stable/9/secure/usr.bin/openssl/man/smime.1 stable/9/secure/usr.bin/openssl/man/speed.1 stable/9/secure/usr.bin/openssl/man/spkac.1 stable/9/secure/usr.bin/openssl/man/verify.1 stable/9/secure/usr.bin/openssl/man/version.1 stable/9/secure/usr.bin/openssl/man/x509.1 stable/9/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/9/crypto/openssl/ (props changed) Modified: stable/9/crypto/openssl/CHANGES ============================================================================== --- stable/9/crypto/openssl/CHANGES Thu Dec 3 21:18:48 2015 (r291721) +++ stable/9/crypto/openssl/CHANGES Thu Dec 3 21:24:40 2015 (r291722) @@ -2,6 +2,20 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8zg and 0.9.8zh [3 Dec 2015] + + *) X509_ATTRIBUTE memory leak + + When presented with a malformed X509_ATTRIBUTE structure OpenSSL will leak + memory. This structure is used by the PKCS#7 and CMS routines so any + application which reads PKCS#7 or CMS data from untrusted sources is + affected. SSL/TLS is not affected. + + This issue was reported to OpenSSL by Adam Langley (Google/BoringSSL) using + libFuzzer. + (CVE-2015-3195) + [Stephen Henson] + Changes between 0.9.8zf and 0.9.8zg [11 Jun 2015] *) Malformed ECParameters causes infinite loop Modified: stable/9/crypto/openssl/FAQ ============================================================================== --- stable/9/crypto/openssl/FAQ Thu Dec 3 21:18:48 2015 (r291721) +++ stable/9/crypto/openssl/FAQ Thu Dec 3 21:24:40 2015 (r291722) @@ -1,1039 +1,2 @@ -OpenSSL - Frequently Asked Questions --------------------------------------- - -[MISC] Miscellaneous questions - -* Which is the current version of OpenSSL? -* Where is the documentation? -* How can I contact the OpenSSL developers? -* Where can I get a compiled version of OpenSSL? -* Why aren't tools like 'autoconf' and 'libtool' used? -* What is an 'engine' version? -* How do I check the authenticity of the OpenSSL distribution? -* How does the versioning scheme work? - -[LEGAL] Legal questions - -* Do I need patent licenses to use OpenSSL? -* Can I use OpenSSL with GPL software? - -[USER] Questions on using the OpenSSL applications - -* Why do I get a "PRNG not seeded" error message? -* Why do I get an "unable to write 'random state'" error message? -* How do I create certificates or certificate requests? -* Why can't I create certificate requests? -* Why does fail with a certificate verify error? -* Why can I only use weak ciphers when I connect to a server using OpenSSL? -* How can I create DSA certificates? -* Why can't I make an SSL connection using a DSA certificate? -* How can I remove the passphrase on a private key? -* Why can't I use OpenSSL certificates with SSL client authentication? -* Why does my browser give a warning about a mismatched hostname? -* How do I install a CA certificate into a browser? -* Why is OpenSSL x509 DN output not conformant to RFC2253? -* What is a "128 bit certificate"? Can I create one with OpenSSL? -* Why does OpenSSL set the authority key identifier extension incorrectly? -* How can I set up a bundle of commercial root CA certificates? - -[BUILD] Questions about building and testing OpenSSL - -* Why does the linker complain about undefined symbols? -* Why does the OpenSSL test fail with "bc: command not found"? -* Why does the OpenSSL test fail with "bc: 1 no implemented"? -* Why does the OpenSSL test fail with "bc: stack empty"? -* Why does the OpenSSL compilation fail on Alpha Tru64 Unix? -* Why does the OpenSSL compilation fail with "ar: command not found"? -* Why does the OpenSSL compilation fail on Win32 with VC++? -* What is special about OpenSSL on Redhat? -* Why does the OpenSSL compilation fail on MacOS X? -* Why does the OpenSSL test suite fail on MacOS X? -* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]? -* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"? -* Why does the OpenSSL test suite fail in sha512t on x86 CPU? -* Why does compiler fail to compile sha512.c? -* Test suite still fails, what to do? -* I think I've found a bug, what should I do? -* I'm SURE I've found a bug, how do I report it? -* I've found a security issue, how do I report it? - -[PROG] Questions about programming with OpenSSL - -* Is OpenSSL thread-safe? -* I've compiled a program under Windows and it crashes: why? -* How do I read or write a DER encoded buffer using the ASN1 functions? -* OpenSSL uses DER but I need BER format: does OpenSSL support BER? -* I've tried using and I get errors why? -* I've called and it fails, why? -* I just get a load of numbers for the error output, what do they mean? -* Why do I get errors about unknown algorithms? -* Why can't the OpenSSH configure script detect OpenSSL? -* Can I use OpenSSL's SSL library with non-blocking I/O? -* Why doesn't my server application receive a client certificate? -* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? -* I think I've detected a memory leak, is this a bug? -* Why does Valgrind complain about the use of uninitialized data? -* Why doesn't a memory BIO work when a file does? -* Where are the declarations and implementations of d2i_X509() etc? - -=============================================================================== - -[MISC] ======================================================================== - -* Which is the current version of OpenSSL? - -The current version is available from . -OpenSSL 1.0.1d was released on Feb 5th, 2013. - -In addition to the current stable release, you can also access daily -snapshots of the OpenSSL development version at , or get it by anonymous Git access. - - -* Where is the documentation? - -OpenSSL is a library that provides cryptographic functionality to -applications such as secure web servers. Be sure to read the -documentation of the application you want to use. The INSTALL file -explains how to install this library. - -OpenSSL includes a command line utility that can be used to perform a -variety of cryptographic functions. It is described in the openssl(1) -manpage. Documentation for developers is currently being written. Many -manual pages are available; overviews over libcrypto and -libssl are given in the crypto(3) and ssl(3) manpages. - -The OpenSSL manpages are installed in /usr/local/ssl/man/ (or a -different directory if you specified one as described in INSTALL). -In addition, you can read the most current versions at -. Note that the online documents refer -to the very latest development versions of OpenSSL and may include features -not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. The pod format -documentation is included in each OpenSSL distribution under the docs -directory. - -There is some documentation about certificate extensions and PKCS#12 -in doc/openssl.txt - -The original SSLeay documentation is included in OpenSSL as -doc/ssleay.txt. It may be useful when none of the other resources -help, but please note that it reflects the obsolete version SSLeay -0.6.6. - - -* How can I contact the OpenSSL developers? - -The README file describes how to submit bug reports and patches to -OpenSSL. Information on the OpenSSL mailing lists is available from -. - - -* Where can I get a compiled version of OpenSSL? - -You can finder pointers to binary distributions in - . - -Some applications that use OpenSSL are distributed in binary form. -When using such an application, you don't need to install OpenSSL -yourself; the application will include the required parts (e.g. DLLs). - -If you want to build OpenSSL on a Windows system and you don't have -a C compiler, read the "Mingw32" section of INSTALL.W32 for information -on how to obtain and install the free GNU C compiler. - -A number of Linux and *BSD distributions include OpenSSL. - - -* Why aren't tools like 'autoconf' and 'libtool' used? - -autoconf will probably be used in future OpenSSL versions. If it was -less Unix-centric, it might have been used much earlier. - -* What is an 'engine' version? - -With version 0.9.6 OpenSSL was extended to interface to external crypto -hardware. This was realized in a special release '0.9.6-engine'. With -version 0.9.7 the changes were merged into the main development line, -so that the special release is no longer necessary. - -* How do I check the authenticity of the OpenSSL distribution? - -We provide MD5 digests and ASC signatures of each tarball. -Use MD5 to check that a tarball from a mirror site is identical: - - md5sum TARBALL | awk '{print $1;}' | cmp - TARBALL.md5 - -You can check authenticity using pgp or gpg. You need the OpenSSL team -member public key used to sign it (download it from a key server, see a -list of keys at ). Then -just do: - - pgp TARBALL.asc - -* How does the versioning scheme work? - -After the release of OpenSSL 1.0.0 the versioning scheme changed. Letter -releases (e.g. 1.0.1a) can only contain bug and security fixes and no -new features. Minor releases change the last number (e.g. 1.0.2) and -can contain new features that retain binary compatibility. Changes to -the middle number are considered major releases and neither source nor -binary compatibility is guaranteed. - -Therefore the answer to the common question "when will feature X be -backported to OpenSSL 1.0.0/0.9.8?" is "never" but it could appear -in the next minor release. - -[LEGAL] ======================================================================= - -* Do I need patent licenses to use OpenSSL? - -The patents section of the README file lists patents that may apply to -you if you want to use OpenSSL. For information on intellectual -property rights, please consult a lawyer. The OpenSSL team does not -offer legal advice. - -You can configure OpenSSL so as not to use IDEA, MDC2 and RC5 by using - ./config no-idea no-mdc2 no-rc5 - - -* Can I use OpenSSL with GPL software? - -On many systems including the major Linux and BSD distributions, yes (the -GPL does not place restrictions on using libraries that are part of the -normal operating system distribution). - -On other systems, the situation is less clear. Some GPL software copyright -holders claim that you infringe on their rights if you use OpenSSL with -their software on operating systems that don't normally include OpenSSL. - -If you develop open source software that uses OpenSSL, you may find it -useful to choose an other license than the GPL, or state explicitly that -"This program is released under the GPL with the additional exemption that -compiling, linking, and/or using OpenSSL is allowed." If you are using -GPL software developed by others, you may want to ask the copyright holder -for permission to use their software with OpenSSL. - - -[USER] ======================================================================== - -* Why do I get a "PRNG not seeded" error message? - -Cryptographic software needs a source of unpredictable data to work -correctly. Many open source operating systems provide a "randomness -device" (/dev/urandom or /dev/random) that serves this purpose. -All OpenSSL versions try to use /dev/urandom by default; starting with -version 0.9.7, OpenSSL also tries /dev/random if /dev/urandom is not -available. - -On other systems, applications have to call the RAND_add() or -RAND_seed() function with appropriate data before generating keys or -performing public key encryption. (These functions initialize the -pseudo-random number generator, PRNG.) Some broken applications do -not do this. As of version 0.9.5, the OpenSSL functions that need -randomness report an error if the random number generator has not been -seeded with at least 128 bits of randomness. If this error occurs and -is not discussed in the documentation of the application you are -using, please contact the author of that application; it is likely -that it never worked correctly. OpenSSL 0.9.5 and later make the -error visible by refusing to perform potentially insecure encryption. - -If you are using Solaris 8, you can add /dev/urandom and /dev/random -devices by installing patch 112438 (Sparc) or 112439 (x86), which are -available via the Patchfinder at -(Solaris 9 includes these devices by default). For /dev/random support -for earlier Solaris versions, see Sun's statement at - -(the SUNWski package is available in patch 105710). - -On systems without /dev/urandom and /dev/random, it is a good idea to -use the Entropy Gathering Demon (EGD); see the RAND_egd() manpage for -details. Starting with version 0.9.7, OpenSSL will automatically look -for an EGD socket at /var/run/egd-pool, /dev/egd-pool, /etc/egd-pool and -/etc/entropy. - -Most components of the openssl command line utility automatically try -to seed the random number generator from a file. The name of the -default seeding file is determined as follows: If environment variable -RANDFILE is set, then it names the seeding file. Otherwise if -environment variable HOME is set, then the seeding file is $HOME/.rnd. -If neither RANDFILE nor HOME is set, versions up to OpenSSL 0.9.6 will -use file .rnd in the current directory while OpenSSL 0.9.6a uses no -default seeding file at all. OpenSSL 0.9.6b and later will behave -similarly to 0.9.6a, but will use a default of "C:\" for HOME on -Windows systems if the environment variable has not been set. - -If the default seeding file does not exist or is too short, the "PRNG -not seeded" error message may occur. - -The openssl command line utility will write back a new state to the -default seeding file (and create this file if necessary) unless -there was no sufficient seeding. - -Pointing $RANDFILE to an Entropy Gathering Daemon socket does not work. -Use the "-rand" option of the OpenSSL command line tools instead. -The $RANDFILE environment variable and $HOME/.rnd are only used by the -OpenSSL command line tools. Applications using the OpenSSL library -provide their own configuration options to specify the entropy source, -please check out the documentation coming the with application. - - -* Why do I get an "unable to write 'random state'" error message? - - -Sometimes the openssl command line utility does not abort with -a "PRNG not seeded" error message, but complains that it is -"unable to write 'random state'". This message refers to the -default seeding file (see previous answer). A possible reason -is that no default filename is known because neither RANDFILE -nor HOME is set. (Versions up to 0.9.6 used file ".rnd" in the -current directory in this case, but this has changed with 0.9.6a.) - - -* How do I create certificates or certificate requests? - -Check out the CA.pl(1) manual page. This provides a simple wrapper round -the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check -out the manual pages for the individual utilities and the certificate -extensions documentation (in ca(1), req(1), x509v3_config(5) ) - - -* Why can't I create certificate requests? - -You typically get the error: - - unable to find 'distinguished_name' in config - problems making Certificate Request - -This is because it can't find the configuration file. Check out the -DIAGNOSTICS section of req(1) for more information. - - -* Why does fail with a certificate verify error? - -This problem is usually indicated by log messages saying something like -"unable to get local issuer certificate" or "self signed certificate". -When a certificate is verified its root CA must be "trusted" by OpenSSL -this typically means that the CA certificate must be placed in a directory -or file and the relevant program configured to read it. The OpenSSL program -'verify' behaves in a similar way and issues similar error messages: check -the verify(1) program manual page for more information. - - -* Why can I only use weak ciphers when I connect to a server using OpenSSL? - -This is almost certainly because you are using an old "export grade" browser -which only supports weak encryption. Upgrade your browser to support 128 bit -ciphers. - - -* How can I create DSA certificates? - -Check the CA.pl(1) manual page for a DSA certificate example. - - -* Why can't I make an SSL connection to a server using a DSA certificate? - -Typically you'll see a message saying there are no shared ciphers when -the same setup works fine with an RSA certificate. There are two possible -causes. The client may not support connections to DSA servers most web -browsers (including Netscape and MSIE) only support connections to servers -supporting RSA cipher suites. The other cause is that a set of DH parameters -has not been supplied to the server. DH parameters can be created with the -dhparam(1) command and loaded using the SSL_CTX_set_tmp_dh() for example: -check the source to s_server in apps/s_server.c for an example. - - -* How can I remove the passphrase on a private key? - -Firstly you should be really *really* sure you want to do this. Leaving -a private key unencrypted is a major security risk. If you decide that -you do have to do this check the EXAMPLES sections of the rsa(1) and -dsa(1) manual pages. - - -* Why can't I use OpenSSL certificates with SSL client authentication? - -What will typically happen is that when a server requests authentication -it will either not include your certificate or tell you that you have -no client certificates (Netscape) or present you with an empty list box -(MSIE). The reason for this is that when a server requests a client -certificate it includes a list of CAs names which it will accept. Browsers -will only let you select certificates from the list on the grounds that -there is little point presenting a certificate which the server will -reject. - -The solution is to add the relevant CA certificate to your servers "trusted -CA list". How you do this depends on the server software in uses. You can -print out the servers list of acceptable CAs using the OpenSSL s_client tool: - -openssl s_client -connect www.some.host:443 -prexit - -If your server only requests certificates on certain URLs then you may need -to manually issue an HTTP GET command to get the list when s_client connects: - -GET /some/page/needing/a/certificate.html - -If your CA does not appear in the list then this confirms the problem. - - -* Why does my browser give a warning about a mismatched hostname? - -Browsers expect the server's hostname to match the value in the commonName -(CN) field of the certificate. If it does not then you get a warning. - - -* How do I install a CA certificate into a browser? - -The usual way is to send the DER encoded certificate to the browser as -MIME type application/x-x509-ca-cert, for example by clicking on an appropriate -link. On MSIE certain extensions such as .der or .cacert may also work, or you -can import the certificate using the certificate import wizard. - -You can convert a certificate to DER form using the command: - -openssl x509 -in ca.pem -outform DER -out ca.der - -Occasionally someone suggests using a command such as: - -openssl pkcs12 -export -out cacert.p12 -in cacert.pem -inkey cakey.pem - -DO NOT DO THIS! This command will give away your CAs private key and -reduces its security to zero: allowing anyone to forge certificates in -whatever name they choose. - -* Why is OpenSSL x509 DN output not conformant to RFC2253? - -The ways to print out the oneline format of the DN (Distinguished Name) have -been extended in version 0.9.7 of OpenSSL. Using the new X509_NAME_print_ex() -interface, the "-nameopt" option could be introduded. See the manual -page of the "openssl x509" commandline tool for details. The old behaviour -has however been left as default for the sake of compatibility. - -* What is a "128 bit certificate"? Can I create one with OpenSSL? - -The term "128 bit certificate" is a highly misleading marketing term. It does -*not* refer to the size of the public key in the certificate! A certificate -containing a 128 bit RSA key would have negligible security. - -There were various other names such as "magic certificates", "SGC -certificates", "step up certificates" etc. - -You can't generally create such a certificate using OpenSSL but there is no -need to any more. Nowadays web browsers using unrestricted strong encryption -are generally available. - -When there were tight restrictions on the export of strong encryption -software from the US only weak encryption algorithms could be freely exported -(initially 40 bit and then 56 bit). It was widely recognised that this was -inadequate. A relaxation of the rules allowed the use of strong encryption but -only to an authorised server. - -Two slighly different techniques were developed to support this, one used by -Netscape was called "step up", the other used by MSIE was called "Server Gated -Cryptography" (SGC). When a browser initially connected to a server it would -check to see if the certificate contained certain extensions and was issued by -an authorised authority. If these test succeeded it would reconnect using -strong encryption. - -Only certain (initially one) certificate authorities could issue the -certificates and they generally cost more than ordinary certificates. - -Although OpenSSL can create certificates containing the appropriate extensions -the certificate would not come from a permitted authority and so would not -be recognized. - -The export laws were later changed to allow almost unrestricted use of strong -encryption so these certificates are now obsolete. - - -* Why does OpenSSL set the authority key identifier (AKID) extension incorrectly? - -It doesn't: this extension is often the cause of confusion. - -Consider a certificate chain A->B->C so that A signs B and B signs C. Suppose -certificate C contains AKID. - -The purpose of this extension is to identify the authority certificate B. This -can be done either by including the subject key identifier of B or its issuer -name and serial number. - -In this latter case because it is identifying certifcate B it must contain the -issuer name and serial number of B. - -It is often wrongly assumed that it should contain the subject name of B. If it -did this would be redundant information because it would duplicate the issuer -name of C. - - -* How can I set up a bundle of commercial root CA certificates? - -The OpenSSL software is shipped without any root CA certificate as the -OpenSSL project does not have any policy on including or excluding -any specific CA and does not intend to set up such a policy. Deciding -about which CAs to support is up to application developers or -administrators. - -Other projects do have other policies so you can for example extract the CA -bundle used by Mozilla and/or modssl as described in this article: - - - - -[BUILD] ======================================================================= - -* Why does the linker complain about undefined symbols? - -Maybe the compilation was interrupted, and make doesn't notice that -something is missing. Run "make clean; make". - -If you used ./Configure instead of ./config, make sure that you -selected the right target. File formats may differ slightly between -OS versions (for example sparcv8/sparcv9, or a.out/elf). - -In case you get errors about the following symbols, use the config -option "no-asm", as described in INSTALL: - - BF_cbc_encrypt, BF_decrypt, BF_encrypt, CAST_cbc_encrypt, - CAST_decrypt, CAST_encrypt, RC4, RC5_32_cbc_encrypt, RC5_32_decrypt, - RC5_32_encrypt, bn_add_words, bn_div_words, bn_mul_add_words, - bn_mul_comba4, bn_mul_comba8, bn_mul_words, bn_sqr_comba4, - bn_sqr_comba8, bn_sqr_words, bn_sub_words, des_decrypt3, - des_ede3_cbc_encrypt, des_encrypt, des_encrypt2, des_encrypt3, - des_ncbc_encrypt, md5_block_asm_host_order, sha1_block_asm_data_order - -If none of these helps, you may want to try using the current snapshot. -If the problem persists, please submit a bug report. - - -* Why does the OpenSSL test fail with "bc: command not found"? - -You didn't install "bc", the Unix calculator. If you want to run the -tests, get GNU bc from ftp://ftp.gnu.org or from your OS distributor. - - -* Why does the OpenSSL test fail with "bc: 1 no implemented"? - -On some SCO installations or versions, bc has a bug that gets triggered -when you run the test suite (using "make test"). The message returned is -"bc: 1 not implemented". - -The best way to deal with this is to find another implementation of bc -and compile/install it. GNU bc (see -for download instructions) can be safely used, for example. - - -* Why does the OpenSSL test fail with "bc: stack empty"? - -On some DG/ux versions, bc seems to have a too small stack for calculations -that the OpenSSL bntest throws at it. This gets triggered when you run the -test suite (using "make test"). The message returned is "bc: stack empty". - -The best way to deal with this is to find another implementation of bc -and compile/install it. GNU bc (see -for download instructions) can be safely used, for example. - - -* Why does the OpenSSL compilation fail on Alpha Tru64 Unix? - -On some Alpha installations running Tru64 Unix and Compaq C, the compilation -of crypto/sha/sha_dgst.c fails with the message 'Fatal: Insufficient virtual -memory to continue compilation.' As far as the tests have shown, this may be -a compiler bug. What happens is that it eats up a lot of resident memory -to build something, probably a table. The problem is clearly in the -optimization code, because if one eliminates optimization completely (-O0), -the compilation goes through (and the compiler consumes about 2MB of resident -memory instead of 240MB or whatever one's limit is currently). - -There are three options to solve this problem: - -1. set your current data segment size soft limit higher. Experience shows -that about 241000 kbytes seems to be enough on an AlphaServer DS10. You do -this with the command 'ulimit -Sd nnnnnn', where 'nnnnnn' is the number of -kbytes to set the limit to. - -2. If you have a hard limit that is lower than what you need and you can't -get it changed, you can compile all of OpenSSL with -O0 as optimization -level. This is however not a very nice thing to do for those who expect to -get the best result from OpenSSL. A bit more complicated solution is the -following: - ------ snip:start ----- - make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile.ssl | \ - sed -e 's/ -O[0-9] / -O0 /'`" - rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'` - make ------ snip:end ----- - -This will only compile sha_dgst.c with -O0, the rest with the optimization -level chosen by the configuration process. When the above is done, do the -test and installation and you're set. - -3. Reconfigure the toolkit with no-sha0 option to leave out SHA0. It -should not be used and is not used in SSL/TLS nor any other recognized -protocol in either case. - - -* Why does the OpenSSL compilation fail with "ar: command not found"? - -Getting this message is quite usual on Solaris 2, because Sun has hidden -away 'ar' and other development commands in directories that aren't in -$PATH by default. One of those directories is '/usr/ccs/bin'. The -quickest way to fix this is to do the following (it assumes you use sh -or any sh-compatible shell): - ------ snip:start ----- - PATH=${PATH}:/usr/ccs/bin; export PATH ------ snip:end ----- - -and then redo the compilation. What you should really do is make sure -'/usr/ccs/bin' is permanently in your $PATH, for example through your -'.profile' (again, assuming you use a sh-compatible shell). - - -* Why does the OpenSSL compilation fail on Win32 with VC++? - -Sometimes, you may get reports from VC++ command line (cl) that it -can't find standard include files like stdio.h and other weirdnesses. -One possible cause is that the environment isn't correctly set up. -To solve that problem for VC++ versions up to 6, one should run -VCVARS32.BAT which is found in the 'bin' subdirectory of the VC++ -installation directory (somewhere under 'Program Files'). For VC++ -version 7 (and up?), which is also called VS.NET, the file is called -VSVARS32.BAT instead. -This needs to be done prior to running NMAKE, and the changes are only -valid for the current DOS session. - - -* What is special about OpenSSL on Redhat? - -Red Hat Linux (release 7.0 and later) include a preinstalled limited -version of OpenSSL. For patent reasons, support for IDEA, RC5 and MDC2 -is disabled in this version. The same may apply to other Linux distributions. -Users may therefore wish to install more or all of the features left out. - -To do this you MUST ensure that you do not overwrite the openssl that is in -/usr/bin on your Red Hat machine. Several packages depend on this file, -including sendmail and ssh. /usr/local/bin is a good alternative choice. The -libraries that come with Red Hat 7.0 onwards have different names and so are -not affected. (eg For Red Hat 7.2 they are /lib/libssl.so.0.9.6b and -/lib/libcrypto.so.0.9.6b with symlinks /lib/libssl.so.2 and -/lib/libcrypto.so.2 respectively). - -Please note that we have been advised by Red Hat attempting to recompile the -openssl rpm with all the cryptography enabled will not work. All other -packages depend on the original Red Hat supplied openssl package. It is also -worth noting that due to the way Red Hat supplies its packages, updates to -openssl on each distribution never change the package version, only the -build number. For example, on Red Hat 7.1, the latest openssl package has -version number 0.9.6 and build number 9 even though it contains all the -relevant updates in packages up to and including 0.9.6b. - -A possible way around this is to persuade Red Hat to produce a non-US -version of Red Hat Linux. - -FYI: Patent numbers and expiry dates of US patents: -MDC-2: 4,908,861 13/03/2007 -IDEA: 5,214,703 25/05/2010 -RC5: 5,724,428 03/03/2015 - - -* Why does the OpenSSL compilation fail on MacOS X? - -If the failure happens when trying to build the "openssl" binary, with -a large number of undefined symbols, it's very probable that you have -OpenSSL 0.9.6b delivered with the operating system (you can find out by -running '/usr/bin/openssl version') and that you were trying to build -OpenSSL 0.9.7 or newer. The problem is that the loader ('ld') in -MacOS X has a misfeature that's quite difficult to go around. -Look in the file PROBLEMS for a more detailed explanation and for possible -solutions. - - -* Why does the OpenSSL test suite fail on MacOS X? - -If the failure happens when running 'make test' and the RC4 test fails, -it's very probable that you have OpenSSL 0.9.6b delivered with the -operating system (you can find out by running '/usr/bin/openssl version') -and that you were trying to build OpenSSL 0.9.6d. The problem is that -the loader ('ld') in MacOS X has a misfeature that's quite difficult to -go around and has linked the programs "openssl" and the test programs -with /usr/lib/libcrypto.dylib and /usr/lib/libssl.dylib instead of the -libraries you just built. -Look in the file PROBLEMS for a more detailed explanation and for possible -solutions. - -* Why does the OpenSSL test suite fail in BN_sqr test [on a 64-bit platform]? - -Failure in BN_sqr test is most likely caused by a failure to configure the -toolkit for current platform or lack of support for the platform in question. -Run './config -t' and './apps/openssl version -p'. Do these platform -identifiers match? If they don't, then you most likely failed to run -./config and you're hereby advised to do so before filing a bug report. -If ./config itself fails to run, then it's most likely problem with your -local environment and you should turn to your system administrator (or -similar). If identifiers match (and/or no alternative identifier is -suggested by ./config script), then the platform is unsupported. There might -or might not be a workaround. Most notably on SPARC64 platforms with GNU -C compiler you should be able to produce a working build by running -'./config -m32'. I understand that -m32 might not be what you want/need, -but the build should be operational. For further details turn to -. - -* Why does OpenBSD-i386 build fail on des-586.s with "Unimplemented segment type"? - -As of 0.9.7 assembler routines were overhauled for position independence -of the machine code, which is essential for shared library support. For -some reason OpenBSD is equipped with an out-of-date GNU assembler which -finds the new code offensive. To work around the problem, configure with -no-asm (and sacrifice a great deal of performance) or patch your assembler -according to . -For your convenience a pre-compiled replacement binary is provided at -. -Reportedly elder *BSD a.out platforms also suffer from this problem and -remedy should be same. Provided binary is statically linked and should be -working across wider range of *BSD branches, not just OpenBSD. - -* Why does the OpenSSL test suite fail in sha512t on x86 CPU? - -If the test program in question fails withs SIGILL, Illegal Instruction -exception, then you more than likely to run SSE2-capable CPU, such as -Intel P4, under control of kernel which does not support SSE2 -instruction extentions. See accompanying INSTALL file and -OPENSSL_ia32cap(3) documentation page for further information. - -* Why does compiler fail to compile sha512.c? - -OpenSSL SHA-512 implementation depends on compiler support for 64-bit -integer type. Few elder compilers [ULTRIX cc, SCO compiler to mention a -couple] lack support for this and therefore are incapable of compiling -the module in question. The recommendation is to disable SHA-512 by -adding no-sha512 to ./config [or ./Configure] command line. Another -possible alternative might be to switch to GCC. - -* Test suite still fails, what to do? - -Another common reason for failure to complete some particular test is -simply bad code generated by a buggy component in toolchain or deficiency -in run-time environment. There are few cases documented in PROBLEMS file, -consult it for possible workaround before you beat the drum. Even if you -don't find solution or even mention there, do reserve for possibility of -a compiler bug. Compiler bugs might appear in rather bizarre ways, they -never make sense, and tend to emerge when you least expect them. In order -to identify one, drop optimization level, e.g. by editing CFLAG line in -top-level Makefile, recompile and re-run the test. - -* I think I've found a bug, what should I do? - -If you are a new user then it is quite likely you haven't found a bug and -something is happening you aren't familiar with. Check this FAQ, the associated -documentation and the mailing lists for similar queries. If you are still -unsure whether it is a bug or not submit a query to the openssl-users mailing -list. - - -* I'm SURE I've found a bug, how do I report it? - -Bug reports with no security implications should be sent to the request -tracker. This can be done by mailing the report to (or its -alias ), please note that messages sent to the -request tracker also appear in the public openssl-dev mailing list. - -The report should be in plain text. Any patches should be sent as -plain text attachments because some mailers corrupt patches sent inline. -If your issue affects multiple versions of OpenSSL check any patches apply -cleanly and, if possible include patches to each affected version. - -The report should be given a meaningful subject line briefly summarising the -issue. Just "bug in OpenSSL" or "bug in OpenSSL 0.9.8n" is not very helpful. - -By sending reports to the request tracker the bug can then be given a priority -and assigned to the appropriate maintainer. The history of discussions can be -accessed and if the issue has been addressed or a reason why not. If patches -are only sent to openssl-dev they can be mislaid if a team member has to -wade through months of old messages to review the discussion. - -See also - - -* I've found a security issue, how do I report it? - -If you think your bug has security implications then please send it to -openssl-security@openssl.org if you don't get a prompt reply at least -acknowledging receipt then resend or mail it directly to one of the -more active team members (e.g. Steve). - -Note that bugs only present in the openssl utility are not in general -considered to be security issues. - -[PROG] ======================================================================== - -* Is OpenSSL thread-safe? - -Yes (with limitations: an SSL connection may not concurrently be used -by multiple threads). On Windows and many Unix systems, OpenSSL -automatically uses the multi-threaded versions of the standard -libraries. If your platform is not one of these, consult the INSTALL -file. - -Multi-threaded applications must provide two callback functions to -OpenSSL by calling CRYPTO_set_locking_callback() and -CRYPTO_set_id_callback(), for all versions of OpenSSL up to and -including 0.9.8[abc...]. As of version 1.0.0, CRYPTO_set_id_callback() -and associated APIs are deprecated by CRYPTO_THREADID_set_callback() -and friends. This is described in the threads(3) manpage. - -* I've compiled a program under Windows and it crashes: why? - -This is usually because you've missed the comment in INSTALL.W32. -Your application must link against the same version of the Win32 -C-Runtime against which your openssl libraries were linked. The -default version for OpenSSL is /MD - "Multithreaded DLL". - -If you are using Microsoft Visual C++'s IDE (Visual Studio), in -many cases, your new project most likely defaulted to "Debug -Singlethreaded" - /ML. This is NOT interchangeable with /MD and your -program will crash, typically on the first BIO related read or write -operation. - -For each of the six possible link stage configurations within Win32, -your application must link against the same by which OpenSSL was -built. If you are using MS Visual C++ (Studio) this can be changed -by: - - 1. Select Settings... from the Project Menu. - 2. Select the C/C++ Tab. - 3. Select "Code Generation from the "Category" drop down list box - 4. Select the Appropriate library (see table below) from the "Use - run-time library" drop down list box. Perform this step for both - your debug and release versions of your application (look at the - top left of the settings panel to change between the two) - - Single Threaded /ML - MS VC++ often defaults to - this for the release - version of a new project. - Debug Single Threaded /MLd - MS VC++ often defaults to - this for the debug version - of a new project. - Multithreaded /MT - Debug Multithreaded /MTd - Multithreaded DLL /MD - OpenSSL defaults to this. - Debug Multithreaded DLL /MDd - -Note that debug and release libraries are NOT interchangeable. If you -built OpenSSL with /MD your application must use /MD and cannot use /MDd. - -As per 0.9.8 the above limitation is eliminated for .DLLs. OpenSSL -.DLLs compiled with some specific run-time option [we insist on the -default /MD] can be deployed with application compiled with different -option or even different compiler. But there is a catch! Instead of -re-compiling OpenSSL toolkit, as you would have to with prior versions, -you have to compile small C snippet with compiler and/or options of -your choice. The snippet gets installed as -/include/openssl/applink.c and should be either added to -your application project or simply #include-d in one [and only one] -of your application source files. Failure to link this shim module -into your application manifests itself as fatal "no OPENSSL_Applink" -run-time error. An explicit reminder is due that in this situation -[mixing compiler options] it is as important to add CRYPTO_malloc_init -prior first call to OpenSSL. - -* How do I read or write a DER encoded buffer using the ASN1 functions? - -You have two options. You can either use a memory BIO in conjunction -with the i2d_*_bio() or d2i_*_bio() functions or you can use the -i2d_*(), d2i_*() functions directly. Since these are often the -cause of grief here are some code fragments using PKCS7 as an example: - - unsigned char *buf, *p; - int len; - - len = i2d_PKCS7(p7, NULL); - buf = OPENSSL_malloc(len); /* or Malloc, error checking omitted */ - p = buf; - i2d_PKCS7(p7, &p); - -At this point buf contains the len bytes of the DER encoding of -p7. - -The opposite assumes we already have len bytes in buf: - - unsigned char *p; - p = buf; - p7 = d2i_PKCS7(NULL, &p, len); - -At this point p7 contains a valid PKCS7 structure of NULL if an error -occurred. If an error occurred ERR_print_errors(bio) should give more -information. - -The reason for the temporary variable 'p' is that the ASN1 functions -increment the passed pointer so it is ready to read or write the next -structure. This is often a cause of problems: without the temporary -variable the buffer pointer is changed to point just after the data -that has been read or written. This may well be uninitialized data -and attempts to free the buffer will have unpredictable results -because it no longer points to the same address. - - -* OpenSSL uses DER but I need BER format: does OpenSSL support BER? - -The short answer is yes, because DER is a special case of BER and OpenSSL -ASN1 decoders can process BER. - -The longer answer is that ASN1 structures can be encoded in a number of -different ways. One set of ways is the Basic Encoding Rules (BER) with various -permissible encodings. A restriction of BER is the Distinguished Encoding -Rules (DER): these uniquely specify how a given structure is encoded. - -Therefore, because DER is a special case of BER, DER is an acceptable encoding -for BER. - - -* I've tried using and I get errors why? - -This usually happens when you try compiling something using the PKCS#12 -macros with a C++ compiler. There is hardly ever any need to use the -PKCS#12 macros in a program, it is much easier to parse and create -PKCS#12 files using the PKCS12_parse() and PKCS12_create() functions -documented in doc/openssl.txt and with examples in demos/pkcs12. The -'pkcs12' application has to use the macros because it prints out -debugging information. - - -* I've called and it fails, why? - -Before submitting a report or asking in one of the mailing lists, you -should try to determine the cause. In particular, you should call -ERR_print_errors() or ERR_print_errors_fp() after the failed call -and see if the message helps. Note that the problem may occur earlier -than you think -- you should check for errors after every call where -it is possible, otherwise the actual problem may be hidden because -some OpenSSL functions clear the error state. - - -* I just get a load of numbers for the error output, what do they mean? - -The actual format is described in the ERR_print_errors() manual page. -You should call the function ERR_load_crypto_strings() before hand and -the message will be output in text form. If you can't do this (for example -it is a pre-compiled binary) you can use the errstr utility on the error -code itself (the hex digits after the second colon). - - -* Why do I get errors about unknown algorithms? - -The cause is forgetting to load OpenSSL's table of algorithms with -OpenSSL_add_all_algorithms(). See the manual page for more information. This -can cause several problems such as being unable to read in an encrypted -PEM file, unable to decrypt a PKCS#12 file or signature failure when -verifying certificates. - -* Why can't the OpenSSH configure script detect OpenSSL? - -Several reasons for problems with the automatic detection exist. -OpenSSH requires at least version 0.9.5a of the OpenSSL libraries. -Sometimes the distribution has installed an older version in the system -locations that is detected instead of a new one installed. The OpenSSL -library might have been compiled for another CPU or another mode (32/64 bits). -Permissions might be wrong. - -The general answer is to check the config.log file generated when running -the OpenSSH configure script. It should contain the detailed information -on why the OpenSSL library was not detected or considered incompatible. - - -* Can I use OpenSSL's SSL library with non-blocking I/O? - -Yes; make sure to read the SSL_get_error(3) manual page! - -A pitfall to avoid: Don't assume that SSL_read() will just read from -the underlying transport or that SSL_write() will just write to it -- -it is also possible that SSL_write() cannot do any useful work until -there is data to read, or that SSL_read() cannot do anything until it -is possible to send data. One reason for this is that the peer may -request a new TLS/SSL handshake at any time during the protocol, -requiring a bi-directional message exchange; both SSL_read() and -SSL_write() will try to continue any pending handshake. - - -* Why doesn't my server application receive a client certificate? - -Due to the TLS protocol definition, a client will only send a certificate, -if explicitly asked by the server. Use the SSL_VERIFY_PEER flag of the -SSL_CTX_set_verify() function to enable the use of client certificates. - - -* Why does compilation fail due to an undefined symbol NID_uniqueIdentifier? - -For OpenSSL 0.9.7 the OID table was extended and corrected. In earlier -versions, uniqueIdentifier was incorrectly used for X.509 certificates. -The correct name according to RFC2256 (LDAP) is x500UniqueIdentifier. -Change your code to use the new name when compiling against OpenSSL 0.9.7. - - -* I think I've detected a memory leak, is this a bug? *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Dec 3 21:26:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAF5FA40C36; Thu, 3 Dec 2015 21:26:00 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A74821ECD; Thu, 3 Dec 2015 21:26:00 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3LPxN5046477; Thu, 3 Dec 2015 21:25:59 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3LPxIN046476; Thu, 3 Dec 2015 21:25:59 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201512032125.tB3LPxIN046476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 3 Dec 2015 21:25:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291723 - head/libexec/rtld-elf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 21:26:01 -0000 Author: nwhitehorn Date: Thu Dec 3 21:25:59 2015 New Revision: 291723 URL: https://svnweb.freebsd.org/changeset/base/291723 Log: Follow-on to r291666: use -ffreestanding instead of -fno-builtin. Requested by: kib Modified: head/libexec/rtld-elf/Makefile Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Thu Dec 3 21:24:40 2015 (r291722) +++ head/libexec/rtld-elf/Makefile Thu Dec 3 21:25:59 2015 (r291723) @@ -13,7 +13,7 @@ SRCS= rtld_start.S \ malloc.c xmalloc.c debug.c libmap.c MAN= rtld.1 CSTD?= gnu99 -CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -fno-builtin +CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD -ffreestanding CFLAGS+= -I${SRCTOP}/lib/csu/common .if exists(${.CURDIR}/${MACHINE_ARCH}) RTLD_ARCH= ${MACHINE_ARCH} From owner-svn-src-all@freebsd.org Thu Dec 3 21:45:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D193A40FD7; Thu, 3 Dec 2015 21:45:10 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (mithlond.kdm.org [96.89.93.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "A1-33714", Issuer "A1-33714" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D0D221A7E; Thu, 3 Dec 2015 21:45:09 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (localhost [127.0.0.1]) by mithlond.kdm.org (8.15.2/8.14.9) with ESMTPS id tB3LIu9m078298 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 3 Dec 2015 16:18:56 -0500 (EST) (envelope-from ken@mithlond.kdm.org) Received: (from ken@localhost) by mithlond.kdm.org (8.15.2/8.14.9/Submit) id tB3LIuLY078297; Thu, 3 Dec 2015 16:18:56 -0500 (EST) (envelope-from ken) Date: Thu, 3 Dec 2015 16:18:56 -0500 From: "Kenneth D. Merry" To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291716 - in head: share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/dev/md sys/geom sys/kern sys/pc98/include sys/sys usr.sbin usr.sbin/camdd Message-ID: <20151203211856.GA78288@mithlond.kdm.org> References: <201512032054.tB3KsuUw037541@repo.freebsd.org> <5660B075.8040806@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5660B075.8040806@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mithlond.kdm.org [127.0.0.1]); Thu, 03 Dec 2015 16:18:56 -0500 (EST) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mithlond.kdm.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 21:45:10 -0000 On Thu, Dec 03, 2015 at 13:13:25 -0800, Bryan Drewery wrote: > On 12/3/15 12:54 PM, Kenneth D. Merry wrote: > > Author: ken > > Date: Thu Dec 3 20:54:55 2015 > > New Revision: 291716 > > URL: https://svnweb.freebsd.org/changeset/base/291716 > > > > Log: > > Add asynchronous command support to the pass(4) driver, and the new > > camdd(8) utility. > > > > CCBs may be queued to the driver via the new CAMIOQUEUE ioctl, and > > completed CCBs may be retrieved via the CAMIOGET ioctl. User > > processes can use poll(2) or kevent(2) to get notification when > > I/O has completed. > > > > While the existing CAMIOCOMMAND blocking ioctl interface only > > supports user virtual data pointers in a CCB (generally only > > one per CCB), the new CAMIOQUEUE ioctl supports user virtual and > > physical address pointers, as well as user virtual and physical > > scatter/gather lists. This allows user applications to have more > > flexibility in their data handling operations. > > > > Kernel memory for data transferred via the queued interface is > > allocated from the zone allocator in MAXPHYS sized chunks, and user > > data is copied in and out. This is likely faster than the > > vmapbuf()/vunmapbuf() method used by the CAMIOCOMMAND ioctl in > > configurations with many processors (there are more TLB shootdowns > > caused by the mapping/unmapping operation) but may not be as fast > > as running with unmapped I/O. > > > > The new memory handling model for user requests also allows > > applications to send CCBs with request sizes that are larger than > > MAXPHYS. The pass(4) driver now limits queued requests to the I/O > > size listed by the SIM driver in the maxio field in the Path > > Inquiry (XPT_PATH_INQ) CCB. > > > > There are some things things would be good to add: > > > > 1. Come up with a way to do unmapped I/O on multiple buffers. > > Currently the unmapped I/O interface operates on a struct bio, > > which includes only one address and length. It would be nice > > to be able to send an unmapped scatter/gather list down to > > busdma. This would allow eliminating the copy we currently do > > for data. > > > > 2. Add an ioctl to list currently outstanding CCBs in the various > > queues. > > > > 3. Add an ioctl to cancel a request, or use the XPT_ABORT CCB to do > > that. > > > > 4. Test physical address support. Virtual pointers and scatter > > gather lists have been tested, but I have not yet tested > > physical addresses or scatter/gather lists. > > > > 5. Investigate multiple queue support. At the moment there is one > > queue of commands per pass(4) device. If multiple processes > > open the device, they will submit I/O into the same queue and > > get events for the same completions. This is probably the right > > model for most applications, but it is something that could be > > changed later on. > > > > Also, add a new utility, camdd(8) that uses the asynchronous pass(4) > > driver interface. > > > > This utility is intended to be a basic data transfer/copy utility, > > a simple benchmark utility, and an example of how to use the > > asynchronous pass(4) interface. > > > > It can copy data to and from pass(4) devices using any target queue > > depth, starting offset and blocksize for the input and ouptut devices. > > It currently only supports SCSI devices, but could be easily extended > > to support ATA devices. > > > > It can also copy data to and from regular files, block devices, tape > > devices, pipes, stdin, and stdout. It does not support queueing > > multiple commands to any of those targets, since it uses the standard > > read(2)/write(2)/writev(2)/readv(2) system calls. > > > > The I/O is done by two threads, one for the reader and one for the > > writer. The reader thread sends completed read requests to the > > writer thread in strictly sequential order, even if they complete > > out of order. That could be modified later on for random I/O patterns > > or slightly out of order I/O. > > > > camdd(8) uses kqueue(2)/kevent(2) to get I/O completion events from > > the pass(4) driver and also to send request notifications internally. > > > > For pass(4) devcies, camdd(8) uses a single buffer (CAM_DATA_VADDR) > > per CAM CCB on the reading side, and a scatter/gather list > > (CAM_DATA_SG) on the writing side. In addition to testing both > > interfaces, this makes any potential reblocking of I/O easier. No > > data is copied between the reader and the writer, but rather the > > reader's buffers are split into multiple I/O requests or combined > > into a single I/O request depending on the input and output blocksize. > > > > For the file I/O path, camdd(8) also uses a single buffer (read(2), > > write(2), pread(2) or pwrite(2)) on reads, and a scatter/gather list > > (readv(2), writev(2), preadv(2), pwritev(2)) on writes. > > > > Things that would be nice to do for camdd(8) eventually: > > > > 1. Add support for I/O pattern generation. Patterns like all > > zeros, all ones, LBA-based patterns, random patterns, etc. Right > > Now you can always use /dev/zero, /dev/random, etc. > > > > 2. Add support for a "sink" mode, so we do only reads with no > > writes. Right now, you can use /dev/null. > > > > 3. Add support for automatic queue depth probing, so that we can > > figure out the right queue depth on the input and output side > > for maximum throughput. At the moment it defaults to 6. > > > > 4. Add support for SATA device passthrough I/O. > > > > 5. Add support for random LBAs and/or lengths on the input and > > output sides. > > > > 6. Track average per-I/O latency and busy time. The busy time > > and latency could also feed in to the automatic queue depth > > determination. > > > > sys/cam/scsi/scsi_pass.h: > > Define two new ioctls, CAMIOQUEUE and CAMIOGET, that queue > > and fetch asynchronous CAM CCBs respectively. > > > > Although these ioctls do not have a declared argument, they > > both take a union ccb pointer. If we declare a size here, > > the ioctl code in sys/kern/sys_generic.c will malloc and free > > a buffer for either the CCB or the CCB pointer (depending on > > how it is declared). Since we have to keep a copy of the > > CCB (which is fairly large) anyway, having the ioctl malloc > > and free a CCB for each call is wasteful. > > > > sys/cam/scsi/scsi_pass.c: > > Add asynchronous CCB support. > > > > Add two new ioctls, CAMIOQUEUE and CAMIOGET. > > > > CAMIOQUEUE adds a CCB to the incoming queue. The CCB is > > executed immediately (and moved to the active queue) if it > > is an immediate CCB, but otherwise it will be executed > > in passstart() when a CCB is available from the transport layer. > > > > When CCBs are completed (because they are immediate or > > passdone() if they are queued), they are put on the done > > queue. > > > > If we get the final close on the device before all pending > > I/O is complete, all active I/O is moved to the abandoned > > queue and we increment the peripheral reference count so > > that the peripheral driver instance doesn't go away before > > all pending I/O is done. > > > > The new passcreatezone() function is called on the first > > call to the CAMIOQUEUE ioctl on a given device to allocate > > the UMA zones for I/O requests and S/G list buffers. This > > may be good to move off to a taskqueue at some point. > > The new passmemsetup() function allocates memory and > > scatter/gather lists to hold the user's data, and copies > > in any data that needs to be written. For virtual pointers > > (CAM_DATA_VADDR), the kernel buffer is malloced from the > > new pass(4) driver malloc bucket. For virtual > > scatter/gather lists (CAM_DATA_SG), buffers are allocated > > from a new per-pass(9) UMA zone in MAXPHYS-sized chunks. > > Physical pointers are passed in unchanged. We have support > > for up to 16 scatter/gather segments (for the user and > > kernel S/G lists) in the default struct pass_io_req, so > > requests with longer S/G lists require an extra kernel malloc. > > > > The new passcopysglist() function copies a user scatter/gather > > list to a kernel scatter/gather list. The number of elements > > in each list may be different, but (obviously) the amount of data > > stored has to be identical. > > > > The new passmemdone() function copies data out for the > > CAM_DATA_VADDR and CAM_DATA_SG cases. > > > > The new passiocleanup() function restores data pointers in > > user CCBs and frees memory. > > > > Add new functions to support kqueue(2)/kevent(2): > > > > passreadfilt() tells kevent whether or not the done > > queue is empty. > > > > passkqfilter() adds a knote to our list. > > > > passreadfiltdetach() removes a knote from our list. > > > > Add a new function, passpoll(), for poll(2)/select(2) > > to use. > > > > Add devstat(9) support for the queued CCB path. > > > > sys/cam/ata/ata_da.c: > > Add support for the BIO_VLIST bio type. > > > > sys/cam/cam_ccb.h: > > Add a new enumeration for the xflags field in the CCB header. > > (This doesn't change the CCB header, just adds an enumeration to > > use.) > > > > sys/cam/cam_xpt.c: > > Add a new function, xpt_setup_ccb_flags(), that allows specifying > > CCB flags. > > > > sys/cam/cam_xpt.h: > > Add a prototype for xpt_setup_ccb_flags(). > > > > sys/cam/scsi/scsi_da.c: > > Add support for BIO_VLIST. > > > > sys/dev/md/md.c: > > Add BIO_VLIST support to md(4). > > > > sys/geom/geom_disk.c: > > Add BIO_VLIST support to the GEOM disk class. Re-factor the I/O size > > limiting code in g_disk_start() a bit. > > > > sys/kern/subr_bus_dma.c: > > Change _bus_dmamap_load_vlist() to take a starting offset and > > length. > > > > Add a new function, _bus_dmamap_load_pages(), that will load a list > > of physical pages starting at an offset. > > > > Update _bus_dmamap_load_bio() to allow loading BIO_VLIST bios. > > Allow unmapped I/O to start at an offset. > > > > sys/kern/subr_uio.c: > > Add two new functions, physcopyin_vlist() and physcopyout_vlist(). > > > > sys/pc98/include/bus.h: > > Guard kernel-only parts of the pc98 machine/bus.h header with > > #ifdef _KERNEL. > > > > This allows userland programs to include to get the > > definition of bus_addr_t and bus_size_t. > > > > sys/sys/bio.h: > > Add a new bio flag, BIO_VLIST. > > > > sys/sys/uio.h: > > Add prototypes for physcopyin_vlist() and physcopyout_vlist(). > > > > share/man/man4/pass.4: > > Document the CAMIOQUEUE and CAMIOGET ioctls. > > > > usr.sbin/Makefile: > > Add camdd. > > > > usr.sbin/camdd/Makefile: > > Add a makefile for camdd(8). > > > > usr.sbin/camdd/camdd.8: > > Man page for camdd(8). > > > > usr.sbin/camdd/camdd.c: > > The new camdd(8) utility. > > > > Sponsored by: Spectra Logic > > MFC after: 1 week > > > > Added: > > head/usr.sbin/camdd/ > > head/usr.sbin/camdd/Makefile (contents, props changed) > > > +++ usr.sbin/camdd/Makefile > > @@ -0,0 +1,11 @@ > > +# $FreeBSD$ > > + > > +PROG= camdd > > +SRCS= camdd.c > > +SDIR= ${.CURDIR}/../../sys > > +DPADD= ${LIBCAM} ${LIBMT} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} ${LIBTHR} > > +LDADD= -lcam -lmt -lsbuf -lbsdxml -lutil -lthr > > > We use LIBADD in head now, not DPADD and LDADD. See r291718. Oops, sorry about that! Thanks for fixing it. Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-all@freebsd.org Thu Dec 3 22:07:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A56B0A40353; Thu, 3 Dec 2015 22:07:02 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DFEA163D; Thu, 3 Dec 2015 22:07:02 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3M71A8057811; Thu, 3 Dec 2015 22:07:01 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3M716B057810; Thu, 3 Dec 2015 22:07:01 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201512032207.tB3M716B057810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Thu, 3 Dec 2015 22:07:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291724 - head/usr.sbin/camdd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 22:07:02 -0000 Author: ken Date: Thu Dec 3 22:07:01 2015 New Revision: 291724 URL: https://svnweb.freebsd.org/changeset/base/291724 Log: Fix typos in the camdd(8) usage() function output caused by an error in my diff filter script. Sponsored by: Spectra Logic MFC after: 1 week Modified: head/usr.sbin/camdd/camdd.c Modified: head/usr.sbin/camdd/camdd.c ============================================================================== --- head/usr.sbin/camdd/camdd.c Thu Dec 3 21:25:59 2015 (r291723) +++ head/usr.sbin/camdd/camdd.c Thu Dec 3 22:07:01 2015 (r291724) @@ -3205,7 +3205,7 @@ usage(void) "-o Specify output device/file and parameters\n" "Input and Output parameters\n" "pass=name Specify a pass(4) device like pass0 or /dev/pass0\n" -"file=name Specify a file or device, src/usr.sbin/camdd/camdd.c, /dev/da0, /dev/null\n" +"file=name Specify a file or device, /tmp/foo, /dev/da0, /dev/null\n" " or - for stdin/stdout\n" "bs=blocksize Specify blocksize in bytes, or using K, M, G, etc. suffix\n" "offset=len Specify starting offset in bytes or using K, M, G suffix\n" From owner-svn-src-all@freebsd.org Thu Dec 3 22:39:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E043A409D1; Thu, 3 Dec 2015 22:39:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B67B15DF; Thu, 3 Dec 2015 22:39:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3Mdg8j066407; Thu, 3 Dec 2015 22:39:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3MdgSE066406; Thu, 3 Dec 2015 22:39:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512032239.tB3MdgSE066406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 3 Dec 2015 22:39:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291725 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 22:39:43 -0000 Author: bdrewery Date: Thu Dec 3 22:39:42 2015 New Revision: 291725 URL: https://svnweb.freebsd.org/changeset/base/291725 Log: Revert r288966 as it is redundant and not right. bsd.prog.mk and bsd.lib.mk already make OBJS depend on headers when there is not .OBJDIR/.depend file, which is still true for the initial meta mode builds. If there was something to benefit the meta mode build here then it should be extended to the non-meta mode build as well. Some of the problems here were just DPSRCS being hooked up wrongly, fixed in r291330. The logic itself is flawed as 'buildfiles' is in a different part of the dependency tree than the objects and headers are, so the objects will still be built independent from 'buildfiles'. 'buildfiles' is not ordered in the build before objects. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.autodep.mk Modified: head/share/mk/local.autodep.mk ============================================================================== --- head/share/mk/local.autodep.mk Thu Dec 3 22:07:01 2015 (r291724) +++ head/share/mk/local.autodep.mk Thu Dec 3 22:39:42 2015 (r291725) @@ -14,12 +14,6 @@ LDFLAGS+= ${LDFLAGS_LAST} CLEANFILES+= .depend -.for h in ${SRCS:M*.h} -.if target($h) -buildfiles: $h -.endif -.endfor - # handy for debugging .SUFFIXES: .S .c .cc .cpp .cpp-out From owner-svn-src-all@freebsd.org Thu Dec 3 22:40:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4150A40A48; Thu, 3 Dec 2015 22:40:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90651188C; Thu, 3 Dec 2015 22:40:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3Meg3k066498; Thu, 3 Dec 2015 22:40:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3Megea066497; Thu, 3 Dec 2015 22:40:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512032240.tB3Megea066497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 3 Dec 2015 22:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291726 - head/targets/pseudo/userland/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 22:40:43 -0000 Author: bdrewery Date: Thu Dec 3 22:40:42 2015 New Revision: 291726 URL: https://svnweb.freebsd.org/changeset/base/291726 Log: rescue/rescue does not yet build in meta mode. Modified: head/targets/pseudo/userland/misc/Makefile.depend Modified: head/targets/pseudo/userland/misc/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/misc/Makefile.depend Thu Dec 3 22:39:42 2015 (r291725) +++ head/targets/pseudo/userland/misc/Makefile.depend Thu Dec 3 22:40:42 2015 (r291726) @@ -19,7 +19,6 @@ DIRDEPS = \ etc/newsyslog.conf.d \ etc/sendmail \ rescue/librescue \ - rescue/rescue \ .if ${MK_BOOT} != "no" DIRDEPS+= sys/boot/common From owner-svn-src-all@freebsd.org Thu Dec 3 22:55:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACF6EA40DAC; Thu, 3 Dec 2015 22:55:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7881B1164; Thu, 3 Dec 2015 22:55:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB3Mteqt072000; Thu, 3 Dec 2015 22:55:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB3MtefL071999; Thu, 3 Dec 2015 22:55:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201512032255.tB3MtefL071999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 3 Dec 2015 22:55:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291727 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Dec 2015 22:55:41 -0000 Author: mav Date: Thu Dec 3 22:55:40 2015 New Revision: 291727 URL: https://svnweb.freebsd.org/changeset/base/291727 Log: Enable interrupt handshake for 16Gig chips. We don't support MSI-X so far, so it is always required. Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Thu Dec 3 22:40:42 2015 (r291726) +++ head/sys/dev/isp/isp.c Thu Dec 3 22:55:40 2015 (r291727) @@ -2131,6 +2131,12 @@ isp_fibre_init_2400(ispsoftc_t *isp) break; } + if (IS_26XX(isp)) { + /* We don't support MSI-X yet, so set this unconditionally. */ + icbp->icb_fwoptions2 |= ICB2400_OPT2_ENA_IHR; + icbp->icb_fwoptions2 |= ICB2400_OPT2_ENA_IHA; + } + if ((icbp->icb_fwoptions3 & ICB2400_OPT3_RSPSZ_MASK) == 0) { icbp->icb_fwoptions3 |= ICB2400_OPT3_RSPSZ_24; } @@ -7613,6 +7619,8 @@ isp_setdfltfcparm(ispsoftc_t *isp, int c fcp->isp_wwnn_nvram = DEFAULT_NODEWWN(isp, chan); fcp->isp_wwpn_nvram = DEFAULT_PORTWWN(isp, chan); fcp->isp_fwoptions = 0; + fcp->isp_xfwoptions = 0; + fcp->isp_zfwoptions = 0; fcp->isp_lasthdl = NIL_HANDLE; if (IS_24XX(isp)) { From owner-svn-src-all@freebsd.org Fri Dec 4 00:05:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 819F2A3F087; Fri, 4 Dec 2015 00:05:03 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7681189; Fri, 4 Dec 2015 00:05:03 +0000 (UTC) (envelope-from benno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4052G9091890; Fri, 4 Dec 2015 00:05:02 GMT (envelope-from benno@FreeBSD.org) Received: (from benno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4052jm091889; Fri, 4 Dec 2015 00:05:02 GMT (envelope-from benno@FreeBSD.org) Message-Id: <201512040005.tB4052jm091889@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: benno set sender to benno@FreeBSD.org using -f From: Benno Rice Date: Fri, 4 Dec 2015 00:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291728 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 00:05:03 -0000 Author: benno Date: Fri Dec 4 00:05:02 2015 New Revision: 291728 URL: https://svnweb.freebsd.org/changeset/base/291728 Log: Tweak some unused field defines to have the correct number of zeroes. Reviewed by: jhb Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4365 Modified: head/sys/sys/buf.h Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Thu Dec 3 22:55:40 2015 (r291727) +++ head/sys/sys/buf.h Fri Dec 4 00:05:02 2015 (r291728) @@ -211,9 +211,9 @@ struct buf { #define B_NOCACHE 0x00008000 /* Do not cache block after use. */ #define B_MALLOC 0x00010000 /* malloced b_data */ #define B_CLUSTEROK 0x00020000 /* Pagein op, so swap() can count it. */ -#define B_000400000 0x00040000 /* Available flag. */ -#define B_000800000 0x00080000 /* Available flag. */ -#define B_001000000 0x00100000 /* Available flag. */ +#define B_00040000 0x00040000 /* Available flag. */ +#define B_00080000 0x00080000 /* Available flag. */ +#define B_00100000 0x00100000 /* Available flag. */ #define B_DIRTY 0x00200000 /* Needs writing later (in EXT2FS). */ #define B_RELBUF 0x00400000 /* Release VMIO buffer. */ #define B_FS_FLAG1 0x00800000 /* Available flag for FS use. */ From owner-svn-src-all@freebsd.org Fri Dec 4 00:29:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 40FB5A3F562; Fri, 4 Dec 2015 00:29:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03FD81B84; Fri, 4 Dec 2015 00:29:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB40Tf9Y097770; Fri, 4 Dec 2015 00:29:41 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB40TfK3097769; Fri, 4 Dec 2015 00:29:41 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040029.tB40TfK3097769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 00:29:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291729 - head/cddl/lib/drti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 00:29:42 -0000 Author: bdrewery Date: Fri Dec 4 00:29:40 2015 New Revision: 291729 URL: https://svnweb.freebsd.org/changeset/base/291729 Log: Simplify the LIBRARIES_ONLY hacks so that install: is not needed here. This uses the same pattern that I applied to the other cases of this in the csu directories. Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/lib/drti/Makefile Modified: head/cddl/lib/drti/Makefile ============================================================================== --- head/cddl/lib/drti/Makefile Fri Dec 4 00:05:02 2015 (r291728) +++ head/cddl/lib/drti/Makefile Fri Dec 4 00:29:40 2015 (r291729) @@ -9,8 +9,8 @@ FILESGRP= ${LIBGRP} FILESMODE= ${LIBMODE} FILESDIR= ${LIBDIR}/dtrace CLEANFILES= ${FILES} -LIB= drti-dummy -INTERNALLIB= +# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. +.undef LIBRARIES_ONLY CFLAGS+= -I${.CURDIR}/../../../sys/cddl/compat/opensolaris \ -I${.CURDIR}/../../../cddl/compat/opensolaris/include \ @@ -20,10 +20,4 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common \ -DPIC ${PICFLAG} -.if make(install) && defined(LIBRARIES_ONLY) -install: - ${INSTALL} -o ${FILESOWN} -g ${FILESGRP} -m ${FILESMODE} \ - ${FILES} ${DESTDIR}${FILESDIR} -.endif - .include From owner-svn-src-all@freebsd.org Fri Dec 4 01:28:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A31E7A36182; Fri, 4 Dec 2015 01:28:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 681D612B0; Fri, 4 Dec 2015 01:28:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB41SmKx014964; Fri, 4 Dec 2015 01:28:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB41SmhB014963; Fri, 4 Dec 2015 01:28:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201512040128.tB41SmhB014963@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 4 Dec 2015 01:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291730 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 01:28:49 -0000 Author: mav Date: Fri Dec 4 01:28:48 2015 New Revision: 291730 URL: https://svnweb.freebsd.org/changeset/base/291730 Log: Update isp_put_icb_2400() for new structure fields. Modified: head/sys/dev/isp/isp_library.c Modified: head/sys/dev/isp/isp_library.c ============================================================================== --- head/sys/dev/isp/isp_library.c Fri Dec 4 00:29:40 2015 (r291729) +++ head/sys/dev/isp/isp_library.c Fri Dec 4 01:28:48 2015 (r291730) @@ -1402,7 +1402,9 @@ isp_put_icb_2400(ispsoftc_t *isp, isp_ic for (i = 0; i < 4; i++) { ISP_IOXPUT_16(isp, src->icb_priaddr[i], &dst->icb_priaddr[i]); } - for (i = 0; i < 4; i++) { + ISP_IOXPUT_16(isp, src->icb_msixresp, &dst->icb_msixresp); + ISP_IOXPUT_16(isp, src->icb_msixatio, &dst->icb_msixatio); + for (i = 0; i < 2; i++) { ISP_IOXPUT_16(isp, src->icb_reserved1[i], &dst->icb_reserved1[i]); } ISP_IOXPUT_16(isp, src->icb_atio_in, &dst->icb_atio_in); @@ -1415,9 +1417,14 @@ isp_put_icb_2400(ispsoftc_t *isp, isp_ic ISP_IOXPUT_32(isp, src->icb_fwoptions1, &dst->icb_fwoptions1); ISP_IOXPUT_32(isp, src->icb_fwoptions2, &dst->icb_fwoptions2); ISP_IOXPUT_32(isp, src->icb_fwoptions3, &dst->icb_fwoptions3); - for (i = 0; i < 12; i++) { + ISP_IOXPUT_16(isp, src->icb_qos, &dst->icb_qos); + for (i = 0; i < 3; i++) ISP_IOXPUT_16(isp, src->icb_reserved2[i], &dst->icb_reserved2[i]); - } + for (i = 0; i < 3; i++) + ISP_IOXPUT_16(isp, src->icb_enodemac[i], &dst->icb_enodemac[i]); + ISP_IOXPUT_16(isp, src->icb_disctime, &dst->icb_disctime); + for (i = 0; i < 4; i++) + ISP_IOXPUT_16(isp, src->icb_reserved3[i], &dst->icb_reserved3[i]); } void From owner-svn-src-all@freebsd.org Fri Dec 4 03:17:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3BE68A40B77; Fri, 4 Dec 2015 03:17:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0EE119D1; Fri, 4 Dec 2015 03:17:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43H588047081; Fri, 4 Dec 2015 03:17:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43H500047080; Fri, 4 Dec 2015 03:17:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040317.tB43H500047080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 03:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291731 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:17:06 -0000 Author: bdrewery Date: Fri Dec 4 03:17:04 2015 New Revision: 291731 URL: https://svnweb.freebsd.org/changeset/base/291731 Log: DIRDEPS_BUILD: For the bootstrapped LIBADD from DPADD, resolve paths to RELDIR. This allows the LIBDEPS/DPADD for the clang build to not have ../../../lib/clang/* in DIRDEPS. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/local.dirdeps.mk Modified: head/share/mk/local.dirdeps.mk ============================================================================== --- head/share/mk/local.dirdeps.mk Fri Dec 4 01:28:48 2015 (r291730) +++ head/share/mk/local.dirdeps.mk Fri Dec 4 03:17:04 2015 (r291731) @@ -131,9 +131,11 @@ DIRDEPS+= usr.bin/yacc.host # BUILD_AT_LEVEL0, which we don't use). # This only works for DPADD with full OBJ/SRC paths, which is mostly just # _INTERNALLIBS. -DIRDEPS+= \ - ${DPADD:M${OBJTOP}*:H:C,${OBJTOP}[^/]*/,,:N.:O:u} \ +_DP_DIRDEPS+= \ + ${DPADD:M${OBJTOP}*:H:tA:C,${OBJTOP}[^/]*/,,:N.:O:u} \ ${DPADD:M${OBJROOT}*:N${OBJTOP}*:N${STAGE_ROOT}/*:H:S,${OBJROOT},,:C,^([^/]+)/(.*),\2.\1,:S,${HOST_TARGET}$,host,:N.*:O:u} +# Resolve the paths to RELDIRs +DIRDEPS+= ${_DP_DIRDEPS:C,^,${SRCTOP}/,:tA:C,^${SRCTOP}/,,} .endif .if !empty(LIBADD) # Also handle LIBADD for non-internal libraries. From owner-svn-src-all@freebsd.org Fri Dec 4 03:17:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27E9BA40B98; Fri, 4 Dec 2015 03:17:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E94651A0C; Fri, 4 Dec 2015 03:17:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43H8fB047126; Fri, 4 Dec 2015 03:17:08 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43H8oY047125; Fri, 4 Dec 2015 03:17:08 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040317.tB43H8oY047125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 03:17:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291732 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:17:09 -0000 Author: bdrewery Date: Fri Dec 4 03:17:07 2015 New Revision: 291732 URL: https://svnweb.freebsd.org/changeset/base/291732 Log: DIRDEPS_BUILD: Install new Makefile.depend files atomically. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/install-new.mk Modified: head/share/mk/install-new.mk ============================================================================== --- head/share/mk/install-new.mk Fri Dec 4 03:17:04 2015 (r291731) +++ head/share/mk/install-new.mk Fri Dec 4 03:17:07 2015 (r291732) @@ -32,9 +32,23 @@ CmpCp= CmpCp() { \ cp $$src $$target; \ fi; } +# Replace the file if they are different and make a backup if desired +CmpReplace= CmpReplace() { \ + src=$$1 target=$$2 _bak=$$3; \ + if ! test -s $$target || ! cmp -s $$target $$src; then \ + trap "" 1 2 3 15; \ + if test -s $$target; then \ + if test "x$$_bak" != x; then \ + rm -f $$target$$_bak; \ + cp -f $$target $$target$$_bak; \ + fi; \ + fi; \ + mv -f $$src $$target; \ + fi; } + # If the .new file is different, we want it. # Note: this function will work as is for *.new$RANDOM" -InstallNew= ${CmpCp}; InstallNew() { \ +InstallNew= ${CmpReplace}; InstallNew() { \ _t=-e; _bak=; \ while :; do \ case "$$1" in \ @@ -46,7 +60,7 @@ InstallNew= ${CmpCp}; InstallNew() { \ for new in "$$@"; do \ if test $$_t $$new; then \ target=`expr $$new : '\(.*\).new'`; \ - CmpCp $$new $$target $$_bak; \ + CmpReplace $$new $$target $$_bak; \ fi; \ rm -f $$new; \ done; :; } From owner-svn-src-all@freebsd.org Fri Dec 4 03:17:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26977A40BBB; Fri, 4 Dec 2015 03:17:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4FC31A90; Fri, 4 Dec 2015 03:17:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43HASK047173; Fri, 4 Dec 2015 03:17:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43HAk5047172; Fri, 4 Dec 2015 03:17:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040317.tB43HAk5047172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 03:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291733 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:17:12 -0000 Author: bdrewery Date: Fri Dec 4 03:17:10 2015 New Revision: 291733 URL: https://svnweb.freebsd.org/changeset/base/291733 Log: Don't create a Makefile.depend in share/mk. This would cause it to be included everywhere in the build since it is the MAKESYSPATH. This leads to including dirdeps.mk more times than desired. Sponsored by: EMC / Isilon Storage Division Deleted: head/share/mk/Makefile.depend Modified: head/share/mk/Makefile Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Fri Dec 4 03:17:07 2015 (r291732) +++ head/share/mk/Makefile Fri Dec 4 03:17:10 2015 (r291733) @@ -6,6 +6,11 @@ # will read this Makefile since it auto includes it into -I. .if ${.CURDIR} == ${.PARSEDIR} +# Avoid creating a Makefile.depend here as it would get included anywhere +# in the build, similar to the problem above. It would cause dirdeps.mk +# to be included more times than desired. +UPDATE_DEPENDFILE= no + .include FILES= \ From owner-svn-src-all@freebsd.org Fri Dec 4 03:17:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB40CA40BDF; Fri, 4 Dec 2015 03:17:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64C3F1BAE; Fri, 4 Dec 2015 03:17:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43HEZM047221; Fri, 4 Dec 2015 03:17:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43HE2d047218; Fri, 4 Dec 2015 03:17:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040317.tB43HE2d047218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 03:17:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291734 - in head: include lib/libc++ share/termcap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:17:16 -0000 Author: bdrewery Date: Fri Dec 4 03:17:14 2015 New Revision: 291734 URL: https://svnweb.freebsd.org/changeset/base/291734 Log: Replace ln -s calls with INSTALL_SYMLINK Sponsored by: EMC / Isilon Storage Division Modified: head/include/Makefile head/lib/libc++/Makefile head/share/termcap/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Fri Dec 4 03:17:10 2015 (r291733) +++ head/include/Makefile Fri Dec 4 03:17:14 2015 (r291734) @@ -260,81 +260,81 @@ symlinks: .for i in ${LDIRS} cd ${.CURDIR}/../sys/$i; \ for h in *.h; do \ - ln -fs ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ + ${INSTALL_SYMLINK} ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ done .endfor .for i in ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/bktr:Ndev/nand:Ndev/pci} cd ${.CURDIR}/../sys/$i; \ for h in *.h; do \ - ln -fs ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ + ${INSTALL_SYMLINK} ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ done .endfor cd ${.CURDIR}/../sys/dev/acpica; \ for h in acpiio.h acpi_hpet.h; do \ - ln -fs ../../../../sys/dev/acpica/$$h \ + ${INSTALL_SYMLINK} ../../../../sys/dev/acpica/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/acpica; \ done cd ${.CURDIR}/../sys/dev/agp; \ for h in agpreg.h; do \ - ln -fs ../../../../sys/dev/agp/$$h \ + ${INSTALL_SYMLINK} ../../../../sys/dev/agp/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/agp; \ done cd ${.CURDIR}/../sys/dev/bktr; \ for h in ioctl_*.h; do \ - ln -fs ../../../../sys/dev/bktr/$$h \ + ${INSTALL_SYMLINK} ../../../../sys/dev/bktr/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/bktr; \ done .if ${MK_NAND} != "no" cd ${.CURDIR}/../sys/dev/nand; \ for h in nandsim.h nand_dev.h; do \ - ln -fs ../../../../sys/dev/nand/$$h \ + ${INSTALL_SYMLINK} ../../../../sys/dev/nand/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/nand; \ done .endif cd ${.CURDIR}/../sys/dev/pci; \ for h in pcireg.h; do \ - ln -fs ../../../../sys/dev/pci/$$h \ + ${INSTALL_SYMLINK} ../../../../sys/dev/pci/$$h \ ${DESTDIR}${INCLUDEDIR}/dev/pci; \ done .for i in ${LSUBSUBDIRS} cd ${.CURDIR}/../sys/$i; \ for h in *.h; do \ - ln -fs ../../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ + ${INSTALL_SYMLINK} ../../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ done .endfor .if ${MK_IPFILTER} != "no" cd ${.CURDIR}/../sys/contrib/ipfilter/netinet; \ for h in *.h; do \ - ln -fs ../../../sys/contrib/ipfilter/netinet/$$h \ + ${INSTALL_SYMLINK} ../../../sys/contrib/ipfilter/netinet/$$h \ ${DESTDIR}${INCLUDEDIR}/netinet; \ done .endif .if ${MK_PF} != "no" cd ${.CURDIR}/../sys/netpfil/pf; \ for h in *.h; do \ - ln -fs ../../../../sys/netpfil/pf/$$h \ + ${INSTALL_SYMLINK} ../../../../sys/netpfil/pf/$$h \ ${DESTDIR}${INCLUDEDIR}/netpfil/pf; \ done .endif cd ${.CURDIR}/../sys/crypto; \ for h in rijndael/rijndael.h; do \ - ln -fs ../../../sys/crypto/$$h \ + ${INSTALL_SYMLINK} ../../../sys/crypto/$$h \ ${DESTDIR}${INCLUDEDIR}/crypto; \ done cd ${.CURDIR}/../sys/opencrypto; \ for h in *.h; do \ - ln -fs ../../../sys/opencrypto/$$h \ + ${INSTALL_SYMLINK} ../../../sys/opencrypto/$$h \ ${DESTDIR}${INCLUDEDIR}/crypto; \ done cd ${.CURDIR}/../sys/${MACHINE}/include; \ for h in *.h; do \ - ln -fs ../../../sys/${MACHINE}/include/$$h \ + ${INSTALL_SYMLINK} ../../../sys/${MACHINE}/include/$$h \ ${DESTDIR}${INCLUDEDIR}/machine; \ done .if exists(${.CURDIR}/../sys/${MACHINE}/include/pc) cd ${.CURDIR}/../sys/${MACHINE}/include/pc; \ for h in *.h; do \ - ln -fs ../../../../sys/${MACHINE}/include/pc/$$h \ + ${INSTALL_SYMLINK} ../../../../sys/${MACHINE}/include/pc/$$h \ ${DESTDIR}${INCLUDEDIR}/machine/pc; \ done .endif @@ -344,7 +344,7 @@ symlinks: ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ cd ${.CURDIR}/../sys/${_MARCH}/include; \ for h in *.h; do \ - ln -fs ../../../sys/${_MARCH}/include/$$h \ + ${INSTALL_SYMLINK} ../../../sys/${_MARCH}/include/$$h \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ done .if exists(${.CURDIR}/../sys/${_MARCH}/include/pc) @@ -352,7 +352,7 @@ symlinks: ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ cd ${.CURDIR}/../sys/${_MARCH}/include/pc; \ for h in *.h; do \ - ln -fs ../../../../sys/${_MARCH}/include/pc/$$h \ + ${INSTALL_SYMLINK} ../../../../sys/${_MARCH}/include/pc/$$h \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ done .endif @@ -360,12 +360,12 @@ symlinks: .endfor cd ${.CURDIR}/../sys/fs/cd9660; \ for h in *.h; do \ - ln -fs ../../../../sys/fs/cd9660/$$h \ + ${INSTALL_SYMLINK} ../../../../sys/fs/cd9660/$$h \ ${DESTDIR}${INCLUDEDIR}/isofs/cd9660; \ done cd ${.CURDIR}/../sys/rpc; \ for h in types.h; do \ - ln -fs ../../../sys/rpc/$$h \ + ${INSTALL_SYMLINK} ../../../sys/rpc/$$h \ ${DESTDIR}${INCLUDEDIR}/rpc; \ done .if ${MK_DIRDEPS_BUILD} == "yes" Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Fri Dec 4 03:17:10 2015 (r291733) +++ head/lib/libc++/Makefile Fri Dec 4 03:17:14 2015 (r291734) @@ -206,9 +206,9 @@ EXTDIR= ${CXXINCLUDEDIR}/ext CLEANFILES+= libstdc++.so libstdc++.a afterinstall: - ln -sf ${DESTDIR}${LIBDIR}/lib${LIB}.so \ + ${INSTALL_SYMLINK} ${DESTDIR}${LIBDIR}/lib${LIB}.so \ ${.OBJDIR}/libstdc++.so - ln -sf ${DESTDIR}${LIBDIR}/lib${LIB}.a \ + ${INSTALL_SYMLINK} ${DESTDIR}${LIBDIR}/lib${LIB}.a \ ${.OBJDIR}/libstdc++.a .endif Modified: head/share/termcap/Makefile ============================================================================== --- head/share/termcap/Makefile Fri Dec 4 03:17:10 2015 (r291733) +++ head/share/termcap/Makefile Fri Dec 4 03:17:14 2015 (r291734) @@ -24,6 +24,6 @@ termcap.db: termcap cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC} etc-termcap: - ln -fs ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap + ${INSTALL_SYMLINK} ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap .include From owner-svn-src-all@freebsd.org Fri Dec 4 03:17:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BF77A40C04; Fri, 4 Dec 2015 03:17:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 479891CD1; Fri, 4 Dec 2015 03:17:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43HIw2047269; Fri, 4 Dec 2015 03:17:18 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43HIDM047266; Fri, 4 Dec 2015 03:17:18 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040317.tB43HIDM047266@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 03:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291735 - in head: sbin/ipf/libipf share/mk usr.sbin/fifolog/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:17:19 -0000 Author: bdrewery Date: Fri Dec 4 03:17:17 2015 New Revision: 291735 URL: https://svnweb.freebsd.org/changeset/base/291735 Log: For INTERNALLIB always add in the corresponding _DP_ and use LIBADD in the real build file. This lessens the need to define DPADD_ and LDADD_ to just very special cases. Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/ipf/libipf/Makefile head/share/mk/src.libnames.mk head/usr.sbin/fifolog/lib/Makefile Modified: head/sbin/ipf/libipf/Makefile ============================================================================== --- head/sbin/ipf/libipf/Makefile Fri Dec 4 03:17:14 2015 (r291734) +++ head/sbin/ipf/libipf/Makefile Fri Dec 4 03:17:17 2015 (r291735) @@ -43,4 +43,6 @@ SRCS= addicmp.c addipopt.c alist_free.c tcp_flags.c tcpflags.c tcpoptnames.c v6ionames.c v6optvalue.c \ var.c verbose.c +LIBADD= kvm + .include Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Fri Dec 4 03:17:14 2015 (r291734) +++ head/share/mk/src.libnames.mk Fri Dec 4 03:17:17 2015 (r291735) @@ -271,6 +271,8 @@ _DP_panelw= ncursesw _DP_rpcsec_gss= gssapi _DP_smb= kiconv _DP_ulog= md +_DP_fifolog= z +_DP_ipf= kvm # Define special cases LDADD_supcplusplus= -lsupc++ @@ -293,7 +295,9 @@ LDADD_${_l}?= -lprivate${_l} .else LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l} .endif -.if defined(_DP_${_l}) && defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO") +# Add in all dependencies for static linkage. +.if defined(_DP_${_l}) && (${_INTERNALLIBS:M${_l}} || \ + (defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO"))) .for _d in ${_DP_${_l}} DPADD_${_l}+= ${DPADD_${_d}} LDADD_${_l}+= ${LDADD_${_d}} @@ -302,23 +306,17 @@ LDADD_${_l}+= ${LDADD_${_d}} .endfor # These are special cases where the library is broken and anything that uses -# it needs to add more dependencies. Many _INTERNALLIBS fall into this -# category. Unless the library itself is broken then the proper place to -# define dependencies is _DP_* above. +# it needs to add more dependencies. Broken usually means that it has a +# cyclic dependency and cannot link its own dependencies. This is bad, please +# fix the library instead. +# Unless the library itself is broken then the proper place to define +# dependencies is _DP_* above. # libatf-c++ exposes libatf-c abi hence we need to explicit link to atf_c for # atf_cxx DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} -# _INTERNALLIBS. -# XXX: This should likely be reworked to have LIBADD in them and use normal -# _DP_ lists just to avoid temptation to add more similar entries here. -DPADD_fifolog+= ${DPADD_z} -LDADD_fifolog+= ${LDADD_z} -DPADD_ipf+= ${DPADD_kvm} -LDADD_ipf+= ${LDADD_kvm} - .for _l in ${LIBADD} DPADD+= ${DPADD_${_l}:Umissing-dpadd_${_l}} LDADD+= ${LDADD_${_l}} Modified: head/usr.sbin/fifolog/lib/Makefile ============================================================================== --- head/usr.sbin/fifolog/lib/Makefile Fri Dec 4 03:17:14 2015 (r291734) +++ head/usr.sbin/fifolog/lib/Makefile Fri Dec 4 03:17:17 2015 (r291735) @@ -7,6 +7,7 @@ SRCS= fifolog_int.c fifolog_create.c fif SRCS+= getdate.y CFLAGS+= -I${.CURDIR} +LIBADD= z NO_WMISSING_VARIABLE_DECLARATIONS= From owner-svn-src-all@freebsd.org Fri Dec 4 03:17:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 615CEA40C39; Fri, 4 Dec 2015 03:17:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 276441DAA; Fri, 4 Dec 2015 03:17:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43HLiT047316; Fri, 4 Dec 2015 03:17:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43HLqD047315; Fri, 4 Dec 2015 03:17:21 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040317.tB43HLqD047315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 03:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291736 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:17:22 -0000 Author: bdrewery Date: Fri Dec 4 03:17:21 2015 New Revision: 291736 URL: https://svnweb.freebsd.org/changeset/base/291736 Log: Support all of the CDDL/ZFS libraries for LIBADD. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Fri Dec 4 03:17:17 2015 (r291735) +++ head/share/mk/src.libnames.mk Fri Dec 4 03:17:21 2015 (r291736) @@ -121,6 +121,7 @@ _LIBRARIES= \ netgraph \ ngatm \ nv \ + nvpair \ opie \ pam \ panel \ @@ -152,16 +153,22 @@ _LIBRARIES= \ ufs \ ugidfw \ ulog \ + umem \ usb \ usbhid \ util \ + uutil \ vmmapi \ wind \ wrap \ xo \ y \ ypclnt \ - z + z \ + zfs_core \ + zfs \ + zpool \ + # Each library's LIBADD needs to be duplicated here for static linkage of # 2nd+ order consumers. Auto-generating this would be better. @@ -273,6 +280,10 @@ _DP_smb= kiconv _DP_ulog= md _DP_fifolog= z _DP_ipf= kvm +_DP_zfs= md pthread umem util uutil m nvpair avl bsdxml geom nvpair z \ + zfs_core +_DP_zfs_core= nvpair +_DP_zpool= md pthread z nvpair avl umem # Define special cases LDADD_supcplusplus= -lsupc++ From owner-svn-src-all@freebsd.org Fri Dec 4 03:17:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9133BA40C69; Fri, 4 Dec 2015 03:17:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40C541E85; Fri, 4 Dec 2015 03:17:25 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43HOA2047361; Fri, 4 Dec 2015 03:17:24 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43HOUJ047360; Fri, 4 Dec 2015 03:17:24 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040317.tB43HOUJ047360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 03:17:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291737 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:17:25 -0000 Author: bdrewery Date: Fri Dec 4 03:17:24 2015 New Revision: 291737 URL: https://svnweb.freebsd.org/changeset/base/291737 Log: Rework unknown LIBADD assertion to be more clear and to not suggest adding DPADD/LDADD_ variables that are a special case. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Fri Dec 4 03:17:21 2015 (r291736) +++ head/share/mk/src.libnames.mk Fri Dec 4 03:17:24 2015 (r291737) @@ -329,14 +329,10 @@ DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} .for _l in ${LIBADD} -DPADD+= ${DPADD_${_l}:Umissing-dpadd_${_l}} +DPADD+= ${DPADD_${_l}} LDADD+= ${LDADD_${_l}} .endfor -.if defined(DPADD) && ${DPADD:Mmissing-dpadd_*} -.error ${.CURDIR}: Missing ${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/DPADD_/} variable add "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//}" to _LIBRARIES, _INTERNALLIBS, or _PRIVATELIBS and define "${DPADD:Mmissing-dpadd_*:S/missing-dpadd_//:S/^/LIB/:tu}". -.endif - # INTERNALLIB definitions. LIBELFTCDIR= ${OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc.a @@ -463,6 +459,16 @@ LIBLNDIR= ${OBJTOP}/usr.bin/lex/lib LIB${lib:tu}DIR?= ${OBJTOP}/lib/lib${lib} .endfor +# Validate that listed LIBADD are valid. +.for _l in ${LIBADD} +.if empty(_LIBRARIES:M${_l}) +_BADLIBADD+= ${_l} +.endif +.endfor +.if !empty(_BADLIBADD) +.error ${.CURDIR}: Invalid LIBADD used which may need to be added to ${_this:T}: ${_BADLIBADD} +.endif + # Sanity check that libraries are defined here properly when building them. .if defined(LIB) && ${_LIBRARIES:M${LIB}} != "" .if !empty(LIBADD) && \ From owner-svn-src-all@freebsd.org Fri Dec 4 03:17:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 937C1A40D23; Fri, 4 Dec 2015 03:17:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3080613D1; Fri, 4 Dec 2015 03:17:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43HtB9047493; Fri, 4 Dec 2015 03:17:55 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43Hlvu047414; Fri, 4 Dec 2015 03:17:47 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040317.tB43Hlvu047414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 03:17:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291738 - in head: cddl/lib/libctf cddl/lib/libzfs cddl/lib/libzfs_core cddl/lib/libzpool cddl/sbin/zfs cddl/sbin/zpool cddl/usr.bin/zinject cddl/usr.bin/zstreamdump cddl/usr.bin/ztest ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:17:56 -0000 Author: bdrewery Date: Fri Dec 4 03:17:47 2015 New Revision: 291738 URL: https://svnweb.freebsd.org/changeset/base/291738 Log: Fix LDADD/DPADD that should be LIBADD. Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/lib/libctf/Makefile head/cddl/lib/libzfs/Makefile head/cddl/lib/libzfs_core/Makefile head/cddl/lib/libzpool/Makefile head/cddl/sbin/zfs/Makefile head/cddl/sbin/zpool/Makefile head/cddl/usr.bin/zinject/Makefile head/cddl/usr.bin/zstreamdump/Makefile head/cddl/usr.bin/ztest/Makefile head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile head/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh head/cddl/usr.sbin/zdb/Makefile head/cddl/usr.sbin/zhack/Makefile head/contrib/ofed/usr.bin/osmtest/Makefile head/gnu/usr.bin/gdb/kgdb/Makefile head/gnu/usr.bin/groff/src/devices/grodvi/Makefile head/gnu/usr.bin/groff/src/devices/grohtml/Makefile head/gnu/usr.bin/groff/src/devices/grolbp/Makefile head/gnu/usr.bin/groff/src/devices/grolj4/Makefile head/gnu/usr.bin/groff/src/devices/grops/Makefile head/gnu/usr.bin/groff/src/devices/grotty/Makefile head/gnu/usr.bin/groff/src/preproc/grn/Makefile head/gnu/usr.bin/groff/src/preproc/pic/Makefile head/gnu/usr.bin/groff/src/preproc/refer/Makefile head/gnu/usr.bin/groff/src/preproc/tbl/Makefile head/gnu/usr.bin/groff/src/roff/groff/Makefile head/gnu/usr.bin/groff/src/roff/troff/Makefile head/gnu/usr.bin/groff/src/utils/hpftodit/Makefile head/gnu/usr.bin/groff/src/utils/indxbib/Makefile head/gnu/usr.bin/groff/src/utils/lkbib/Makefile head/gnu/usr.bin/groff/src/utils/lookbib/Makefile head/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile head/lib/libc/tests/gen/Makefile head/lib/libc/tests/hash/Makefile head/lib/libc/tests/net/Makefile head/lib/libc/tests/regex/Makefile head/lib/libc/tests/rpc/Makefile head/lib/libc/tests/setjmp/Makefile head/lib/libc/tests/ssp/Makefile head/lib/libc/tests/stdio/Makefile head/lib/libc/tests/stdlib/Makefile head/lib/libc/tests/string/Makefile head/lib/libc/tests/sys/Makefile head/lib/libc/tests/tls/Makefile head/lib/libc/tests/ttyio/Makefile head/lib/libproc/tests/Makefile head/lib/libthr/tests/Makefile head/lib/libthr/tests/dlopen/Makefile head/lib/libthr/tests/dlopen/dso/Makefile head/libexec/rtld-elf/tests/libpythagoras/Makefile head/sbin/dhclient/tests/Makefile head/share/mk/netbsd-tests.test.mk head/sys/dev/aic7xxx/aicasm/Makefile head/sys/dev/patm/genrtab/Makefile head/tests/sys/aio/Makefile head/tests/sys/file/Makefile head/tests/sys/kern/Makefile head/tests/sys/mqueue/Makefile head/tools/diag/dumpvfscache/Makefile head/tools/regression/gaithrstress/Makefile head/tools/regression/geom/ConfCmp/Makefile head/tools/regression/geom/MdLoad/Makefile head/tools/regression/kgssapi/Makefile head/tools/regression/lib/libc/resolv/Makefile head/tools/regression/mac/mac_bsdextended/Makefile head/tools/regression/posixsem/Makefile head/tools/regression/priv/Makefile head/tools/regression/pthread/cv_cancel1/Makefile head/tools/regression/pthread/mutex_isowned_np/Makefile head/tools/regression/rpcsec_gss/Makefile head/tools/regression/sockets/sendfile/Makefile head/tools/regression/tls/ttls2/Makefile head/tools/regression/tls/ttls4/Makefile head/tools/tools/ath/athratestats/Makefile head/tools/tools/atsectl/Makefile head/tools/tools/ether_reflect/Makefile head/tools/tools/ifpifa/Makefile head/tools/tools/mctest/Makefile head/tools/tools/ncpus/Makefile head/tools/tools/net80211/stumbler/Makefile head/tools/tools/net80211/wesside/dics/Makefile head/tools/tools/net80211/wesside/udps/Makefile head/tools/tools/net80211/wesside/wesside/Makefile head/tools/tools/netrate/http/Makefile head/tools/tools/netrate/httpd/Makefile head/tools/tools/netrate/juggle/Makefile head/tools/tools/tscdrift/Makefile head/tools/tools/umastat/Makefile head/tools/tools/usbtest/Makefile head/tools/tools/vimage/Makefile head/tools/tools/zfsboottest/Makefile head/usr.bin/caesar/Makefile head/usr.bin/clang/clang.prog.mk head/usr.bin/clang/clang/Makefile head/usr.bin/clang/llc/Makefile head/usr.bin/clang/lli/Makefile head/usr.bin/clang/llvm-ar/Makefile head/usr.bin/clang/llvm-cxxdump/Makefile head/usr.bin/clang/llvm-dwarfdump/Makefile head/usr.bin/clang/llvm-lto/Makefile head/usr.bin/clang/llvm-mc/Makefile head/usr.bin/clang/llvm-nm/Makefile head/usr.bin/clang/llvm-objdump/Makefile head/usr.bin/clang/llvm-pdbdump/Makefile head/usr.bin/clang/llvm-rtdyld/Makefile head/usr.bin/clang/llvm-symbolizer/Makefile head/usr.bin/clang/opt/Makefile head/usr.bin/factor/Makefile head/usr.bin/grdc/Makefile head/usr.bin/pom/Makefile head/usr.bin/primes/Makefile head/usr.sbin/fstyp/Makefile Modified: head/cddl/lib/libctf/Makefile ============================================================================== --- head/cddl/lib/libctf/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/lib/libctf/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -28,8 +28,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ -I${OPENSOLARIS_USR_DISTDIR}/lib/libctf/common \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common -DPADD= ${LIBZ} -LDADD= -lz +LIBADD+= z .include - Modified: head/cddl/lib/libzfs/Makefile ============================================================================== --- head/cddl/lib/libzfs/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/lib/libzfs/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -6,13 +6,7 @@ .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common LIB= zfs -DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBUMEM} ${LIBUTIL} ${LIBM} ${LIBNVPAIR} \ - ${LIBAVL} ${LIBZFS_CORE} ${LIBUUTIL} ${LIBBSDXML} ${LIBGEOM} \ - ${LIBNVPAIR} ${LIBZ} - -LDADD= -lmd -lpthread -lumem -lutil -luutil -lm -lnvpair -lavl \ - -lbsdxml -lgeom -lnvpair -lz -lzfs_core - +LIBADD= md pthread umem util uutil m avl bsdxml geom nvpair z zfs_core SRCS= deviceid.c \ fsshare.c \ mkdirp.c \ Modified: head/cddl/lib/libzfs_core/Makefile ============================================================================== --- head/cddl/lib/libzfs_core/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/lib/libzfs_core/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -7,8 +7,7 @@ .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzfs/common LIB= zfs_core -DPADD= ${LIBNVPAIR} -LDADD= -lnvpair +LIBADD= nvpair SRCS= libzfs_core.c \ libzfs_core_compat.c \ Modified: head/cddl/lib/libzpool/Makefile ============================================================================== --- head/cddl/lib/libzpool/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/lib/libzpool/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -56,9 +56,7 @@ CFLAGS+= -I${.CURDIR}/../../../lib/libpt CFLAGS+= -I${.CURDIR}/../../../lib/libpthread/sys CFLAGS+= -I${.CURDIR}/../../../lib/libthr/arch/${MACHINE_CPUARCH}/include -DPADD= ${LIBMD} ${LIBPTHREAD} ${LIBZ} ${LIBNVPAIR} \ - ${LIBAVL} ${LIBUMEM} -LDADD= -lmd -lpthread -lz -lnvpair -lavl -lumem +LIBADD= md pthread z nvpair avl umem # atomic.S doesn't like profiling. MK_PROFILE= no Modified: head/cddl/sbin/zfs/Makefile ============================================================================== --- head/cddl/sbin/zfs/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/sbin/zfs/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -22,8 +22,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/uts/common/sys CFLAGS+= -I${.CURDIR}/../../../sys/cddl/contrib/opensolaris/common/zfs -DPADD= ${LIBGEOM} ${LIBJAIL} ${LIBNVPAIR} ${LIBUMEM} \ - ${LIBUTIL} ${LIBUUTIL} ${LIBZFS_CORE} ${LIBZFS} -LDADD= -lgeom -ljail -lnvpair -lumem -lutil -luutil -lzfs_core -lzfs +LIBADD= geom jail nvpair umem util uutil zfs_core zfs .include Modified: head/cddl/sbin/zpool/Makefile ============================================================================== --- head/cddl/sbin/zpool/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/sbin/zpool/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -27,8 +27,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/lib/libzpool/common CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/cmd/stat/common -DPADD= ${LIBAVL} ${LIBGEOM} ${LIBNVPAIR} \ - ${LIBUMEM} ${LIBUTIL} ${LIBUUTIL} ${LIBZFS_CORE} ${LIBZFS} -LDADD= -lavl -lgeom -lnvpair -lumem -lutil -luutil -lzfs_core -lzfs +LIBADD= avl geom nvpair umem util uutil zfs_core zfs .include Modified: head/cddl/usr.bin/zinject/Makefile ============================================================================== --- head/cddl/usr.bin/zinject/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/usr.bin/zinject/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -21,8 +21,6 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../lib/libumem -DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBUUTIL} \ - ${LIBZFS_CORE} ${LIBZFS} ${LIBZPOOL} -LDADD= -lgeom -lm -lnvpair -lumem -luutil -lzfs_core -lzfs -lzpool +LIBADD= geom m nvpair umem uutil zfs_core zfs zpool .include Modified: head/cddl/usr.bin/zstreamdump/Makefile ============================================================================== --- head/cddl/usr.bin/zstreamdump/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/usr.bin/zstreamdump/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -18,9 +18,7 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../lib/libumem -DPADD= ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \ - ${LIBPTHREAD} ${LIBZ} ${LIBAVL} -LDADD= -lm -lnvpair -lumem -lzpool -lpthread -lz -lavl +LIBADD= m nvpair umem zpool pthread z avl CSTD= c99 Modified: head/cddl/usr.bin/ztest/Makefile ============================================================================== --- head/cddl/usr.bin/ztest/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/usr.bin/ztest/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -18,10 +18,7 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../lib/libumem -DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBUMEM} ${LIBZPOOL} \ - ${LIBPTHREAD} ${LIBAVL} ${LIBZFS_CORE} ${LIBZFS} ${LIBUUTIL} -LDADD= -lgeom -lm -lnvpair -lumem -lzpool -lpthread -lavl -lzfs_core -lzfs \ - -luutil +LIBADD= geom m nvpair umem zpool pthread avl zfs_core zfs uutil CSTD= c99 Modified: head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/usr.sbin/dtrace/tests/common/proc/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -24,7 +24,6 @@ CFILES= \ tst.sigwait.c \ -LDADD.tst.sigwait.exe+= -lrt -DPADD.tst.sigwait.exe+= ${LIBRT} +LIBADD.tst.sigwait.exe=rt .include "../../dtrace.test.mk" Modified: head/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/usr.sbin/dtrace/tests/tools/genmakefiles.sh Fri Dec 4 03:17:47 2015 (r291738) @@ -36,8 +36,7 @@ genmakefile() local special if [ "$basedir" = proc ]; then special=" -LDADD.tst.sigwait.exe+= -lrt -DPADD.tst.sigwait.exe+= \${LIBRT} +LIBADD.tst.sigwait.exe+= rt " elif [ "$basedir" = uctf ]; then special=" Modified: head/cddl/usr.sbin/zdb/Makefile ============================================================================== --- head/cddl/usr.sbin/zdb/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/usr.sbin/zdb/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -24,9 +24,7 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../lib/libumem -DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \ - ${LIBUUTIL} ${LIBZFS_CORE} ${LIBZFS} ${LIBZPOOL} -LDADD= -lgeom -lm -lnvpair -lpthread -lumem -luutil -lzfs_core -lzfs -lzpool +LIBADD= geom m nvpair pthread umem uutil zfs_core zfs zpool # Since there are many asserts in this program, it makes no sense to compile # it without debugging. Modified: head/cddl/usr.sbin/zhack/Makefile ============================================================================== --- head/cddl/usr.sbin/zhack/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/cddl/usr.sbin/zhack/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -23,9 +23,7 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/head CFLAGS+= -I${.CURDIR}/../../lib/libumem -DPADD= ${LIBGEOM} ${LIBM} ${LIBNVPAIR} ${LIBPTHREAD} ${LIBUMEM} \ - ${LIBUUTIL} ${LIBZFS_CORE} ${LIBZFS} ${LIBZPOOL} -LDADD= -lgeom -lm -lnvpair -lpthread -lumem -luutil -lzfs_core -lzfs -lzpool +LIBADD= geom m nvpair pthread umem uutil zfs_core zfs zpool CFLAGS+= -DDEBUG=1 #DEBUG_FLAGS+= -g Modified: head/contrib/ofed/usr.bin/osmtest/Makefile ============================================================================== --- head/contrib/ofed/usr.bin/osmtest/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/contrib/ofed/usr.bin/osmtest/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -22,7 +22,8 @@ LDADD= -libcommon \ -losmvendor \ -losmcomp \ -lopensm \ - -lpthread + +LIBADD+= pthread CFLAGS= -DVENDOR_RMPP_SUPPORT -DDUAL_SIDED_RMPP \ -I${OPENSM}/osmtest/include Modified: head/gnu/usr.bin/gdb/kgdb/Makefile ============================================================================== --- head/gnu/usr.bin/gdb/kgdb/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/gdb/kgdb/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -8,8 +8,8 @@ BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_ ${OBJ_BU}/libiberty/libiberty.a GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a -DPADD= ${GDBLIBS} ${BULIBS} ${LIBKVM} -LDADD= ${GDBLIBS} ${BULIBS} -lkvm -LIBADD+= m readline ncursesw gnuregex +DPADD= ${GDBLIBS} ${BULIBS} +LDADD= ${GDBLIBS} ${BULIBS} +LIBADD+= m readline ncursesw gnuregex kvm .include Modified: head/gnu/usr.bin/groff/src/devices/grodvi/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/devices/grodvi/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/devices/grodvi/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= grodvi SRCS= dvi.cpp -DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} -LDADD= ${LIBDRIVER} ${LIBGROFF} -lm +DPADD= ${LIBDRIVER} ${LIBGROFF} +LDADD= ${LIBDRIVER} ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} .include Modified: head/gnu/usr.bin/groff/src/devices/grohtml/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/devices/grohtml/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/devices/grohtml/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= post-grohtml SRCS= post-html.cpp html-table.cpp html-text.cpp output.cpp -DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} -LDADD= ${LIBDRIVER} ${LIBGROFF} -lm +DPADD= ${LIBDRIVER} ${LIBGROFF} +LDADD= ${LIBDRIVER} ${LIBGROFF} +LIBADD= m MAN= .include Modified: head/gnu/usr.bin/groff/src/devices/grolbp/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/devices/grolbp/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/devices/grolbp/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= grolbp SRCS= lbp.cpp -DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} -LDADD= ${LIBDRIVER} ${LIBGROFF} -lm +DPADD= ${LIBDRIVER} ${LIBGROFF} +LDADD= ${LIBDRIVER} ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} .include Modified: head/gnu/usr.bin/groff/src/devices/grolj4/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/devices/grolj4/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/devices/grolj4/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -3,8 +3,9 @@ PROG_CXX= grolj4 MAN= grolj4.1 lj4_font.5 SRCS= lj4.cpp -DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} -LDADD= ${LIBDRIVER} ${LIBGROFF} -lm +DPADD= ${LIBDRIVER} ${LIBGROFF} +LDADD= ${LIBDRIVER} ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} .include Modified: head/gnu/usr.bin/groff/src/devices/grops/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/devices/grops/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/devices/grops/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= grops SRCS= ps.cpp psrm.cpp -DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} -LDADD= ${LIBDRIVER} ${LIBGROFF} -lm +DPADD= ${LIBDRIVER} ${LIBGROFF} +LDADD= ${LIBDRIVER} ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} .include Modified: head/gnu/usr.bin/groff/src/devices/grotty/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/devices/grotty/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/devices/grotty/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= grotty SRCS= tty.cpp -DPADD= ${LIBDRIVER} ${LIBGROFF} ${LIBM} -LDADD= ${LIBDRIVER} ${LIBGROFF} -lm +DPADD= ${LIBDRIVER} ${LIBGROFF} +LDADD= ${LIBDRIVER} ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} .include Modified: head/gnu/usr.bin/groff/src/preproc/grn/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/preproc/grn/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/preproc/grn/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= grn SRCS= hdb.cpp hpoint.cpp hgraph.cpp main.cpp -DPADD= ${LIBGROFF} ${LIBM} -LDADD= ${LIBGROFF} -lm +DPADD= ${LIBGROFF} +LDADD= ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} .include Modified: head/gnu/usr.bin/groff/src/preproc/pic/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/preproc/pic/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/preproc/pic/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -4,8 +4,9 @@ PROG_CXX= pic SRCS= lex.cpp main.cpp object.cpp pic.cpp pic_tab.h \ common.cpp troff.cpp tex.cpp CFLAGS+= -I${DIST_DIR} -I. -DPADD= ${LIBGROFF} ${LIBM} -LDADD= ${LIBGROFF} -lm +DPADD= ${LIBGROFF} +LDADD= ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} pic.cpp pic_tab.h y.tab.c y.tab.h pic_tab.h: pic.cpp Modified: head/gnu/usr.bin/groff/src/preproc/refer/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/preproc/refer/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/preproc/refer/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -3,8 +3,9 @@ PROG_CXX= refer SRCS= command.cpp label.cpp ref.cpp refer.cpp token.cpp CFLAGS+= -I${DIST_DIR} -DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} -LDADD= ${LIBBIB} ${LIBGROFF} -lm +DPADD= ${LIBBIB} ${LIBGROFF} +LDADD= ${LIBBIB} ${LIBGROFF} +LIBADD= m CLEANFILES= label.cpp label_tab.h ${MAN} y.tab.c y.tab.h .include Modified: head/gnu/usr.bin/groff/src/preproc/tbl/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/preproc/tbl/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/preproc/tbl/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= tbl SRCS= main.cpp table.cpp -DPADD= ${LIBGROFF} ${LIBM} -LDADD= ${LIBGROFF} -lm +DPADD= ${LIBGROFF} +LDADD= ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} .include Modified: head/gnu/usr.bin/groff/src/roff/groff/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/roff/groff/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/roff/groff/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= groff SRCS= groff.cpp pipeline.c -DPADD= ${LIBGROFF} ${LIBM} -LDADD= ${LIBGROFF} -lm +DPADD= ${LIBGROFF} +LDADD= ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} .include Modified: head/gnu/usr.bin/groff/src/roff/troff/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/roff/troff/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/roff/troff/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -3,8 +3,9 @@ PROG_CXX= troff SRCS= dictionary.cpp div.cpp env.cpp input.cpp \ majorminor.cpp mtsm.cpp node.cpp number.cpp reg.cpp -DPADD= ${LIBGROFF} ${LIBM} -LDADD= ${LIBGROFF} -lm +DPADD= ${LIBGROFF} +LDADD= ${LIBGROFF} +LIBADD= m CLEANFILES= majorminor.cpp ${MAN} .include Modified: head/gnu/usr.bin/groff/src/utils/hpftodit/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/utils/hpftodit/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/utils/hpftodit/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= hpftodit SRCS= hpftodit.cpp hpuni.cpp -DPADD= ${LIBGROFF} ${LIBM} -LDADD= ${LIBGROFF} -lm +DPADD= ${LIBGROFF} +LDADD= ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} .include Modified: head/gnu/usr.bin/groff/src/utils/indxbib/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/utils/indxbib/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/utils/indxbib/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= indxbib SRCS= indxbib.cpp signal.c -DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} -LDADD= ${LIBBIB} ${LIBGROFF} -lm +DPADD= ${LIBBIB} ${LIBGROFF} +LDADD= ${LIBBIB} ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} FILES= ${DIST_DIR}/eign FILESDIR= ${SHAREDIR}/dict/ Modified: head/gnu/usr.bin/groff/src/utils/lkbib/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/utils/lkbib/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/utils/lkbib/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= lkbib SRCS= lkbib.cpp -DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} -LDADD= ${LIBBIB} ${LIBGROFF} -lm +DPADD= ${LIBBIB} ${LIBGROFF} +LDADD= ${LIBBIB} ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} .include Modified: head/gnu/usr.bin/groff/src/utils/lookbib/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/utils/lookbib/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/utils/lookbib/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= lookbib SRCS= lookbib.cpp -DPADD= ${LIBBIB} ${LIBGROFF} ${LIBM} -LDADD= ${LIBBIB} ${LIBGROFF} -lm +DPADD= ${LIBBIB} ${LIBGROFF} +LDADD= ${LIBBIB} ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} .include Modified: head/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile ============================================================================== --- head/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/gnu/usr.bin/groff/src/utils/tfmtodit/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,9 @@ PROG_CXX= tfmtodit SRCS= tfmtodit.cpp -DPADD= ${LIBGROFF} ${LIBM} -LDADD= ${LIBGROFF} -lm +DPADD= ${LIBGROFF} +LDADD= ${LIBGROFF} +LIBADD= m CLEANFILES= ${MAN} .include Modified: head/lib/libc/tests/gen/Makefile ============================================================================== --- head/lib/libc/tests/gen/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/gen/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -45,20 +45,14 @@ NETBSD_ATF_TESTS_C+= vis_test .include "../Makefile.netbsd-tests" -LDADD.humanize_number_test+= -lutil -DPADD.humanize_number_test+= ${LIBUTIL} +LIBADD.humanize_number_test+= util -LDADD.fpclassify_test+= -lm -DPADD.fpclassify_test+= ${LIBM} -LDADD.fpsetround_test+= -lm -DPADD.fpsetround_test+= ${LIBM} -LDADD.siginfo_test+= -lm -DPADD.siginfo_test+= ${LIBM} - -LDADD.nice_test+= -lpthread -DPADD.nice_test+= ${LIBPTHREAD} -LDADD.syslog_test+= -lpthread -DPADD.syslog_test+= ${LIBPTHREAD} +LIBADD.fpclassify_test+=m +LIBADD.fpsetround_test+=m +LIBADD.siginfo_test+= m + +LIBADD.nice_test+= pthread +LIBADD.syslog_test+= pthread CFLAGS+= -I${.CURDIR} Modified: head/lib/libc/tests/hash/Makefile ============================================================================== --- head/lib/libc/tests/hash/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/hash/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -22,10 +22,8 @@ FILES+= data/sha1test-in FILES+= data/sha1test-out FILES+= data/sha1test2-out -DPADD+= ${LIBMD} -LDADD+= -lmd -DPADD.sha2_test+= ${LIBCRYPTO} -LDADD.sha2_test+= -lcrypto +LIBADD+= md +LIBADD.sha2_test+= crypto CFLAGS.sha2_test+= -I${SRCTOP}/crypto/openssh/openbsd-compat CFLAGS.sha2_test+= -I${SRCTOP}/crypto/openssh Modified: head/lib/libc/tests/net/Makefile ============================================================================== --- head/lib/libc/tests/net/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/net/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -23,8 +23,7 @@ PROGS+= h_protoent PROGS+= h_servent PROGS+= h_dns_server -DPADD.h_nsd_recurse+= ${LIBPTHREAD} -LDADD.h_nsd_recurse+= -lpthread +LIBADD.h_nsd_recurse+= pthread CLEANFILES+= aton_ether_subr.c aton_ether_subr.c: gen_ether_subr ${SRCTOP}/sys/net/if_ethersubr.c Modified: head/lib/libc/tests/regex/Makefile ============================================================================== --- head/lib/libc/tests/regex/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/regex/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -51,7 +51,6 @@ CFLAGS.$t+= -I${TESTSRC} ${IMPLEMENTATIO .include "../Makefile.netbsd-tests" -DPADD.regex_att_test+= ${LIBUTIL} -LDADD.regex_att_test+= -lutil +LIBADD.regex_att_test+= util .include Modified: head/lib/libc/tests/rpc/Makefile ============================================================================== --- head/lib/libc/tests/rpc/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/rpc/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -18,8 +18,7 @@ h_testbits_xdr.c: ${RPCSRC} h_testbits.h CLEANFILES+= ${RPCSRC:.x=.h} ${RPCSRC:.x=.c} h_testbits_xdr.c CFLAGS+= -I${.OBJDIR} -LDADD+= -lrpcsvc -lutil -DPADD+= ${LIBRPCSVC} ${LIBUTIL} +LIBADD+= rpcsvc util .include "../Makefile.netbsd-tests" Modified: head/lib/libc/tests/setjmp/Makefile ============================================================================== --- head/lib/libc/tests/setjmp/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/setjmp/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -3,8 +3,7 @@ NETBSD_ATF_TESTS_C= setjmp_test NETBSD_ATF_TESTS_C+= threadjmp_test -DPADD.threadjmp_test+= ${LIBPTHREAD} -LDADD.threadjmp_test+= -lpthread +LIBADD.t_threadjmp+= pthread WARNS?= 4 Modified: head/lib/libc/tests/ssp/Makefile ============================================================================== --- head/lib/libc/tests/ssp/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/ssp/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -10,8 +10,7 @@ CFLAGS.h_raw+= -fstack-protector-all -Ws CFLAGS.h_raw+= -fsanitize=bounds .elif ${COMPILER_TYPE} == "gcc" CFLAGS.h_raw+= --param ssp-buffer-size=1 -DPADD+= ${LIBSSP} -LDADD+= -lssp +LIBADD+= ssp .endif NETBSD_ATF_TESTS_SH= ssp_test Modified: head/lib/libc/tests/stdio/Makefile ============================================================================== --- head/lib/libc/tests/stdio/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/stdio/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -28,11 +28,8 @@ NETBSD_ATF_TESTS_C+= popen_test NETBSD_ATF_TESTS_C+= printf_test NETBSD_ATF_TESTS_C+= scanf_test -DPADD.printfloat_test+= ${LIBM} -LDADD.printfloat_test+= -lm - -DPADD.scanfloat_test+= ${LIBM} -LDADD.scanfloat_test+= -lm +LIBADD.printfloat_test+= m +LIBADD.scanfloat_test+= m .if ${COMPILER_TYPE} == "gcc" # 90: use of assignment suppression and length modifier together in scanf format Modified: head/lib/libc/tests/stdlib/Makefile ============================================================================== --- head/lib/libc/tests/stdlib/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/stdlib/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -36,11 +36,9 @@ CFLAGS+= -I${.CURDIR} CFLAGS.$t+= -I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests LDFLAGS.$t+= -L${LIBNETBSD_OBJDIR} -DPADD.$t+= ${LIBNETBSD} ${LIBUTIL} -LDADD.$t+= -lnetbsd -lutil +LIBADD.${t}+= netbsd util .endfor -DPADD.strtod_test+= ${LIBM} -LDADD.strtod_test+= -lm +LIBADD.strtod_test+= m .include Modified: head/lib/libc/tests/string/Makefile ============================================================================== --- head/lib/libc/tests/string/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/string/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -27,10 +27,7 @@ SRCS.strerror2_test= strerror_test.c .include "../Makefile.netbsd-tests" -LDADD.memchr_test+= -lmd -DPADD.memchr_test+= ${LIBMD} - -LDADD.memcpy_test+= -lmd -DPADD.memcpy_test+= ${LIBMD} +LIBADD.memchr_test+= md +LIBADD.memcpy_test+= md .include Modified: head/lib/libc/tests/sys/Makefile ============================================================================== --- head/lib/libc/tests/sys/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/sys/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -57,10 +57,8 @@ NETBSD_ATF_TESTS_C+= umask_test NETBSD_ATF_TESTS_C+= unlink_test NETBSD_ATF_TESTS_C+= write_test -DPADD.getpid_test+= ${LIBPTHREAD} -LDADD.getpid_test+= -lpthread -DPADD.timer_create_test+= ${LIBRT} -LDADD.timer_create_test+= -lrt +LIBADD.getpid_test+= pthread +LIBADD.timer_create_test+= rt .include "../Makefile.netbsd-tests" Modified: head/lib/libc/tests/tls/Makefile ============================================================================== --- head/lib/libc/tests/tls/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/tls/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -18,17 +18,16 @@ NETBSD_ATF_TESTS_C+= tls_dynamic_test DSODIR= ${.OBJDIR}/../tls_dso -DPADD.tls_static_test+= ${LIBPTHREAD} -LDADD.tls_static_test+= -lpthread +LIBADD.tls_static_test+= pthread LDFLAGS.tls_static_test+= -static SRCS.tls_static_test= t_tls_static.c t_tls_static_helper.c -DPADD.tls_dynamic_test+= ${LIBPTHREAD} ${DSODIR}/libh_tls_dynamic.so -LDADD.tls_dynamic_test+= -lpthread -lh_tls_dynamic +DPADD.tls_dynamic_test+= ${DSODIR}/libh_tls_dynamic.so +LDADD.tls_dynamic_test+= -lh_tls_dynamic LDFLAGS.tls_dynamic_test+= -Wl,-rpath,${TESTSDIR} -L${DSODIR} +LIBADD.tls_dynamic_test+= pthread -DPADD.tls_dlopen_test+= ${LIBPTHREAD} -LDADD.tls_dlopen_test+= -lpthread +LIBADD.tls_dlopen_test+= pthread LDFLAGS.tls_dlopen_test+= -Wl,-rpath,${TESTSDIR} -Wl,-export-dynamic .include Modified: head/lib/libc/tests/ttyio/Makefile ============================================================================== --- head/lib/libc/tests/ttyio/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libc/tests/ttyio/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -5,8 +5,7 @@ # TODO: ptm_test NETBSD_ATF_TESTS_C= ttyio_test -DPADD.ttyio_test+= ${LIBUTIL} -LDADD.ttyio_test+= -lutil +LIBADD.ttyio_test+= util .include "../Makefile.netbsd-tests" Modified: head/lib/libproc/tests/Makefile ============================================================================== --- head/lib/libproc/tests/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libproc/tests/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -6,8 +6,7 @@ PROGS= target_prog SRCS_target_prog= target_prog.c BINDIR_target_prog= ${TESTSDIR} -LDADD+= -lelf -lproc -lrtld_db -lutil -DPADD+= ${LIBELF} ${LIBPROC} ${LIBRTLD_DB} ${LIBUTIL} +LIBADD= elf proc rtld_db util # Ensure that symbols aren't stripped from the test program, as they're needed # for testing symbol lookup. Modified: head/lib/libthr/tests/Makefile ============================================================================== --- head/lib/libthr/tests/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libthr/tests/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -30,12 +30,9 @@ NETBSD_ATF_TESTS_SH+= cancel_test NETBSD_ATF_TESTS_SH+= exit_test NETBSD_ATF_TESTS_SH+= resolv_test -DPADD+= ${LIBPTHREAD} -LDADD+= -lpthread -DPADD.fpu_test+= ${LIBM} -LDADD.fpu_test+= -lm -DPADD.sem_test+= ${LIBRT} -LDADD.sem_test+= -lrt +LIBADD+= pthread +LIBADD.fpu_test+= m +LIBADD.sem_test+= rt BINDIR= ${TESTSDIR} Modified: head/lib/libthr/tests/dlopen/Makefile ============================================================================== --- head/lib/libthr/tests/dlopen/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libthr/tests/dlopen/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -18,8 +18,7 @@ NETBSD_ATF_TESTS_C+= main_pthread_create #NETBSD_ATF_TESTS_C+= dso_pthread_create_test .for t in dlopen_test main_pthread_create_test -DPADD.$t+= ${LIBPTHREAD} -LDADD.$t+= -lpthread +LIBADD.${t}+= pthread .endfor .endif Modified: head/lib/libthr/tests/dlopen/dso/Makefile ============================================================================== --- head/lib/libthr/tests/dlopen/dso/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/lib/libthr/tests/dlopen/dso/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -8,8 +8,7 @@ SHLIB_MAJOR= 1 SHLIB_NAME= h_pthread_dlopen.so.${SHLIB_MAJOR} SRCS= h_pthread_dlopen.c -DPADD+= ${LIBPTHREAD} -LDADD+= -lpthread +LIBADD+= pthread LIBDIR= ${TESTSBASE}/lib/libthr/dlopen Modified: head/libexec/rtld-elf/tests/libpythagoras/Makefile ============================================================================== --- head/libexec/rtld-elf/tests/libpythagoras/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/libexec/rtld-elf/tests/libpythagoras/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -10,7 +10,6 @@ SHLIBDIR= ${TESTSBASE}/libexec/rtld-elf SRCS= pythagoras.c -DPADD= ${LIBM} -LDADD= -lm +LIBADD= m .include Modified: head/sbin/dhclient/tests/Makefile ============================================================================== --- head/sbin/dhclient/tests/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/sbin/dhclient/tests/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -6,8 +6,7 @@ PLAIN_TESTS_C= option-domain-search_t SRCS.option-domain-search_test= alloc.c convert.c hash.c options.c \ tables.c fake.c option-domain-search.c CFLAGS.option-domain-search_test+= -I${.CURDIR}/.. -DPADD.option-domain-search_test= ${LIBUTIL} -LDADD.option-domain-search_test= -lutil +LIBADD.option-domain-search_test= util WARNS?= 2 Modified: head/share/mk/netbsd-tests.test.mk ============================================================================== --- head/share/mk/netbsd-tests.test.mk Fri Dec 4 03:17:24 2015 (r291737) +++ head/share/mk/netbsd-tests.test.mk Fri Dec 4 03:17:47 2015 (r291738) @@ -18,8 +18,7 @@ LIBNETBSD_OBJDIR= ${OBJTOP}/lib/libnetbs CFLAGS.$t+= -I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests LDFLAGS.$t+= -L${LIBNETBSD_OBJDIR} -DPADD.$t+= ${LIBNETBSD} -LDADD.$t+= -lnetbsd +LIBADD.${t}+= netbsd SRCS.$t?= ${t:C/^/t_/:C/_test$//g}.c .endfor Modified: head/sys/dev/aic7xxx/aicasm/Makefile ============================================================================== --- head/sys/dev/aic7xxx/aicasm/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/sys/dev/aic7xxx/aicasm/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -13,8 +13,7 @@ GENHDRS= aicasm_gram.h aicasm_macro_gram SRCS= ${GENHDRS} ${CSRCS} ${YSRCS} ${LSRCS} CLEANFILES+= ${GENHDRS} ${YSRCS:R:C/(.*)/\1.output/g} -DPADD= ${LIBL} -LDADD= -ll +LIBADD= l WARNS?= 0 # Correct path for kernel builds Modified: head/sys/dev/patm/genrtab/Makefile ============================================================================== --- head/sys/dev/patm/genrtab/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/sys/dev/patm/genrtab/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -7,7 +7,6 @@ PROG= genrtab INTERNALPROG= WARNS?= 5 MAN= -DPADD= ${LIBM} -LDADD= -lm +LIBADD= m .include Modified: head/tests/sys/aio/Makefile ============================================================================== --- head/tests/sys/aio/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tests/sys/aio/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -6,8 +6,7 @@ PLAIN_TESTS_C+= aio_kqueue_test PLAIN_TESTS_C+= lio_kqueue_test ATF_TESTS_C+= aio_test -DPADD.aio_test+= ${LIBUTIL} -LDADD.aio_test+= -lutil +LIBADD.aio_test+= util CFLAGS+= -I${.CURDIR:H:H} Modified: head/tests/sys/file/Makefile ============================================================================== --- head/tests/sys/file/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tests/sys/file/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -13,13 +13,10 @@ PLAIN_TESTS_C+= newfileops_on_fork_test PROGS+= flock_helper -DPADD.closefrom_test= ${LIBUTIL} -LDADD.closefrom_test= -lutil +LIBADD.closefrom_test= util -DPADD.flock_helper= ${LIBPTHREAD} -LDADD.flock_helper= -lpthread +LIBADD.flock_helper= pthread -DPADD.newfileops_on_fork_test= ${LIBPTHREAD} -LDADD.newfileops_on_fork_test= -lpthread +LIBADD.newfileops_on_fork_test= pthread .include Modified: head/tests/sys/kern/Makefile ============================================================================== --- head/tests/sys/kern/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tests/sys/kern/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -10,15 +10,14 @@ ATF_TESTS_C+= ptrace_test ATF_TESTS_C+= unix_seqpacket_test TEST_METADATA.unix_seqpacket_test+= timeout="15" -LDADD.ptrace_test+= -lpthread -LDADD.unix_seqpacket_test+= -lpthread +LIBADD.ptrace_test+= pthread +LIBADD.unix_seqpacket_test+= pthread NETBSD_ATF_TESTS_C+= lockf_test NETBSD_ATF_TESTS_C+= mqueue_test CFLAGS.mqueue_test+= -I${SRCTOP}/tests -DPADD.mqueue_test+= ${LIBRT} -LDADD.mqueue_test+= -lrt +LIBADD.mqueue_test+= rt WARNS?= 5 Modified: head/tests/sys/mqueue/Makefile ============================================================================== --- head/tests/sys/mqueue/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tests/sys/mqueue/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -14,8 +14,7 @@ PROGS+= mqtest2 #PROGS+= mqtest4 PROGS+= mqtest5 -LDADD+= -lrt -DPADD+= ${LIBRT} +LIBADD+= rt WARNS?= 6 Modified: head/tools/diag/dumpvfscache/Makefile ============================================================================== --- head/tools/diag/dumpvfscache/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/diag/dumpvfscache/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -1,8 +1,7 @@ # $FreeBSD$ PROG= dumpvfscache -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm MAN= Modified: head/tools/regression/gaithrstress/Makefile ============================================================================== --- head/tools/regression/gaithrstress/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/gaithrstress/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -1,8 +1,7 @@ # $FreeBSD$ PROG= gaithrstress -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +LIBADD= pthread MAN= .include Modified: head/tools/regression/geom/ConfCmp/Makefile ============================================================================== --- head/tools/regression/geom/ConfCmp/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/geom/ConfCmp/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -12,8 +12,7 @@ CFLAGS+= -g -W -Wall -Wstrict-prototype # Uncomment for ElectricFence #LDADD += -lefence -L/usr/local/lib -DPADD += ${LIBBSDXML} -LDADD += -lbsdxml +LIBADD= bsdxml MAN= CLEANFILES += _* Modified: head/tools/regression/geom/MdLoad/Makefile ============================================================================== --- head/tools/regression/geom/MdLoad/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/geom/MdLoad/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -1,8 +1,7 @@ # $FreeBSD$ PROG= MdLoad -DPADD= ${LIBSBUF} ${LIBBSDXML} -LDADD= -lsbuf -lbsdxml +LIBADD= sbuf bsdxml MAN= Modified: head/tools/regression/kgssapi/Makefile ============================================================================== --- head/tools/regression/kgssapi/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/kgssapi/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -3,8 +3,7 @@ PROG= gsstest MAN= WARNS?= 2 -DPADD= ${LIBGSSAPI} ${LIBGSSAPI_KRB5} -LDADD= -lgssapi -lgssapi_krb5 +LIBADD= gssapi gssapi_krb5 DEBUG_FLAGS= -g -O0 .include Modified: head/tools/regression/lib/libc/resolv/Makefile ============================================================================== --- head/tools/regression/lib/libc/resolv/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/lib/libc/resolv/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -6,8 +6,7 @@ MAN= # Note: this test relies on being dynamically linked. You will get a # spurious PASS for a statically linked test. -DPADD+= ${LIBPTHREAD} -LDADD+= -lpthread +LIBADD+= pthread regress: ${PROG} ./${PROG} -r ${.CURDIR}/mach Modified: head/tools/regression/mac/mac_bsdextended/Makefile ============================================================================== --- head/tools/regression/mac/mac_bsdextended/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/mac/mac_bsdextended/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -1,8 +1,7 @@ # $FreeBSD$ PROG= test_ugidfw -DPADD= ${LIBUGIDFW} -LDADD= -lugidfw +LIBADD= ugidfw MAN= .include Modified: head/tools/regression/posixsem/Makefile ============================================================================== --- head/tools/regression/posixsem/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/posixsem/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,7 @@ PROG= posixsem SRCS= posixsem.c test.c -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm MAN= WARNS?= 3 Modified: head/tools/regression/priv/Makefile ============================================================================== --- head/tools/regression/priv/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/priv/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -48,8 +48,7 @@ SRCS= main.c \ MAN= WARNS?= 3 -DPADD+= ${LIBIPSEC} -LDADD+= -lipsec +LIBADD+= ipsec .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 Modified: head/tools/regression/pthread/cv_cancel1/Makefile ============================================================================== --- head/tools/regression/pthread/cv_cancel1/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/pthread/cv_cancel1/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,7 +2,6 @@ PROG= cv_cancel1 MAN= -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +LIBADD= pthread .include Modified: head/tools/regression/pthread/mutex_isowned_np/Makefile ============================================================================== --- head/tools/regression/pthread/mutex_isowned_np/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/pthread/mutex_isowned_np/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,7 +2,6 @@ PROG= mutex_isowned_np MAN= -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +LIBADD= pthread .include Modified: head/tools/regression/rpcsec_gss/Makefile ============================================================================== --- head/tools/regression/rpcsec_gss/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/rpcsec_gss/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -3,8 +3,7 @@ PROG= rpctest MAN= WARNS?= 6 -DPADD= ${LIBRPCSEC_GSS} -LDADD= -lrpcsec_gss +LIBADD= rpcsec_gss DEBUG_FLAGS= -g -O0 .include Modified: head/tools/regression/sockets/sendfile/Makefile ============================================================================== --- head/tools/regression/sockets/sendfile/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/sockets/sendfile/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -5,7 +5,6 @@ PROG= sendfile MAN= WARNS?= 6 -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md .include Modified: head/tools/regression/tls/ttls2/Makefile ============================================================================== --- head/tools/regression/tls/ttls2/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/tls/ttls2/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -1,8 +1,7 @@ # $FreeBSD$ PROG= ttls2 -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +LIBADD= pthread MAN= DEBUG_FLAGS= -g Modified: head/tools/regression/tls/ttls4/Makefile ============================================================================== --- head/tools/regression/tls/ttls4/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/regression/tls/ttls4/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -1,8 +1,7 @@ # $FreeBSD$ PROG= ttls4 -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +LIBADD= pthread MAN= DEBUG_FLAGS= -g Modified: head/tools/tools/ath/athratestats/Makefile ============================================================================== --- head/tools/tools/ath/athratestats/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/tools/ath/athratestats/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -7,7 +7,7 @@ PROG= athratestats SRCS= main.c opt_ah.h ah_osdep.h -LDADD+= -lcurses +LIBADD+= curses CLEANFILES+= opt_ah.h ah_osdep.h Modified: head/tools/tools/atsectl/Makefile ============================================================================== --- head/tools/tools/atsectl/Makefile Fri Dec 4 03:17:24 2015 (r291737) +++ head/tools/tools/atsectl/Makefile Fri Dec 4 03:17:47 2015 (r291738) @@ -2,8 +2,7 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Dec 4 03:18:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1CB8A40D38; Fri, 4 Dec 2015 03:18:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1A7813D6; Fri, 4 Dec 2015 03:18:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43Hxdt047541; Fri, 4 Dec 2015 03:17:59 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43Hxlx047540; Fri, 4 Dec 2015 03:17:59 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040317.tB43Hxlx047540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 03:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291739 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:18:01 -0000 Author: bdrewery Date: Fri Dec 4 03:17:59 2015 New Revision: 291739 URL: https://svnweb.freebsd.org/changeset/base/291739 Log: Add assertion for when LIBADD should be used rather than LDADD/DPADD. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk ============================================================================== --- head/share/mk/src.libnames.mk Fri Dec 4 03:17:47 2015 (r291738) +++ head/share/mk/src.libnames.mk Fri Dec 4 03:17:59 2015 (r291739) @@ -328,6 +328,16 @@ LDADD_${_l}+= ${LDADD_${_d}} DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} +# Detect LDADD/DPADD that should be LIBADD, before modifying LDADD here. +.for _l in ${LDADD:M-l*:N-l*/*:C,^-l,,} +.if ${_LIBRARIES:M${_l}} +_BADLDADD+= ${_l} +.endif +.endfor +.if !empty(_BADLDADD) +.error ${.CURDIR}: These libraries should be LIBADD+=foo rather than DPADD/LDADD+=-lfoo: ${_BADLDADD} +.endif + .for _l in ${LIBADD} DPADD+= ${DPADD_${_l}} LDADD+= ${LDADD_${_l}} From owner-svn-src-all@freebsd.org Fri Dec 4 03:18:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DF0AA40D50; Fri, 4 Dec 2015 03:18:04 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1024D14C3; Fri, 4 Dec 2015 03:18:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43I3LD047591; Fri, 4 Dec 2015 03:18:03 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43I2bn047589; Fri, 4 Dec 2015 03:18:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040318.tB43I2bn047589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 03:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291740 - in head: include lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:18:04 -0000 Author: bdrewery Date: Fri Dec 4 03:18:02 2015 New Revision: 291740 URL: https://svnweb.freebsd.org/changeset/base/291740 Log: Move obscure lib/ installation of /usr/lib/include symlink to include/. This avoids the need for an afterinstall: hook and a check for LIBRARIES_ONLY. It also now respects INCLUDEDIR. This came in r249484. Sponsored by: EMC / Isilon Storage Division Modified: head/include/Makefile head/lib/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Fri Dec 4 03:17:59 2015 (r291739) +++ head/include/Makefile Fri Dec 4 03:18:02 2015 (r291740) @@ -104,6 +104,8 @@ NEWVERS_SH= ${SYSDIR}/conf/newvers.sh PARAM_H= ${SYSDIR}/sys/param.h MK_OSRELDATE_SH= ${.CURDIR}/mk-osreldate.sh +SYMLINKS+= ${INCLUDEDIR} ${LIBDIR}/include + osreldate.h: ${NEWVERS_SH} ${PARAM_H} ${MK_OSRELDATE_SH} env NEWVERS_SH=${NEWVERS_SH} PARAMFILE=${PARAM_H} SYSDIR=${SYSDIR} \ sh ${MK_OSRELDATE_SH} Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Fri Dec 4 03:17:59 2015 (r291739) +++ head/lib/Makefile Fri Dec 4 03:18:02 2015 (r291740) @@ -314,11 +314,6 @@ _libusbhid= libusbhid _libusb= libusb .endif -.if !defined(LIBRARIES_ONLY) -afterinstall: - ${INSTALL_SYMLINK} ../include ${DESTDIR}/usr/lib/include -.endif - .if !make(install) SUBDIR_PARALLEL= .endif From owner-svn-src-all@freebsd.org Fri Dec 4 03:38:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D704A40135; Fri, 4 Dec 2015 03:38:37 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D27A715CC; Fri, 4 Dec 2015 03:38:36 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43cZ2S053264; Fri, 4 Dec 2015 03:38:35 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43cZY1053263; Fri, 4 Dec 2015 03:38:35 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201512040338.tB43cZY1053263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Fri, 4 Dec 2015 03:38:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291741 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:38:37 -0000 Author: ken Date: Fri Dec 4 03:38:35 2015 New Revision: 291741 URL: https://svnweb.freebsd.org/changeset/base/291741 Log: Fix g_disk_vlist_limit() to work properly with deletes. Add a new bp argument to g_disk_maxsegs(), and add a new function, g_disk_maxsize() tha will properly determine the maximum I/O size for a delete or non-delete bio. Submitted by: will MFC after: 1 week Sponsored by: Spectra Logic Modified: head/sys/geom/geom_disk.c Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Fri Dec 4 03:18:02 2015 (r291740) +++ head/sys/geom/geom_disk.c Fri Dec 4 03:38:35 2015 (r291741) @@ -253,10 +253,18 @@ g_disk_ioctl(struct g_provider *pp, u_lo return (error); } +static off_t +g_disk_maxsize(struct disk *dp, struct bio *bp) +{ + if (bp->bio_cmd == BIO_DELETE) + return (dp->d_delmaxsize); + return (dp->d_maxsize); +} + static int -g_disk_maxsegs(struct disk *dp) +g_disk_maxsegs(struct disk *dp, struct bio *bp) { - return ((dp->d_maxsize / PAGE_SIZE) + 1); + return ((g_disk_maxsize(dp, bp) / PAGE_SIZE) + 1); } static void @@ -334,7 +342,7 @@ g_disk_vlist_limit(struct disk *dp, stru end = (bus_dma_segment_t *)bp->bio_data + bp->bio_ma_n; residual = bp->bio_length; offset = bp->bio_ma_offset; - pages = g_disk_maxsegs(dp); + pages = g_disk_maxsegs(dp, bp); while (residual != 0 && pages != 0) { KASSERT((seg != end), ("vlist limit runs off the end")); @@ -350,10 +358,7 @@ static bool g_disk_limit(struct disk *dp, struct bio *bp) { bool limited = false; - off_t d_maxsize; - - d_maxsize = (bp->bio_cmd == BIO_DELETE) ? - dp->d_delmaxsize : dp->d_maxsize; + off_t maxsz = g_disk_maxsize(dp, bp); /* * XXX: If we have a stripesize we should really use it here. @@ -361,8 +366,8 @@ g_disk_limit(struct disk *dp, struct bio * as deletes can be very sensitive to size given how they * are processed. */ - if (bp->bio_length > d_maxsize) { - bp->bio_length = d_maxsize; + if (bp->bio_length > maxsz) { + bp->bio_length = maxsz; limited = true; } From owner-svn-src-all@freebsd.org Fri Dec 4 03:41:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7841BA401E0; Fri, 4 Dec 2015 03:41:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 59E951A26; Fri, 4 Dec 2015 03:41:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 51B9C19A0; Fri, 4 Dec 2015 03:41:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 0E66318F90; Fri, 4 Dec 2015 03:41:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id GCtA70IoZXKk; Fri, 4 Dec 2015 03:41:38 +0000 (UTC) Subject: Re: svn commit: r291741 - head/sys/geom DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 2600D18F8B To: "Kenneth D. Merry" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201512040338.tB43cZY1053263@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <56610B6B.8010708@FreeBSD.org> Date: Thu, 3 Dec 2015 19:41:31 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <201512040338.tB43cZY1053263@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kn5bA3HGcasqLuCCXtMuWcKXDKJEroFIc" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:41:45 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kn5bA3HGcasqLuCCXtMuWcKXDKJEroFIc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 12/3/2015 7:38 PM, Kenneth D. Merry wrote: > g_disk_limit(struct disk *dp, struct bio *bp) > { > bool limited =3D false; > - off_t d_maxsize; > - > - d_maxsize =3D (bp->bio_cmd =3D=3D BIO_DELETE) ? > - dp->d_delmaxsize : dp->d_maxsize; > + off_t maxsz =3D g_disk_maxsize(dp, bp); This looks like a style issue. --=20 Regards, Bryan Drewery --kn5bA3HGcasqLuCCXtMuWcKXDKJEroFIc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWYQtwAAoJEDXXcbtuRpfPa2MH/2Se7XBr/1hD45DPSlcDqeYA ZMc0ab0Fh1FIdiIK4aFFBNUMbQQiqd/147oIK/ohTvjsDxKy7bdK7o4HDVySYFjZ vhMmV3+cOG7IY0PkRGBdQTWiDfV2+FN87Or9rIGVRHvS40Qf3EDQemXC7nTyvkDN 4Fu24JWIIjcD1jDheoUsAMiHYbwN/bdOJVPDPmPuMZ/3bfHLou4y4tu7DtpBs76t 3Z59bQKjXHhM+qsqOJO+a69Pbl2dHWj9vWbGR9+TsK3glCouHiFqDlOJXGa3HNv4 cmxJte2yd2WVTMPMVfJthkMGdRBfNNVNgCzFQYHDZGfONchncrm0XzGIDUoq7Q0= =wxF3 -----END PGP SIGNATURE----- --kn5bA3HGcasqLuCCXtMuWcKXDKJEroFIc-- From owner-svn-src-all@freebsd.org Fri Dec 4 03:44:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 453BAA40322; Fri, 4 Dec 2015 03:44:14 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 146081C55; Fri, 4 Dec 2015 03:44:14 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43iDI0056071; Fri, 4 Dec 2015 03:44:13 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43iDMP056070; Fri, 4 Dec 2015 03:44:13 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201512040344.tB43iDMP056070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Fri, 4 Dec 2015 03:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291742 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:44:14 -0000 Author: ken Date: Fri Dec 4 03:44:12 2015 New Revision: 291742 URL: https://svnweb.freebsd.org/changeset/base/291742 Log: Fix a style issue in g_disk_limit(). Noticed by: bdrewery MFC after: 1 week Modified: head/sys/geom/geom_disk.c Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Fri Dec 4 03:38:35 2015 (r291741) +++ head/sys/geom/geom_disk.c Fri Dec 4 03:44:12 2015 (r291742) @@ -358,7 +358,9 @@ static bool g_disk_limit(struct disk *dp, struct bio *bp) { bool limited = false; - off_t maxsz = g_disk_maxsize(dp, bp); + off_t maxsz; + + maxsz = g_disk_maxsize(dp, bp); /* * XXX: If we have a stripesize we should really use it here. From owner-svn-src-all@freebsd.org Fri Dec 4 03:45:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0A7FA4036E; Fri, 4 Dec 2015 03:45:06 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (mithlond.kdm.org [96.89.93.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "A1-33714", Issuer "A1-33714" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B9A1A1DCD; Fri, 4 Dec 2015 03:45:06 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (localhost [127.0.0.1]) by mithlond.kdm.org (8.15.2/8.14.9) with ESMTPS id tB43j44e083341 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 3 Dec 2015 22:45:04 -0500 (EST) (envelope-from ken@mithlond.kdm.org) Received: (from ken@localhost) by mithlond.kdm.org (8.15.2/8.14.9/Submit) id tB43j4Md083340; Thu, 3 Dec 2015 22:45:04 -0500 (EST) (envelope-from ken) Date: Thu, 3 Dec 2015 22:45:04 -0500 From: "Kenneth D. Merry" To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291741 - head/sys/geom Message-ID: <20151204034504.GA83294@mithlond.kdm.org> References: <201512040338.tB43cZY1053263@repo.freebsd.org> <56610B6B.8010708@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56610B6B.8010708@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mithlond.kdm.org [127.0.0.1]); Thu, 03 Dec 2015 22:45:04 -0500 (EST) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mithlond.kdm.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:45:07 -0000 On Thu, Dec 03, 2015 at 19:41:31 -0800, Bryan Drewery wrote: > On 12/3/2015 7:38 PM, Kenneth D. Merry wrote: > > g_disk_limit(struct disk *dp, struct bio *bp) > > { > > bool limited = false; > > - off_t d_maxsize; > > - > > - d_maxsize = (bp->bio_cmd == BIO_DELETE) ? > > - dp->d_delmaxsize : dp->d_maxsize; > > + off_t maxsz = g_disk_maxsize(dp, bp); > > This looks like a style issue. You are correct. Fixed. Thanks! Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-all@freebsd.org Fri Dec 4 03:54:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8CC7EA4051B; Fri, 4 Dec 2015 03:54:19 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51B381440; Fri, 4 Dec 2015 03:54:19 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB43sI8M058970; Fri, 4 Dec 2015 03:54:18 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB43sIMq058969; Fri, 4 Dec 2015 03:54:18 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201512040354.tB43sIMq058969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 4 Dec 2015 03:54:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291743 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 03:54:19 -0000 Author: mckusick Date: Fri Dec 4 03:54:18 2015 New Revision: 291743 URL: https://svnweb.freebsd.org/changeset/base/291743 Log: We need to zero out the clustering variables in a freed vnode structure. For completeness add a VNASSERT that there are no threads waiting on a range lock (this was previously checked on every vnode free). Reported by; Rick Macklem Fix from: Mateusz Guzik PR: 204949 Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Dec 4 03:44:12 2015 (r291742) +++ head/sys/kern/vfs_subr.c Fri Dec 4 03:54:18 2015 (r291743) @@ -2770,6 +2770,8 @@ _vdrop(struct vnode *vp, bool locked) VNASSERT(TAILQ_EMPTY(&vp->v_cache_dst), vp, ("vp has namecache dst")); VNASSERT(LIST_EMPTY(&vp->v_cache_src), vp, ("vp has namecache src")); VNASSERT(vp->v_cache_dd == NULL, vp, ("vp has namecache for ..")); + VNASSERT(TAILQ_EMPTY(&vp->v_rl.rl_waiters), vp, + ("Dangling rangelock waiters")); VI_UNLOCK(vp); #ifdef MAC mac_vnode_destroy(vp); @@ -2783,6 +2785,7 @@ _vdrop(struct vnode *vp, bool locked) vp->v_op = NULL; #endif bzero(&vp->v_un, sizeof(vp->v_un)); + vp->v_lasta = vp->v_clen = vp->v_cstart = vp->v_lastw = 0; vp->v_iflag = 0; vp->v_vflag = 0; bo->bo_flag = 0; From owner-svn-src-all@freebsd.org Fri Dec 4 04:27:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0C62A409BA; Fri, 4 Dec 2015 04:27:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E88D1E17; Fri, 4 Dec 2015 04:27:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB44RLi2067656; Fri, 4 Dec 2015 04:27:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB44RL8S067654; Fri, 4 Dec 2015 04:27:21 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040427.tB44RL8S067654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 04:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291744 - in head/sys: conf modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 04:27:22 -0000 Author: bdrewery Date: Fri Dec 4 04:27:21 2015 New Revision: 291744 URL: https://svnweb.freebsd.org/changeset/base/291744 Log: Calculate MPATH for sys/modules to save 92% time in a basic 'obj' tree-walk. Sponsored by: EMC / Isilon Storage Division Modified: head/sys/conf/kmod.mk head/sys/modules/Makefile Modified: head/sys/conf/kmod.mk ============================================================================== --- head/sys/conf/kmod.mk Fri Dec 4 03:54:18 2015 (r291743) +++ head/sys/conf/kmod.mk Fri Dec 4 04:27:21 2015 (r291744) @@ -370,8 +370,10 @@ vnode_if_typedef.h: .endif # Build _if.[ch] from _if.m, and clean them when we're done. +# This is duplicated in sys/modules/Makefile. .if !defined(__MPATH) __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m +.export __MPATH .endif _MFILES=${__MPATH:T:O} _MPATH=${__MPATH:H:O:u} Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Dec 4 03:54:18 2015 (r291743) +++ head/sys/modules/Makefile Fri Dec 4 04:27:21 2015 (r291744) @@ -771,6 +771,12 @@ afterinstall: .include "${SYSDIR}/conf/config.mk" +# Use sys/conf/kmod.mk's MPATH to avoid redundantly running in every subdir. +.if !defined(__MPATH) +__MPATH!=find ${SYSDIR:tA}/ -name \*_if.m +.export __MPATH +.endif + SUBDIR:= ${SUBDIR:u:O} .include From owner-svn-src-all@freebsd.org Fri Dec 4 05:00:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 06F77A40F4D; Fri, 4 Dec 2015 05:00:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1D6C1A56; Fri, 4 Dec 2015 05:00:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB450p1U076212; Fri, 4 Dec 2015 05:00:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB450pnc076211; Fri, 4 Dec 2015 05:00:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040500.tB450pnc076211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 05:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291745 - head/usr.bin/vgrind/RETEST X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 05:00:53 -0000 Author: bdrewery Date: Fri Dec 4 05:00:51 2015 New Revision: 291745 URL: https://svnweb.freebsd.org/changeset/base/291745 Log: Remove disconnected directory RETEST. Deleted: head/usr.bin/vgrind/RETEST/ From owner-svn-src-all@freebsd.org Fri Dec 4 06:51:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1892A402C6; Fri, 4 Dec 2015 06:51:38 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC6AC18A9; Fri, 4 Dec 2015 06:51:38 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB46pb1A010591; Fri, 4 Dec 2015 06:51:37 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB46pbYm010586; Fri, 4 Dec 2015 06:51:37 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512040651.tB46pbYm010586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 4 Dec 2015 06:51:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291746 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 06:51:39 -0000 Author: arybchik Date: Fri Dec 4 06:51:37 2015 New Revision: 291746 URL: https://svnweb.freebsd.org/changeset/base/291746 Log: sfxge: add additional WRITESIZE value for NVRAM_INFO command Submitted by: Paul Fox Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4353 Modified: head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/efx_nvram.c head/sys/dev/sfxge/common/hunt_nvram.c head/sys/dev/sfxge/common/hunt_vpd.c head/sys/dev/sfxge/common/siena_nvram.c Modified: head/sys/dev/sfxge/common/efx_impl.h ============================================================================== --- head/sys/dev/sfxge/common/efx_impl.h Fri Dec 4 05:00:51 2015 (r291745) +++ head/sys/dev/sfxge/common/efx_impl.h Fri Dec 4 06:51:37 2015 (r291746) @@ -536,7 +536,8 @@ efx_mcdi_nvram_info( __in uint32_t partn, __out_opt size_t *sizep, __out_opt uint32_t *addressp, - __out_opt uint32_t *erase_sizep); + __out_opt uint32_t *erase_sizep, + __out_opt uint32_t *write_sizep); __checkReturn efx_rc_t efx_mcdi_nvram_update_start( Modified: head/sys/dev/sfxge/common/efx_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/efx_nvram.c Fri Dec 4 05:00:51 2015 (r291745) +++ head/sys/dev/sfxge/common/efx_nvram.c Fri Dec 4 06:51:37 2015 (r291746) @@ -567,10 +567,11 @@ efx_mcdi_nvram_info( __in uint32_t partn, __out_opt size_t *sizep, __out_opt uint32_t *addressp, - __out_opt uint32_t *erase_sizep) + __out_opt uint32_t *erase_sizep, + __out_opt uint32_t *write_sizep) { uint8_t payload[MAX(MC_CMD_NVRAM_INFO_IN_LEN, - MC_CMD_NVRAM_INFO_OUT_LEN)]; + MC_CMD_NVRAM_INFO_V2_OUT_LEN)]; efx_mcdi_req_t req; efx_rc_t rc; @@ -579,7 +580,7 @@ efx_mcdi_nvram_info( req.emr_in_buf = payload; req.emr_in_length = MC_CMD_NVRAM_INFO_IN_LEN; req.emr_out_buf = payload; - req.emr_out_length = MC_CMD_NVRAM_INFO_OUT_LEN; + req.emr_out_length = MC_CMD_NVRAM_INFO_V2_OUT_LEN; MCDI_IN_SET_DWORD(req, NVRAM_INFO_IN_TYPE, partn); @@ -604,6 +605,13 @@ efx_mcdi_nvram_info( if (erase_sizep) *erase_sizep = MCDI_OUT_DWORD(req, NVRAM_INFO_OUT_ERASESIZE); + if (write_sizep) { + *write_sizep = + (req.emr_out_length_used < + MC_CMD_NVRAM_INFO_V2_OUT_LEN) ? + 0 : MCDI_OUT_DWORD(req, NVRAM_INFO_V2_OUT_WRITESIZE); + } + return (0); fail2: Modified: head/sys/dev/sfxge/common/hunt_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_nvram.c Fri Dec 4 05:00:51 2015 (r291745) +++ head/sys/dev/sfxge/common/hunt_nvram.c Fri Dec 4 06:51:37 2015 (r291746) @@ -1295,7 +1295,8 @@ hunt_nvram_partn_size( { efx_rc_t rc; - if ((rc = efx_mcdi_nvram_info(enp, partn, sizep, NULL, NULL)) != 0) + if ((rc = efx_mcdi_nvram_info(enp, partn, sizep, + NULL, NULL, NULL)) != 0) goto fail1; return (0); Modified: head/sys/dev/sfxge/common/hunt_vpd.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_vpd.c Fri Dec 4 05:00:51 2015 (r291745) +++ head/sys/dev/sfxge/common/hunt_vpd.c Fri Dec 4 06:51:37 2015 (r291746) @@ -113,7 +113,7 @@ hunt_vpd_size( * which is the size of the DYNAMIC_CONFIG partition. */ if ((rc = efx_mcdi_nvram_info(enp, NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, - sizep, NULL, NULL)) != 0) + sizep, NULL, NULL, NULL)) != 0) goto fail1; return (0); Modified: head/sys/dev/sfxge/common/siena_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/siena_nvram.c Fri Dec 4 05:00:51 2015 (r291745) +++ head/sys/dev/sfxge/common/siena_nvram.c Fri Dec 4 06:51:37 2015 (r291746) @@ -54,7 +54,8 @@ siena_nvram_partn_size( goto fail1; } - if ((rc = efx_mcdi_nvram_info(enp, partn, sizep, NULL, NULL)) != 0) { + if ((rc = efx_mcdi_nvram_info(enp, partn, sizep, + NULL, NULL, NULL)) != 0) { goto fail2; } From owner-svn-src-all@freebsd.org Fri Dec 4 06:54:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21D86A403B7; Fri, 4 Dec 2015 06:54:48 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D283F1BD7; Fri, 4 Dec 2015 06:54:47 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB46skMg010725; Fri, 4 Dec 2015 06:54:46 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB46skXH010721; Fri, 4 Dec 2015 06:54:46 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512040654.tB46skXH010721@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 4 Dec 2015 06:54:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291747 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 06:54:48 -0000 Author: arybchik Date: Fri Dec 4 06:54:46 2015 New Revision: 291747 URL: https://svnweb.freebsd.org/changeset/base/291747 Log: sfxge: [EF10] support RxQ scattering control If, for example, a VF is configured to use a 1500 byte MTU, but the port it is attached to is set to 9000 bytes, overlength frames can be received by the VF. As Huntington scatters by default, these overlength packets would be scattered across several descriptors, with all except the last having the CONT bit set. To avoid this, disable scatter when creating RXQs if the firmware supports doing so, which all recent versions do. Then we only get a single descriptor from an overlength frame. This will have the CONT bit set to indicate it was truncated, so we can discard it. Submitted by: Mark Spender Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4354 Modified: head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/hunt_ev.c head/sys/dev/sfxge/common/hunt_nic.c head/sys/dev/sfxge/common/hunt_rx.c Modified: head/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Fri Dec 4 06:51:37 2015 (r291746) +++ head/sys/dev/sfxge/common/efx.h Fri Dec 4 06:54:46 2015 (r291747) @@ -1174,6 +1174,7 @@ typedef struct efx_nic_cfg_s { boolean_t enc_hw_tx_insert_vlan_enabled; /* Datapath firmware vadapter/vport/vswitch support */ boolean_t enc_datapath_cap_evb; + boolean_t enc_rx_disable_scatter_supported; /* External port identifier */ uint8_t enc_external_port; } efx_nic_cfg_t; Modified: head/sys/dev/sfxge/common/hunt_ev.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_ev.c Fri Dec 4 06:51:37 2015 (r291746) +++ head/sys/dev/sfxge/common/hunt_ev.c Fri Dec 4 06:54:46 2015 (r291747) @@ -528,10 +528,14 @@ hunt_ev_rx( if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_CONT) != 0) { /* + * This may be part of a scattered frame, or it may be a + * truncated frame if scatter is disabled on this RXQ. + * Overlength frames can be received if e.g. a VF is configured + * for 1500 MTU but connected to a port set to 9000 MTU + * (see bug56567). * FIXME: There is not yet any driver that supports scatter on * Huntington. Scatter support is required for OSX. */ - EFSYS_ASSERT(0); flags |= EFX_PKT_CONT; } Modified: head/sys/dev/sfxge/common/hunt_nic.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_nic.c Fri Dec 4 06:51:37 2015 (r291746) +++ head/sys/dev/sfxge/common/hunt_nic.c Fri Dec 4 06:54:46 2015 (r291747) @@ -920,6 +920,14 @@ hunt_get_datapath_caps( encp->enc_rx_batching_enabled = B_FALSE; } + /* Check if the firmware supports disabling scatter on RXQs */ + if (MCDI_CMD_DWORD_FIELD(&datapath_capabilities, + GET_CAPABILITIES_OUT_RX_DISABLE_SCATTER) == 1) { + encp->enc_rx_disable_scatter_supported = B_TRUE; + } else { + encp->enc_rx_disable_scatter_supported = B_FALSE; + } + return (0); fail2: Modified: head/sys/dev/sfxge/common/hunt_rx.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_rx.c Fri Dec 4 06:51:37 2015 (r291746) +++ head/sys/dev/sfxge/common/hunt_rx.c Fri Dec 4 06:54:46 2015 (r291747) @@ -46,7 +46,8 @@ efx_mcdi_init_rxq( __in uint32_t target_evq, __in uint32_t label, __in uint32_t instance, - __in efsys_mem_t *esmp) + __in efsys_mem_t *esmp, + __in boolean_t disable_scatter) { efx_mcdi_req_t req; uint8_t payload[ @@ -71,12 +72,13 @@ efx_mcdi_init_rxq( MCDI_IN_SET_DWORD(req, INIT_RXQ_IN_TARGET_EVQ, target_evq); MCDI_IN_SET_DWORD(req, INIT_RXQ_IN_LABEL, label); MCDI_IN_SET_DWORD(req, INIT_RXQ_IN_INSTANCE, instance); - MCDI_IN_POPULATE_DWORD_5(req, INIT_RXQ_IN_FLAGS, - INIT_RXQ_IN_FLAG_BUFF_MODE, 0, - INIT_RXQ_IN_FLAG_HDR_SPLIT, 0, - INIT_RXQ_IN_FLAG_TIMESTAMP, 0, - INIT_RXQ_IN_CRC_MODE, 0, - INIT_RXQ_IN_FLAG_PREFIX, 1); + MCDI_IN_POPULATE_DWORD_6(req, INIT_RXQ_IN_FLAGS, + INIT_RXQ_IN_FLAG_BUFF_MODE, 0, + INIT_RXQ_IN_FLAG_HDR_SPLIT, 0, + INIT_RXQ_IN_FLAG_TIMESTAMP, 0, + INIT_RXQ_IN_CRC_MODE, 0, + INIT_RXQ_IN_FLAG_PREFIX, 1, + INIT_RXQ_IN_FLAG_DISABLE_SCATTER, disable_scatter); MCDI_IN_SET_DWORD(req, INIT_RXQ_IN_OWNER_ID, 0); MCDI_IN_SET_DWORD(req, INIT_RXQ_IN_PORT_ID, EVB_PORT_ID_ASSIGNED); @@ -685,6 +687,7 @@ hunt_rx_qcreate( { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_rc_t rc; + boolean_t disable_scatter; _NOTE(ARGUNUSED(erp)) @@ -704,14 +707,21 @@ hunt_rx_qcreate( goto fail2; } + /* Scatter can only be disabled if the firmware supports doing so */ + if ((type != EFX_RXQ_TYPE_SCATTER) && + enp->en_nic_cfg.enc_rx_disable_scatter_supported) { + disable_scatter = B_TRUE; + } else { + disable_scatter = B_FALSE; + } + /* - * FIXME: Siena code handles different queue types (default, header - * split, scatter); we'll need to do something more here later, but - * all that stuff is TBD for now. + * Note: EFX_RXQ_TYPE_SPLIT_HEADER and EFX_RXQ_TYPE_SPLIT_PAYLOAD are + * not supported here. */ if ((rc = efx_mcdi_init_rxq(enp, n, eep->ee_index, label, index, - esmp)) != 0) + esmp, disable_scatter)) != 0) goto fail3; erp->er_eep = eep; From owner-svn-src-all@freebsd.org Fri Dec 4 07:54:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31EB8A40F87; Fri, 4 Dec 2015 07:54:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E97831114; Fri, 4 Dec 2015 07:54:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB47s5Ns027855; Fri, 4 Dec 2015 07:54:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB47s5Xm027854; Fri, 4 Dec 2015 07:54:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040754.tB47s5Xm027854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 07:54:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291748 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 07:54:06 -0000 Author: bdrewery Date: Fri Dec 4 07:54:04 2015 New Revision: 291748 URL: https://svnweb.freebsd.org/changeset/base/291748 Log: Rearrange some common logic. Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Fri Dec 4 06:54:46 2015 (r291747) +++ head/share/mk/bsd.subdir.mk Fri Dec 4 07:54:04 2015 (r291748) @@ -116,17 +116,17 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE # Work around parsing of .if nested in .for by putting .WAIT string into a var. __wait= .WAIT .for __target in ${ALL_SUBDIR_TARGETS} +# Only recurse on directly-called targets. I.e., don't recurse on dependencies +# such as 'install' becoming {before,real,after}install, just recurse +# 'install'. +.if make(${__target}) # Can ordering be skipped for this and SUBDIR_PARALLEL forced? -.if make(${__target}) && ${STANDALONE_SUBDIR_TARGETS:M${__target}} +.if ${STANDALONE_SUBDIR_TARGETS:M${__target}} _is_standalone_target= 1 SUBDIR:= ${SUBDIR:N.WAIT} .else _is_standalone_target= 0 .endif -# Only recurse on directly-called targets. I.e., don't recurse on dependencies -# such as 'install' becoming {before,real,after}install, just recurse -# 'install'. -.if make(${__target}) .if defined(SUBDIR_PARALLEL) || ${_is_standalone_target} == 1 __subdir_targets= .for __dir in ${SUBDIR} From owner-svn-src-all@freebsd.org Fri Dec 4 07:54:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC7EEA40FAC; Fri, 4 Dec 2015 07:54:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 613A712A6; Fri, 4 Dec 2015 07:54:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB47sDj5027904; Fri, 4 Dec 2015 07:54:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB47sDJj027903; Fri, 4 Dec 2015 07:54:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040754.tB47sDJj027903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 07:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291749 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 07:54:14 -0000 Author: bdrewery Date: Fri Dec 4 07:54:13 2015 New Revision: 291749 URL: https://svnweb.freebsd.org/changeset/base/291749 Log: Fix 'afterinstall' order not being respected after my changes in r291635. The problem was that 'afterinstall' was not coming after SUBDIRs were installed which was the expectation at least in sys/modules for kldxref. Reported by: np Pointyhat to: bdrewery Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Fri Dec 4 07:54:04 2015 (r291748) +++ head/share/mk/bsd.subdir.mk Fri Dec 4 07:54:13 2015 (r291749) @@ -39,7 +39,7 @@ ____: ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \ checkdpadd clean cleandepend cleandir cleanilinks \ cleanobj depend distribute files includes installconfig \ - installfiles installincludes install lint maninstall \ + installfiles installincludes realinstall lint maninstall \ manlint obj objlink regress tags \ ${SUBDIR_TARGETS} @@ -104,7 +104,7 @@ _SUBDIR_SH= \ _SUBDIR: .USEBEFORE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}target=${.TARGET}; \ + @${_+_}target=${.TARGET:realinstall=install}; \ for dir in ${SUBDIR:N.WAIT}; do ( ${_SUBDIR_SH} ); done .endif @@ -118,8 +118,9 @@ __wait= .WAIT .for __target in ${ALL_SUBDIR_TARGETS} # Only recurse on directly-called targets. I.e., don't recurse on dependencies # such as 'install' becoming {before,real,after}install, just recurse -# 'install'. -.if make(${__target}) +# 'install'. Despite that, 'realinstall' is special due to ordering issues +# with 'afterinstall'. +.if make(${__target}) || (${__target} == realinstall && make(install)) # Can ordering be skipped for this and SUBDIR_PARALLEL forced? .if ${STANDALONE_SUBDIR_TARGETS:M${__target}} _is_standalone_target= 1 @@ -142,7 +143,7 @@ __deps+= ${__target}_subdir_${__dep} .endif ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) - @${_+_}target=${__target}; \ + @${_+_}target=${__target:realinstall=install}; \ dir=${__dir}; \ ${_SUBDIR_SH}; .endif From owner-svn-src-all@freebsd.org Fri Dec 4 07:54:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F012A40FD3; Fri, 4 Dec 2015 07:54:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6547912C9; Fri, 4 Dec 2015 07:54:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB47sGra027951; Fri, 4 Dec 2015 07:54:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB47sGrf027950; Fri, 4 Dec 2015 07:54:16 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040754.tB47sGrf027950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 07:54:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291750 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 07:54:17 -0000 Author: bdrewery Date: Fri Dec 4 07:54:16 2015 New Revision: 291750 URL: https://svnweb.freebsd.org/changeset/base/291750 Log: The .if redirection on .WAIT is no longer needed with bmake. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Fri Dec 4 07:54:13 2015 (r291749) +++ head/share/mk/bsd.subdir.mk Fri Dec 4 07:54:16 2015 (r291750) @@ -113,8 +113,6 @@ ${SUBDIR:N.WAIT}: .PHONY .MAKE dir=${.TARGET}; \ ${_SUBDIR_SH}; -# Work around parsing of .if nested in .for by putting .WAIT string into a var. -__wait= .WAIT .for __target in ${ALL_SUBDIR_TARGETS} # Only recurse on directly-called targets. I.e., don't recurse on dependencies # such as 'install' becoming {before,real,after}install, just recurse @@ -131,7 +129,7 @@ _is_standalone_target= 0 .if defined(SUBDIR_PARALLEL) || ${_is_standalone_target} == 1 __subdir_targets= .for __dir in ${SUBDIR} -.if ${__wait} == ${__dir} +.if ${__dir} == .WAIT __subdir_targets+= .WAIT .else __subdir_targets+= ${__target}_subdir_${__dir} From owner-svn-src-all@freebsd.org Fri Dec 4 07:54:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E7B1A40FFB; Fri, 4 Dec 2015 07:54:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 778C7139F; Fri, 4 Dec 2015 07:54:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB47sJBG027996; Fri, 4 Dec 2015 07:54:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB47sJpj027995; Fri, 4 Dec 2015 07:54:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512040754.tB47sJpj027995@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 07:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291751 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 07:54:21 -0000 Author: bdrewery Date: Fri Dec 4 07:54:19 2015 New Revision: 291751 URL: https://svnweb.freebsd.org/changeset/base/291751 Log: Fix 'install*' and many other missing targets with DIRDEPS_BUILD. My changes in r291635 broke 'make install*' for DIRDEPS_BUILD but also revealed that some other targets were not guaranteed to be created if there was a SUBDIR defined. One example is 'installfiles' was never defined if SUBDIR was not empty. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Fri Dec 4 07:54:16 2015 (r291750) +++ head/share/mk/bsd.subdir.mk Fri Dec 4 07:54:19 2015 (r291751) @@ -56,12 +56,6 @@ STANDALONE_SUBDIR_TARGETS?= obj checkdpa _SUBDIR: .endif .endif -.if !target(_SUBDIR) - -.if defined(SUBDIR) -SUBDIR:=${SUBDIR} ${SUBDIR.yes} -SUBDIR:=${SUBDIR:u} -.endif DISTRIBUTION?= base .if !target(distribute) @@ -93,6 +87,14 @@ install: beforeinstall realinstall after .ORDER: beforeinstall realinstall afterinstall .endif +# SUBDIR recursing may be disabled for MK_DIRDEPS_BUILD +.if !target(_SUBDIR) + +.if defined(SUBDIR) +SUBDIR:=${SUBDIR} ${SUBDIR.yes} +SUBDIR:=${SUBDIR:u} +.endif + # Subdir code shared among 'make ', 'make ' and SUBDIR_PARALLEL. _SUBDIR_SH= \ if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \ @@ -151,11 +153,16 @@ ${__target}: ${__subdir_targets} .else ${__target}: _SUBDIR .endif # SUBDIR_PARALLEL || _is_standalone_target -.elif !target(${__target}) -${__target}: .endif # make(${__target}) .endfor # __target in ${ALL_SUBDIR_TARGETS} .endif # !target(_SUBDIR) +# Ensure all targets exist +.for __target in ${ALL_SUBDIR_TARGETS} +.if !target(${__target}) +${__target}: +.endif +.endfor + .endif From owner-svn-src-all@freebsd.org Fri Dec 4 07:55:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E326A40095; Fri, 4 Dec 2015 07:55:23 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com [17.110.69.252]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 512BC1881; Fri, 4 Dec 2015 07:55:23 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from [192.168.1.4] (c-24-6-178-251.hsd1.ca.comcast.net [24.6.178.251]) by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar 31 2015)) with ESMTPSA id <0NYT00OK1Q02CA00@mr11p00im-asmtp001.me.com>; Fri, 04 Dec 2015 07:55:16 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-12-04_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=1 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510090000 definitions=main-1512040146 User-Agent: Microsoft-MacOutlook/0.0.0.151105 Date: Thu, 03 Dec 2015 23:55:14 -0800 Subject: Re: svn commit: r291716 - in head: share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/dev/md sys/geom sys/kern sys/pc98/include sys/sys usr.sbin usr.sbin/camdd From: Ravi Pokala Sender: "Pokala, Ravi" To: "Kenneth D. Merry" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <75635FDB-E85F-4F0A-8EDC-8A29F8A095BE@panasas.com> Thread-topic: svn commit: r291716 - in head: share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/dev/md sys/geom sys/kern sys/pc98/include sys/sys usr.sbin usr.sbin/camdd References: <201512032054.tB3KsuUw037541@repo.freebsd.org> In-reply-to: <201512032054.tB3KsuUw037541@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 07:55:23 -0000 Hi Ken, A few questions: > Although these ioctls do not have a declared argument, they > both take a union ccb pointer. If we declare a size here, > the ioctl code in sys/kern/sys_generic.c will malloc and free > a buffer for either the CCB or the CCB pointer (depending on > how it is declared). Since we have to keep a copy of the > CCB (which is fairly large) anyway, having the ioctl malloc > and free a CCB for each call is wasteful. (a) How does that work? That is, how does the argument get to the ioctl handler in the kernel? (b) The CCB is large, but the CCB pointer is just a pointer; shouldn't that be passed in as the arg? Thanks, Ravi -----Original Message----- From: on behalf of "Kenneth D. Merry" Date: 2015-12-03, Thursday at 12:54 To: , , Subject: svn commit: r291716 - in head: share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/dev/md sys/geom sys/kern sys/pc98/include sys/sys usr.sbin usr.sbin/camdd >Author: ken >Date: Thu Dec 3 20:54:55 2015 >New Revision: 291716 >URL: https://svnweb.freebsd.org/changeset/base/291716 > >Log: > Add asynchronous command support to the pass(4) driver, and the new > camdd(8) utility. > > CCBs may be queued to the driver via the new CAMIOQUEUE ioctl, and > completed CCBs may be retrieved via the CAMIOGET ioctl. User > processes can use poll(2) or kevent(2) to get notification when > I/O has completed. > > While the existing CAMIOCOMMAND blocking ioctl interface only > supports user virtual data pointers in a CCB (generally only > one per CCB), the new CAMIOQUEUE ioctl supports user virtual and > physical address pointers, as well as user virtual and physical > scatter/gather lists. This allows user applications to have more > flexibility in their data handling operations. > > Kernel memory for data transferred via the queued interface is > allocated from the zone allocator in MAXPHYS sized chunks, and user > data is copied in and out. This is likely faster than the > vmapbuf()/vunmapbuf() method used by the CAMIOCOMMAND ioctl in > configurations with many processors (there are more TLB shootdowns > caused by the mapping/unmapping operation) but may not be as fast > as running with unmapped I/O. > > The new memory handling model for user requests also allows > applications to send CCBs with request sizes that are larger than > MAXPHYS. The pass(4) driver now limits queued requests to the I/O > size listed by the SIM driver in the maxio field in the Path > Inquiry (XPT_PATH_INQ) CCB. > > There are some things things would be good to add: > > 1. Come up with a way to do unmapped I/O on multiple buffers. > Currently the unmapped I/O interface operates on a struct bio, > which includes only one address and length. It would be nice > to be able to send an unmapped scatter/gather list down to > busdma. This would allow eliminating the copy we currently do > for data. > > 2. Add an ioctl to list currently outstanding CCBs in the various > queues. > > 3. Add an ioctl to cancel a request, or use the XPT_ABORT CCB to do > that. > > 4. Test physical address support. Virtual pointers and scatter > gather lists have been tested, but I have not yet tested > physical addresses or scatter/gather lists. > > 5. Investigate multiple queue support. At the moment there is one > queue of commands per pass(4) device. If multiple processes > open the device, they will submit I/O into the same queue and > get events for the same completions. This is probably the right > model for most applications, but it is something that could be > changed later on. > > Also, add a new utility, camdd(8) that uses the asynchronous pass(4) > driver interface. > > This utility is intended to be a basic data transfer/copy utility, > a simple benchmark utility, and an example of how to use the > asynchronous pass(4) interface. > > It can copy data to and from pass(4) devices using any target queue > depth, starting offset and blocksize for the input and ouptut devices. > It currently only supports SCSI devices, but could be easily extended > to support ATA devices. > > It can also copy data to and from regular files, block devices, tape > devices, pipes, stdin, and stdout. It does not support queueing > multiple commands to any of those targets, since it uses the standard > read(2)/write(2)/writev(2)/readv(2) system calls. > > The I/O is done by two threads, one for the reader and one for the > writer. The reader thread sends completed read requests to the > writer thread in strictly sequential order, even if they complete > out of order. That could be modified later on for random I/O patterns > or slightly out of order I/O. > > camdd(8) uses kqueue(2)/kevent(2) to get I/O completion events from > the pass(4) driver and also to send request notifications internally. > > For pass(4) devcies, camdd(8) uses a single buffer (CAM_DATA_VADDR) > per CAM CCB on the reading side, and a scatter/gather list > (CAM_DATA_SG) on the writing side. In addition to testing both > interfaces, this makes any potential reblocking of I/O easier. No > data is copied between the reader and the writer, but rather the > reader's buffers are split into multiple I/O requests or combined > into a single I/O request depending on the input and output blocksize. > > For the file I/O path, camdd(8) also uses a single buffer (read(2), > write(2), pread(2) or pwrite(2)) on reads, and a scatter/gather list > (readv(2), writev(2), preadv(2), pwritev(2)) on writes. > > Things that would be nice to do for camdd(8) eventually: > > 1. Add support for I/O pattern generation. Patterns like all > zeros, all ones, LBA-based patterns, random patterns, etc. Right > Now you can always use /dev/zero, /dev/random, etc. > > 2. Add support for a "sink" mode, so we do only reads with no > writes. Right now, you can use /dev/null. > > 3. Add support for automatic queue depth probing, so that we can > figure out the right queue depth on the input and output side > for maximum throughput. At the moment it defaults to 6. > > 4. Add support for SATA device passthrough I/O. > > 5. Add support for random LBAs and/or lengths on the input and > output sides. > > 6. Track average per-I/O latency and busy time. The busy time > and latency could also feed in to the automatic queue depth > determination. > > sys/cam/scsi/scsi_pass.h: > Define two new ioctls, CAMIOQUEUE and CAMIOGET, that queue > and fetch asynchronous CAM CCBs respectively. > > Although these ioctls do not have a declared argument, they > both take a union ccb pointer. If we declare a size here, > the ioctl code in sys/kern/sys_generic.c will malloc and free > a buffer for either the CCB or the CCB pointer (depending on > how it is declared). Since we have to keep a copy of the > CCB (which is fairly large) anyway, having the ioctl malloc > and free a CCB for each call is wasteful. > > sys/cam/scsi/scsi_pass.c: > Add asynchronous CCB support. > > Add two new ioctls, CAMIOQUEUE and CAMIOGET. > > CAMIOQUEUE adds a CCB to the incoming queue. The CCB is > executed immediately (and moved to the active queue) if it > is an immediate CCB, but otherwise it will be executed > in passstart() when a CCB is available from the transport layer. > > When CCBs are completed (because they are immediate or > passdone() if they are queued), they are put on the done > queue. > > If we get the final close on the device before all pending > I/O is complete, all active I/O is moved to the abandoned > queue and we increment the peripheral reference count so > that the peripheral driver instance doesn't go away before > all pending I/O is done. > > The new passcreatezone() function is called on the first > call to the CAMIOQUEUE ioctl on a given device to allocate > the UMA zones for I/O requests and S/G list buffers. This > may be good to move off to a taskqueue at some point. > The new passmemsetup() function allocates memory and > scatter/gather lists to hold the user's data, and copies > in any data that needs to be written. For virtual pointers > (CAM_DATA_VADDR), the kernel buffer is malloced from the > new pass(4) driver malloc bucket. For virtual > scatter/gather lists (CAM_DATA_SG), buffers are allocated > from a new per-pass(9) UMA zone in MAXPHYS-sized chunks. > Physical pointers are passed in unchanged. We have support > for up to 16 scatter/gather segments (for the user and > kernel S/G lists) in the default struct pass_io_req, so > requests with longer S/G lists require an extra kernel malloc. > > The new passcopysglist() function copies a user scatter/gather > list to a kernel scatter/gather list. The number of elements > in each list may be different, but (obviously) the amount of data > stored has to be identical. > > The new passmemdone() function copies data out for the > CAM_DATA_VADDR and CAM_DATA_SG cases. > > The new passiocleanup() function restores data pointers in > user CCBs and frees memory. > > Add new functions to support kqueue(2)/kevent(2): > > passreadfilt() tells kevent whether or not the done > queue is empty. > > passkqfilter() adds a knote to our list. > > passreadfiltdetach() removes a knote from our list. > > Add a new function, passpoll(), for poll(2)/select(2) > to use. > > Add devstat(9) support for the queued CCB path. > > sys/cam/ata/ata_da.c: > Add support for the BIO_VLIST bio type. > > sys/cam/cam_ccb.h: > Add a new enumeration for the xflags field in the CCB header. > (This doesn't change the CCB header, just adds an enumeration to > use.) > > sys/cam/cam_xpt.c: > Add a new function, xpt_setup_ccb_flags(), that allows specifying > CCB flags. > > sys/cam/cam_xpt.h: > Add a prototype for xpt_setup_ccb_flags(). > > sys/cam/scsi/scsi_da.c: > Add support for BIO_VLIST. > > sys/dev/md/md.c: > Add BIO_VLIST support to md(4). > > sys/geom/geom_disk.c: > Add BIO_VLIST support to the GEOM disk class. Re-factor the I/O size > limiting code in g_disk_start() a bit. > > sys/kern/subr_bus_dma.c: > Change _bus_dmamap_load_vlist() to take a starting offset and > length. > > Add a new function, _bus_dmamap_load_pages(), that will load a list > of physical pages starting at an offset. > > Update _bus_dmamap_load_bio() to allow loading BIO_VLIST bios. > Allow unmapped I/O to start at an offset. > > sys/kern/subr_uio.c: > Add two new functions, physcopyin_vlist() and physcopyout_vlist(). > > sys/pc98/include/bus.h: > Guard kernel-only parts of the pc98 machine/bus.h header with > #ifdef _KERNEL. > > This allows userland programs to include to get the > definition of bus_addr_t and bus_size_t. > > sys/sys/bio.h: > Add a new bio flag, BIO_VLIST. > > sys/sys/uio.h: > Add prototypes for physcopyin_vlist() and physcopyout_vlist(). > > share/man/man4/pass.4: > Document the CAMIOQUEUE and CAMIOGET ioctls. > > usr.sbin/Makefile: > Add camdd. > > usr.sbin/camdd/Makefile: > Add a makefile for camdd(8). > > usr.sbin/camdd/camdd.8: > Man page for camdd(8). > > usr.sbin/camdd/camdd.c: > The new camdd(8) utility. > > Sponsored by: Spectra Logic > MFC after: 1 week > >Added: > head/usr.sbin/camdd/ > head/usr.sbin/camdd/Makefile (contents, props changed) > head/usr.sbin/camdd/camdd.8 (contents, props changed) > head/usr.sbin/camdd/camdd.c (contents, props changed) >Modified: > head/share/man/man4/pass.4 > head/sys/cam/ata/ata_da.c > head/sys/cam/cam_ccb.h > head/sys/cam/cam_xpt.c > head/sys/cam/cam_xpt.h > head/sys/cam/scsi/scsi_da.c > head/sys/cam/scsi/scsi_pass.c > head/sys/cam/scsi/scsi_pass.h > head/sys/dev/md/md.c > head/sys/geom/geom_disk.c > head/sys/geom/geom_io.c > head/sys/kern/subr_bus_dma.c > head/sys/kern/subr_uio.c > head/sys/pc98/include/bus.h > head/sys/sys/bio.h > head/sys/sys/uio.h > head/usr.sbin/Makefile > >Modified: head/share/man/man4/pass.4 >============================================================================== >--- head/share/man/man4/pass.4 Thu Dec 3 19:52:44 2015 (r291715) >+++ head/share/man/man4/pass.4 Thu Dec 3 20:54:55 2015 (r291716) >@@ -27,7 +27,7 @@ > .\" > .\" $FreeBSD$ > .\" >-.Dd October 10, 1998 >+.Dd March 17, 2015 > .Dt PASS 4 > .Os > .Sh NAME >@@ -53,9 +53,13 @@ The > .Nm > driver attaches to every > .Tn SCSI >+and >+.Tn ATA > device found in the system. > Since it attaches to every device, it provides a generic means of accessing > .Tn SCSI >+and >+.Tn ATA > devices, and allows the user to access devices which have no > "standard" peripheral driver associated with them. > .Sh KERNEL CONFIGURATION >@@ -65,10 +69,12 @@ device in the kernel; > .Nm > devices are automatically allocated as > .Tn SCSI >+and >+.Tn ATA > devices are found. > .Sh IOCTLS >-.Bl -tag -width 012345678901234 >-.It CAMIOCOMMAND >+.Bl -tag -width 5n >+.It CAMIOCOMMAND union ccb * > This ioctl takes most kinds of CAM CCBs and passes them through to the CAM > transport layer for action. > Note that some CCB types are not allowed >@@ -79,7 +85,7 @@ Some examples of xpt-only CCBs are XPT_S > XPT_DEV_MATCH, XPT_RESET_BUS, XPT_SCAN_LUN, XPT_ENG_INQ, and XPT_ENG_EXEC. > These CCB types have various attributes that make it illogical or > impossible to service them through the passthrough interface. >-.It CAMGETPASSTHRU >+.It CAMGETPASSTHRU union ccb * > This ioctl takes an XPT_GDEVLIST CCB, and returns the passthrough device > corresponding to the device in question. > Although this ioctl is available through the >@@ -90,6 +96,109 @@ ioctl. > It is probably more useful to issue this ioctl through the > .Xr xpt 4 > device. >+.It CAMIOQUEUE union ccb * >+Queue a CCB to the >+.Xr pass 4 >+driver to be executed asynchronously. >+The caller may use >+.Xr select 2 , >+.Xr poll 2 >+or >+.Xr kevent 2 >+to receive notification when the CCB has completed. >+.Pp >+This ioctl takes most CAM CCBs, but some CCB types are not allowed through >+the pass device, and must be sent through the >+.Xr xpt 4 >+device instead. >+Some examples of xpt-only CCBs are XPT_SCAN_BUS, >+XPT_DEV_MATCH, XPT_RESET_BUS, XPT_SCAN_LUN, XPT_ENG_INQ, and XPT_ENG_EXEC. >+These CCB types have various attributes that make it illogical or >+impossible to service them through the passthrough interface. >+.Pp >+Although the >+.Dv CAMIOQUEUE >+ioctl is not defined to take an argument, it does require a >+pointer to a union ccb. >+It is not defined to take an argument to avoid an extra malloc and copy >+inside the generic >+.Xr ioctl 2 >+handler. >+.pp >+The completed CCB will be returned via the >+.Dv CAMIOGET >+ioctl. >+An error will only be returned from the >+.Dv CAMIOQUEUE >+ioctl if there is an error allocating memory for the request or copying >+memory from userland. >+All other errors will be reported as standard CAM CCB status errors. >+Since the CCB is not copied back to the user process from the pass driver >+in the >+.Dv CAMIOQUEUE >+ioctl, the user's passed-in CCB will not be modfied. >+This is the case even with immediate CCBs. >+Instead, the completed CCB must be retrieved via the >+.Dv CAMIOGET >+ioctl and the status examined. >+.Pp >+Multiple CCBs may be queued via the >+.Dv CAMIOQUEUE >+ioctl at any given time, and they may complete in a different order than >+the order that they were submitted. >+The caller must take steps to identify CCBs that are queued and completed. >+The >+.Dv periph_priv >+structure inside struct ccb_hdr is available for userland use with the >+.Dv CAMIOQUEUE >+and >+.Dv CAMIOGET >+ioctls, and will be preserved across calls. >+Also, the periph_links linked list pointers inside struct ccb_hdr are >+available for userland use with the >+.Dv CAMIOQUEUE >+and >+.Dv CAMIOGET >+ioctls and will be preserved across calls. >+.It CAMIOGET union ccb * >+Retrieve completed CAM CCBs queued via the >+.Dv CAMIOQUEUE >+ioctl. >+An error will only be returned from the >+.Dv CAMIOGET >+ioctl if the >+.Xr pass 4 >+driver fails to copy data to the user process or if there are no completed >+CCBs available to retrieve. >+If no CCBs are available to retrieve, >+errno will be set to >+.Dv ENOENT . >+.Pp >+All other errors will be reported as standard CAM CCB status errors. >+.Pp >+Although the >+.Dv CAMIOGET >+ioctl is not defined to take an argument, it does require a >+pointer to a union ccb. >+It is not defined to take an argument to avoid an extra malloc and copy >+inside the generic >+.Xr ioctl 2 >+handler. >+.Pp >+The pass driver will report via >+.Xr select 2 , >+.Xr poll 2 >+or >+.Xr kevent 2 >+when a CCB has completed. >+One CCB may be retrieved per >+.Dv CAMIOGET >+call. >+CCBs may be returned in an order different than the order they were >+submitted. >+So the caller should use the >+.Dv periph_priv >+area inside the CCB header to store pointers to identifying information. > .El > .Sh FILES > .Bl -tag -width /dev/passn -compact >@@ -103,18 +212,21 @@ CAM subsystem. > .Sh DIAGNOSTICS > None. > .Sh SEE ALSO >+.Xr kqueue 2 , >+.Xr poll 2 , >+.Xr select 2 , > .Xr cam 3 , > .Xr cam_cdbparse 3 , > .Xr cam 4 , >+.Xr cd 4 , >+.Xr ctl 4 , >+.Xr da 4 , >+.Xr sa 4 , > .Xr xpt 4 , >-.Xr camcontrol 8 >+.Xr camcontrol 8 , >+.Xr camdd 8 > .Sh HISTORY > The CAM passthrough driver first appeared in > .Fx 3.0 . > .Sh AUTHORS > .An Kenneth Merry Aq Mt ken@FreeBSD.org >-.Sh BUGS >-It might be nice to have a way to asynchronously send CCBs through the >-passthrough driver. >-This would probably require some sort of read/write >-interface or an asynchronous ioctl interface. > >Modified: head/sys/cam/ata/ata_da.c >============================================================================== >--- head/sys/cam/ata/ata_da.c Thu Dec 3 19:52:44 2015 (r291715) >+++ head/sys/cam/ata/ata_da.c Thu Dec 3 20:54:55 2015 (r291716) >@@ -1543,12 +1543,26 @@ adastart(struct cam_periph *periph, unio > } > switch (bp->bio_cmd) { > case BIO_WRITE: >- softc->flags |= ADA_FLAG_DIRTY; >- /* FALLTHROUGH */ > case BIO_READ: > { > uint64_t lba = bp->bio_pblkno; > uint16_t count = bp->bio_bcount / softc->params.secsize; >+ void *data_ptr; >+ int rw_op; >+ >+ if (bp->bio_cmd == BIO_WRITE) { >+ softc->flags |= ADA_FLAG_DIRTY; >+ rw_op = CAM_DIR_OUT; >+ } else { >+ rw_op = CAM_DIR_IN; >+ } >+ >+ data_ptr = bp->bio_data; >+ if ((bp->bio_flags & (BIO_UNMAPPED|BIO_VLIST)) != 0) { >+ rw_op |= CAM_DATA_BIO; >+ data_ptr = bp; >+ } >+ > #ifdef ADA_TEST_FAILURE > int fail = 0; > >@@ -1593,12 +1607,9 @@ adastart(struct cam_periph *periph, unio > cam_fill_ataio(ataio, > ada_retry_count, > adadone, >- (bp->bio_cmd == BIO_READ ? CAM_DIR_IN : >- CAM_DIR_OUT) | ((bp->bio_flags & BIO_UNMAPPED) >- != 0 ? CAM_DATA_BIO : 0), >+ rw_op, > tag_code, >- ((bp->bio_flags & BIO_UNMAPPED) != 0) ? (void *)bp : >- bp->bio_data, >+ data_ptr, > bp->bio_bcount, > ada_default_timeout*1000); > > >Modified: head/sys/cam/cam_ccb.h >============================================================================== >--- head/sys/cam/cam_ccb.h Thu Dec 3 19:52:44 2015 (r291715) >+++ head/sys/cam/cam_ccb.h Thu Dec 3 20:54:55 2015 (r291716) >@@ -109,6 +109,12 @@ typedef enum { > CAM_UNLOCKED = 0x80000000 /* Call callback without lock. */ > } ccb_flags; > >+typedef enum { >+ CAM_USER_DATA_ADDR = 0x00000001,/* Userspace data pointers */ >+ CAM_SG_FORMAT_IOVEC = 0x00000002,/* iovec instead of busdma S/G*/ >+ CAM_UNMAPPED_BUF = 0x00000004 /* use unmapped I/O */ >+} ccb_xflags; >+ > /* XPT Opcodes for xpt_action */ > typedef enum { > /* Function code flags are bits greater than 0xff */ > >Modified: head/sys/cam/cam_xpt.c >============================================================================== >--- head/sys/cam/cam_xpt.c Thu Dec 3 19:52:44 2015 (r291715) >+++ head/sys/cam/cam_xpt.c Thu Dec 3 20:54:55 2015 (r291716) >@@ -3333,7 +3333,8 @@ xpt_merge_ccb(union ccb *master_ccb, uni > } > > void >-xpt_setup_ccb(struct ccb_hdr *ccb_h, struct cam_path *path, u_int32_t priority) >+xpt_setup_ccb_flags(struct ccb_hdr *ccb_h, struct cam_path *path, >+ u_int32_t priority, u_int32_t flags) > { > > CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_setup_ccb\n")); >@@ -3351,10 +3352,16 @@ xpt_setup_ccb(struct ccb_hdr *ccb_h, str > ccb_h->target_lun = CAM_TARGET_WILDCARD; > } > ccb_h->pinfo.index = CAM_UNQUEUED_INDEX; >- ccb_h->flags = 0; >+ ccb_h->flags = flags; > ccb_h->xflags = 0; > } > >+void >+xpt_setup_ccb(struct ccb_hdr *ccb_h, struct cam_path *path, u_int32_t priority) >+{ >+ xpt_setup_ccb_flags(ccb_h, path, priority, /*flags*/ 0); >+} >+ > /* Path manipulation functions */ > cam_status > xpt_create_path(struct cam_path **new_path_ptr, struct cam_periph *perph, > >Modified: head/sys/cam/cam_xpt.h >============================================================================== >--- head/sys/cam/cam_xpt.h Thu Dec 3 19:52:44 2015 (r291715) >+++ head/sys/cam/cam_xpt.h Thu Dec 3 20:54:55 2015 (r291716) >@@ -70,6 +70,10 @@ void xpt_action_default(union ccb *new > union ccb *xpt_alloc_ccb(void); > union ccb *xpt_alloc_ccb_nowait(void); > void xpt_free_ccb(union ccb *free_ccb); >+void xpt_setup_ccb_flags(struct ccb_hdr *ccb_h, >+ struct cam_path *path, >+ u_int32_t priority, >+ u_int32_t flags); > void xpt_setup_ccb(struct ccb_hdr *ccb_h, > struct cam_path *path, > u_int32_t priority); > >Modified: head/sys/cam/scsi/scsi_da.c >============================================================================== >--- head/sys/cam/scsi/scsi_da.c Thu Dec 3 19:52:44 2015 (r291715) >+++ head/sys/cam/scsi/scsi_da.c Thu Dec 3 20:54:55 2015 (r291716) >@@ -2328,29 +2328,40 @@ skipstate: > > switch (bp->bio_cmd) { > case BIO_WRITE: >- softc->flags |= DA_FLAG_DIRTY; >- /* FALLTHROUGH */ > case BIO_READ: >+ { >+ void *data_ptr; >+ int rw_op; >+ >+ if (bp->bio_cmd == BIO_WRITE) { >+ softc->flags |= DA_FLAG_DIRTY; >+ rw_op = SCSI_RW_WRITE; >+ } else { >+ rw_op = SCSI_RW_READ; >+ } >+ >+ data_ptr = bp->bio_data; >+ if ((bp->bio_flags & (BIO_UNMAPPED|BIO_VLIST)) != 0) { >+ rw_op |= SCSI_RW_BIO; >+ data_ptr = bp; >+ } >+ > scsi_read_write(&start_ccb->csio, > /*retries*/da_retry_count, > /*cbfcnp*/dadone, > /*tag_action*/tag_code, >- /*read_op*/(bp->bio_cmd == BIO_READ ? >- SCSI_RW_READ : SCSI_RW_WRITE) | >- ((bp->bio_flags & BIO_UNMAPPED) != 0 ? >- SCSI_RW_BIO : 0), >+ rw_op, > /*byte2*/0, > softc->minimum_cmd_size, > /*lba*/bp->bio_pblkno, > /*block_count*/bp->bio_bcount / > softc->params.secsize, >- /*data_ptr*/ (bp->bio_flags & >- BIO_UNMAPPED) != 0 ? (void *)bp : >- bp->bio_data, >+ data_ptr, > /*dxfer_len*/ bp->bio_bcount, > /*sense_len*/SSD_FULL_SIZE, > da_default_timeout * 1000); > break; >+ } > case BIO_FLUSH: > /* > * BIO_FLUSH doesn't currently communicate > >Modified: head/sys/cam/scsi/scsi_pass.c >============================================================================== >--- head/sys/cam/scsi/scsi_pass.c Thu Dec 3 19:52:44 2015 (r291715) >+++ head/sys/cam/scsi/scsi_pass.c Thu Dec 3 20:54:55 2015 (r291716) >@@ -28,27 +28,39 @@ > #include > __FBSDID("$FreeBSD$"); > >+#include "opt_kdtrace.h" >+ > #include > #include > #include >+#include > #include > #include >-#include >-#include >-#include >-#include >+#include > #include >+#include >+#include >+#include > #include >+#include >+#include >+#include > #include >+#include >+#include >+#include >+ >+#include > > #include > #include > #include > #include >+#include > #include > #include >-#include > #include >+#include > > #include > #include >@@ -57,7 +69,11 @@ typedef enum { > PASS_FLAG_OPEN = 0x01, > PASS_FLAG_LOCKED = 0x02, > PASS_FLAG_INVALID = 0x04, >- PASS_FLAG_INITIAL_PHYSPATH = 0x08 >+ PASS_FLAG_INITIAL_PHYSPATH = 0x08, >+ PASS_FLAG_ZONE_INPROG = 0x10, >+ PASS_FLAG_ZONE_VALID = 0x20, >+ PASS_FLAG_UNMAPPED_CAPABLE = 0x40, >+ PASS_FLAG_ABANDONED_REF_SET = 0x80 > } pass_flags; > > typedef enum { >@@ -65,38 +81,104 @@ typedef enum { > } pass_state; > > typedef enum { >- PASS_CCB_BUFFER_IO >+ PASS_CCB_BUFFER_IO, >+ PASS_CCB_QUEUED_IO > } pass_ccb_types; > > #define ccb_type ppriv_field0 >-#define ccb_bp ppriv_ptr1 >+#define ccb_ioreq ppriv_ptr1 > >-struct pass_softc { >- pass_state state; >- pass_flags flags; >- u_int8_t pd_type; >- union ccb saved_ccb; >- int open_count; >- u_int maxio; >- struct devstat *device_stats; >- struct cdev *dev; >- struct cdev *alias_dev; >- struct task add_physpath_task; >+/* >+ * The maximum number of memory segments we preallocate. >+ */ >+#define PASS_MAX_SEGS 16 >+ >+typedef enum { >+ PASS_IO_NONE = 0x00, >+ PASS_IO_USER_SEG_MALLOC = 0x01, >+ PASS_IO_KERN_SEG_MALLOC = 0x02, >+ PASS_IO_ABANDONED = 0x04 >+} pass_io_flags; >+ >+struct pass_io_req { >+ union ccb ccb; >+ union ccb *alloced_ccb; >+ union ccb *user_ccb_ptr; >+ camq_entry user_periph_links; >+ ccb_ppriv_area user_periph_priv; >+ struct cam_periph_map_info mapinfo; >+ pass_io_flags flags; >+ ccb_flags data_flags; >+ int num_user_segs; >+ bus_dma_segment_t user_segs[PASS_MAX_SEGS]; >+ int num_kern_segs; >+ bus_dma_segment_t kern_segs[PASS_MAX_SEGS]; >+ bus_dma_segment_t *user_segptr; >+ bus_dma_segment_t *kern_segptr; >+ int num_bufs; >+ uint32_t dirs[CAM_PERIPH_MAXMAPS]; >+ uint32_t lengths[CAM_PERIPH_MAXMAPS]; >+ uint8_t *user_bufs[CAM_PERIPH_MAXMAPS]; >+ uint8_t *kern_bufs[CAM_PERIPH_MAXMAPS]; >+ struct bintime start_time; >+ TAILQ_ENTRY(pass_io_req) links; > }; > >+struct pass_softc { >+ pass_state state; >+ pass_flags flags; >+ u_int8_t pd_type; >+ union ccb saved_ccb; >+ int open_count; >+ u_int maxio; >+ struct devstat *device_stats; >+ struct cdev *dev; >+ struct cdev *alias_dev; >+ struct task add_physpath_task; >+ struct task shutdown_kqueue_task; >+ struct selinfo read_select; >+ TAILQ_HEAD(, pass_io_req) incoming_queue; >+ TAILQ_HEAD(, pass_io_req) active_queue; >+ TAILQ_HEAD(, pass_io_req) abandoned_queue; >+ TAILQ_HEAD(, pass_io_req) done_queue; >+ struct cam_periph *periph; >+ char zone_name[12]; >+ char io_zone_name[12]; >+ uma_zone_t pass_zone; >+ uma_zone_t pass_io_zone; >+ size_t io_zone_size; >+}; > > static d_open_t passopen; > static d_close_t passclose; > static d_ioctl_t passioctl; > static d_ioctl_t passdoioctl; >+static d_poll_t passpoll; >+static d_kqfilter_t passkqfilter; >+static void passreadfiltdetach(struct knote *kn); >+static int passreadfilt(struct knote *kn, long hint); > > static periph_init_t passinit; > static periph_ctor_t passregister; > static periph_oninv_t passoninvalidate; > static periph_dtor_t passcleanup; >-static void pass_add_physpath(void *context, int pending); >+static periph_start_t passstart; >+static void pass_shutdown_kqueue(void *context, int pending); >+static void pass_add_physpath(void *context, int pending); > static void passasync(void *callback_arg, u_int32_t code, > struct cam_path *path, void *arg); >+static void passdone(struct cam_periph *periph, >+ union ccb *done_ccb); >+static int passcreatezone(struct cam_periph *periph); >+static void passiocleanup(struct pass_softc *softc, >+ struct pass_io_req *io_req); >+static int passcopysglist(struct cam_periph *periph, >+ struct pass_io_req *io_req, >+ ccb_flags direction); >+static int passmemsetup(struct cam_periph *periph, >+ struct pass_io_req *io_req); >+static int passmemdone(struct cam_periph *periph, >+ struct pass_io_req *io_req); > static int passerror(union ccb *ccb, u_int32_t cam_flags, > u_int32_t sense_flags); > static int passsendccb(struct cam_periph *periph, union ccb *ccb, >@@ -116,9 +198,19 @@ static struct cdevsw pass_cdevsw = { > .d_open = passopen, > .d_close = passclose, > .d_ioctl = passioctl, >+ .d_poll = passpoll, >+ .d_kqfilter = passkqfilter, > .d_name = "pass", > }; > >+static struct filterops passread_filtops = { >+ .f_isfd = 1, >+ .f_detach = passreadfiltdetach, >+ .f_event = passreadfilt >+}; >+ >+static MALLOC_DEFINE(M_SCSIPASS, "scsi_pass", "scsi passthrough buffers"); >+ > static void > passinit(void) > { >@@ -138,6 +230,60 @@ passinit(void) > } > > static void >+passrejectios(struct cam_periph *periph) >+{ >+ struct pass_io_req *io_req, *io_req2; >+ struct pass_softc *softc; >+ >+ softc = (struct pass_softc *)periph->softc; >+ >+ /* >+ * The user can no longer get status for I/O on the done queue, so >+ * clean up all outstanding I/O on the done queue. >+ */ >+ TAILQ_FOREACH_SAFE(io_req, &softc->done_queue, links, io_req2) { >+ TAILQ_REMOVE(&softc->done_queue, io_req, links); >+ passiocleanup(softc, io_req); >+ uma_zfree(softc->pass_zone, io_req); >+ } >+ >+ /* >+ * The underlying device is gone, so we can't issue these I/Os. >+ * The devfs node has been shut down, so we can't return status to >+ * the user. Free any I/O left on the incoming queue. >+ */ >+ TAILQ_FOREACH_SAFE(io_req, &softc->incoming_queue, links, io_req2) { >+ TAILQ_REMOVE(&softc->incoming_queue, io_req, links); >+ passiocleanup(softc, io_req); >+ uma_zfree(softc->pass_zone, io_req); >+ } >+ >+ /* >+ * Normally we would put I/Os on the abandoned queue and acquire a >+ * reference when we saw the final close. But, the device went >+ * away and devfs may have moved everything off to deadfs by the >+ * time the I/O done callback is called; as a result, we won't see >+ * any more closes. So, if we have any active I/Os, we need to put >+ * them on the abandoned queue. When the abandoned queue is empty, >+ * we'll release the remaining reference (see below) to the peripheral. >+ */ >+ TAILQ_FOREACH_SAFE(io_req, &softc->active_queue, links, io_req2) { >+ TAILQ_REMOVE(&softc->active_queue, io_req, links); >+ io_req->flags |= PASS_IO_ABANDONED; >+ TAILQ_INSERT_TAIL(&softc->abandoned_queue, io_req, links); >+ } >+ >+ /* >+ * If we put any I/O on the abandoned queue, acquire a reference. >+ */ >+ if ((!TAILQ_EMPTY(&softc->abandoned_queue)) >+ && ((softc->flags & PASS_FLAG_ABANDONED_REF_SET) == 0)) { >+ cam_periph_doacquire(periph); >+ softc->flags |= PASS_FLAG_ABANDONED_REF_SET; >+ } >+} >+ >+static void > passdevgonecb(void *arg) > { > struct cam_periph *periph; >@@ -165,17 +311,26 @@ passdevgonecb(void *arg) > > /* > * Release the reference held for the device node, it is gone now. >+ * Accordingly, inform all queued I/Os of their fate. > */ > cam_periph_release_locked(periph); >+ passrejectios(periph); > > /* >- * We reference the lock directly here, instead of using >+ * We reference the SIM lock directly here, instead of using > * cam_periph_unlock(). The reason is that the final call to > * cam_periph_release_locked() above could result in the periph > * getting freed. If that is the case, dereferencing the periph > * with a cam_periph_unlock() call would cause a page fault. > */ > mtx_unlock(mtx); >+ >+ /* >+ * We have to remove our kqueue context from a thread because it >+ * may sleep. It would be nice if we could get a callback from >+ * kqueue when it is done cleaning up resources. >+ */ >+ taskqueue_enqueue(taskqueue_thread, &softc->shutdown_kqueue_task); > } > > static void >@@ -197,12 +352,6 @@ passoninvalidate(struct cam_periph *peri > * when it has cleaned up its state. > */ > destroy_dev_sched_cb(softc->dev, passdevgonecb, periph); >- >- /* >- * XXX Return all queued I/O with ENXIO. >- * XXX Handle any transactions queued to the card >- * with XPT_ABORT_CCB. >- */ > } > > static void >@@ -212,9 +361,40 @@ passcleanup(struct cam_periph *periph) > > softc = (struct pass_softc *)periph->softc; > >+ cam_periph_assert(periph, MA_OWNED); >+ KASSERT(TAILQ_EMPTY(&softc->active_queue), >+ ("%s called when there are commands on the active queue!\n", >+ __func__)); >+ KASSERT(TAILQ_EMPTY(&softc->abandoned_queue), >+ ("%s called when there are commands on the abandoned queue!\n", >+ __func__)); >+ KASSERT(TAILQ_EMPTY(&softc->incoming_queue), >+ ("%s called when there are commands on the incoming queue!\n", >+ __func__)); >+ KASSERT(TAILQ_EMPTY(&softc->done_queue), >+ ("%s called when there are commands on the done queue!\n", >+ __func__)); >+ > devstat_remove_entry(softc->device_stats); > > cam_periph_unlock(periph); >+ >+ /* >+ * We call taskqueue_drain() for the physpath task to make sure it >+ * is complete. We drop the lock because this can potentially >+ * sleep. XXX KDM that is bad. Need a way to get a callback when >+ * a taskqueue is drained. >+ * >+ * Note that we don't drain the kqueue shutdown task queue. This >+ * is because we hold a reference on the periph for kqueue, and >+ * release that reference from the kqueue shutdown task queue. So >+ * we cannot come into this routine unless we've released that >+ * reference. Also, because that could be the last reference, we >+ * could be called from the cam_periph_release() call in >+ * pass_shutdown_kqueue(). In that case, the taskqueue_drain() >+ * would deadlock. It would be preferable if we had a way to >+ * get a callback when a taskqueue is done. >+ */ > taskqueue_drain(taskqueue_thread, &softc->add_physpath_task); > > cam_periph_lock(periph); >@@ -223,10 +403,29 @@ passcleanup(struct cam_periph *periph) > } > > static void >+pass_shutdown_kqueue(void *context, int pending) >+{ >+ struct cam_periph *periph; >+ struct pass_softc *softc; >+ >+ periph = context; >+ softc = periph->softc; >+ >+ knlist_clear(&softc->read_select.si_note, /*is_locked*/ 0); >+ knlist_destroy(&softc->read_select.si_note); >+ >+ /* >+ * Release the reference we held for kqueue. >+ */ >+ cam_periph_release(periph); >+} >+ >+static void > pass_add_physpath(void *context, int pending) > { > struct cam_periph *periph; > struct pass_softc *softc; >+ struct mtx *mtx; > char *physpath; > > /* >@@ -236,34 +435,38 @@ pass_add_physpath(void *context, int pen > periph = context; > softc = periph->softc; > physpath = malloc(MAXPATHLEN, M_DEVBUF, M_WAITOK); >- cam_periph_lock(periph); >- if (periph->flags & CAM_PERIPH_INVALID) { >- cam_periph_unlock(periph); >+ mtx = cam_periph_mtx(periph); >+ mtx_lock(mtx); >+ >+ if (periph->flags & CAM_PERIPH_INVALID) > goto out; >- } >+ > if (xpt_getattr(physpath, MAXPATHLEN, > "GEOM::physpath", periph->path) == 0 > && strlen(physpath) != 0) { > >- cam_periph_unlock(periph); >+ mtx_unlock(mtx); > make_dev_physpath_alias(MAKEDEV_WAITOK, &softc->alias_dev, > softc->dev, softc->alias_dev, physpath); >- cam_periph_lock(periph); >+ mtx_lock(mtx); > } > >+out: > /* > * Now that we've made our alias, we no longer have to have a > * reference to the device. > */ >- if ((softc->flags & PASS_FLAG_INITIAL_PHYSPATH) == 0) { >+ if ((softc->flags & PASS_FLAG_INITIAL_PHYSPATH) == 0) > softc->flags |= PASS_FLAG_INITIAL_PHYSPATH; >- cam_periph_unlock(periph); >- dev_rel(softc->dev); >- } >- else >- cam_periph_unlock(periph); > >-out: >+ /* >+ * We always acquire a reference to the periph before queueing this >+ * task queue function, so it won't go away before we run. >+ */ >+ while (pending-- > 0) >+ cam_periph_release_locked(periph); >+ mtx_unlock(mtx); >+ > free(physpath, M_DEVBUF); > } > >@@ -291,7 +494,7 @@ passasync(void *callback_arg, u_int32_t > * process. > */ > status = cam_periph_alloc(passregister, passoninvalidate, >- passcleanup, NULL, "pass", >+ passcleanup, passstart, "pass", > CAM_PERIPH_BIO, path, > passasync, AC_FOUND_DEVICE, cgd); > >@@ -315,8 +518,19 @@ passasync(void *callback_arg, u_int32_t > buftype = (uintptr_t)arg; > if (buftype == CDAI_TYPE_PHYS_PATH) { > struct pass_softc *softc; >+ cam_status status; > > softc = (struct pass_softc *)periph->softc; >+ /* >+ * Acquire a reference to the periph before we >+ * start the taskqueue, so that we don't run into >+ * a situation where the periph goes away before >+ * the task queue has a chance to run. >+ */ >+ status = cam_periph_acquire(periph); >+ if (status != CAM_REQ_CMP) >+ break; >+ > taskqueue_enqueue(taskqueue_thread, > &softc->add_physpath_task); > } >@@ -361,6 +575,17 @@ passregister(struct cam_periph *periph, > softc->pd_type = T_DIRECT; > > periph->softc = softc; >+ softc->periph = periph; >+ TAILQ_INIT(&softc->incoming_queue); >+ TAILQ_INIT(&softc->active_queue); >+ TAILQ_INIT(&softc->abandoned_queue); >+ TAILQ_INIT(&softc->done_queue); >+ snprintf(softc->zone_name, sizeof(softc->zone_name), "%s%d", >+ periph->periph_name, periph->unit_number); >+ snprintf(softc->io_zone_name, sizeof(softc->io_zone_name), "%s%dIO", >+ periph->periph_name, periph->unit_number); >+ softc->io_zone_size = MAXPHYS; >+ knlist_init_mtx(&softc->read_select.si_note, cam_periph_mtx(periph)); > > bzero(&cpi, sizeof(cpi)); > xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); >@@ -374,6 +599,9 @@ passregister(struct cam_periph *periph, > else > softc->maxio = cpi.maxio; /* real value */ > >+ if (cpi.hba_misc & PIM_UNMAPPED) >+ softc->flags |= PASS_FLAG_UNMAPPED_CAPABLE; >+ > /* > * We pass in 0 for a blocksize, since we don't > * know what the blocksize of this device is, if >@@ -391,6 +619,23 @@ passregister(struct cam_periph *periph, > DEVSTAT_PRIORITY_PASS); > > /* >+ * Initialize the taskqueue handler for shutting down kqueue. >+ */ >+ TASK_INIT(&softc->shutdown_kqueue_task, /*priority*/ 0, >+ pass_shutdown_kqueue, periph); >+ >+ /* >+ * Acquire a reference to the periph that we can release once we've >+ * cleaned up the kqueue. >+ */ >+ if (cam_periph_acquire(periph) != CAM_REQ_CMP) { >+ xpt_print(periph->path, "%s: lost periph during " >+ "registration!\n", __func__); >+ cam_periph_lock(periph); >+ return (CAM_REQ_CMP_ERR); >+ } >+ >+ /* > * Acquire a reference to the periph before we create the devfs > * instance for it. We'll release this reference once the devfs > * instance has been freed. >@@ -408,12 +653,15 @@ passregister(struct cam_periph *periph, > periph->periph_name, periph->unit_number); > > /* >- * Now that we have made the devfs instance, hold a reference to it >- * until the task queue has run to setup the physical path alias. >- * That way devfs won't get rid of the device before we add our >- * alias. >+ * Hold a reference to the periph before we create the physical >+ * path alias so it can't go away. > */ >- dev_ref(softc->dev); >+ if (cam_periph_acquire(periph) != CAM_REQ_CMP) { >+ xpt_print(periph->path, "%s: lost periph during " >+ "registration!\n", __func__); >+ cam_periph_lock(periph); >+ return (CAM_REQ_CMP_ERR); >+ } > > cam_periph_lock(periph); > softc->dev->si_drv1 = periph; >@@ -514,6 +762,55 @@ passclose(struct cdev *dev, int flag, in > softc = periph->softc; > softc->open_count--; > >+ if (softc->open_count == 0) { >+ struct pass_io_req *io_req, *io_req2; >+ int need_unlock; >+ >+ need_unlock = 0; >+ >+ TAILQ_FOREACH_SAFE(io_req, &softc->done_queue, links, io_req2) { >+ TAILQ_REMOVE(&softc->done_queue, io_req, links); >+ passiocleanup(softc, io_req); >+ uma_zfree(softc->pass_zone, io_req); >+ } >+ >+ TAILQ_FOREACH_SAFE(io_req, &softc->incoming_queue, links, >+ io_req2) { >+ TAILQ_REMOVE(&softc->incoming_queue, io_req, links); >+ passiocleanup(softc, io_req); >+ uma_zfree(softc->pass_zone, io_req); >+ } >+ >+ /* >+ * If there are any active I/Os, we need to forcibly acquire a >+ * reference to the peripheral so that we don't go away >+ * before they complete. We'll release the reference when >+ * the abandoned queue is empty. >+ */ >+ io_req = TAILQ_FIRST(&softc->active_queue); >+ if ((io_req != NULL) >+ && (softc->flags & PASS_FLAG_ABANDONED_REF_SET) == 0) { >+ cam_periph_doacquire(periph); >+ softc->flags |= PASS_FLAG_ABANDONED_REF_SET; >+ } >+ >+ /* >+ * Since the I/O in the active queue is not under our >+ * control, just set a flag so that we can clean it up when >+ * it completes and put it on the abandoned queue. This >+ * will prevent our sending spurious completions in the >+ * event that the device is opened again before these I/Os >+ * complete. >+ */ >+ TAILQ_FOREACH_SAFE(io_req, &softc->active_queue, links, >+ io_req2) { >+ TAILQ_REMOVE(&softc->active_queue, io_req, links); >+ io_req->flags |= PASS_IO_ABANDONED; >+ TAILQ_INSERT_TAIL(&softc->abandoned_queue, io_req, >+ links); >+ } >+ } >+ > cam_periph_release_locked(periph); > > /* >@@ -533,121 +830,1338 @@ passclose(struct cdev *dev, int flag, in > return (0); > } > >-static int >-passioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) >-{ >- int error; >- >- if ((error = passdoioctl(dev, cmd, addr, flag, td)) == ENOTTY) { >- error = cam_compat_ioctl(dev, cmd, addr, flag, td, passdoioctl); >- } >- return (error); >-} > >-static int >-passdoioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) >+static void >+passstart(struct cam_periph *periph, union ccb *start_ccb) > { >- struct cam_periph *periph; >- int error; >- uint32_t priority; >- >- periph = (struct cam_periph *)dev->si_drv1; >- if (periph == NULL) >- return(ENXIO); >- >- cam_periph_lock(periph); >- >- error = 0; >- >- switch (cmd) { >+ struct pass_softc *softc; > >- case CAMIOCOMMAND: >- { >- union ccb *inccb; >- union ccb *ccb; >- int ccb_malloced; >+ softc = (struct pass_softc *)periph->softc; > >- inccb = (union ccb *)addr; >+ switch (softc->state) { >+ case PASS_STATE_NORMAL: { >+ struct pass_io_req *io_req; > > /* >- * Some CCB types, like scan bus and scan lun can only go >- * through the transport layer device. >+ * Check for any queued I/O requests that require an >+ * allocated slot. > */ >- if (inccb->ccb_h.func_code & XPT_FC_XPT_ONLY) { >- xpt_print(periph->path, "CCB function code %#x is " >- "restricted to the XPT device\n", >- inccb->ccb_h.func_code); >- error = ENODEV; >+ io_req = TAILQ_FIRST(&softc->incoming_queue); >+ if (io_req == NULL) { >+ xpt_release_ccb(start_ccb); > break; > } >+ TAILQ_REMOVE(&softc->incoming_queue, io_req, links); >+ TAILQ_INSERT_TAIL(&softc->active_queue, io_req, links); >+ /* >+ * Merge the user's CCB into the allocated CCB. >+ */ >+ xpt_merge_ccb(start_ccb, &io_req->ccb); >+ start_ccb->ccb_h.ccb_type = PASS_CCB_QUEUED_IO; >+ start_ccb->ccb_h.ccb_ioreq = io_req; >+ start_ccb->ccb_h.cbfcnp = passdone; >+ io_req->alloced_ccb = start_ccb; >+ binuptime(&io_req->start_time); >+ devstat_start_transaction(softc->device_stats, > >*** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-all@freebsd.org Fri Dec 4 08:49:29 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21117A40CD8; Fri, 4 Dec 2015 08:49:29 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFAC51EB4; Fri, 4 Dec 2015 08:49:28 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB48nSGw042704; Fri, 4 Dec 2015 08:49:28 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB48nSoi042703; Fri, 4 Dec 2015 08:49:28 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201512040849.tB48nSoi042703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 4 Dec 2015 08:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291752 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 08:49:29 -0000 Author: tuexen Date: Fri Dec 4 08:49:27 2015 New Revision: 291752 URL: https://svnweb.freebsd.org/changeset/base/291752 Log: Fix a bug where a stream reset request wasn't retranmitted when the peer indicated "In progress". MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Fri Dec 4 07:54:19 2015 (r291751) +++ head/sys/netinet/sctp_input.c Fri Dec 4 08:49:27 2015 (r291752) @@ -3651,6 +3651,7 @@ sctp_handle_stream_reset_response(struct * Set it up so we don't stop * retransmitting */ + asoc->stream_reset_outstanding++; stcb->asoc.str_reset_seq_out--; asoc->stream_reset_out_is_outstanding = 1; no_clear = 1; From owner-svn-src-all@freebsd.org Fri Dec 4 09:02:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01721A3F62C; Fri, 4 Dec 2015 09:02:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFB8517A6; Fri, 4 Dec 2015 09:01:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB491wiE045604; Fri, 4 Dec 2015 09:01:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB491wkL045603; Fri, 4 Dec 2015 09:01:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512040901.tB491wkL045603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 09:01:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291753 - head/sys/ofed/drivers/infiniband/hw/mthca X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:02:00 -0000 Author: ngie Date: Fri Dec 4 09:01:58 2015 New Revision: 291753 URL: https://svnweb.freebsd.org/changeset/base/291753 Log: Fix scope of bridge_header and bridge_pcix_cap in mthca_reset(..) They're only used in the __linux__ case Differential Revision: https://reviews.freebsd.org/D4332 MFC after: 1 week Reported by: cppcheck Reviewed by: hselasky Sponsored by: EMC / Isilon Storage Division Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c Fri Dec 4 08:49:27 2015 (r291752) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c Fri Dec 4 09:01:58 2015 (r291753) @@ -43,9 +43,13 @@ int mthca_reset(struct mthca_dev *mdev) int i; int err = 0; u32 *hca_header = NULL; +#ifdef __linux__ u32 *bridge_header = NULL; +#endif struct pci_dev *bridge = NULL; +#ifdef __linux__ int bridge_pcix_cap = 0; +#endif int hca_pcie_cap = 0; int hca_pcix_cap = 0; @@ -195,6 +199,7 @@ int mthca_reset(struct mthca_dev *mdev) } good: +#ifdef __linux__ /* Now restore the PCI headers */ if (bridge) { if (pci_write_config_dword(bridge, bridge_pcix_cap + 0x8, @@ -235,6 +240,7 @@ good: goto out; } } +#endif if (hca_pcix_cap) { if (pci_write_config_dword(mdev->pdev, hca_pcix_cap, @@ -289,8 +295,8 @@ out: #ifdef __linux__ if (bridge) pci_dev_put(bridge); -#endif kfree(bridge_header); +#endif kfree(hca_header); return err; From owner-svn-src-all@freebsd.org Fri Dec 4 09:07:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BF2DA3F789; Fri, 4 Dec 2015 09:07:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F2BE1B1C; Fri, 4 Dec 2015 09:07:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB497Ipp048485; Fri, 4 Dec 2015 09:07:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB497IZu048484; Fri, 4 Dec 2015 09:07:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512040907.tB497IZu048484@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 09:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291754 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:07:19 -0000 Author: ngie Date: Fri Dec 4 09:07:18 2015 New Revision: 291754 URL: https://svnweb.freebsd.org/changeset/base/291754 Log: MFC r284527,r284528,r284608,r285219,r291166,r291167: r284527 (by imp): Update style.9 to reflect consensus on developer's mailing list allowing redundant braces. Differential Revision: https://reviews.freebsd.org/D2842 r284528 (by imp): Bump date. Submitted by: Xin Li r284608 (by imp): Back out contested change until dispute is resolved. This proved to be more contentious than I expected. r285219 (by imp): The results of the vote are in. This reflects that vote. Single line statements inside of braces is recognized as an acceptable style. http://reviews.freebsd.org/V3 As always, this isn't license for wholesale change, etc. r291166: Recommend cc -Wall instead of gcc -Wall r291167: Bump .Dd Modified: stable/10/share/man/man9/style.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/style.9 ============================================================================== --- stable/10/share/man/man9/style.9 Fri Dec 4 09:01:58 2015 (r291753) +++ stable/10/share/man/man9/style.9 Fri Dec 4 09:07:18 2015 (r291754) @@ -26,7 +26,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd January 7, 2010 +.Dd November 22, 2015 .Dt STYLE 9 .Os .Sh NAME @@ -503,13 +503,14 @@ Code which is unreachable for non-obviou .Pp Space after keywords .Pq Ic if , while , for , return , switch . -No braces +Two styles of braces .Ql ( \&{ and .Ql \&} ) -are -used for control statements with zero or only a single statement unless that -statement is more than a single line in which case they are permitted. +are allowed for single line statements. +Either they are used for all single statements, or +they are used only where needed for clarity. +Usage within a function should be consistent. Forever loops are done with .Ic for Ns 's , not @@ -833,7 +834,7 @@ Whenever possible, code should be run th (e.g., .Xr lint 1 or -.Nm gcc Fl Wall ) +.Nm cc Fl Wall ) and produce minimal warnings. .Sh SEE ALSO .Xr indent 1 , From owner-svn-src-all@freebsd.org Fri Dec 4 09:07:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 768F2A3F7E7; Fri, 4 Dec 2015 09:07:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3478E1C90; Fri, 4 Dec 2015 09:07:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB497tFA048560; Fri, 4 Dec 2015 09:07:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB497t1Y048557; Fri, 4 Dec 2015 09:07:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512040907.tB497t1Y048557@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 09:07:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291755 - in stable/9/lib/libc: rpc stdio X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:07:56 -0000 Author: ngie Date: Fri Dec 4 09:07:54 2015 New Revision: 291755 URL: https://svnweb.freebsd.org/changeset/base/291755 Log: MFstable/10 r291573: MFC r278932: r278932 (by pfg): libc: clean some set-but-not-used errors. These were found by gcc 5.0 on Dragonfly BSD, however I made no attempt to silence the false positives. Obtained from: DragonFly (cf515c3a6f3a8964ad592e524442bc628f8ed63b) Modified: stable/9/lib/libc/rpc/clnt_dg.c stable/9/lib/libc/rpc/rpc_soc.c stable/9/lib/libc/stdio/xprintf_float.c Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/clnt_dg.c ============================================================================== --- stable/9/lib/libc/rpc/clnt_dg.c Fri Dec 4 09:07:18 2015 (r291754) +++ stable/9/lib/libc/rpc/clnt_dg.c Fri Dec 4 09:07:54 2015 (r291755) @@ -327,7 +327,7 @@ clnt_dg_call(cl, proc, xargs, argsp, xre struct sockaddr *sa; sigset_t mask; sigset_t newmask; - socklen_t inlen, salen; + socklen_t salen; ssize_t recvlen = 0; int kin_len, n, rpc_lock_value; u_int32_t xid; @@ -520,7 +520,6 @@ get_reply: goto call_again_same_xid; } } - inlen = (socklen_t)recvlen; /* * now decode and validate the response Modified: stable/9/lib/libc/rpc/rpc_soc.c ============================================================================== --- stable/9/lib/libc/rpc/rpc_soc.c Fri Dec 4 09:07:18 2015 (r291754) +++ stable/9/lib/libc/rpc/rpc_soc.c Fri Dec 4 09:07:54 2015 (r291755) @@ -462,12 +462,10 @@ clntunix_create(raddr, prog, vers, sockp u_int recvsz; { struct netbuf *svcaddr; - struct netconfig *nconf; CLIENT *cl; int len; cl = NULL; - nconf = NULL; svcaddr = NULL; if ((raddr->sun_len == 0) || ((svcaddr = malloc(sizeof(struct netbuf))) == NULL ) || Modified: stable/9/lib/libc/stdio/xprintf_float.c ============================================================================== --- stable/9/lib/libc/stdio/xprintf_float.c Fri Dec 4 09:07:18 2015 (r291754) +++ stable/9/lib/libc/stdio/xprintf_float.c Fri Dec 4 09:07:54 2015 (r291755) @@ -168,7 +168,6 @@ __printf_render_float(struct __printf_io int realsz; /* field size expanded by dprec, sign, etc */ int dprec; /* a copy of prec if [diouxX], 0 otherwise */ char ox[2]; /* space for 0x; ox[1] is either x, X, or \0 */ - int prsize; /* max size of printed field */ int ret; /* return value accumulator */ char *decimal_point; /* locale specific decimal point */ int n2; /* XXX: for PRINTANDPAD */ @@ -344,8 +343,6 @@ here: if (ox[1]) realsz += 2; - prsize = pi->width > realsz ? pi->width : realsz; - /* right-adjusting blank padding */ if (pi->pad != '0' && pi->left == 0) ret += __printf_pad(io, pi->width - realsz, 0); From owner-svn-src-all@freebsd.org Fri Dec 4 09:08:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 764FEA3F853; Fri, 4 Dec 2015 09:08:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BAE41DEA; Fri, 4 Dec 2015 09:08:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB498dEh048648; Fri, 4 Dec 2015 09:08:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB498dip048647; Fri, 4 Dec 2015 09:08:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512040908.tB498dip048647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 09:08:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291756 - stable/9/share/man/man9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:08:40 -0000 Author: ngie Date: Fri Dec 4 09:08:39 2015 New Revision: 291756 URL: https://svnweb.freebsd.org/changeset/base/291756 Log: MFstable/10 r291754: MFC r284527,r284528,r284608,r285219,r291166,r291167: r284527 (by imp): Update style.9 to reflect consensus on developer's mailing list allowing redundant braces. Differential Revision: https://reviews.freebsd.org/D2842 r284528 (by imp): Bump date. Submitted by: Xin Li r284608 (by imp): Back out contested change until dispute is resolved. This proved to be more contentious than I expected. r285219 (by imp): The results of the vote are in. This reflects that vote. Single line statements inside of braces is recognized as an acceptable style. http://reviews.freebsd.org/V3 As always, this isn't license for wholesale change, etc. r291166: Recommend cc -Wall instead of gcc -Wall r291167: Bump .Dd Modified: stable/9/share/man/man9/style.9 Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/style.9 ============================================================================== --- stable/9/share/man/man9/style.9 Fri Dec 4 09:07:54 2015 (r291755) +++ stable/9/share/man/man9/style.9 Fri Dec 4 09:08:39 2015 (r291756) @@ -26,7 +26,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd January 7, 2010 +.Dd November 22, 2015 .Dt STYLE 9 .Os .Sh NAME @@ -503,13 +503,14 @@ Code which is unreachable for non-obviou .Pp Space after keywords .Pq Ic if , while , for , return , switch . -No braces +Two styles of braces .Ql ( \&{ and .Ql \&} ) -are -used for control statements with zero or only a single statement unless that -statement is more than a single line in which case they are permitted. +are allowed for single line statements. +Either they are used for all single statements, or +they are used only where needed for clarity. +Usage within a function should be consistent. Forever loops are done with .Ic for Ns 's , not @@ -833,7 +834,7 @@ Whenever possible, code should be run th (e.g., .Xr lint 1 or -.Nm gcc Fl Wall ) +.Nm cc Fl Wall ) and produce minimal warnings. .Sh SEE ALSO .Xr indent 1 , From owner-svn-src-all@freebsd.org Fri Dec 4 09:09:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77615A3F8C5; Fri, 4 Dec 2015 09:09:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26B141F50; Fri, 4 Dec 2015 09:09:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB499JkJ048726; Fri, 4 Dec 2015 09:09:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB499Juw048725; Fri, 4 Dec 2015 09:09:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201512040909.tB499Juw048725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 4 Dec 2015 09:09:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291757 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:09:20 -0000 Author: kib Date: Fri Dec 4 09:09:19 2015 New Revision: 291757 URL: https://svnweb.freebsd.org/changeset/base/291757 Log: MFC r291379: Move the comment about resident pages preventing vnode from leaving active list, into the header comment for vdrop(). Modified: stable/10/sys/kern/vfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/vfs_subr.c ============================================================================== --- stable/10/sys/kern/vfs_subr.c Fri Dec 4 09:08:39 2015 (r291756) +++ stable/10/sys/kern/vfs_subr.c Fri Dec 4 09:09:19 2015 (r291757) @@ -2425,6 +2425,10 @@ vdrop(struct vnode *vp) * Drop the hold count of the vnode. If this is the last reference to * the vnode we place it on the free list unless it has been vgone'd * (marked VI_DOOMED) in which case we will free it. + * + * Because the vnode vm object keeps a hold reference on the vnode if + * there is at least one resident non-cached page, the vnode cannot + * leave the active list without the page cleanup done. */ void vdropl(struct vnode *vp) @@ -2540,11 +2544,13 @@ vinactive(struct vnode *vp, struct threa VI_UNLOCK(vp); /* * Before moving off the active list, we must be sure that any - * modified pages are on the vnode's dirty list since these will - * no longer be checked once the vnode is on the inactive list. - * Because the vnode vm object keeps a hold reference on the vnode - * if there is at least one resident non-cached page, the vnode - * cannot leave the active list without the page cleanup done. + * modified pages are converted into the vnode's dirty + * buffers, since these will no longer be checked once the + * vnode is on the inactive list. + * + * The write-out of the dirty pages is asynchronous. At the + * point that VOP_INACTIVE() is called, there could still be + * pending I/O and dirty pages in the object. */ obj = vp->v_object; if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { From owner-svn-src-all@freebsd.org Fri Dec 4 09:10:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCE36A3FA59; Fri, 4 Dec 2015 09:10:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9A5A1114; Fri, 4 Dec 2015 09:10:50 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB49AnQ1050674; Fri, 4 Dec 2015 09:10:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB49AnoG050672; Fri, 4 Dec 2015 09:10:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512040910.tB49AnoG050672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 09:10:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291758 - in stable/10/tools/regression/lib/libc: nss resolv X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:10:51 -0000 Author: ngie Date: Fri Dec 4 09:10:49 2015 New Revision: 291758 URL: https://svnweb.freebsd.org/changeset/base/291758 Log: MFC r291358: Remove cnftp.bjpu.edu.cn (it no longer resolves) Add localhost to resolv/mach for parity with nss/mach Modified: stable/10/tools/regression/lib/libc/nss/mach stable/10/tools/regression/lib/libc/resolv/mach Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/lib/libc/nss/mach ============================================================================== --- stable/10/tools/regression/lib/libc/nss/mach Fri Dec 4 09:09:19 2015 (r291757) +++ stable/10/tools/regression/lib/libc/nss/mach Fri Dec 4 09:10:49 2015 (r291758) @@ -11,7 +11,6 @@ antioche.antioche.eu.org boulder.tele.dk centaurus.4web.cz chur.math.ntnu.no -cnftp.bjpu.edu.cn console.netbsd.org cvs.fi.netbsd.org cvs.mikrolahti.fi Modified: stable/10/tools/regression/lib/libc/resolv/mach ============================================================================== --- stable/10/tools/regression/lib/libc/resolv/mach Fri Dec 4 09:09:19 2015 (r291757) +++ stable/10/tools/regression/lib/libc/resolv/mach Fri Dec 4 09:10:49 2015 (r291758) @@ -1,3 +1,5 @@ +# $FreeBSD$ +localhost above.warped.net anoncvs.cirr.com anoncvs.isc.netbsd.org @@ -9,7 +11,6 @@ antioche.antioche.eu.org boulder.tele.dk centaurus.4web.cz chur.math.ntnu.no -cnftp.bjpu.edu.cn console.netbsd.org cvs.fi.netbsd.org cvs.mikrolahti.fi From owner-svn-src-all@freebsd.org Fri Dec 4 09:18:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44706A3FCA8; Fri, 4 Dec 2015 09:18:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D398179A; Fri, 4 Dec 2015 09:18:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB49IDtg051587; Fri, 4 Dec 2015 09:18:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB49IC8O051583; Fri, 4 Dec 2015 09:18:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512040918.tB49IC8O051583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 09:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291759 - stable/10/tools/regression/lib/libc/nss X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:18:14 -0000 Author: ngie Date: Fri Dec 4 09:18:12 2015 New Revision: 291759 URL: https://svnweb.freebsd.org/changeset/base/291759 Log: MFC r291363: Clean up trailing whitespace Modified: stable/10/tools/regression/lib/libc/nss/test-getaddr.c stable/10/tools/regression/lib/libc/nss/test-getgr.c stable/10/tools/regression/lib/libc/nss/test-gethostby.c stable/10/tools/regression/lib/libc/nss/test-getproto.c stable/10/tools/regression/lib/libc/nss/test-getpw.c stable/10/tools/regression/lib/libc/nss/test-getrpc.c stable/10/tools/regression/lib/libc/nss/test-getserv.c stable/10/tools/regression/lib/libc/nss/test-getusershell.c stable/10/tools/regression/lib/libc/nss/testutil.h Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/lib/libc/nss/test-getaddr.c ============================================================================== --- stable/10/tools/regression/lib/libc/nss/test-getaddr.c Fri Dec 4 09:10:49 2015 (r291758) +++ stable/10/tools/regression/lib/libc/nss/test-getaddr.c Fri Dec 4 09:18:12 2015 (r291759) @@ -67,22 +67,22 @@ IMPLEMENT_TEST_DATA(addrinfo) IMPLEMENT_TEST_FILE_SNAPSHOT(addrinfo) IMPLEMENT_2PASS_TEST(addrinfo) -static void +static void clone_addrinfo(struct addrinfo *dest, struct addrinfo const *src) { assert(dest != NULL); assert(src != NULL); - + memcpy(dest, src, sizeof(struct addrinfo)); if (src->ai_canonname != NULL) dest->ai_canonname = strdup(src->ai_canonname); - + if (src->ai_addr != NULL) { dest->ai_addr = (struct sockaddr *)malloc(src->ai_addrlen); assert(dest->ai_addr != NULL); memcpy(dest->ai_addr, src->ai_addr, src->ai_addrlen); } - + if (src->ai_next != NULL) { dest->ai_next = (struct addrinfo *)malloc( sizeof(struct addrinfo)); @@ -96,7 +96,7 @@ compare_addrinfo_(struct addrinfo *ai1, { if ((ai1 == NULL) || (ai2 == NULL)) return (-1); - + if ((ai1->ai_flags != ai2->ai_flags) || (ai1->ai_family != ai2->ai_family) || (ai1->ai_socktype != ai2->ai_socktype) || @@ -107,11 +107,11 @@ compare_addrinfo_(struct addrinfo *ai1, (((ai1->ai_canonname == NULL) || (ai2->ai_canonname == NULL)) && (ai1->ai_canonname != ai2->ai_canonname))) return (-1); - - if ((ai1->ai_canonname != NULL) && + + if ((ai1->ai_canonname != NULL) && (strcmp(ai1->ai_canonname, ai2->ai_canonname) != 0)) return (-1); - + if ((ai1->ai_addr != NULL) && (memcmp(ai1->ai_addr, ai2->ai_addr, ai1->ai_addrlen) != 0)) return (-1); @@ -122,17 +122,17 @@ compare_addrinfo_(struct addrinfo *ai1, return (compare_addrinfo_(ai1->ai_next, ai2->ai_next)); } -static int +static int compare_addrinfo(struct addrinfo *ai1, struct addrinfo *ai2, void *mdata) { int rv; - + if (debug) { printf("testing equality of 2 addrinfo structures\n"); } rv = compare_addrinfo_(ai1, ai2); - + if (debug) { if (rv == 0) printf("equal\n"); @@ -142,16 +142,16 @@ compare_addrinfo(struct addrinfo *ai1, s printf("not equal\n"); } } - + return (rv); } -void +void free_addrinfo(struct addrinfo *ai) { if (ai == NULL) return; - + free(ai->ai_addr); free(ai->ai_canonname); free_addrinfo(ai->ai_next); @@ -159,9 +159,9 @@ free_addrinfo(struct addrinfo *ai) void sdump_addrinfo(struct addrinfo *ai, char *buffer, size_t buflen) -{ +{ int written, i; - + written = snprintf(buffer, buflen, "%d %d %d %d %d ", ai->ai_flags, ai->ai_family, ai->ai_socktype, ai->ai_protocol, ai->ai_addrlen); @@ -169,14 +169,14 @@ sdump_addrinfo(struct addrinfo *ai, char if (written > buflen) return; buflen -= written; - + written = snprintf(buffer, buflen, "%s ", ai->ai_canonname == NULL ? "(null)" : ai->ai_canonname); buffer += written; if (written > buflen) return; buflen -= written; - + if (ai->ai_addr == NULL) { written = snprintf(buffer, buflen, "(null)"); buffer += written; @@ -185,26 +185,26 @@ sdump_addrinfo(struct addrinfo *ai, char buflen -= written; } else { for (i = 0; i < ai->ai_addrlen; ++i ) { - written = snprintf(buffer, buflen, + written = snprintf(buffer, buflen, i + 1 != ai->ai_addrlen ? "%d." : "%d", ((unsigned char *)ai->ai_addr)[i]); buffer += written; if (written > buflen) return; buflen -= written; - + if (buflen == 0) return; - } + } } - + if (ai->ai_next != NULL) { written = snprintf(buffer, buflen, ":"); buffer += written; if (written > buflen) return; buflen -= written; - + sdump_addrinfo(ai->ai_next, buffer, buflen); } } @@ -224,12 +224,12 @@ static int addrinfo_read_snapshot_addr(char *addr, unsigned char *result, size_t len) { char *s, *ps, *ts; - + ps = addr; while ( (s = strsep(&ps, ".")) != NULL) { if (len == 0) return (-1); - + *result = (unsigned char)strtol(s, &ts, 10); ++result; if (*ts != '\0') @@ -265,7 +265,7 @@ addrinfo_read_snapshot_ai(struct addrinf goto fin; break; case 4: - ai->ai_addrlen = (socklen_t)strtol(s, &ts, 10); + ai->ai_addrlen = (socklen_t)strtol(s, &ts, 10); if (*ts != '\0') goto fin; break; @@ -274,7 +274,7 @@ addrinfo_read_snapshot_ai(struct addrinf ai->ai_canonname = strdup(s); assert(ai->ai_canonname != NULL); } - break; + break; case 6: if (strcmp(s, "(null)") != 0) { ai->ai_addr = (struct sockaddr *)malloc( @@ -284,7 +284,7 @@ addrinfo_read_snapshot_ai(struct addrinf rv = addrinfo_read_snapshot_addr(s, (unsigned char *)ai->ai_addr, ai->ai_addrlen); - + if (rv != 0) goto fin; } @@ -294,18 +294,18 @@ addrinfo_read_snapshot_ai(struct addrinf rv = -1; goto fin; }; - + ++i; } fin: - if ((i != 7) || (rv != 0)) { + if ((i != 7) || (rv != 0)) { free_addrinfo(ai); memset(ai, 0, sizeof(struct addrinfo)); return (-1); } - - return (0); + + return (0); } static int @@ -317,33 +317,33 @@ addrinfo_read_snapshot_func(struct addri if (debug) printf("1 line read from snapshot:\n%s\n", line); - + rv = 0; i = 0; ps = line; - + s = strsep(&ps, ":"); if (s == NULL) return (-1); - + rv = addrinfo_read_snapshot_ai(ai, s); if (rv != 0) return (-1); - + ai2 = ai; while ( (s = strsep(&ps, ":")) != NULL) { ai2->ai_next = (struct addrinfo *)malloc( sizeof(struct addrinfo)); assert(ai2->ai_next != NULL); memset(ai2->ai_next, 0, sizeof(struct addrinfo)); - + rv = addrinfo_read_snapshot_ai(ai2->ai_next, s); if (rv != 0) { - free_addrinfo(ai); + free_addrinfo(ai); return (-1); } - ai2 = ai2->ai_next; + ai2 = ai2->ai_next; } return (0); @@ -356,36 +356,36 @@ addrinfo_test_correctness(struct addrinf printf("testing correctness with the following data:\n"); dump_addrinfo(ai); } - + if (ai == NULL) goto errfin; - + if (!((ai->ai_family >= 0) && (ai->ai_family < AF_MAX))) goto errfin; - + if ((ai->ai_socktype != 0) && (ai->ai_socktype != SOCK_STREAM) && (ai->ai_socktype != SOCK_DGRAM) && (ai->ai_socktype != SOCK_RAW)) goto errfin; - + if ((ai->ai_protocol != 0) && (ai->ai_protocol != IPPROTO_UDP) && (ai->ai_protocol != IPPROTO_TCP)) goto errfin; - + if ((ai->ai_flags & ~(AI_CANONNAME | AI_NUMERICHOST | AI_PASSIVE)) != 0) goto errfin; - if ((ai->ai_addrlen != ai->ai_addr->sa_len) || + if ((ai->ai_addrlen != ai->ai_addr->sa_len) || (ai->ai_family != ai->ai_addr->sa_family)) goto errfin; - + if (debug) printf("correct\n"); - - return (0); + + return (0); errfin: if (debug) printf("incorrect\n"); - + return (-1); } @@ -393,27 +393,27 @@ static int addrinfo_read_hostlist_func(struct addrinfo *ai, char *line) { struct addrinfo *result; - int rv; - + int rv; + if (debug) printf("resolving %s: ", line); rv = getaddrinfo(line, NULL, &hints, &result); if (rv == 0) { if (debug) printf("found\n"); - + rv = addrinfo_test_correctness(result, NULL); if (rv != 0) { freeaddrinfo(result); return (rv); } - + clone_addrinfo(ai, result); freeaddrinfo(result); } else { if (debug) printf("not found\n"); - + memset(ai, 0, sizeof(struct addrinfo)); } return (0); @@ -435,10 +435,10 @@ main(int argc, char **argv) char *snapshot_file, *hostlist_file; int rv; int c; - + if (argc < 2) usage(); - + snapshot_file = NULL; hostlist_file = NULL; memset(&hints, 0, sizeof(struct addrinfo)); @@ -465,38 +465,38 @@ main(int argc, char **argv) default: usage(); } - + TEST_DATA_INIT(addrinfo, &td, clone_addrinfo, free_addrinfo); TEST_DATA_INIT(addrinfo, &td_snap, clone_addrinfo, free_addrinfo); - + if (hostlist_file == NULL) usage(); - + if (access(hostlist_file, R_OK) != 0) { if (debug) printf("can't access the hostlist file %s\n", hostlist_file); - + usage(); } - + if (debug) printf("building host lists from %s\n", hostlist_file); - + rv = TEST_SNAPSHOT_FILE_READ(addrinfo, hostlist_file, &td, addrinfo_read_hostlist_func); if (rv != 0) goto fin; - + if (snapshot_file != NULL) { - if (access(snapshot_file, W_OK | R_OK) != 0) { + if (access(snapshot_file, W_OK | R_OK) != 0) { if (errno == ENOENT) method = TEST_BUILD_SNAPSHOT; else { if (debug) printf("can't access the snapshot file %s\n", snapshot_file); - + rv = -1; goto fin; } @@ -510,7 +510,7 @@ main(int argc, char **argv) } } } - + switch (method) { case TEST_GETADDRINFO: if (snapshot_file != NULL) @@ -519,7 +519,7 @@ main(int argc, char **argv) break; case TEST_BUILD_SNAPSHOT: if (snapshot_file != NULL) { - rv = TEST_SNAPSHOT_FILE_WRITE(addrinfo, snapshot_file, &td, + rv = TEST_SNAPSHOT_FILE_WRITE(addrinfo, snapshot_file, &td, sdump_addrinfo); } break; Modified: stable/10/tools/regression/lib/libc/nss/test-getgr.c ============================================================================== --- stable/10/tools/regression/lib/libc/nss/test-getgr.c Fri Dec 4 09:10:49 2015 (r291758) +++ stable/10/tools/regression/lib/libc/nss/test-getgr.c Fri Dec 4 09:18:12 2015 (r291759) @@ -63,14 +63,14 @@ static void free_group(struct group *); static void sdump_group(struct group *, char *, size_t); static int group_read_snapshot_func(struct group *, char *); -static int group_check_ambiguity(struct group_test_data *, +static int group_check_ambiguity(struct group_test_data *, struct group *); static int group_fill_test_data(struct group_test_data *); static int group_test_correctness(struct group *, void *); static int group_test_getgrnam(struct group *, void *); static int group_test_getgrgid(struct group *, void *); static int group_test_getgrent(struct group *, void *); - + static void usage(void) __attribute__((__noreturn__)); IMPLEMENT_TEST_DATA(group) @@ -83,33 +83,33 @@ clone_group(struct group *dest, struct g { assert(dest != NULL); assert(src != NULL); - + char **cp; int members_num; - + memset(dest, 0, sizeof(struct group)); - + if (src->gr_name != NULL) { dest->gr_name = strdup(src->gr_name); assert(dest->gr_name != NULL); } - + if (src->gr_passwd != NULL) { dest->gr_passwd = strdup(src->gr_passwd); assert(dest->gr_passwd != NULL); } dest->gr_gid = src->gr_gid; - + if (src->gr_mem != NULL) { members_num = 0; for (cp = src->gr_mem; *cp; ++cp) ++members_num; - + dest->gr_mem = (char **)malloc( (members_num + 1) * (sizeof(char *))); assert(dest->gr_mem != NULL); memset(dest->gr_mem, 0, (members_num+1) * (sizeof(char *))); - + for (cp = src->gr_mem; *cp; ++cp) { dest->gr_mem[cp - src->gr_mem] = strdup(*cp); assert(dest->gr_mem[cp - src->gr_mem] != NULL); @@ -117,52 +117,52 @@ clone_group(struct group *dest, struct g } } -static void +static void free_group(struct group *grp) { char **cp; - + assert(grp != NULL); - + free(grp->gr_name); free(grp->gr_passwd); - + for (cp = grp->gr_mem; *cp; ++cp) free(*cp); free(grp->gr_mem); } -static int +static int compare_group(struct group *grp1, struct group *grp2, void *mdata) { char **c1, **c2; - + if (grp1 == grp2) return (0); - + if ((grp1 == NULL) || (grp2 == NULL)) goto errfin; - + if ((strcmp(grp1->gr_name, grp2->gr_name) != 0) || (strcmp(grp1->gr_passwd, grp2->gr_passwd) != 0) || (grp1->gr_gid != grp2->gr_gid)) goto errfin; - + c1 = grp1->gr_mem; c2 = grp2->gr_mem; - + if ((grp1->gr_mem == NULL) || (grp2->gr_mem == NULL)) goto errfin; - + for (;*c1 && *c2; ++c1, ++c2) if (strcmp(*c1, *c2) != 0) goto errfin; - + if ((*c1 != '\0') || (*c2 != '\0')) goto errfin; - + return 0; - + errfin: if ((debug) && (mdata == NULL)) { printf("following structures are not equal:\n"); @@ -178,14 +178,14 @@ sdump_group(struct group *grp, char *buf { char **cp; int written; - + written = snprintf(buffer, buflen, "%s %s %d", - grp->gr_name, grp->gr_passwd, grp->gr_gid); + grp->gr_name, grp->gr_passwd, grp->gr_gid); buffer += written; if (written > buflen) return; buflen -= written; - + if (grp->gr_mem != NULL) { if (*(grp->gr_mem) != '\0') { for (cp = grp->gr_mem; *cp; ++cp) { @@ -194,9 +194,9 @@ sdump_group(struct group *grp, char *buf if (written > buflen) return; buflen -= written; - + if (buflen == 0) - return; + return; } } else snprintf(buffer, buflen, " nomem"); @@ -213,7 +213,7 @@ group_read_snapshot_func(struct group *g if (debug) printf("1 line read from snapshot:\n%s\n", line); - + i = 0; sl = NULL; ps = line; @@ -243,10 +243,10 @@ group_read_snapshot_func(struct group *g if (sl == NULL) { if (strcmp(s, "(null)") == 0) return (0); - + sl = sl_init(); assert(sl != NULL); - + if (strcmp(s, "nomem") != 0) { ts = strdup(s); assert(ts != NULL); @@ -257,7 +257,7 @@ group_read_snapshot_func(struct group *g assert(ts != NULL); sl_add(sl, ts); } - break; + break; }; ++i; } @@ -268,16 +268,16 @@ group_read_snapshot_func(struct group *g memset(grp, 0, sizeof(struct group)); return (-1); } - + sl_add(sl, NULL); grp->gr_mem = sl->sl_str; /* NOTE: is it a dirty hack or not? */ - free(sl); + free(sl); return (0); } -static void +static void dump_group(struct group *result) { if (result != NULL) { @@ -292,7 +292,7 @@ static int group_fill_test_data(struct group_test_data *td) { struct group *grp; - + setgroupent(1); while ((grp = getgrent()) != NULL) { if (group_test_correctness(grp, NULL) == 0) @@ -301,7 +301,7 @@ group_fill_test_data(struct group_test_d return (-1); } endgrent(); - + return (0); } @@ -312,37 +312,37 @@ group_test_correctness(struct group *grp printf("testing correctness with the following data:\n"); dump_group(grp); } - + if (grp == NULL) goto errfin; - + if (grp->gr_name == NULL) goto errfin; - + if (grp->gr_passwd == NULL) goto errfin; - + if (grp->gr_mem == NULL) goto errfin; - + if (debug) printf("correct\n"); - - return (0); + + return (0); errfin: if (debug) printf("incorrect\n"); - + return (-1); } /* group_check_ambiguity() is needed here because when doing the getgrent() - * calls sequence, records from different nsswitch sources can be different, + * calls sequence, records from different nsswitch sources can be different, * though having the same pw_name/pw_uid */ static int group_check_ambiguity(struct group_test_data *td, struct group *pwd) { - + return (TEST_DATA_FIND(group, td, pwd, compare_group, NULL) != NULL ? 0 : -1); } @@ -351,7 +351,7 @@ static int group_test_getgrnam(struct group *grp_model, void *mdata) { struct group *grp; - + if (debug) { printf("testing getgrnam() with the following data:\n"); dump_group(grp_model); @@ -360,20 +360,20 @@ group_test_getgrnam(struct group *grp_mo grp = getgrnam(grp_model->gr_name); if (group_test_correctness(grp, NULL) != 0) goto errfin; - + if ((compare_group(grp, grp_model, NULL) != 0) && - (group_check_ambiguity((struct group_test_data *)mdata, grp) + (group_check_ambiguity((struct group_test_data *)mdata, grp) !=0)) goto errfin; - + if (debug) printf("ok\n"); return (0); - + errfin: if (debug) printf("not ok\n"); - + return (-1); } @@ -381,14 +381,14 @@ static int group_test_getgrgid(struct group *grp_model, void *mdata) { struct group *grp; - + if (debug) { printf("testing getgrgid() with the following data...\n"); dump_group(grp_model); - } - + } + grp = getgrgid(grp_model->gr_gid); - if ((group_test_correctness(grp, NULL) != 0) || + if ((group_test_correctness(grp, NULL) != 0) || ((compare_group(grp, grp_model, NULL) != 0) && (group_check_ambiguity((struct group_test_data *)mdata, grp) != 0))) { @@ -402,7 +402,7 @@ group_test_getgrgid(struct group *grp_mo } } -static int +static int group_test_getgrent(struct group *grp, void *mdata) { /* Only correctness can be checked when doing 1-pass test for @@ -426,10 +426,10 @@ main(int argc, char **argv) char *snapshot_file; int rv; int c; - + if (argc < 2) usage(); - + snapshot_file = NULL; while ((c = getopt(argc, argv, "nge2ds:")) != -1) switch (c) { @@ -454,18 +454,18 @@ main(int argc, char **argv) default: usage(); } - + TEST_DATA_INIT(group, &td, clone_group, free_group); TEST_DATA_INIT(group, &td_snap, clone_group, free_group); if (snapshot_file != NULL) { - if (access(snapshot_file, W_OK | R_OK) != 0) { + if (access(snapshot_file, W_OK | R_OK) != 0) { if (errno == ENOENT) method = TEST_BUILD_SNAPSHOT; else { if (debug) printf("can't access the file %s\n", snapshot_file); - + rv = -1; goto fin; } @@ -474,12 +474,12 @@ main(int argc, char **argv) rv = 0; goto fin; } - + TEST_SNAPSHOT_FILE_READ(group, snapshot_file, &td_snap, group_read_snapshot_func); } } - + rv = group_fill_test_data(&td); if (rv == -1) return (-1); @@ -489,7 +489,7 @@ main(int argc, char **argv) rv = DO_1PASS_TEST(group, &td, group_test_getgrnam, (void *)&td); else - rv = DO_1PASS_TEST(group, &td_snap, + rv = DO_1PASS_TEST(group, &td_snap, group_test_getgrnam, (void *)&td_snap); break; case TEST_GETGRGID: @@ -497,7 +497,7 @@ main(int argc, char **argv) rv = DO_1PASS_TEST(group, &td, group_test_getgrgid, (void *)&td); else - rv = DO_1PASS_TEST(group, &td_snap, + rv = DO_1PASS_TEST(group, &td_snap, group_test_getgrgid, (void *)&td_snap); break; case TEST_GETGRENT: @@ -510,7 +510,7 @@ main(int argc, char **argv) break; case TEST_GETGRENT_2PASS: TEST_DATA_INIT(group, &td_2pass, clone_group, free_group); - rv = group_fill_test_data(&td_2pass); + rv = group_fill_test_data(&td_2pass); if (rv != -1) rv = DO_2PASS_TEST(group, &td, &td_2pass, compare_group, NULL); @@ -518,7 +518,7 @@ main(int argc, char **argv) break; case TEST_BUILD_SNAPSHOT: if (snapshot_file != NULL) - rv = TEST_SNAPSHOT_FILE_WRITE(group, snapshot_file, &td, + rv = TEST_SNAPSHOT_FILE_WRITE(group, snapshot_file, &td, sdump_group); break; default: @@ -529,6 +529,6 @@ main(int argc, char **argv) fin: TEST_DATA_DESTROY(group, &td_snap); TEST_DATA_DESTROY(group, &td); - free(snapshot_file); + free(snapshot_file); return (rv); } Modified: stable/10/tools/regression/lib/libc/nss/test-gethostby.c ============================================================================== --- stable/10/tools/regression/lib/libc/nss/test-gethostby.c Fri Dec 4 09:10:49 2015 (r291758) +++ stable/10/tools/regression/lib/libc/nss/test-gethostby.c Fri Dec 4 09:18:12 2015 (r291759) @@ -90,7 +90,7 @@ static int hostent_test_correctness(stru static int hostent_test_gethostbyaddr(struct hostent *, void *); static int hostent_test_getaddrinfo_eq(struct hostent *, void *); static int hostent_test_getnameinfo_eq(struct hostent *, void *); - + static void usage(void) __attribute__((__noreturn__)); IMPLEMENT_TEST_DATA(hostent) @@ -103,7 +103,7 @@ __gethostbyname2(const char *name, int a { struct hostent *he; int error; - + if (use_ipnode_functions == 0) he = gethostbyname2(name, af); else { @@ -112,7 +112,7 @@ __gethostbyname2(const char *name, int a if (he == NULL); errno = error; } - + return (he); } @@ -121,7 +121,7 @@ __gethostbyaddr(const void *addr, sockle { struct hostent *he; int error; - + if (use_ipnode_functions == 0) he = gethostbyaddr(addr, len, af); else { @@ -130,8 +130,8 @@ __gethostbyaddr(const void *addr, sockle if (he == NULL) errno = error; } - - return (he); + + return (he); } static void @@ -147,44 +147,44 @@ clone_hostent(struct hostent *dest, stru { assert(dest != NULL); assert(src != NULL); - + char **cp; int aliases_num; int addrs_num; size_t offset; - + memset(dest, 0, sizeof(struct hostent)); - + if (src->h_name != NULL) { dest->h_name = strdup(src->h_name); assert(dest->h_name != NULL); } - + dest->h_addrtype = src->h_addrtype; dest->h_length = src->h_length; - + if (src->h_aliases != NULL) { aliases_num = 0; for (cp = src->h_aliases; *cp; ++cp) ++aliases_num; - + dest->h_aliases = (char **)malloc((aliases_num + 1) * (sizeof(char *))); assert(dest->h_aliases != NULL); memset(dest->h_aliases, 0, (aliases_num + 1) * (sizeof(char *))); - + for (cp = src->h_aliases; *cp; ++cp) { dest->h_aliases[cp - src->h_aliases] = strdup(*cp); assert(dest->h_aliases[cp - src->h_aliases] != NULL); } } - + if (src->h_addr_list != NULL) { addrs_num = 0; for (cp = src->h_addr_list; *cp; ++cp) ++addrs_num; - + dest->h_addr_list = (char **)malloc((addrs_num + 1) * (sizeof(char *))); assert(dest->h_addr_list != NULL); @@ -193,7 +193,7 @@ clone_hostent(struct hostent *dest, stru for (cp = src->h_addr_list; *cp; ++cp) { offset = cp - src->h_addr_list; - dest->h_addr_list[offset] = + dest->h_addr_list[offset] = (char *)malloc(src->h_length); assert(dest->h_addr_list[offset] != NULL); memcpy(dest->h_addr_list[offset], @@ -202,15 +202,15 @@ clone_hostent(struct hostent *dest, stru } } -static void +static void free_hostent(struct hostent *ht) { char **cp; - + assert(ht != NULL); - + free(ht->h_name); - + if (ht->h_aliases != NULL) { for (cp = ht->h_aliases; *cp; ++cp) free(*cp); @@ -224,33 +224,33 @@ free_hostent(struct hostent *ht) } } -static int +static int compare_hostent(struct hostent *ht1, struct hostent *ht2, void *mdata) { char **c1, **c2, **ct, **cb; int b; - + if (ht1 == ht2) return 0; - + if ((ht1 == NULL) || (ht2 == NULL)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Dec 4 09:19:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2A63A3FD4B; Fri, 4 Dec 2015 09:19:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB5F51978; Fri, 4 Dec 2015 09:19:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB49Ixp1051675; Fri, 4 Dec 2015 09:18:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB49IxNm051671; Fri, 4 Dec 2015 09:18:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512040918.tB49IxNm051671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 09:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291760 - stable/9/tools/regression/lib/libc/nss X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:19:01 -0000 Author: ngie Date: Fri Dec 4 09:18:59 2015 New Revision: 291760 URL: https://svnweb.freebsd.org/changeset/base/291760 Log: MFstable/10 r291759: MFC r291363: Clean up trailing whitespace Modified: stable/9/tools/regression/lib/libc/nss/test-getaddr.c stable/9/tools/regression/lib/libc/nss/test-getgr.c stable/9/tools/regression/lib/libc/nss/test-gethostby.c stable/9/tools/regression/lib/libc/nss/test-getproto.c stable/9/tools/regression/lib/libc/nss/test-getpw.c stable/9/tools/regression/lib/libc/nss/test-getrpc.c stable/9/tools/regression/lib/libc/nss/test-getserv.c stable/9/tools/regression/lib/libc/nss/test-getusershell.c stable/9/tools/regression/lib/libc/nss/testutil.h Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) stable/9/tools/regression/lib/libc/ (props changed) Modified: stable/9/tools/regression/lib/libc/nss/test-getaddr.c ============================================================================== --- stable/9/tools/regression/lib/libc/nss/test-getaddr.c Fri Dec 4 09:18:12 2015 (r291759) +++ stable/9/tools/regression/lib/libc/nss/test-getaddr.c Fri Dec 4 09:18:59 2015 (r291760) @@ -67,22 +67,22 @@ IMPLEMENT_TEST_DATA(addrinfo) IMPLEMENT_TEST_FILE_SNAPSHOT(addrinfo) IMPLEMENT_2PASS_TEST(addrinfo) -static void +static void clone_addrinfo(struct addrinfo *dest, struct addrinfo const *src) { assert(dest != NULL); assert(src != NULL); - + memcpy(dest, src, sizeof(struct addrinfo)); if (src->ai_canonname != NULL) dest->ai_canonname = strdup(src->ai_canonname); - + if (src->ai_addr != NULL) { dest->ai_addr = (struct sockaddr *)malloc(src->ai_addrlen); assert(dest->ai_addr != NULL); memcpy(dest->ai_addr, src->ai_addr, src->ai_addrlen); } - + if (src->ai_next != NULL) { dest->ai_next = (struct addrinfo *)malloc( sizeof(struct addrinfo)); @@ -96,7 +96,7 @@ compare_addrinfo_(struct addrinfo *ai1, { if ((ai1 == NULL) || (ai2 == NULL)) return (-1); - + if ((ai1->ai_flags != ai2->ai_flags) || (ai1->ai_family != ai2->ai_family) || (ai1->ai_socktype != ai2->ai_socktype) || @@ -107,11 +107,11 @@ compare_addrinfo_(struct addrinfo *ai1, (((ai1->ai_canonname == NULL) || (ai2->ai_canonname == NULL)) && (ai1->ai_canonname != ai2->ai_canonname))) return (-1); - - if ((ai1->ai_canonname != NULL) && + + if ((ai1->ai_canonname != NULL) && (strcmp(ai1->ai_canonname, ai2->ai_canonname) != 0)) return (-1); - + if ((ai1->ai_addr != NULL) && (memcmp(ai1->ai_addr, ai2->ai_addr, ai1->ai_addrlen) != 0)) return (-1); @@ -122,17 +122,17 @@ compare_addrinfo_(struct addrinfo *ai1, return (compare_addrinfo_(ai1->ai_next, ai2->ai_next)); } -static int +static int compare_addrinfo(struct addrinfo *ai1, struct addrinfo *ai2, void *mdata) { int rv; - + if (debug) { printf("testing equality of 2 addrinfo structures\n"); } rv = compare_addrinfo_(ai1, ai2); - + if (debug) { if (rv == 0) printf("equal\n"); @@ -142,16 +142,16 @@ compare_addrinfo(struct addrinfo *ai1, s printf("not equal\n"); } } - + return (rv); } -void +void free_addrinfo(struct addrinfo *ai) { if (ai == NULL) return; - + free(ai->ai_addr); free(ai->ai_canonname); free_addrinfo(ai->ai_next); @@ -159,9 +159,9 @@ free_addrinfo(struct addrinfo *ai) void sdump_addrinfo(struct addrinfo *ai, char *buffer, size_t buflen) -{ +{ int written, i; - + written = snprintf(buffer, buflen, "%d %d %d %d %d ", ai->ai_flags, ai->ai_family, ai->ai_socktype, ai->ai_protocol, ai->ai_addrlen); @@ -169,14 +169,14 @@ sdump_addrinfo(struct addrinfo *ai, char if (written > buflen) return; buflen -= written; - + written = snprintf(buffer, buflen, "%s ", ai->ai_canonname == NULL ? "(null)" : ai->ai_canonname); buffer += written; if (written > buflen) return; buflen -= written; - + if (ai->ai_addr == NULL) { written = snprintf(buffer, buflen, "(null)"); buffer += written; @@ -185,26 +185,26 @@ sdump_addrinfo(struct addrinfo *ai, char buflen -= written; } else { for (i = 0; i < ai->ai_addrlen; ++i ) { - written = snprintf(buffer, buflen, + written = snprintf(buffer, buflen, i + 1 != ai->ai_addrlen ? "%d." : "%d", ((unsigned char *)ai->ai_addr)[i]); buffer += written; if (written > buflen) return; buflen -= written; - + if (buflen == 0) return; - } + } } - + if (ai->ai_next != NULL) { written = snprintf(buffer, buflen, ":"); buffer += written; if (written > buflen) return; buflen -= written; - + sdump_addrinfo(ai->ai_next, buffer, buflen); } } @@ -224,12 +224,12 @@ static int addrinfo_read_snapshot_addr(char *addr, unsigned char *result, size_t len) { char *s, *ps, *ts; - + ps = addr; while ( (s = strsep(&ps, ".")) != NULL) { if (len == 0) return (-1); - + *result = (unsigned char)strtol(s, &ts, 10); ++result; if (*ts != '\0') @@ -265,7 +265,7 @@ addrinfo_read_snapshot_ai(struct addrinf goto fin; break; case 4: - ai->ai_addrlen = (socklen_t)strtol(s, &ts, 10); + ai->ai_addrlen = (socklen_t)strtol(s, &ts, 10); if (*ts != '\0') goto fin; break; @@ -274,7 +274,7 @@ addrinfo_read_snapshot_ai(struct addrinf ai->ai_canonname = strdup(s); assert(ai->ai_canonname != NULL); } - break; + break; case 6: if (strcmp(s, "(null)") != 0) { ai->ai_addr = (struct sockaddr *)malloc( @@ -284,7 +284,7 @@ addrinfo_read_snapshot_ai(struct addrinf rv = addrinfo_read_snapshot_addr(s, (unsigned char *)ai->ai_addr, ai->ai_addrlen); - + if (rv != 0) goto fin; } @@ -294,18 +294,18 @@ addrinfo_read_snapshot_ai(struct addrinf rv = -1; goto fin; }; - + ++i; } fin: - if ((i != 7) || (rv != 0)) { + if ((i != 7) || (rv != 0)) { free_addrinfo(ai); memset(ai, 0, sizeof(struct addrinfo)); return (-1); } - - return (0); + + return (0); } static int @@ -317,33 +317,33 @@ addrinfo_read_snapshot_func(struct addri if (debug) printf("1 line read from snapshot:\n%s\n", line); - + rv = 0; i = 0; ps = line; - + s = strsep(&ps, ":"); if (s == NULL) return (-1); - + rv = addrinfo_read_snapshot_ai(ai, s); if (rv != 0) return (-1); - + ai2 = ai; while ( (s = strsep(&ps, ":")) != NULL) { ai2->ai_next = (struct addrinfo *)malloc( sizeof(struct addrinfo)); assert(ai2->ai_next != NULL); memset(ai2->ai_next, 0, sizeof(struct addrinfo)); - + rv = addrinfo_read_snapshot_ai(ai2->ai_next, s); if (rv != 0) { - free_addrinfo(ai); + free_addrinfo(ai); return (-1); } - ai2 = ai2->ai_next; + ai2 = ai2->ai_next; } return (0); @@ -356,36 +356,36 @@ addrinfo_test_correctness(struct addrinf printf("testing correctness with the following data:\n"); dump_addrinfo(ai); } - + if (ai == NULL) goto errfin; - + if (!((ai->ai_family >= 0) && (ai->ai_family < AF_MAX))) goto errfin; - + if ((ai->ai_socktype != 0) && (ai->ai_socktype != SOCK_STREAM) && (ai->ai_socktype != SOCK_DGRAM) && (ai->ai_socktype != SOCK_RAW)) goto errfin; - + if ((ai->ai_protocol != 0) && (ai->ai_protocol != IPPROTO_UDP) && (ai->ai_protocol != IPPROTO_TCP)) goto errfin; - + if ((ai->ai_flags & ~(AI_CANONNAME | AI_NUMERICHOST | AI_PASSIVE)) != 0) goto errfin; - if ((ai->ai_addrlen != ai->ai_addr->sa_len) || + if ((ai->ai_addrlen != ai->ai_addr->sa_len) || (ai->ai_family != ai->ai_addr->sa_family)) goto errfin; - + if (debug) printf("correct\n"); - - return (0); + + return (0); errfin: if (debug) printf("incorrect\n"); - + return (-1); } @@ -393,27 +393,27 @@ static int addrinfo_read_hostlist_func(struct addrinfo *ai, char *line) { struct addrinfo *result; - int rv; - + int rv; + if (debug) printf("resolving %s: ", line); rv = getaddrinfo(line, NULL, &hints, &result); if (rv == 0) { if (debug) printf("found\n"); - + rv = addrinfo_test_correctness(result, NULL); if (rv != 0) { freeaddrinfo(result); return (rv); } - + clone_addrinfo(ai, result); freeaddrinfo(result); } else { if (debug) printf("not found\n"); - + memset(ai, 0, sizeof(struct addrinfo)); } return (0); @@ -435,10 +435,10 @@ main(int argc, char **argv) char *snapshot_file, *hostlist_file; int rv; int c; - + if (argc < 2) usage(); - + snapshot_file = NULL; hostlist_file = NULL; memset(&hints, 0, sizeof(struct addrinfo)); @@ -464,38 +464,38 @@ main(int argc, char **argv) default: usage(); } - + TEST_DATA_INIT(addrinfo, &td, clone_addrinfo, free_addrinfo); TEST_DATA_INIT(addrinfo, &td_snap, clone_addrinfo, free_addrinfo); - + if (hostlist_file == NULL) usage(); - + if (access(hostlist_file, R_OK) != 0) { if (debug) printf("can't access the hostlist file %s\n", hostlist_file); - + usage(); } - + if (debug) printf("building host lists from %s\n", hostlist_file); - + rv = TEST_SNAPSHOT_FILE_READ(addrinfo, hostlist_file, &td, addrinfo_read_hostlist_func); if (rv != 0) goto fin; - + if (snapshot_file != NULL) { - if (access(snapshot_file, W_OK | R_OK) != 0) { + if (access(snapshot_file, W_OK | R_OK) != 0) { if (errno == ENOENT) method = TEST_BUILD_SNAPSHOT; else { if (debug) printf("can't access the snapshot file %s\n", snapshot_file); - + rv = -1; goto fin; } @@ -509,7 +509,7 @@ main(int argc, char **argv) } } } - + switch (method) { case TEST_GETADDRINFO: if (snapshot_file != NULL) @@ -518,7 +518,7 @@ main(int argc, char **argv) break; case TEST_BUILD_SNAPSHOT: if (snapshot_file != NULL) { - rv = TEST_SNAPSHOT_FILE_WRITE(addrinfo, snapshot_file, &td, + rv = TEST_SNAPSHOT_FILE_WRITE(addrinfo, snapshot_file, &td, sdump_addrinfo); } break; Modified: stable/9/tools/regression/lib/libc/nss/test-getgr.c ============================================================================== --- stable/9/tools/regression/lib/libc/nss/test-getgr.c Fri Dec 4 09:18:12 2015 (r291759) +++ stable/9/tools/regression/lib/libc/nss/test-getgr.c Fri Dec 4 09:18:59 2015 (r291760) @@ -63,14 +63,14 @@ static void free_group(struct group *); static void sdump_group(struct group *, char *, size_t); static int group_read_snapshot_func(struct group *, char *); -static int group_check_ambiguity(struct group_test_data *, +static int group_check_ambiguity(struct group_test_data *, struct group *); static int group_fill_test_data(struct group_test_data *); static int group_test_correctness(struct group *, void *); static int group_test_getgrnam(struct group *, void *); static int group_test_getgrgid(struct group *, void *); static int group_test_getgrent(struct group *, void *); - + static void usage(void) __attribute__((__noreturn__)); IMPLEMENT_TEST_DATA(group) @@ -83,33 +83,33 @@ clone_group(struct group *dest, struct g { assert(dest != NULL); assert(src != NULL); - + char **cp; int members_num; - + memset(dest, 0, sizeof(struct group)); - + if (src->gr_name != NULL) { dest->gr_name = strdup(src->gr_name); assert(dest->gr_name != NULL); } - + if (src->gr_passwd != NULL) { dest->gr_passwd = strdup(src->gr_passwd); assert(dest->gr_passwd != NULL); } dest->gr_gid = src->gr_gid; - + if (src->gr_mem != NULL) { members_num = 0; for (cp = src->gr_mem; *cp; ++cp) ++members_num; - + dest->gr_mem = (char **)malloc( (members_num + 1) * (sizeof(char *))); assert(dest->gr_mem != NULL); memset(dest->gr_mem, 0, (members_num+1) * (sizeof(char *))); - + for (cp = src->gr_mem; *cp; ++cp) { dest->gr_mem[cp - src->gr_mem] = strdup(*cp); assert(dest->gr_mem[cp - src->gr_mem] != NULL); @@ -117,52 +117,52 @@ clone_group(struct group *dest, struct g } } -static void +static void free_group(struct group *grp) { char **cp; - + assert(grp != NULL); - + free(grp->gr_name); free(grp->gr_passwd); - + for (cp = grp->gr_mem; *cp; ++cp) free(*cp); free(grp->gr_mem); } -static int +static int compare_group(struct group *grp1, struct group *grp2, void *mdata) { char **c1, **c2; - + if (grp1 == grp2) return (0); - + if ((grp1 == NULL) || (grp2 == NULL)) goto errfin; - + if ((strcmp(grp1->gr_name, grp2->gr_name) != 0) || (strcmp(grp1->gr_passwd, grp2->gr_passwd) != 0) || (grp1->gr_gid != grp2->gr_gid)) goto errfin; - + c1 = grp1->gr_mem; c2 = grp2->gr_mem; - + if ((grp1->gr_mem == NULL) || (grp2->gr_mem == NULL)) goto errfin; - + for (;*c1 && *c2; ++c1, ++c2) if (strcmp(*c1, *c2) != 0) goto errfin; - + if ((*c1 != '\0') || (*c2 != '\0')) goto errfin; - + return 0; - + errfin: if ((debug) && (mdata == NULL)) { printf("following structures are not equal:\n"); @@ -178,14 +178,14 @@ sdump_group(struct group *grp, char *buf { char **cp; int written; - + written = snprintf(buffer, buflen, "%s %s %d", - grp->gr_name, grp->gr_passwd, grp->gr_gid); + grp->gr_name, grp->gr_passwd, grp->gr_gid); buffer += written; if (written > buflen) return; buflen -= written; - + if (grp->gr_mem != NULL) { if (*(grp->gr_mem) != '\0') { for (cp = grp->gr_mem; *cp; ++cp) { @@ -194,9 +194,9 @@ sdump_group(struct group *grp, char *buf if (written > buflen) return; buflen -= written; - + if (buflen == 0) - return; + return; } } else snprintf(buffer, buflen, " nomem"); @@ -213,7 +213,7 @@ group_read_snapshot_func(struct group *g if (debug) printf("1 line read from snapshot:\n%s\n", line); - + i = 0; sl = NULL; ps = line; @@ -243,10 +243,10 @@ group_read_snapshot_func(struct group *g if (sl == NULL) { if (strcmp(s, "(null)") == 0) return (0); - + sl = sl_init(); assert(sl != NULL); - + if (strcmp(s, "nomem") != 0) { ts = strdup(s); assert(ts != NULL); @@ -257,7 +257,7 @@ group_read_snapshot_func(struct group *g assert(ts != NULL); sl_add(sl, ts); } - break; + break; }; ++i; } @@ -268,16 +268,16 @@ group_read_snapshot_func(struct group *g memset(grp, 0, sizeof(struct group)); return (-1); } - + sl_add(sl, NULL); grp->gr_mem = sl->sl_str; /* NOTE: is it a dirty hack or not? */ - free(sl); + free(sl); return (0); } -static void +static void dump_group(struct group *result) { if (result != NULL) { @@ -292,7 +292,7 @@ static int group_fill_test_data(struct group_test_data *td) { struct group *grp; - + setgroupent(1); while ((grp = getgrent()) != NULL) { if (group_test_correctness(grp, NULL) == 0) @@ -301,7 +301,7 @@ group_fill_test_data(struct group_test_d return (-1); } endgrent(); - + return (0); } @@ -312,37 +312,37 @@ group_test_correctness(struct group *grp printf("testing correctness with the following data:\n"); dump_group(grp); } - + if (grp == NULL) goto errfin; - + if (grp->gr_name == NULL) goto errfin; - + if (grp->gr_passwd == NULL) goto errfin; - + if (grp->gr_mem == NULL) goto errfin; - + if (debug) printf("correct\n"); - - return (0); + + return (0); errfin: if (debug) printf("incorrect\n"); - + return (-1); } /* group_check_ambiguity() is needed here because when doing the getgrent() - * calls sequence, records from different nsswitch sources can be different, + * calls sequence, records from different nsswitch sources can be different, * though having the same pw_name/pw_uid */ static int group_check_ambiguity(struct group_test_data *td, struct group *pwd) { - + return (TEST_DATA_FIND(group, td, pwd, compare_group, NULL) != NULL ? 0 : -1); } @@ -351,7 +351,7 @@ static int group_test_getgrnam(struct group *grp_model, void *mdata) { struct group *grp; - + if (debug) { printf("testing getgrnam() with the following data:\n"); dump_group(grp_model); @@ -360,20 +360,20 @@ group_test_getgrnam(struct group *grp_mo grp = getgrnam(grp_model->gr_name); if (group_test_correctness(grp, NULL) != 0) goto errfin; - + if ((compare_group(grp, grp_model, NULL) != 0) && - (group_check_ambiguity((struct group_test_data *)mdata, grp) + (group_check_ambiguity((struct group_test_data *)mdata, grp) !=0)) goto errfin; - + if (debug) printf("ok\n"); return (0); - + errfin: if (debug) printf("not ok\n"); - + return (-1); } @@ -381,14 +381,14 @@ static int group_test_getgrgid(struct group *grp_model, void *mdata) { struct group *grp; - + if (debug) { printf("testing getgrgid() with the following data...\n"); dump_group(grp_model); - } - + } + grp = getgrgid(grp_model->gr_gid); - if ((group_test_correctness(grp, NULL) != 0) || + if ((group_test_correctness(grp, NULL) != 0) || ((compare_group(grp, grp_model, NULL) != 0) && (group_check_ambiguity((struct group_test_data *)mdata, grp) != 0))) { @@ -402,7 +402,7 @@ group_test_getgrgid(struct group *grp_mo } } -static int +static int group_test_getgrent(struct group *grp, void *mdata) { /* Only correctness can be checked when doing 1-pass test for @@ -426,10 +426,10 @@ main(int argc, char **argv) char *snapshot_file; int rv; int c; - + if (argc < 2) usage(); - + snapshot_file = NULL; while ((c = getopt(argc, argv, "nge2ds:")) != -1) switch (c) { @@ -454,18 +454,18 @@ main(int argc, char **argv) default: usage(); } - + TEST_DATA_INIT(group, &td, clone_group, free_group); TEST_DATA_INIT(group, &td_snap, clone_group, free_group); if (snapshot_file != NULL) { - if (access(snapshot_file, W_OK | R_OK) != 0) { + if (access(snapshot_file, W_OK | R_OK) != 0) { if (errno == ENOENT) method = TEST_BUILD_SNAPSHOT; else { if (debug) printf("can't access the file %s\n", snapshot_file); - + rv = -1; goto fin; } @@ -474,12 +474,12 @@ main(int argc, char **argv) rv = 0; goto fin; } - + TEST_SNAPSHOT_FILE_READ(group, snapshot_file, &td_snap, group_read_snapshot_func); } } - + rv = group_fill_test_data(&td); if (rv == -1) return (-1); @@ -489,7 +489,7 @@ main(int argc, char **argv) rv = DO_1PASS_TEST(group, &td, group_test_getgrnam, (void *)&td); else - rv = DO_1PASS_TEST(group, &td_snap, + rv = DO_1PASS_TEST(group, &td_snap, group_test_getgrnam, (void *)&td_snap); break; case TEST_GETGRGID: @@ -497,7 +497,7 @@ main(int argc, char **argv) rv = DO_1PASS_TEST(group, &td, group_test_getgrgid, (void *)&td); else - rv = DO_1PASS_TEST(group, &td_snap, + rv = DO_1PASS_TEST(group, &td_snap, group_test_getgrgid, (void *)&td_snap); break; case TEST_GETGRENT: @@ -510,7 +510,7 @@ main(int argc, char **argv) break; case TEST_GETGRENT_2PASS: TEST_DATA_INIT(group, &td_2pass, clone_group, free_group); - rv = group_fill_test_data(&td_2pass); + rv = group_fill_test_data(&td_2pass); if (rv != -1) rv = DO_2PASS_TEST(group, &td, &td_2pass, compare_group, NULL); @@ -518,7 +518,7 @@ main(int argc, char **argv) break; case TEST_BUILD_SNAPSHOT: if (snapshot_file != NULL) - rv = TEST_SNAPSHOT_FILE_WRITE(group, snapshot_file, &td, + rv = TEST_SNAPSHOT_FILE_WRITE(group, snapshot_file, &td, sdump_group); break; default: @@ -529,6 +529,6 @@ main(int argc, char **argv) fin: TEST_DATA_DESTROY(group, &td_snap); TEST_DATA_DESTROY(group, &td); - free(snapshot_file); + free(snapshot_file); return (rv); } Modified: stable/9/tools/regression/lib/libc/nss/test-gethostby.c ============================================================================== --- stable/9/tools/regression/lib/libc/nss/test-gethostby.c Fri Dec 4 09:18:12 2015 (r291759) +++ stable/9/tools/regression/lib/libc/nss/test-gethostby.c Fri Dec 4 09:18:59 2015 (r291760) @@ -90,7 +90,7 @@ static int hostent_test_correctness(stru static int hostent_test_gethostbyaddr(struct hostent *, void *); static int hostent_test_getaddrinfo_eq(struct hostent *, void *); static int hostent_test_getnameinfo_eq(struct hostent *, void *); - + static void usage(void) __attribute__((__noreturn__)); IMPLEMENT_TEST_DATA(hostent) @@ -103,7 +103,7 @@ __gethostbyname2(const char *name, int a { struct hostent *he; int error; - + if (use_ipnode_functions == 0) he = gethostbyname2(name, af); else { @@ -112,7 +112,7 @@ __gethostbyname2(const char *name, int a if (he == NULL); errno = error; } - + return (he); } @@ -121,7 +121,7 @@ __gethostbyaddr(const void *addr, sockle { struct hostent *he; int error; - + if (use_ipnode_functions == 0) he = gethostbyaddr(addr, len, af); else { @@ -130,8 +130,8 @@ __gethostbyaddr(const void *addr, sockle if (he == NULL) errno = error; } - - return (he); + + return (he); } static void @@ -147,44 +147,44 @@ clone_hostent(struct hostent *dest, stru { assert(dest != NULL); assert(src != NULL); - + char **cp; int aliases_num; int addrs_num; size_t offset; - + memset(dest, 0, sizeof(struct hostent)); - + if (src->h_name != NULL) { dest->h_name = strdup(src->h_name); assert(dest->h_name != NULL); } - + dest->h_addrtype = src->h_addrtype; dest->h_length = src->h_length; - + if (src->h_aliases != NULL) { aliases_num = 0; for (cp = src->h_aliases; *cp; ++cp) ++aliases_num; - + dest->h_aliases = (char **)malloc((aliases_num + 1) * (sizeof(char *))); assert(dest->h_aliases != NULL); memset(dest->h_aliases, 0, (aliases_num + 1) * (sizeof(char *))); - + for (cp = src->h_aliases; *cp; ++cp) { dest->h_aliases[cp - src->h_aliases] = strdup(*cp); assert(dest->h_aliases[cp - src->h_aliases] != NULL); } } - + if (src->h_addr_list != NULL) { addrs_num = 0; for (cp = src->h_addr_list; *cp; ++cp) ++addrs_num; - + dest->h_addr_list = (char **)malloc((addrs_num + 1) * (sizeof(char *))); assert(dest->h_addr_list != NULL); @@ -193,7 +193,7 @@ clone_hostent(struct hostent *dest, stru for (cp = src->h_addr_list; *cp; ++cp) { offset = cp - src->h_addr_list; - dest->h_addr_list[offset] = + dest->h_addr_list[offset] = (char *)malloc(src->h_length); assert(dest->h_addr_list[offset] != NULL); memcpy(dest->h_addr_list[offset], @@ -202,15 +202,15 @@ clone_hostent(struct hostent *dest, stru } } -static void +static void free_hostent(struct hostent *ht) { char **cp; - + assert(ht != NULL); - + free(ht->h_name); - + if (ht->h_aliases != NULL) { for (cp = ht->h_aliases; *cp; ++cp) free(*cp); @@ -224,33 +224,33 @@ free_hostent(struct hostent *ht) } } -static int +static int compare_hostent(struct hostent *ht1, struct hostent *ht2, void *mdata) { char **c1, **c2, **ct, **cb; int b; - + if (ht1 == ht2) return 0; - + if ((ht1 == NULL) || (ht2 == NULL)) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Dec 4 09:25:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1C48A40082; Fri, 4 Dec 2015 09:25:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FC301E18; Fri, 4 Dec 2015 09:25:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB49PDuq054555; Fri, 4 Dec 2015 09:25:13 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB49PDLS054554; Fri, 4 Dec 2015 09:25:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512040925.tB49PDLS054554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 09:25:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291761 - stable/10/tools/regression/lib/libc/resolv X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:25:14 -0000 Author: ngie Date: Fri Dec 4 09:25:13 2015 New Revision: 291761 URL: https://svnweb.freebsd.org/changeset/base/291761 Log: MFC r291359,r291362: r291359: Skip over lines that start with # (comments) r291362: r291359 was incorrect. Skip over tokens that start with `#' as fgetln can return more than one '\n' delimited line in a buffer Handle empty lines too, just in case Modified: stable/10/tools/regression/lib/libc/resolv/resolv.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/lib/libc/resolv/resolv.c ============================================================================== --- stable/10/tools/regression/lib/libc/resolv/resolv.c Fri Dec 4 09:18:59 2015 (r291760) +++ stable/10/tools/regression/lib/libc/resolv/resolv.c Fri Dec 4 09:25:13 2015 (r291761) @@ -90,8 +90,11 @@ load(const char *fname) char c = line[len]; char *ptr; line[len] = '\0'; - for (ptr = strtok(line, WS); ptr; ptr = strtok(NULL, WS)) + for (ptr = strtok(line, WS); ptr; ptr = strtok(NULL, WS)) { + if (ptr == '\0' || ptr[0] == '#') + continue; sl_add(hosts, strdup(ptr)); + } line[len] = c; } From owner-svn-src-all@freebsd.org Fri Dec 4 09:27:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B37F9A4013E; Fri, 4 Dec 2015 09:27:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82C3F1FD0; Fri, 4 Dec 2015 09:27:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB49RuDh054735; Fri, 4 Dec 2015 09:27:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB49RuQL054734; Fri, 4 Dec 2015 09:27:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512040927.tB49RuQL054734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 09:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291762 - stable/9/tools/regression/lib/libc/resolv X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:27:57 -0000 Author: ngie Date: Fri Dec 4 09:27:56 2015 New Revision: 291762 URL: https://svnweb.freebsd.org/changeset/base/291762 Log: MFstable/10 r243346,r291761: r243346 (by emaste): Non-void function should return a value. Found by: clang r291761: MFC r291359,r291362: r291359: Skip over lines that start with # (comments) r291362: r291359 was incorrect. Skip over tokens that start with `#' as fgetln can return more than one '\n' delimited line in a buffer Handle empty lines too, just in case Modified: stable/9/tools/regression/lib/libc/resolv/resolv.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) stable/9/tools/regression/lib/libc/ (props changed) Modified: stable/9/tools/regression/lib/libc/resolv/resolv.c ============================================================================== --- stable/9/tools/regression/lib/libc/resolv/resolv.c Fri Dec 4 09:25:13 2015 (r291761) +++ stable/9/tools/regression/lib/libc/resolv/resolv.c Fri Dec 4 09:27:56 2015 (r291762) @@ -90,8 +90,11 @@ load(const char *fname) char c = line[len]; char *ptr; line[len] = '\0'; - for (ptr = strtok(line, WS); ptr; ptr = strtok(NULL, WS)) + for (ptr = strtok(line, WS); ptr; ptr = strtok(NULL, WS)) { + if (ptr == '\0' || ptr[0] == '#') + continue; sl_add(hosts, strdup(ptr)); + } line[len] = c; } @@ -226,7 +229,7 @@ resolvloop(void *p) { int *nhosts = (int *)p; if (*nhosts == 0) - return; + return NULL; do resolvone(*nhosts); while (--(*nhosts)); From owner-svn-src-all@freebsd.org Fri Dec 4 09:29:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5424A40281; Fri, 4 Dec 2015 09:29:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8021A12AA; Fri, 4 Dec 2015 09:29:48 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB49Tllr054852; Fri, 4 Dec 2015 09:29:47 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB49TlOf054851; Fri, 4 Dec 2015 09:29:47 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512040929.tB49TlOf054851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 09:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291763 - stable/10/tests/sys/kern/acct X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:29:48 -0000 Author: ngie Date: Fri Dec 4 09:29:47 2015 New Revision: 291763 URL: https://svnweb.freebsd.org/changeset/base/291763 Log: MFC r291180: Fix up convert.c generation - Use a temporary file for convert.c to reduce likelihood of an interrupted build resulting in bad code being written to convert.c - Truncate the file instead of appending to it to ensure that the file being touched will not result in duplicate declarations/definitions from kern_acct.c if/when kern_acct.c changes. Modified: stable/10/tests/sys/kern/acct/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/kern/acct/Makefile ============================================================================== --- stable/10/tests/sys/kern/acct/Makefile Fri Dec 4 09:27:56 2015 (r291762) +++ stable/10/tests/sys/kern/acct/Makefile Fri Dec 4 09:29:47 2015 (r291763) @@ -6,12 +6,13 @@ ATF_TESTS_C= acct_test CFLAGS+= -I${.OBJDIR} -CLEANFILES+= convert.c +CLEANFILES+= convert.c convert.c.tmp DPSRCS.acct_test= convert.c convert.c: ${.CURDIR:H:H:H:H}/sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ - -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >>${.TARGET} + -e '/FLOAT_CONVERSION_START/,/FLOAT_CONVERSION_END/p' ${.ALLSRC} >${.TARGET}.tmp + mv ${.TARGET}.tmp ${.TARGET} .include From owner-svn-src-all@freebsd.org Fri Dec 4 09:32:04 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A604FA403C0; Fri, 4 Dec 2015 09:32:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 588381620; Fri, 4 Dec 2015 09:32:04 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB49W3qH055507; Fri, 4 Dec 2015 09:32:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB49W3mm055505; Fri, 4 Dec 2015 09:32:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512040932.tB49W3mm055505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 09:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291764 - in stable/10: contrib/netbsd-tests/kernel tests/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:32:04 -0000 Author: ngie Date: Fri Dec 4 09:32:03 2015 New Revision: 291764 URL: https://svnweb.freebsd.org/changeset/base/291764 Log: MFC r290913,r291181: r290913: Port contrib/netbsd-tests/kernel/t_mqueue.c to FreeBSD - Add missing headers - Ensure mqueuefs is loaded - Make sure the mqueuefs path is absolute and relative to / - Cast the result of mq_open returning -1 to (mqd_t) to mute a compiler warning Sponsored by: EMC / Isilon Storage Division r291181: Integrate contrib/netbsd-tests/kernel/t_mqueue into the FreeBSD test suite as tests/sys/kern/mqueue_test Modified: stable/10/contrib/netbsd-tests/kernel/t_mqueue.c stable/10/tests/sys/kern/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/kernel/t_mqueue.c ============================================================================== --- stable/10/contrib/netbsd-tests/kernel/t_mqueue.c Fri Dec 4 09:29:47 2015 (r291763) +++ stable/10/contrib/netbsd-tests/kernel/t_mqueue.c Fri Dec 4 09:32:03 2015 (r291764) @@ -6,6 +6,13 @@ * This file is in the Public Domain. */ +#ifdef __FreeBSD__ +#include +#include + +#include "freebsd_test_suite/macros.h" +#endif + #include #include @@ -111,16 +118,28 @@ ATF_TC_BODY(mqueue, tc) char template[32]; char mq_name[64]; +#ifdef __FreeBSD__ + ATF_REQUIRE_KERNEL_MODULE("mqueuefs"); +#endif + strlcpy(template, "./t_mqueue.XXXXXX", sizeof(template)); tmpdir = mkdtemp(template); ATF_REQUIRE_MSG(tmpdir != NULL, "mkdtemp failed: %d", errno); +#ifdef __FreeBSD__ + snprintf(mq_name, sizeof(mq_name), "/t_mqueue"); +#else snprintf(mq_name, sizeof(mq_name), "%s/mq", tmpdir); +#endif mqd_t mqfd; mqfd = mq_open(mq_name, O_RDWR | O_CREAT, S_IRUSR | S_IRWXG | S_IROTH, NULL); +#ifdef __FreeBSD__ + ATF_REQUIRE_MSG(mqfd != (mqd_t)-1, "mq_open failed: %d", errno); +#else ATF_REQUIRE_MSG(mqfd != -1, "mq_open failed: %d", errno); +#endif send_msgs(mqfd); receive_msgs(mqfd); Modified: stable/10/tests/sys/kern/Makefile ============================================================================== --- stable/10/tests/sys/kern/Makefile Fri Dec 4 09:29:47 2015 (r291763) +++ stable/10/tests/sys/kern/Makefile Fri Dec 4 09:32:03 2015 (r291764) @@ -15,6 +15,11 @@ LDADD.ptrace_test+= -lpthread LDADD.unix_seqpacket_test+= -lpthread NETBSD_ATF_TESTS_C+= lockf_test +NETBSD_ATF_TESTS_C+= mqueue_test + +CFLAGS.mqueue_test+= -I${SRCTOP}/tests +DPADD.mqueue_test+= ${LIBRT} +LDADD.mqueue_test+= -lrt WARNS?= 5 From owner-svn-src-all@freebsd.org Fri Dec 4 10:02:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC427A40AEE; Fri, 4 Dec 2015 10:02:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 993DF17ED; Fri, 4 Dec 2015 10:02:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4A2EPw066387; Fri, 4 Dec 2015 10:02:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4A2Evj066385; Fri, 4 Dec 2015 10:02:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512041002.tB4A2Evj066385@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 10:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291765 - in stable/9/tools/regression/lib/libc: nss resolv X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 10:02:15 -0000 Author: ngie Date: Fri Dec 4 10:02:14 2015 New Revision: 291765 URL: https://svnweb.freebsd.org/changeset/base/291765 Log: MFstable/10 r291758: MFC r291358: Remove cnftp.bjpu.edu.cn (it no longer resolves) Add localhost to resolv/mach for parity with nss/mach Modified: stable/9/tools/regression/lib/libc/nss/mach stable/9/tools/regression/lib/libc/resolv/mach Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) stable/9/tools/regression/lib/libc/ (props changed) Modified: stable/9/tools/regression/lib/libc/nss/mach ============================================================================== --- stable/9/tools/regression/lib/libc/nss/mach Fri Dec 4 09:32:03 2015 (r291764) +++ stable/9/tools/regression/lib/libc/nss/mach Fri Dec 4 10:02:14 2015 (r291765) @@ -11,7 +11,6 @@ antioche.antioche.eu.org boulder.tele.dk centaurus.4web.cz chur.math.ntnu.no -cnftp.bjpu.edu.cn console.netbsd.org cvs.fi.netbsd.org cvs.mikrolahti.fi Modified: stable/9/tools/regression/lib/libc/resolv/mach ============================================================================== --- stable/9/tools/regression/lib/libc/resolv/mach Fri Dec 4 09:32:03 2015 (r291764) +++ stable/9/tools/regression/lib/libc/resolv/mach Fri Dec 4 10:02:14 2015 (r291765) @@ -1,3 +1,5 @@ +# $FreeBSD$ +localhost above.warped.net anoncvs.cirr.com anoncvs.isc.netbsd.org @@ -9,7 +11,6 @@ antioche.antioche.eu.org boulder.tele.dk centaurus.4web.cz chur.math.ntnu.no -cnftp.bjpu.edu.cn console.netbsd.org cvs.fi.netbsd.org cvs.mikrolahti.fi From owner-svn-src-all@freebsd.org Fri Dec 4 10:34:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 991C6A40360; Fri, 4 Dec 2015 10:34:59 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64E9813D6; Fri, 4 Dec 2015 10:34:59 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4AYwYT075144; Fri, 4 Dec 2015 10:34:58 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4AYwFu075143; Fri, 4 Dec 2015 10:34:58 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201512041034.tB4AYwFu075143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Fri, 4 Dec 2015 10:34:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291766 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 10:34:59 -0000 Author: brueffer Date: Fri Dec 4 10:34:58 2015 New Revision: 291766 URL: https://svnweb.freebsd.org/changeset/base/291766 Log: ARC-1203 is supported since the latest driver update. Modified: head/share/man/man4/arcmsr.4 Modified: head/share/man/man4/arcmsr.4 ============================================================================== --- head/share/man/man4/arcmsr.4 Fri Dec 4 10:02:14 2015 (r291765) +++ head/share/man/man4/arcmsr.4 Fri Dec 4 10:34:58 2015 (r291766) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 18, 2013 +.Dd December 4, 2015 .Dt ARCMSR 4 .Os .Sh NAME @@ -94,6 +94,8 @@ ARC-1200 .It ARC-1201 .It +ARC-1203 +.It ARC-1210 .It ARC-1212 From owner-svn-src-all@freebsd.org Fri Dec 4 12:43:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B26E8A40AC5; Fri, 4 Dec 2015 12:43:06 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 78E0D1237; Fri, 4 Dec 2015 12:43:06 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 9A5F5781027; Fri, 4 Dec 2015 23:42:57 +1100 (AEDT) Date: Fri, 4 Dec 2015 23:42:51 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bryan Drewery cc: "Kenneth D. Merry" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291741 - head/sys/geom In-Reply-To: <56610B6B.8010708@FreeBSD.org> Message-ID: <20151204233052.J2220@besplex.bde.org> References: <201512040338.tB43cZY1053263@repo.freebsd.org> <56610B6B.8010708@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R4L+YolX c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=QKBkEAZcdmDwnr26A94A:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 12:43:06 -0000 On Thu, 3 Dec 2015, Bryan Drewery wrote: > On 12/3/2015 7:38 PM, Kenneth D. Merry wrote: >> g_disk_limit(struct disk *dp, struct bio *bp) >> { >> bool limited = false; >> - off_t d_maxsize; >> - >> - d_maxsize = (bp->bio_cmd == BIO_DELETE) ? >> - dp->d_delmaxsize : dp->d_maxsize; >> + off_t maxsz = g_disk_maxsize(dp, bp); > > This looks like a style issue. This looks like 5 style bugs and 0 issues: 3 old style bugs: - use of bool - initialization in declaration - unsorted declarations 2 new style bugs: - another initialization in declaration. A larger one - lost blank line after declarations. sys/geom had no instances of the bool style bug as recently as last month. At the top level, it didn't even use boolean_t. In subdirectories, it used boolean_t on 33 lines. Bruce From owner-svn-src-all@freebsd.org Fri Dec 4 13:00:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80914A40E75; Fri, 4 Dec 2015 13:00:36 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 4AEA8196A; Fri, 4 Dec 2015 13:00:35 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from bender (host81-149-102-120.in-addr.btopenworld.com [81.149.102.120]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 15331D78E6; Fri, 4 Dec 2015 12:53:57 +0000 (UTC) Date: Fri, 4 Dec 2015 12:53:55 +0000 From: Andrew Turner To: Bruce Evans Cc: Bryan Drewery , "Kenneth D. Merry" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291741 - head/sys/geom Message-ID: <20151204125355.6712d782@bender> In-Reply-To: <20151204233052.J2220@besplex.bde.org> References: <201512040338.tB43cZY1053263@repo.freebsd.org> <56610B6B.8010708@FreeBSD.org> <20151204233052.J2220@besplex.bde.org> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; amd64-portbld-freebsd10.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 13:00:36 -0000 On Fri, 4 Dec 2015 23:42:51 +1100 (EST) Bruce Evans wrote: ... > This looks like 5 style bugs and 0 issues: > > 3 old style bugs: > - use of bool I don't seem to see where in style(9) we disallow the use of bool. Can you point me where this is specified? Andrew From owner-svn-src-all@freebsd.org Fri Dec 4 13:26:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BECFBA41438; Fri, 4 Dec 2015 13:26:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59E031D2F; Fri, 4 Dec 2015 13:26:13 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4DQCUF032634; Fri, 4 Dec 2015 13:26:12 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4DQC0Q032629; Fri, 4 Dec 2015 13:26:12 GMT (envelope-from des@FreeBSD.org) Message-Id: <201512041326.tB4DQC0Q032629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Fri, 4 Dec 2015 13:26:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291767 - in stable/10: contrib/unbound contrib/unbound/compat contrib/unbound/daemon contrib/unbound/dns64 contrib/unbound/dnstap contrib/unbound/doc contrib/unbound/iterator contrib/u... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 13:26:13 -0000 Author: des Date: Fri Dec 4 13:26:12 2015 New Revision: 291767 URL: https://svnweb.freebsd.org/changeset/base/291767 Log: MFH (r287917, r287918, r289063): upgrade to latest Unbound MFH (r283301, r289592, r291582): rc script improvements MFH (r287880): respect manually configured forwarders when using DHCP MFH (r289321): deconfuse man page PR: 184047 203580 204931 Added: stable/10/contrib/unbound/compat/reallocarray.c - copied unchanged from r287917, head/contrib/unbound/compat/reallocarray.c stable/10/contrib/unbound/libunbound/python/file_py3.i - copied unchanged from r287917, head/contrib/unbound/libunbound/python/file_py3.i stable/10/contrib/unbound/sldns/ - copied from r287917, head/contrib/unbound/sldns/ Deleted: stable/10/contrib/unbound/ldns/ Modified: stable/10/contrib/unbound/Makefile.in stable/10/contrib/unbound/acx_nlnetlabs.m4 stable/10/contrib/unbound/compat/getentropy_linux.c stable/10/contrib/unbound/config.h stable/10/contrib/unbound/config.h.in stable/10/contrib/unbound/configure stable/10/contrib/unbound/configure.ac stable/10/contrib/unbound/daemon/cachedump.c stable/10/contrib/unbound/daemon/daemon.c stable/10/contrib/unbound/daemon/remote.c stable/10/contrib/unbound/daemon/stats.c stable/10/contrib/unbound/daemon/stats.h stable/10/contrib/unbound/daemon/worker.c stable/10/contrib/unbound/daemon/worker.h stable/10/contrib/unbound/dns64/dns64.c stable/10/contrib/unbound/dnstap/dnstap.c stable/10/contrib/unbound/doc/Changelog stable/10/contrib/unbound/doc/README stable/10/contrib/unbound/doc/example.conf stable/10/contrib/unbound/doc/example.conf.in stable/10/contrib/unbound/doc/libunbound.3 stable/10/contrib/unbound/doc/libunbound.3.in stable/10/contrib/unbound/doc/unbound-anchor.8 stable/10/contrib/unbound/doc/unbound-anchor.8.in stable/10/contrib/unbound/doc/unbound-checkconf.8 stable/10/contrib/unbound/doc/unbound-checkconf.8.in stable/10/contrib/unbound/doc/unbound-control.8 stable/10/contrib/unbound/doc/unbound-control.8.in stable/10/contrib/unbound/doc/unbound-host.1 stable/10/contrib/unbound/doc/unbound-host.1.in stable/10/contrib/unbound/doc/unbound.8 stable/10/contrib/unbound/doc/unbound.8.in stable/10/contrib/unbound/doc/unbound.conf.5 stable/10/contrib/unbound/doc/unbound.conf.5.in stable/10/contrib/unbound/iterator/iter_delegpt.c stable/10/contrib/unbound/iterator/iter_fwd.c stable/10/contrib/unbound/iterator/iter_hints.c stable/10/contrib/unbound/iterator/iter_priv.c stable/10/contrib/unbound/iterator/iter_resptype.c stable/10/contrib/unbound/iterator/iter_scrub.c stable/10/contrib/unbound/iterator/iter_utils.c stable/10/contrib/unbound/iterator/iter_utils.h stable/10/contrib/unbound/iterator/iterator.c stable/10/contrib/unbound/iterator/iterator.h stable/10/contrib/unbound/libunbound/context.c stable/10/contrib/unbound/libunbound/libunbound.c stable/10/contrib/unbound/libunbound/libworker.c stable/10/contrib/unbound/libunbound/python/Makefile stable/10/contrib/unbound/libunbound/python/examples/async-lookup.py stable/10/contrib/unbound/libunbound/python/examples/dns-lookup.py stable/10/contrib/unbound/libunbound/python/examples/dnssec-valid.py stable/10/contrib/unbound/libunbound/python/examples/dnssec_test.py stable/10/contrib/unbound/libunbound/python/examples/example8-1.py stable/10/contrib/unbound/libunbound/python/examples/idn-lookup.py stable/10/contrib/unbound/libunbound/python/examples/mx-lookup.py stable/10/contrib/unbound/libunbound/python/examples/ns-lookup.py stable/10/contrib/unbound/libunbound/python/examples/reverse-lookup.py stable/10/contrib/unbound/libunbound/python/libunbound.i stable/10/contrib/unbound/libunbound/worker.h stable/10/contrib/unbound/services/cache/dns.c stable/10/contrib/unbound/services/cache/infra.c stable/10/contrib/unbound/services/cache/infra.h stable/10/contrib/unbound/services/cache/rrset.c stable/10/contrib/unbound/services/listen_dnsport.c stable/10/contrib/unbound/services/listen_dnsport.h stable/10/contrib/unbound/services/localzone.c stable/10/contrib/unbound/services/localzone.h stable/10/contrib/unbound/services/mesh.c stable/10/contrib/unbound/services/outside_network.c stable/10/contrib/unbound/sldns/rrdef.h stable/10/contrib/unbound/smallapp/unbound-anchor.c stable/10/contrib/unbound/smallapp/unbound-checkconf.c stable/10/contrib/unbound/smallapp/unbound-control-setup.sh stable/10/contrib/unbound/smallapp/unbound-control-setup.sh.in stable/10/contrib/unbound/smallapp/unbound-control.c stable/10/contrib/unbound/smallapp/unbound-host.c stable/10/contrib/unbound/util/alloc.c stable/10/contrib/unbound/util/alloc.h stable/10/contrib/unbound/util/config_file.c stable/10/contrib/unbound/util/config_file.h stable/10/contrib/unbound/util/configlexer.lex stable/10/contrib/unbound/util/configparser.y stable/10/contrib/unbound/util/data/dname.c stable/10/contrib/unbound/util/data/msgencode.c stable/10/contrib/unbound/util/data/msgparse.c stable/10/contrib/unbound/util/data/msgparse.h stable/10/contrib/unbound/util/data/msgreply.c stable/10/contrib/unbound/util/data/msgreply.h stable/10/contrib/unbound/util/data/packed_rrset.c stable/10/contrib/unbound/util/data/packed_rrset.h stable/10/contrib/unbound/util/fptr_wlist.c stable/10/contrib/unbound/util/iana_ports.inc stable/10/contrib/unbound/util/log.c stable/10/contrib/unbound/util/log.h stable/10/contrib/unbound/util/net_help.c stable/10/contrib/unbound/util/netevent.c stable/10/contrib/unbound/util/netevent.h stable/10/contrib/unbound/validator/autotrust.c stable/10/contrib/unbound/validator/val_anchor.c stable/10/contrib/unbound/validator/val_kentry.c stable/10/contrib/unbound/validator/val_neg.c stable/10/contrib/unbound/validator/val_nsec3.c stable/10/contrib/unbound/validator/val_secalgo.c stable/10/contrib/unbound/validator/val_sigcrypt.c stable/10/contrib/unbound/validator/validator.c stable/10/etc/rc.d/local_unbound stable/10/lib/libunbound/Makefile stable/10/usr.sbin/unbound/local-setup/local-unbound-setup.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/unbound/Makefile.in ============================================================================== --- stable/10/contrib/unbound/Makefile.in Fri Dec 4 10:34:58 2015 (r291766) +++ stable/10/contrib/unbound/Makefile.in Fri Dec 4 13:26:12 2015 (r291767) @@ -25,6 +25,7 @@ DNSTAP_SRC=@DNSTAP_SRC@ DNSTAP_OBJ=@DNSTAP_OBJ@ WITH_PYTHONMODULE=@WITH_PYTHONMODULE@ WITH_PYUNBOUND=@WITH_PYUNBOUND@ +PY_MAJOR_VERSION=@PY_MAJOR_VERSION@ PYTHON_SITE_PKG=@PYTHON_SITE_PKG@ PYTHONMOD_INSTALL=@PYTHONMOD_INSTALL@ PYTHONMOD_UNINSTALL=@PYTHONMOD_UNINSTALL@ @@ -131,12 +132,12 @@ compat/memcmp.c compat/memmove.c compat/ compat/strlcpy.c compat/strptime.c compat/getentropy_linux.c \ compat/getentropy_osx.c compat/getentropy_solaris.c compat/getentropy_win.c \ compat/explicit_bzero.c compat/arc4random.c compat/arc4random_uniform.c \ -compat/arc4_lock.c compat/sha512.c +compat/arc4_lock.c compat/sha512.c compat/reallocarray.c COMPAT_OBJ=$(LIBOBJS:.o=.lo) COMPAT_OBJ_WITHOUT_CTIME=$(LIBOBJ_WITHOUT_CTIME:.o=.lo) COMPAT_OBJ_WITHOUT_CTIMEARC4=$(LIBOBJ_WITHOUT_CTIMEARC4:.o=.lo) -SLDNS_SRC=ldns/keyraw.c ldns/sbuffer.c ldns/wire2str.c ldns/parse.c \ -ldns/parseutil.c ldns/rrdef.c ldns/str2wire.c +SLDNS_SRC=sldns/keyraw.c sldns/sbuffer.c sldns/wire2str.c sldns/parse.c \ +sldns/parseutil.c sldns/rrdef.c sldns/str2wire.c SLDNS_OBJ=keyraw.lo sbuffer.lo wire2str.lo parse.lo parseutil.lo rrdef.lo \ str2wire.lo UNITTEST_SRC=testcode/unitanchor.c testcode/unitdname.c \ @@ -167,7 +168,7 @@ HOST_OBJ=unbound-host.lo HOST_OBJ_LINK=$(HOST_OBJ) $(SLDNS_OBJ) $(COMPAT_OBJ_WITHOUT_CTIMEARC4) @WIN_HOST_OBJ_LINK@ UBANCHOR_SRC=smallapp/unbound-anchor.c UBANCHOR_OBJ=unbound-anchor.lo -UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) \ +UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) parseutil.lo \ $(COMPAT_OBJ_WITHOUT_CTIME) @WIN_UBANCHOR_OBJ_LINK@ TESTBOUND_SRC=testcode/testbound.c testcode/testpkts.c \ daemon/worker.c daemon/acl_list.c daemon/daemon.c daemon/stats.c \ @@ -393,7 +394,7 @@ libunbound_wrap.lo libunbound_wrap.o: li unbound.h libunbound/python/libunbound_wrap.c: $(srcdir)/libunbound/python/libunbound.i unbound.h @-if test ! -d libunbound/python; then $(INSTALL) -d libunbound/python; fi - $(SWIG) -python -o $@ $(CPPFLAGS) $(srcdir)/libunbound/python/libunbound.i + $(SWIG) -python -o $@ $(CPPFLAGS) -DPY_MAJOR_VERSION=$(PY_MAJOR_VERSION) $(srcdir)/libunbound/python/libunbound.i # Pyunbound python unbound wrapper _unbound.la: libunbound_wrap.lo libunbound.la @@ -597,146 +598,151 @@ dns.lo dns.o: $(srcdir)/services/cache/d $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/ldns/sbuffer.h -infra.lo infra.o: $(srcdir)/services/cache/infra.c config.h $(srcdir)/ldns/rrdef.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h +infra.lo infra.o: $(srcdir)/services/cache/infra.c config.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h \ $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/util/rtt.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lookup3.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/iterator/iterator.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h rrset.lo rrset.o: $(srcdir)/services/cache/rrset.c config.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/regional.h $(srcdir)/util/alloc.h dname.lo dname.o: $(srcdir)/util/data/dname.c config.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/storage/lookup3.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/storage/lookup3.h $(srcdir)/sldns/sbuffer.h msgencode.lo msgencode.o: $(srcdir)/util/data/msgencode.c config.h $(srcdir)/util/data/msgencode.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/sldns/sbuffer.h msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/util/data/dname.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/parseutil.h \ - $(srcdir)/ldns/wire2str.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/dname.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/sldns/wire2str.h msgreply.lo msgreply.o: $(srcdir)/util/data/msgreply.c config.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/util/data/msgencode.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/wire2str.h + $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgencode.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h packed_rrset.lo packed_rrset.o: $(srcdir)/util/data/packed_rrset.c config.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h \ - $(srcdir)/util/net_help.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/wire2str.h + $(srcdir)/util/net_help.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h iterator.lo iterator.o: $(srcdir)/iterator/iterator.c config.h $(srcdir)/iterator/iterator.h \ $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/iterator/iter_utils.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/iterator/iter_utils.h \ $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_donotq.h \ $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_scrub.h $(srcdir)/iterator/iter_priv.h \ $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/util/config_file.h $(srcdir)/ldns/wire2str.h \ - $(srcdir)/ldns/parseutil.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/util/config_file.h $(srcdir)/util/random.h \ + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/sbuffer.h iter_delegpt.lo iter_delegpt.o: $(srcdir)/iterator/iter_delegpt.c config.h $(srcdir)/iterator/iter_delegpt.h \ $(srcdir)/util/log.h $(srcdir)/services/cache/dns.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/regional.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h iter_donotq.lo iter_donotq.o: $(srcdir)/iterator/iter_donotq.c config.h $(srcdir)/iterator/iter_donotq.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h iter_fwd.lo iter_fwd.o: $(srcdir)/iterator/iter_fwd.c config.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/str2wire.h + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h iter_hints.lo iter_hints.o: $(srcdir)/iterator/iter_hints.c config.h $(srcdir)/iterator/iter_hints.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/str2wire.h \ - $(srcdir)/ldns/wire2str.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/wire2str.h iter_priv.lo iter_priv.o: $(srcdir)/iterator/iter_priv.c config.h $(srcdir)/iterator/iter_priv.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/sbuffer.h iter_resptype.lo iter_resptype.o: $(srcdir)/iterator/iter_resptype.c config.h \ $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ $(srcdir)/services/cache/dns.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/pkthdr.h + $(srcdir)/util/data/dname.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h iter_scrub.lo iter_scrub.o: $(srcdir)/iterator/iter_scrub.c config.h $(srcdir)/iterator/iter_scrub.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/iterator/iter_priv.h $(srcdir)/util/rbtree.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/alloc.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/alloc.h $(srcdir)/sldns/sbuffer.h iter_utils.lo iter_utils.o: $(srcdir)/iterator/iter_utils.c config.h $(srcdir)/iterator/iter_utils.h \ $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_donotq.h \ - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_priv.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ - $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \ - $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_fwd.h \ + $(srcdir)/iterator/iter_donotq.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_priv.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h $(srcdir)/util/random.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ + $(srcdir)/services/modstack.h $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_kcache.h \ + $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_sigcrypt.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h listen_dnsport.lo listen_dnsport.o: $(srcdir)/services/listen_dnsport.c config.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h $(srcdir)/services/outside_network.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ - $(srcdir)/util/net_help.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/net_help.h $(srcdir)/sldns/sbuffer.h localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h $(srcdir)/services/localzone.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ $(srcdir)/util/net_help.h $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/util/log.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ - $(srcdir)/util/data/msgencode.h $(srcdir)/util/timehist.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h \ - $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/log.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/dns.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/regional.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/timehist.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h modstack.lo modstack.o: $(srcdir)/services/modstack.c config.h $(srcdir)/services/modstack.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h $(srcdir)/iterator/iterator.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/dns64/dns64.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h outside_network.lo outside_network.o: $(srcdir)/services/outside_network.c config.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ - $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rtt.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/module.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/dnstap/dnstap.h \ alloc.lo alloc.o: $(srcdir)/util/alloc.c config.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/regional.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h config_file.lo config_file.o: $(srcdir)/util/config_file.c config.h $(srcdir)/util/log.h \ $(srcdir)/util/configyyrename.h $(srcdir)/util/config_file.h util/configparser.h \ $(srcdir)/util/net_help.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/regional.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/modstack.h $(srcdir)/util/data/dname.h $(srcdir)/util/rtt.h $(srcdir)/ldns/wire2str.h \ - $(srcdir)/ldns/parseutil.h $(srcdir)/util/iana_ports.inc + $(srcdir)/services/modstack.h $(srcdir)/util/data/dname.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/util/iana_ports.inc configlexer.lo configlexer.o: util/configlexer.c config.h $(srcdir)/util/configyyrename.h \ $(srcdir)/util/config_file.h util/configparser.h configparser.lo configparser.o: util/configparser.c config.h $(srcdir)/util/configyyrename.h \ @@ -744,46 +750,45 @@ configparser.lo configparser.o: util/con fptr_wlist.lo fptr_wlist.o: $(srcdir)/util/fptr_wlist.c config.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ - $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h \ + $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/dns64/dns64.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \ - $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h \ - $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/util/config_file.h + $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/libunbound/libworker.h \ + $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/libunbound/unbound.h \ + $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/config_file.h locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h -log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/ldns/sbuffer.h +log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h module.lo module.o: $(srcdir)/util/module.c config.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h $(srcdir)/util/netevent.h $(srcdir)/util/log.h \ $(srcdir)/util/net_help.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/dnstap/dnstap.h \ $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/regional.h $(srcdir)/ldns/parseutil.h \ - $(srcdir)/ldns/wire2str.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/sldns/wire2str.h \ random.lo random.o: $(srcdir)/util/random.c config.h $(srcdir)/util/random.h $(srcdir)/util/log.h rbtree.lo rbtree.o: $(srcdir)/util/rbtree.c config.h $(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h regional.lo regional.o: $(srcdir)/util/regional.c config.h $(srcdir)/util/log.h $(srcdir)/util/regional.h rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h @@ -794,7 +799,7 @@ lookup3.lo lookup3.o: $(srcdir)/util/sto lruhash.lo lruhash.o: $(srcdir)/util/storage/lruhash.c config.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h slabhash.lo slabhash.o: $(srcdir)/util/storage/slabhash.c config.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h @@ -802,43 +807,44 @@ timehist.lo timehist.o: $(srcdir)/util/t tube.lo tube.o: $(srcdir)/util/tube.c config.h $(srcdir)/util/tube.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/netevent.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/services/mesh.h \ $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h winsock_event.lo winsock_event.o: $(srcdir)/util/winsock_event.c config.h autotrust.lo autotrust.o: $(srcdir)/validator/autotrust.c config.h $(srcdir)/validator/autotrust.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_utils.h \ $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/dname.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/random.h \ $(srcdir)/services/mesh.h $(srcdir)/util/netevent.h $(srcdir)/services/modstack.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/validator/val_kcache.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/keyraw.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/keyraw.h \ val_anchor.lo val_anchor.o: $(srcdir)/validator/val_anchor.c config.h $(srcdir)/validator/val_anchor.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_sigcrypt.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/validator/autotrust.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/str2wire.h + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/str2wire.h validator.lo validator.o: $(srcdir)/validator/validator.c config.h $(srcdir)/validator/validator.h \ $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ - $(srcdir)/util/rbtree.h $(srcdir)/validator/val_kcache.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_nsec3.h \ - $(srcdir)/validator/val_neg.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/autotrust.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/ldns/wire2str.h + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h $(srcdir)/validator/val_kcache.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_nsec.h \ + $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_neg.h $(srcdir)/validator/val_sigcrypt.h \ + $(srcdir)/validator/autotrust.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ + $(srcdir)/sldns/wire2str.h val_kcache.lo val_kcache.o: $(srcdir)/validator/val_kcache.c config.h $(srcdir)/validator/val_kcache.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/validator/val_kentry.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h val_kentry.lo val_kentry.o: $(srcdir)/validator/val_kentry.c config.h $(srcdir)/validator/val_kentry.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/keyraw.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ val_neg.lo val_neg.o: $(srcdir)/validator/val_neg.c config.h \ $(srcdir)/validator/val_neg.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ @@ -846,78 +852,78 @@ val_neg.lo val_neg.o: $(srcdir)/validato $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h val_nsec3.lo val_nsec3.o: $(srcdir)/validator/val_nsec3.c config.h \ $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/validator.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kentry.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/regional.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/validator/val_nsec.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/validator/val_nsec.h $(srcdir)/sldns/sbuffer.h val_nsec.lo val_nsec.o: $(srcdir)/validator/val_nsec.c config.h $(srcdir)/validator/val_nsec.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/validator/val_utils.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h + $(srcdir)/util/net_help.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h val_secalgo.lo val_secalgo.o: $(srcdir)/validator/val_secalgo.c config.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_secalgo.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/keyraw.h \ - $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/sldns/sbuffer.h \ val_sigcrypt.lo val_sigcrypt.o: $(srcdir)/validator/val_sigcrypt.c config.h \ $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_secalgo.h $(srcdir)/validator/validator.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/ldns/keyraw.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/parseutil.h $(srcdir)/ldns/wire2str.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/wire2str.h \ val_utils.lo val_utils.o: $(srcdir)/validator/val_utils.c config.h $(srcdir)/validator/val_utils.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_kentry.h \ $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h \ $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/net_help.h $(srcdir)/util/regional.h dns64.lo dns64.o: $(srcdir)/dns64/dns64.c config.h $(srcdir)/dns64/dns64.h $(srcdir)/util/module.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/regional.h + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/config_file.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/modstack.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/testcode/checklocks.h -dnstap.lo dnstap.o: $(srcdir)/dnstap/dnstap.c config.h $(srcdir)/ldns/sbuffer.h \ +dnstap.lo dnstap.o: $(srcdir)/dnstap/dnstap.c config.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h \ $(srcdir)/dnstap/dnstap.h \ $(srcdir)/dnstap/dnstap.pb-c.h dnstap.pb-c.lo dnstap.pb-c.o: $(srcdir)/dnstap/dnstap.pb-c.c $(srcdir)/dnstap/dnstap.pb-c.h unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/testcode/unitmain.h \ - $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/rrdef.h + $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h unitdname.lo unitdname.o: $(srcdir)/testcode/unitdname.c config.h $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/rrdef.h + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h unitlruhash.lo unitlruhash.o: $(srcdir)/testcode/unitlruhash.c config.h $(srcdir)/testcode/unitmain.h \ $(srcdir)/util/log.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/keyraw.h \ - $(srcdir)/util/log.h \ - $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/random.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/random.h unitmsgparse.lo unitmsgparse.o: $(srcdir)/testcode/unitmsgparse.c config.h $(srcdir)/util/log.h \ $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/alloc.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/testcode/readhex.h \ - $(srcdir)/testcode/testpkts.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/wire2str.h + $(srcdir)/testcode/testpkts.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h unitneg.lo unitneg.o: $(srcdir)/testcode/unitneg.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/data/dname.h $(srcdir)/testcode/unitmain.h $(srcdir)/validator/val_neg.h $(srcdir)/util/rbtree.h \ - $(srcdir)/ldns/rrdef.h + $(srcdir)/sldns/rrdef.h unitregional.lo unitregional.o: $(srcdir)/testcode/unitregional.c config.h $(srcdir)/testcode/unitmain.h \ $(srcdir)/util/log.h $(srcdir)/util/regional.h unitslabhash.lo unitslabhash.o: $(srcdir)/testcode/unitslabhash.c config.h $(srcdir)/testcode/unitmain.h \ @@ -927,88 +933,89 @@ unitverify.lo unitverify.o: $(srcdir)/te $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/validator/val_secalgo.h \ $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h \ $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/validator/val_utils.h \ $(srcdir)/testcode/testpkts.h $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/alloc.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/keyraw.h \ - $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/wire2str.h + $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h readhex.lo readhex.o: $(srcdir)/testcode/readhex.c config.h $(srcdir)/testcode/readhex.h $(srcdir)/util/log.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/parseutil.h + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcode/testpkts.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/wire2str.h + $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h unitldns.lo unitldns.o: $(srcdir)/testcode/unitldns.c config.h $(srcdir)/util/log.h $(srcdir)/testcode/unitmain.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/wire2str.h + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h \ $(srcdir)/daemon/cachedump.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h \ - $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h \ - $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/util/rbtree.h \ - $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h $(srcdir)/ldns/wire2str.h \ - $(srcdir)/ldns/str2wire.h + $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/sldns/wire2str.h \ + $(srcdir)/sldns/str2wire.h daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h \ - $(srcdir)/util/net_help.h $(srcdir)/ldns/keyraw.h + $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h remote.lo remote.o: $(srcdir)/daemon/remote.c config.h \ $(srcdir)/daemon/remote.h \ - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ $(srcdir)/services/modstack.h $(srcdir)/daemon/cachedump.h $(srcdir)/util/config_file.h \ $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/localzone.h $(srcdir)/util/fptr_wlist.h \ - $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/services/mesh.h $(srcdir)/services/localzone.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h \ $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \ $(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/services/outside_network.h $(srcdir)/ldns/str2wire.h \ - $(srcdir)/ldns/parseutil.h $(srcdir)/ldns/wire2str.h + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/iterator/iter_delegpt.h \ + $(srcdir)/services/outside_network.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/sldns/wire2str.h stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/validator/validator.h \ - $(srcdir)/validator/val_utils.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h + $(srcdir)/services/listen_dnsport.h $(srcdir)/util/config_file.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h \ + $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h unbound.lo unbound.o: $(srcdir)/daemon/unbound.c config.h $(srcdir)/util/log.h $(srcdir)/daemon/daemon.h \ $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/remote.h \ $(srcdir)/util/config_file.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/util/net_help.h $(srcdir)/util/mini_event.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/rtt.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h $(srcdir)/util/mini_event.h \ $(srcdir)/util/rbtree.h worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h \ @@ -1022,23 +1029,23 @@ worker.lo worker.o: $(srcdir)/daemon/wor testbound.lo testbound.o: $(srcdir)/testcode/testbound.c config.h $(srcdir)/testcode/testpkts.h \ $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h \ $(srcdir)/daemon/remote.h \ - $(srcdir)/util/config_file.h $(srcdir)/ldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/util/log.h \ + $(srcdir)/util/config_file.h $(srcdir)/sldns/keyraw.h $(srcdir)/daemon/unbound.c $(srcdir)/util/log.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rtt.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/net_help.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h testpkts.lo testpkts.o: $(srcdir)/testcode/testpkts.c config.h $(srcdir)/testcode/testpkts.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/wire2str.h + $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h worker.lo worker.o: $(srcdir)/daemon/worker.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ - $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ + $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/daemon.h \ $(srcdir)/services/modstack.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/storage/slabhash.h \ @@ -1055,134 +1062,135 @@ acl_list.lo acl_list.o: $(srcdir)/daemon daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/acl_list.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/config_file.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h \ - $(srcdir)/util/net_help.h $(srcdir)/ldns/keyraw.h + $(srcdir)/util/net_help.h $(srcdir)/sldns/keyraw.h stats.lo stats.o: $(srcdir)/daemon/stats.c config.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ - $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h \ + $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/netevent.h $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h $(srcdir)/dnstap/dnstap.h \ $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/outside_network.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h $(srcdir)/validator/validator.h \ - $(srcdir)/validator/val_utils.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h + $(srcdir)/services/listen_dnsport.h $(srcdir)/util/config_file.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h \ + $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rtt.h $(srcdir)/validator/val_kcache.h replay.lo replay.o: $(srcdir)/testcode/replay.c config.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ $(srcdir)/util/config_file.h $(srcdir)/testcode/replay.h $(srcdir)/util/netevent.h $(srcdir)/testcode/testpkts.h \ - $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/rrdef.h + $(srcdir)/util/rbtree.h $(srcdir)/testcode/fake_event.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h fake_event.lo fake_event.o: $(srcdir)/testcode/fake_event.c config.h $(srcdir)/testcode/fake_event.h \ $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ $(srcdir)/util/data/dname.h $(srcdir)/util/config_file.h $(srcdir)/services/listen_dnsport.h \ $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ - $(srcdir)/services/modstack.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/str2wire.h + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ + $(srcdir)/testcode/replay.h $(srcdir)/testcode/testpkts.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/module.h \ + $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h lock_verify.lo lock_verify.o: $(srcdir)/testcode/lock_verify.c config.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h pktview.lo pktview.o: $(srcdir)/testcode/pktview.c config.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/testcode/unitmain.h $(srcdir)/testcode/readhex.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/ldns/parseutil.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/testcode/unitmain.h $(srcdir)/testcode/readhex.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/parseutil.h readhex.lo readhex.o: $(srcdir)/testcode/readhex.c config.h $(srcdir)/testcode/readhex.h $(srcdir)/util/log.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/parseutil.h + $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parseutil.h memstats.lo memstats.o: $(srcdir)/testcode/memstats.c config.h $(srcdir)/util/log.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/locks.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h unbound-checkconf.lo unbound-checkconf.o: $(srcdir)/smallapp/unbound-checkconf.c config.h $(srcdir)/util/log.h \ $(srcdir)/util/config_file.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/services/localzone.h \ - $(srcdir)/ldns/sbuffer.h + $(srcdir)/sldns/sbuffer.h worker_cb.lo worker_cb.o: $(srcdir)/smallapp/worker_cb.c config.h $(srcdir)/libunbound/context.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/libunbound/worker.h $(srcdir)/ldns/sbuffer.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h + $(srcdir)/libunbound/worker.h $(srcdir)/sldns/sbuffer.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h context.lo context.o: $(srcdir)/libunbound/context.c config.h $(srcdir)/libunbound/context.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ $(srcdir)/libunbound/unbound.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/localzone.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ - $(srcdir)/util/rtt.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h $(srcdir)/sldns/sbuffer.h libunbound.lo libunbound.o: $(srcdir)/libunbound/libunbound.c $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/unbound-event.h config.h $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/libunbound/libworker.h \ $(srcdir)/util/config_file.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/regional.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/regional.h \ $(srcdir)/util/random.h $(srcdir)/util/net_help.h $(srcdir)/util/tube.h $(srcdir)/services/localzone.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rtt.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/sldns/sbuffer.h libworker.lo libworker.o: $(srcdir)/libunbound/libworker.c config.h \ $(srcdir)/libunbound/libworker.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/libunbound/context.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h $(srcdir)/libunbound/unbound.h $(srcdir)/libunbound/worker.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/libunbound/unbound-event.h $(srcdir)/services/outside_network.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/libunbound/unbound-event.h $(srcdir)/services/outside_network.h \ $(srcdir)/util/netevent.h $(srcdir)/services/mesh.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/module.h \ $(srcdir)/util/data/msgreply.h $(srcdir)/services/localzone.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/outbound_list.h $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/tube.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/util/config_file.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/data/msgencode.h $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h \ - $(srcdir)/util/storage/dnstree.h $(srcdir)/ldns/str2wire.h + $(srcdir)/util/storage/dnstree.h $(srcdir)/sldns/str2wire.h unbound-host.lo unbound-host.o: $(srcdir)/smallapp/unbound-host.c config.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/wire2str.h + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/wire2str.h asynclook.lo asynclook.o: $(srcdir)/testcode/asynclook.c config.h $(srcdir)/libunbound/unbound.h \ $(srcdir)/libunbound/context.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/ldns/rrdef.h + $(srcdir)/sldns/rrdef.h streamtcp.lo streamtcp.o: $(srcdir)/testcode/streamtcp.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/net_help.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/dname.h $(srcdir)/ldns/sbuffer.h \ - $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/wire2str.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/rrdef.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/dname.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/wire2str.h \ perf.lo perf.o: $(srcdir)/testcode/perf.c config.h $(srcdir)/util/log.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/str2wire.h + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h delayer.lo delayer.o: $(srcdir)/testcode/delayer.c config.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ - $(srcdir)/util/config_file.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/util/config_file.h $(srcdir)/sldns/sbuffer.h unbound-control.lo unbound-control.o: $(srcdir)/smallapp/unbound-control.c config.h \ - $(srcdir)/util/log.h \ - $(srcdir)/util/config_file.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h + $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h unbound-anchor.lo unbound-anchor.o: $(srcdir)/smallapp/unbound-anchor.c config.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/ldns/rrdef.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/parseutil.h \ petal.lo petal.o: $(srcdir)/testcode/petal.c config.h \ pythonmod_utils.lo pythonmod_utils.o: $(srcdir)/pythonmod/pythonmod_utils.c config.h $(srcdir)/util/module.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h $(srcdir)/services/cache/dns.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/util/regional.h \ - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/ldns/sbuffer.h + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/sldns/sbuffer.h win_svc.lo win_svc.o: $(srcdir)/winrc/win_svc.c config.h $(srcdir)/winrc/win_svc.h $(srcdir)/winrc/w_inst.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h \ $(srcdir)/daemon/worker.h $(srcdir)/libunbound/worker.h \ - $(srcdir)/ldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/ldns/pkthdr.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ + $(srcdir)/sldns/sbuffer.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/sldns/pkthdr.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ $(srcdir)/dnstap/dnstap.h $(srcdir)/daemon/remote.h \ $(srcdir)/util/config_file.h $(srcdir)/util/winsock_event.h w_inst.lo w_inst.o: $(srcdir)/winrc/w_inst.c config.h $(srcdir)/winrc/w_inst.h $(srcdir)/winrc/win_svc.h @@ -1191,20 +1199,21 @@ unbound-service-install.lo unbound-servi unbound-service-remove.lo unbound-service-remove.o: $(srcdir)/winrc/unbound-service-remove.c config.h \ $(srcdir)/winrc/w_inst.h anchor-update.lo anchor-update.o: $(srcdir)/winrc/anchor-update.c config.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/wire2str.h -keyraw.lo keyraw.o: $(srcdir)/ldns/keyraw.c config.h $(srcdir)/ldns/keyraw.h \ - $(srcdir)/ldns/rrdef.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/wire2str.h +keyraw.lo keyraw.o: $(srcdir)/sldns/keyraw.c config.h $(srcdir)/sldns/keyraw.h \ + $(srcdir)/sldns/rrdef.h \ -sbuffer.lo sbuffer.o: $(srcdir)/ldns/sbuffer.c config.h $(srcdir)/ldns/sbuffer.h -wire2str.lo wire2str.o: $(srcdir)/ldns/wire2str.c config.h $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/str2wire.h \ - $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/pkthdr.h $(srcdir)/ldns/parseutil.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/keyraw.h \ +sbuffer.lo sbuffer.o: $(srcdir)/sldns/sbuffer.c config.h $(srcdir)/sldns/sbuffer.h +wire2str.lo wire2str.o: $(srcdir)/sldns/wire2str.c config.h $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/str2wire.h \ + $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/pkthdr.h $(srcdir)/sldns/parseutil.h $(srcdir)/sldns/sbuffer.h \ + $(srcdir)/sldns/keyraw.h \ -parse.lo parse.o: $(srcdir)/ldns/parse.c config.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/parseutil.h \ - $(srcdir)/ldns/sbuffer.h -parseutil.lo parseutil.o: $(srcdir)/ldns/parseutil.c config.h $(srcdir)/ldns/parseutil.h -rrdef.lo rrdef.o: $(srcdir)/ldns/rrdef.c config.h $(srcdir)/ldns/rrdef.h $(srcdir)/ldns/parseutil.h -str2wire.lo str2wire.o: $(srcdir)/ldns/str2wire.c config.h $(srcdir)/ldns/str2wire.h $(srcdir)/ldns/rrdef.h \ - $(srcdir)/ldns/wire2str.h $(srcdir)/ldns/sbuffer.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/parseutil.h +parse.lo parse.o: $(srcdir)/sldns/parse.c config.h $(srcdir)/sldns/parse.h $(srcdir)/sldns/parseutil.h \ + $(srcdir)/sldns/sbuffer.h +parseutil.lo parseutil.o: $(srcdir)/sldns/parseutil.c config.h $(srcdir)/sldns/parseutil.h +rrdef.lo rrdef.o: $(srcdir)/sldns/rrdef.c config.h $(srcdir)/sldns/rrdef.h $(srcdir)/sldns/parseutil.h +str2wire.lo str2wire.o: $(srcdir)/sldns/str2wire.c config.h $(srcdir)/sldns/str2wire.h $(srcdir)/sldns/rrdef.h \ + $(srcdir)/sldns/wire2str.h $(srcdir)/sldns/sbuffer.h $(srcdir)/sldns/parse.h $(srcdir)/sldns/parseutil.h ctime_r.lo ctime_r.o: $(srcdir)/compat/ctime_r.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h fake-rfc2553.lo fake-rfc2553.o: $(srcdir)/compat/fake-rfc2553.c $(srcdir)/compat/fake-rfc2553.h config.h gmtime_r.lo gmtime_r.o: $(srcdir)/compat/gmtime_r.c config.h @@ -1228,3 +1237,4 @@ arc4random.lo arc4random.o: $(srcdir)/co arc4random_uniform.lo arc4random_uniform.o: $(srcdir)/compat/arc4random_uniform.c config.h arc4_lock.lo arc4_lock.o: $(srcdir)/compat/arc4_lock.c config.h $(srcdir)/util/locks.h sha512.lo sha512.o: $(srcdir)/compat/sha512.c config.h +reallocarray.lo reallocarray.o: $(srcdir)/compat/reallocarray.c config.h Modified: stable/10/contrib/unbound/acx_nlnetlabs.m4 ============================================================================== --- stable/10/contrib/unbound/acx_nlnetlabs.m4 Fri Dec 4 10:34:58 2015 (r291766) +++ stable/10/contrib/unbound/acx_nlnetlabs.m4 Fri Dec 4 13:26:12 2015 (r291767) @@ -2,7 +2,9 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 26 +# Version 28 +# 2015-08-28 ACX_CHECK_PIE and ACX_CHECK_RELRO_NOW added. +# 2015-03-17 AHX_CONFIG_REALLOCARRAY added # 2013-09-19 FLTO help text improved. # 2013-07-18 Enable ACX_CHECK_COMPILER_FLAG to test for -Wstrict-prototypes # 2013-06-25 FLTO has --disable-flto option. @@ -93,6 +95,8 @@ # ACX_CHECK_MEMCMP_SIGNED - check if memcmp uses signed characters. # AHX_MEMCMP_BROKEN - replace memcmp func for CHECK_MEMCMP_SIGNED. # ACX_CHECK_SS_FAMILY - check for sockaddr_storage.ss_family +# ACX_CHECK_PIE - add --enable-pie option and check if works +# ACX_CHECK_RELRO_NOW - add --enable-relro-now option and check it # dnl Escape backslashes as \\, for C:\ paths, for the C preprocessor defines. @@ -1213,6 +1217,16 @@ struct tm *gmtime_r(const time_t *timep, #endif ]) +dnl provide reallocarray compat prototype. +dnl $1: unique name for compat code +AC_DEFUN([AHX_CONFIG_REALLOCARRAY], +[ +#ifndef HAVE_REALLOCARRAY +#define reallocarray reallocarray$1 +void* reallocarray(void *ptr, size_t nmemb, size_t size); +#endif +]) + dnl provide w32 compat definition for sleep AC_DEFUN([AHX_CONFIG_W32_SLEEP], [ @@ -1375,4 +1389,46 @@ AC_DEFUN([ACX_CHECK_SS_FAMILY], #endif ]) ]) +dnl Check if CC and linker support -fPIE and -pie. +dnl If so, sets them in CFLAGS / LDFLAGS. +AC_DEFUN([ACX_CHECK_PIE], [ + AC_ARG_ENABLE([pie], AS_HELP_STRING([--enable-pie], [Enable Position-Independent Executable (eg. to fully benefit from ASLR, small performance penalty)])) + AS_IF([test "x$enable_pie" = "xyes"], [ + AC_MSG_CHECKING([if $CC supports PIE]) + BAKLDFLAGS="$LDFLAGS" + BAKCFLAGS="$CFLAGS" + LDFLAGS="$LDFLAGS -pie" + CFLAGS="$CFLAGS -fPIE" + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [ + if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then + LDFLAGS="$BAKLDFLAGS" + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + fi + rm -f conftest conftest.c conftest.o + ], [LDFLAGS="$BAKLDFLAGS" ; CFLAGS="$BAKCFLAGS" ; AC_MSG_RESULT(no)]) + ]) +]) + +dnl Check if linker supports -Wl,-z,relro,-z,now. +dnl If so, adds it to LDFLAGS. +AC_DEFUN([ACX_CHECK_RELRO_NOW], [ + AC_ARG_ENABLE([relro_now], AS_HELP_STRING([--enable-relro-now], [Enable full relocation binding at load-time (RELRO NOW, to protect GOT and .dtor areas)])) + AS_IF([test "x$enable_relro_now" = "xyes"], [ + AC_MSG_CHECKING([if $CC supports -Wl,-z,relro,-z,now]) + BAKLDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now" + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [ + if $CC $CFLAGS $LDFLAGS -o conftest conftest.c 2>&1 | grep "warning: no debug symbols in executable" >/dev/null; then + LDFLAGS="$BAKLDFLAGS" + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + fi + rm -f conftest conftest.c conftest.o + ], [LDFLAGS="$BAKLDFLAGS" ; AC_MSG_RESULT(no)]) + ]) +]) + dnl End of file Modified: stable/10/contrib/unbound/compat/getentropy_linux.c ============================================================================== --- stable/10/contrib/unbound/compat/getentropy_linux.c Fri Dec 4 10:34:58 2015 (r291766) +++ stable/10/contrib/unbound/compat/getentropy_linux.c Fri Dec 4 13:26:12 2015 (r291767) @@ -77,6 +77,9 @@ int getentropy(void *buf, size_t len); extern int main(int, char *argv[]); #endif static int gotdata(char *buf, size_t len); +#ifdef SYS_getrandom +static int getentropy_getrandom(void *buf, size_t len); +#endif static int getentropy_urandom(void *buf, size_t len); #ifdef SYS__sysctl static int getentropy_sysctl(void *buf, size_t len); @@ -94,11 +97,15 @@ getentropy(void *buf, size_t len) } #ifdef SYS_getrandom - /* try to use getrandom syscall introduced with kernel 3.17 */ - ret = syscall(SYS_getrandom, buf, len, 0); + /* + * Try descriptor-less getrandom() + */ + ret = getentropy_getrandom(buf, len); if (ret != -1) return (ret); -#endif /* SYS_getrandom */ + if (errno != ENOSYS) + return (-1); +#endif /* * Try to get entropy with /dev/urandom *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Dec 4 13:32:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96A34A41643; Fri, 4 Dec 2015 13:32:01 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6057E12F7; Fri, 4 Dec 2015 13:32:01 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4DW0Kg035555; Fri, 4 Dec 2015 13:32:00 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4DW00D035554; Fri, 4 Dec 2015 13:32:00 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201512041332.tB4DW00D035554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 4 Dec 2015 13:32:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291768 - head/sys/modules/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 13:32:01 -0000 Author: andrew Date: Fri Dec 4 13:32:00 2015 New Revision: 291768 URL: https://svnweb.freebsd.org/changeset/base/291768 Log: Add ahci_generic to the ahci module on arm64. Pointed out by: kib Modified: head/sys/modules/ahci/Makefile Modified: head/sys/modules/ahci/Makefile ============================================================================== --- head/sys/modules/ahci/Makefile Fri Dec 4 13:26:12 2015 (r291767) +++ head/sys/modules/ahci/Makefile Fri Dec 4 13:32:00 2015 (r291768) @@ -5,4 +5,8 @@ KMOD= ahci SRCS= ahci.c ahci_pci.c ahciem.c ahci.h device_if.h bus_if.h pci_if.h opt_cam.h +.if ${MACHINE_CPUARCH} == "aarch64" +SRCS+= ahci_generic.c +.endif + .include From owner-svn-src-all@freebsd.org Fri Dec 4 13:40:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0CC7CA417D2; Fri, 4 Dec 2015 13:40:11 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id CE00A18DB; Fri, 4 Dec 2015 13:40:10 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from bender (global-5-144.nat-2.net.cam.ac.uk [131.111.5.144]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id AB5C1D78E6; Fri, 4 Dec 2015 13:39:40 +0000 (UTC) Date: Fri, 4 Dec 2015 13:39:39 +0000 From: Andrew Turner To: Konstantin Belousov Cc: Andrew Turner , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291689 - in head/sys: conf dev/ahci Message-ID: <20151204133939.32a16e39@bender> In-Reply-To: <20151203113407.GJ2405@kib.kiev.ua> References: <201512031124.tB3BOBRu070023@repo.freebsd.org> <20151203113407.GJ2405@kib.kiev.ua> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; amd64-portbld-freebsd10.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 13:40:11 -0000 On Thu, 3 Dec 2015 13:34:07 +0200 Konstantin Belousov wrote: > On Thu, Dec 03, 2015 at 11:24:11AM +0000, Andrew Turner wrote: > > Author: andrew > > Date: Thu Dec 3 11:24:11 2015 > > New Revision: 291689 > > URL: https://svnweb.freebsd.org/changeset/base/291689 > > > > Log: > > Add support for a generic AHCI attachment. This allows us to > > attach to a typically memory mapped bus, for example on the AMD > > Opteron A1100 the AHCI device is mapped in the CPUs address space, > > and not through a PCI controller. > > > > Further work is needed for this to work with ACPI as this is > > expected to be common on ARMv8 servers. > > > > Reviewed by: mav, mmel > > Obtained from: mmel, ABT Systems Ltd > > Relnotes: yes > > Sponsored by: SoftIron Inc > > Differential Revision: https://reviews.freebsd.org/D4269 > > > > Added: > > head/sys/dev/ahci/ahci_generic.c > > - copied, changed from r291244, head/sys/dev/ahci/ahci_pci.c > > Modified: > > head/sys/conf/files.arm64 > > Should the new file added to the ahci.ko module Makefile, at least on > arm64 ? Added in r291768. Andrew From owner-svn-src-all@freebsd.org Fri Dec 4 15:53:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F2C1A41816; Fri, 4 Dec 2015 15:53:49 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qk0-x234.google.com (mail-qk0-x234.google.com [IPv6:2607:f8b0:400d:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D9C041F8B; Fri, 4 Dec 2015 15:53:48 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by qkda6 with SMTP id a6so45328014qkd.3; Fri, 04 Dec 2015 07:53:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=xYRpjZM43CkQxcqdNpTYh5stX5Vkq5KBvovrQPnQCzg=; b=D/QmGvnlrw88Zj7Zc6KpCW8bMj8Z0wrZ11khML9Rvyin53B+kxwwOIbAmACQ9SbnyL JSbeMXzrpxc5BsI/YJoHYxFeGhZC/POmzVF8CiObs4AipjrU4evojTCcvyz+4XnOT2v9 sTvkOCC/lvAK3ryrj3jSBjSLk4I9fkdnGh1WjcJQg7oAsWqNRhMSNuz+r9pk/LOQLwdn LzeqIPSrhcCFJ2KVlSwWE6QvNKKdEwZn2NQAVNtoIFFuONBTgCoVqNNrLoCS1ec4h7+V RUgHu4X5CElDtksyPYoPeU8gaTUJz0KVg5GycPLm7MXA5n1mI5ZWfsN0CZQnnoVWjUlV LtZQ== X-Received: by 10.55.50.73 with SMTP id y70mr18920800qky.86.1449244427950; Fri, 04 Dec 2015 07:53:47 -0800 (PST) Received: from mbp.home (179-125-141-122.desktop.com.br. [179.125.141.122]) by smtp.gmail.com with ESMTPSA id z64sm5670283qhd.41.2015.12.04.07.53.45 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Dec 2015 07:53:47 -0800 (PST) Sender: Renato Botelho Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: svn commit: r291431 - head/sys/dev/drm2/i915 From: Renato Botelho In-Reply-To: <201511281738.tASHcRFG041033@repo.freebsd.org> Date: Fri, 4 Dec 2015 13:53:43 -0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <4129928E-743E-4955-B862-1DA4A5DC4E2B@FreeBSD.org> References: <201511281738.tASHcRFG041033@repo.freebsd.org> To: =?utf-8?Q?Jean-S=C3=A9bastien_P=C3=A9dron?= X-Mailer: Apple Mail (2.3096.5) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 15:53:49 -0000 > On Nov 28, 2015, at 15:38, Jean-S=C3=A9bastien P=C3=A9dron = wrote: >=20 > Author: dumbbell > Date: Sat Nov 28 17:38:27 2015 > New Revision: 291431 > URL: https://svnweb.freebsd.org/changeset/base/291431 >=20 > Log: > drm/i915: Reduce diff with Linux 3.8 >=20 > There is no functional change. The goal is to ease the future update = to > Linux 3.8's i915 driver. >=20 > MFC after: 2 months >=20 > Modified: > head/sys/dev/drm2/i915/i915_drm.h After all recent changes I started to get following error when try to = kldload i915kms.ko: KLD i915kms.ko: depends on drmn - not available or version mismatch linker_load_file: Unsupported file type The latest kernel that worked fine here was r291095 from Nov 20, after = that I tried to update it at Dec 1st and the error started Some hardware details: agp0: on vgapci0 agp0: aperture size is 256M, detected 65532k stolen memory vgapci0: Boot video device vgapci0@pci0:0:2:0: class=3D0x030000 card=3D0x21f317aa = chip=3D0x01668086 rev=3D0x09 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D '3rd Gen Core processor Graphics Controller' class =3D display subclass =3D VGA -- Renato Botelho From owner-svn-src-all@freebsd.org Fri Dec 4 16:32:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53F9CA4116F; Fri, 4 Dec 2015 16:32:11 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (mithlond.kdm.org [96.89.93.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "A1-33714", Issuer "A1-33714" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 286571906; Fri, 4 Dec 2015 16:32:10 +0000 (UTC) (envelope-from ken@kdm.org) Received: from mithlond.kdm.org (localhost [127.0.0.1]) by mithlond.kdm.org (8.15.2/8.14.9) with ESMTPS id tB4GW8lo093535 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 4 Dec 2015 11:32:08 -0500 (EST) (envelope-from ken@mithlond.kdm.org) Received: (from ken@localhost) by mithlond.kdm.org (8.15.2/8.14.9/Submit) id tB4GW8so093534; Fri, 4 Dec 2015 11:32:08 -0500 (EST) (envelope-from ken) Date: Fri, 4 Dec 2015 11:32:08 -0500 From: "Kenneth D. Merry" To: Ravi Pokala Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291716 - in head: share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/dev/md sys/geom sys/kern sys/pc98/include sys/sys usr.sbin usr.sbin/camdd Message-ID: <20151204163208.GA93141@mithlond.kdm.org> References: <201512032054.tB3KsuUw037541@repo.freebsd.org> <75635FDB-E85F-4F0A-8EDC-8A29F8A095BE@panasas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <75635FDB-E85F-4F0A-8EDC-8A29F8A095BE@panasas.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mithlond.kdm.org [127.0.0.1]); Fri, 04 Dec 2015 11:32:08 -0500 (EST) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mithlond.kdm.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 16:32:11 -0000 On Thu, Dec 03, 2015 at 23:55:14 -0800, Ravi Pokala wrote: > Hi Ken, > > A few questions: > > > Although these ioctls do not have a declared argument, they > > both take a union ccb pointer. If we declare a size here, > > the ioctl code in sys/kern/sys_generic.c will malloc and free > > a buffer for either the CCB or the CCB pointer (depending on > > how it is declared). Since we have to keep a copy of the > > CCB (which is fairly large) anyway, having the ioctl malloc > > and free a CCB for each call is wasteful. > > > (a) How does that work? That is, how does the argument get to the ioctl handler in the kernel? > In sys_ioctl(), in sys/kern/sys_generic.c, the pointer argument ("data") to the ioctl syscall is passed through into kern_ioctl() and then on down until it gets into the passioctl() call. It is passed through even when the declared size of the ioctl is 0, as it is for the two new ioctls: /* * These two ioctls take a union ccb *, but that is not explicitly declared * to avoid having the ioctl handling code malloc and free their own copy * of the CCB or the CCB pointer. */ #define CAMIOQUEUE _IO(CAM_VERSION, 4) #define CAMIOGET _IO(CAM_VERSION, 5) Here's the code in question: if (size > 0) { if (com & IOC_VOID) { /* Integer argument. */ arg = (intptr_t)uap->data; data = (void *)&arg; size = 0; } else { if (size > SYS_IOCTL_SMALL_SIZE) data = malloc((u_long)size, M_IOCTLOPS, M_WAITOK ); else data = smalldata; } } else data = (void *)&uap->data; So in the size == 0 case, data is just passed through as is. Prior to r274017, if the ioctl were declared as _IOWR, there would be a malloc and copyin of however much data is declared in the ioctl, no matter what the size. So, in this case, sizeof(union ccb *) or sizeof(union ccb). The problem is, upon exit from the ioctl, that data is freed. With a queueing interface, we need to keep a copy of the CCB around after the ioctl exits. You have the same problem even after r274017, because that just provides a small buffer on the stack. (And would only help in the pointer case. And we don't need to copyin the pointer.) So, to avoid that, we don't declare an argument, but we do pass in a pointer and do the copy the user's CCB into a CCB that is allocated inside the pass(4) driver. > (b) The CCB is large, but the CCB pointer is just a pointer; shouldn't that be passed in as the arg? > It is. Here's what camdd(8) does: >From camdd_pass_run(): union ccb *ccb; ... /* * Queue the CCB to the pass(4) driver. */ if (ioctl(pass_dev->dev->fd, CAMIOQUEUE, ccb) == -1) { And from camdd_pass_fetch(): union ccb ccb; ... while ((retval = ioctl(pass_dev->dev->fd, CAMIOGET, &ccb)) != -1) { Ken -- Kenneth Merry ken@FreeBSD.ORG From owner-svn-src-all@freebsd.org Fri Dec 4 16:32:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EDACA411AE; Fri, 4 Dec 2015 16:32:31 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE0B21A86; Fri, 4 Dec 2015 16:32:30 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4GWT9J089012; Fri, 4 Dec 2015 16:32:29 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4GWTJW089011; Fri, 4 Dec 2015 16:32:29 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201512041632.tB4GWTJW089011@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 4 Dec 2015 16:32:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291770 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 16:32:31 -0000 Author: jilles Date: Fri Dec 4 16:32:29 2015 New Revision: 291770 URL: https://svnweb.freebsd.org/changeset/base/291770 Log: rc.subr: Check for running daemons before a custom start_cmd is executed. Currently rc scripts implementing their own start_cmd do not enjoy the benefits of rc.subr's own check for rc_pid. This leads to around a third of ports with such a start_cmd not to check for the process at all and two thirds of ports to re-implement this check (sometimes wrongly). This patch moves the check for rc_pid to before ${rc_arg}_cmd is executed. Submitted by: Dirk Engling Reviewed by: feld MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D4156 Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Fri Dec 4 14:43:53 2015 (r291769) +++ head/etc/rc.subr Fri Dec 4 16:32:29 2015 (r291770) @@ -976,6 +976,14 @@ run_rc_command() fi fi + if [ $rc_arg = "start" -a -z "$rc_fast" -a -n "$rc_pid" ]; then + if [ -z "$rc_quiet" ]; then + echo 1>&2 "${name} already running? " \ + "(pid=$rc_pid)." + fi + return 1 + fi + # if there's a custom ${XXX_cmd}, # run that instead of the default # @@ -1004,14 +1012,6 @@ run_rc_command() ;; start) - if [ -z "$rc_fast" -a -n "$rc_pid" ]; then - if [ -z "$rc_quiet" ]; then - echo 1>&2 "${name} already running? " \ - "(pid=$rc_pid)." - fi - return 1 - fi - if [ ! -x "${_chroot}${_chroot:+/}${command}" ]; then warn "run_rc_command: cannot run $command" return 1 From owner-svn-src-all@freebsd.org Fri Dec 4 17:23:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31259A419EB; Fri, 4 Dec 2015 17:23:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F053E1770; Fri, 4 Dec 2015 17:23:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4HNKHF003598; Fri, 4 Dec 2015 17:23:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4HNKpr003597; Fri, 4 Dec 2015 17:23:20 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201512041723.tB4HNKpr003597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 4 Dec 2015 17:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291771 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:23:21 -0000 Author: dim Date: Fri Dec 4 17:23:19 2015 New Revision: 291771 URL: https://svnweb.freebsd.org/changeset/base/291771 Log: Add clang patch corresponding to r291701. Added: head/contrib/llvm/patches/patch-10-clang-cc1as-dwarf2.diff Added: head/contrib/llvm/patches/patch-10-clang-cc1as-dwarf2.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-10-clang-cc1as-dwarf2.diff Fri Dec 4 17:23:19 2015 (r291771) @@ -0,0 +1,21 @@ +In assembler mode, clang defaulted to DWARF3, if only -g was specified. +Change this to DWARF2, in the simplest way possible. (Upstream, this +was fixed in clang trunk r250173, but this was done along with a lot of +shuffling around of debug option handling, so it cannot be applied +as-is.) + +Introduced here: https://svnweb.freebsd.org/changeset/base/291701 + +Index: tools/clang/tools/driver/cc1as_main.cpp +=================================================================== +--- tools/clang/tools/driver/cc1as_main.cpp ++++ tools/clang/tools/driver/cc1as_main.cpp +@@ -141,7 +141,7 @@ struct AssemblerInvocation { + RelaxAll = 0; + NoExecStack = 0; + FatalWarnings = 0; +- DwarfVersion = 3; ++ DwarfVersion = 2; + } + + static bool CreateFromArgs(AssemblerInvocation &Res, From owner-svn-src-all@freebsd.org Fri Dec 4 17:33:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82BD2A41C19; Fri, 4 Dec 2015 17:33:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 518731CE3; Fri, 4 Dec 2015 17:33:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4HXXF9006573; Fri, 4 Dec 2015 17:33:33 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4HXXPb006572; Fri, 4 Dec 2015 17:33:33 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041733.tB4HXXPb006572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 17:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291772 - stable/10/sys/netpfil/ipfw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:33:34 -0000 Author: bdrewery Date: Fri Dec 4 17:33:33 2015 New Revision: 291772 URL: https://svnweb.freebsd.org/changeset/base/291772 Log: MFC r291001: ipfw: Fix dynamic IPv6 rules showing junk for non-specified address masks. Relnotes: yes Modified: stable/10/sys/netpfil/ipfw/ip_fw_dynamic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- stable/10/sys/netpfil/ipfw/ip_fw_dynamic.c Fri Dec 4 17:23:19 2015 (r291771) +++ stable/10/sys/netpfil/ipfw/ip_fw_dynamic.c Fri Dec 4 17:33:33 2015 (r291772) @@ -715,6 +715,9 @@ ipfw_install_state(struct ip_fw *rule, i id.fib = M_GETFIB(args->m); if (IS_IP6_FLOW_ID (&(args->f_id))) { + bzero(&id.src_ip6, sizeof(id.src_ip6)); + bzero(&id.dst_ip6, sizeof(id.dst_ip6)); + if (limit_mask & DYN_SRC_ADDR) id.src_ip6 = args->f_id.src_ip6; if (limit_mask & DYN_DST_ADDR) From owner-svn-src-all@freebsd.org Fri Dec 4 17:34:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E114A41C6C; Fri, 4 Dec 2015 17:34:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 676C51E49; Fri, 4 Dec 2015 17:34:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4HYg31006652; Fri, 4 Dec 2015 17:34:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4HYghX006651; Fri, 4 Dec 2015 17:34:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041734.tB4HYghX006651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 17:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291773 - stable/9/sys/netpfil/ipfw X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:34:43 -0000 Author: bdrewery Date: Fri Dec 4 17:34:42 2015 New Revision: 291773 URL: https://svnweb.freebsd.org/changeset/base/291773 Log: MFC r291001: ipfw: Fix dynamic IPv6 rules showing junk for non-specified address masks. Relnotes: yes Modified: stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/netpfil/ (props changed) Modified: stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c Fri Dec 4 17:33:33 2015 (r291772) +++ stable/9/sys/netpfil/ipfw/ip_fw_dynamic.c Fri Dec 4 17:34:42 2015 (r291773) @@ -715,6 +715,9 @@ ipfw_install_state(struct ip_fw *rule, i id.fib = M_GETFIB(args->m); if (IS_IP6_FLOW_ID (&(args->f_id))) { + bzero(&id.src_ip6, sizeof(id.src_ip6)); + bzero(&id.dst_ip6, sizeof(id.dst_ip6)); + if (limit_mask & DYN_SRC_ADDR) id.src_ip6 = args->f_id.src_ip6; if (limit_mask & DYN_DST_ADDR) From owner-svn-src-all@freebsd.org Fri Dec 4 17:36:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A860A41CCF; Fri, 4 Dec 2015 17:36:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5DFB1FF9; Fri, 4 Dec 2015 17:36:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4HaZSB006781; Fri, 4 Dec 2015 17:36:35 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4HaZm2006777; Fri, 4 Dec 2015 17:36:35 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041736.tB4HaZm2006777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 17:36:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291774 - stable/10/bin/cp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:36:37 -0000 Author: bdrewery Date: Fri Dec 4 17:36:35 2015 New Revision: 291774 URL: https://svnweb.freebsd.org/changeset/base/291774 Log: MFC r284105,r284106,r284163: r284105: Cleanup some indentation issues. r284106: Implement '-s' to copy as symlink, similar to the current -l link(2) handling. r284163: Cleanup some style(9) issues. Relnotes: yes Modified: stable/10/bin/cp/cp.1 stable/10/bin/cp/cp.c stable/10/bin/cp/extern.h stable/10/bin/cp/utils.c Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/cp/cp.1 ============================================================================== --- stable/10/bin/cp/cp.1 Fri Dec 4 17:34:42 2015 (r291773) +++ stable/10/bin/cp/cp.1 Fri Dec 4 17:36:35 2015 (r291774) @@ -32,7 +32,7 @@ .\" @(#)cp.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 15, 2013 +.Dd June 6, 2015 .Dt CP 1 .Os .Sh NAME @@ -45,7 +45,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpvx +.Op Fl alpsvx .Ar source_file target_file .Nm .Oo @@ -53,7 +53,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpvx +.Op Fl alpsvx .Ar source_file ... target_directory .Sh DESCRIPTION In the first synopsis form, the @@ -179,6 +179,8 @@ If the source file has both its set-user and either the user ID or group ID cannot be preserved, neither the set-user-ID nor set-group-ID bits are preserved in the copy's permissions. +.It Fl s +Create symbolic links to regular files in a hierarchy instead of copying. .It Fl v Cause .Nm @@ -298,7 +300,10 @@ differ as they copy special files as nor files while recreating a hierarchy. .Pp The -.Fl v +.Fl l, +.Fl s, +.Fl v, +.Fl x and .Fl n options are non-standard and their use in scripts is not recommended. Modified: stable/10/bin/cp/cp.c ============================================================================== --- stable/10/bin/cp/cp.c Fri Dec 4 17:34:42 2015 (r291773) +++ stable/10/bin/cp/cp.c Fri Dec 4 17:36:35 2015 (r291774) @@ -75,15 +75,15 @@ __FBSDID("$FreeBSD$"); #include "extern.h" #define STRIP_TRAILING_SLASH(p) { \ - while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \ - *--(p).p_end = 0; \ + while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \ + *--(p).p_end = 0; \ } static char emptystring[] = ""; PATH_T to = { to.p_path, emptystring, "" }; -int fflag, iflag, lflag, nflag, pflag, vflag; +int fflag, iflag, lflag, nflag, pflag, sflag, vflag; static int Rflag, rflag; volatile sig_atomic_t info; @@ -102,7 +102,7 @@ main(int argc, char *argv[]) fts_options = FTS_NOCHDIR | FTS_PHYSICAL; Hflag = Lflag = 0; - while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1) + while ((ch = getopt(argc, argv, "HLPRafilnprsvx")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -145,6 +145,9 @@ main(int argc, char *argv[]) rflag = Lflag = 1; Hflag = 0; break; + case 's': + sflag = 1; + break; case 'v': vflag = 1; break; @@ -163,6 +166,8 @@ main(int argc, char *argv[]) if (Rflag && rflag) errx(1, "the -R and -r options may not be specified together"); + if (lflag && sflag) + errx(1, "the -l and -s options may not be specified together"); if (rflag) Rflag = 1; if (Rflag) { @@ -183,7 +188,7 @@ main(int argc, char *argv[]) if (strlcpy(to.p_path, target, sizeof(to.p_path)) >= sizeof(to.p_path)) errx(1, "%s: name too long", target); to.p_end = to.p_path + strlen(to.p_path); - if (to.p_path == to.p_end) { + if (to.p_path == to.p_end) { *to.p_end++ = '.'; *to.p_end = 0; } @@ -240,10 +245,10 @@ main(int argc, char *argv[]) type = FILE_TO_FILE; if (have_trailing_slash && type == FILE_TO_FILE) { - if (r == -1) + if (r == -1) { errx(1, "directory %s does not exist", - to.p_path); - else + to.p_path); + } else errx(1, "%s is not a directory", to.p_path); } } else @@ -294,8 +299,8 @@ copy(char *argv[], enum op type, int fts /* * If we are in case (2) or (3) above, we need to append the - * source name to the target name. - */ + * source name to the target name. + */ if (type != FILE_TO_FILE) { /* * Need to remember the roots of traversals to create @@ -374,7 +379,8 @@ copy(char *argv[], enum op type, int fts mode = curr->fts_statp->st_mode; if ((mode & (S_ISUID | S_ISGID | S_ISTXT)) || ((mode | S_IRWXU) & mask) != (mode & mask)) - if (chmod(to.p_path, mode & mask) != 0){ + if (chmod(to.p_path, mode & mask) != + 0) { warn("chmod: %s", to.p_path); rval = 1; } @@ -382,7 +388,7 @@ copy(char *argv[], enum op type, int fts continue; } - /* Not an error but need to remember it happened */ + /* Not an error but need to remember it happened. */ if (stat(to.p_path, &to_stat) == -1) dne = 1; else { @@ -408,7 +414,7 @@ copy(char *argv[], enum op type, int fts switch (curr->fts_statp->st_mode & S_IFMT) { case S_IFLNK: - /* Catch special case of a non-dangling symlink */ + /* Catch special case of a non-dangling symlink. */ if ((fts_options & FTS_LOGICAL) || ((fts_options & FTS_COMFOLLOW) && curr->fts_level == 0)) { @@ -433,7 +439,7 @@ copy(char *argv[], enum op type, int fts * modified by the umask. Trade-off between being * able to write the directory (if from directory is * 555) and not causing a permissions race. If the - * umask blocks owner writes, we fail.. + * umask blocks owner writes, we fail. */ if (dne) { if (mkdir(to.p_path, @@ -452,7 +458,7 @@ copy(char *argv[], enum op type, int fts break; case S_IFBLK: case S_IFCHR: - if (Rflag) { + if (Rflag && !sflag) { if (copy_special(curr->fts_statp, !dne)) badcp = rval = 1; } else { @@ -462,10 +468,10 @@ copy(char *argv[], enum op type, int fts break; case S_IFSOCK: warnx("%s is a socket (not copied).", - curr->fts_path); + curr->fts_path); break; case S_IFIFO: - if (Rflag) { + if (Rflag && !sflag) { if (copy_fifo(curr->fts_statp, !dne)) badcp = rval = 1; } else { Modified: stable/10/bin/cp/extern.h ============================================================================== --- stable/10/bin/cp/extern.h Fri Dec 4 17:34:42 2015 (r291773) +++ stable/10/bin/cp/extern.h Fri Dec 4 17:36:35 2015 (r291774) @@ -37,7 +37,7 @@ typedef struct { } PATH_T; extern PATH_T to; -extern int fflag, iflag, lflag, nflag, pflag, vflag; +extern int fflag, iflag, lflag, nflag, pflag, sflag, vflag; extern volatile sig_atomic_t info; __BEGIN_DECLS Modified: stable/10/bin/cp/utils.c ============================================================================== --- stable/10/bin/cp/utils.c Fri Dec 4 17:34:42 2015 (r291773) +++ stable/10/bin/cp/utils.c Fri Dec 4 17:36:35 2015 (r291774) @@ -57,15 +57,19 @@ __FBSDID("$FreeBSD$"); #define cp_pct(x, y) ((y == 0) ? 0 : (int)(100.0 * (x) / (y))) -/* Memory strategy threshold, in pages: if physmem is larger then this, use a - * large buffer */ +/* + * Memory strategy threshold, in pages: if physmem is larger then this, use a + * large buffer. + */ #define PHYSPAGES_THRESHOLD (32*1024) -/* Maximum buffer size in bytes - do not allow it to grow larger than this */ +/* Maximum buffer size in bytes - do not allow it to grow larger than this. */ #define BUFSIZE_MAX (2*1024*1024) -/* Small (default) buffer size in bytes. It's inefficient for this to be - * smaller than MAXPHYS */ +/* + * Small (default) buffer size in bytes. It's inefficient for this to be + * smaller than MAXPHYS. + */ #define BUFSIZE_SMALL (MAXPHYS) int @@ -77,13 +81,15 @@ copy_file(const FTSENT *entp, int dne) ssize_t wcount; size_t wresid; off_t wtotal; - int ch, checkch, from_fd = 0, rcount, rval, to_fd = 0; + int ch, checkch, from_fd, rcount, rval, to_fd; char *bufp; #ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED char *p; #endif - if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) { + from_fd = to_fd = -1; + if (!lflag && !sflag && + (from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) { warn("%s", entp->fts_path); return (1); } @@ -103,63 +109,65 @@ copy_file(const FTSENT *entp, int dne) if (nflag) { if (vflag) printf("%s not overwritten\n", to.p_path); - (void)close(from_fd); - return (1); + rval = 1; + goto done; } else if (iflag) { (void)fprintf(stderr, "overwrite %s? %s", - to.p_path, YESNO); + to.p_path, YESNO); checkch = ch = getchar(); while (ch != '\n' && ch != EOF) ch = getchar(); if (checkch != 'y' && checkch != 'Y') { - (void)close(from_fd); (void)fprintf(stderr, "not overwritten\n"); - return (1); + rval = 1; + goto done; } } - + if (fflag) { - /* remove existing destination file name, - * create a new file */ - (void)unlink(to.p_path); - if (!lflag) - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, - fs->st_mode & ~(S_ISUID | S_ISGID)); - } else { - if (!lflag) - /* overwrite existing destination file name */ - to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); + /* + * Remove existing destination file name create a new + * file. + */ + (void)unlink(to.p_path); + if (!lflag && !sflag) { + to_fd = open(to.p_path, + O_WRONLY | O_TRUNC | O_CREAT, + fs->st_mode & ~(S_ISUID | S_ISGID)); + } + } else if (!lflag && !sflag) { + /* Overwrite existing destination file name. */ + to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); } - } else { - if (!lflag) - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, - fs->st_mode & ~(S_ISUID | S_ISGID)); + } else if (!lflag && !sflag) { + to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, + fs->st_mode & ~(S_ISUID | S_ISGID)); } - - if (to_fd == -1) { + + if (!lflag && !sflag && to_fd == -1) { warn("%s", to.p_path); - (void)close(from_fd); - return (1); + rval = 1; + goto done; } rval = 0; - if (!lflag) { + if (!lflag && !sflag) { /* - * Mmap and write if less than 8M (the limit is so we don't totally - * trash memory on big files. This is really a minor hack, but it - * wins some CPU back. + * Mmap and write if less than 8M (the limit is so we don't + * totally trash memory on big files. This is really a minor + * hack, but it wins some CPU back. * Some filesystems, such as smbnetfs, don't support mmap, * so this is a best-effort attempt. */ #ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED if (S_ISREG(fs->st_mode) && fs->st_size > 0 && - fs->st_size <= 8 * 1024 * 1024 && + fs->st_size <= 8 * 1024 * 1024 && (p = mmap(NULL, (size_t)fs->st_size, PROT_READ, MAP_SHARED, from_fd, (off_t)0)) != MAP_FAILED) { wtotal = 0; for (bufp = p, wresid = fs->st_size; ; - bufp += wcount, wresid -= (size_t)wcount) { + bufp += wcount, wresid -= (size_t)wcount) { wcount = write(to_fd, bufp, wresid); if (wcount <= 0) break; @@ -204,7 +212,7 @@ copy_file(const FTSENT *entp, int dne) wtotal = 0; while ((rcount = read(from_fd, buf, bufsize)) > 0) { for (bufp = buf, wresid = rcount; ; - bufp += wcount, wresid -= wcount) { + bufp += wcount, wresid -= wcount) { wcount = write(to_fd, bufp, wresid); if (wcount <= 0) break; @@ -230,13 +238,18 @@ copy_file(const FTSENT *entp, int dne) rval = 1; } } - } else { + } else if (lflag) { if (link(entp->fts_path, to.p_path)) { warn("%s", to.p_path); rval = 1; } + } else if (sflag) { + if (symlink(entp->fts_path, to.p_path)) { + warn("%s", to.p_path); + rval = 1; + } } - + /* * Don't remove the target even after an error. The target might * not be a regular file, or its attributes might be important, @@ -244,7 +257,7 @@ copy_file(const FTSENT *entp, int dne) * to remove it if we created it and its length is 0. */ - if (!lflag) { + if (!lflag && !sflag) { if (pflag && setfile(fs, to_fd)) rval = 1; if (pflag && preserve_fd_acls(from_fd, to_fd) != 0) @@ -255,8 +268,9 @@ copy_file(const FTSENT *entp, int dne) } } - (void)close(from_fd); - +done: + if (from_fd != -1) + (void)close(from_fd); return (rval); } @@ -338,7 +352,7 @@ setfile(struct stat *fs, int fd) fdval = fd != -1; islink = !fdval && S_ISLNK(fs->st_mode); fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX | - S_IRWXU | S_IRWXG | S_IRWXO; + S_IRWXU | S_IRWXG | S_IRWXO; TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim); TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim); @@ -352,7 +366,7 @@ setfile(struct stat *fs, int fd) else { gotstat = 1; ts.st_mode &= S_ISUID | S_ISGID | S_ISVTX | - S_IRWXU | S_IRWXG | S_IRWXO; + S_IRWXU | S_IRWXG | S_IRWXO; } /* * Changing the ownership probably won't succeed, unless we're root @@ -476,7 +490,7 @@ preserve_dir_acls(struct stat *fs, char return (0); /* - * If the file is a link we will not follow it + * If the file is a link we will not follow it. */ if (S_ISLNK(fs->st_mode)) { aclgetf = acl_get_link_np; @@ -535,8 +549,10 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", -"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file", -" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... " -"target_directory"); + "usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] " + "source_file target_file", + " cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] " + "source_file ... " + "target_directory"); exit(EX_USAGE); } From owner-svn-src-all@freebsd.org Fri Dec 4 17:48:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0764A41EE7; Fri, 4 Dec 2015 17:48:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCDC617A3; Fri, 4 Dec 2015 17:48:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4HmB9F009756; Fri, 4 Dec 2015 17:48:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4HmB8B009755; Fri, 4 Dec 2015 17:48:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041748.tB4HmB8B009755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 17:48:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291775 - stable/9/bin/cp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:48:13 -0000 Author: bdrewery Date: Fri Dec 4 17:48:11 2015 New Revision: 291775 URL: https://svnweb.freebsd.org/changeset/base/291775 Log: MFC r245832: Return "failure" as we do for 'cp -i' and a "n" answer. Relnotes: yes Modified: stable/9/bin/cp/utils.c Directory Properties: stable/9/bin/cp/ (props changed) Modified: stable/9/bin/cp/utils.c ============================================================================== --- stable/9/bin/cp/utils.c Fri Dec 4 17:36:35 2015 (r291774) +++ stable/9/bin/cp/utils.c Fri Dec 4 17:48:11 2015 (r291775) @@ -104,7 +104,7 @@ copy_file(const FTSENT *entp, int dne) if (vflag) printf("%s not overwritten\n", to.p_path); (void)close(from_fd); - return (0); + return (1); } else if (iflag) { (void)fprintf(stderr, "overwrite %s? %s", to.p_path, YESNO); From owner-svn-src-all@freebsd.org Fri Dec 4 17:49:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC081A41F4E; Fri, 4 Dec 2015 17:49:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79AD2193F; Fri, 4 Dec 2015 17:49:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4Hn5RO009838; Fri, 4 Dec 2015 17:49:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4Hn5I2009834; Fri, 4 Dec 2015 17:49:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041749.tB4Hn5I2009834@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 17:49:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291776 - stable/9/bin/cp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:49:06 -0000 Author: bdrewery Date: Fri Dec 4 17:49:05 2015 New Revision: 291776 URL: https://svnweb.freebsd.org/changeset/base/291776 Log: MFC r284105,r284106,r284163: r284105: Cleanup some indentation issues. r284106: Implement '-s' to copy as symlink, similar to the current -l link(2) handling. r284163: Cleanup some style(9) issues. Relnotes: yes Modified: stable/9/bin/cp/cp.1 stable/9/bin/cp/cp.c stable/9/bin/cp/extern.h stable/9/bin/cp/utils.c Directory Properties: stable/9/bin/cp/ (props changed) Modified: stable/9/bin/cp/cp.1 ============================================================================== --- stable/9/bin/cp/cp.1 Fri Dec 4 17:48:11 2015 (r291775) +++ stable/9/bin/cp/cp.1 Fri Dec 4 17:49:05 2015 (r291776) @@ -32,7 +32,7 @@ .\" @(#)cp.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd September 4, 2012 +.Dd June 6, 2015 .Dt CP 1 .Os .Sh NAME @@ -45,7 +45,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpvx +.Op Fl alpsvx .Ar source_file target_file .Nm .Oo @@ -53,7 +53,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpvx +.Op Fl alpsvx .Ar source_file ... target_directory .Sh DESCRIPTION In the first synopsis form, the @@ -179,6 +179,8 @@ If the source file has both its set-user and either the user ID or group ID cannot be preserved, neither the set-user-ID nor set-group-ID bits are preserved in the copy's permissions. +.It Fl s +Create symbolic links to regular files in a hierarchy instead of copying. .It Fl v Cause .Nm @@ -277,7 +279,10 @@ differ as they copy special files as nor files while recreating a hierarchy. .Pp The -.Fl v +.Fl l, +.Fl s, +.Fl v, +.Fl x and .Fl n options are non-standard and their use in scripts is not recommended. Modified: stable/9/bin/cp/cp.c ============================================================================== --- stable/9/bin/cp/cp.c Fri Dec 4 17:48:11 2015 (r291775) +++ stable/9/bin/cp/cp.c Fri Dec 4 17:49:05 2015 (r291776) @@ -75,15 +75,15 @@ __FBSDID("$FreeBSD$"); #include "extern.h" #define STRIP_TRAILING_SLASH(p) { \ - while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \ - *--(p).p_end = 0; \ + while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \ + *--(p).p_end = 0; \ } static char emptystring[] = ""; PATH_T to = { to.p_path, emptystring, "" }; -int fflag, iflag, lflag, nflag, pflag, vflag; +int fflag, iflag, lflag, nflag, pflag, sflag, vflag; static int Rflag, rflag; volatile sig_atomic_t info; @@ -102,7 +102,7 @@ main(int argc, char *argv[]) fts_options = FTS_NOCHDIR | FTS_PHYSICAL; Hflag = Lflag = 0; - while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1) + while ((ch = getopt(argc, argv, "HLPRafilnprsvx")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -145,6 +145,9 @@ main(int argc, char *argv[]) rflag = Lflag = 1; Hflag = 0; break; + case 's': + sflag = 1; + break; case 'v': vflag = 1; break; @@ -163,6 +166,8 @@ main(int argc, char *argv[]) if (Rflag && rflag) errx(1, "the -R and -r options may not be specified together"); + if (lflag && sflag) + errx(1, "the -l and -s options may not be specified together"); if (rflag) Rflag = 1; if (Rflag) { @@ -183,7 +188,7 @@ main(int argc, char *argv[]) if (strlcpy(to.p_path, target, sizeof(to.p_path)) >= sizeof(to.p_path)) errx(1, "%s: name too long", target); to.p_end = to.p_path + strlen(to.p_path); - if (to.p_path == to.p_end) { + if (to.p_path == to.p_end) { *to.p_end++ = '.'; *to.p_end = 0; } @@ -240,10 +245,10 @@ main(int argc, char *argv[]) type = FILE_TO_FILE; if (have_trailing_slash && type == FILE_TO_FILE) { - if (r == -1) + if (r == -1) { errx(1, "directory %s does not exist", - to.p_path); - else + to.p_path); + } else errx(1, "%s is not a directory", to.p_path); } } else @@ -294,8 +299,8 @@ copy(char *argv[], enum op type, int fts /* * If we are in case (2) or (3) above, we need to append the - * source name to the target name. - */ + * source name to the target name. + */ if (type != FILE_TO_FILE) { /* * Need to remember the roots of traversals to create @@ -374,7 +379,8 @@ copy(char *argv[], enum op type, int fts mode = curr->fts_statp->st_mode; if ((mode & (S_ISUID | S_ISGID | S_ISTXT)) || ((mode | S_IRWXU) & mask) != (mode & mask)) - if (chmod(to.p_path, mode & mask) != 0){ + if (chmod(to.p_path, mode & mask) != + 0) { warn("chmod: %s", to.p_path); rval = 1; } @@ -382,7 +388,7 @@ copy(char *argv[], enum op type, int fts continue; } - /* Not an error but need to remember it happened */ + /* Not an error but need to remember it happened. */ if (stat(to.p_path, &to_stat) == -1) dne = 1; else { @@ -408,7 +414,7 @@ copy(char *argv[], enum op type, int fts switch (curr->fts_statp->st_mode & S_IFMT) { case S_IFLNK: - /* Catch special case of a non-dangling symlink */ + /* Catch special case of a non-dangling symlink. */ if ((fts_options & FTS_LOGICAL) || ((fts_options & FTS_COMFOLLOW) && curr->fts_level == 0)) { @@ -433,7 +439,7 @@ copy(char *argv[], enum op type, int fts * modified by the umask. Trade-off between being * able to write the directory (if from directory is * 555) and not causing a permissions race. If the - * umask blocks owner writes, we fail.. + * umask blocks owner writes, we fail. */ if (dne) { if (mkdir(to.p_path, @@ -452,7 +458,7 @@ copy(char *argv[], enum op type, int fts break; case S_IFBLK: case S_IFCHR: - if (Rflag) { + if (Rflag && !sflag) { if (copy_special(curr->fts_statp, !dne)) badcp = rval = 1; } else { @@ -462,10 +468,10 @@ copy(char *argv[], enum op type, int fts break; case S_IFSOCK: warnx("%s is a socket (not copied).", - curr->fts_path); + curr->fts_path); break; case S_IFIFO: - if (Rflag) { + if (Rflag && !sflag) { if (copy_fifo(curr->fts_statp, !dne)) badcp = rval = 1; } else { Modified: stable/9/bin/cp/extern.h ============================================================================== --- stable/9/bin/cp/extern.h Fri Dec 4 17:48:11 2015 (r291775) +++ stable/9/bin/cp/extern.h Fri Dec 4 17:49:05 2015 (r291776) @@ -37,7 +37,7 @@ typedef struct { } PATH_T; extern PATH_T to; -extern int fflag, iflag, lflag, nflag, pflag, vflag; +extern int fflag, iflag, lflag, nflag, pflag, sflag, vflag; extern volatile sig_atomic_t info; __BEGIN_DECLS Modified: stable/9/bin/cp/utils.c ============================================================================== --- stable/9/bin/cp/utils.c Fri Dec 4 17:48:11 2015 (r291775) +++ stable/9/bin/cp/utils.c Fri Dec 4 17:49:05 2015 (r291776) @@ -57,15 +57,19 @@ __FBSDID("$FreeBSD$"); #define cp_pct(x, y) ((y == 0) ? 0 : (int)(100.0 * (x) / (y))) -/* Memory strategy threshold, in pages: if physmem is larger then this, use a - * large buffer */ +/* + * Memory strategy threshold, in pages: if physmem is larger then this, use a + * large buffer. + */ #define PHYSPAGES_THRESHOLD (32*1024) -/* Maximum buffer size in bytes - do not allow it to grow larger than this */ +/* Maximum buffer size in bytes - do not allow it to grow larger than this. */ #define BUFSIZE_MAX (2*1024*1024) -/* Small (default) buffer size in bytes. It's inefficient for this to be - * smaller than MAXPHYS */ +/* + * Small (default) buffer size in bytes. It's inefficient for this to be + * smaller than MAXPHYS. + */ #define BUFSIZE_SMALL (MAXPHYS) int @@ -77,13 +81,15 @@ copy_file(const FTSENT *entp, int dne) ssize_t wcount; size_t wresid; off_t wtotal; - int ch, checkch, from_fd = 0, rcount, rval, to_fd = 0; + int ch, checkch, from_fd, rcount, rval, to_fd; char *bufp; #ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED char *p; #endif - if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) { + from_fd = to_fd = -1; + if (!lflag && !sflag && + (from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) { warn("%s", entp->fts_path); return (1); } @@ -103,63 +109,65 @@ copy_file(const FTSENT *entp, int dne) if (nflag) { if (vflag) printf("%s not overwritten\n", to.p_path); - (void)close(from_fd); - return (1); + rval = 1; + goto done; } else if (iflag) { (void)fprintf(stderr, "overwrite %s? %s", - to.p_path, YESNO); + to.p_path, YESNO); checkch = ch = getchar(); while (ch != '\n' && ch != EOF) ch = getchar(); if (checkch != 'y' && checkch != 'Y') { - (void)close(from_fd); (void)fprintf(stderr, "not overwritten\n"); - return (1); + rval = 1; + goto done; } } - + if (fflag) { - /* remove existing destination file name, - * create a new file */ - (void)unlink(to.p_path); - if (!lflag) - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, - fs->st_mode & ~(S_ISUID | S_ISGID)); - } else { - if (!lflag) - /* overwrite existing destination file name */ - to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); + /* + * Remove existing destination file name create a new + * file. + */ + (void)unlink(to.p_path); + if (!lflag && !sflag) { + to_fd = open(to.p_path, + O_WRONLY | O_TRUNC | O_CREAT, + fs->st_mode & ~(S_ISUID | S_ISGID)); + } + } else if (!lflag && !sflag) { + /* Overwrite existing destination file name. */ + to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); } - } else { - if (!lflag) - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, - fs->st_mode & ~(S_ISUID | S_ISGID)); + } else if (!lflag && !sflag) { + to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, + fs->st_mode & ~(S_ISUID | S_ISGID)); } - - if (to_fd == -1) { + + if (!lflag && !sflag && to_fd == -1) { warn("%s", to.p_path); - (void)close(from_fd); - return (1); + rval = 1; + goto done; } rval = 0; - if (!lflag) { + if (!lflag && !sflag) { /* - * Mmap and write if less than 8M (the limit is so we don't totally - * trash memory on big files. This is really a minor hack, but it - * wins some CPU back. + * Mmap and write if less than 8M (the limit is so we don't + * totally trash memory on big files. This is really a minor + * hack, but it wins some CPU back. * Some filesystems, such as smbnetfs, don't support mmap, * so this is a best-effort attempt. */ #ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED if (S_ISREG(fs->st_mode) && fs->st_size > 0 && - fs->st_size <= 8 * 1024 * 1024 && + fs->st_size <= 8 * 1024 * 1024 && (p = mmap(NULL, (size_t)fs->st_size, PROT_READ, MAP_SHARED, from_fd, (off_t)0)) != MAP_FAILED) { wtotal = 0; for (bufp = p, wresid = fs->st_size; ; - bufp += wcount, wresid -= (size_t)wcount) { + bufp += wcount, wresid -= (size_t)wcount) { wcount = write(to_fd, bufp, wresid); if (wcount <= 0) break; @@ -204,7 +212,7 @@ copy_file(const FTSENT *entp, int dne) wtotal = 0; while ((rcount = read(from_fd, buf, bufsize)) > 0) { for (bufp = buf, wresid = rcount; ; - bufp += wcount, wresid -= wcount) { + bufp += wcount, wresid -= wcount) { wcount = write(to_fd, bufp, wresid); if (wcount <= 0) break; @@ -230,13 +238,18 @@ copy_file(const FTSENT *entp, int dne) rval = 1; } } - } else { + } else if (lflag) { if (link(entp->fts_path, to.p_path)) { warn("%s", to.p_path); rval = 1; } + } else if (sflag) { + if (symlink(entp->fts_path, to.p_path)) { + warn("%s", to.p_path); + rval = 1; + } } - + /* * Don't remove the target even after an error. The target might * not be a regular file, or its attributes might be important, @@ -244,7 +257,7 @@ copy_file(const FTSENT *entp, int dne) * to remove it if we created it and its length is 0. */ - if (!lflag) { + if (!lflag && !sflag) { if (pflag && setfile(fs, to_fd)) rval = 1; if (pflag && preserve_fd_acls(from_fd, to_fd) != 0) @@ -255,8 +268,9 @@ copy_file(const FTSENT *entp, int dne) } } - (void)close(from_fd); - +done: + if (from_fd != -1) + (void)close(from_fd); return (rval); } @@ -321,7 +335,7 @@ setfile(struct stat *fs, int fd) fdval = fd != -1; islink = !fdval && S_ISLNK(fs->st_mode); fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX | - S_IRWXU | S_IRWXG | S_IRWXO; + S_IRWXU | S_IRWXG | S_IRWXO; TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim); TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim); @@ -335,7 +349,7 @@ setfile(struct stat *fs, int fd) else { gotstat = 1; ts.st_mode &= S_ISUID | S_ISGID | S_ISVTX | - S_IRWXU | S_IRWXG | S_IRWXO; + S_IRWXU | S_IRWXG | S_IRWXO; } /* * Changing the ownership probably won't succeed, unless we're root @@ -459,7 +473,7 @@ preserve_dir_acls(struct stat *fs, char return (0); /* - * If the file is a link we will not follow it + * If the file is a link we will not follow it. */ if (S_ISLNK(fs->st_mode)) { aclgetf = acl_get_link_np; @@ -518,8 +532,10 @@ usage(void) { (void)fprintf(stderr, "%s\n%s\n", -"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file", -" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... " -"target_directory"); + "usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] " + "source_file target_file", + " cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] " + "source_file ... " + "target_directory"); exit(EX_USAGE); } From owner-svn-src-all@freebsd.org Fri Dec 4 17:49:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9152FA41FB3; Fri, 4 Dec 2015 17:49:46 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 625121A98; Fri, 4 Dec 2015 17:49:46 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by pacdm15 with SMTP id dm15so89956626pac.3; Fri, 04 Dec 2015 09:49:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=klMRFDJZsSuTCIjQya8rnlfWOkeFDtmdUQsb311B7ss=; b=L64LQfvH7BiOTbJD2ajyMsMPD6YsA0QXaTh6yovsKZ3MER5GNn+j8gR1ZqG1VJdDlg HnLJtKV8Ew3tN0pmZ1dJYsuGYnZm2ugsbJ0plP9wuLI1oidMRmPS5cTyTHEI9bpfOQu+ 8qVP/4SyUJ5J850l88t6JHFj44CHx5hLR+C5cbBtp4rRMesniRHixwDZh/SbZioRjmAo NRDdyeEwNN6iOJIG3GfrqnYLF6ZK30IqqhwkABA06X/2fuKXprIKpeRyoRXKKCUlYYCi ouJuoYQbPnpRR6C0PG18O3NpVgkSmeHIcI9UZ+1rrZwCWjR0CqYDidq+jecgrL3CvNWE NpZQ== X-Received: by 10.66.190.66 with SMTP id go2mr23645728pac.114.1449251386062; Fri, 04 Dec 2015 09:49:46 -0800 (PST) Received: from [10.192.166.0] (stargate.chelsio.com. [12.32.117.8]) by smtp.googlemail.com with ESMTPSA id sg4sm18442328pac.48.2015.12.04.09.49.44 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Dec 2015 09:49:44 -0800 (PST) Subject: Re: svn commit: r291431 - head/sys/dev/drm2/i915 To: Renato Botelho , =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= References: <201511281738.tASHcRFG041033@repo.freebsd.org> <4129928E-743E-4955-B862-1DA4A5DC4E2B@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Navdeep Parhar Message-ID: <5661D237.80808@gmail.com> Date: Fri, 4 Dec 2015 09:49:43 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <4129928E-743E-4955-B862-1DA4A5DC4E2B@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:49:46 -0000 On 12/04/2015 07:53, Renato Botelho wrote: >> On Nov 28, 2015, at 15:38, Jean-S=C3=A9bastien P=C3=A9dron wrote: >> >> Author: dumbbell >> Date: Sat Nov 28 17:38:27 2015 >> New Revision: 291431 >> URL: https://svnweb.freebsd.org/changeset/base/291431 >> >> Log: >> drm/i915: Reduce diff with Linux 3.8 >> >> There is no functional change. The goal is to ease the future update= to >> Linux 3.8's i915 driver. >> >> MFC after: 2 months >> >> Modified: >> head/sys/dev/drm2/i915/i915_drm.h > > After all recent changes I started to get following error when try to k= ldload i915kms.ko: > > KLD i915kms.ko: depends on drmn - not available or version mismatch > linker_load_file: Unsupported file type Run kldxref /boot/kernel by hand and see if that fixes it. There was a=20 problem with installkernel in recent head (now fixed). Regards, Navdeep From owner-svn-src-all@freebsd.org Fri Dec 4 17:51:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A93D3A4103C; Fri, 4 Dec 2015 17:51:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8427D1CD5; Fri, 4 Dec 2015 17:51:18 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 08B6AB97D; Fri, 4 Dec 2015 12:51:17 -0500 (EST) From: John Baldwin To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291744 - in head/sys: conf modules Date: Fri, 04 Dec 2015 09:50:17 -0800 Message-ID: <2092924.RITcBJdNZd@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201512040427.tB44RL8S067654@repo.freebsd.org> References: <201512040427.tB44RL8S067654@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 04 Dec 2015 12:51:17 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:51:18 -0000 On Friday, December 04, 2015 04:27:21 AM Bryan Drewery wrote: > Author: bdrewery > Date: Fri Dec 4 04:27:21 2015 > New Revision: 291744 > URL: https://svnweb.freebsd.org/changeset/base/291744 > > Log: > Calculate MPATH for sys/modules to save 92% time in a basic 'obj' tree-walk. > > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/sys/conf/kmod.mk > head/sys/modules/Makefile > > Modified: head/sys/conf/kmod.mk > ============================================================================== > --- head/sys/conf/kmod.mk Fri Dec 4 03:54:18 2015 (r291743) > +++ head/sys/conf/kmod.mk Fri Dec 4 04:27:21 2015 (r291744) > @@ -370,8 +370,10 @@ vnode_if_typedef.h: > .endif > > # Build _if.[ch] from _if.m, and clean them when we're done. > +# This is duplicated in sys/modules/Makefile. > .if !defined(__MPATH) > __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m > +.export __MPATH > .endif > _MFILES=${__MPATH:T:O} > _MPATH=${__MPATH:H:O:u} It's also duplicated in sys/conf/kern.pre.mk which uses this to export it: # Calculate path for .m files early, if needed. .if !defined(__MPATH) __MPATH!=find ${S:tA}/ -name \*_if.m .endif .... MKMODULESENV+= __MPATH="${__MPATH}" So, the comment should probably reference the two other places that will pass an __MPATH down (kern.pre.mk and sys/modules/Makefile). Note though that you should only be seeing this if you are building modules outside of a kernel build (e.g. MODULES_WITH_WORLD). modules built as part of a kernel build will inherit __MPATH from kern.pre.mk. When I ran a buildkernel with truss -af and grepp'd for all the execve's of /usr/bin/find I only found about 6 for a GENERIC kernel, so I believe that the kern.pre.mk bits were working already. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Dec 4 17:56:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3871CA411CD; Fri, 4 Dec 2015 17:56:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3FD1102A; Fri, 4 Dec 2015 17:56:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4HuBxG012706; Fri, 4 Dec 2015 17:56:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4HuAog012702; Fri, 4 Dec 2015 17:56:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041756.tB4HuAog012702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 17:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291777 - in stable/10: . secure share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:56:12 -0000 Author: bdrewery Date: Fri Dec 4 17:56:10 2015 New Revision: 291777 URL: https://svnweb.freebsd.org/changeset/base/291777 Log: MFC r289360,r289361,r289378,r289430,r289605,r289676: r289360: Add temporary workaround for .MAKE being applied to _worldtmp, since r251750. r289361: Consider top-level targets to be .PHONY as bmake won't build them otherwise if a file with the same name is found in the directory. r289378: Mark sub-make targets as .MAKE and .PHONY to handle -n and always-build properly. r289430: Remove .MAKE from targets that do more than just run sub-makes, such as calling rm or mtree. r289605: Add missing .PHONY for parallel subdir target. r289676: Add some missing '+', .MAKE, and .PHONY modifiers. Modified: stable/10/Makefile stable/10/Makefile.inc1 stable/10/secure/Makefile stable/10/share/mk/bsd.subdir.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile ============================================================================== --- stable/10/Makefile Fri Dec 4 17:49:05 2015 (r291776) +++ stable/10/Makefile Fri Dec 4 17:56:10 2015 (r291777) @@ -252,7 +252,7 @@ ${TGTS}: .MAKE tinderbox toolchains kernel-toolchains: .MAKE .endif -${TGTS}: +${TGTS}: .PHONY ${_+_}@cd ${.CURDIR}; ${_MAKE} ${.TARGET} # The historic default "all" target creates files which may cause stale Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Fri Dec 4 17:49:05 2015 (r291776) +++ stable/10/Makefile.inc1 Fri Dec 4 17:56:10 2015 (r291777) @@ -468,7 +468,7 @@ KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS # Attempt to rebuild the entire system, with reasonable chance of # success, regardless of how old your existing system is. # -_worldtmp: +_worldtmp: .PHONY .if ${.CURDIR:C/[^,]//g} != "" # The m4 build of sendmail files doesn't like it if ',' is used # anywhere in the path of it's files. @@ -592,7 +592,7 @@ everything: @echo "--------------------------------------------------------------" ${_+_}cd ${.CURDIR}; ${WMAKE} par-all .if defined(LIB32TMP) -build32: +build32: .PHONY @echo @echo "--------------------------------------------------------------" @echo ">>> stage 5.1: building 32 bit shim libraries" @@ -609,54 +609,55 @@ build32: mkdir -p ${WORLDTMP} ln -sf ${.CURDIR}/sys ${WORLDTMP} .for _t in obj includes - cd ${.CURDIR}/include; ${LIB32WMAKE} DIRPRFX=include/ ${_t} - cd ${.CURDIR}/lib; ${LIB32WMAKE} DIRPRFX=lib/ ${_t} + ${_+_}cd ${.CURDIR}/include; ${LIB32WMAKE} DIRPRFX=include/ ${_t} + ${_+_}cd ${.CURDIR}/lib; ${LIB32WMAKE} DIRPRFX=lib/ ${_t} .if ${MK_CDDL} != "no" - cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t} + ${_+_}cd ${.CURDIR}/cddl/lib; ${LIB32WMAKE} DIRPRFX=cddl/lib/ ${_t} .endif - cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t} + ${_+_}cd ${.CURDIR}/gnu/lib; ${LIB32WMAKE} DIRPRFX=gnu/lib/ ${_t} .if ${MK_CRYPT} != "no" - cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t} + ${_+_}cd ${.CURDIR}/secure/lib; ${LIB32WMAKE} DIRPRFX=secure/lib/ ${_t} .endif .if ${MK_KERBEROS} != "no" - cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib ${_t} + ${_+_}cd ${.CURDIR}/kerberos5/lib; ${LIB32WMAKE} DIRPRFX=kerberos5/lib ${_t} .endif .endfor .for _dir in usr.bin/lex/lib - cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj + ${_+_}cd ${.CURDIR}/${_dir}; ${LIB32WMAKE} DIRPRFX=${_dir}/ obj .endfor .for _dir in lib/ncurses/ncurses lib/ncurses/ncursesw lib/libmagic - cd ${.CURDIR}/${_dir}; \ + ${_+_}cd ${.CURDIR}/${_dir}; \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \ MAKEOBJDIRPREFIX=${OBJTREE}/lib32 ${MAKE} SSP_CFLAGS= DESTDIR= \ DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \ -DEARLY_BUILD build-tools .endfor - cd ${.CURDIR}; \ + ${_+_}cd ${.CURDIR}; \ ${LIB32WMAKE} -f Makefile.inc1 libraries .for _t in obj depend all - cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \ + ${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \ DIRPRFX=libexec/rtld-elf/ ${_t} - cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \ + ${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \ DIRPRFX=usr.bin/ldd ${_t} .endfor -distribute32 install32: - cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} +distribute32 install32: .MAKE .PHONY + ${_+_}cd ${.CURDIR}/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .if ${MK_CDDL} != "no" - cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} + ${_+_}cd ${.CURDIR}/cddl/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif - cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} + ${_+_}cd ${.CURDIR}/gnu/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .if ${MK_CRYPT} != "no" - cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} + ${_+_}cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif .if ${MK_KERBEROS} != "no" - cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} + ${_+_}cd ${.CURDIR}/kerberos5/lib; ${LIB32IMAKE} ${.TARGET:S/32$//} .endif - cd ${.CURDIR}/libexec/rtld-elf; \ + ${_+_}cd ${.CURDIR}/libexec/rtld-elf; \ PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//} - cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//} + ${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} \ + ${.TARGET:S/32$//} .endif WMAKE_TGTS= @@ -871,7 +872,7 @@ distributeworld installworld: _installch .endif .endfor -mkdir ${DESTDIR}/${DISTDIR}/base - cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ + ${_+_}cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \ DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \ LOCAL_MTREE=${LOCAL_MTREE:Q} distrib-dirs @@ -943,7 +944,7 @@ packageworld: # and do a 'make reinstall' on the *client* to install new binaries from the # most recent server build. # -reinstall: .MAKE +reinstall: .MAKE .PHONY @echo "--------------------------------------------------------------" @echo ">>> Making hierarchy" @echo "--------------------------------------------------------------" @@ -958,7 +959,7 @@ reinstall: .MAKE ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32 .endif -redistribute: .MAKE +redistribute: .MAKE .PHONY @echo "--------------------------------------------------------------" @echo ">>> Distributing everything" @echo "--------------------------------------------------------------" @@ -968,7 +969,7 @@ redistribute: .MAKE DISTRIBUTION=lib32 .endif -distrib-dirs distribution: .MAKE +distrib-dirs distribution: .MAKE .PHONY cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \ ${IMAKE_INSTALL} ${IMAKE_MTREE} METALOG=${METALOG} ${.TARGET} @@ -1019,14 +1020,14 @@ INSTALLKERNEL= ${_kernel} .endif .endfor -buildkernel ${WMAKE_TGTS} ${.ALLTARGETS:M_*}: .MAKE +${WMAKE_TGTS:N_worldtmp:Nbuild32} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY # # buildkernel # # Builds all kernels defined by BUILDKERNELS. # -buildkernel: +buildkernel: .MAKE .PHONY .if empty(BUILDKERNELS) @echo "ERROR: Missing kernel configuration file(s) (${KERNCONF})."; \ false @@ -1053,14 +1054,14 @@ buildkernel: @echo "--------------------------------------------------------------" @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR} + ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR} .endif .if !defined(NO_KERNELOBJ) @echo @echo "--------------------------------------------------------------" @echo ">>> stage 2.2: rebuilding the object tree" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj + ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} obj .endif @echo @echo "--------------------------------------------------------------" @@ -1072,13 +1073,13 @@ buildkernel: @echo "--------------------------------------------------------------" @echo ">>> stage 3.1: making dependencies" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ + ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} depend -DNO_MODULES_OBJ .endif @echo @echo "--------------------------------------------------------------" @echo ">>> stage 3.2: building everything" @echo "--------------------------------------------------------------" - cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ + ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} all -DNO_MODULES_OBJ @echo "--------------------------------------------------------------" @echo ">>> Kernel build for ${_kernel} completed on `LC_ALL=C date`" @echo "--------------------------------------------------------------" @@ -1161,12 +1162,12 @@ packagekernel: # # Build the API documentation with doxygen # -doxygen: +doxygen: .PHONY @if [ ! -x `/usr/bin/which doxygen` ]; then \ echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ exit 1; \ fi - cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all + ${_+_}cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all # # update @@ -1435,7 +1436,7 @@ build-tools: .MAKE # # kernel-tools: Build kernel-building tools # -kernel-tools: .MAKE +kernel-tools: mkdir -p ${MAKEOBJDIRPREFIX}/usr mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${MAKEOBJDIRPREFIX}/usr >/dev/null @@ -1480,7 +1481,7 @@ _cc= gnu/usr.bin/cc .endif .endif -cross-tools: .MAKE +cross-tools: .MAKE .PHONY .for _tool in \ ${_clang_libs} \ ${_clang} \ @@ -1512,7 +1513,7 @@ NXBMAKE= ${NXBENV} ${MAKE} \ -DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF \ -DWITHOUT_CLANG_FULL -DWITHOUT_LLDB -native-xtools: .MAKE +native-xtools: .PHONY mkdir -p ${OBJTREE}/nxb-bin/bin mkdir -p ${OBJTREE}/nxb-bin/sbin mkdir -p ${OBJTREE}/nxb-bin/usr @@ -1589,8 +1590,8 @@ native-xtools: .MAKE # # hierarchy - ensure that all the needed directories are present # -hierarchy hier: .MAKE - cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs +hierarchy hier: .MAKE .PHONY + ${_+_}cd ${.CURDIR}/etc && ${HMAKE} distrib-dirs # # libraries - build all libraries, and install them under ${DESTDIR}. @@ -1599,8 +1600,8 @@ hierarchy hier: .MAKE # interdependencies (__L) are built automatically by the # ${.CURDIR}/tools/make_libdeps.sh script. # -libraries: .MAKE - cd ${.CURDIR} && \ +libraries: .MAKE .PHONY + ${_+_}cd ${.CURDIR} && \ ${MAKE} -f Makefile.inc1 _prereq_libs && \ ${MAKE} -f Makefile.inc1 _startup_libs && \ ${MAKE} -f Makefile.inc1 _prebuild_libs && \ @@ -2099,12 +2100,12 @@ xdev: xdev-build xdev-install .ORDER: _xb-worldtmp _xb-bootstrap-tools _xb-build-tools _xb-cross-tools xdev-build: _xb-worldtmp _xb-bootstrap-tools _xb-build-tools _xb-cross-tools -_xb-worldtmp: +_xb-worldtmp: .PHONY mkdir -p ${CDTMP}/usr mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${CDTMP}/usr >/dev/null -_xb-bootstrap-tools: +_xb-bootstrap-tools: .PHONY .for _tool in \ ${_clang_tblgen} ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ @@ -2115,11 +2116,11 @@ _xb-bootstrap-tools: ${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install .endfor -_xb-build-tools: +_xb-build-tools: .PHONY ${_+_}@cd ${.CURDIR}; \ ${CDBENV} ${MAKE} -f Makefile.inc1 ${NOFUN} build-tools -_xb-cross-tools: +_xb-cross-tools: .PHONY .for _tool in \ ${_binutils} \ usr.bin/ar \ @@ -2133,7 +2134,7 @@ _xb-cross-tools: ${CDMAKE} DIRPRFX=${_tool}/ all .endfor -_xi-mtree: +_xi-mtree: .PHONY ${_+_}@${ECHODIR} "mtree populating ${XDDESTDIR}" mkdir -p ${XDDESTDIR} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \ @@ -2151,7 +2152,7 @@ _xi-mtree: .ORDER: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links xdev-install: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links -_xi-cross-tools: +_xi-cross-tools: .PHONY @echo "_xi-cross-tools" .for _tool in \ ${_binutils} \ @@ -2164,15 +2165,15 @@ _xi-cross-tools: ${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR} .endfor -_xi-includes: +_xi-includes: .PHONY ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 par-includes \ DESTDIR=${XDDESTDIR} -_xi-libraries: +_xi-libraries: .PHONY ${_+_}cd ${.CURDIR}; ${CD2MAKE} -f Makefile.inc1 libraries \ DESTDIR=${XDDESTDIR} -_xi-links: +_xi-links: .PHONY ${_+_}cd ${XDDESTDIR}/usr/bin; \ mkdir -p ../../../../usr/bin; \ for i in *; do \ Modified: stable/10/secure/Makefile ============================================================================== --- stable/10/secure/Makefile Fri Dec 4 17:49:05 2015 (r291776) +++ stable/10/secure/Makefile Fri Dec 4 17:56:10 2015 (r291777) @@ -17,7 +17,7 @@ SPROGS+=usr.sbin/sendmail .endif # This target is used to rebuild these programs with crypto. -secure: +secure: .MAKE .PHONY .for entry in ${SPROGS} cd ${.CURDIR}/../${entry}; \ ${MAKE} cleandir; \ @@ -28,7 +28,7 @@ secure: .endfor # This target is used to rebuild these programs without crypto. -insecure: +insecure: .MAKE .PHONY .for entry in ${SPROGS} cd ${.CURDIR}/../${entry}; \ ${MAKE} -DWITHOUT_CRYPT cleandir; \ Modified: stable/10/share/mk/bsd.subdir.mk ============================================================================== --- stable/10/share/mk/bsd.subdir.mk Fri Dec 4 17:49:05 2015 (r291776) +++ stable/10/share/mk/bsd.subdir.mk Fri Dec 4 17:56:10 2015 (r291777) @@ -84,7 +84,7 @@ __deps= .for __dep in ${SUBDIR_DEPEND_${__dir}} __deps+= ${__target}_subdir_${__dep} .endfor -${__target}_subdir_${__dir}: .MAKE ${__deps} +${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) @${_+_}set -e; \ if test -d ${.CURDIR}/${__dir}.${MACHINE_ARCH}; then \ From owner-svn-src-all@freebsd.org Fri Dec 4 17:57:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0EBCA41231; Fri, 4 Dec 2015 17:57:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB99C118E; Fri, 4 Dec 2015 17:57:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4Hva2R012805; Fri, 4 Dec 2015 17:57:36 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4HvamX012804; Fri, 4 Dec 2015 17:57:36 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041757.tB4HvamX012804@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 17:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291778 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:57:38 -0000 Author: bdrewery Date: Fri Dec 4 17:57:36 2015 New Revision: 291778 URL: https://svnweb.freebsd.org/changeset/base/291778 Log: MFC r289374: Remove excess .else Modified: stable/10/share/mk/bsd.doc.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.doc.mk ============================================================================== --- stable/10/share/mk/bsd.doc.mk Fri Dec 4 17:56:10 2015 (r291777) +++ stable/10/share/mk/bsd.doc.mk Fri Dec 4 17:57:36 2015 (r291778) @@ -184,7 +184,6 @@ ${DFILE.html}: ${SRCS} .else # unroff(1) requires a macro package as an argument cd ${SRCDIR}; ${UNROFF} -ms ${UNROFFFLAGS} \ document=${DOC} ${SRCS} -.else .endif .endif .endfor From owner-svn-src-all@freebsd.org Fri Dec 4 17:57:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 816BFA41260; Fri, 4 Dec 2015 17:57:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E4D111D1; Fri, 4 Dec 2015 17:57:42 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4Hvf0D012852; Fri, 4 Dec 2015 17:57:41 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4HvfC9012851; Fri, 4 Dec 2015 17:57:41 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041757.tB4HvfC9012851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 17:57:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291779 - stable/9/share/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:57:42 -0000 Author: bdrewery Date: Fri Dec 4 17:57:41 2015 New Revision: 291779 URL: https://svnweb.freebsd.org/changeset/base/291779 Log: MFC r289374: Remove excess .else Modified: stable/9/share/mk/bsd.doc.mk Directory Properties: stable/9/share/mk/ (props changed) Modified: stable/9/share/mk/bsd.doc.mk ============================================================================== --- stable/9/share/mk/bsd.doc.mk Fri Dec 4 17:57:36 2015 (r291778) +++ stable/9/share/mk/bsd.doc.mk Fri Dec 4 17:57:41 2015 (r291779) @@ -184,7 +184,6 @@ ${DFILE.html}: ${SRCS} .else # unroff(1) requires a macro package as an argument cd ${SRCDIR}; ${UNROFF} -ms ${UNROFFFLAGS} \ document=${DOC} ${SRCS} -.else .endif .endif .endfor From owner-svn-src-all@freebsd.org Fri Dec 4 17:57:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 213C9A4129F; Fri, 4 Dec 2015 17:57:49 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70CFB135D; Fri, 4 Dec 2015 17:57:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id tB4HvbOY057962 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 4 Dec 2015 19:57:38 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua tB4HvbOY057962 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id tB4HvbRr057961; Fri, 4 Dec 2015 19:57:37 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 4 Dec 2015 19:57:37 +0200 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291699 - in head/sys: modules/mlxen ofed/drivers/net/mlx4 Message-ID: <20151204175737.GA2202@kib.kiev.ua> References: <201512031456.tB3EuHVs030967@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201512031456.tB3EuHVs030967@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:57:49 -0000 On Thu, Dec 03, 2015 at 02:56:17PM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Dec 3 14:56:17 2015 > New Revision: 291699 > URL: https://svnweb.freebsd.org/changeset/base/291699 > > Log: > Convert the mlxen driver to use the BUSDMA(9) APIs instead of > vtophys() when loading mbufs for transmission and reception. While at > it all pointer arithmetic and cast qualifier issues were fixed, mostly > related to transmission and reception. > > MFC after: 1 week > Sponsored by: Mellanox Technologies > Differential Revision: https://reviews.freebsd.org/D4284 > > Modified: > head/sys/modules/mlxen/Makefile > head/sys/ofed/drivers/net/mlx4/en_netdev.c > head/sys/ofed/drivers/net/mlx4/en_rx.c > head/sys/ofed/drivers/net/mlx4/en_tx.c > head/sys/ofed/drivers/net/mlx4/mlx4_en.h > > Modified: head/sys/modules/mlxen/Makefile > ============================================================================== > --- head/sys/modules/mlxen/Makefile Thu Dec 3 14:38:55 2015 (r291698) > +++ head/sys/modules/mlxen/Makefile Thu Dec 3 14:56:17 2015 (r291699) > @@ -11,5 +11,3 @@ CFLAGS+= -I${.CURDIR}/../../ofed/include > CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include > > .include > - > -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith I did not checked to definitely blame this commit, but I do get the following error from the i386 LINT build: In file included from /scratch/tmp/kib/src/sys/modules/mlxen/../../ofed/drivers/ net/mlx4/en_cq.c:34: In file included from /scratch/tmp/kib/src/sys/modules/mlxen/../../ofed/include/ linux/mlx4/cq.h:39: /scratch/tmp/kib/src/sys/modules/mlxen/../../ofed/include/linux/mlx4/doorbell.h: 80:42: error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wpoin ter-arith] __raw_writel((__force u32) val[1], dest + 4); ~~~~ ^ 1 error generated. From owner-svn-src-all@freebsd.org Fri Dec 4 17:58:27 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28DD4A41304; Fri, 4 Dec 2015 17:58:27 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E80681759; Fri, 4 Dec 2015 17:58:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4HwQnx012932; Fri, 4 Dec 2015 17:58:26 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4HwQ8m012931; Fri, 4 Dec 2015 17:58:26 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041758.tB4HwQ8m012931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 17:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291780 - stable/9/share/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:58:27 -0000 Author: bdrewery Date: Fri Dec 4 17:58:25 2015 New Revision: 291780 URL: https://svnweb.freebsd.org/changeset/base/291780 Log: MFC r289375: Fix wrong use of .for; the iteration variable is not used in the loop. Modified: stable/9/share/mk/bsd.doc.mk Directory Properties: stable/9/share/mk/ (props changed) Modified: stable/9/share/mk/bsd.doc.mk ============================================================================== --- stable/9/share/mk/bsd.doc.mk Fri Dec 4 17:57:41 2015 (r291779) +++ stable/9/share/mk/bsd.doc.mk Fri Dec 4 17:58:25 2015 (r291780) @@ -133,11 +133,11 @@ CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${ ${DOC}.html ${DOC}-*.html realinstall: -.for _dev in ${PRINTERDEVICE:Mhtml} +.if ${PRINTERDEVICE:Mhtml} cd ${SRCDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME} -.endfor +.endif .for _dev in ${PRINTERDEVICE:Nhtml} ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME} From owner-svn-src-all@freebsd.org Fri Dec 4 17:58:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59AA7A4133C; Fri, 4 Dec 2015 17:58:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3D931813; Fri, 4 Dec 2015 17:58:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4HwVi5012980; Fri, 4 Dec 2015 17:58:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4HwVG0012979; Fri, 4 Dec 2015 17:58:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041758.tB4HwVG0012979@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 17:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291781 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:58:33 -0000 Author: bdrewery Date: Fri Dec 4 17:58:31 2015 New Revision: 291781 URL: https://svnweb.freebsd.org/changeset/base/291781 Log: MFC r289375: Fix wrong use of .for; the iteration variable is not used in the loop. Modified: stable/10/share/mk/bsd.doc.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.doc.mk ============================================================================== --- stable/10/share/mk/bsd.doc.mk Fri Dec 4 17:58:25 2015 (r291780) +++ stable/10/share/mk/bsd.doc.mk Fri Dec 4 17:58:31 2015 (r291781) @@ -133,11 +133,11 @@ CLEANFILES+= ${DOC}.ascii ${DOC}.ascii${ ${DOC}.html ${DOC}-*.html realinstall: -.for _dev in ${PRINTERDEVICE:Mhtml} +.if ${PRINTERDEVICE:Mhtml} cd ${SRCDIR}; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${DOC}*.html ${DESTDIR}${BINDIR}/${VOLUME} -.endfor +.endif .for _dev in ${PRINTERDEVICE:Nhtml} ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ ${DFILE.${_dev}} ${DESTDIR}${BINDIR}/${VOLUME} From owner-svn-src-all@freebsd.org Fri Dec 4 17:59:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23D55A413C5; Fri, 4 Dec 2015 17:59:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7B4A1A3C; Fri, 4 Dec 2015 17:59:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4HxjZA013069; Fri, 4 Dec 2015 17:59:45 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4HxjHu013068; Fri, 4 Dec 2015 17:59:45 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041759.tB4HxjHu013068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 17:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291782 - in stable/10/gnu/usr.bin/cc: collect2 protoize X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 17:59:47 -0000 Author: bdrewery Date: Fri Dec 4 17:59:45 2015 New Revision: 291782 URL: https://svnweb.freebsd.org/changeset/base/291782 Log: MFC r289379: Remove directories disconnected since r169718. Deleted: stable/10/gnu/usr.bin/cc/collect2/ stable/10/gnu/usr.bin/cc/protoize/ Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@freebsd.org Fri Dec 4 18:01:12 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5DBEA41451; Fri, 4 Dec 2015 18:01:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A28841CFD; Fri, 4 Dec 2015 18:01:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4I1Bss015127; Fri, 4 Dec 2015 18:01:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4I1BlA015126; Fri, 4 Dec 2015 18:01:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041801.tB4I1BlA015126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:01:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291783 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:01:12 -0000 Author: bdrewery Date: Fri Dec 4 18:01:11 2015 New Revision: 291783 URL: https://svnweb.freebsd.org/changeset/base/291783 Log: MFC r289736: Document that we use {} for variable expansion. Modified: stable/10/share/man/man5/style.Makefile.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/style.Makefile.5 ============================================================================== --- stable/10/share/man/man5/style.Makefile.5 Fri Dec 4 17:59:45 2015 (r291782) +++ stable/10/share/man/man5/style.Makefile.5 Fri Dec 4 18:01:11 2015 (r291783) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2005 +.Dd October 21, 2015 .Dt STYLE.MAKEFILE 5 .Os .Sh NAME @@ -117,6 +117,13 @@ i.e., no space between the variable name .Ic = . Keep values sorted alphabetically, if possible. .It +Variables are expanded with +.Sy {} , +not +.Sy () . +Such as +.Va ${VARIABLE} . +.It Do not use .Ic += to set variables that are only set once From owner-svn-src-all@freebsd.org Fri Dec 4 18:01:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41C4AA41476; Fri, 4 Dec 2015 18:01:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B6251D1D; Fri, 4 Dec 2015 18:01:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4I1F2B015172; Fri, 4 Dec 2015 18:01:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4I1FhR015171; Fri, 4 Dec 2015 18:01:15 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041801.tB4I1FhR015171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291784 - stable/9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:01:16 -0000 Author: bdrewery Date: Fri Dec 4 18:01:14 2015 New Revision: 291784 URL: https://svnweb.freebsd.org/changeset/base/291784 Log: MFC r289736: Document that we use {} for variable expansion. Modified: stable/9/share/man/man5/style.Makefile.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/9/share/man/man5/style.Makefile.5 ============================================================================== --- stable/9/share/man/man5/style.Makefile.5 Fri Dec 4 18:01:11 2015 (r291783) +++ stable/9/share/man/man5/style.Makefile.5 Fri Dec 4 18:01:14 2015 (r291784) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2005 +.Dd October 21, 2015 .Dt STYLE.MAKEFILE 5 .Os .Sh NAME @@ -117,6 +117,13 @@ i.e., no space between the variable name .Ic = . Keep values sorted alphabetically, if possible. .It +Variables are expanded with +.Sy {} , +not +.Sy () . +Such as +.Va ${VARIABLE} . +.It Do not use .Ic += to set variables that are only set once From owner-svn-src-all@freebsd.org Fri Dec 4 18:01:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2487A414D6; Fri, 4 Dec 2015 18:01:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 885931FDF; Fri, 4 Dec 2015 18:01:32 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 746461FE023; Fri, 4 Dec 2015 19:01:23 +0100 (CET) Subject: Re: svn commit: r291699 - in head/sys: modules/mlxen ofed/drivers/net/mlx4 To: Konstantin Belousov References: <201512031456.tB3EuHVs030967@repo.freebsd.org> <20151204175737.GA2202@kib.kiev.ua> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <5661D55F.4050902@selasky.org> Date: Fri, 4 Dec 2015 19:03:11 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151204175737.GA2202@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:01:33 -0000 On 12/04/15 18:57, Konstantin Belousov wrote: > On Thu, Dec 03, 2015 at 02:56:17PM +0000, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Thu Dec 3 14:56:17 2015 >> New Revision: 291699 >> URL: https://svnweb.freebsd.org/changeset/base/291699 >> >> Log: >> Convert the mlxen driver to use the BUSDMA(9) APIs instead of >> vtophys() when loading mbufs for transmission and reception. While at >> it all pointer arithmetic and cast qualifier issues were fixed, mostly >> related to transmission and reception. >> >> MFC after: 1 week >> Sponsored by: Mellanox Technologies >> Differential Revision: https://reviews.freebsd.org/D4284 >> >> Modified: >> head/sys/modules/mlxen/Makefile >> head/sys/ofed/drivers/net/mlx4/en_netdev.c >> head/sys/ofed/drivers/net/mlx4/en_rx.c >> head/sys/ofed/drivers/net/mlx4/en_tx.c >> head/sys/ofed/drivers/net/mlx4/mlx4_en.h >> >> Modified: head/sys/modules/mlxen/Makefile >> ============================================================================== >> --- head/sys/modules/mlxen/Makefile Thu Dec 3 14:38:55 2015 (r291698) >> +++ head/sys/modules/mlxen/Makefile Thu Dec 3 14:56:17 2015 (r291699) >> @@ -11,5 +11,3 @@ CFLAGS+= -I${.CURDIR}/../../ofed/include >> CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include >> >> .include >> - >> -CFLAGS+= -Wno-cast-qual -Wno-pointer-arith > > I did not checked to definitely blame this commit, but I do get the > following error from the i386 LINT build: > > In file included from /scratch/tmp/kib/src/sys/modules/mlxen/../../ofed/drivers/ > net/mlx4/en_cq.c:34: > In file included from /scratch/tmp/kib/src/sys/modules/mlxen/../../ofed/include/ > linux/mlx4/cq.h:39: > /scratch/tmp/kib/src/sys/modules/mlxen/../../ofed/include/linux/mlx4/doorbell.h: > 80:42: error: arithmetic on a pointer to void is a GNU extension [-Werror,-Wpoin > ter-arith] > __raw_writel((__force u32) val[1], dest + 4); > ~~~~ ^ I'll check it out. --HPS From owner-svn-src-all@freebsd.org Fri Dec 4 18:03:43 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF8B9A415F9; Fri, 4 Dec 2015 18:03:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB77A1241; Fri, 4 Dec 2015 18:03:43 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4I3gsA015800; Fri, 4 Dec 2015 18:03:42 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4I3gsJ015797; Fri, 4 Dec 2015 18:03:42 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041803.tB4I3gsJ015797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291785 - stable/9/share/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:03:44 -0000 Author: bdrewery Date: Fri Dec 4 18:03:42 2015 New Revision: 291785 URL: https://svnweb.freebsd.org/changeset/base/291785 Log: MFC r289870,r289871: r289870: Add bsd.crunchgen.mk to bsd.README. r289871: Sort properly. Modified: stable/9/share/mk/bsd.README stable/9/share/mk/bsd.crunchgen.mk Directory Properties: stable/9/share/mk/ (props changed) Modified: stable/9/share/mk/bsd.README ============================================================================== --- stable/9/share/mk/bsd.README Fri Dec 4 18:01:14 2015 (r291784) +++ stable/9/share/mk/bsd.README Fri Dec 4 18:03:42 2015 (r291785) @@ -17,6 +17,7 @@ files. In most cases it is only interes bsd.lib.mk. bsd.cpu.mk - sets CPU/arch-related variables +bsd.crunchgen.mk - building crunched binaries using crunchgen(1) bsd.dep.mk - handle Makefile dependencies bsd.doc.mk - building troff system documents bsd.files.mk - install of general purpose files Modified: stable/9/share/mk/bsd.crunchgen.mk ============================================================================== --- stable/9/share/mk/bsd.crunchgen.mk Fri Dec 4 18:01:14 2015 (r291784) +++ stable/9/share/mk/bsd.crunchgen.mk Fri Dec 4 18:03:42 2015 (r291785) @@ -1,5 +1,7 @@ ################################################################# # +# Generate crunched binaries using crunchgen(1). +# # General notes: # # A number of Make variables are used to generate the crunchgen config file. From owner-svn-src-all@freebsd.org Fri Dec 4 18:04:11 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24228A41648; Fri, 4 Dec 2015 18:04:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E61AB138C; Fri, 4 Dec 2015 18:04:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4I4AAc015862; Fri, 4 Dec 2015 18:04:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4I49u3015860; Fri, 4 Dec 2015 18:04:09 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041804.tB4I49u3015860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291786 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:04:11 -0000 Author: bdrewery Date: Fri Dec 4 18:04:09 2015 New Revision: 291786 URL: https://svnweb.freebsd.org/changeset/base/291786 Log: MFC r289870,r289871: r289870: Add bsd.crunchgen.mk to bsd.README. r289871: Sort properly. Modified: stable/10/share/mk/bsd.README stable/10/share/mk/bsd.crunchgen.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.README ============================================================================== --- stable/10/share/mk/bsd.README Fri Dec 4 18:03:42 2015 (r291785) +++ stable/10/share/mk/bsd.README Fri Dec 4 18:04:09 2015 (r291786) @@ -17,6 +17,7 @@ files. In most cases it is only interes bsd.lib.mk. bsd.cpu.mk - sets CPU/arch-related variables +bsd.crunchgen.mk - building crunched binaries using crunchgen(1) bsd.dep.mk - handle Makefile dependencies bsd.doc.mk - building troff system documents bsd.files.mk - install of general purpose files Modified: stable/10/share/mk/bsd.crunchgen.mk ============================================================================== --- stable/10/share/mk/bsd.crunchgen.mk Fri Dec 4 18:03:42 2015 (r291785) +++ stable/10/share/mk/bsd.crunchgen.mk Fri Dec 4 18:04:09 2015 (r291786) @@ -1,5 +1,7 @@ ################################################################# # +# Generate crunched binaries using crunchgen(1). +# # General notes: # # A number of Make variables are used to generate the crunchgen config file. From owner-svn-src-all@freebsd.org Fri Dec 4 18:04:47 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D190A41693; Fri, 4 Dec 2015 18:04:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE1681566; Fri, 4 Dec 2015 18:04:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4I4ko1015928; Fri, 4 Dec 2015 18:04:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4I4k3b015927; Fri, 4 Dec 2015 18:04:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041804.tB4I4k3b015927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:04:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291787 - stable/9/usr.bin/mkdep X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:04:47 -0000 Author: bdrewery Date: Fri Dec 4 18:04:45 2015 New Revision: 291787 URL: https://svnweb.freebsd.org/changeset/base/291787 Log: MFC r289872: Replace gcc reference with 'cc' and document the default ${CC}. Modified: stable/9/usr.bin/mkdep/mkdep.1 Directory Properties: stable/9/usr.bin/mkdep/ (props changed) Modified: stable/9/usr.bin/mkdep/mkdep.1 ============================================================================== --- stable/9/usr.bin/mkdep/mkdep.1 Fri Dec 4 18:04:09 2015 (r291786) +++ stable/9/usr.bin/mkdep/mkdep.1 Fri Dec 4 18:04:45 2015 (r291787) @@ -28,7 +28,7 @@ .\" @(#)mkdep.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd October 23, 2015 .Dt MKDEP 1 .Os .Sh NAME @@ -60,11 +60,13 @@ CFLAGS is the list of flags for the C co .Pp The user has the ability to change the preprocessor and preprocessor options used. -For instance, to use gcc as the preprocessor and to ignore system +For instance, to use +.Sy cc +as the preprocessor and to ignore system headers, one would use .Bd -literal -offset indent depend: - env MKDEP_CPP="gcc -E" MKDEP_CPP_OPTS=-MM mkdep \\ + env MKDEP_CPP="cc -E" MKDEP_CPP_OPTS=-MM mkdep \\ ${CFLAGS} ${SRCS} .Ed .Pp @@ -101,6 +103,8 @@ module. Specifies the C compiler to use. The specified compiler is expected to have options consistent with the GNU C compiler. +The default is +.Sy cc . .It Ev MKDEP_CPP Specifies the preprocessor to use. The default is "${CC} -E". From owner-svn-src-all@freebsd.org Fri Dec 4 18:04:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0389AA416D1; Fri, 4 Dec 2015 18:04:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6FC517B2; Fri, 4 Dec 2015 18:04:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4I4uAN015976; Fri, 4 Dec 2015 18:04:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4I4u3w015975; Fri, 4 Dec 2015 18:04:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041804.tB4I4u3w015975@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291788 - stable/10/usr.bin/mkdep X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:04:58 -0000 Author: bdrewery Date: Fri Dec 4 18:04:56 2015 New Revision: 291788 URL: https://svnweb.freebsd.org/changeset/base/291788 Log: MFC r289872: Replace gcc reference with 'cc' and document the default ${CC}. Modified: stable/10/usr.bin/mkdep/mkdep.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mkdep/mkdep.1 ============================================================================== --- stable/10/usr.bin/mkdep/mkdep.1 Fri Dec 4 18:04:45 2015 (r291787) +++ stable/10/usr.bin/mkdep/mkdep.1 Fri Dec 4 18:04:56 2015 (r291788) @@ -28,7 +28,7 @@ .\" @(#)mkdep.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd June 6, 1993 +.Dd October 23, 2015 .Dt MKDEP 1 .Os .Sh NAME @@ -60,11 +60,13 @@ CFLAGS is the list of flags for the C co .Pp The user has the ability to change the preprocessor and preprocessor options used. -For instance, to use gcc as the preprocessor and to ignore system +For instance, to use +.Sy cc +as the preprocessor and to ignore system headers, one would use .Bd -literal -offset indent depend: - env MKDEP_CPP="gcc -E" MKDEP_CPP_OPTS=-MM mkdep \\ + env MKDEP_CPP="cc -E" MKDEP_CPP_OPTS=-MM mkdep \\ ${CFLAGS} ${SRCS} .Ed .Pp @@ -101,6 +103,8 @@ module. Specifies the C compiler to use. The specified compiler is expected to have options consistent with the GNU C compiler. +The default is +.Sy cc . .It Ev MKDEP_CPP Specifies the preprocessor to use. The default is "${CC} -E". From owner-svn-src-all@freebsd.org Fri Dec 4 18:05:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E03A2A41738; Fri, 4 Dec 2015 18:05:49 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qk0-x233.google.com (mail-qk0-x233.google.com [IPv6:2607:f8b0:400d:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 999DE193A; Fri, 4 Dec 2015 18:05:49 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by qkeg192 with SMTP id g192so816126qke.1; Fri, 04 Dec 2015 10:05:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=sSJUxXBfqwJ2VKpCHM5mBar0yGgghxMT/+XcnUjRwYw=; b=iwPQsfSRAAlqECslHSB4FA0IGWgs8vO25mJrWPl5qvis02hkXOvwWKocdX62eviSwC dRGY+UaYQemg74NjzlY28wiWEStXre6gwh8QJWfUiFpB7LtrwVqRWAiQNK9e5So41B5e mfD3YUtsc5O/bI8UQbr6tPxmiSIW3kr0jQSXBbUx2opAHL/Y9gd6vHVDCFCCKh4g+ArU el7O+EB+ImehVnKdFcCV+Hu1tEKXYZiJR+rz+OCzKxm+quhuEqKM8F1XSfCSgVGFcDD9 zuxVZR89JrhYi4M0Fbbb/1aN6G4OSRkauC+zx+ZNW1fKBtpXS7No9xg2ytpxp9haK0o+ 9BEQ== X-Received: by 10.55.24.133 with SMTP id 5mr19230361qky.31.1449252348583; Fri, 04 Dec 2015 10:05:48 -0800 (PST) Received: from mbp.home (179-125-141-122.desktop.com.br. [179.125.141.122]) by smtp.gmail.com with ESMTPSA id e10sm2982262qka.1.2015.12.04.10.05.46 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Dec 2015 10:05:47 -0800 (PST) Sender: Renato Botelho Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: svn commit: r291431 - head/sys/dev/drm2/i915 From: Renato Botelho In-Reply-To: <5661D237.80808@gmail.com> Date: Fri, 4 Dec 2015 16:05:44 -0200 Cc: =?utf-8?Q?Jean-S=C3=A9bastien_P=C3=A9dron?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <3C751928-1479-435A-8BC1-E55AC4B14D21@FreeBSD.org> References: <201511281738.tASHcRFG041033@repo.freebsd.org> <4129928E-743E-4955-B862-1DA4A5DC4E2B@FreeBSD.org> <5661D237.80808@gmail.com> To: Navdeep Parhar X-Mailer: Apple Mail (2.3096.5) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:05:50 -0000 > On Dec 4, 2015, at 15:49, Navdeep Parhar wrote: >=20 > On 12/04/2015 07:53, Renato Botelho wrote: >>> On Nov 28, 2015, at 15:38, Jean-S=C3=A9bastien P=C3=A9dron = wrote: >>>=20 >>> Author: dumbbell >>> Date: Sat Nov 28 17:38:27 2015 >>> New Revision: 291431 >>> URL: https://svnweb.freebsd.org/changeset/base/291431 >>>=20 >>> Log: >>> drm/i915: Reduce diff with Linux 3.8 >>>=20 >>> There is no functional change. The goal is to ease the future = update to >>> Linux 3.8's i915 driver. >>>=20 >>> MFC after: 2 months >>>=20 >>> Modified: >>> head/sys/dev/drm2/i915/i915_drm.h >>=20 >> After all recent changes I started to get following error when try to = kldload i915kms.ko: >>=20 >> KLD i915kms.ko: depends on drmn - not available or version mismatch >> linker_load_file: Unsupported file type >=20 > Run kldxref /boot/kernel by hand and see if that fixes it. There was = a problem with installkernel in recent head (now fixed). Problem solved. Thanks! -- Renato Botelho From owner-svn-src-all@freebsd.org Fri Dec 4 18:06:49 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F1F4A41795; Fri, 4 Dec 2015 18:06:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC3A61AA3; Fri, 4 Dec 2015 18:06:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4I6mvf016090; Fri, 4 Dec 2015 18:06:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4I6mEo016089; Fri, 4 Dec 2015 18:06:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041806.tB4I6mEo016089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291789 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:06:49 -0000 Author: bdrewery Date: Fri Dec 4 18:06:47 2015 New Revision: 291789 URL: https://svnweb.freebsd.org/changeset/base/291789 Log: MFC r289286,r291338,r291340: r289286: Follow-up r288218 by ensuring common objects are built before recursing. r291338: Fix the "common object" handling to not depend on ".o" if SRCS only contains headers. r291340: Follow-up r291338 to handle .d, .y and .l files better as well. Modified: stable/10/share/mk/bsd.progs.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.progs.mk ============================================================================== --- stable/10/share/mk/bsd.progs.mk Fri Dec 4 18:04:56 2015 (r291788) +++ stable/10/share/mk/bsd.progs.mk Fri Dec 4 18:06:47 2015 (r291789) @@ -92,6 +92,28 @@ $v = # tell progs.mk we might want to install things PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install +# Find common sources among the PROGS and depend on them before building +# anything. This allows parallelization without them each fighting over +# the same objects. +_PROGS_COMMON_SRCS= +_PROGS_ALL_SRCS= +.for p in ${PROGS} +.for s in ${SRCS.${p}} +.if ${_PROGS_ALL_SRCS:M${s}} && !${_PROGS_COMMON_SRCS:M${s}} +_PROGS_COMMON_SRCS+= ${s} +.else +_PROGS_ALL_SRCS+= ${s} +.endif +.endfor +.endfor +.if !empty(_PROGS_COMMON_SRCS) +_PROGS_COMMON_OBJS= ${_PROGS_COMMON_SRCS:M*.[dhly]} +.if !empty(_PROGS_COMMON_SRCS:N*.[dhly]) +_PROGS_COMMON_OBJS+= ${_PROGS_COMMON_SRCS:N*.[dhly]:R:S/$/.o/g} +.endif +${PROGS}: ${_PROGS_COMMON_OBJS} +.endif + .for p in ${PROGS} .if defined(PROGS_CXX) && !empty(PROGS_CXX:M$p) # bsd.prog.mk may need to know this From owner-svn-src-all@freebsd.org Fri Dec 4 18:07:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0755BA417FE; Fri, 4 Dec 2015 18:07:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C41A61C4B; Fri, 4 Dec 2015 18:07:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4I7ijC016168; Fri, 4 Dec 2015 18:07:44 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4I7ioG016167; Fri, 4 Dec 2015 18:07:44 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041807.tB4I7ioG016167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291790 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:07:46 -0000 Author: bdrewery Date: Fri Dec 4 18:07:44 2015 New Revision: 291790 URL: https://svnweb.freebsd.org/changeset/base/291790 Log: MFC r289289,r290181: r289289: Fix support for building a PROG_CXX, and PROG, directly. r290181: Unbreak bsd.progs.mk with PROGS (but not PROGS_CXX) and when invoking the "one of many" targets, e.g. `make hello_world`, where hello_world is a C program Modified: stable/10/share/mk/bsd.progs.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.progs.mk ============================================================================== --- stable/10/share/mk/bsd.progs.mk Fri Dec 4 18:06:47 2015 (r291789) +++ stable/10/share/mk/bsd.progs.mk Fri Dec 4 18:07:44 2015 (r291790) @@ -35,6 +35,9 @@ UPDATE_DEPENDFILE_PROG?= no # They may have asked us to build just one .for t in ${PROGS} .if make($t) +.if ${PROGS_CXX:U:M${t}} +PROG_CXX ?= $t +.endif PROG ?= $t .endif .endfor @@ -67,7 +70,7 @@ UPDATE_DEPENDFILE ?= NO # ensure that we don't clobber each other's dependencies DEPENDFILE?= .depend.${PROG} # prog.mk will do the rest -.else +.else # !defined(PROG) all: ${PROGS} # We cannot capture dependencies for meta mode here @@ -88,7 +91,7 @@ $v = # handle being called [bsd.]progs.mk .include -.if !empty(PROGS) && !defined(_RECURSING_PROGS) +.if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) # tell progs.mk we might want to install things PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install @@ -141,4 +144,4 @@ $p.$t: .PHONY .MAKE .for t in ${PROGS_TARGETS:O:u} $t: ${PROGS:%=%.$t} .endfor -.endif +.endif # !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) From owner-svn-src-all@freebsd.org Fri Dec 4 18:09:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F7B9A418CA; Fri, 4 Dec 2015 18:09:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 389931EC1; Fri, 4 Dec 2015 18:09:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4I9pke016374; Fri, 4 Dec 2015 18:09:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4I9pIl016373; Fri, 4 Dec 2015 18:09:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041809.tB4I9pIl016373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:09:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291791 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:09:52 -0000 Author: bdrewery Date: Fri Dec 4 18:09:51 2015 New Revision: 291791 URL: https://svnweb.freebsd.org/changeset/base/291791 Log: MFC r289669: Fix building in a directory with SUBDIRs and SUBDIR_PARALLEL. Modified: stable/10/share/mk/bsd.progs.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.progs.mk ============================================================================== --- stable/10/share/mk/bsd.progs.mk Fri Dec 4 18:07:44 2015 (r291790) +++ stable/10/share/mk/bsd.progs.mk Fri Dec 4 18:09:51 2015 (r291791) @@ -125,16 +125,18 @@ x.$p= PROG_CXX=$p # Main PROG target $p ${p}_p: .PHONY .MAKE - (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p \ + (cd ${.CURDIR} && \ + NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + PROG=$p \ DEPENDFILE=.depend.$p .MAKE.DEPENDFILE=.depend.$p \ ${x.$p}) # Pseudo targets for PROG, such as 'install'. .for t in ${PROGS_TARGETS:O:u} $p.$t: .PHONY .MAKE - (cd ${.CURDIR} && ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ - SUBDIR= PROG=$p \ + (cd ${.CURDIR} && \ + NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS= \ + PROG=$p \ DEPENDFILE=.depend.$p .MAKE.DEPENDFILE=.depend.$p \ ${x.$p} ${@:E}) .endfor From owner-svn-src-all@freebsd.org Fri Dec 4 18:14:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A4CEA419F6; Fri, 4 Dec 2015 18:14:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BD8C129B; Fri, 4 Dec 2015 18:14:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IEYub019172; Fri, 4 Dec 2015 18:14:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IEVgL019140; Fri, 4 Dec 2015 18:14:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041814.tB4IEVgL019140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291792 - in stable/10: bin/sh/tests cddl etc/periodic gnu gnu/lib gnu/usr.bin/cc gnu/usr.bin/groff gnu/usr.bin/rcs include lib/libiconv_modules secure secure/libexec secure/usr.bin sec... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:14:35 -0000 Author: bdrewery Date: Fri Dec 4 18:14:31 2015 New Revision: 291792 URL: https://svnweb.freebsd.org/changeset/base/291792 Log: MFC r289393: Add more SUBDIR_PARALLEL. Modified: stable/10/bin/sh/tests/Makefile stable/10/cddl/Makefile stable/10/etc/periodic/Makefile stable/10/gnu/Makefile stable/10/gnu/lib/Makefile stable/10/gnu/usr.bin/cc/Makefile stable/10/gnu/usr.bin/groff/Makefile stable/10/gnu/usr.bin/rcs/Makefile stable/10/include/Makefile stable/10/lib/libiconv_modules/Makefile stable/10/secure/Makefile stable/10/secure/libexec/Makefile stable/10/secure/usr.bin/Makefile stable/10/secure/usr.sbin/Makefile stable/10/share/Makefile stable/10/share/doc/Makefile stable/10/share/doc/legal/Makefile stable/10/share/doc/papers/Makefile stable/10/share/doc/psd/Makefile stable/10/share/doc/smm/Makefile stable/10/share/doc/usd/Makefile stable/10/share/examples/Makefile stable/10/share/i18n/Makefile stable/10/share/i18n/csmapper/Makefile stable/10/share/i18n/esdb/Makefile stable/10/share/man/Makefile stable/10/share/syscons/Makefile stable/10/tests/Makefile stable/10/tests/sys/Makefile stable/10/tests/sys/pjdfstest/Makefile stable/10/tests/sys/pjdfstest/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/sh/tests/Makefile ============================================================================== --- stable/10/bin/sh/tests/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/bin/sh/tests/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -12,4 +12,6 @@ TESTS_SUBDIRS+= parameters TESTS_SUBDIRS+= parser TESTS_SUBDIRS+= set-e +SUBDIR_PARALLEL= + .include Modified: stable/10/cddl/Makefile ============================================================================== --- stable/10/cddl/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/cddl/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -2,10 +2,13 @@ .include -SUBDIR= lib sbin usr.bin usr.sbin +SUBDIR= lib .WAIT \ + sbin usr.bin usr.sbin .if ${MK_TESTS} != "no" SUBDIR+=tests .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/etc/periodic/Makefile ============================================================================== --- stable/10/etc/periodic/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/etc/periodic/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -1,5 +1,6 @@ # $FreeBSD$ SUBDIR= daily security weekly monthly +SUBDIR_PARALLEL= .include Modified: stable/10/gnu/Makefile ============================================================================== --- stable/10/gnu/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/gnu/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -3,10 +3,13 @@ .include -SUBDIR= lib ${_tests} usr.bin +SUBDIR= lib .WAIT \ + ${_tests} usr.bin .if ${MK_TESTS} != "no" _tests= tests .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/gnu/lib/Makefile ============================================================================== --- stable/10/gnu/lib/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/gnu/lib/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -16,6 +16,9 @@ SUBDIR+= tests # have taken care of that already. .if ${MK_GNUCXX} != "no" SUBDIR+= libstdc++ libsupc++ +SUBDIR_DEPENDS_libsupc++:= libstdc++ .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/gnu/usr.bin/cc/Makefile ============================================================================== --- stable/10/gnu/usr.bin/cc/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/gnu/usr.bin/cc/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -5,7 +5,8 @@ # The order of some of these are rather important. Some depend on previous # subdirs. -SUBDIR= cc_tools libiberty libcpp libdecnumber cc_int cc cc1 include doc +SUBDIR= cc_tools .WAIT \ + libiberty libcpp libdecnumber cc_int cc cc1 include doc .if ${MK_CPP} != "no" SUBDIR+= cpp @@ -24,4 +25,13 @@ SUBDIR+= c++filt SUBDIR+= gcov .endif +SUBDIR_DEPEND_c++:= libcpp libiberty +SUBDIR_DEPEND_cc= libcpp libiberty +SUBDIR_DEPEND_cpp= libcpp libiberty +SUBDIR_DEPEND_cc1plus= cc_int libcpp libdecnumber libiberty +SUBDIR_DEPEND_cc1= cc_int libcpp libdecnumber libiberty +SUBDIR_DEPEND_gcov= libiberty + +SUBDIR_PARALLEL= + .include Modified: stable/10/gnu/usr.bin/groff/Makefile ============================================================================== --- stable/10/gnu/usr.bin/groff/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/gnu/usr.bin/groff/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -6,4 +6,6 @@ SUBDIR= contrib doc font man src tmac SUBDIR_DEPEND_${subdir}= src .endfor +SUBDIR_PARALLEL= + .include Modified: stable/10/gnu/usr.bin/rcs/Makefile ============================================================================== --- stable/10/gnu/usr.bin/rcs/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/gnu/usr.bin/rcs/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -1,3 +1,7 @@ -SUBDIR= lib ci co ident merge rcs rcsclean rcsdiff rcsmerge rlog rcsfreeze +# $FreeBSD$ + +SUBDIR= lib .WAIT \ + ci co ident merge rcs rcsclean rcsdiff rcsmerge rlog rcsfreeze +SUBDIR_PARALLEL= .include Modified: stable/10/include/Makefile ============================================================================== --- stable/10/include/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/include/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -7,6 +7,7 @@ CLEANFILES= osreldate.h version vers.c SUBDIR= arpa protocols rpcsvc rpc xlocale +SUBDIR_PARALLEL= INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h _ctype.h ctype.h \ db.h \ dirent.h dlfcn.h elf.h elf-hints.h err.h fmtmsg.h fnmatch.h fstab.h \ Modified: stable/10/lib/libiconv_modules/Makefile ============================================================================== --- stable/10/lib/libiconv_modules/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/lib/libiconv_modules/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -5,5 +5,6 @@ SUBDIR= BIG5 DECHanyu EUC EUCTW GBK2K HZ ISO2022 JOHAB MSKanji UES UTF1632 \ UTF7 UTF8 VIQR ZW iconv_none iconv_std mapper_646 mapper_none \ mapper_parallel mapper_serial mapper_std mapper_zone +SUBDIR_PARALLEL= .include Modified: stable/10/secure/Makefile ============================================================================== --- stable/10/secure/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/secure/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -2,7 +2,9 @@ .include -SUBDIR= lib libexec ${_tests} usr.bin usr.sbin +SUBDIR= lib .WAIT \ + libexec ${_tests} usr.bin usr.sbin +SUBDIR_PARALLEL= .if ${MK_TESTS} != "no" _tests= tests Modified: stable/10/secure/libexec/Makefile ============================================================================== --- stable/10/secure/libexec/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/secure/libexec/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -11,4 +11,6 @@ SUBDIR+=sftp-server ssh-keysign ssh-pkcs SUBDIR+=tests .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/secure/usr.bin/Makefile ============================================================================== --- stable/10/secure/usr.bin/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/secure/usr.bin/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -14,4 +14,6 @@ SUBDIR+=scp sftp ssh ssh-add ssh-agent s SUBDIR+=tests .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/secure/usr.sbin/Makefile ============================================================================== --- stable/10/secure/usr.sbin/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/secure/usr.sbin/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -11,4 +11,6 @@ SUBDIR+=sshd SUBDIR+=tests .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/share/Makefile ============================================================================== --- stable/10/share/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -98,4 +98,6 @@ _vt= vt _zoneinfo= zoneinfo .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/share/doc/Makefile ============================================================================== --- stable/10/share/doc/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/doc/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -28,6 +28,8 @@ _IPv6= IPv6 _roffdocs= papers psd smm usd .endif +SUBDIR_PARALLEL= + # Default output format for troff documents is ascii. # To generate postscript versions of troff documents, use: # make PRINTERDEVICE=ps Modified: stable/10/share/doc/legal/Makefile ============================================================================== --- stable/10/share/doc/legal/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/doc/legal/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -6,4 +6,6 @@ SUBDIR= intel_ipw \ intel_wpi \ realtek +SUBDIR_PARALLEL= + .include Modified: stable/10/share/doc/papers/Makefile ============================================================================== --- stable/10/share/doc/papers/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/doc/papers/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -16,4 +16,6 @@ SUBDIR= beyond4.3 \ sysperf \ timecounter +SUBDIR_PARALLEL= + .include Modified: stable/10/share/doc/psd/Makefile ============================================================================== --- stable/10/share/doc/psd/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/doc/psd/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -37,4 +37,6 @@ SUBDIR+=22.rpcgen \ 26.rpcrfc \ 27.nfsrpc +SUBDIR_PARALLEL= + .include Modified: stable/10/share/doc/smm/Makefile ============================================================================== --- stable/10/share/doc/smm/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/doc/smm/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -32,4 +32,6 @@ _08.sendmailop= 08.sendmailop _07.lpd= 07.lpd .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/share/doc/usd/Makefile ============================================================================== --- stable/10/share/doc/usd/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/doc/usd/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -19,5 +19,6 @@ SUBDIR= title \ 20.meref \ 21.troff \ 22.trofftut +SUBDIR_PARALLEL= .include Modified: stable/10/share/examples/Makefile ============================================================================== --- stable/10/share/examples/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/examples/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -261,4 +261,6 @@ SUBDIR+=pf SUBDIR+=tests .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/share/i18n/Makefile ============================================================================== --- stable/10/share/i18n/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/i18n/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -4,5 +4,6 @@ .include SUBDIR= csmapper esdb +SUBDIR_PARALLEL= .include Modified: stable/10/share/i18n/csmapper/Makefile ============================================================================== --- stable/10/share/i18n/csmapper/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/i18n/csmapper/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -5,6 +5,7 @@ FILESDIR= ${CSMAPPERDIR} SUBDIR= APPLE AST BIG5 CNS CP EBCDIC GB GEORGIAN ISO646 ISO-8859 JIS \ KAZAKH KOI KS MISC TCVN +SUBDIR_PARALLEL= mapper.dir: ${SUBDIR} newfile=$$(for i in ${SUBDIR}; do \ Modified: stable/10/share/i18n/esdb/Makefile ============================================================================== --- stable/10/share/i18n/esdb/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/i18n/esdb/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -5,6 +5,7 @@ FILESDIR= ${ESDBDIR} SUBDIR= APPLE AST BIG5 CP DEC EUC EBCDIC GB GEORGIAN ISO-2022 ISO-8859 \ ISO646 KAZAKH KOI MISC TCVN UTF +SUBDIR_PARALLEL= FILES+= esdb.dir esdb.dir.db esdb.alias esdb.alias.db CLEANFILES= ${FILES} Modified: stable/10/share/man/Makefile ============================================================================== --- stable/10/share/man/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/man/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -5,6 +5,7 @@ # XXX MISSING: man3f SUBDIR= man1 man3 man4 man5 man6 man7 man8 man9 +SUBDIR_PARALLEL= MAKEWHATIS?= makewhatis Modified: stable/10/share/syscons/Makefile ============================================================================== --- stable/10/share/syscons/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/share/syscons/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -1,5 +1,6 @@ # $FreeBSD$ SUBDIR= fonts keymaps scrnmaps +SUBDIR_PARALLEL= .include Modified: stable/10/tests/Makefile ============================================================================== --- stable/10/tests/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/tests/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -4,6 +4,7 @@ SUBDIR+= etc SUBDIR+= sys +SUBDIR_PARALLEL= TESTSDIR= ${TESTSBASE} KYUAFILE= yes Modified: stable/10/tests/sys/Makefile ============================================================================== --- stable/10/tests/sys/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/tests/sys/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -19,4 +19,6 @@ TESTS_SUBDIRS+= vm # Items not integrated into kyua runs by default SUBDIR+= pjdfstest +SUBDIR_PARALLEL= + .include Modified: stable/10/tests/sys/pjdfstest/Makefile ============================================================================== --- stable/10/tests/sys/pjdfstest/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/tests/sys/pjdfstest/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -2,5 +2,6 @@ SUBDIR+= pjdfstest SUBDIR+= tests +SUBDIR_PARALLEL= .include Modified: stable/10/tests/sys/pjdfstest/tests/Makefile ============================================================================== --- stable/10/tests/sys/pjdfstest/tests/Makefile Fri Dec 4 18:09:51 2015 (r291791) +++ stable/10/tests/sys/pjdfstest/tests/Makefile Fri Dec 4 18:14:31 2015 (r291792) @@ -36,4 +36,6 @@ TESTS_SUBDIRS+= symlink TESTS_SUBDIRS+= truncate TESTS_SUBDIRS+= unlink +SUBDIR_PARALLEL= + .include From owner-svn-src-all@freebsd.org Fri Dec 4 18:20:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74099A41A80; Fri, 4 Dec 2015 18:20:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 56E731508; Fri, 4 Dec 2015 18:20:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 5023E17EE; Fri, 4 Dec 2015 18:20:26 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id F2FE118924; Fri, 4 Dec 2015 18:20:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id lpUQxnUq27UM; Fri, 4 Dec 2015 18:20:22 +0000 (UTC) Subject: Re: svn commit: r291744 - in head/sys: conf modules DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 6E8EC1891B To: John Baldwin References: <201512040427.tB44RL8S067654@repo.freebsd.org> <2092924.RITcBJdNZd@ralph.baldwin.cx> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5661D967.2030108@FreeBSD.org> Date: Fri, 4 Dec 2015 10:20:23 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <2092924.RITcBJdNZd@ralph.baldwin.cx> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C4OQN3JHRU0f2UxXhPgF8fHbG3N5NPqn5" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:20:26 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --C4OQN3JHRU0f2UxXhPgF8fHbG3N5NPqn5 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 12/4/2015 9:50 AM, John Baldwin wrote: > On Friday, December 04, 2015 04:27:21 AM Bryan Drewery wrote: >> Author: bdrewery >> Date: Fri Dec 4 04:27:21 2015 >> New Revision: 291744 >> URL: https://svnweb.freebsd.org/changeset/base/291744 >> >> Log: >> Calculate MPATH for sys/modules to save 92% time in a basic 'obj' tr= ee-walk. >> =20 >> Sponsored by: EMC / Isilon Storage Division >> >> Modified: >> head/sys/conf/kmod.mk >> head/sys/modules/Makefile >> >> Modified: head/sys/conf/kmod.mk >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D >> --- head/sys/conf/kmod.mk Fri Dec 4 03:54:18 2015 (r291743) >> +++ head/sys/conf/kmod.mk Fri Dec 4 04:27:21 2015 (r291744) >> @@ -370,8 +370,10 @@ vnode_if_typedef.h: >> .endif >> =20 >> # Build _if.[ch] from _if.m, and clean them when we're done. >> +# This is duplicated in sys/modules/Makefile. >> .if !defined(__MPATH) >> __MPATH!=3Dfind ${SYSDIR:tA}/ -name \*_if.m >> +.export __MPATH >> .endif >> _MFILES=3D${__MPATH:T:O} >> _MPATH=3D${__MPATH:H:O:u} >=20 > It's also duplicated in sys/conf/kern.pre.mk which uses this to export = it: >=20 > # Calculate path for .m files early, if needed. > .if !defined(__MPATH) > __MPATH!=3Dfind ${S:tA}/ -name \*_if.m > .endif > .... > MKMODULESENV+=3D __MPATH=3D"${__MPATH}" >=20 Ah. I do want to consolidate this logic. Further I want to only generate these files *ONCE* and not for every sub-directory that needs them. It's on my list to tackle soon. I'll put that one out for review. > So, the comment should probably reference the two other places that wil= l pass > an __MPATH down (kern.pre.mk and sys/modules/Makefile). >=20 > Note though that you should only be seeing this if you are building mod= ules > outside of a kernel build (e.g. MODULES_WITH_WORLD). modules built as = part of > a kernel build will inherit __MPATH from kern.pre.mk. >=20 > When I ran a buildkernel with truss -af and grepp'd for all the execve'= s of > /usr/bin/find I only found about 6 for a GENERIC kernel, so I believe t= hat > the kern.pre.mk bits were working already. >=20 I've been running a lot of manual builds against sys/modules to verify various changes. I actually have not been running buildworld much lately.= --=20 Regards, Bryan Drewery --C4OQN3JHRU0f2UxXhPgF8fHbG3N5NPqn5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWYdlnAAoJEDXXcbtuRpfP7okIAKtWVMYJgGCMViWih+YM9ZpV 0nRn7jT4qsog+Eli7A+86XgmAYMlsZvrJvxexPMGwL3mIjeqL7yed7VI44450NjQ RlPbBgxOjUKGxnEiP8F+oO4RbuNRr70XIDW3vPkOPVp+bz7phnXkQYPVFhR0hYBi PPHH8KKBOOXGZvoQNHXuc/xqSrlHCIjGwPomnKeXolrAIjMnSCe7juMKspizui5c OLB/qxuAVY+Wt31llKkhQ+j/OFq+00K/c9OfN3bZt4giYI93kTd9AcnMP+7tnYd1 +9nWEng+2QgtYpKg8Zj139kBCP3yw016y2EpgWIxCn4g35qgaKGmw2VLtjY3bgI= =5w1l -----END PGP SIGNATURE----- --C4OQN3JHRU0f2UxXhPgF8fHbG3N5NPqn5-- From owner-svn-src-all@freebsd.org Fri Dec 4 18:20:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E515A41AD4; Fri, 4 Dec 2015 18:20:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AFED18A2; Fri, 4 Dec 2015 18:20:56 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IKtbw019426; Fri, 4 Dec 2015 18:20:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IKtnP019424; Fri, 4 Dec 2015 18:20:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201512041820.tB4IKtnP019424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 4 Dec 2015 18:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291793 - in head/sys/ofed: drivers/net/mlx4 include/linux/mlx4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:20:56 -0000 Author: hselasky Date: Fri Dec 4 18:20:55 2015 New Revision: 291793 URL: https://svnweb.freebsd.org/changeset/base/291793 Log: Fix i386 build WITH_OFED=YES. Remove some redundant KASSERTs. Suggested by: kib, ian Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/ofed/drivers/net/mlx4/en_rx.c head/sys/ofed/include/linux/mlx4/doorbell.h Modified: head/sys/ofed/drivers/net/mlx4/en_rx.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_rx.c Fri Dec 4 18:14:31 2015 (r291792) +++ head/sys/ofed/drivers/net/mlx4/en_rx.c Fri Dec 4 18:20:55 2015 (r291793) @@ -96,8 +96,6 @@ mlx4_en_alloc_buf(struct mlx4_en_rx_ring m_freem(mb); return (err); } - KASSERT(nsegs == 1, - ("Number of segments is expected to be one")); /* store spare info */ ring->spare.mbuf = mb; @@ -127,7 +125,6 @@ mlx4_en_alloc_buf(struct mlx4_en_rx_ring m_freem(mb); goto use_spare; } - KASSERT(nsegs == 1, ("Number of segments is expected to be one")); *pdma = cpu_to_be64(segs[0].ds_addr); mb_list->mbuf = mb; Modified: head/sys/ofed/include/linux/mlx4/doorbell.h ============================================================================== --- head/sys/ofed/include/linux/mlx4/doorbell.h Fri Dec 4 18:14:31 2015 (r291792) +++ head/sys/ofed/include/linux/mlx4/doorbell.h Fri Dec 4 18:20:55 2015 (r291793) @@ -77,7 +77,7 @@ static inline void mlx4_write64(__be32 v spin_lock_irqsave(doorbell_lock, flags); __raw_writel((__force u32) val[0], dest); - __raw_writel((__force u32) val[1], dest + 4); + __raw_writel((__force u32) val[1], (u8 *)dest + 4); spin_unlock_irqrestore(doorbell_lock, flags); } From owner-svn-src-all@freebsd.org Fri Dec 4 18:21:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 890C9A41B0C; Fri, 4 Dec 2015 18:21:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 629241A06; Fri, 4 Dec 2015 18:21:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IL7Ew019495; Fri, 4 Dec 2015 18:21:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IL5if019477; Fri, 4 Dec 2015 18:21:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041821.tB4IL5if019477@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291794 - in stable/10: etc sbin/atm/atmconfig share/colldef share/examples/smbfs share/examples/smbfs/print share/keys/pkg/trusted share/mklocale share/monetdef share/msgdef share/nume... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:21:08 -0000 Author: bdrewery Date: Fri Dec 4 18:21:05 2015 New Revision: 291794 URL: https://svnweb.freebsd.org/changeset/base/291794 Log: MFC r290083: Use more appropriate ${SHAREDIR} rather than /usr/share. Modified: stable/10/etc/Makefile stable/10/sbin/atm/atmconfig/Makefile stable/10/share/colldef/Makefile stable/10/share/examples/smbfs/Makefile stable/10/share/examples/smbfs/print/Makefile stable/10/share/keys/pkg/trusted/Makefile stable/10/share/mklocale/Makefile stable/10/share/monetdef/Makefile stable/10/share/msgdef/Makefile stable/10/share/numericdef/Makefile stable/10/share/sendmail/Makefile stable/10/share/skel/Makefile stable/10/share/timedef/Makefile stable/10/usr.bin/vi/catalog/Makefile stable/10/usr.sbin/ndiscvt/Makefile stable/10/usr.sbin/zic/zdump/Makefile stable/10/usr.sbin/zic/zic/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/etc/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -378,26 +378,26 @@ distrib-dirs: ${MTREES:N/*} .endif ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys .if ${MK_MAN} != "no" - cd ${DESTDIR}/usr/share/man; \ + cd ${DESTDIR}${SHAREDIR}/man; \ for mandir in man*; do \ ${INSTALL_SYMLINK} ../$$mandir \ - ${DESTDIR}/usr/share/man/en.ISO8859-1/; \ + ${DESTDIR}${SHAREDIR}/man/en.ISO8859-1/; \ ${INSTALL_SYMLINK} ../$$mandir \ - ${DESTDIR}/usr/share/man/en.UTF-8/; \ + ${DESTDIR}${SHAREDIR}/man/en.UTF-8/; \ done .if ${MK_OPENSSL} != "no" - cd ${DESTDIR}/usr/share/openssl/man; \ + cd ${DESTDIR}${SHAREDIR}/openssl/man; \ for mandir in man*; do \ ${INSTALL_SYMLINK} ../$$mandir \ - ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \ + ${DESTDIR}${SHAREDIR}/openssl/man/en.ISO8859-1/; \ done .endif set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ while [ $$# -gt 0 ] ; do \ - ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \ + ${INSTALL_SYMLINK} "$$2" "${DESTDIR}${SHAREDIR}/man/$$1"; \ if [ "${MK_OPENSSL}" != "no" ]; then \ ${INSTALL_SYMLINK} "$$2" \ - "${DESTDIR}/usr/share/openssl/man/$$1"; \ + "${DESTDIR}${SHAREDIR}/openssl/man/$$1"; \ fi; \ shift; shift; \ done @@ -405,7 +405,7 @@ distrib-dirs: ${MTREES:N/*} .if ${MK_NLS} != "no" set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ while [ $$# -gt 0 ] ; do \ - ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \ + ${INSTALL_SYMLINK} "$$2" "${DESTDIR}${SHAREDIR}/nls/$$1"; \ shift; shift; \ done .endif @@ -413,8 +413,8 @@ distrib-dirs: ${MTREES:N/*} etc-examples: cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${BIN1} ${BIN2} nsmb.conf opieaccess \ - ${DESTDIR}/usr/share/examples/etc + ${DESTDIR}${SHAREDIR}/examples/etc ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install \ - DESTDIR=${DESTDIR}/usr/share/examples + DESTDIR=${DESTDIR}${SHAREDIR}/examples .include Modified: stable/10/sbin/atm/atmconfig/Makefile ============================================================================== --- stable/10/sbin/atm/atmconfig/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/sbin/atm/atmconfig/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -10,7 +10,7 @@ PROG= atmconfig SRCS= main.c diag.c natm.c MAN= atmconfig.8 -# CFLAGS+= -DPATH_HELP='".:/usr/share/doc/atm:/usr/local/share/doc/atm"' +# CFLAGS+= -DPATH_HELP='".:${SHAREDIR}/doc/atm:/usr/local/share/doc/atm"' CFLAGS+= -I${.OBJDIR} @@ -33,7 +33,7 @@ WARNS?= 3 .endif FILES= atmconfig.help atmconfig_device.help -FILESDIR= /usr/share/doc/atm +FILESDIR= ${SHAREDIR}/doc/atm SNMP_ATM_DEF= ${.CURDIR}/../../../contrib/ngatm/snmp_atm/atm_tree.def \ ${.CURDIR}/../../../usr.sbin/bsnmpd/modules/snmp_atm/atm_freebsd.def Modified: stable/10/share/colldef/Makefile ============================================================================== --- stable/10/share/colldef/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/share/colldef/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -42,7 +42,7 @@ LOCALES= bg_BG.CP1251 \ uk_UA.ISO8859-5 \ uk_UA.KOI8-U -LOCALEDIR= /usr/share/locale +LOCALEDIR= ${SHAREDIR}/locale .SUFFIXES: .src .out Modified: stable/10/share/examples/smbfs/Makefile ============================================================================== --- stable/10/share/examples/smbfs/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/share/examples/smbfs/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -1,7 +1,7 @@ # $FreeBSD$ NO_OBJ= -BINDIR= /usr/share/examples/smbfs +FILESDIR= ${SHAREDIR}/examples/smbfs FILES= dot.nsmbrc .PATH: ${.CURDIR}/../../../contrib/smbfs/examples Modified: stable/10/share/examples/smbfs/print/Makefile ============================================================================== --- stable/10/share/examples/smbfs/print/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/share/examples/smbfs/print/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -1,7 +1,7 @@ # $FreeBSD$ NO_OBJ= -BINDIR= /usr/share/examples/smbfs/print +FILESDIR= ${SHAREDIR}/examples/smbfs/print FILES= lj6l ljspool printcap.sample tolj .PATH: ${.CURDIR}/../../../../contrib/smbfs/examples/print Modified: stable/10/share/keys/pkg/trusted/Makefile ============================================================================== --- stable/10/share/keys/pkg/trusted/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/share/keys/pkg/trusted/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -4,7 +4,7 @@ NO_OBJ= FILES= pkg.freebsd.org.2013102301 -FILESDIR= /usr/share/keys/pkg/trusted +FILESDIR= ${SHAREDIR}/keys/pkg/trusted FILESMODE= 644 .include Modified: stable/10/share/mklocale/Makefile ============================================================================== --- stable/10/share/mklocale/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/share/mklocale/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -30,7 +30,7 @@ LOCALES= UTF-8 \ zh_HK.Big5HKSCS \ zh_TW.Big5 -LOCALEDIR= /usr/share/locale +LOCALEDIR= ${SHAREDIR}/locale .SUFFIXES: .src .out Modified: stable/10/share/monetdef/Makefile ============================================================================== --- stable/10/share/monetdef/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/share/monetdef/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -90,7 +90,7 @@ LOCALES= af_ZA.ISO8859-1 \ zh_HK.UTF-8 \ zh_TW.Big5 -LOCALEDIR= /usr/share/locale +LOCALEDIR= ${SHAREDIR}/locale .SUFFIXES: .src .out Modified: stable/10/share/msgdef/Makefile ============================================================================== --- stable/10/share/msgdef/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/share/msgdef/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -70,7 +70,7 @@ LOCALES= af_ZA.ISO8859-1 \ zh_TW.Big5 \ zh_TW.UTF-8 -LOCALEDIR= /usr/share/locale +LOCALEDIR= ${SHAREDIR}/locale .SUFFIXES: .src .out Modified: stable/10/share/numericdef/Makefile ============================================================================== --- stable/10/share/numericdef/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/share/numericdef/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -44,7 +44,7 @@ LOCALES= af_ZA.ISO8859-1 \ uk_UA.KOI8-U \ zh_CN.eucCN -LOCALEDIR= /usr/share/locale +LOCALEDIR= ${SHAREDIR}/locale .SUFFIXES: .src .out Modified: stable/10/share/sendmail/Makefile ============================================================================== --- stable/10/share/sendmail/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/share/sendmail/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -7,7 +7,7 @@ CFDIR= cf CFDIRS!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type d -print) CFFILES!= (cd ${SENDMAIL_DIR}; find -L ${CFDIR} \( \( -name CVS -o -name .svn \) -prune \) -o -type f -print) -DDIR= ${DESTDIR}/usr/share/sendmail +DDIR= ${DESTDIR}${SHAREDIR}/sendmail NO_OBJ= Modified: stable/10/share/skel/Makefile ============================================================================== --- stable/10/share/skel/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/share/skel/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -5,8 +5,8 @@ FILESGROUPS= FILES1 FILES2 FILES1= dot.cshrc dot.login dot.login_conf dot.mailrc dot.profile \ dot.shrc FILES2= dot.mail_aliases dot.rhosts -FILES1DIR= /usr/share/skel -FILES2DIR= /usr/share/skel +FILES1DIR= ${SHAREDIR}/skel +FILES2DIR= ${SHAREDIR}/skel FILES1MODE= 0644 FILES2MODE= 0600 NO_OBJ= Modified: stable/10/share/timedef/Makefile ============================================================================== --- stable/10/share/timedef/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/share/timedef/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -96,7 +96,7 @@ LOCALES= am_ET.UTF-8 \ zh_TW.Big5 \ zh_TW.UTF-8 -LOCALEDIR= /usr/share/locale +LOCALEDIR= ${SHAREDIR}/locale .SUFFIXES: .src .out Modified: stable/10/usr.bin/vi/catalog/Makefile ============================================================================== --- stable/10/usr.bin/vi/catalog/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/usr.bin/vi/catalog/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -115,7 +115,7 @@ SVLINKS= sv_SE PLLINKS= pl_PL FILES= ${CATALOGS} -FILESDIR= /usr/share/vi/catalog +FILESDIR= ${SHAREDIR}/vi/catalog SYMLINKS= .for l in ${NLLINKS} SYMLINKS+= dutch ${FILESDIR}/$l.ISO8859-1 Modified: stable/10/usr.sbin/ndiscvt/Makefile ============================================================================== --- stable/10/usr.sbin/ndiscvt/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/usr.sbin/ndiscvt/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -24,7 +24,7 @@ CLEANFILES= y.output FILES= windrv_stub.c FILESNAME= windrv_stub.c -FILESDIR= /usr/share/misc +FILESDIR= ${SHAREDIR}/misc SCRIPTS= ndisgen.sh Modified: stable/10/usr.sbin/zic/zdump/Makefile ============================================================================== --- stable/10/usr.sbin/zic/zdump/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/usr.sbin/zic/zdump/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -7,7 +7,7 @@ MAN= zdump.8 SRCS= zdump.c ialloc.c scheck.c CFLAGS+= -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DSTD_INSPIRED -DPCTS -CFLAGS+= -DHAVE_LONG_DOUBLE -DTZDIR=\"/usr/share/zoneinfo\" -Demkdir=mkdir +CFLAGS+= -DHAVE_LONG_DOUBLE -DTZDIR=\"${SHAREDIR}/zoneinfo\" -Demkdir=mkdir CFLAGS+= -I${.CURDIR}/.. -I${.CURDIR}/../../../contrib/tzcode/stdtime WARNS?= 2 Modified: stable/10/usr.sbin/zic/zic/Makefile ============================================================================== --- stable/10/usr.sbin/zic/zic/Makefile Fri Dec 4 18:20:55 2015 (r291793) +++ stable/10/usr.sbin/zic/zic/Makefile Fri Dec 4 18:21:05 2015 (r291794) @@ -7,7 +7,7 @@ MAN= zic.8 SRCS= zic.c ialloc.c scheck.c CFLAGS+= -DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone -DSTD_INSPIRED -DPCTS -CFLAGS+= -DHAVE_LONG_DOUBLE -DTZDIR=\"/usr/share/zoneinfo\" -Demkdir=mkdir +CFLAGS+= -DHAVE_LONG_DOUBLE -DTZDIR=\"${SHAREDIR}/zoneinfo\" -Demkdir=mkdir CFLAGS+= -DHAVE_STRERROR -DHAVE_UNISTD_H CFLAGS+= -I${.CURDIR}/.. -I${.CURDIR}/../../../contrib/tzcode/stdtime From owner-svn-src-all@freebsd.org Fri Dec 4 18:22:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D16DA41C54; Fri, 4 Dec 2015 18:22:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67BF71CA0; Fri, 4 Dec 2015 18:22:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IMVf6022151; Fri, 4 Dec 2015 18:22:31 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IMVEj022150; Fri, 4 Dec 2015 18:22:31 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041822.tB4IMVEj022150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:22:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291795 - stable/10/usr.sbin/ndiscvt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:22:32 -0000 Author: bdrewery Date: Fri Dec 4 18:22:31 2015 New Revision: 291795 URL: https://svnweb.freebsd.org/changeset/base/291795 Log: MFC r290084: Remove unneeded NAME override. Modified: stable/10/usr.sbin/ndiscvt/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ndiscvt/Makefile ============================================================================== --- stable/10/usr.sbin/ndiscvt/Makefile Fri Dec 4 18:21:05 2015 (r291794) +++ stable/10/usr.sbin/ndiscvt/Makefile Fri Dec 4 18:22:31 2015 (r291795) @@ -23,7 +23,6 @@ CFLAGS+=-I. -I${.CURDIR} -I${.CURDIR}/.. CLEANFILES= y.output FILES= windrv_stub.c -FILESNAME= windrv_stub.c FILESDIR= ${SHAREDIR}/misc SCRIPTS= ndisgen.sh From owner-svn-src-all@freebsd.org Fri Dec 4 18:22:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1245AA41C9C; Fri, 4 Dec 2015 18:22:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D30021DF2; Fri, 4 Dec 2015 18:22:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IMsEC022208; Fri, 4 Dec 2015 18:22:54 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IMsMp022207; Fri, 4 Dec 2015 18:22:54 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041822.tB4IMsMp022207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291796 - stable/9/usr.sbin/ndiscvt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:22:56 -0000 Author: bdrewery Date: Fri Dec 4 18:22:54 2015 New Revision: 291796 URL: https://svnweb.freebsd.org/changeset/base/291796 Log: MFC r290084: Remove unneeded NAME override. Modified: stable/9/usr.sbin/ndiscvt/Makefile Directory Properties: stable/9/usr.sbin/ndiscvt/ (props changed) Modified: stable/9/usr.sbin/ndiscvt/Makefile ============================================================================== --- stable/9/usr.sbin/ndiscvt/Makefile Fri Dec 4 18:22:31 2015 (r291795) +++ stable/9/usr.sbin/ndiscvt/Makefile Fri Dec 4 18:22:54 2015 (r291796) @@ -23,7 +23,6 @@ CFLAGS+=-I. -I${.CURDIR} -I${.CURDIR}/.. CLEANFILES= y.output FILES= windrv_stub.c -FILESNAME= windrv_stub.c FILESDIR= /usr/share/misc SCRIPTS= ndisgen.sh From owner-svn-src-all@freebsd.org Fri Dec 4 18:23:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8357DA41D20; Fri, 4 Dec 2015 18:23:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 511411FBF; Fri, 4 Dec 2015 18:23:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4INY4u022280; Fri, 4 Dec 2015 18:23:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4INYxS022279; Fri, 4 Dec 2015 18:23:34 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041823.tB4INYxS022279@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:23:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291797 - stable/10/sys/dev/filemon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:23:35 -0000 Author: bdrewery Date: Fri Dec 4 18:23:34 2015 New Revision: 291797 URL: https://svnweb.freebsd.org/changeset/base/291797 Log: MFC r290374: Remove unneeded mutex.h include, missed in r287155. Modified: stable/10/sys/dev/filemon/filemon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/filemon/filemon.c ============================================================================== --- stable/10/sys/dev/filemon/filemon.c Fri Dec 4 18:22:54 2015 (r291796) +++ stable/10/sys/dev/filemon/filemon.c Fri Dec 4 18:23:34 2015 (r291797) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-all@freebsd.org Fri Dec 4 18:23:51 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCAF9A41D8C; Fri, 4 Dec 2015 18:23:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB20D111A; Fri, 4 Dec 2015 18:23:51 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4INoi7022331; Fri, 4 Dec 2015 18:23:50 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4INolF022330; Fri, 4 Dec 2015 18:23:50 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041823.tB4INolF022330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:23:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291798 - stable/9/sys/dev/filemon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:23:52 -0000 Author: bdrewery Date: Fri Dec 4 18:23:50 2015 New Revision: 291798 URL: https://svnweb.freebsd.org/changeset/base/291798 Log: MFC r290374: Remove unneeded mutex.h include, missed in r287155. Modified: stable/9/sys/dev/filemon/filemon.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/filemon/filemon.c ============================================================================== --- stable/9/sys/dev/filemon/filemon.c Fri Dec 4 18:23:34 2015 (r291797) +++ stable/9/sys/dev/filemon/filemon.c Fri Dec 4 18:23:50 2015 (r291798) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include From owner-svn-src-all@freebsd.org Fri Dec 4 18:24:48 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD5AEA41DFF; Fri, 4 Dec 2015 18:24:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76EE012C5; Fri, 4 Dec 2015 18:24:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IOlgO022407; Fri, 4 Dec 2015 18:24:47 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IOlFE022406; Fri, 4 Dec 2015 18:24:47 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041824.tB4IOlFE022406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:24:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291799 - stable/10/lib/libc/iconv X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:24:48 -0000 Author: bdrewery Date: Fri Dec 4 18:24:47 2015 New Revision: 291799 URL: https://svnweb.freebsd.org/changeset/base/291799 Log: MFC r290169: Use memmove(3) to avoid overlapping copy. Modified: stable/10/lib/libc/iconv/citrus_esdb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/iconv/citrus_esdb.c ============================================================================== --- stable/10/lib/libc/iconv/citrus_esdb.c Fri Dec 4 18:23:50 2015 (r291798) +++ stable/10/lib/libc/iconv/citrus_esdb.c Fri Dec 4 18:24:47 2015 (r291799) @@ -328,7 +328,7 @@ _citrus_esdb_get_list(char ***rlist, siz (int)_region_size(&data), (const char *)_region_head(&data)); if ((p = strchr(buf1, '/')) != NULL) - memcpy(buf1, p + 1, strlen(p) - 1); + memmove(buf1, p + 1, strlen(p) - 1); if ((p = strstr(buf1, ".esdb")) != NULL) *p = '\0'; snprintf(buf, sizeof(buf), "%s/%.*s", buf1, From owner-svn-src-all@freebsd.org Fri Dec 4 18:24:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA6B4A41E2F; Fri, 4 Dec 2015 18:24:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71E781301; Fri, 4 Dec 2015 18:24:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IOpPc022455; Fri, 4 Dec 2015 18:24:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IOp9h022454; Fri, 4 Dec 2015 18:24:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041824.tB4IOp9h022454@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:24:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291800 - stable/9/lib/libc/iconv X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:24:52 -0000 Author: bdrewery Date: Fri Dec 4 18:24:51 2015 New Revision: 291800 URL: https://svnweb.freebsd.org/changeset/base/291800 Log: MFC r290169: Use memmove(3) to avoid overlapping copy. Modified: stable/9/lib/libc/iconv/citrus_esdb.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/iconv/citrus_esdb.c ============================================================================== --- stable/9/lib/libc/iconv/citrus_esdb.c Fri Dec 4 18:24:47 2015 (r291799) +++ stable/9/lib/libc/iconv/citrus_esdb.c Fri Dec 4 18:24:51 2015 (r291800) @@ -328,7 +328,7 @@ _citrus_esdb_get_list(char ***rlist, siz (int)_region_size(&data), (const char *)_region_head(&data)); if ((p = strchr(buf1, '/')) != NULL) - memcpy(buf1, p + 1, strlen(p) - 1); + memmove(buf1, p + 1, strlen(p) - 1); if ((p = strstr(buf1, ".esdb")) != NULL) *p = '\0'; snprintf(buf, sizeof(buf), "%s/%.*s", buf1, From owner-svn-src-all@freebsd.org Fri Dec 4 18:25:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E344A41EB7; Fri, 4 Dec 2015 18:25:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF2AC15F9; Fri, 4 Dec 2015 18:25:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IPurM022541; Fri, 4 Dec 2015 18:25:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IPuNc022540; Fri, 4 Dec 2015 18:25:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041825.tB4IPuNc022540@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291801 - stable/10/sys/dev/filemon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:25:57 -0000 Author: bdrewery Date: Fri Dec 4 18:25:55 2015 New Revision: 291801 URL: https://svnweb.freebsd.org/changeset/base/291801 Log: MFC r290170: Remove unneeded NULL as this is initialized with M_ZERO. Modified: stable/10/sys/dev/filemon/filemon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/filemon/filemon.c ============================================================================== --- stable/10/sys/dev/filemon/filemon.c Fri Dec 4 18:24:51 2015 (r291800) +++ stable/10/sys/dev/filemon/filemon.c Fri Dec 4 18:25:55 2015 (r291801) @@ -194,9 +194,6 @@ filemon_open(struct cdev *dev, int oflag if (filemon == NULL) { filemon = malloc(sizeof(struct filemon), M_FILEMON, M_WAITOK | M_ZERO); - - filemon->fp = NULL; - sx_init(&filemon->lock, "filemon"); } From owner-svn-src-all@freebsd.org Fri Dec 4 18:26:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC366A41EEE; Fri, 4 Dec 2015 18:26:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DE791785; Fri, 4 Dec 2015 18:26:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IQ19m022593; Fri, 4 Dec 2015 18:26:01 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IQ1Y5022592; Fri, 4 Dec 2015 18:26:01 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041826.tB4IQ1Y5022592@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:26:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291802 - stable/9/sys/dev/filemon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:26:02 -0000 Author: bdrewery Date: Fri Dec 4 18:26:01 2015 New Revision: 291802 URL: https://svnweb.freebsd.org/changeset/base/291802 Log: MFC r290170: Remove unneeded NULL as this is initialized with M_ZERO. Modified: stable/9/sys/dev/filemon/filemon.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/filemon/filemon.c ============================================================================== --- stable/9/sys/dev/filemon/filemon.c Fri Dec 4 18:25:55 2015 (r291801) +++ stable/9/sys/dev/filemon/filemon.c Fri Dec 4 18:26:01 2015 (r291802) @@ -231,9 +231,6 @@ filemon_open(struct cdev *dev, int oflag if (filemon == NULL) { filemon = malloc(sizeof(struct filemon), M_FILEMON, M_WAITOK | M_ZERO); - - filemon->fp = NULL; - sx_init(&filemon->lock, "filemon"); } From owner-svn-src-all@freebsd.org Fri Dec 4 18:29:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61DC6A41F8A; Fri, 4 Dec 2015 18:29:08 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11BEE1A5D; Fri, 4 Dec 2015 18:29:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IT7UW022732; Fri, 4 Dec 2015 18:29:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IT7BT022731; Fri, 4 Dec 2015 18:29:07 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041829.tB4IT7BT022731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291803 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:29:08 -0000 Author: bdrewery Date: Fri Dec 4 18:29:06 2015 New Revision: 291803 URL: https://svnweb.freebsd.org/changeset/base/291803 Log: MFC r290426: Correct a comment which appears to be mistakingly mechanically changed in r265420. Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@freebsd.org Fri Dec 4 18:31:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC3A3A410BC; Fri, 4 Dec 2015 18:31:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 794621CF9; Fri, 4 Dec 2015 18:31:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IVJcV024681; Fri, 4 Dec 2015 18:31:19 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IVJX8024680; Fri, 4 Dec 2015 18:31:19 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041831.tB4IVJX8024680@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:31:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291804 - stable/10/usr.bin/svn/lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:31:20 -0000 Author: bdrewery Date: Fri Dec 4 18:31:19 2015 New Revision: 291804 URL: https://svnweb.freebsd.org/changeset/base/291804 Log: MFC r290431: Add SUBDIR_PARALLEL. Modified: stable/10/usr.bin/svn/lib/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/svn/lib/Makefile ============================================================================== --- stable/10/usr.bin/svn/lib/Makefile Fri Dec 4 18:29:06 2015 (r291803) +++ stable/10/usr.bin/svn/lib/Makefile Fri Dec 4 18:31:19 2015 (r291804) @@ -4,5 +4,6 @@ SUBDIR= libapr libapr_util libserf libsq libsvn_client libsvn_delta libsvn_diff libsvn_fs libsvn_fs_fs \ libsvn_fs_util libsvn_ra libsvn_ra_local libsvn_ra_serf \ libsvn_ra_svn libsvn_repos libsvn_subr libsvn_wc +SUBDIR_PARALLEL= .include From owner-svn-src-all@freebsd.org Fri Dec 4 18:32:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76A1DA4124D; Fri, 4 Dec 2015 18:32:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45033108C; Fri, 4 Dec 2015 18:32:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IWdSU025604; Fri, 4 Dec 2015 18:32:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IWdPZ025603; Fri, 4 Dec 2015 18:32:39 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041832.tB4IWdPZ025603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:32:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291805 - stable/10/tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:32:40 -0000 Author: bdrewery Date: Fri Dec 4 18:32:39 2015 New Revision: 291805 URL: https://svnweb.freebsd.org/changeset/base/291805 Log: MFC r290435: Don't allow environment-set options to bleed into src.conf.5 generation. Modified: stable/10/tools/build/options/makeman Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/build/options/makeman ============================================================================== --- stable/10/tools/build/options/makeman Fri Dec 4 18:31:19 2015 (r291804) +++ stable/10/tools/build/options/makeman Fri Dec 4 18:32:39 2015 (r291805) @@ -33,7 +33,7 @@ show_options() ALL_TARGETS=$(echo $(${make} targets | tail -n +2)) rm -f $t/settings for target in ${ALL_TARGETS} ; do - ${make} showconfig \ + env -i ${make} showconfig \ SRCCONF=/dev/null __MAKE_CONF=/dev/null \ TARGET_ARCH=${target#*/} TARGET=${target%/*} | while read var _ val ; do @@ -96,7 +96,7 @@ show() exit 1 ;; esac - ${make} "$@" showconfig __MAKE_CONF=/dev/null | + env -i ${make} "$@" showconfig __MAKE_CONF=/dev/null | while read var _ val ; do opt=${var#MK_} case ${val} in From owner-svn-src-all@freebsd.org Fri Dec 4 18:32:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CE0AA412AC; Fri, 4 Dec 2015 18:32:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27F0112FB; Fri, 4 Dec 2015 18:32:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IWtS4025655; Fri, 4 Dec 2015 18:32:55 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IWtSc025654; Fri, 4 Dec 2015 18:32:55 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041832.tB4IWtSc025654@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:32:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291806 - stable/9/tools/build/options X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:32:56 -0000 Author: bdrewery Date: Fri Dec 4 18:32:55 2015 New Revision: 291806 URL: https://svnweb.freebsd.org/changeset/base/291806 Log: MFC r290435: Don't allow environment-set options to bleed into src.conf.5 generation. Modified: stable/9/tools/build/options/makeman Directory Properties: stable/9/tools/build/options/ (props changed) Modified: stable/9/tools/build/options/makeman ============================================================================== --- stable/9/tools/build/options/makeman Fri Dec 4 18:32:39 2015 (r291805) +++ stable/9/tools/build/options/makeman Fri Dec 4 18:32:55 2015 (r291806) @@ -33,7 +33,7 @@ show_options() ALL_TARGETS=$(echo $(${make} targets | tail -n +2)) rm -f $t/settings for target in ${ALL_TARGETS} ; do - ${make} showconfig \ + env -i ${make} showconfig \ SRCCONF=/dev/null __MAKE_CONF=/dev/null \ TARGET_ARCH=${target#*/} TARGET=${target%/*} | while read var _ val ; do @@ -96,7 +96,7 @@ show() exit 1 ;; esac - ${make} "$@" showconfig __MAKE_CONF=/dev/null | + env -i ${make} "$@" showconfig __MAKE_CONF=/dev/null | while read var _ val ; do opt=${var#MK_} case ${val} in From owner-svn-src-all@freebsd.org Fri Dec 4 18:33:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6BE8A4132B; Fri, 4 Dec 2015 18:33:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3C8C14AF; Fri, 4 Dec 2015 18:33:33 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IXWpl025739; Fri, 4 Dec 2015 18:33:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IXWLJ025738; Fri, 4 Dec 2015 18:33:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041833.tB4IXWLJ025738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:33:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291807 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:33:34 -0000 Author: bdrewery Date: Fri Dec 4 18:33:32 2015 New Revision: 291807 URL: https://svnweb.freebsd.org/changeset/base/291807 Log: MFC r290812: Avoid setting schg in the objtree for lib32 build. Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Fri Dec 4 18:32:55 2015 (r291806) +++ stable/10/Makefile.inc1 Fri Dec 4 18:33:32 2015 (r291807) @@ -634,10 +634,10 @@ build32: .PHONY -DEARLY_BUILD build-tools .endfor ${_+_}cd ${.CURDIR}; \ - ${LIB32WMAKE} -f Makefile.inc1 libraries + ${LIB32WMAKE} -f Makefile.inc1 -DNO_FSCHG libraries .for _t in obj depend all ${_+_}cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \ - DIRPRFX=libexec/rtld-elf/ ${_t} + -DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t} ${_+_}cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \ DIRPRFX=usr.bin/ldd ${_t} .endfor From owner-svn-src-all@freebsd.org Fri Dec 4 18:33:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6116A41360; Fri, 4 Dec 2015 18:33:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22D20155F; Fri, 4 Dec 2015 18:33:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IXcwZ025787; Fri, 4 Dec 2015 18:33:38 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IXcru025786; Fri, 4 Dec 2015 18:33:38 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041833.tB4IXcru025786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:33:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291808 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:33:40 -0000 Author: bdrewery Date: Fri Dec 4 18:33:38 2015 New Revision: 291808 URL: https://svnweb.freebsd.org/changeset/base/291808 Log: MFC r290812: Avoid setting schg in the objtree for lib32 build. Modified: stable/9/Makefile.inc1 (contents, props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Fri Dec 4 18:33:32 2015 (r291807) +++ stable/9/Makefile.inc1 Fri Dec 4 18:33:38 2015 (r291808) @@ -562,10 +562,10 @@ build32: -DEARLY_BUILD build-tools .endfor cd ${.CURDIR}; \ - ${LIB32WMAKE} -f Makefile.inc1 libraries + ${LIB32WMAKE} -f Makefile.inc1 -DNO_FSCHG libraries .for _t in obj depend all cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32WMAKE} \ - DIRPRFX=libexec/rtld-elf/ ${_t} + -DNO_FSCHG DIRPRFX=libexec/rtld-elf/ ${_t} cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32WMAKE} \ DIRPRFX=usr.bin/ldd ${_t} .endfor From owner-svn-src-all@freebsd.org Fri Dec 4 18:34:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E1F6A413D8; Fri, 4 Dec 2015 18:34:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 42EA718B0; Fri, 4 Dec 2015 18:34:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 5A2C13C24F5; Sat, 5 Dec 2015 05:03:26 +1100 (AEDT) Date: Sat, 5 Dec 2015 05:03:25 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrew Turner cc: Bryan Drewery , "Kenneth D. Merry" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291741 - head/sys/geom In-Reply-To: <20151204125355.6712d782@bender> Message-ID: <20151205031713.T3286@besplex.bde.org> References: <201512040338.tB43cZY1053263@repo.freebsd.org> <56610B6B.8010708@FreeBSD.org> <20151204233052.J2220@besplex.bde.org> <20151204125355.6712d782@bender> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=PfoC/XVd c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=wpgweWGZNZbX0rPCmxsA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:34:23 -0000 On Fri, 4 Dec 2015, Andrew Turner wrote: > On Fri, 4 Dec 2015 23:42:51 +1100 (EST) > Bruce Evans wrote: > ... >> This looks like 5 style bugs and 0 issues: >> >> 3 old style bugs: >> - use of bool > > I don't seem to see where in style(9) we disallow the use of bool. Can > you point me where this is specified? This is specified by not giving an example of using it. style(9) was mostly written 10+ years before bool existed, and bool is so (un)important that style(9) wasn't changed to allow it in its 16+ years of existence. This is also a style bug since it was not used anywhere in nearby code, but nearby code used the older boolean_t. I don't mind using bool in new code. I typedefed everything too much in code that I wrote 25-30 years ago. For C99 types more useful than bool, but leading to a deeper morasse, use [u]int_fastN_t and [u]int_leastN_t types in . These are so useable that they are used approximately 0 times in the kernel and 10 times in userland (perhaps more than 10 in contrib). But they should almost always be used where fixed-width types are now used. E.g., using uint16_t asks for a type of width exactly 16 bits at all costs. The costs are: - this type might not be supported. Then nothing would work. But uint_least16_t should always be supported, and anything that doesn't need precisely 16 bits would work using it. It only needs to be larger than 16 bits, so it can be u_int. - this type might be supported, but might be much slower than uint_fast16_t. This is probably the case on arches like old alpha where the hardware only does wider or narrower memory accesses so has do loads and stores of different sizes and repack - this type might be supported, but might be slower than uint_fast16_t. This is the case on arches like old i386 where movz was slow and instruction fetch bandwidth was also inadquate (so the extra movz's were even slower) - this type might be supported, but might be a little slower than uint_fast16_t. This was the case on arches like current x86. Extra movz instructions are still required, but these excecute fast on current x86. Kernel code needs fixed-width types in many places in hardware and network storage layouts. Fixed-width types are also useful for saving space in software storage layouts. But they are just logically wrong for that. The [u]int_leastN_t are logically right for that. But in practice, all the optional [u]intN_t types exist the [u]int_leastN_t types are not needed. Using either leads to a type morasses so is rarely done. It is never done in the kernel. Fixed-width types should not be used except for storage. They should not be part of ABIs except (quite often) to force a specific ABI (in this case, only "fast" fixed-width types should be used in the ABI, but then the ABI won't be optimal forever). They should be converted to "fast" types when they are loaded and not converted back until they are stored to non-temporary variables. This leads to type morasses so is rarely done. It is never done in the kernel. Before existed, the kernel hard-coded uint8_t as u_char, etc. The 8-bit cases of this are now standard (u_char must be uint8_t on newer POSIX). The kernel now uses fixed-width types excessively. Not only in storage layouts, but also for function calls and local variables using types copied from the storage structs. Fixed-width instead of "fast" integer types are also pessimal for function calls. Inlining of functions reduces this pessimization. Bruce From owner-svn-src-all@freebsd.org Fri Dec 4 18:39:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6D32EA414B2; Fri, 4 Dec 2015 18:39:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ABE31ACD; Fri, 4 Dec 2015 18:39:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IdvMw026035; Fri, 4 Dec 2015 18:39:57 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IdvWv026033; Fri, 4 Dec 2015 18:39:57 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041839.tB4IdvWv026033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291809 - stable/10/usr.sbin/bsdconfig/includes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:39:58 -0000 Author: bdrewery Date: Fri Dec 4 18:39:57 2015 New Revision: 291809 URL: https://svnweb.freebsd.org/changeset/base/291809 Log: MFC r291081: Rename checked-in 'includes' to 'includes.sh' to avoid colliding with share/mk target 'make includes'. Added: stable/10/usr.sbin/bsdconfig/includes/includes.sh - copied unchanged from r291081, head/usr.sbin/bsdconfig/includes/includes.sh Deleted: stable/10/usr.sbin/bsdconfig/includes/includes Modified: stable/10/usr.sbin/bsdconfig/includes/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bsdconfig/includes/Makefile ============================================================================== --- stable/10/usr.sbin/bsdconfig/includes/Makefile Fri Dec 4 18:33:38 2015 (r291808) +++ stable/10/usr.sbin/bsdconfig/includes/Makefile Fri Dec 4 18:39:57 2015 (r291809) @@ -8,6 +8,6 @@ FILESDIR= ${LIBEXECDIR}/bsdconfig/includ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} -SCRIPTS= includes +SCRIPTS= includes.sh .include Copied: stable/10/usr.sbin/bsdconfig/includes/includes.sh (from r291081, head/usr.sbin/bsdconfig/includes/includes.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.sbin/bsdconfig/includes/includes.sh Fri Dec 4 18:39:57 2015 (r291809, copy of r291081, head/usr.sbin/bsdconfig/includes/includes.sh) @@ -0,0 +1,205 @@ +#!/bin/sh +#- +# Copyright (c) 2013 Devin Teske +# 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$ +# +############################################################ INCLUDES + +# Prevent common.subr from auto initializing debugging (this is not an inter- +# active utility that requires debugging; also `-d' has been repurposed). +# +DEBUG_SELF_INITIALIZE=NO + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" + +BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="includes" +f_include_lang $BSDCFG_LIBE/include/messages.subr +f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr + +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" + +############################################################ GLOBALS + +# +# Options +# +USE_COLOR=1 +SHOW_DESC= +SHOW_FUNCS= +FUNC_PATTERN= + +############################################################ FUNCTIONS + +# show_functions $file +# +# Show the functions in the given include file. +# +show_include() +{ + local file="${1#./}" + + local pattern="${FUNC_PATTERN:-.*}" + output=$( awk \ + -v use_color=${USE_COLOR:-0} \ + -v re="$pattern" \ + -v show_desc=${SHOW_DESC:-0} ' + function _asorti(src, dest) + { + k = nitems = 0; + + # Copy src indices to dest and calculate array length + for (i in src) dest[++nitems] = i + + # Sort the array of indices (dest) using insertion sort method + for (i = 1; i <= nitems; k = i++) + { + idx = dest[i] + while ((k > 0) && (dest[k] > idx)) + { + dest[k+1] = dest[k] + k-- + } + dest[k+1] = idx + } + + return nitems + } + /^$/,/^#/ { + if ($0 ~ /^# f_/) { + if (!match($2, re)) next + fn = $2 + if (use_color) + syntax[fn] = sprintf("+%s%s%s\n", + substr($0, 2, RSTART), + substr($0, 2 + RSTART, RLENGTH), + substr($0, 2 + RSTART + RLENGTH)) + else + syntax[fn] = "+" substr($0, 2) "\n" + if (show_desc) + print_more = 1 + else + print_more = substr($0, length($0)) == "\\" + } + if (show_desc && print_more) { + getline + while ($0 ~ /^#/) { + syntax[fn] = syntax[fn] " " substr($0, 2) "\n" + getline + } + print_more = 0 + } else while (print_more) { + getline + syntax[fn] = syntax[fn] " " substr($0, 2) "\n" + print_more = substr($0, length($0)) == "\\" + } + } + END { + n = _asorti(syntax, sorted_indices) + for (i = 1; i <= n; i++) + printf "%s", syntax[sorted_indices[i]] + }' "$file" ) + if [ "$output" ]; then + if [ ! "$SHOW_FUNCS" ]; then + echo "$file" + return $SUCCESS + fi + if [ "$FUNC_PATTERN" ]; then + printf ">>> $msg_functions_in_matching\n" \ + "$file" "$FUNC_PATTERN" + else + printf ">>> $msg_functions_in\n" "$file" + fi + echo "$output" + echo # blank line to simplify awk(1)-based reparse + fi +} + +############################################################ MAIN + +# Incorporate rc-file if it exists +[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc" + +# Are we in a terminal? +[ -t 1 ] || USE_COLOR= + +# +# Process command-line arguments +# +while getopts adfF:hn flag; do + case "$flag" in + a) USE_COLOR=1 ;; + d) SHOW_DESC=1 SHOW_FUNCS=1 ;; + f) SHOW_FUNCS=1 ;; + F) FUNC_PATTERN="$OPTARG" ;; + n) USE_COLOR= ;; + h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm" ;; + esac +done +shift $(( $OPTIND - 1 )) + +# cd(1) to `share' dir so relative paths work for find and positional args +cd $BSDCFG_SHARE || f_die # Pedantic + +# +# If given an argument, operate on it specifically (implied `-f') and exit +# +[ $# -gt 0 ] && SHOW_FUNCS=1 +for include in "$@"; do + # See if they've just omitted the `*.subr' suffix + [ -f "$include.subr" -a ! -f "$include" ] && include="$include.subr" + if [ ! -f "$include" ]; then + printf "$msg_no_such_file_or_directory\n" "$0" "$include" + exit $FAILURE + elif [ ! -r "$include" ]; then + printf "$msg_permission_denied\n" "$0" "$include" + exit $FAILURE + fi + show_include "$include" || f_die +done + +# Exit if we processed some include arguments +[ $# -gt 0 ] && exit $SUCCESS + +# +# Operate an all known include files +# NB: If we get this far, we had no include arguments +# +find -s . -type f -and -iname '*.subr' | while read file; do + if [ "$SHOW_FUNCS" -o "$FUNC_PATTERN" ]; then + show_include "$file" + else + echo "${file#./}" + fi +done + +exit $SUCCESS + +################################################################################ +# END +################################################################################ From owner-svn-src-all@freebsd.org Fri Dec 4 18:41:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD731A41538; Fri, 4 Dec 2015 18:41:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88F081D0C; Fri, 4 Dec 2015 18:41:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IfZcc028078; Fri, 4 Dec 2015 18:41:35 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IfZUW028076; Fri, 4 Dec 2015 18:41:35 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041841.tB4IfZUW028076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291810 - stable/9/usr.sbin/bsdconfig/includes X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:41:36 -0000 Author: bdrewery Date: Fri Dec 4 18:41:35 2015 New Revision: 291810 URL: https://svnweb.freebsd.org/changeset/base/291810 Log: MFC r291081: Rename checked-in 'includes' to 'includes.sh' to avoid colliding with share/mk target 'make includes'. Added: stable/9/usr.sbin/bsdconfig/includes/includes.sh - copied unchanged from r291081, head/usr.sbin/bsdconfig/includes/includes.sh Deleted: stable/9/usr.sbin/bsdconfig/includes/includes Modified: stable/9/usr.sbin/bsdconfig/includes/Makefile Directory Properties: stable/9/usr.sbin/bsdconfig/ (props changed) Modified: stable/9/usr.sbin/bsdconfig/includes/Makefile ============================================================================== --- stable/9/usr.sbin/bsdconfig/includes/Makefile Fri Dec 4 18:39:57 2015 (r291809) +++ stable/9/usr.sbin/bsdconfig/includes/Makefile Fri Dec 4 18:41:35 2015 (r291810) @@ -8,7 +8,7 @@ FILESDIR= ${LIBEXECDIR}/bsdconfig/includ FILES= INDEX USAGE SCRIPTSDIR= ${FILESDIR} -SCRIPTS= includes +SCRIPTS= includes.sh beforeinstall: mkdir -p ${DESTDIR}${FILESDIR} Copied: stable/9/usr.sbin/bsdconfig/includes/includes.sh (from r291081, head/usr.sbin/bsdconfig/includes/includes.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/usr.sbin/bsdconfig/includes/includes.sh Fri Dec 4 18:41:35 2015 (r291810, copy of r291081, head/usr.sbin/bsdconfig/includes/includes.sh) @@ -0,0 +1,205 @@ +#!/bin/sh +#- +# Copyright (c) 2013 Devin Teske +# 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$ +# +############################################################ INCLUDES + +# Prevent common.subr from auto initializing debugging (this is not an inter- +# active utility that requires debugging; also `-d' has been repurposed). +# +DEBUG_SELF_INITIALIZE=NO + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" + +BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="includes" +f_include_lang $BSDCFG_LIBE/include/messages.subr +f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr + +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" + +############################################################ GLOBALS + +# +# Options +# +USE_COLOR=1 +SHOW_DESC= +SHOW_FUNCS= +FUNC_PATTERN= + +############################################################ FUNCTIONS + +# show_functions $file +# +# Show the functions in the given include file. +# +show_include() +{ + local file="${1#./}" + + local pattern="${FUNC_PATTERN:-.*}" + output=$( awk \ + -v use_color=${USE_COLOR:-0} \ + -v re="$pattern" \ + -v show_desc=${SHOW_DESC:-0} ' + function _asorti(src, dest) + { + k = nitems = 0; + + # Copy src indices to dest and calculate array length + for (i in src) dest[++nitems] = i + + # Sort the array of indices (dest) using insertion sort method + for (i = 1; i <= nitems; k = i++) + { + idx = dest[i] + while ((k > 0) && (dest[k] > idx)) + { + dest[k+1] = dest[k] + k-- + } + dest[k+1] = idx + } + + return nitems + } + /^$/,/^#/ { + if ($0 ~ /^# f_/) { + if (!match($2, re)) next + fn = $2 + if (use_color) + syntax[fn] = sprintf("+%s%s%s\n", + substr($0, 2, RSTART), + substr($0, 2 + RSTART, RLENGTH), + substr($0, 2 + RSTART + RLENGTH)) + else + syntax[fn] = "+" substr($0, 2) "\n" + if (show_desc) + print_more = 1 + else + print_more = substr($0, length($0)) == "\\" + } + if (show_desc && print_more) { + getline + while ($0 ~ /^#/) { + syntax[fn] = syntax[fn] " " substr($0, 2) "\n" + getline + } + print_more = 0 + } else while (print_more) { + getline + syntax[fn] = syntax[fn] " " substr($0, 2) "\n" + print_more = substr($0, length($0)) == "\\" + } + } + END { + n = _asorti(syntax, sorted_indices) + for (i = 1; i <= n; i++) + printf "%s", syntax[sorted_indices[i]] + }' "$file" ) + if [ "$output" ]; then + if [ ! "$SHOW_FUNCS" ]; then + echo "$file" + return $SUCCESS + fi + if [ "$FUNC_PATTERN" ]; then + printf ">>> $msg_functions_in_matching\n" \ + "$file" "$FUNC_PATTERN" + else + printf ">>> $msg_functions_in\n" "$file" + fi + echo "$output" + echo # blank line to simplify awk(1)-based reparse + fi +} + +############################################################ MAIN + +# Incorporate rc-file if it exists +[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc" + +# Are we in a terminal? +[ -t 1 ] || USE_COLOR= + +# +# Process command-line arguments +# +while getopts adfF:hn flag; do + case "$flag" in + a) USE_COLOR=1 ;; + d) SHOW_DESC=1 SHOW_FUNCS=1 ;; + f) SHOW_FUNCS=1 ;; + F) FUNC_PATTERN="$OPTARG" ;; + n) USE_COLOR= ;; + h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm" ;; + esac +done +shift $(( $OPTIND - 1 )) + +# cd(1) to `share' dir so relative paths work for find and positional args +cd $BSDCFG_SHARE || f_die # Pedantic + +# +# If given an argument, operate on it specifically (implied `-f') and exit +# +[ $# -gt 0 ] && SHOW_FUNCS=1 +for include in "$@"; do + # See if they've just omitted the `*.subr' suffix + [ -f "$include.subr" -a ! -f "$include" ] && include="$include.subr" + if [ ! -f "$include" ]; then + printf "$msg_no_such_file_or_directory\n" "$0" "$include" + exit $FAILURE + elif [ ! -r "$include" ]; then + printf "$msg_permission_denied\n" "$0" "$include" + exit $FAILURE + fi + show_include "$include" || f_die +done + +# Exit if we processed some include arguments +[ $# -gt 0 ] && exit $SUCCESS + +# +# Operate an all known include files +# NB: If we get this far, we had no include arguments +# +find -s . -type f -and -iname '*.subr' | while read file; do + if [ "$SHOW_FUNCS" -o "$FUNC_PATTERN" ]; then + show_include "$file" + else + echo "${file#./}" + fi +done + +exit $SUCCESS + +################################################################################ +# END +################################################################################ From owner-svn-src-all@freebsd.org Fri Dec 4 18:44:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8578A41658; Fri, 4 Dec 2015 18:44:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 526E51036; Fri, 4 Dec 2015 18:44:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IiDXa028840; Fri, 4 Dec 2015 18:44:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IiDj0028836; Fri, 4 Dec 2015 18:44:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041844.tB4IiDj0028836@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291811 - in stable/10/sys/modules: . drm2 drm2/radeonkmsfw netgraph X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:44:14 -0000 Author: bdrewery Date: Fri Dec 4 18:44:12 2015 New Revision: 291811 URL: https://svnweb.freebsd.org/changeset/base/291811 Log: MFC r290665: Build all of sys/modules with SUBDIR_PARALLEL. Modified: stable/10/sys/modules/Makefile.inc stable/10/sys/modules/drm2/Makefile stable/10/sys/modules/drm2/radeonkmsfw/Makefile stable/10/sys/modules/netgraph/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/Makefile.inc ============================================================================== --- stable/10/sys/modules/Makefile.inc Fri Dec 4 18:41:35 2015 (r291810) +++ stable/10/sys/modules/Makefile.inc Fri Dec 4 18:44:12 2015 (r291811) @@ -4,3 +4,4 @@ CFLAGS+= -DPC98 .endif +SUBDIR_PARALLEL= yes Modified: stable/10/sys/modules/drm2/Makefile ============================================================================== --- stable/10/sys/modules/drm2/Makefile Fri Dec 4 18:41:35 2015 (r291810) +++ stable/10/sys/modules/drm2/Makefile Fri Dec 4 18:44:12 2015 (r291811) @@ -2,8 +2,6 @@ .include -SUBDIR_PARALLEL= - .if ${MACHINE_CPUARCH} == "amd64" _i915kms= i915kms _radeonkms= radeonkms Modified: stable/10/sys/modules/drm2/radeonkmsfw/Makefile ============================================================================== --- stable/10/sys/modules/drm2/radeonkmsfw/Makefile Fri Dec 4 18:41:35 2015 (r291810) +++ stable/10/sys/modules/drm2/radeonkmsfw/Makefile Fri Dec 4 18:44:12 2015 (r291811) @@ -1,7 +1,5 @@ # $FreeBSD$ -SUBDIR_PARALLEL= - SUBDIR= \ ARUBA_me \ ARUBA_pfp \ Modified: stable/10/sys/modules/netgraph/Makefile ============================================================================== --- stable/10/sys/modules/netgraph/Makefile Fri Dec 4 18:41:35 2015 (r291810) +++ stable/10/sys/modules/netgraph/Makefile Fri Dec 4 18:44:12 2015 (r291811) @@ -62,6 +62,4 @@ _bluetooth= bluetooth _mppc= mppc .endif -SUBDIR_PARALLEL= - .include From owner-svn-src-all@freebsd.org Fri Dec 4 18:48:10 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 207FCA41704; Fri, 4 Dec 2015 18:48:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDFB214EF; Fri, 4 Dec 2015 18:48:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4Im9HA029144; Fri, 4 Dec 2015 18:48:09 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4Im8hf029142; Fri, 4 Dec 2015 18:48:08 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041848.tB4Im8hf029142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:48:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291812 - in stable/10: . usr.bin/xinstall X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:48:10 -0000 Author: bdrewery Date: Fri Dec 4 18:48:08 2015 New Revision: 291812 URL: https://svnweb.freebsd.org/changeset/base/291812 Log: MFC r291026: Remove unneeded libmd from bootstrap-tools (reverting r246784). Modified: stable/10/Makefile.inc1 stable/10/usr.bin/xinstall/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Fri Dec 4 18:44:12 2015 (r291811) +++ stable/10/Makefile.inc1 Fri Dec 4 18:48:08 2015 (r291812) @@ -1370,7 +1370,6 @@ bootstrap-tools: .PHONY ${_yacc} \ ${_m4} \ ${_lex} \ - lib/libmd \ usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ Modified: stable/10/usr.bin/xinstall/Makefile ============================================================================== --- stable/10/usr.bin/xinstall/Makefile Fri Dec 4 18:44:12 2015 (r291811) +++ stable/10/usr.bin/xinstall/Makefile Fri Dec 4 18:48:08 2015 (r291812) @@ -7,10 +7,8 @@ SRCS= xinstall.c getid.c MAN= install.1 .PATH: ${.CURDIR}/../../contrib/mtree -.PATH: ${.CURDIR}/../../lib/libmd CFLAGS+= -I${.CURDIR}/../../contrib/mtree CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd -CFLAGS+= -I${.CURDIR}/../../lib/libmd DPADD+= ${LIBMD} LDADD+= -lmd From owner-svn-src-all@freebsd.org Fri Dec 4 18:48:52 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCCE7A4175A; Fri, 4 Dec 2015 18:48:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97FD017A5; Fri, 4 Dec 2015 18:48:52 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4Imp0u029208; Fri, 4 Dec 2015 18:48:51 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4ImpIG029206; Fri, 4 Dec 2015 18:48:51 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041848.tB4ImpIG029206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:48:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291813 - in stable/9: . usr.bin/xinstall X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:48:52 -0000 Author: bdrewery Date: Fri Dec 4 18:48:51 2015 New Revision: 291813 URL: https://svnweb.freebsd.org/changeset/base/291813 Log: MFC r291026: Remove unneeded libmd from bootstrap-tools (reverting r246784). Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/usr.bin/xinstall/Makefile Directory Properties: stable/9/usr.bin/xinstall/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Fri Dec 4 18:48:08 2015 (r291812) +++ stable/9/Makefile.inc1 Fri Dec 4 18:48:51 2015 (r291813) @@ -1212,7 +1212,6 @@ bootstrap-tools: .PHONY ${_sed} \ ${_yacc} \ ${_lex} \ - lib/libmd \ usr.bin/xinstall \ ${_gensnmptree} \ usr.sbin/config \ Modified: stable/9/usr.bin/xinstall/Makefile ============================================================================== --- stable/9/usr.bin/xinstall/Makefile Fri Dec 4 18:48:08 2015 (r291812) +++ stable/9/usr.bin/xinstall/Makefile Fri Dec 4 18:48:51 2015 (r291813) @@ -7,10 +7,8 @@ SRCS= xinstall.c getid.c MAN= install.1 .PATH: ${.CURDIR}/../../contrib/mtree -.PATH: ${.CURDIR}/../../lib/libmd CFLAGS+= -I${.CURDIR}/../../contrib/mtree CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd -CFLAGS+= -I${.CURDIR}/../../lib/libmd DPADD+= ${LIBMD} LDADD+= -lmd From owner-svn-src-all@freebsd.org Fri Dec 4 18:50:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B185A41833; Fri, 4 Dec 2015 18:50:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D21431AF4; Fri, 4 Dec 2015 18:50:14 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IoDx5029317; Fri, 4 Dec 2015 18:50:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IoDDU029308; Fri, 4 Dec 2015 18:50:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041850.tB4IoDDU029308@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291814 - in stable/10: lib/clang lib/libarchive/tests sbin/ipf/ipf sbin/ipf/ipftest sbin/ipf/ipmon sbin/ipf/ipnat sbin/ipf/ippool usr.bin/cpio/tests usr.bin/tar/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:50:15 -0000 Author: bdrewery Date: Fri Dec 4 18:50:12 2015 New Revision: 291814 URL: https://svnweb.freebsd.org/changeset/base/291814 Log: MFC r291329: Remove redundant DPSRCS which were already in SRCS. Modified: stable/10/lib/clang/clang.build.mk stable/10/lib/libarchive/tests/Makefile stable/10/sbin/ipf/ipf/Makefile stable/10/sbin/ipf/ipftest/Makefile stable/10/sbin/ipf/ipmon/Makefile stable/10/sbin/ipf/ipnat/Makefile stable/10/sbin/ipf/ippool/Makefile stable/10/usr.bin/cpio/tests/Makefile stable/10/usr.bin/tar/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/clang/clang.build.mk ============================================================================== --- stable/10/lib/clang/clang.build.mk Fri Dec 4 18:48:51 2015 (r291813) +++ stable/10/lib/clang/clang.build.mk Fri Dec 4 18:50:12 2015 (r291814) @@ -233,5 +233,4 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/Static .endfor SRCS+= ${TGHDRS:C/$/.inc.h/} -DPSRCS+= ${TGHDRS:C/$/.inc.h/} CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/} Modified: stable/10/lib/libarchive/tests/Makefile ============================================================================== --- stable/10/lib/libarchive/tests/Makefile Fri Dec 4 18:48:51 2015 (r291813) +++ stable/10/lib/libarchive/tests/Makefile Fri Dec 4 18:50:12 2015 (r291814) @@ -247,9 +247,7 @@ BROKEN_TESTS+= test_fuzz_rar SRCS.libarchive_test= \ ${TESTS_SRCS} \ main.c \ - read_open_memory.c - -DPSRCS.libarchive_test= \ + read_open_memory.c \ list.h DPADD.libarchive_test= ${LIBARCHIVE} Modified: stable/10/sbin/ipf/ipf/Makefile ============================================================================== --- stable/10/sbin/ipf/ipf/Makefile Fri Dec 4 18:48:51 2015 (r291813) +++ stable/10/sbin/ipf/ipf/Makefile Fri Dec 4 18:50:12 2015 (r291814) @@ -7,8 +7,6 @@ MLINKS= ipf.5 ipf.conf.5 ipf.5 ipf6.con CFLAGS+= -I. -DIPFILTER_BPF -DHAS_SYS_MD5_H GENHDRS= ipf_l.h ipf_y.h -DPSRCS+= ${GENHDRS} - CLEANFILES+= ${GENHDRS} ipf_y.c ipf_l.c ipf_y.c: ipf_y.y Modified: stable/10/sbin/ipf/ipftest/Makefile ============================================================================== --- stable/10/sbin/ipf/ipftest/Makefile Fri Dec 4 18:48:51 2015 (r291813) +++ stable/10/sbin/ipf/ipftest/Makefile Fri Dec 4 18:50:12 2015 (r291814) @@ -22,7 +22,6 @@ CFLAGS+= -DIPFILTER_LOG -DIPFILTER_COMPI .PATH: ${.CURDIR}/../../../sys/contrib/ipfilter/netinet GENHDRS= ipnat_l.h ipnat_y.h ippool_l.h ippool_y.h ipf_l.h ipf_y.h -DPSRCS+= ${GENHDRS} CLEANFILES+= ${GENHDRS} CLEANFILES+= ipf_y.c ipf_l.c Modified: stable/10/sbin/ipf/ipmon/Makefile ============================================================================== --- stable/10/sbin/ipf/ipmon/Makefile Fri Dec 4 18:48:51 2015 (r291813) +++ stable/10/sbin/ipf/ipmon/Makefile Fri Dec 4 18:50:12 2015 (r291814) @@ -7,8 +7,6 @@ MAN= ipmon.8 CFLAGS+= -DLOGFAC=LOG_LOCAL0 -I. GENHDRS+= ipmon_l.h ipmon_y.h -DPSRCS+= ${GENHDRS} - CLEANFILES+= ${GENHDRS} ipmon_y.c ipmon_l.c ipmon_y.c: ipmon_y.y Modified: stable/10/sbin/ipf/ipnat/Makefile ============================================================================== --- stable/10/sbin/ipf/ipnat/Makefile Fri Dec 4 18:48:51 2015 (r291813) +++ stable/10/sbin/ipf/ipnat/Makefile Fri Dec 4 18:50:12 2015 (r291814) @@ -7,8 +7,6 @@ MLINKS= ipnat.5 ipnat.conf.5 CFLAGS+= -I. GENHDRS= ipnat_l.h ipnat_y.h -DPSRCS+= ${GENHDRS} - CLEANFILES+= ${GENHDRS} ipnat_y.c ipnat_l.c ipnat_y.c: ipnat_y.y Modified: stable/10/sbin/ipf/ippool/Makefile ============================================================================== --- stable/10/sbin/ipf/ippool/Makefile Fri Dec 4 18:48:51 2015 (r291813) +++ stable/10/sbin/ipf/ippool/Makefile Fri Dec 4 18:50:12 2015 (r291814) @@ -6,8 +6,6 @@ MAN= ippool.5 ippool.8 CFLAGS+= -I. GENHDRS= ippool_l.h ippool_y.h -DPSRCS+= ${GENHDRS} - CLEANFILES+= ${GENHDRS} ippool_y.c ippool_l.c ippool_y.c: ippool_y.y Modified: stable/10/usr.bin/cpio/tests/Makefile ============================================================================== --- stable/10/usr.bin/cpio/tests/Makefile Fri Dec 4 18:48:51 2015 (r291813) +++ stable/10/usr.bin/cpio/tests/Makefile Fri Dec 4 18:50:12 2015 (r291814) @@ -78,9 +78,6 @@ SRCS.bsdcpio_test= list.h \ ${TESTS_SRCS} \ main.c -DPSRCS.bsdcpio_test= \ - list.h - .PATH: ${LIBARCHIVEDIR}/test_utils SRCS.bsdcpio_test+= test_utils.c Modified: stable/10/usr.bin/tar/tests/Makefile ============================================================================== --- stable/10/usr.bin/tar/tests/Makefile Fri Dec 4 18:48:51 2015 (r291813) +++ stable/10/usr.bin/tar/tests/Makefile Fri Dec 4 18:50:12 2015 (r291814) @@ -78,8 +78,6 @@ SRCS.bsdtar_test= \ list.h \ main.c -DPSRCS.bsdtar_test+= list.h - .PATH: ${LIBARCHIVEDIR}/test_utils SRCS.bsdtar_test+= test_utils.c From owner-svn-src-all@freebsd.org Fri Dec 4 18:59:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F676A41990; Fri, 4 Dec 2015 18:59:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30E9E128F; Fri, 4 Dec 2015 18:59:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4IxLDS032207; Fri, 4 Dec 2015 18:59:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4IxK1u032199; Fri, 4 Dec 2015 18:59:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041859.tB4IxK1u032199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 18:59:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291815 - in stable/10: gnu/usr.bin/cc/cc_tools gnu/usr.bin/groff include kerberos5 kerberos5/lib/libheimipcc lib/msun tests/sys/pjdfstest/pjdfstest usr.bin/kdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 18:59:22 -0000 Author: bdrewery Date: Fri Dec 4 18:59:20 2015 New Revision: 291815 URL: https://svnweb.freebsd.org/changeset/base/291815 Log: MFC r284289,r288267: r284289: Misc fixes from projects/bmake r288267: Remove redundant .NOPATH. Modified: stable/10/gnu/usr.bin/cc/cc_tools/Makefile stable/10/gnu/usr.bin/groff/Makefile.inc stable/10/include/mk-osreldate.sh stable/10/kerberos5/Makefile.inc stable/10/kerberos5/lib/libheimipcc/Makefile stable/10/lib/msun/Makefile stable/10/tests/sys/pjdfstest/pjdfstest/Makefile stable/10/usr.bin/kdump/mkioctls Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- stable/10/gnu/usr.bin/cc/cc_tools/Makefile Fri Dec 4 18:50:12 2015 (r291814) +++ stable/10/gnu/usr.bin/cc/cc_tools/Makefile Fri Dec 4 18:59:20 2015 (r291815) @@ -217,6 +217,7 @@ tconfig.h: GENSRCS+= tconfig.h CLEANFILES+= cs-tconfig.h + # Options optionlist: ${OPT_FILES} LC_ALL=C awk -f ${GCCDIR}/opt-gather.awk ${.ALLSRC} > ${.TARGET} Modified: stable/10/gnu/usr.bin/groff/Makefile.inc ============================================================================== --- stable/10/gnu/usr.bin/groff/Makefile.inc Fri Dec 4 18:50:12 2015 (r291814) +++ stable/10/gnu/usr.bin/groff/Makefile.inc Fri Dec 4 18:59:20 2015 (r291815) @@ -127,6 +127,7 @@ revision=`sed -e 's/^0$$//' -e 's/^[1-9] .sh .pl: @${ECHO} Making ${.TARGET} from ${.IMPSRC} + @rm -f ${.TARGET} @sed -e "s|@BINDIR@|${BINDIR}|g" \ -e 's|@GROFF_BIN_PATH_SETUP@|GROFF_RUNTIME="$${GROFF_BIN_PATH=${BINDIR}}:"|g' \ -e "s;@FONTDIR@;$(fontdir);g" \ Modified: stable/10/include/mk-osreldate.sh ============================================================================== --- stable/10/include/mk-osreldate.sh Fri Dec 4 18:50:12 2015 (r291814) +++ stable/10/include/mk-osreldate.sh Fri Dec 4 18:59:20 2015 (r291815) @@ -49,4 +49,4 @@ $COPYRIGHT #endif EOF chmod 644 $tmpfile -mv $tmpfile osreldate.h +mv -f $tmpfile osreldate.h Modified: stable/10/kerberos5/Makefile.inc ============================================================================== --- stable/10/kerberos5/Makefile.inc Fri Dec 4 18:50:12 2015 (r291814) +++ stable/10/kerberos5/Makefile.inc Fri Dec 4 18:59:20 2015 (r291815) @@ -35,7 +35,7 @@ ETSRCS= \ .for ET in ${ETSRCS} .for _ET in ${ET:T:R} .if ${SRCS:M${_ET}.[ch]} != "" -.ORDER: ${_ET}.c ${_ET}.h +.ORDER: ${_ET}.h ${_ET}.c ${_ET}.c ${_ET}.h: ${ET} compile_et ${.ALLSRC} CLEANFILES+= ${_ET}.h ${_ET}.c Modified: stable/10/kerberos5/lib/libheimipcc/Makefile ============================================================================== --- stable/10/kerberos5/lib/libheimipcc/Makefile Fri Dec 4 18:50:12 2015 (r291814) +++ stable/10/kerberos5/lib/libheimipcc/Makefile Fri Dec 4 18:59:20 2015 (r291815) @@ -11,7 +11,8 @@ SRCS= \ CFLAGS+= -I${KRB5DIR}/lib/roken \ -I${KRB5DIR}/base \ - -I${KRB5DIR}/lib/ipc + -I${KRB5DIR}/lib/ipc \ + -I${KRB5DIR}/include .include Modified: stable/10/lib/msun/Makefile ============================================================================== --- stable/10/lib/msun/Makefile Fri Dec 4 18:50:12 2015 (r291814) +++ stable/10/lib/msun/Makefile Fri Dec 4 18:59:20 2015 (r291815) @@ -35,6 +35,8 @@ CFLAGS+= -I${.CURDIR}/ld80 CFLAGS+= -I${.CURDIR}/ld128 .endif +CFLAGS+= -I${.CURDIR}/${ARCH_SUBDIR} + .PATH: ${.CURDIR}/bsdsrc .PATH: ${.CURDIR}/src .PATH: ${.CURDIR}/man Modified: stable/10/tests/sys/pjdfstest/pjdfstest/Makefile ============================================================================== --- stable/10/tests/sys/pjdfstest/pjdfstest/Makefile Fri Dec 4 18:50:12 2015 (r291814) +++ stable/10/tests/sys/pjdfstest/pjdfstest/Makefile Fri Dec 4 18:59:20 2015 (r291815) @@ -8,7 +8,7 @@ BINDIR= ${TESTSBASE}/sys/pjdfstest PROG= pjdfstest MAN= -CFLAGS= -D__OS_FreeBSD__ -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_FCHFLAGS +CFLAGS+= -D__OS_FreeBSD__ -DHAS_LCHMOD -DHAS_CHFLAGS -DHAS_FCHFLAGS CFLAGS+= -DHAS_CHFLAGSAT -DHAS_LCHFLAGS -DHAS_FREEBSD_ACL -DHAS_BINDAT CFLAGS+= -DHAS_CONNECTAT Modified: stable/10/usr.bin/kdump/mkioctls ============================================================================== --- stable/10/usr.bin/kdump/mkioctls Fri Dec 4 18:50:12 2015 (r291814) +++ stable/10/usr.bin/kdump/mkioctls Fri Dec 4 18:59:20 2015 (r291815) @@ -39,7 +39,7 @@ case "${MACHINE}" in esac awk -v x="$ioctl_includes" 'BEGIN {print x}' | - $CPP -I$1 -dM -DCOMPAT_43TTY - | + $CPP -nostdinc -I$1 -dM -DCOMPAT_43TTY - | awk -v ioctl_includes="$ioctl_includes" -v style="$style" ' BEGIN { print "/* XXX obnoxious prerequisites. */" From owner-svn-src-all@freebsd.org Fri Dec 4 19:00:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1E587A419FC; Fri, 4 Dec 2015 19:00:03 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-yk0-f169.google.com (mail-yk0-f169.google.com [209.85.160.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D3A501483; Fri, 4 Dec 2015 19:00:02 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by ykfs79 with SMTP id s79so135712878ykf.1; Fri, 04 Dec 2015 10:59:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=ZCEbjCT7tQMCYiUNqO2JMJgC0GdYQK41jI7ltDYO5rA=; b=MXbd8LDA9Fkl5E9qQpwaQBawm3ix87HGl/c7BLCmd2Pd/Old/eRYOf3xE+3qIYexT5 WNVKJD7orgnmoT1XXfcTJXK2zIh2ip0p1oW23jZHs/Sqa/j1QXGETlV9X19r2PWKdjib pEeJ9dYZStxn72seZ2poAsZMPYmQFbHKgdiE5lk0KjvrPAw9/ykrn6n/1N7uOr/8TPW4 ZE7tslP7FT5QEKn5+RmxrR+r0VJUkYEF2wMDRIodFaq6t9I0w3X8OZEXSClh9nZDQ0cD zbbT0l401ynNVMR404RG75bOeHVNxt3TlaqPVqfiAxIGWOgVnGQ2woPmGJx4dy5+otCB 8ViQ== X-Received: by 10.13.249.199 with SMTP id j190mr12403745ywf.286.1449255596465; Fri, 04 Dec 2015 10:59:56 -0800 (PST) Received: from mail-yk0-f181.google.com (mail-yk0-f181.google.com. [209.85.160.181]) by smtp.gmail.com with ESMTPSA id t123sm9743940ywg.51.2015.12.04.10.59.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Dec 2015 10:59:56 -0800 (PST) Received: by ykba77 with SMTP id a77so134616298ykb.2; Fri, 04 Dec 2015 10:59:55 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.13.212.17 with SMTP id w17mr12400640ywd.237.1449255595943; Fri, 04 Dec 2015 10:59:55 -0800 (PST) Reply-To: cem@FreeBSD.org Received: by 10.37.17.2 with HTTP; Fri, 4 Dec 2015 10:59:55 -0800 (PST) In-Reply-To: <20151205031713.T3286@besplex.bde.org> References: <201512040338.tB43cZY1053263@repo.freebsd.org> <56610B6B.8010708@FreeBSD.org> <20151204233052.J2220@besplex.bde.org> <20151204125355.6712d782@bender> <20151205031713.T3286@besplex.bde.org> Date: Fri, 4 Dec 2015 10:59:55 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r291741 - head/sys/geom From: Conrad Meyer To: Bruce Evans , svn-src-head@freebsd.org Cc: Andrew Turner , src-committers@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 19:00:03 -0000 On Fri, Dec 4, 2015 at 10:03 AM, Bruce Evans wrote: > On Fri, 4 Dec 2015, Andrew Turner wrote: >> I don't seem to see where in style(9) we disallow the use of bool. Can >> you point me where this is specified? > > > This is specified by not giving an example of using it. style(9) was > mostly written 10+ years before bool existed, and bool is so > (un)important that style(9) wasn't changed to allow it in its 16+ > years of existence. Thanks for the suggestion. Please see https://reviews.freebsd.org/D4384 . Best, Conrad From owner-svn-src-all@freebsd.org Fri Dec 4 19:01:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBB9FA41A5B; Fri, 4 Dec 2015 19:01:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B77881967; Fri, 4 Dec 2015 19:01:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B4F36B9BE; Fri, 4 Dec 2015 14:01:41 -0500 (EST) From: John Baldwin To: Andrew Turner Cc: Bruce Evans , Bryan Drewery , "Kenneth D. Merry" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291741 - head/sys/geom Date: Fri, 04 Dec 2015 09:57:06 -0800 Message-ID: <33766691.xPhVgrKQoK@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <20151204125355.6712d782@bender> References: <201512040338.tB43cZY1053263@repo.freebsd.org> <20151204233052.J2220@besplex.bde.org> <20151204125355.6712d782@bender> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 04 Dec 2015 14:01:41 -0500 (EST) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 19:01:43 -0000 On Friday, December 04, 2015 12:53:55 PM Andrew Turner wrote: > On Fri, 4 Dec 2015 23:42:51 +1100 (EST) > Bruce Evans wrote: > ... > > This looks like 5 style bugs and 0 issues: > > > > 3 old style bugs: > > - use of bool > > I don't seem to see where in style(9) we disallow the use of bool. Can > you point me where this is specified? Honestly I prefer bool for real booleans to 0/1. I think it is clearer to the reader. I'd like to axe boolean_t and replace its uses with bool. -- John Baldwin From owner-svn-src-all@freebsd.org Fri Dec 4 19:04:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D33E5A41BF8; Fri, 4 Dec 2015 19:04:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86EF01046; Fri, 4 Dec 2015 19:04:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4J448l035289; Fri, 4 Dec 2015 19:04:04 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4J44ND035285; Fri, 4 Dec 2015 19:04:04 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041904.tB4J44ND035285@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 19:04:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291816 - in stable/10: lib/libc/tests/rpc usr.bin/kdump usr.bin/netstat usr.bin/svn/svn X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 19:04:05 -0000 Author: bdrewery Date: Fri Dec 4 19:04:04 2015 New Revision: 291816 URL: https://svnweb.freebsd.org/changeset/base/291816 Log: MFC r291330: Replace DPSRCS that work fine in SRCS. Modified: stable/10/lib/libc/tests/rpc/Makefile stable/10/usr.bin/kdump/Makefile stable/10/usr.bin/netstat/Makefile stable/10/usr.bin/svn/svn/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/rpc/Makefile ============================================================================== --- stable/10/lib/libc/tests/rpc/Makefile Fri Dec 4 18:59:20 2015 (r291815) +++ stable/10/lib/libc/tests/rpc/Makefile Fri Dec 4 19:04:04 2015 (r291816) @@ -17,7 +17,7 @@ h_testbits_xdr.c: ${RPCSRC} h_testbits.h CLEANFILES+= ${RPCSRC:.x=.h} ${RPCSRC:.x=.c} h_testbits_xdr.c CFLAGS+= -I${.OBJDIR} -DPSRCS+= h_testbits.h +SRCS+= h_testbits.h LDADD+= -lrpcsvc -lutil DPADD+= ${LIBRPCSVC} ${LIBUTIL} Modified: stable/10/usr.bin/kdump/Makefile ============================================================================== --- stable/10/usr.bin/kdump/Makefile Fri Dec 4 18:59:20 2015 (r291815) +++ stable/10/usr.bin/kdump/Makefile Fri Dec 4 19:04:04 2015 (r291816) @@ -10,8 +10,7 @@ SFX= 32 .PATH: ${.CURDIR}/../ktrace PROG= kdump -SRCS= kdump_subr.c kdump.c ioctl.c subr.c -DPSRCS= kdump_subr.h +SRCS= kdump_subr.c kdump_subr.h kdump.c ioctl.c subr.c CFLAGS+= -I${.CURDIR}/../ktrace -I${.CURDIR} -I${.CURDIR}/../.. -I. .if ${MK_PF} != "no" Modified: stable/10/usr.bin/netstat/Makefile ============================================================================== --- stable/10/usr.bin/netstat/Makefile Fri Dec 4 18:59:20 2015 (r291815) +++ stable/10/usr.bin/netstat/Makefile Fri Dec 4 19:04:04 2015 (r291816) @@ -6,7 +6,7 @@ PROG= netstat SRCS= if.c inet.c main.c mbuf.c mroute.c netisr.c route.c \ unix.c atalk.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c \ - flowtable.c + flowtable.c nl_defs.h WARNS?= 3 CFLAGS+=-fno-strict-aliasing Modified: stable/10/usr.bin/svn/svn/Makefile ============================================================================== --- stable/10/usr.bin/svn/svn/Makefile Fri Dec 4 18:59:20 2015 (r291815) +++ stable/10/usr.bin/svn/svn/Makefile Fri Dec 4 19:04:04 2015 (r291816) @@ -55,7 +55,7 @@ DPADD= ${LIBSVN_CLIENT} ${LIBSVN_WC} ${L CLEANFILES+= svnlite.1 .if(defined(ORGANIZATION) && !empty(ORGANIZATION)) -DPSRCS+= freebsd-organization.h +SRCS+= freebsd-organization.h CLEANFILES+= freebsd-organization.h CFLAGS+= -I. -DHAS_ORGANIZATION_NAME freebsd-organization.h: From owner-svn-src-all@freebsd.org Fri Dec 4 19:10:41 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C68C5A41C80; Fri, 4 Dec 2015 19:10:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 9E1EC127D; Fri, 4 Dec 2015 19:10:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 978331D46; Fri, 4 Dec 2015 19:10:41 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 5A83518AC6; Fri, 4 Dec 2015 19:10:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id uxrzyMTmg2vT; Fri, 4 Dec 2015 19:10:39 +0000 (UTC) Subject: Re: svn commit: r291741 - head/sys/geom DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 760A718AC0 To: Bruce Evans , Andrew Turner References: <201512040338.tB43cZY1053263@repo.freebsd.org> <56610B6B.8010708@FreeBSD.org> <20151204233052.J2220@besplex.bde.org> <20151204125355.6712d782@bender> <20151205031713.T3286@besplex.bde.org> Cc: "Kenneth D. Merry" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <5661E52D.6050305@FreeBSD.org> Date: Fri, 4 Dec 2015 11:10:37 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151205031713.T3286@besplex.bde.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KTOJ1IN41uroXwlcpNdfkGHamE0Htx7It" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 19:10:41 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --KTOJ1IN41uroXwlcpNdfkGHamE0Htx7It Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 12/4/2015 10:03 AM, Bruce Evans wrote: > This is specified by not giving an example of using it. style(9) was I really take issue with this stance. I don't think you really mean what this implies. For example, can I even use 'x++' or mtx_lock(9) or uintptr_t since they are not shown in an example? --=20 Regards, Bryan Drewery --KTOJ1IN41uroXwlcpNdfkGHamE0Htx7It Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJWYeUuAAoJEDXXcbtuRpfPE60IAM+LaTIaDTptZ0UypFFkgsxu wiDgWNDggZzIaNDyhIkSbxTcWgVKWexsn4q1SgwkORjJL7x87t+p9j9cYY+NAIvs O3/7hpw+OBhMVTbv6VU39FJTaUqZD2D/Kec4RUNjRXVBbxBTLQVX9oeraOGFfHCo 48wLIAorTafSGMwCY76WAGlPJSHME5rCjfnZj0z7v7JiGAva6xGWax8lKUOSFkDM kO9TGVxO7UVAKqwmbpfAYfkwBs+7tOv/nJ3cs3dUaeRetAS9P994gy17rIv7tu/v zN1Ylyo+BNS4g75F4Px6ETAUctGhk4rKK3Mz5MlgbmWy1+Ula22VPpCj4ERVLWc= =NLfd -----END PGP SIGNATURE----- --KTOJ1IN41uroXwlcpNdfkGHamE0Htx7It-- From owner-svn-src-all@freebsd.org Fri Dec 4 19:14:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD929A41E1B; Fri, 4 Dec 2015 19:14:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A6B3177D; Fri, 4 Dec 2015 19:14:15 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4JEEM9038090; Fri, 4 Dec 2015 19:14:14 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4JEERO038089; Fri, 4 Dec 2015 19:14:14 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041914.tB4JEERO038089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 19:14:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291817 - stable/10/tests/sys/kern/acct X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 19:14:15 -0000 Author: bdrewery Date: Fri Dec 4 19:14:14 2015 New Revision: 291817 URL: https://svnweb.freebsd.org/changeset/base/291817 Log: MFC r291331: Avoid requiring 'make depend' here. Modified: stable/10/tests/sys/kern/acct/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/tests/sys/kern/acct/Makefile ============================================================================== --- stable/10/tests/sys/kern/acct/Makefile Fri Dec 4 19:04:04 2015 (r291816) +++ stable/10/tests/sys/kern/acct/Makefile Fri Dec 4 19:14:14 2015 (r291817) @@ -9,6 +9,7 @@ CFLAGS+= -I${.OBJDIR} CLEANFILES+= convert.c convert.c.tmp DPSRCS.acct_test= convert.c +acct_test.o: convert.c convert.c: ${.CURDIR:H:H:H:H}/sys/kern/kern_acct.c sed -n -e 's/log(/syslog(/g' \ From owner-svn-src-all@freebsd.org Fri Dec 4 19:15:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26FA4A41E74; Fri, 4 Dec 2015 19:15:38 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7C9F18FD; Fri, 4 Dec 2015 19:15:37 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4JFbqs038184; Fri, 4 Dec 2015 19:15:37 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4JFbdo038183; Fri, 4 Dec 2015 19:15:37 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041915.tB4JFbdo038183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 19:15:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291818 - stable/10/lib/libc/tests/rpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 19:15:38 -0000 Author: bdrewery Date: Fri Dec 4 19:15:36 2015 New Revision: 291818 URL: https://svnweb.freebsd.org/changeset/base/291818 Log: MFC r291339: Follow-up r291330: h_testbits.h is only needed by xdr_test. Modified: stable/10/lib/libc/tests/rpc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/rpc/Makefile ============================================================================== --- stable/10/lib/libc/tests/rpc/Makefile Fri Dec 4 19:14:14 2015 (r291817) +++ stable/10/lib/libc/tests/rpc/Makefile Fri Dec 4 19:15:36 2015 (r291818) @@ -1,7 +1,8 @@ # $FreeBSD$ TESTSDIR= ${TESTSBASE}/lib/libc/rpc -SRCS.xdr_test= ${RPCSRC:.x=_xdr.c} t_xdr.c ${RPCSRC:.x=.h} +SRCS.xdr_test= ${RPCSRC:.x=_xdr.c} t_xdr.c ${RPCSRC:.x=.h} \ + h_testbits.h NETBSD_ATF_TESTS_C= rpc_test NETBSD_ATF_TESTS_C+= xdr_test @@ -17,7 +18,6 @@ h_testbits_xdr.c: ${RPCSRC} h_testbits.h CLEANFILES+= ${RPCSRC:.x=.h} ${RPCSRC:.x=.c} h_testbits_xdr.c CFLAGS+= -I${.OBJDIR} -SRCS+= h_testbits.h LDADD+= -lrpcsvc -lutil DPADD+= ${LIBRPCSVC} ${LIBUTIL} From owner-svn-src-all@freebsd.org Fri Dec 4 19:16:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBB6FA41ED4; Fri, 4 Dec 2015 19:16:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ACB21A6F; Fri, 4 Dec 2015 19:16:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4JGwAt038288; Fri, 4 Dec 2015 19:16:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4JGu5x038267; Fri, 4 Dec 2015 19:16:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512041916.tB4JGu5x038267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 19:16:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291819 - in stable/10: gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus lib/libwrap libexec/hyperv libexec/rtld-elf libexec/tcpd usr.bin/makewhatis usr.bin/vgrind usr.bin/xlint/lint1 usr.bin/... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 19:17:00 -0000 Author: bdrewery Date: Fri Dec 4 19:16:56 2015 New Revision: 291819 URL: https://svnweb.freebsd.org/changeset/base/291819 Log: MFC r291348: Use LIBEXECDIR for /usr/libexec. Modified: stable/10/gnu/usr.bin/cc/cc1/Makefile stable/10/gnu/usr.bin/cc/cc1plus/Makefile stable/10/lib/libwrap/Makefile stable/10/libexec/hyperv/Makefile stable/10/libexec/rtld-elf/Makefile stable/10/libexec/tcpd/Makefile stable/10/usr.bin/makewhatis/Makefile stable/10/usr.bin/vgrind/Makefile stable/10/usr.bin/xlint/lint1/Makefile stable/10/usr.bin/xlint/lint2/Makefile stable/10/usr.sbin/bsdinstall/distextract/Makefile stable/10/usr.sbin/bsdinstall/distfetch/Makefile stable/10/usr.sbin/bsdinstall/partedit/Makefile stable/10/usr.sbin/bsdinstall/scripts/Makefile stable/10/usr.sbin/lpr/filters/Makefile stable/10/usr.sbin/rpc.yppasswdd/Makefile stable/10/usr.sbin/sendmail/Makefile stable/10/usr.sbin/tcpdchk/Makefile stable/10/usr.sbin/tcpdmatch/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/cc/cc1/Makefile ============================================================================== --- stable/10/gnu/usr.bin/cc/cc1/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/gnu/usr.bin/cc/cc1/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -9,7 +9,7 @@ MAN= PROG= cc1 SRCS= main.c c-parser.c c-lang.c -BINDIR= /usr/libexec +BINDIR= ${LIBEXECDIR} .if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?=yes .endif Modified: stable/10/gnu/usr.bin/cc/cc1plus/Makefile ============================================================================== --- stable/10/gnu/usr.bin/cc/cc1plus/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/gnu/usr.bin/cc/cc1plus/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -15,7 +15,7 @@ SRCS+= main.c cp-lang.c c-opts.c call.c search.c semantics.c tree.c typeck.c typeck2.c optimize.c \ cp-objcp-common.c cp-gimplify.c tree-mudflap.c -BINDIR= /usr/libexec +BINDIR= ${LIBEXECDIR} .if ${MK_SHARED_TOOLCHAIN} == "no" NO_SHARED?=yes .endif Modified: stable/10/lib/libwrap/Makefile ============================================================================== --- stable/10/lib/libwrap/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/lib/libwrap/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -17,7 +17,7 @@ MLINKS= hosts_access.3 hosts_ctl.3 \ .PATH: ${.CURDIR}/../../contrib/tcp_wrappers CFLAGS+=-DFACILITY=LOG_AUTH -DHOSTS_ACCESS -DNETGROUP -DDAEMON_UMASK=022 \ - -DREAL_DAEMON_DIR=\"/usr/libexec\" -DPROCESS_OPTIONS \ + -DREAL_DAEMON_DIR=\"${LIBEXECDIR}\" -DPROCESS_OPTIONS \ -DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10 \ -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\" \ -DSYS_ERRLIST_DEFINED -DALWAYS_HOSTNAME -DUSE_STRSEP -DPROCESS_OPTIONS Modified: stable/10/libexec/hyperv/Makefile ============================================================================== --- stable/10/libexec/hyperv/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/libexec/hyperv/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -2,7 +2,7 @@ .PATH: ${.CURDIR}/../../contrib/hyperv/tools/scripts -BINDIR= /usr/libexec/hyperv +BINDIR= ${LIBEXECDIR}/hyperv SCRIPTS= hv_set_ifconfig hv_get_dns_info hv_get_dhcp_info NO_OBJ= Modified: stable/10/libexec/rtld-elf/Makefile ============================================================================== --- stable/10/libexec/rtld-elf/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/libexec/rtld-elf/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -32,7 +32,7 @@ WARNS?= 2 INSTALLFLAGS= -C -b PRECIOUSPROG= BINDIR= /libexec -SYMLINKS= ${BINDIR}/${PROG} /usr/libexec/${PROG} +SYMLINKS= ${BINDIR}/${PROG} ${LIBEXECDIR}/${PROG} MLINKS= rtld.1 ld-elf.so.1.1 \ rtld.1 ld.so.1 Modified: stable/10/libexec/tcpd/Makefile ============================================================================== --- stable/10/libexec/tcpd/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/libexec/tcpd/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -7,7 +7,7 @@ PROG= tcpd MAN= tcpd.8 CSTD?= c89 -CFLAGS+=-DREAL_DAEMON_DIR=\"/usr/libexec\" \ +CFLAGS+=-DREAL_DAEMON_DIR=\"${LIBEXECDIR}\" \ -DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10 \ -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\" \ -DFACILITY=LOG_DAEMON Modified: stable/10/usr.bin/makewhatis/Makefile ============================================================================== --- stable/10/usr.bin/makewhatis/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.bin/makewhatis/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -5,7 +5,7 @@ DPADD= ${LIBZ} LDADD= -lz SCRIPTS= makewhatis.local.sh MAN= makewhatis.1 makewhatis.local.8 -SCRIPTSDIR= /usr/libexec +SCRIPTSDIR= ${LIBEXECDIR} LINKS= ${SCRIPTSDIR}/makewhatis.local ${SCRIPTSDIR}/catman.local MLINKS= makewhatis.local.8 catman.local.8 Modified: stable/10/usr.bin/vgrind/Makefile ============================================================================== --- stable/10/usr.bin/vgrind/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.bin/vgrind/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -13,7 +13,7 @@ MAN= vgrind.1 vgrindefs.5 WARNS?= 3 -BINDIR= /usr/libexec +BINDIR= ${LIBEXECDIR} SCRIPTSDIR=/usr/bin CLEANFILES= vgrindefs.src.db Modified: stable/10/usr.bin/xlint/lint1/Makefile ============================================================================== --- stable/10/usr.bin/xlint/lint1/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.bin/xlint/lint1/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -12,7 +12,7 @@ DPADD= ${LIBL} ${LIBM} CFLAGS+= -I. -I${.CURDIR} LINTFLAGS=-aehpz -BINDIR= /usr/libexec +BINDIR= ${LIBEXECDIR} .PATH: ${.CURDIR}/../common Modified: stable/10/usr.bin/xlint/lint2/Makefile ============================================================================== --- stable/10/usr.bin/xlint/lint2/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.bin/xlint/lint2/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -9,6 +9,6 @@ MAN= CFLAGS+=-I${.CURDIR}/../lint1 LINTFLAGS=-abehrz -BINDIR= /usr/libexec +BINDIR= ${LIBEXECDIR} .include Modified: stable/10/usr.sbin/bsdinstall/distextract/Makefile ============================================================================== --- stable/10/usr.sbin/bsdinstall/distextract/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.sbin/bsdinstall/distextract/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -1,6 +1,6 @@ # $FreeBSD$ -BINDIR= /usr/libexec/bsdinstall +BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distextract DPADD= ${LIBARCHIVE} ${LIBDPV} ${LIBFIGPAR} ${LIBDIALOG} ${LIBM} LDADD= -larchive -ldpv -lfigpar -ldialog -lm Modified: stable/10/usr.sbin/bsdinstall/distfetch/Makefile ============================================================================== --- stable/10/usr.sbin/bsdinstall/distfetch/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.sbin/bsdinstall/distfetch/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -1,6 +1,6 @@ # $FreeBSD$ -BINDIR= /usr/libexec/bsdinstall +BINDIR= ${LIBEXECDIR}/bsdinstall PROG= distfetch DPADD= ${LIBFETCH} ${LIBDIALOG} ${LIBM} LDADD= -lfetch -ldialog -lm Modified: stable/10/usr.sbin/bsdinstall/partedit/Makefile ============================================================================== --- stable/10/usr.sbin/bsdinstall/partedit/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.sbin/bsdinstall/partedit/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -1,6 +1,6 @@ # $FreeBSD$ -BINDIR= /usr/libexec/bsdinstall +BINDIR= ${LIBEXECDIR}/bsdinstall PROG= partedit LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \ ${BINDIR}/partedit ${BINDIR}/scriptedpart Modified: stable/10/usr.sbin/bsdinstall/scripts/Makefile ============================================================================== --- stable/10/usr.sbin/bsdinstall/scripts/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.sbin/bsdinstall/scripts/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -3,7 +3,7 @@ SCRIPTS= auto adduser checksum config docsinstall entropy hostname jail \ keymap mirrorselect mount netconfig netconfig_ipv4 netconfig_ipv6 \ rootpass script services time umount wlanconfig zfsboot -BINDIR= /usr/libexec/bsdinstall +BINDIR= ${LIBEXECDIR}/bsdinstall MAN= Modified: stable/10/usr.sbin/lpr/filters/Makefile ============================================================================== --- stable/10/usr.sbin/lpr/filters/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.sbin/lpr/filters/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -1,7 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ -BINDIR= /usr/libexec/lpr +BINDIR= ${LIBEXECDIR}/lpr PROG= lpf MAN= Modified: stable/10/usr.sbin/rpc.yppasswdd/Makefile ============================================================================== --- stable/10/usr.sbin/rpc.yppasswdd/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.sbin/rpc.yppasswdd/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -7,7 +7,7 @@ RPCDIR= ${DESTDIR}/usr/include/rpcsvc PROG= rpc.yppasswdd SCRIPTS=yppwupdate -SCRIPTSDIR= /usr/libexec +SCRIPTSDIR= ${LIBEXECDIR} MAN= rpc.yppasswdd.8 SRCS= util.c yp_access.c yp_dblookup.c yp_dbwrite.c \ yp_error.c yppasswdd_main.c yppasswdd_server.c ypxfr_misc.c ${GENSRCS} Modified: stable/10/usr.sbin/sendmail/Makefile ============================================================================== --- stable/10/usr.sbin/sendmail/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.sbin/sendmail/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -7,7 +7,7 @@ SENDMAIL_DIR=${.CURDIR}/../../contrib/se SMDIR= ${SENDMAIL_DIR}/src .PATH: ${SMDIR} -BINDIR= /usr/libexec/sendmail +BINDIR= ${LIBEXECDIR}/sendmail PROG= sendmail MAN= mailq.1 newaliases.1 aliases.5 sendmail.8 Modified: stable/10/usr.sbin/tcpdchk/Makefile ============================================================================== --- stable/10/usr.sbin/tcpdchk/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.sbin/tcpdchk/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -8,7 +8,7 @@ PROG= tcpdchk MAN= tcpdchk.8 SRCS= tcpdchk.c fakelog.c inetcf.c scaffold.c -CFLAGS+=-DREAL_DAEMON_DIR=\"/usr/libexec\" \ +CFLAGS+=-DREAL_DAEMON_DIR=\"${LIBEXECDIR}\" \ -DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10 -DPROCESS_OPTIONS \ -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\" .if ${MK_INET6_SUPPORT} != "no" Modified: stable/10/usr.sbin/tcpdmatch/Makefile ============================================================================== --- stable/10/usr.sbin/tcpdmatch/Makefile Fri Dec 4 19:15:36 2015 (r291818) +++ stable/10/usr.sbin/tcpdmatch/Makefile Fri Dec 4 19:16:56 2015 (r291819) @@ -8,7 +8,7 @@ PROG= tcpdmatch MAN= tcpdmatch.8 SRCS= tcpdmatch.c fakelog.c inetcf.c scaffold.c -CFLAGS+=-DREAL_DAEMON_DIR=\"/usr/libexec\" \ +CFLAGS+=-DREAL_DAEMON_DIR=\"${LIBEXECDIR}\" \ -DSEVERITY=LOG_INFO -DRFC931_TIMEOUT=10 .if ${MK_INET6_SUPPORT} != "no" CFLAGS+=-DINET6 From owner-svn-src-all@freebsd.org Fri Dec 4 19:46:50 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7538CA4150B; Fri, 4 Dec 2015 19:46:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 506431B18; Fri, 4 Dec 2015 19:46:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4Jkn4C046893; Fri, 4 Dec 2015 19:46:49 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4JknoU046890; Fri, 4 Dec 2015 19:46:49 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201512041946.tB4JknoU046890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 4 Dec 2015 19:46:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291821 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 19:46:50 -0000 Author: mav Date: Fri Dec 4 19:46:49 2015 New Revision: 291821 URL: https://svnweb.freebsd.org/changeset/base/291821 Log: Make 16Gig chips to use new queue pointer registers. While 24xx-style ATIO and reply queue registers seems like still working, request queue doesn't. So instead of that use registers from PCI BAR(4). Modified: head/sys/dev/isp/isp_freebsd.h head/sys/dev/isp/isp_pci.c head/sys/dev/isp/isp_sbus.c Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Fri Dec 4 19:32:51 2015 (r291820) +++ head/sys/dev/isp/isp_freebsd.h Fri Dec 4 19:46:49 2015 (r291821) @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -286,9 +287,9 @@ struct isposinfo { /* * DMA related sdtuff */ - bus_space_tag_t bus_tag; + struct resource * regs; + struct resource * regs2; bus_dma_tag_t dmat; - bus_space_handle_t bus_handle; bus_dma_tag_t cdmat; bus_dmamap_t cdmap; @@ -361,8 +362,8 @@ struct isposinfo { #define FCP_NEXT_CRN isp_fcp_next_crn #define isp_lock isp_osinfo.lock -#define isp_bus_tag isp_osinfo.bus_tag -#define isp_bus_handle isp_osinfo.bus_handle +#define isp_regs isp_osinfo.regs +#define isp_regs2 isp_osinfo.regs2 /* * Locking macros... @@ -430,8 +431,7 @@ case SYNC_RESULT: \ BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); \ break; \ case SYNC_REG: \ - bus_space_barrier(isp->isp_osinfo.bus_tag, \ - isp->isp_osinfo.bus_handle, offset, size, \ + bus_barrier(isp->isp_osinfo.regs, offset, size, \ BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); \ break; \ default: \ @@ -463,8 +463,7 @@ case SYNC_RESULT: \ isp->isp_osinfo.cdmap, BUS_DMASYNC_POSTWRITE); \ break; \ case SYNC_REG: \ - bus_space_barrier(isp->isp_osinfo.bus_tag, \ - isp->isp_osinfo.bus_handle, offset, size, \ + bus_barrier(isp->isp_osinfo.regs, offset, size, \ BUS_SPACE_BARRIER_WRITE); \ break; \ default: \ Modified: head/sys/dev/isp/isp_pci.c ============================================================================== --- head/sys/dev/isp/isp_pci.c Fri Dec 4 19:32:51 2015 (r291820) +++ head/sys/dev/isp/isp_pci.c Fri Dec 4 19:46:49 2015 (r291821) @@ -59,6 +59,8 @@ static uint32_t isp_pci_rd_reg_1080(isps static void isp_pci_wr_reg_1080(ispsoftc_t *, int, uint32_t); static uint32_t isp_pci_rd_reg_2400(ispsoftc_t *, int); static void isp_pci_wr_reg_2400(ispsoftc_t *, int, uint32_t); +static uint32_t isp_pci_rd_reg_2600(ispsoftc_t *, int); +static void isp_pci_wr_reg_2600(ispsoftc_t *, int, uint32_t); static int isp_pci_rd_isr(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); static int isp_pci_rd_isr_2300(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); static int isp_pci_rd_isr_2400(ispsoftc_t *, uint16_t *, uint16_t *, uint16_t *); @@ -174,8 +176,8 @@ static struct ispmdvec mdvec_2500 = { static struct ispmdvec mdvec_2600 = { isp_pci_rd_isr_2400, - isp_pci_rd_reg_2400, - isp_pci_wr_reg_2400, + isp_pci_rd_reg_2600, + isp_pci_wr_reg_2600, isp_pci_mbxdma, isp_pci_dmasetup, isp_common_dmateardown, @@ -364,10 +366,13 @@ struct isp_pcisoftc { ispsoftc_t pci_isp; device_t pci_dev; struct resource * regs; + struct resource * regs2; void * irq; int iqd; int rtp; int rgd; + int rtp2; + int rgd2; void * ih; int16_t pci_poff[_NREG_BLKS]; bus_dma_tag_t dmat; @@ -684,7 +689,7 @@ isp_pci_attach(device_t dev) isp_get_generic_options(dev, isp); linesz = PCI_DFLT_LNSZ; - pcs->irq = pcs->regs = NULL; + pcs->irq = pcs->regs = pcs->regs2 = NULL; pcs->rgd = pcs->rtp = pcs->iqd = 0; pcs->pci_dev = dev; @@ -813,6 +818,10 @@ isp_pci_attach(device_t dev) pcs->rgd = PCIR_BAR(0); pcs->regs = bus_alloc_resource_any(dev, pcs->rtp, &pcs->rgd, RF_ACTIVE); + pcs->rtp2 = SYS_RES_MEMORY; + pcs->rgd2 = PCIR_BAR(4); + pcs->regs2 = bus_alloc_resource_any(dev, pcs->rtp2, &pcs->rgd2, + RF_ACTIVE); } else { pcs->rtp = SYS_RES_MEMORY; pcs->rgd = PCIR_BAR(1); @@ -833,8 +842,8 @@ isp_pci_attach(device_t dev) device_printf(dev, "Using %s space register mapping\n", (pcs->rtp == SYS_RES_IOPORT)? "I/O" : "Memory"); } - isp->isp_bus_tag = rman_get_bustag(pcs->regs); - isp->isp_bus_handle = rman_get_bushandle(pcs->regs); + isp->isp_regs = pcs->regs; + isp->isp_regs2 = pcs->regs2; if (IS_FC(isp)) { psize = sizeof (fcparam); @@ -984,9 +993,10 @@ bad: if (pcs->msicount) { pci_release_msi(dev); } - if (pcs->regs) { + if (pcs->regs) (void) bus_release_resource(dev, pcs->rtp, pcs->rgd, pcs->regs); - } + if (pcs->regs2) + (void) bus_release_resource(dev, pcs->rtp2, pcs->rgd2, pcs->regs2); if (pcs->pci_isp.isp_param) { free(pcs->pci_isp.isp_param, M_DEVBUF); pcs->pci_isp.isp_param = NULL; @@ -1025,6 +1035,8 @@ isp_pci_detach(device_t dev) pci_release_msi(dev); } (void) bus_release_resource(dev, pcs->rtp, pcs->rgd, pcs->regs); + if (pcs->regs2) + (void) bus_release_resource(dev, pcs->rtp2, pcs->rgd2, pcs->regs2); /* * XXX: THERE IS A LOT OF LEAKAGE HERE */ @@ -1043,15 +1055,12 @@ isp_pci_detach(device_t dev) (((struct isp_pcisoftc *)a)->pci_poff[((x) & _BLK_REG_MASK) >> \ _BLK_REG_SHFT] + ((x) & 0xfff)) -#define BXR2(isp, off) \ - bus_space_read_2(isp->isp_bus_tag, isp->isp_bus_handle, off) -#define BXW2(isp, off, v) \ - bus_space_write_2(isp->isp_bus_tag, isp->isp_bus_handle, off, v) -#define BXR4(isp, off) \ - bus_space_read_4(isp->isp_bus_tag, isp->isp_bus_handle, off) -#define BXW4(isp, off, v) \ - bus_space_write_4(isp->isp_bus_tag, isp->isp_bus_handle, off, v) - +#define BXR2(isp, off) bus_read_2((isp)->isp_regs, (off)) +#define BXW2(isp, off, v) bus_write_2((isp)->isp_regs, (off), (v)) +#define BXR4(isp, off) bus_read_4((isp)->isp_regs, (off)) +#define BXW4(isp, off, v) bus_write_4((isp)->isp_regs, (off), (v)) +#define B2R4(isp, off) bus_read_4((isp)->isp_regs2, (off)) +#define B2W4(isp, off, v) bus_write_4((isp)->isp_regs2, (off), (v)) static ISP_INLINE int isp_pci_rd_debounced(ispsoftc_t *isp, int off, uint16_t *rp) @@ -1314,20 +1323,19 @@ isp_pci_rd_reg_2400(ispsoftc_t *isp, int case MBOX_BLOCK: return (BXR2(isp, IspVirt2Off(isp, regoff))); case SXP_BLOCK: - isp_prt(isp, ISP_LOGWARN, "SXP_BLOCK read at 0x%x", regoff); + isp_prt(isp, ISP_LOGERR, "SXP_BLOCK read at 0x%x", regoff); return (0xffffffff); case RISC_BLOCK: - isp_prt(isp, ISP_LOGWARN, "RISC_BLOCK read at 0x%x", regoff); + isp_prt(isp, ISP_LOGERR, "RISC_BLOCK read at 0x%x", regoff); return (0xffffffff); case DMA_BLOCK: - isp_prt(isp, ISP_LOGWARN, "DMA_BLOCK read at 0x%x", regoff); + isp_prt(isp, ISP_LOGERR, "DMA_BLOCK read at 0x%x", regoff); return (0xffffffff); default: - isp_prt(isp, ISP_LOGWARN, "unknown block read at 0x%x", regoff); + isp_prt(isp, ISP_LOGERR, "unknown block read at 0x%x", regoff); return (0xffffffff); } - switch (regoff) { case BIU2400_FLASH_ADDR: case BIU2400_FLASH_DATA: @@ -1355,8 +1363,8 @@ isp_pci_rd_reg_2400(ispsoftc_t *isp, int rv = BXR4(isp, IspVirt2Off(isp, regoff)) >> 16; break; default: - isp_prt(isp, ISP_LOGERR, - "isp_pci_rd_reg_2400: unknown offset %x", regoff); + isp_prt(isp, ISP_LOGERR, "unknown register read at 0x%x", + regoff); rv = 0xffffffff; break; } @@ -1376,17 +1384,16 @@ isp_pci_wr_reg_2400(ispsoftc_t *isp, int MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, regoff), 2, -1); return; case SXP_BLOCK: - isp_prt(isp, ISP_LOGWARN, "SXP_BLOCK write at 0x%x", regoff); + isp_prt(isp, ISP_LOGERR, "SXP_BLOCK write at 0x%x", regoff); return; case RISC_BLOCK: - isp_prt(isp, ISP_LOGWARN, "RISC_BLOCK write at 0x%x", regoff); + isp_prt(isp, ISP_LOGERR, "RISC_BLOCK write at 0x%x", regoff); return; case DMA_BLOCK: - isp_prt(isp, ISP_LOGWARN, "DMA_BLOCK write at 0x%x", regoff); + isp_prt(isp, ISP_LOGERR, "DMA_BLOCK write at 0x%x", regoff); return; default: - isp_prt(isp, ISP_LOGWARN, "unknown block write at 0x%x", - regoff); + isp_prt(isp, ISP_LOGERR, "unknown block write at 0x%x", regoff); break; } @@ -1421,10 +1428,83 @@ isp_pci_wr_reg_2400(ispsoftc_t *isp, int MEMORYBARRIER(isp, SYNC_REG, IspVirt2Off(isp, regoff), 4, -1); break; default: - isp_prt(isp, ISP_LOGERR, - "isp_pci_wr_reg_2400: bad offset 0x%x", regoff); + isp_prt(isp, ISP_LOGERR, "unknown register write at 0x%x", + regoff); + break; + } +} + +static uint32_t +isp_pci_rd_reg_2600(ispsoftc_t *isp, int regoff) +{ + uint32_t rv; + + switch (regoff) { + case BIU2400_PRI_REQINP: + case BIU2400_PRI_REQOUTP: + isp_prt(isp, ISP_LOGERR, "unknown register read at 0x%x", + regoff); + rv = 0xffffffff; + break; + case BIU2400_REQINP: + rv = B2R4(isp, 0x00); + break; + case BIU2400_REQOUTP: + rv = B2R4(isp, 0x04); + break; + case BIU2400_RSPINP: + rv = B2R4(isp, 0x08); + break; + case BIU2400_RSPOUTP: + rv = B2R4(isp, 0x0c); + break; + case BIU2400_ATIO_RSPINP: + rv = B2R4(isp, 0x10); + break; + case BIU2400_ATIO_RSPOUTP: + rv = B2R4(isp, 0x14); + break; + default: + rv = isp_pci_rd_reg_2400(isp, regoff); break; } + return (rv); +} + +static void +isp_pci_wr_reg_2600(ispsoftc_t *isp, int regoff, uint32_t val) +{ + int off; + + switch (regoff) { + case BIU2400_PRI_REQINP: + case BIU2400_PRI_REQOUTP: + isp_prt(isp, ISP_LOGERR, "unknown register write at 0x%x", + regoff); + return; + case BIU2400_REQINP: + off = 0x00; + break; + case BIU2400_REQOUTP: + off = 0x04; + break; + case BIU2400_RSPINP: + off = 0x08; + break; + case BIU2400_RSPOUTP: + off = 0x0c; + break; + case BIU2400_ATIO_RSPINP: + off = 0x10; + break; + case BIU2400_ATIO_RSPOUTP: + off = 0x14; + break; + default: + isp_pci_wr_reg_2400(isp, regoff, val); + return; + } + B2W4(isp, off, val); } Modified: head/sys/dev/isp/isp_sbus.c ============================================================================== --- head/sys/dev/isp/isp_sbus.c Fri Dec 4 19:32:51 2015 (r291820) +++ head/sys/dev/isp/isp_sbus.c Fri Dec 4 19:46:49 2015 (r291821) @@ -180,8 +180,7 @@ isp_sbus_attach(device_t dev) sbs->sbus_poff[RISC_BLOCK >> _BLK_REG_SHFT] = SBUS_RISC_REGS_OFF; sbs->sbus_poff[DMA_BLOCK >> _BLK_REG_SHFT] = DMA_REGS_OFF; isp = &sbs->sbus_isp; - isp->isp_bus_tag = rman_get_bustag(sbs->regs); - isp->isp_bus_handle = rman_get_bushandle(sbs->regs); + isp->isp_regs = sbs->regs; isp->isp_mdvec = &sbs->sbus_mdvec; isp->isp_bustype = ISP_BT_SBUS; isp->isp_type = ISP_HA_SCSI_UNKNOWN; @@ -367,16 +366,15 @@ isp_sbus_detach(device_t dev) (((struct isp_sbussoftc *)a)->sbus_poff[((x) & _BLK_REG_MASK) >> \ _BLK_REG_SHFT] + ((x) & 0xff)) -#define BXR2(sbc, off) \ - bus_space_read_2(isp->isp_bus_tag, isp->isp_bus_handle, off) +#define BXR2(isp, off) bus_read_2((isp)->isp_regs, (off)) static int isp_sbus_rd_isr(ispsoftc_t *isp, uint16_t *isrp, uint16_t *semap, uint16_t *info) { uint16_t isr, sema; - isr = BXR2(sbc, IspVirt2Off(isp, BIU_ISR)); - sema = BXR2(sbc, IspVirt2Off(isp, BIU_SEMA)); + isr = BXR2(isp, IspVirt2Off(isp, BIU_ISR)); + sema = BXR2(isp, IspVirt2Off(isp, BIU_SEMA)); isp_prt(isp, ISP_LOGDEBUG3, "ISR 0x%x SEMA 0x%x", isr, sema); isr &= INT_PENDING_MASK(isp); sema &= BIU_SEMA_LOCK; @@ -385,7 +383,7 @@ isp_sbus_rd_isr(ispsoftc_t *isp, uint16_ } *isrp = isr; if ((*semap = sema) != 0) - *info = BXR2(sbc, IspVirt2Off(isp, OUTMAILBOX0)); + *info = BXR2(isp, IspVirt2Off(isp, OUTMAILBOX0)); return (1); } @@ -396,7 +394,7 @@ isp_sbus_rd_reg(ispsoftc_t *isp, int reg struct isp_sbussoftc *sbs = (struct isp_sbussoftc *) isp; int offset = sbs->sbus_poff[(regoff & _BLK_REG_MASK) >> _BLK_REG_SHFT]; offset += (regoff & 0xff); - rval = bus_space_read_2(isp->isp_bus_tag, isp->isp_bus_handle, offset); + rval = BXR2(isp, offset); isp_prt(isp, ISP_LOGDEBUG3, "isp_sbus_rd_reg(off %x) = %x", regoff, rval); return (rval); @@ -410,7 +408,7 @@ isp_sbus_wr_reg(ispsoftc_t *isp, int reg offset += (regoff & 0xff); isp_prt(isp, ISP_LOGDEBUG3, "isp_sbus_wr_reg(off %x) = %x", regoff, val); - bus_space_write_2(isp->isp_bus_tag, isp->isp_bus_handle, offset, val); + bus_write_2(isp->isp_regs, offset, val); MEMORYBARRIER(isp, SYNC_REG, offset, 2, -1); } From owner-svn-src-all@freebsd.org Fri Dec 4 20:03:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB590A41933 for ; Fri, 4 Dec 2015 20:03:42 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1.freebsd.org (Postfix) with SMTP id 6ADE31616 for ; Fri, 4 Dec 2015 20:03:41 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: (qmail 86646 invoked by uid 99); 4 Dec 2015 20:03:40 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2015 20:03:40 +0000 Received: from [192.168.0.103] (unknown [181.55.232.163]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 9F9421A01D7; Fri, 4 Dec 2015 20:03:37 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r291741 - head/sys/geom From: Pedro Giffuni In-Reply-To: <20151205031713.T3286@besplex.bde.org> Date: Fri, 4 Dec 2015 15:03:34 -0500 Cc: Andrew Turner , Bryan Drewery , "Kenneth D. Merry" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201512040338.tB43cZY1053263@repo.freebsd.org> <56610B6B.8010708@FreeBSD.org> <20151204233052.J2220@besplex.bde.org> <20151204125355.6712d782@bender> <20151205031713.T3286@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 20:03:42 -0000 > Il giorno 04/dic/2015, alle ore 13:03, Bruce Evans = ha scritto: >=20 > On Fri, 4 Dec 2015, Andrew Turner wrote: >=20 >> On Fri, 4 Dec 2015 23:42:51 +1100 (EST) >> Bruce Evans wrote: >> ... >>> This looks like 5 style bugs and 0 issues: >>>=20 >>> 3 old style bugs: >>> - use of bool >>=20 >> I don't seem to see where in style(9) we disallow the use of bool. = Can >> you point me where this is specified? >=20 > This is specified by not giving an example of using it. style(9) was > mostly written 10+ years before bool existed, and bool is so > (un)important that style(9) wasn't changed to allow it in its 16+ > years of existence. >=20 We had this discussion before for ddb: bool won (I think). Pedro. From owner-svn-src-all@freebsd.org Fri Dec 4 20:41:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53DE8A41F67; Fri, 4 Dec 2015 20:41:46 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 086A1193A; Fri, 4 Dec 2015 20:41:45 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4Kfj9T063935; Fri, 4 Dec 2015 20:41:45 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4Kfj7T063934; Fri, 4 Dec 2015 20:41:45 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201512042041.tB4Kfj7T063934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Fri, 4 Dec 2015 20:41:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291823 - stable/10/usr.bin/xinstall X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 20:41:46 -0000 Author: bapt Date: Fri Dec 4 20:41:44 2015 New Revision: 291823 URL: https://svnweb.freebsd.org/changeset/base/291823 Log: MFC: r291091 install: do not follow symlinks In case the target of install is a dead symlink, install(1) used to not consider it as "existing" because of the usage of stat(2) instead of lstat(2). meaning the old file (the symlink) is not removed before the new file is created. The symlink is being followed and the new file becoming the target of the symlink instead of the target of install(1) Reviewed by: jhb, brooks Differential Revision: https://reviews.freebsd.org/D4191 Modified: stable/10/usr.bin/xinstall/xinstall.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/xinstall/xinstall.c ============================================================================== --- stable/10/usr.bin/xinstall/xinstall.c Fri Dec 4 20:12:49 2015 (r291822) +++ stable/10/usr.bin/xinstall/xinstall.c Fri Dec 4 20:41:44 2015 (r291823) @@ -748,10 +748,7 @@ install(const char *from_name, const cha devnull = 1; } - if (!dolink) - target = (stat(to_name, &to_sb) == 0); - else - target = (lstat(to_name, &to_sb) == 0); + target = (lstat(to_name, &to_sb) == 0); if (dolink) { if (target && !safecopy) { @@ -766,8 +763,7 @@ install(const char *from_name, const cha return; } - /* Only install to regular files. */ - if (target && !S_ISREG(to_sb.st_mode)) { + if (target && !S_ISREG(to_sb.st_mode) && !S_ISLNK(to_sb.st_mode)) { errno = EFTYPE; warn("%s", to_name); return; @@ -780,7 +776,7 @@ install(const char *from_name, const cha err(EX_OSERR, "%s", from_name); /* If we don't strip, we can compare first. */ - if (docompare && !dostrip && target) { + if (docompare && !dostrip && target && S_ISREG(to_sb.st_mode)) { if ((to_fd = open(to_name, O_RDONLY, 0)) < 0) err(EX_OSERR, "%s", to_name); if (devnull) @@ -832,7 +828,7 @@ install(const char *from_name, const cha /* * Compare the stripped temp file with the target. */ - if (docompare && dostrip && target) { + if (docompare && dostrip && target && S_ISREG(to_sb.st_mode)) { temp_fd = to_fd; /* Re-open to_fd using the real target name. */ @@ -866,9 +862,7 @@ install(const char *from_name, const cha } (void) close(temp_fd); } - } - - if (dostrip && (!docompare || !target)) + } else if (dostrip) digestresult = digest_file(tempfile); /* From owner-svn-src-all@freebsd.org Fri Dec 4 21:09:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C5975A41362; Fri, 4 Dec 2015 21:09:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 8992714C4; Fri, 4 Dec 2015 21:09:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id E4C10D4A3D2; Sat, 5 Dec 2015 07:42:19 +1100 (AEDT) Date: Sat, 5 Dec 2015 07:42:18 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bryan Drewery cc: Bruce Evans , Andrew Turner , "Kenneth D. Merry" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r291741 - head/sys/geom In-Reply-To: <5661E52D.6050305@FreeBSD.org> Message-ID: <20151205064802.B4095@besplex.bde.org> References: <201512040338.tB43cZY1053263@repo.freebsd.org> <56610B6B.8010708@FreeBSD.org> <20151204233052.J2220@besplex.bde.org> <20151204125355.6712d782@bender> <20151205031713.T3286@besplex.bde.org> <5661E52D.6050305@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=PfoC/XVd c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=rH8xk3a0tr3JDTjPH1AA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 21:09:21 -0000 On Fri, 4 Dec 2015, Bryan Drewery wrote: > On 12/4/2015 10:03 AM, Bruce Evans wrote: >> This is specified by not giving an example of using it. style(9) was > > I really take issue with this stance. I don't think you really mean what > this implies. For example, can I even use 'x++' or mtx_lock(9) or > uintptr_t since they are not shown in an example? mtx_lock() is just another function, so it doesn't need an example any more than printf(). printf() also happens to have no example, but there is a formal rule for it an example for fprintf(). '++' is just a standard operator. style(9) happens to have an example of it, though not on a variable named x. It even has the bad example of ++p instead of p++ where the result is not used. ++p is more logical and I used to prefer it, but only p++ is KNF-normal. style(9) has even more detailed rules for uintXX_t, but no examples, and nothing for uintptr_t. uintptr_t can be considered as just another typedef. The rule about uintXX_t is mainly part of deprecating the old spelling u_intXX_t. I wouldn't trust style(9) for anything except simple formatting, but look at the subsystem(s) style. Just the top level of geom has 11000+ lines which can be considered as giving about 20 times more examples than style(9). Bruce From owner-svn-src-all@freebsd.org Fri Dec 4 21:11:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B726A4140E; Fri, 4 Dec 2015 21:11:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 673A218F4; Fri, 4 Dec 2015 21:11:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4LBHm7070077; Fri, 4 Dec 2015 21:11:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4LBHGo070076; Fri, 4 Dec 2015 21:11:17 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512042111.tB4LBHGo070076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 4 Dec 2015 21:11:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291824 - stable/10/usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 21:11:18 -0000 Author: bdrewery Date: Fri Dec 4 21:11:17 2015 New Revision: 291824 URL: https://svnweb.freebsd.org/changeset/base/291824 Log: Fix mis-merge in r291816, nl_defs.h not used here. Modified: stable/10/usr.bin/netstat/Makefile Modified: stable/10/usr.bin/netstat/Makefile ============================================================================== --- stable/10/usr.bin/netstat/Makefile Fri Dec 4 20:41:44 2015 (r291823) +++ stable/10/usr.bin/netstat/Makefile Fri Dec 4 21:11:17 2015 (r291824) @@ -6,7 +6,7 @@ PROG= netstat SRCS= if.c inet.c main.c mbuf.c mroute.c netisr.c route.c \ unix.c atalk.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c \ - flowtable.c nl_defs.h + flowtable.c WARNS?= 3 CFLAGS+=-fno-strict-aliasing From owner-svn-src-all@freebsd.org Fri Dec 4 21:51:30 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 675F7A419D7; Fri, 4 Dec 2015 21:51:30 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x241.google.com (mail-pa0-x241.google.com [IPv6:2607:f8b0:400e:c03::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 318A91513; Fri, 4 Dec 2015 21:51:30 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by padhk6 with SMTP id hk6so12438389pad.2; Fri, 04 Dec 2015 13:51:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/5801M+Oj6hNrpr6PLeAI63eiKoJC6rQn0xgvC8Usnw=; b=bzqxusHywjZ+/r7q1kkin/mA4zbrPBmknYXzZvWAyB1wRvPrnMJZxHW4fpYvxlTz0L kP3T6gOnhQoCHMabWD6bfUaB1v3wx3tb3f9lAVEUAXyP4/aUTz7siyXQFBE6vruO2On+ KN5jXqtN48uTYgv/tXvuyzkZd/Hz7LRwPpIEK4Q0OFJ9AoB5E+z3lZppd2QLGYu4MgPN k+pR5s+7BsgUDz5zEk1RA9i1SDoxFbXPd8OTOdEwsBzgno2VoibQuz4yx7cXx04wt2Km smkRWrgDTNk6ITTJIbeek6WX2XDQBMcmeSApFlW33RdCBgk8Q9nR46X2YuVuGUjc53VH nNYA== X-Received: by 10.66.55.72 with SMTP id q8mr24893108pap.136.1449265889569; Fri, 04 Dec 2015 13:51:29 -0800 (PST) Received: from [22.7.185.75] ([172.56.16.161]) by smtp.gmail.com with ESMTPSA id q65sm19056762pfa.18.2015.12.04.13.51.27 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Dec 2015 13:51:27 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r291741 - head/sys/geom From: Garrett Cooper X-Mailer: iPhone Mail (13B143) In-Reply-To: <20151205064802.B4095@besplex.bde.org> Date: Fri, 4 Dec 2015 13:51:26 -0800 Cc: Bryan Drewery , Andrew Turner , "Kenneth D. Merry" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201512040338.tB43cZY1053263@repo.freebsd.org> <56610B6B.8010708@FreeBSD.org> <20151204233052.J2220@besplex.bde.org> <20151204125355.6712d782@bender> <20151205031713.T3286@besplex.bde.org> <5661E52D.6050305@FreeBSD.org> <20151205064802.B4095@besplex.bde.org> To: Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 21:51:30 -0000 > On Dec 4, 2015, at 12:42, Bruce Evans wrote: ... > I wouldn't trust style(9) for anything except simple formatting, but > look at the subsystem(s) style. Just the top level of geom has 11000+ > lines which can be considered as giving about 20 times more examples > than style(9). It would be nice if we had more explicit rules in style(9).. Subtle interpre= tation like this is best left for philosophical and religious texts. The amount of time spent on checking code style (both your's, which is appre= ciated, and others), because style(9) wasn't explicit in areas is time bette= r spent on other things. -NGie= From owner-svn-src-all@freebsd.org Fri Dec 4 23:22:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59492A40962; Fri, 4 Dec 2015 23:22:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3585E1D8A; Fri, 4 Dec 2015 23:22:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4NM7NC011158; Fri, 4 Dec 2015 23:22:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4NM7k0011157; Fri, 4 Dec 2015 23:22:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201512042322.tB4NM7k0011157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 4 Dec 2015 23:22:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291825 - head/tools/tools/nanobsd/pcengines X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 23:22:08 -0000 Author: imp Date: Fri Dec 4 23:22:07 2015 New Revision: 291825 URL: https://svnweb.freebsd.org/changeset/base/291825 Log: Since this is an almost identical copy of ALIX_DSK, just include it and add the bits we need at the end. Modified: head/tools/tools/nanobsd/pcengines/ALIX_NFS Modified: head/tools/tools/nanobsd/pcengines/ALIX_NFS ============================================================================== --- head/tools/tools/nanobsd/pcengines/ALIX_NFS Fri Dec 4 21:11:17 2015 (r291824) +++ head/tools/tools/nanobsd/pcengines/ALIX_NFS Fri Dec 4 23:22:07 2015 (r291825) @@ -2,119 +2,8 @@ # $FreeBSD$ # -cpu I586_CPU -ident ALIX_DSK -makeoptions DEBUG=-g -options CPU_GEODE -options SCHED_ULE -options PREEMPTION -options INET -options INET6 -options FFS -options SOFTUPDATES -options UFS_ACL -options UFS_DIRHASH -options NFSCL # Network Filesystem Client -options NFSLOCKD -options MSDOSFS -options CD9660 -options PROCFS -options PSEUDOFS -options GEOM_PART_GPT -options GEOM_LABEL -options COMPAT_43TTY -options COMPAT_FREEBSD4 # Compatible with FreeBSD4 -options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options COMPAT_FREEBSD9 # Compatible with FreeBSD9 -options COMPAT_FREEBSD10 # Compatible with FreeBSD10 -options SCSI_DELAY=5000 -options SYSVSHM -options SYSVMSG -options SYSVSEM -options P1003_1B_SEMAPHORES -options _KPOSIX_PRIORITY_SCHEDULING -options PRINTF_BUFR_SIZE=128 -device apic -device pci -device fdc -device ata -device atadisk -device atapicd -device atapist -options ATA_STATIC_ID -device scbus -device da -device sa -device cd -device pass -device uart -device em -device miibus -device vr -device wlan -options IEEE80211_DEBUG -options IEEE80211_AMPDU_AGE -options IEEE80211_SUPPORT_MESH -device wlan_wep -device wlan_ccmp -device wlan_tkip -device wlan_amrr -device an -device ath -device ath_hal -options AH_SUPPORT_AR5416 -device ath_rate_sample -device wi -device loop -device random -device ether -device tun -device pty -device md -device gif -device firmware -device bpf -device uhci -device ohci -device ehci -device usb -device ulpt -device umass -device u3g -device ubsa -device uftdi - -options INCLUDE_CONFIG_FILE - -options ALTQ -options ALTQ_CBQ -options ALTQ_RED -options ALTQ_RIO -options ALTQ_HFSC -options ALTQ_CDNR -options ALTQ_PRIQ - -device pf -device pflog -device pfsync -device carp -device if_bridge - -options DEVICE_POLLING - -options NETGRAPH -options NETGRAPH_BPF -options NETGRAPH_ETHER -options NETGRAPH_IFACE -options NETGRAPH_PPP -options NETGRAPH_PPPOE -options NETGRAPH_PPTPGRE -options NETGRAPH_MPPC_ENCRYPTION -options NETGRAPH_SOCKET -options NETGRAPH_KSOCKET -options NETGRAPH_VJC +include ALIX_DSK +ident ALIX_NFS options NFS_ROOT options BOOTP From owner-svn-src-all@freebsd.org Fri Dec 4 23:31:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57813A40ADA; Fri, 4 Dec 2015 23:31:33 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 219281225; Fri, 4 Dec 2015 23:31:33 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4NVWse014796; Fri, 4 Dec 2015 23:31:32 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4NVWFL014795; Fri, 4 Dec 2015 23:31:32 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201512042331.tB4NVWFL014795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Fri, 4 Dec 2015 23:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291826 - head/sys/dev/ioat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 23:31:33 -0000 Author: cem Date: Fri Dec 4 23:31:32 2015 New Revision: 291826 URL: https://svnweb.freebsd.org/changeset/base/291826 Log: ioat(4): Add MODULE_VERSION so MODULE_DEPEND works Suggested by: jhb Review in progress: cc Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ioat/ioat.c Modified: head/sys/dev/ioat/ioat.c ============================================================================== --- head/sys/dev/ioat/ioat.c Fri Dec 4 23:22:07 2015 (r291825) +++ head/sys/dev/ioat/ioat.c Fri Dec 4 23:31:32 2015 (r291826) @@ -141,6 +141,7 @@ static driver_t ioat_pci_driver = { static devclass_t ioat_devclass; DRIVER_MODULE(ioat, pci, ioat_pci_driver, ioat_devclass, 0, 0); +MODULE_VERSION(ioat, 1); /* * Private data structures From owner-svn-src-all@freebsd.org Fri Dec 4 23:44:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67B8AA40D63; Fri, 4 Dec 2015 23:44:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 327181A88; Fri, 4 Dec 2015 23:44:35 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB4NiYbi018678; Fri, 4 Dec 2015 23:44:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB4NiYF0018677; Fri, 4 Dec 2015 23:44:34 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201512042344.tB4NiYF0018677@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 4 Dec 2015 23:44:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291827 - head/tools/tools/nanobsd/pcengines X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 23:44:35 -0000 Author: imp Date: Fri Dec 4 23:44:34 2015 New Revision: 291827 URL: https://svnweb.freebsd.org/changeset/base/291827 Log: Remove commented out junk. Modified: head/tools/tools/nanobsd/pcengines/common.conf Modified: head/tools/tools/nanobsd/pcengines/common.conf ============================================================================== --- head/tools/tools/nanobsd/pcengines/common.conf Fri Dec 4 23:31:32 2015 (r291826) +++ head/tools/tools/nanobsd/pcengines/common.conf Fri Dec 4 23:44:34 2015 (r291827) @@ -13,9 +13,6 @@ NANO_RAM_TMPVARSIZE=40960 NANO_PMAKE="make -j 8" NANO_MD_BACKING="swap" -#NANO_MAKEFS="makefs \ -# -o bsize=4096,fsize=512,density=8192,optimization=space" -#export NANO_MAKEFS # Options to put in make.conf during buildworld only CONF_BUILD=' @@ -26,7 +23,6 @@ CONF_INSTALL=' ' # Options to put in make.conf during both build- & installworld. CONF_WORLD=' -#TARGET_ARCH=i386 CFLAGS=-O -pipe WITHOUT_ACPI= WITHOUT_TESTS= From owner-svn-src-all@freebsd.org Sat Dec 5 00:15:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5075A4148B; Sat, 5 Dec 2015 00:15:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A251A177E; Sat, 5 Dec 2015 00:15:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB50F4vp029486; Sat, 5 Dec 2015 00:15:04 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB50F4Tl029485; Sat, 5 Dec 2015 00:15:04 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201512050015.tB50F4Tl029485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 5 Dec 2015 00:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291828 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 00:15:06 -0000 Author: imp Date: Sat Dec 5 00:15:04 2015 New Revision: 291828 URL: https://svnweb.freebsd.org/changeset/base/291828 Log: Minor cleanup in how we run make: o Move SRCCONF and __MAKE_CONF into the environment to cope with file paths with spaces in them better. o Move the rest of the variable setting command line args into __MAKE_CONF files. o Trace the commands that we're using to build so they appear at the top of the log. o Be more consistent about quoting paths for cd and similar commands to better cope with paths with spaces in them, though some more work is likely needed. o Add some comments about all this. o Minor formatting tweaks in a couple places Sponsored by: Netflix, Inc Modified: head/tools/tools/nanobsd/defaults.sh Modified: head/tools/tools/nanobsd/defaults.sh ============================================================================== --- head/tools/tools/nanobsd/defaults.sh Fri Dec 4 23:44:34 2015 (r291827) +++ head/tools/tools/nanobsd/defaults.sh Sat Dec 5 00:15:04 2015 (r291828) @@ -188,6 +188,47 @@ SRCCONF=${SRCCONF:=/dev/null} # ####################################################################### +# Export values into the shell. Must use { } instead of ( ) like +# other functions to avoid a subshell. +# We set __MAKE_CONF as a global since it is easier to get quoting +# right for paths with spaces in them. +make_export ( ) { + # Similar to export_var, except puts the data out to stdout + var=$1 + eval val=\$$var + echo "Setting variable: $var=\"$val\"" + export $1 +} + +nano_make_build_env ( ) { + __MAKE_CONF="${NANO_MAKE_CONF_BUILD}" + make_export __MAKE_CONF +} + +nano_make_install_env ( ) { + __MAKE_CONF="${NANO_MAKE_CONF_INSTALL}" + make_export __MAKE_CONF +} + +# Extra environment variables for kernel builds +nano_make_kernel_env ( ) { + if [ -f ${NANO_KERNEL} ] ; then + KERNCONFDIR="$(realpath $(dirname ${NANO_KERNEL}))" + KERNCONF="$(basename ${NANO_KERNEL})" + make_export KERNCONFDIR + make_export KERNCONF + else + export KERNCONF="${NANO_KERNEL}" + make_export KERNCONF + fi +} + +nano_global_make_env ( ) ( + [ ! -z "${NANO_ARCH}" ] && echo TARGET_ARCH="${NANO_ARCH}" + [ ! -z "${NANO_CPUTYPE}" ] && echo TARGET_CPUTYPE="${NANO_CPUTYPE}" + echo SRCCONF=${SRCCONF} +) + # rm doesn't know -x prior to FreeBSD 10, so cope with a variety of build # hosts for now. nano_rm ( ) { @@ -198,15 +239,13 @@ nano_rm ( ) { } # run in the world chroot, errors fatal -CR() -{ - chroot ${NANO_WORLDDIR} /bin/sh -exc "$*" +CR ( ) { + chroot "${NANO_WORLDDIR}" /bin/sh -exc "$*" } # run in the world chroot, errors not fatal -CR0() -{ - chroot ${NANO_WORLDDIR} /bin/sh -c "$*" || true +CR0 ( ) { + chroot "${NANO_WORLDDIR}" /bin/sh -c "$*" || true } nano_cleanup ( ) ( @@ -231,19 +270,25 @@ make_conf_build ( ) ( mkdir -p ${MAKEOBJDIRPREFIX} printenv > ${MAKEOBJDIRPREFIX}/_.env - echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_BUILD} - echo "${CONF_BUILD}" >> ${NANO_MAKE_CONF_BUILD} + # Make sure we get all the global settings that NanoBSD wants + # in addition to the user's global settings + ( + nano_global_make_env + echo "${CONF_WORLD}" + echo "${CONF_BUILD}" + ) > ${NANO_MAKE_CONF_BUILD} ) build_world ( ) ( pprint 2 "run buildworld" pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bw" - cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} TARGET_CPUTYPE=${NANO_CPUTYPE} ${NANO_PMAKE} \ - SRCCONF=${SRCCONF} \ - __MAKE_CONF=${NANO_MAKE_CONF_BUILD} buildworld \ - > ${MAKEOBJDIRPREFIX}/_.bw 2>&1 + ( + nano_make_build_env + set -o xtrace + cd "${NANO_SRC}" + ${NANO_PMAKE} buildworld + ) > ${MAKEOBJDIRPREFIX}/_.bw 2>&1 ) build_kernel ( ) ( @@ -253,20 +298,16 @@ build_kernel ( ) ( pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bk" ( - if [ -f ${NANO_KERNEL} ] ; then - kernconfdir_arg="KERNCONFDIR='$(realpath $(dirname ${NANO_KERNEL}))'" - kernconf=$(basename ${NANO_KERNEL}) - else - kernconf=${NANO_KERNEL} - fi + nano_make_build_env + nano_make_kernel_env - cd ${NANO_SRC}; # Note: We intentionally build all modules, not only the ones in # NANO_MODULES so the built world can be reused by multiple images. - eval "TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ - SRCCONF='${SRCCONF}' \ - __MAKE_CONF='${NANO_MAKE_CONF_BUILD}' \ - ${kernconfdir_arg} KERNCONF=${kernconf}" + # Although MODULES_OVERRIDE can be defined in the kenrel config + # file to override this behavior. Just set NANO_MODULES=default. + set -o xtrace + cd "${NANO_SRC}" + ${NANO_PMAKE} buildkernel ) > ${MAKEOBJDIRPREFIX}/_.bk 2>&1 ) @@ -277,36 +318,41 @@ clean_world ( ) ( chflags -R noschg ${NANO_OBJ} nano_rm -r ${NANO_OBJ}/ fi - mkdir -p ${NANO_OBJ} ${NANO_WORLDDIR} + mkdir -p "${NANO_OBJ}" "${NANO_WORLDDIR}" printenv > ${NANO_OBJ}/_.env else pprint 2 "Clean and create world directory (${NANO_WORLDDIR})" - if ! nano_rm -rf ${NANO_WORLDDIR}/ > /dev/null 2>&1 ; then - chflags -R noschg ${NANO_WORLDDIR} - nano_rm -rf ${NANO_WORLDDIR}/ + if ! nano_rm -rf "${NANO_WORLDDIR}/" > /dev/null 2>&1 ; then + chflags -R noschg "${NANO_WORLDDIR}" + nano_rm -rf "${NANO_WORLDDIR}/" fi - mkdir -p ${NANO_WORLDDIR} + mkdir -p "${NANO_WORLDDIR}" fi ) make_conf_install ( ) ( pprint 2 "Construct install make.conf ($NANO_MAKE_CONF_INSTALL)" - echo "${CONF_WORLD}" > ${NANO_MAKE_CONF_INSTALL} - echo "${CONF_INSTALL}" >> ${NANO_MAKE_CONF_INSTALL} + # Make sure we get all the global settings that NanoBSD wants + # in addition to the user's global settings + ( + nano_global_make_env + echo "${CONF_WORLD}" + echo "${CONF_INSTALL}" + ) > ${NANO_MAKE_CONF_INSTALL} ) install_world ( ) ( pprint 2 "installworld" pprint 3 "log: ${NANO_OBJ}/_.iw" - cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} TARGET_CPUTYPE=${NANO_CPUTYPE} \ - ${NANO_MAKE} SRCCONF=${SRCCONF} \ - __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} installworld \ - DESTDIR=${NANO_WORLDDIR} \ - > ${NANO_OBJ}/_.iw 2>&1 - chflags -R noschg ${NANO_WORLDDIR} + ( + nano_make_install_env + set -o xtrace + cd "${NANO_SRC}" + ${NANO_MAKE} installworld DESTDIR="${NANO_WORLDDIR}" + chflags -R noschg "${NANO_WORLDDIR}" + ) > ${NANO_OBJ}/_.iw 2>&1 ) install_etc ( ) ( @@ -314,15 +360,15 @@ install_etc ( ) ( pprint 2 "install /etc" pprint 3 "log: ${NANO_OBJ}/_.etc" - cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} TARGET_CPUTYPE=${NANO_CPUTYPE} \ - ${NANO_MAKE} SRCCONF=${SRCCONF} \ - __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} distribution \ - DESTDIR=${NANO_WORLDDIR} \ - > ${NANO_OBJ}/_.etc 2>&1 + ( + nano_make_install_env + set -o xtrace + cd "${NANO_SRC}" + ${NANO_MAKE} distribution DESTDIR="${NANO_WORLDDIR}" # make.conf doesn't get created by default, but some ports need it # so they can spam it. - cp /dev/null ${NANO_WORLDDIR}/etc/make.conf + cp /dev/null "${NANO_WORLDDIR}"/etc/make.conf + ) > ${NANO_OBJ}/_.etc 2>&1 ) install_kernel ( ) ( @@ -332,27 +378,19 @@ install_kernel ( ) ( pprint 3 "log: ${NANO_OBJ}/_.ik" ( - if [ -f ${NANO_KERNEL} ] ; then - kernconfdir_arg="KERNCONFDIR='$(realpath $(dirname ${NANO_KERNEL}))'" - kernconf=$(basename ${NANO_KERNEL}) - else - kernconf=${NANO_KERNEL} - fi - # Install all built modules if NANO_MODULES=default, - # else install only listed modules (none if NANO_MODULES is empty). + nano_make_install_env + nano_make_kernel_env + if [ "${NANO_MODULES}" != "default" ]; then - modules_override_arg="MODULES_OVERRIDE='${NANO_MODULES}'" + MODULES_OVERRIDE="${NANO_MODULES}" + make_export MODULES_OVERRIDE fi - cd ${NANO_SRC} - eval "TARGET_ARCH=${NANO_ARCH} TARGET_CPUTYPE=${NANO_CPUTYPE} \ - ${NANO_MAKE} installkernel \ - DESTDIR='${NANO_WORLDDIR}' \ - SRCCONF='${SRCCONF}' \ - __MAKE_CONF='${NANO_MAKE_CONF_INSTALL}' \ - ${kernconfdir_arg} KERNCONF=${kernconf} \ - ${modules_override_arg}" + set -o xtrace + cd "${NANO_SRC}" + ${NANO_MAKE} installkernel DESTDIR="${NANO_WORLDDIR}" + ) > ${NANO_OBJ}/_.ik 2>&1 ) @@ -360,15 +398,17 @@ native_xtools ( ) ( print 2 "Installing the optimized native build tools for cross env" pprint 3 "log: ${NANO_OBJ}/_.native_xtools" - cd ${NANO_SRC} - env TARGET_ARCH=${NANO_ARCH} TARGET_CPUTYPE=${NANO_CPUTYPE} \ - ${NANO_MAKE} SRCCONF=${SRCCONF} \ - __MAKE_CONF=${NANO_MAKE_CONF_INSTALL} native-xtools \ - DESTDIR=${NANO_WORLDDIR} \ - > ${NANO_OBJ}/_.native_xtools 2>&1 + ( + + nano_make_install_env + set -o xtrace + cd "${NANO_SRC}" + ${NANO_MAKE} native-xtools DESTDIR="${NANO_WORLDDIR}" + + ) > ${NANO_OBJ}/_.native_xtools 2>&1 ) -run_customize() ( +run_customize ( ) ( pprint 2 "run customize scripts" for c in $NANO_CUSTOMIZE @@ -380,7 +420,7 @@ run_customize() ( done ) -run_late_customize() ( +run_late_customize ( ) ( pprint 2 "run late customize scripts" for c in $NANO_LATE_CUSTOMIZE @@ -397,7 +437,7 @@ setup_nanobsd ( ) ( pprint 3 "log: ${NANO_OBJ}/_.dl" ( - cd ${NANO_WORLDDIR} + cd "${NANO_WORLDDIR}" # Move /usr/local/etc to /etc/local so that the /cfg stuff # can stomp on it. Otherwise packages like ipsec-tools which @@ -439,7 +479,7 @@ setup_nanobsd_etc ( ) ( pprint 2 "configure nanobsd /etc" ( - cd ${NANO_WORLDDIR} + cd "${NANO_WORLDDIR}" # create diskless marker file touch etc/diskless @@ -456,10 +496,10 @@ setup_nanobsd_etc ( ) ( ) ) -prune_usr() ( +prune_usr ( ) ( # Remove all empty directories in /usr - find ${NANO_WORLDDIR}/usr -type d -depth -print | + find "${NANO_WORLDDIR}"/usr -type d -depth -print | while read d do rmdir $d > /dev/null 2>&1 || true @@ -478,7 +518,7 @@ newfs_part ( ) ( # Convenient spot to work around any umount issues that your build environment # hits by overriding this method. -nano_umount () ( +nano_umount ( ) ( umount ${1} ) @@ -492,7 +532,7 @@ populate_slice ( ) ( newfs_part ${dev} ${mnt} ${lbl} if [ -n "${dir}" -a -d "${dir}" ]; then echo "Populating ${lbl} from ${dir}" - cd ${dir} + cd "${dir}" find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -dumpv ${mnt} fi df -i ${mnt} @@ -615,9 +655,9 @@ create_diskimage ( ) ( populate_slice /dev/${MD}${NANO_SLICE_ROOT}a ${NANO_WORLDDIR} ${MNT} "${NANO_SLICE_ROOT}a" mount /dev/${MD}${NANO_SLICE_ROOT}a ${MNT} echo "Generating mtree..." - ( cd ${MNT} && mtree -c ) > ${NANO_OBJ}/_.mtree - ( cd ${MNT} && du -k ) > ${NANO_OBJ}/_.du - nano_umount ${MNT} + ( cd "${MNT}" && mtree -c ) > ${NANO_OBJ}/_.mtree + ( cd "${MNT}" && du -k ) > ${NANO_OBJ}/_.du + nano_umount "${MNT}" if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then # Duplicate to second image (if present) @@ -674,7 +714,7 @@ create_diskimage ( ) ( ) > ${NANO_OBJ}/_.di 2>&1 ) -last_orders () ( +last_orders ( ) ( # Redefine this function with any last orders you may have # after the build completed, for instance to copy the finished # image to a more convenient place: @@ -692,7 +732,7 @@ last_orders () ( # Common Flash device geometries # -FlashDevice () { +FlashDevice ( ) { if [ -d ${NANO_TOOLS} ] ; then . ${NANO_TOOLS}/FlashDevice.sub else @@ -721,7 +761,7 @@ FlashDevice () { # The generic-hdd device is preferred for flash devices larger than 1GB. # -UsbDevice () { +UsbDevice ( ) { a1=`echo $1 | tr '[:upper:]' '[:lower:]'` case $a1 in generic-fdd) @@ -744,7 +784,7 @@ UsbDevice () { ####################################################################### # Setup serial console -cust_comconsole () ( +cust_comconsole ( ) ( # Enable getty on console sed -i "" -e /tty[du]0/s/off/on/ ${NANO_WORLDDIR}/etc/ttys @@ -758,7 +798,7 @@ cust_comconsole () ( ####################################################################### # Allow root login via ssh -cust_allow_ssh_root () ( +cust_allow_ssh_root ( ) ( sed -i "" -e '/PermitRootLogin/s/.*/PermitRootLogin yes/' \ ${NANO_WORLDDIR}/etc/ssh/sshd_config ) @@ -766,15 +806,15 @@ cust_allow_ssh_root () ( ####################################################################### # Install the stuff under ./Files -cust_install_files () ( - cd ${NANO_TOOLS}/Files +cust_install_files ( ) ( + cd "${NANO_TOOLS}/Files" find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -Ldumpv ${NANO_WORLDDIR} ) ####################################################################### # Install packages from ${NANO_PACKAGE_DIR} -cust_pkgng () ( +cust_pkgng ( ) ( # If the package directory doesn't exist, we're done. if [ ! -d ${NANO_PACKAGE_DIR} ]; then @@ -794,8 +834,8 @@ cust_pkgng () ( # Copy packages into chroot mkdir -p ${NANO_WORLDDIR}/Pkg ( - cd ${NANO_PACKAGE_DIR} - find ${NANO_PACKAGE_LIST} -print | + cd "${NANO_PACKAGE_DIR}" + find "${NANO_PACKAGE_LIST}" -print | cpio -Ldumpv ${NANO_WORLDDIR}/Pkg ) @@ -842,7 +882,7 @@ cust_pkgng () ( # Convenience function: # Register all args as customize function. -customize_cmd () { +customize_cmd ( ) { NANO_CUSTOMIZE="$NANO_CUSTOMIZE $*" } @@ -851,7 +891,7 @@ customize_cmd () { # Register all args as late customize function to run just before # image creation. -late_customize_cmd () { +late_customize_cmd ( ) { NANO_LATE_CUSTOMIZE="$NANO_LATE_CUSTOMIZE $*" } @@ -863,14 +903,14 @@ late_customize_cmd () { # Progress Print # Print $2 at level $1. -pprint() ( +pprint ( ) ( if [ "$1" -le $PPLEVEL ]; then runtime=$(( `date +%s` - $NANO_STARTTIME )) printf "%s %.${1}s %s\n" "`date -u -r $runtime +%H:%M:%S`" "#####" "$2" 1>&3 fi ) -usage () { +usage ( ) { ( echo "Usage: $0 [-bfiKknqvw] [-c config_file]" echo " -b suppress builds (both kernel and world)" @@ -891,7 +931,7 @@ usage () { # Setup and Export Internal variables # -export_var() { +export_var ( ) { # Don't wawnt a subshell var=$1 # Lookup value of the variable. eval val=\$$var @@ -900,7 +940,8 @@ export_var() { } # Call this function to set defaults _after_ parsing options. -set_defaults_and_export() { +# dont want a subshell otherwise variable setting is thrown away. +set_defaults_and_export ( ) { test -n "${NANO_OBJ}" || NANO_OBJ=/usr/obj/nanobsd.${NANO_NAME} test -n "${MAKEOBJDIRPREFIX}" || MAKEOBJDIRPREFIX=${NANO_OBJ} test -n "${NANO_DISKIMGDIR}" || NANO_DISKIMGDIR=${NANO_OBJ} @@ -943,4 +984,5 @@ set_defaults_and_export() { export_var NANO_BOOTLOADER export_var NANO_LABEL export_var NANO_MODULES + export_var SRCCONF } From owner-svn-src-all@freebsd.org Sat Dec 5 00:54:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B926A41AC3; Sat, 5 Dec 2015 00:54:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 415571502; Sat, 5 Dec 2015 00:54:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB50shh9043454; Sat, 5 Dec 2015 00:54:43 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB50shWE043453; Sat, 5 Dec 2015 00:54:43 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201512050054.tB50shWE043453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 5 Dec 2015 00:54:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291829 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 00:54:44 -0000 Author: imp Date: Sat Dec 5 00:54:43 2015 New Revision: 291829 URL: https://svnweb.freebsd.org/changeset/base/291829 Log: SRCCONF makes no sense in make.conf. Don't set it there. Rely on it being in the environment. Also filter out the new SRC_ENV_CONF as well. If you really need these set, set them in your config file, not in the build environment used to launch nanobsd. Pointed out by: bdrewery@ Modified: head/tools/tools/nanobsd/defaults.sh (contents, props changed) Modified: head/tools/tools/nanobsd/defaults.sh ============================================================================== --- head/tools/tools/nanobsd/defaults.sh Sat Dec 5 00:15:04 2015 (r291828) +++ head/tools/tools/nanobsd/defaults.sh Sat Dec 5 00:54:43 2015 (r291829) @@ -164,7 +164,6 @@ NANO_SLICE_DATA=s4 # conflates the two, so architectures where TARGET != TARGET_ARCH and # TARGET can't be guessed from TARGET_ARCH do not work. This defaults # to the arch of the current machine. - NANO_ARCH=`uname -p` # CPUTYPE defaults to "" which is the default when CPUTYPE isn't @@ -177,9 +176,12 @@ NANO_CFGDIR="" # Directory to populate /data from NANO_DATADIR="" -# src.conf to use when building the image. Defaults to /dev/null for the sake -# of determinism. -SRCCONF=${SRCCONF:=/dev/null} +# We don't need SRCCONF or SRC_ENV_CONF. NanoBSD puts everything we +# need for the build in files included with __MAKE_CONF. Override in your +# config file if you really must. We set them unconditionally here, though +# in case they are stray in the build environment +SRCCONF=/dev/null +SRC_ENV_CONF=/dev/null ####################################################################### # @@ -224,9 +226,8 @@ nano_make_kernel_env ( ) { } nano_global_make_env ( ) ( - [ ! -z "${NANO_ARCH}" ] && echo TARGET_ARCH="${NANO_ARCH}" - [ ! -z "${NANO_CPUTYPE}" ] && echo TARGET_CPUTYPE="${NANO_CPUTYPE}" - echo SRCCONF=${SRCCONF} + [ ! -z "${NANO_ARCH}" ] && echo TARGET_ARCH="${NANO_ARCH}" || true + [ ! -z "${NANO_CPUTYPE}" ] && echo TARGET_CPUTYPE="${NANO_CPUTYPE}" || true ) # rm doesn't know -x prior to FreeBSD 10, so cope with a variety of build @@ -985,4 +986,5 @@ set_defaults_and_export ( ) { export_var NANO_LABEL export_var NANO_MODULES export_var SRCCONF + export_var SRC_ENV_CONF } From owner-svn-src-all@freebsd.org Sat Dec 5 01:10:06 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42464A41DDA; Sat, 5 Dec 2015 01:10:06 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E81261D92; Sat, 5 Dec 2015 01:10:05 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB51A5Ea047683; Sat, 5 Dec 2015 01:10:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB51A5pO047682; Sat, 5 Dec 2015 01:10:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201512050110.tB51A5pO047682@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 5 Dec 2015 01:10:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291830 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 01:10:06 -0000 Author: imp Date: Sat Dec 5 01:10:04 2015 New Revision: 291830 URL: https://svnweb.freebsd.org/changeset/base/291830 Log: Setting NANO_NOPRIV_BUILD will now add -DNO_ROOT and METALOG=xxxx as appropriate. First step in supporting a build w/o root. More to follow as actions by customization scripts are not (yet) recorded in the metalog, and duplicate entries in it aren't removed. Modified: head/tools/tools/nanobsd/defaults.sh (contents, props changed) Modified: head/tools/tools/nanobsd/defaults.sh ============================================================================== --- head/tools/tools/nanobsd/defaults.sh Sat Dec 5 00:54:43 2015 (r291829) +++ head/tools/tools/nanobsd/defaults.sh Sat Dec 5 01:10:04 2015 (r291830) @@ -340,6 +340,10 @@ make_conf_install ( ) ( nano_global_make_env echo "${CONF_WORLD}" echo "${CONF_INSTALL}" + if [ ! -z "${NANO_NOPRIV_BUILD}" ]; then + echo NO_ROOT=t + echo METALOG=${NANO_METALOG} + fi ) > ${NANO_MAKE_CONF_INSTALL} ) @@ -951,11 +955,14 @@ set_defaults_and_export ( ) { NANO_MAKE_CONF_INSTALL=${NANO_OBJ}/make.conf.install # Override user's NANO_DRIVE if they specified a NANO_LABEL - [ ! -z "${NANO_LABEL}" ] && NANO_DRIVE="ufs/${NANO_LABEL}" + [ ! -z "${NANO_LABEL}" ] && NANO_DRIVE="ufs/${NANO_LABEL}" || true # Set a default NANO_TOOLS to NANO_SRC/NANO_TOOLS if it exists. [ ! -d "${NANO_TOOLS}" ] && [ -d "${NANO_SRC}/${NANO_TOOLS}" ] && \ - NANO_TOOLS="${NANO_SRC}/${NANO_TOOLS}" + NANO_TOOLS="${NANO_SRC}/${NANO_TOOLS}" || true + + [ ! -z "${NANO_NOPRIV_BUILD" ] && [ -z "${NANO_METALOG}"] && \ + NANO_METALOG=${NANO_OBJ}/_.metalog || true NANO_STARTTIME=`date +%s` pprint 3 "Exporting NanoBSD variables" @@ -985,6 +992,8 @@ set_defaults_and_export ( ) { export_var NANO_BOOTLOADER export_var NANO_LABEL export_var NANO_MODULES + export_var NANO_NOPRIV_BUILD + export_var NANO_METALOG export_var SRCCONF export_var SRC_ENV_CONF } From owner-svn-src-all@freebsd.org Sat Dec 5 01:12:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39F57A41F1A; Sat, 5 Dec 2015 01:12:46 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FA4A1126; Sat, 5 Dec 2015 01:12:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB51CjNW050429; Sat, 5 Dec 2015 01:12:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB51CjRE050428; Sat, 5 Dec 2015 01:12:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201512050112.tB51CjRE050428@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 5 Dec 2015 01:12:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291831 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 01:12:46 -0000 Author: imp Date: Sat Dec 5 01:12:44 2015 New Revision: 291831 URL: https://svnweb.freebsd.org/changeset/base/291831 Log: Awk helper script that reads in a mtree METALOG file from installworld (and soon augmented by nanobsd), performs the actions documented in the script, and then spits out a new mtree file suitable for feeding to makefs. Discussed on: arch@ Added: head/tools/tools/nanobsd/mtree-dedup.awk (contents, props changed) Added: head/tools/tools/nanobsd/mtree-dedup.awk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/mtree-dedup.awk Sat Dec 5 01:12:44 2015 (r291831) @@ -0,0 +1,197 @@ +#!/usr/bin/awk -f + +# +# Copyright (c) 2015 M. Warner Losh. +# 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$ +# + +# +# Takes a meta-log created by installworld and friends, plus +# additions from NanoBSD to augment its build to communicate when +# files move around after installworld / installkernel phase of +# NanoBSD. +# +# All mtree lines from the metafile have a path, followed by +# a number of keywords. +# +# This script recognizes the following new keywords +# +# unlink[=x] remove the path from the output. +# copy_from=x create new entry for path copied from +# the keywords from x. +# move_from=x create new entry for path copied from +# the keywords from x. Remove path from +# the output. +# +# In addition, when path matches a previous entry, the +# new entry and previous entry are merged. +# +# Special note: when uid and uname are both present, +# uid is ignored. Ditto gid/gname. +# +# Also, the paths above have to match exactly, so X +# should start with "./". +# + +function die(str) +{ + print str > "/dev/stderr"; + exit 1; +} + +function kv(str) +{ + if (split(str, xxx, "=") == 2) { + kv_key = xxx[1]; + kv_value = xxx[2]; + } else { + kv_key = str; + kv_value = nv; + } +} + +# Output the mtree for path based on the kvs. +function mtree_from_kvs(path, kvs) +{ + lv = path " "; + for (k in kvs) { + if (kvs[k] == nv) + lv = lv k " "; + else + lv = lv k "=" kvs[k] " "; + } + return lv; +} + +# Parse the mtree line into path + KVs. Use a sentinal value +# for a bare keyword, which is extremely unlikely to be used +# for real. +function line2kv(kvs, str) +{ + delete kvs; + + n = split(str, yyy, " "); + for (i = 2; i <= n; i++) { + s = yyy[i]; + if (split(s, xxx, "=") == 2) + kvs[xxx[1]] = xxx[2]; + else + kvs[s] = nv; + } +} + + +# old += new +function merge_kvs(old, new) +{ + for (k in new) { + # uname / uid -- last one wins. + if (k == "uid" && "uname" in old) + delete old["uname"] + if (k == "uname" && "uid" in old) + delete old["uid"]; + # gname / gid -- last one wins. + if (k == "gid" && "gname" in old) + delete old["gname"] + if (k == "gname" && "gid" in old) + delete old["gid"]; + # Otherwise newest value wins + old[k] = new[k]; + } +} + +# Process the line we've read in, per the comments below +function process_line(path, new) +{ + # Clear kvs + line2kv(new_kvs, new); + + if ("unlink" in new_kvs) { + # A file removed + # Sanity check to see if tree[path] exists? + # Makes sure when foo/bar/baz exists and foo/bar + # unlinked, baz is gone (for all baz). + if (path !~ "^\./") + die("bad path in : " new); + delete tree[path]; # unlink + return; + # } else if (new_kvs["append_from"]) { # not implemented + } else if ("copy_from" in new_kvs) { + # A file copied from another location, preserve its + # attribute for new file. + # Also merge any new attributes from this line. + from = new_kvs["copy_from"]; + if (from !~ "^\./") + die("bad path in : " new); + delete new_kvs["copy_from"]; + line2kv(old_kvs, tree[from]); # old_kvs = kv's in entry + merge_kvs(old_kvs, new_kvs); # old_kvs += new_kvs + tree[path] = mtree_from_kvs(path, old_kvs); + } else if ("move_from" in new_kvs) { + # A file moved from another location, preserve its + # attribute for new file, and scrag old location + # Also merge any new attributes from this line. + from = new_kvs["move_from"]; + if (from !~ "^\./") + die("bad path in : " new); + delete new_kvs["move_from"]; + line2kv(old_kvs, tree[from]); # old_kvs = kv's in entry + merge_kvs(old_kvs, new_kvs); # old_kvs += new_kvs + tree[path] = mtree_from_kvs(path, old_kvs); + delete tree[from]; # unlink + } else if (tree[path]) { # Update existing entry with new line + line2kv(old_kvs, tree[path]); # old_kvs = kv's in entry + merge_kvs(old_kvs, new_kvs); # old_kvs += new_kvs + tree[path] = mtree_from_kvs(path, old_kvs); + } else { # Add entry plus defaults + delete old_kvs; + merge_kvs(old_kvs, defaults); + merge_kvs(old_kvs, new_kvs); + tree[path] = mtree_from_kvs(path, old_kvs); + } +} + +BEGIN { + nv = "___NO__VALUE___"; + + while ((getline < "/dev/stdin") > 0) { + if ($1 == "/set") { + for (i = 2; i <= NF; i++) { + kv($i); + defaults[kv_key] = kv_value; + } + } else if ($1 == "/unset") { + for (i = 2; i <= NF; i++) { + kv($i); + delete defaults[kv_key]; + } + } else + process_line($1, $0); + } + + for (x in tree) + print tree[x]; +} From owner-svn-src-all@freebsd.org Sat Dec 5 01:13:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3B8AA41F4B; Sat, 5 Dec 2015 01:12:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0B4712C7; Sat, 5 Dec 2015 01:12:59 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB51Cwsn050498; Sat, 5 Dec 2015 01:12:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB51CwLb050497; Sat, 5 Dec 2015 01:12:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512050112.tB51CwLb050497@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 01:12:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291832 - head/lib/libc/regex/grot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 01:13:00 -0000 Author: ngie Date: Sat Dec 5 01:12:58 2015 New Revision: 291832 URL: https://svnweb.freebsd.org/changeset/base/291832 Log: Fix -Wformat warnings by using the correct format qualifiers MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/regex/grot/debug.c Modified: head/lib/libc/regex/grot/debug.c ============================================================================== --- head/lib/libc/regex/grot/debug.c Sat Dec 5 01:12:44 2015 (r291831) +++ head/lib/libc/regex/grot/debug.c Sat Dec 5 01:12:58 2015 (r291832) @@ -186,7 +186,7 @@ FILE *d; fprintf(d, ">"); break; default: - fprintf(d, "!%d(%d)!", OP(*s), opnd); + fprintf(d, "!%ld(%ld)!", OP(*s), (long)opnd); break; } if (!done) From owner-svn-src-all@freebsd.org Sat Dec 5 01:13:20 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F25FA41FB5; Sat, 5 Dec 2015 01:13:20 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 109C71465; Sat, 5 Dec 2015 01:13:19 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB51DJ6i050581; Sat, 5 Dec 2015 01:13:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB51DJYO050580; Sat, 5 Dec 2015 01:13:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512050113.tB51DJYO050580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 01:13:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291833 - head/lib/libc/regex/grot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 01:13:20 -0000 Author: ngie Date: Sat Dec 5 01:13:18 2015 New Revision: 291833 URL: https://svnweb.freebsd.org/changeset/base/291833 Log: - Use ANSI C function prototypes/definitions instead of K&R style ones - Add a missing return type for main(..) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/regex/grot/main.c Modified: head/lib/libc/regex/grot/main.c ============================================================================== --- head/lib/libc/regex/grot/main.c Sat Dec 5 01:12:58 2015 (r291832) +++ head/lib/libc/regex/grot/main.c Sat Dec 5 01:13:18 2015 (r291833) @@ -26,9 +26,8 @@ extern void regprint(); /* - main - do the simple case, hand off to regress() for regression */ -main(argc, argv) -int argc; -char *argv[]; +int +main(int argc, char **argv) { regex_t re; # define NS 10 @@ -126,8 +125,7 @@ char *argv[]; == void regress(FILE *in); */ void -regress(in) -FILE *in; +regress(FILE *in) { char inbuf[1000]; # define MAXF 10 @@ -201,15 +199,10 @@ FILE *in; /* - try - try it, and report on problems == void try(char *f0, char *f1, char *f2, char *f3, char *f4, int opts); + - opts: may not match f1 */ void -try(f0, f1, f2, f3, f4, opts) -char *f0; -char *f1; -char *f2; -char *f3; -char *f4; -int opts; /* may not match f1 */ +try(char *f0, char *f1, char *f2, char *f3, char *f4, int opts) { regex_t re; # define NSUBS 10 @@ -311,12 +304,11 @@ int opts; /* may not match f1 */ /* - options - pick options out of a regression-test string + - type: 'c' - compile, 'e' - exec == int options(int type, char *s); */ int -options(type, s) -int type; /* 'c' compile, 'e' exec */ -char *s; +options(int type, char *s) { char *p; int o = (type == 'c') ? copts : eopts; @@ -371,9 +363,7 @@ char *s; == int opt(int c, char *s); */ int /* predicate */ -opt(c, s) -int c; -char *s; +opt(int c, char *s) { return(strchr(s, c) != NULL); } @@ -383,8 +373,7 @@ char *s; == void fixstr(char *p); */ void -fixstr(p) -char *p; +fixstr(char *p) { if (p == NULL) return; @@ -405,10 +394,7 @@ char *p; == char *check(char *str, regmatch_t sub, char *should); */ char * /* NULL or complaint */ -check(str, sub, should) -char *str; -regmatch_t sub; -char *should; +check(char *str, regmatch_t sub, char *should) { int len; int shlen; @@ -482,8 +468,7 @@ char *should; == static char *eprint(int err); */ static char * -eprint(err) -int err; +eprint(int err) { static char epbuf[100]; size_t len; @@ -498,8 +483,7 @@ int err; == static int efind(char *name); */ static int -efind(name) -char *name; +efind(char *name) { static char efbuf[100]; size_t n; From owner-svn-src-all@freebsd.org Sat Dec 5 01:19:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6C25A3F01B; Sat, 5 Dec 2015 01:19:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 690C91789; Sat, 5 Dec 2015 01:19:36 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB51JZxB051225; Sat, 5 Dec 2015 01:19:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB51JZ0R051224; Sat, 5 Dec 2015 01:19:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512050119.tB51JZ0R051224@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 01:19:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291834 - head/lib/libc/regex/grot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 01:19:36 -0000 Author: ngie Date: Sat Dec 5 01:19:35 2015 New Revision: 291834 URL: https://svnweb.freebsd.org/changeset/base/291834 Log: Add missing headers and sort #includes per style(9) MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/regex/grot/main.c Modified: head/lib/libc/regex/grot/main.c ============================================================================== --- head/lib/libc/regex/grot/main.c Sat Dec 5 01:13:18 2015 (r291833) +++ head/lib/libc/regex/grot/main.c Sat Dec 5 01:19:35 2015 (r291834) @@ -1,11 +1,13 @@ #include __FBSDID("$FreeBSD$"); -#include -#include #include -#include #include +#include +#include +#include +#include +#include #include "main.ih" From owner-svn-src-all@freebsd.org Sat Dec 5 02:07:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B003A3FBB3; Sat, 5 Dec 2015 02:07:57 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEBFF136A; Sat, 5 Dec 2015 02:07:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB527tUr066026; Sat, 5 Dec 2015 02:07:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB527tL5066025; Sat, 5 Dec 2015 02:07:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512050207.tB527tL5066025@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 02:07:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291835 - head/lib/libc/regex/grot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 02:07:57 -0000 Author: ngie Date: Sat Dec 5 02:07:55 2015 New Revision: 291835 URL: https://svnweb.freebsd.org/changeset/base/291835 Log: Use ANSI C function prototypes/definitions instead of K&R style ones MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/regex/grot/split.c Modified: head/lib/libc/regex/grot/split.c ============================================================================== --- head/lib/libc/regex/grot/split.c Sat Dec 5 01:19:35 2015 (r291834) +++ head/lib/libc/regex/grot/split.c Sat Dec 5 02:07:55 2015 (r291835) @@ -7,13 +7,12 @@ __FBSDID("$FreeBSD$"); /* - split - divide a string into fields, like awk split() = int split(char *string, char *fields[], int nfields, char *sep); + - fields: list is not NULL-terminated + - nfields: number of entries available in fields[] + - sep: "" white, "c" single char, "ab" [ab]+ */ int /* number of fields, including overflow */ -split(string, fields, nfields, sep) -char *string; -char *fields[]; /* list is not NULL-terminated */ -int nfields; /* number of entries available in fields[] */ -char *sep; /* "" white, "c" single char, "ab" [ab]+ */ +split(char *string, char *fields[], int nfields, char *sep) { char *p = string; char c; /* latest character */ @@ -151,9 +150,7 @@ char *sep; /* "" white, "c" single cha * pgm str sep n splits str by sep n times */ int -main(argc, argv) -int argc; -char *argv[]; +main(int argc, char *argv[]) { char buf[512]; int n; @@ -182,9 +179,8 @@ char *argv[]; exit(0); } -dosplit(string, seps) -char *string; -char *seps; +void +dosplit(char *string, char *seps) { # define NF 5 char *fields[NF]; @@ -194,10 +190,8 @@ char *seps; print(nf, NF, fields); } -print(nf, nfp, fields) -int nf; -int nfp; -char *fields[]; +void +print(int nf, int nfp, char *fields[]) { int fn; int bound; @@ -277,7 +271,8 @@ struct { NULL, NULL, 0, { NULL }, }; -regress() +void +regress(void) { char buf[512]; int n; From owner-svn-src-all@freebsd.org Sat Dec 5 02:18:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 952C6A3FD87; Sat, 5 Dec 2015 02:18:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56C9819CC; Sat, 5 Dec 2015 02:18:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB52IaNX069062; Sat, 5 Dec 2015 02:18:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB52Ia7r069061; Sat, 5 Dec 2015 02:18:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512050218.tB52Ia7r069061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 02:18:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291836 - head/lib/libc/regex/grot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 02:18:37 -0000 Author: ngie Date: Sat Dec 5 02:18:36 2015 New Revision: 291836 URL: https://svnweb.freebsd.org/changeset/base/291836 Log: Use `==` instead of `=` in the function comment above split(..) so mkh -p exposes split(..). MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/regex/grot/split.c Modified: head/lib/libc/regex/grot/split.c ============================================================================== --- head/lib/libc/regex/grot/split.c Sat Dec 5 02:07:55 2015 (r291835) +++ head/lib/libc/regex/grot/split.c Sat Dec 5 02:18:36 2015 (r291836) @@ -6,7 +6,7 @@ __FBSDID("$FreeBSD$"); /* - split - divide a string into fields, like awk split() - = int split(char *string, char *fields[], int nfields, char *sep); + == int split(char *string, char *fields[], int nfields, char *sep); - fields: list is not NULL-terminated - nfields: number of entries available in fields[] - sep: "" white, "c" single char, "ab" [ab]+ From owner-svn-src-all@freebsd.org Sat Dec 5 02:23:45 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE2B8A3FFAB; Sat, 5 Dec 2015 02:23:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7EC291E6C; Sat, 5 Dec 2015 02:23:45 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB52Ni8e071823; Sat, 5 Dec 2015 02:23:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB52Nijn071820; Sat, 5 Dec 2015 02:23:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512050223.tB52Nijn071820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 02:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291837 - head/lib/libc/regex/grot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 02:23:45 -0000 Author: ngie Date: Sat Dec 5 02:23:44 2015 New Revision: 291837 URL: https://svnweb.freebsd.org/changeset/base/291837 Log: split.ih: - Create automatically generated include header for split.c main.c: - Use function definitions from debug.ih and split.ih instead of externs Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/regex/grot/Makefile head/lib/libc/regex/grot/main.c head/lib/libc/regex/grot/split.c Modified: head/lib/libc/regex/grot/Makefile ============================================================================== --- head/lib/libc/regex/grot/Makefile Sat Dec 5 02:18:36 2015 (r291836) +++ head/lib/libc/regex/grot/Makefile Sat Dec 5 02:23:44 2015 (r291837) @@ -62,7 +62,8 @@ regexec.o: engine.c engine.ih regerror.o: regerror.ih regerror.o: utils.h debug.o: debug.ih -main.o: main.ih +main.o: debug.ih main.ih split.ih +split.o: split.ih r: re tests ./re #include +#include "debug.ih" #include "main.ih" +#include "split.ih" char *progname; int debug = 0; @@ -22,9 +24,6 @@ regoff_t startoff = 0; regoff_t endoff = 0; -extern int split(); -extern void regprint(); - /* - main - do the simple case, hand off to regress() for regression */ Modified: head/lib/libc/regex/grot/split.c ============================================================================== --- head/lib/libc/regex/grot/split.c Sat Dec 5 02:18:36 2015 (r291836) +++ head/lib/libc/regex/grot/split.c Sat Dec 5 02:23:44 2015 (r291837) @@ -4,6 +4,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "split.ih" + /* - split - divide a string into fields, like awk split() == int split(char *string, char *fields[], int nfields, char *sep); From owner-svn-src-all@freebsd.org Sat Dec 5 02:25:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 981F2A4002F; Sat, 5 Dec 2015 02:25:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55A6D1FF4; Sat, 5 Dec 2015 02:25:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB52PKMt071919; Sat, 5 Dec 2015 02:25:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB52PKj7071918; Sat, 5 Dec 2015 02:25:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512050225.tB52PKj7071918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 02:25:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291838 - head/lib/libc/regex/grot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 02:25:21 -0000 Author: ngie Date: Sat Dec 5 02:25:20 2015 New Revision: 291838 URL: https://svnweb.freebsd.org/changeset/base/291838 Log: Fix -Wformat issues and minor whitespace issues in surrounding areas MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/regex/grot/main.c Modified: head/lib/libc/regex/grot/main.c ============================================================================== --- head/lib/libc/regex/grot/main.c Sat Dec 5 02:23:44 2015 (r291837) +++ head/lib/libc/regex/grot/main.c Sat Dec 5 02:25:20 2015 (r291838) @@ -80,43 +80,43 @@ main(int argc, char **argv) err = regcomp(&re, argv[optind++], copts); if (err) { len = regerror(err, &re, erbuf, sizeof(erbuf)); - fprintf(stderr, "error %s, %d/%d `%s'\n", - eprint(err), len, sizeof(erbuf), erbuf); + fprintf(stderr, "error %s, %zu/%zu `%s'\n", + eprint(err), len, sizeof(erbuf), erbuf); exit(status); } - regprint(&re, stdout); + regprint(&re, stdout); if (optind >= argc) { regfree(&re); exit(status); } - if (eopts®_STARTEND) { + if ((eopts & REG_STARTEND) != 0) { subs[0].rm_so = startoff; subs[0].rm_eo = strlen(argv[optind]) - endoff; } err = regexec(&re, argv[optind], (size_t)NS, subs, eopts); if (err) { len = regerror(err, &re, erbuf, sizeof(erbuf)); - fprintf(stderr, "error %s, %d/%d `%s'\n", - eprint(err), len, sizeof(erbuf), erbuf); + fprintf(stderr, "error %s, %zu/%zu `%s'\n", + eprint(err), len, sizeof(erbuf), erbuf); exit(status); } - if (!(copts®_NOSUB)) { + if ((copts & REG_NOSUB) == 0) { len = (int)(subs[0].rm_eo - subs[0].rm_so); if (subs[0].rm_so != -1) { if (len != 0) - printf("match `%.*s'\n", len, - argv[optind] + subs[0].rm_so); + printf("match `%.*s'\n", (int)len, + argv[optind] + subs[0].rm_so); else printf("match `'@%.1s\n", - argv[optind] + subs[0].rm_so); + argv[optind] + subs[0].rm_so); } for (i = 1; i < NS; i++) if (subs[i].rm_so != -1) printf("(%d) `%.*s'\n", i, - (int)(subs[i].rm_eo - subs[i].rm_so), - argv[optind] + subs[i].rm_so); + (int)(subs[i].rm_eo - subs[i].rm_so), + argv[optind] + subs[i].rm_so); } exit(status); } @@ -173,13 +173,13 @@ regress(FILE *in) } ne = regerror(REG_BADPAT, (regex_t *)NULL, erbuf, (size_t)SHORT); if (strncmp(erbuf, badpat, SHORT-1) != 0 || erbuf[SHORT-1] != '\0' || - ne != strlen(badpat)+1) { + ne != strlen(badpat)+1) { fprintf(stderr, "end: regerror() short test gave `%s' not `%.*s'\n", erbuf, SHORT-1, badpat); status = 1; } ne = regerror(REG_ITOA|REG_BADPAT, (regex_t *)NULL, erbuf, sizeof(erbuf)); - if (strcmp(erbuf, bpname) != 0 || ne != strlen(bpname)+1) { + if (strcmp(erbuf, bpname) != 0 || ne != strlen(bpname) + 1) { fprintf(stderr, "end: regerror() ITOA test gave `%s' not `%s'\n", erbuf, bpname); status = 1; @@ -190,7 +190,7 @@ regress(FILE *in) fprintf(stderr, "end: regerror() ATOI test gave `%s' not `%ld'\n", erbuf, (long)REG_BADPAT); status = 1; - } else if (ne != strlen(erbuf)+1) { + } else if (ne != strlen(erbuf) + 1) { fprintf(stderr, "end: regerror() ATOI test len(`%s') = %ld\n", erbuf, (long)REG_BADPAT); status = 1; @@ -210,13 +210,11 @@ try(char *f0, char *f1, char *f2, char * regmatch_t subs[NSUBS]; # define NSHOULD 15 char *should[NSHOULD]; - int nshould; char erbuf[100]; - int err; - int len; - char *type = (opts & REG_EXTENDED) ? "ERE" : "BRE"; - int i; + size_t len; + int err, i, nshould; char *grump; + char *type = (opts & REG_EXTENDED) ? "ERE" : "BRE"; char f0copy[1000]; char f2copy[1000]; @@ -227,9 +225,8 @@ try(char *f0, char *f1, char *f2, char * if (err != 0 && (!opt('C', f1) || err != efind(f2))) { /* unexpected error or wrong error */ len = regerror(err, &re, erbuf, sizeof(erbuf)); - fprintf(stderr, "%d: %s error %s, %d/%d `%s'\n", - line, type, eprint(err), len, - sizeof(erbuf), erbuf); + fprintf(stderr, "%d: %s error %s, %zu/%zu `%s'\n", + line, type, eprint(err), len, sizeof(erbuf), erbuf); status = 1; } else if (err == 0 && opt('C', f1)) { /* unexpected success */ @@ -258,16 +255,15 @@ try(char *f0, char *f1, char *f2, char * if (err != 0 && (f3 != NULL || err != REG_NOMATCH)) { /* unexpected error or wrong error */ len = regerror(err, &re, erbuf, sizeof(erbuf)); - fprintf(stderr, "%d: %s exec error %s, %d/%d `%s'\n", - line, type, eprint(err), len, - sizeof(erbuf), erbuf); + fprintf(stderr, "%d: %s exec error %s, %zu/%zu `%s'\n", + line, type, eprint(err), len, sizeof(erbuf), erbuf); status = 1; } else if (err != 0) { /* nothing more to check */ } else if (f3 == NULL) { /* unexpected success */ fprintf(stderr, "%d: %s exec should have failed\n", - line, type); + line, type); status = 1; err = 1; /* just on principle */ } else if (opts®_NOSUB) { @@ -294,7 +290,7 @@ try(char *f0, char *f1, char *f2, char * grump = check(f2, subs[i], should[i]); if (grump != NULL) { fprintf(stderr, "%d: %s $%d %s\n", line, - type, i, grump); + type, i, grump); status = 1; err = 1; } @@ -429,7 +425,7 @@ check(char *str, regmatch_t sub, char *s /* check for in range */ if (sub.rm_eo > strlen(str)) { sprintf(grump, "start %ld end %ld, past end of string", - (long)sub.rm_so, (long)sub.rm_eo); + (long)sub.rm_so, (long)sub.rm_eo); return(grump); } From owner-svn-src-all@freebsd.org Sat Dec 5 02:34:35 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8541A403C4; Sat, 5 Dec 2015 02:34:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x22d.google.com (mail-pf0-x22d.google.com [IPv6:2607:f8b0:400e:c00::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B23531797; Sat, 5 Dec 2015 02:34:34 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pfdd184 with SMTP id d184so34840249pfd.3; Fri, 04 Dec 2015 18:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/z3l0qp9LLs+hxWiXE4OPNURoYXfCLnK2GNqQEF6S2A=; b=T8MfkJ03VdXnECvCdWwilChXM6EI1fWjpdM5V10tN41fVyVyVZolJF7kR1okYb/NCm OETmhIEXGJ4vG7jVoClhRDjg3c5ZDUEL2QkzCbAA4mJivYIsUFARcKho4sIHb9ZvU0PH llKv4iND0OT5wNUg1u5bSa8mFbxspxzVuqWztX20iqM6nbxaRvQDUh/rbS70cQt8k4Ep J8rke+gbUzZKSs0nt6jVt1DKRjbXcvpLWZlmHxOXupLfeu6bIdDN2+xfhFtA7c5FWLI4 hOJn1YInaziGyzQDZ59YQFBKmvRQtaTARWHxd3Tlcd7wGcxh9GA2cw48jPtmzwqOx3DS x8Hg== X-Received: by 10.98.70.141 with SMTP id o13mr26657150pfi.44.1449282874126; Fri, 04 Dec 2015 18:34:34 -0800 (PST) Received: from [192.168.20.7] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id u64sm19686142pfa.89.2015.12.04.18.34.31 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Dec 2015 18:34:32 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: svn commit: r290605 - in head/lib/msun: . man From: NGie Cooper In-Reply-To: <20151109223117.Y2340@besplex.bde.org> Date: Fri, 4 Dec 2015 18:34:31 -0800 Cc: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <4E9A0C74-DC06-41E3-A27D-46FF06A98C95@gmail.com> References: <201511091040.tA9AeG0B038056@repo.freebsd.org> <20151109223117.Y2340@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 02:34:35 -0000 Hi Bruce! > On Nov 9, 2015, at 04:03, Bruce Evans wrote: >=20 > On Mon, 9 Nov 2015, Garrett Cooper wrote: >=20 >> Log: >> Document powl(3) >=20 > powl was garbage that was intentionally undocumented. At least, I > intentionally ignored its non-documentation together with it. POSIX documents it and I noticed it was missing when porting the msun = testcases from NetBSD. That=E2=80=99s the reason why I filed the bug. > powl doesn't compute the value of .Ar x to the exponent .Ar y. It = computes > the value of (double)(.Ar x) to the exponent (double)(.Ar y), = converted to > double. Hmmm? The types look ok per the function signatures in lib/msun: lib/msun/src/imprecise.c:imprecise_powl(long double x, long double y) lib/msun/src/math.h:long double powl(long double, long double); =46rom exp(3): double pow(double x, double y); float powf(float x, float y); long double powl(long double x, long double y); If the implementation is bugged/questionable, it should be documented in = CAVEATS. >> @@ -122,9 +126,10 @@ Otherwise the error in these functions i >> These functions will return the appropriate computation unless an = error >> occurs or an argument is out of range. >=20 > powl() almost never returns the appropriate computation. Its bugs are > most obvious when an argument is too large for double but not out of = range. These are bugs that need to be fixed then in the longterm, but in the = short term should be documented under CAVEATS. > I doubt that the rest of this section (about exception handling) is > correct for powl(). >=20 > The section on errors wasn't changed since it uses generic pow(). It > claims that the error is generally less than 1 ulp. But for powl(), > the error is generally more that 4096 ulps. Much more when the > error exponentiates. powf() and pow() do well to avoid exponentiation > of roundoff errors. I think the comment above applies here too about adding some notes to = CAVEATS. Thank you for the input! -NGie= From owner-svn-src-all@freebsd.org Sat Dec 5 04:10:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43132A41394; Sat, 5 Dec 2015 04:10:17 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 087F51B17; Sat, 5 Dec 2015 04:10:16 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB54AG2r001421; Sat, 5 Dec 2015 04:10:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB54AGnK001420; Sat, 5 Dec 2015 04:10:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512050410.tB54AGnK001420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 04:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291839 - head/lib/libc/tests/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 04:10:17 -0000 Author: ngie Date: Sat Dec 5 04:10:15 2015 New Revision: 291839 URL: https://svnweb.freebsd.org/changeset/base/291839 Log: Initialize errno to 0 in the nul testcase before testing it For some odd reason stable/10 requires this, otherwise it always fails the errno == 0 check on line 196. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/tests/stdio/getdelim_test.c Modified: head/lib/libc/tests/stdio/getdelim_test.c ============================================================================== --- head/lib/libc/tests/stdio/getdelim_test.c Sat Dec 5 02:25:20 2015 (r291838) +++ head/lib/libc/tests/stdio/getdelim_test.c Sat Dec 5 04:10:15 2015 (r291839) @@ -177,6 +177,7 @@ ATF_TC_BODY(nul, tc) char *line; size_t linecap, n; + errno = 0; line = NULL; linecap = 0; /* Make sure a NUL delimiter works. */ From owner-svn-src-all@freebsd.org Sat Dec 5 04:17:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BBB6CA41541; Sat, 5 Dec 2015 04:17:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4880412B5; Sat, 5 Dec 2015 04:17:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB54HfEW008510; Sat, 5 Dec 2015 04:17:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB54HeC6008502; Sat, 5 Dec 2015 04:17:40 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512050417.tB54HeC6008502@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 04:17:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291840 - stable/10/lib/libc/tests/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 04:17:42 -0000 Author: ngie Date: Sat Dec 5 04:17:40 2015 New Revision: 291840 URL: https://svnweb.freebsd.org/changeset/base/291840 Log: MFC r290537,r290540,r290560,r290856,r290871,r291839: r290537: Integrate tools/regression/lib/libc/stdio into the FreeBSD test suite as lib/libc/tests/stdio - Fix some whitespace - Convert the testcases to ATF - Convert "/dev/null" to _PATH_DEVNULL Sponsored by: EMC / Isilon Storage Division r290540: printfloat_test and scanfloat_test need symbols from msun; these are automatically provided on amd64, but not i386. Add libm to DPADD/LDADD to unbreak the i386 tinderbox Pointyhat to: ngie Sponsored by: EMC / Isilon Storage Division r290560: Convert print_positional_test over to ATF Somehow missed in r290537 Sponsored by: EMC / Isilon Storage Division r290856 (by bapt): also skip the definition of ':fopen_regular' to avoid the build to fail due to unused variables defined by ATF macros r290871: Disable -Wformat with scanfloat_test when compiling with gcc to avoid a "use of assignment suppression and length modifier together in scanf format" warning on line 90 (it's intentional) Sponsored by: EMC / Isilon Storage Division r291839: Initialize errno to 0 in the nul testcase before testing it For some odd reason stable/10 requires this, otherwise it always fails the errno == 0 check on line 196. Sponsored by: EMC / Isilon Storage Division Added: stable/10/lib/libc/tests/stdio/fdopen_test.c - copied unchanged from r290537, head/lib/libc/tests/stdio/fdopen_test.c stable/10/lib/libc/tests/stdio/fopen_test.c - copied unchanged from r290537, head/lib/libc/tests/stdio/fopen_test.c stable/10/lib/libc/tests/stdio/freopen_test.c - copied unchanged from r290537, head/lib/libc/tests/stdio/freopen_test.c stable/10/lib/libc/tests/stdio/getdelim_test.c - copied, changed from r290537, head/lib/libc/tests/stdio/getdelim_test.c stable/10/lib/libc/tests/stdio/mkostemp_test.c - copied unchanged from r290537, head/lib/libc/tests/stdio/mkostemp_test.c stable/10/lib/libc/tests/stdio/open_memstream_test.c - copied unchanged from r290537, head/lib/libc/tests/stdio/open_memstream_test.c stable/10/lib/libc/tests/stdio/open_wmemstream_test.c - copied unchanged from r290537, head/lib/libc/tests/stdio/open_wmemstream_test.c stable/10/lib/libc/tests/stdio/perror_test.c - copied unchanged from r290537, head/lib/libc/tests/stdio/perror_test.c stable/10/lib/libc/tests/stdio/print_positional_test.c - copied, changed from r290537, head/lib/libc/tests/stdio/print_positional_test.c stable/10/lib/libc/tests/stdio/printbasic_test.c - copied unchanged from r290537, head/lib/libc/tests/stdio/printbasic_test.c stable/10/lib/libc/tests/stdio/printfloat_test.c - copied unchanged from r290537, head/lib/libc/tests/stdio/printfloat_test.c stable/10/lib/libc/tests/stdio/scanfloat_test.c - copied unchanged from r290537, head/lib/libc/tests/stdio/scanfloat_test.c Modified: stable/10/lib/libc/tests/stdio/Makefile stable/10/lib/libc/tests/stdio/fmemopen2_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/stdio/Makefile ============================================================================== --- stable/10/lib/libc/tests/stdio/Makefile Sat Dec 5 04:10:15 2015 (r291839) +++ stable/10/lib/libc/tests/stdio/Makefile Sat Dec 5 04:17:40 2015 (r291840) @@ -1,8 +1,24 @@ # $FreeBSD$ +.include + TESTSDIR= ${TESTSBASE}/lib/libc/stdio -ATF_TESTS_C= fmemopen2_test +ATF_TESTS_C+= fdopen_test +ATF_TESTS_C+= fmemopen2_test +ATF_TESTS_C+= fopen2_test +ATF_TESTS_C+= freopen_test +ATF_TESTS_C+= getdelim_test +ATF_TESTS_C+= mkostemp_test +ATF_TESTS_C+= open_memstream_test +ATF_TESTS_C+= open_wmemstream_test +ATF_TESTS_C+= perror_test +ATF_TESTS_C+= print_positional_test +ATF_TESTS_C+= printbasic_test +ATF_TESTS_C+= printfloat_test +ATF_TESTS_C+= scanfloat_test + +SRCS.fopen2_test= fopen_test.c NETBSD_ATF_TESTS_C= clearerr_test NETBSD_ATF_TESTS_C+= fflush_test @@ -14,6 +30,18 @@ NETBSD_ATF_TESTS_C+= popen_test NETBSD_ATF_TESTS_C+= printf_test NETBSD_ATF_TESTS_C+= scanf_test +DPADD.printfloat_test+= ${LIBM} +LDADD.printfloat_test+= -lm + +DPADD.scanfloat_test+= ${LIBM} +LDADD.scanfloat_test+= -lm + +.if ${COMPILER_TYPE} == "gcc" +# 90: use of assignment suppression and length modifier together in scanf format +PROG_OVERRIDE_VARS+= NO_WFORMAT +NO_WFORMAT.scanfloat_test= +.endif + .include "../Makefile.netbsd-tests" .include Copied: stable/10/lib/libc/tests/stdio/fdopen_test.c (from r290537, head/lib/libc/tests/stdio/fdopen_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/stdio/fdopen_test.c Sat Dec 5 04:17:40 2015 (r291840, copy of r290537, head/lib/libc/tests/stdio/fdopen_test.c) @@ -0,0 +1,225 @@ +/*- + * Copyright (c) 2014 Jilles Tjoelker + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#include + +static void +runtest(const char *fname, int intmode, const char *strmode, bool success) +{ + FILE *fp; + int fd; + + fd = open(fname, intmode); + ATF_REQUIRE_MSG(fd != -1, + "open(\"%s\", %#x) failed; errno=%d", fname, intmode, errno); + + fp = fdopen(fd, strmode); + if (fp == NULL) { + close(fd); + ATF_REQUIRE_MSG(success == false, + "fdopen(open(\"%s\", %#x), \"%s\") succeeded unexpectedly", + fname, intmode, strmode); + return; + } + ATF_REQUIRE_MSG(success == true, + "fdopen(open(\"%s\", %#x), \"%s\") failed; errno=%d", + fname, intmode, strmode, errno); + fclose(fp); +} + +ATF_TC_WITHOUT_HEAD(null__O_RDONLY__r_test); +ATF_TC_BODY(null__O_RDONLY__r_test, tc) +{ + + runtest(_PATH_DEVNULL, O_RDONLY, "r", true); +} + +ATF_TC_WITHOUT_HEAD(null__O_WRONLY__r_test); +ATF_TC_BODY(null__O_WRONLY__r_test, tc) +{ + + runtest(_PATH_DEVNULL, O_WRONLY, "r", false); +} + +ATF_TC_WITHOUT_HEAD(null__O_RDWR__r_test); +ATF_TC_BODY(null__O_RDWR__r_test, tc) +{ + + runtest(_PATH_DEVNULL, O_RDWR, "r", true); +} + +ATF_TC_WITHOUT_HEAD(null__O_RDONLY__w_test); +ATF_TC_BODY(null__O_RDONLY__w_test, tc) +{ + + runtest(_PATH_DEVNULL, O_RDONLY, "w", false); +} + +ATF_TC_WITHOUT_HEAD(null__O_WRONLY__w_test); +ATF_TC_BODY(null__O_WRONLY__w_test, tc) +{ + + runtest(_PATH_DEVNULL, O_WRONLY, "w", true); +} + +ATF_TC_WITHOUT_HEAD(null__O_RDWR__w_test); +ATF_TC_BODY(null__O_RDWR__w_test, tc) +{ + + runtest(_PATH_DEVNULL, O_RDWR, "w", true); +} + +ATF_TC_WITHOUT_HEAD(null__O_RDONLY__a_test); +ATF_TC_BODY(null__O_RDONLY__a_test, tc) +{ + + runtest(_PATH_DEVNULL, O_RDONLY, "a", false); +} + +ATF_TC_WITHOUT_HEAD(null__O_WRONLY__a_test); +ATF_TC_BODY(null__O_WRONLY__a_test, tc) +{ + + runtest(_PATH_DEVNULL, O_WRONLY, "a", true); +} + +ATF_TC_WITHOUT_HEAD(null__O_RDWR__test); +ATF_TC_BODY(null__O_RDWR__test, tc) +{ + + runtest(_PATH_DEVNULL, O_RDWR, "a", true); +} + +ATF_TC_WITHOUT_HEAD(null__O_RDONLY__r_append); +ATF_TC_BODY(null__O_RDONLY__r_append, tc) +{ + + runtest(_PATH_DEVNULL, O_RDONLY, "r+", false); +} + +ATF_TC_WITHOUT_HEAD(null__O_WRONLY__r_append); +ATF_TC_BODY(null__O_WRONLY__r_append, tc) +{ + + runtest(_PATH_DEVNULL, O_WRONLY, "r+", false); +} + +ATF_TC_WITHOUT_HEAD(null__O_RDWR__r_append); +ATF_TC_BODY(null__O_RDWR__r_append, tc) +{ + + runtest(_PATH_DEVNULL, O_RDWR, "r+", true); +} + +ATF_TC_WITHOUT_HEAD(null__O_RDONLY__w_append); +ATF_TC_BODY(null__O_RDONLY__w_append, tc) +{ + + runtest(_PATH_DEVNULL, O_RDONLY, "w+", false); +} + +ATF_TC_WITHOUT_HEAD(null__O_WRONLY__w_append); +ATF_TC_BODY(null__O_WRONLY__w_append, tc) +{ + + runtest(_PATH_DEVNULL, O_WRONLY, "w+", false); +} + +ATF_TC_WITHOUT_HEAD(null__O_RDWR__w_append); +ATF_TC_BODY(null__O_RDWR__w_append, tc) +{ + + runtest(_PATH_DEVNULL, O_RDWR, "w+", true); +} + +ATF_TC_WITHOUT_HEAD(sh__O_EXEC__r); +ATF_TC_BODY(sh__O_EXEC__r, tc) +{ + + runtest("/bin/sh", O_EXEC, "r", false); +} + +ATF_TC_WITHOUT_HEAD(sh__O_EXEC__w); +ATF_TC_BODY(sh__O_EXEC__w, tc) +{ + + runtest("/bin/sh", O_EXEC, "w", false); +} + +ATF_TC_WITHOUT_HEAD(sh__O_EXEC__r_append); +ATF_TC_BODY(sh__O_EXEC__r_append, tc) +{ + + runtest("/bin/sh", O_EXEC, "r+", false); +} + +ATF_TC_WITHOUT_HEAD(sh__O_EXEC__w_append); +ATF_TC_BODY(sh__O_EXEC__w_append, tc) +{ + + runtest("/bin/sh", O_EXEC, "w+", false); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, null__O_RDONLY__r_test); + ATF_TP_ADD_TC(tp, null__O_WRONLY__r_test); + ATF_TP_ADD_TC(tp, null__O_RDWR__r_test); + ATF_TP_ADD_TC(tp, null__O_RDONLY__w_test); + ATF_TP_ADD_TC(tp, null__O_WRONLY__w_test); + ATF_TP_ADD_TC(tp, null__O_RDWR__w_test); + ATF_TP_ADD_TC(tp, null__O_RDONLY__a_test); + ATF_TP_ADD_TC(tp, null__O_WRONLY__a_test); + ATF_TP_ADD_TC(tp, null__O_RDWR__test); + ATF_TP_ADD_TC(tp, null__O_RDONLY__r_append); + ATF_TP_ADD_TC(tp, null__O_WRONLY__r_append); + ATF_TP_ADD_TC(tp, null__O_RDWR__r_append); + ATF_TP_ADD_TC(tp, null__O_RDONLY__w_append); + ATF_TP_ADD_TC(tp, null__O_WRONLY__w_append); + ATF_TP_ADD_TC(tp, null__O_RDWR__w_append); + ATF_TP_ADD_TC(tp, sh__O_EXEC__r); + ATF_TP_ADD_TC(tp, sh__O_EXEC__w); + ATF_TP_ADD_TC(tp, sh__O_EXEC__r_append); + ATF_TP_ADD_TC(tp, sh__O_EXEC__w_append); + + return (atf_no_error()); +} + +/* + vim:ts=8:cin:sw=8 + */ Modified: stable/10/lib/libc/tests/stdio/fmemopen2_test.c ============================================================================== --- stable/10/lib/libc/tests/stdio/fmemopen2_test.c Sat Dec 5 04:10:15 2015 (r291839) +++ stable/10/lib/libc/tests/stdio/fmemopen2_test.c Sat Dec 5 04:17:40 2015 (r291840) @@ -35,15 +35,13 @@ __FBSDID("$FreeBSD$"); #include #include #include + #include ATF_TC_WITHOUT_HEAD(test_preexisting); ATF_TC_BODY(test_preexisting, tc) { - /* - * Use a pre-existing buffer. - */ - + /* Use a pre-existing buffer. */ char buf[512]; char buf2[512]; char str[] = "Test writing some stuff"; @@ -74,7 +72,7 @@ ATF_TC_BODY(test_preexisting, tc) nofr = fread(buf2, 1, sizeof(buf2), fp); ATF_REQUIRE(nofr == sizeof(buf2)); - /* + /* * Since a write on a FILE * retrieved by fmemopen * will add a '\0' (if there's space), we can check * the strings for equality. @@ -105,10 +103,7 @@ ATF_TC_BODY(test_preexisting, tc) ATF_TC_WITHOUT_HEAD(test_autoalloc); ATF_TC_BODY(test_autoalloc, tc) { - /* - * Let fmemopen allocate the buffer. - */ - + /* Let fmemopen allocate the buffer. */ char str[] = "A quick test"; FILE *fp; long pos; @@ -129,9 +124,7 @@ ATF_TC_BODY(test_autoalloc, tc) pos = ftell(fp); ATF_REQUIRE(pos == 512); - /* - * Try to write past the end, we should get a short object count (0) - */ + /* Try to write past the end, we should get a short object count (0) */ nofw = fwrite("a", 1, 1, fp); ATF_REQUIRE(nofw == 0); @@ -172,10 +165,7 @@ ATF_TC_BODY(test_data_length, tc) nofw = fwrite(str, 1, sizeof(str), fp); ATF_REQUIRE(nofw == sizeof(str)); - /* - * Now seek to the end and check that ftell - * gives us sizeof(str). - */ + /* Now seek to the end and check that ftell gives us sizeof(str). */ rc = fseek(fp, 0, SEEK_END); ATF_REQUIRE(rc == 0); pos = ftell(fp); @@ -263,9 +253,7 @@ ATF_TC_BODY(test_append_binary_pos, tc) ATF_REQUIRE(ftell(fp) == 0L); fclose(fp); - /* - * Make sure that a pre-allocated buffer behaves correctly. - */ + /* Make sure that a pre-allocated buffer behaves correctly. */ char buf[] = "Hello"; fp = fmemopen(buf, sizeof(buf), "ab+"); ATF_REQUIRE(ftell(fp) == strlen(buf)); @@ -275,9 +263,7 @@ ATF_TC_BODY(test_append_binary_pos, tc) ATF_TC_WITHOUT_HEAD(test_size_0); ATF_TC_BODY(test_size_0, tc) { - /* - * POSIX mandates that we return EINVAL if size is 0. - */ + /* POSIX mandates that we return EINVAL if size is 0. */ FILE *fp; Copied: stable/10/lib/libc/tests/stdio/fopen_test.c (from r290537, head/lib/libc/tests/stdio/fopen_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/stdio/fopen_test.c Sat Dec 5 04:17:40 2015 (r291840, copy of r290537, head/lib/libc/tests/stdio/fopen_test.c) @@ -0,0 +1,205 @@ +/*- + * Copyright (c) 2013 Jilles Tjoelker + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include + +/* + * O_ACCMODE is currently defined incorrectly. This is what it should be. + * Various code depends on the incorrect value. + */ +#define CORRECT_O_ACCMODE (O_ACCMODE | O_EXEC) + +static void +runtest(const char *fname, const char *mode) +{ + FILE *fp; + int exp_fget_ret, fget_ret, fd, flags, wantedflags; + + fp = fopen(fname, mode); + ATF_REQUIRE_MSG(fp != NULL, + "fopen(\"%s\", \"%s\") failed", fname, mode); + fd = fileno(fp); + ATF_REQUIRE_MSG(fd >= 0, "fileno() failed for fopen"); + exp_fget_ret = strchr(mode, 'e') != NULL ? FD_CLOEXEC : 0; + ATF_REQUIRE_MSG((fget_ret = fcntl(fd, F_GETFD)) == exp_fget_ret, + "fcntl(.., F_GETFD) didn't FD_CLOEXEC as expected %d != %d", + exp_fget_ret, fget_ret); + flags = fcntl(fd, F_GETFL); + if (strchr(mode, '+')) + wantedflags = O_RDWR | (*mode == 'a' ? O_APPEND : 0); + else if (*mode == 'r') + wantedflags = O_RDONLY; + else if (*mode == 'w') + wantedflags = O_WRONLY; + else if (*mode == 'a') + wantedflags = O_WRONLY | O_APPEND; + else + wantedflags = -1; + fclose(fp); + if (wantedflags == -1) + atf_tc_fail("unrecognized mode: %s", mode); + else if ((flags & (CORRECT_O_ACCMODE | O_APPEND)) != wantedflags) + atf_tc_fail("incorrect access mode: %s", mode); +} + +ATF_TC_WITHOUT_HEAD(fopen_r_test); +ATF_TC_BODY(fopen_r_test, tc) +{ + + runtest(_PATH_DEVNULL, "r"); +} + +ATF_TC_WITHOUT_HEAD(fopen_r_append_test); +ATF_TC_BODY(fopen_r_append_test, tc) +{ + + runtest(_PATH_DEVNULL, "r+"); +} + +ATF_TC_WITHOUT_HEAD(fopen_w_test); +ATF_TC_BODY(fopen_w_test, tc) +{ + + runtest(_PATH_DEVNULL, "w"); +} + +ATF_TC_WITHOUT_HEAD(fopen_w_append_test); +ATF_TC_BODY(fopen_w_append_test, tc) +{ + + runtest(_PATH_DEVNULL, "w+"); +} + +ATF_TC_WITHOUT_HEAD(fopen_a_test); +ATF_TC_BODY(fopen_a_test, tc) +{ + + runtest(_PATH_DEVNULL, "a"); +} + +ATF_TC_WITHOUT_HEAD(fopen_a_append_test); +ATF_TC_BODY(fopen_a_append_test, tc) +{ + + runtest(_PATH_DEVNULL, "a+"); +} + +ATF_TC_WITHOUT_HEAD(fopen_re_test); +ATF_TC_BODY(fopen_re_test, tc) +{ + + runtest(_PATH_DEVNULL, "re"); +} + +ATF_TC_WITHOUT_HEAD(fopen_r_append_e_test); +ATF_TC_BODY(fopen_r_append_e_test, tc) +{ + + runtest(_PATH_DEVNULL, "r+e"); +} + +ATF_TC_WITHOUT_HEAD(fopen_we_test); +ATF_TC_BODY(fopen_we_test, tc) +{ + + runtest(_PATH_DEVNULL, "we"); +} + +ATF_TC_WITHOUT_HEAD(fopen_w_append_e_test); +ATF_TC_BODY(fopen_w_append_e_test, tc) +{ + + runtest(_PATH_DEVNULL, "w+e"); +} + +ATF_TC_WITHOUT_HEAD(fopen_ae_test); +ATF_TC_BODY(fopen_ae_test, tc) +{ + + runtest(_PATH_DEVNULL, "ae"); +} + +ATF_TC_WITHOUT_HEAD(fopen_a_append_e_test); +ATF_TC_BODY(fopen_a_append_e_test, tc) +{ + + runtest(_PATH_DEVNULL, "a+e"); +} + +ATF_TC_WITHOUT_HEAD(fopen_re_append_test); +ATF_TC_BODY(fopen_re_append_test, tc) +{ + + runtest(_PATH_DEVNULL, "re+"); +} + +ATF_TC_WITHOUT_HEAD(fopen_we_append_test); +ATF_TC_BODY(fopen_we_append_test, tc) +{ + + runtest(_PATH_DEVNULL, "we+"); +} + +ATF_TC_WITHOUT_HEAD(fopen_ae_append_test); +ATF_TC_BODY(fopen_ae_append_test, tc) +{ + + runtest(_PATH_DEVNULL, "ae+"); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, fopen_r_test); + ATF_TP_ADD_TC(tp, fopen_r_append_test); + ATF_TP_ADD_TC(tp, fopen_w_test); + ATF_TP_ADD_TC(tp, fopen_w_append_test); + ATF_TP_ADD_TC(tp, fopen_a_test); + ATF_TP_ADD_TC(tp, fopen_a_append_test); + ATF_TP_ADD_TC(tp, fopen_re_test); + ATF_TP_ADD_TC(tp, fopen_r_append_e_test); + ATF_TP_ADD_TC(tp, fopen_we_test); + ATF_TP_ADD_TC(tp, fopen_w_append_e_test); + ATF_TP_ADD_TC(tp, fopen_ae_test); + ATF_TP_ADD_TC(tp, fopen_a_append_e_test); + ATF_TP_ADD_TC(tp, fopen_re_append_test); + ATF_TP_ADD_TC(tp, fopen_we_append_test); + ATF_TP_ADD_TC(tp, fopen_ae_append_test); + + return (atf_no_error()); +} + +/* + vim:ts=8:cin:sw=8 + */ Copied: stable/10/lib/libc/tests/stdio/freopen_test.c (from r290537, head/lib/libc/tests/stdio/freopen_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/stdio/freopen_test.c Sat Dec 5 04:17:40 2015 (r291840, copy of r290537, head/lib/libc/tests/stdio/freopen_test.c) @@ -0,0 +1,224 @@ +/*- + * Copyright (c) 2014 Jilles Tjoelker + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include + +static void +runtest(const char *fname1, const char *mode1, const char *fname2, + const char *mode2, bool success) +{ + FILE *fp1, *fp2; + const char *fname2_print; + + fname2_print = fname2 != NULL ? fname2 : ""; + fp1 = fopen(fname1, mode1); + ATF_REQUIRE_MSG(fp1 != NULL, + "fopen(\"%s\", \"%s\") failed; errno=%d", fname1, mode1, errno); + fp2 = freopen(fname2, mode2, fp1); + if (fp2 == NULL) { + fclose(fp1); + ATF_REQUIRE_MSG(success == false, + "freopen(\"%s\", \"%s\", fopen(\"%s\", \"%s\")) succeeded " + "unexpectedly", fname2_print, mode2, fname1, mode1); + return; + } + ATF_REQUIRE_MSG(success == true, + "freopen(\"%s\", \"%s\", fopen(\"%s\", \"%s\")) failed: %d", + fname2_print, mode2, fname1, mode1, errno); + fclose(fp2); +} + +ATF_TC_WITHOUT_HEAD(null__r__r__test); +ATF_TC_BODY(null__r__r__test, tc) +{ + + runtest(_PATH_DEVNULL, "r", NULL, "r", true); +} + +ATF_TC_WITHOUT_HEAD(null__w__r__test); +ATF_TC_BODY(null__w__r__test, tc) +{ + + runtest(_PATH_DEVNULL, "w", NULL, "r", false); +} + +ATF_TC_WITHOUT_HEAD(null__r_append__r__test); +ATF_TC_BODY(null__r_append__r__test, tc) +{ + + runtest(_PATH_DEVNULL, "r+", NULL, "r", true); +} + +ATF_TC_WITHOUT_HEAD(null__r__w__test); +ATF_TC_BODY(null__r__w__test, tc) +{ + + runtest(_PATH_DEVNULL, "r", NULL, "w", false); +} + +ATF_TC_WITHOUT_HEAD(null__w__w__test); +ATF_TC_BODY(null__w__w__test, tc) +{ + + runtest(_PATH_DEVNULL, "w", NULL, "w", true); +} + +ATF_TC_WITHOUT_HEAD(null__r_append__w__test); +ATF_TC_BODY(null__r_append__w__test, tc) +{ + + runtest(_PATH_DEVNULL, "r+", NULL, "w", true); +} + +ATF_TC_WITHOUT_HEAD(null__r__a__test); +ATF_TC_BODY(null__r__a__test, tc) +{ + + runtest(_PATH_DEVNULL, "r", NULL, "a", false); +} + +ATF_TC_WITHOUT_HEAD(null__w__a__test); +ATF_TC_BODY(null__w__a__test, tc) +{ + + runtest(_PATH_DEVNULL, "w", NULL, "a", true); +} + +ATF_TC_WITHOUT_HEAD(null__r_append__a__test); +ATF_TC_BODY(null__r_append__a__test, tc) +{ + + runtest(_PATH_DEVNULL, "r+", NULL, "a", true); +} + +ATF_TC_WITHOUT_HEAD(null__r__r_append__test); +ATF_TC_BODY(null__r__r_append__test, tc) +{ + + runtest(_PATH_DEVNULL, "r", NULL, "r+", false); +} + +ATF_TC_WITHOUT_HEAD(null__w__r_append__test); +ATF_TC_BODY(null__w__r_append__test, tc) +{ + + runtest(_PATH_DEVNULL, "w", NULL, "r+", false); +} + +ATF_TC_WITHOUT_HEAD(null__r_append__r_append__test); +ATF_TC_BODY(null__r_append__r_append__test, tc) +{ + + runtest(_PATH_DEVNULL, "r+", NULL, "r+", true); +} + +ATF_TC_WITHOUT_HEAD(null__r__w_append__test); +ATF_TC_BODY(null__r__w_append__test, tc) +{ + + runtest(_PATH_DEVNULL, "r", NULL, "w+", false); +} + +ATF_TC_WITHOUT_HEAD(null__w__w_append__test); +ATF_TC_BODY(null__w__w_append__test, tc) +{ + + runtest(_PATH_DEVNULL, "w", NULL, "w+", false); +} + +ATF_TC_WITHOUT_HEAD(null__r_append__w_append__test); +ATF_TC_BODY(null__r_append__w_append__test, tc) +{ + + runtest(_PATH_DEVNULL, "r+", NULL, "w+", true); +} + +ATF_TC_WITHOUT_HEAD(sh__r__r__test); +ATF_TC_BODY(sh__r__r__test, tc) +{ + + runtest("/bin/sh", "r", NULL, "r", true); +} + +ATF_TC_WITHOUT_HEAD(sh__sh__r__r__test); +ATF_TC_BODY(sh__sh__r__r__test, tc) +{ + + runtest("/bin/sh", "r", "/bin/sh", "r", true); +} + +ATF_TC_WITHOUT_HEAD(sh__null__r__r__test); +ATF_TC_BODY(sh__null__r__r__test, tc) +{ + + runtest("/bin/sh", "r", _PATH_DEVNULL, "r", true); +} + +ATF_TC_WITHOUT_HEAD(sh__null__r__w__test); +ATF_TC_BODY(sh__null__r__w__test, tc) +{ + + runtest("/bin/sh", "r", _PATH_DEVNULL, "w", true); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, null__r__r__test); + ATF_TP_ADD_TC(tp, null__w__r__test); + ATF_TP_ADD_TC(tp, null__r_append__r__test); + ATF_TP_ADD_TC(tp, null__r__w__test); + ATF_TP_ADD_TC(tp, null__w__w__test); + ATF_TP_ADD_TC(tp, null__r_append__w__test); + ATF_TP_ADD_TC(tp, null__r__a__test); + ATF_TP_ADD_TC(tp, null__w__a__test); + ATF_TP_ADD_TC(tp, null__r_append__a__test); + ATF_TP_ADD_TC(tp, null__r__r_append__test); + ATF_TP_ADD_TC(tp, null__w__r_append__test); + ATF_TP_ADD_TC(tp, null__r_append__r_append__test); + ATF_TP_ADD_TC(tp, null__r__w_append__test); + ATF_TP_ADD_TC(tp, null__w__w_append__test); + ATF_TP_ADD_TC(tp, null__r_append__w_append__test); + ATF_TP_ADD_TC(tp, sh__r__r__test); + ATF_TP_ADD_TC(tp, sh__sh__r__r__test); + ATF_TP_ADD_TC(tp, sh__null__r__r__test); + ATF_TP_ADD_TC(tp, sh__null__r__w__test); + + return (atf_no_error()); +} + +/* + vim:ts=8:cin:sw=8 + */ Copied and modified: stable/10/lib/libc/tests/stdio/getdelim_test.c (from r290537, head/lib/libc/tests/stdio/getdelim_test.c) ============================================================================== --- head/lib/libc/tests/stdio/getdelim_test.c Sun Nov 8 06:37:50 2015 (r290537, copy source) +++ stable/10/lib/libc/tests/stdio/getdelim_test.c Sat Dec 5 04:17:40 2015 (r291840) @@ -166,6 +166,7 @@ ATF_TC_BODY(eof, tc) ATF_REQUIRE(linecap > 0); ATF_REQUIRE(errno == 0); printf("feof\n"); + errno = 0; ATF_REQUIRE(feof(fp)); ATF_REQUIRE(!ferror(fp)); fclose(fp); @@ -178,6 +179,7 @@ ATF_TC_BODY(nul, tc) char *line; size_t linecap, n; + errno = 0; line = NULL; linecap = 0; /* Make sure a NUL delimiter works. */ Copied: stable/10/lib/libc/tests/stdio/mkostemp_test.c (from r290537, head/lib/libc/tests/stdio/mkostemp_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/stdio/mkostemp_test.c Sat Dec 5 04:17:40 2015 (r291840, copy of r290537, head/lib/libc/tests/stdio/mkostemp_test.c) @@ -0,0 +1,185 @@ +/*- + * Copyright (c) 2013 Jilles Tjoelker + * 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. + */ + +/* + * Test program for mkostemp(). + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +static const char template[] = "mkostemp.XXXXXXXX"; +static int testnum; + +#define MISCFLAGS (O_APPEND | O_DIRECT | O_SHLOCK | O_EXLOCK | O_SYNC) + +static void +test_one(int oflags) +{ + char tmpf[sizeof(template)]; + struct stat st1, st2; + int fd; + + memcpy(tmpf, template, sizeof(tmpf)); + fd = mkostemp(tmpf, oflags); + if (fd < 0) { + printf("not ok %d - oflags=%#x " + "mkostemp() reported failure: %s\n", + testnum++, oflags, strerror(errno)); + return; + } + if (memcmp(tmpf, template, sizeof(tmpf) - 8 - 1) != 0) { + printf("not ok %d - oflags=%#x " + "returned pathname does not match template: %s\n", + testnum++, oflags, tmpf); + return; + } + do { + if (fcntl(fd, F_GETFD) != + (oflags & O_CLOEXEC ? FD_CLOEXEC : 0)) { + printf("not ok %d - oflags=%#x " + "close-on-exec flag incorrect\n", + testnum++, oflags); + break; + } + if ((fcntl(fd, F_GETFL) & MISCFLAGS) != (oflags & MISCFLAGS)) { + printf("not ok %d - oflags=%#x " + "open flags incorrect\n", + testnum++, oflags); + break; + } + if (stat(tmpf, &st1) == -1) { + printf("not ok %d - oflags=%#x " + "cannot stat returned pathname %s: %s\n", + testnum++, oflags, tmpf, strerror(errno)); + break; + } + if (fstat(fd, &st2) == -1) { + printf("not ok %d - oflags=%#x " + "cannot fstat returned fd %d: %s\n", + testnum++, oflags, fd, strerror(errno)); + break; + } + if (!S_ISREG(st1.st_mode) || (st1.st_mode & 0777) != 0600 || + st1.st_nlink != 1 || st1.st_size != 0) { + printf("not ok %d - oflags=%#x " + "named file attributes incorrect\n", + testnum++, oflags); + break; + } + if (!S_ISREG(st2.st_mode) || (st2.st_mode & 0777) != 0600 || + st2.st_nlink != 1 || st2.st_size != 0) { + printf("not ok %d - oflags=%#x " + "opened file attributes incorrect\n", + testnum++, oflags); + break; + } + if (st1.st_dev != st2.st_dev || st1.st_ino != st2.st_ino) { + printf("not ok %d - oflags=%#x " + "named and opened file do not match\n", + testnum++, oflags); + break; + } + (void)unlink(tmpf); + if (fstat(fd, &st2) == -1) + printf("not ok %d - oflags=%#x " + "cannot fstat returned fd %d again: %s\n", + testnum++, oflags, fd, strerror(errno)); + else if (st2.st_nlink != 0) + printf("not ok %d - oflags=%#x " + "st_nlink is not 0 after unlink\n", + testnum++, oflags); + else + printf("ok %d - oflags=%#x\n", testnum++, oflags); + (void)close(fd); + return; + } while (0); + (void)close(fd); + (void)unlink(tmpf); +} + +ATF_TC_WITHOUT_HEAD(zero); +ATF_TC_BODY(zero, tc) +{ + + test_one(0); +} + +ATF_TC_WITHOUT_HEAD(O_CLOEXEC); +ATF_TC_BODY(O_CLOEXEC, tc) +{ + + test_one(O_CLOEXEC); +} + +ATF_TC_WITHOUT_HEAD(O_APPEND); +ATF_TC_BODY(O_APPEND, tc) +{ + + test_one(O_APPEND); +} + +ATF_TC_WITHOUT_HEAD(O_APPEND__O_CLOEXEC); +ATF_TC_BODY(O_APPEND__O_CLOEXEC, tc) +{ + + test_one(O_APPEND|O_CLOEXEC); +} + +ATF_TC_WITHOUT_HEAD(bad_flags); +ATF_TC_BODY(bad_flags, tc) +{ + + char tmpf[sizeof(template)]; + + memcpy(tmpf, template, sizeof(tmpf)); + ATF_REQUIRE_MSG(mkostemp(tmpf, O_CREAT) == -1, + "mkostemp(O_CREAT) succeeded unexpectedly"); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, zero); + ATF_TP_ADD_TC(tp, O_CLOEXEC); + ATF_TP_ADD_TC(tp, O_APPEND); + ATF_TP_ADD_TC(tp, O_APPEND__O_CLOEXEC); + ATF_TP_ADD_TC(tp, bad_flags); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Dec 5 04:19:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B434A415A6; Sat, 5 Dec 2015 04:19:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A73214A1; Sat, 5 Dec 2015 04:19:42 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB54JfKK008625; Sat, 5 Dec 2015 04:19:41 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB54Jfa6008624; Sat, 5 Dec 2015 04:19:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512050419.tB54Jfa6008624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 04:19:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291841 - stable/10/tools/regression/lib/libc/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 04:19:42 -0000 Author: ngie Date: Sat Dec 5 04:19:40 2015 New Revision: 291841 URL: https://svnweb.freebsd.org/changeset/base/291841 Log: Remove stale tools/regression directory that should have been deleted in r291840 Sponsored by: EMC / Isilon Storage Division Deleted: stable/10/tools/regression/lib/libc/stdio/ From owner-svn-src-all@freebsd.org Sat Dec 5 04:41:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7674A41982; Sat, 5 Dec 2015 04:41:54 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 6AF611E50; Sat, 5 Dec 2015 04:41:53 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 5FBCA427020; Sat, 5 Dec 2015 15:41:46 +1100 (AEDT) Date: Sat, 5 Dec 2015 15:41:45 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: NGie Cooper cc: Bruce Evans , Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r290605 - in head/lib/msun: . man In-Reply-To: <4E9A0C74-DC06-41E3-A27D-46FF06A98C95@gmail.com> Message-ID: <20151205151425.R881@besplex.bde.org> References: <201511091040.tA9AeG0B038056@repo.freebsd.org> <20151109223117.Y2340@besplex.bde.org> <4E9A0C74-DC06-41E3-A27D-46FF06A98C95@gmail.com> MIME-Version: 1.0 X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=R4L+YolX c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=nlC_4_pT8q9DhB4Ho9EA:9 a=6mdaXJ0nu53JtM45jxIA:9 a=45ClL6m2LaAA:10 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 04:41:54 -0000 On Fri, 4 Dec 2015, NGie Cooper wrote: >> On Nov 9, 2015, at 04:03, Bruce Evans wrote: >> >> On Mon, 9 Nov 2015, Garrett Cooper wrote: >> >>> Log: >>> Document powl(3) >> >> powl was garbage that was intentionally undocumented. At least, I >> intentionally ignored its non-documentation together with it. > > POSIX documents it and I noticed it was missing when porting the msun tes= tcases from NetBSD. That=E2=80=99s the reason why I filed the bug. C99 requires it, but FreeBSD doesn't support it. Compilers still don't support delicate floating point things for C90, so I don't feel too bad about this. >> powl doesn't compute the value of .Ar x to the exponent .Ar y. It compu= tes >> the value of (double)(.Ar x) to the exponent (double)(.Ar y), converted = to >> double. > > Hmmm? The types look ok per the function signatures in lib/msun: > > lib/msun/src/imprecise.c:imprecise_powl(long double x, long double y) > lib/msun/src/math.h:long double powl(long double, long double); That is just the types. The following misimplementation also has the correct types: '#define powl(x, y) 1.0L'. This is actually more precise than than the current one on average (it gets almost all cases completely wrong, but the current one gets more than 99% of cases wrong and has more errors of infinity instead of large and finite). It is only worse on average for non-exceptional cases like powl(2, 2). > ... > These are bugs that need to be fixed then in the longterm, but in the sho= rt term should be documented under CAVEATS. The details are large and not very interesting. A polite version of what I think of this might be "The the powl() function is not of production quality. It is similar to '#define powl(x, y) (pow((x), (y)))'". Bruce From owner-svn-src-all@freebsd.org Sat Dec 5 04:43:58 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4281A419FE; Sat, 5 Dec 2015 04:43:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACB3A103F; Sat, 5 Dec 2015 04:43:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB54hvl3017310; Sat, 5 Dec 2015 04:43:57 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB54hu5D017291; Sat, 5 Dec 2015 04:43:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201512050443.tB54hu5D017291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 5 Dec 2015 04:43:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291842 - head/tools/tools/nanobsd/embedded X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 04:43:59 -0000 Author: imp Date: Sat Dec 5 04:43:56 2015 New Revision: 291842 URL: https://svnweb.freebsd.org/changeset/base/291842 Log: New config files for embedded boards. Build with ../nanobsd.sh -c rpi.cfg, for example. This can be done as a normal user. This is a work in progress. It relies on the new nopriv build stuff committed to nanobsd, but isn't complete yet. Currently, one must copy files into the DOS partition in the image. Also, ownership isn't preserved because this doesn't use the new mtree-dedup.awk yet, but rather some crazy mtree stuff. The image building bits will move up into nanobsd when they are ready. Also includes very preliminary support for building qemu images for all platforms that we can for qemu. It is missing aarch64, and we put the image on s2 instead of s1 and mkimg can't mark s2 as active, so there's some issues. Oh, and I didn't do it for arm. Take a look, kick the tires, expect problems. Added: head/tools/tools/nanobsd/embedded/ head/tools/tools/nanobsd/embedded/README (contents, props changed) head/tools/tools/nanobsd/embedded/beaglebone.cfg (contents, props changed) head/tools/tools/nanobsd/embedded/common (contents, props changed) head/tools/tools/nanobsd/embedded/qemu-amd64.cfg (contents, props changed) head/tools/tools/nanobsd/embedded/qemu-i386.cfg (contents, props changed) head/tools/tools/nanobsd/embedded/qemu-mips.cfg (contents, props changed) head/tools/tools/nanobsd/embedded/qemu-mips64.cfg (contents, props changed) head/tools/tools/nanobsd/embedded/qemu-powerpc.cfg (contents, props changed) head/tools/tools/nanobsd/embedded/qemu-powerpc64.cfg (contents, props changed) head/tools/tools/nanobsd/embedded/qemu-sparc64.cfg (contents, props changed) head/tools/tools/nanobsd/embedded/rpi.cfg (contents, props changed) head/tools/tools/nanobsd/embedded/rpi2.cfg (contents, props changed) head/tools/tools/nanobsd/embedded/sam9260ek.cfg (contents, props changed) head/tools/tools/nanobsd/embedded/sam9g20ek.cfg (contents, props changed) Added: head/tools/tools/nanobsd/embedded/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/embedded/README Sat Dec 5 04:43:56 2015 (r291842) @@ -0,0 +1,14 @@ +$FreeBSD$ + +Example for creating many different builds (including different +arch) from a common set of files, as well as building natively +using qemu user space emulation. + +This creates a simple appliance that uses dnsmasq to serve DNS +and DHCPd. + +This is a work in progress. Generally, to build this you should + cd tools/tools/nanobsd/embedded + sudo sh ../nanobsd.sh -c foo.cfg +but do be careful if things are interrupted. There may still be +bugs lurking that cause your entire FreeBSD tree to disappear. Added: head/tools/tools/nanobsd/embedded/beaglebone.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/embedded/beaglebone.cfg Sat Dec 5 04:43:56 2015 (r291842) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +#- +# Copyright (c) 2015 Warner Losh. All Rights Reserved. +# Copyright (c) 2010-2011 iXsystems, Inc., 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 iXsystems, Inc. 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. +# +# This file is heavily derived from both Sam Leffler's Avilia config, +# as well as the BSDRP project's config file. Neither of these have +# an explicit copyright/license statement, but are implicitly BSDL. This +# example has been taken from the FreeNAS project and simplified to meet +# the needs of the example. +# + +NANO_ARCH=armv6 +NANO_KERNEL=BEAGLEBONE +NANO_DRIVE=mmcsd0 +NANO_NAME=rpi2 +NANO_BOOT_PKG=u-boot-beaglebone +NANO_CPUTYPE=cortex-a8 + +. common # Pull in common definitions, keep last Added: head/tools/tools/nanobsd/embedded/common ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/embedded/common Sat Dec 5 04:43:56 2015 (r291842) @@ -0,0 +1,566 @@ +# $FreeBSD$ + +#- +# Copyright (c) 2015 Warner Losh. All Rights Reserved. +# Copyright (c) 2010-2011 iXsystems, Inc., 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 iXsystems, Inc 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. +# +# +# This file is heavily derived from both Sam Leffler's Avilia config, +# as well as the BSDRP project's config file. Neither of these have +# an explicit copyright/license statement, but are implicitly BSDL. This +# example has been taken from the FreeNAS project (an early version) and +# simplified to meet the needs of the example. +# + +# NB: You want the other file as the command line arg :) + +# Missing in base: +# o mkimg setting active partition +# o mkimg starting at arbitrary offset (needed for A10, et al) +# o mtools still needed becuase we have no makefs -t msdos +# o nanobsd doesn't record changes to WORLDTEMP in customization +# scripts yet, so we have kludge to pick up all files +# o easy way for pkg to grab files from other repos and put that +# data on the image +# o Need to have some way to create / resize the s4 slice to do ping +# pong bouncing between s3 and s4 for an arbitrary image. we can resize +# one slice, not two +# o hints in the uboot ports for how to create the image +# +# Missing here +# o documentation for how to run the qemu images +# o msdos mtools fallback +# o special boot for !x86 !arm platforms +# o qemu image for arm +# o qemu image for aarch64 +# o qemu image for armv6/armv7 +# o easy support for different image / vm formats +# o need to promote much of this to nanobsd.sh and friends +# o uses old kludge to build image w/o ownership being right +# for many files. Should move to mtree-dedup.awk. +# o support for EFI images +# o support for GPT partitioning +# +# Long Term +# o common tooling for creating images for odd-ball platforms +# o support for boot loaders other than uboot in the image +# or via special insturctions +# o No pony support. Sadly, you cannot have a pony. +# + +if [ -z $NANO_NAME ]; then + echo "NANO_NAME not defined. Use foo.cfg instead." +fi + +# Slice 1: FAT for ROM loading bootstrap +# Slice 2: Config partition +# Slice 3: FreeBSD partition (sized exactly) +# Slice 4: FreeBSD partition (empty) +# on first boot, we resize slice 3 & 4 to be 1/2 of what's +# left over on the SD card after slice 1 and 2 are taken +# off the top. We also resize the 'a' partion on first boot +# to the size of the partition for the ping/pong upgrade. +if [ -z "$EMBED_OMIT_FAT" ]; then + NANO_SLICE_FAT=s1 + NANO_SLICE_CFG=s2 + NANO_SLICE_ROOT=s3 + NANO_SLICE_ALTROOT=s4 +else + NANO_SLICE_CFG=s1 + NANO_SLICE_ROOT=s2 + NANO_SLICE_ALTROOT=s3 +fi +NANO_SLICE_DATA= # Not included + +NANO_SLICE_FAT_SIZE=32m +NANO_SLICE_CFG_SIZE=32m + +NANO_RAM_ETCSIZE=8192 +NANO_RAM_TMPVARSIZE=8192 +NANO_IMAGES=2 + +NANO_PMAKE="make -j $(sysctl -n hw.ncpu)" + +NANO_CFG_BASE=$(pwd) +NANO_CFG_BASE=$(realpath ${NANO_CFG_BASE}/..) +NANO_SRC=$(realpath ${NANO_CFG_BASE}/../../..) +#### XXX share obj +NANO_OBJ=${NANO_SRC}/../$NANO_NAME/obj +# Where cust_pkg() finds packages to install +#XXX: Is this the right place? +#NANO_PORTS=$(realpath ${NANO_SRC}/../ports) +NANO_PORTS=/usr/ports +NANO_PACKAGE_DIR=${NANO_SRC}/${NANO_TOOLS}/Pkg +NANO_INIT_IMG2=0 +NANO_NOPRIV_BUILD=t +unset MAKEOBJDIRPREFIX + +# this to go into nanobsd.sh +NANO_PORTS=${NANO_PORTS:-/usr/ports} + +mkdir -p ${NANO_OBJ} + +customize_cmd cust_allow_ssh_root + +add_etc_make_conf() +{ + touch ${NANO_WORLDDIR}/etc/make.conf +} +customize_cmd add_etc_make_conf + +cust_install_machine_files() +{ + echo "cd ${NANO_CFG_BASE}/Files" + cd ${NANO_CFG_BASE}/Files + find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -dumpv ${NANO_WORLDDIR} +} +customize_cmd cust_install_files +customize_cmd cust_install_machine_files + +buildenv() +{ + cd ${NANO_SRC} + env __MAKE_CONF=${NANO_MAKE_CONF_BUILD} DESTDIR=${NANO_WORLDDIR} make buildenv +} + +NANO_MAKEFS="makefs -B big \ + -o bsize=4096,fsize=512,density=8192,optimization=space" +export NANO_MAKEFS + +# NB: leave c++ enabled so devd can be built +CONF_BUILD=" +WITHOUT_ACPI=true +WITHOUT_ATM=true +WITHOUT_AUDIT=true +WITHOUT_BIND_DNSSEC=true +WITHOUT_BIND_ETC=true +WITHOUT_BIND_LIBS_LWRES=true +WITHOUT_BLUETOOTH=true +WITHOUT_CALENDAR=true +WITHOUT_CVS=true +WITHOUT_DICT=true +WITHOUT_EXAMPLES=true +WITHOUT_FORTRAN=true +WITHOUT_GAMES=true +WITHOUT_GCOV=true +WITHOUT_GPIB=true +WITHOUT_HTML=true +WITHOUT_I4B=true +WITHOUT_IPFILTER=true +WITHOUT_IPX=true +WITHOUT_LIBKSE=true +WITHOUT_LOCALES=true +WITHOUT_LPR=true +WITHOUT_MAN=true +WITHOUT_NETCAT=true +WITHOUT_NIS=true +WITHOUT_NLS=true +WITHOUT_NS_CACHING=true +WITHOUT_OBJC=true +WITHOUT_PROFILE=true +WITHOUT_RCMDS=true +WITHOUT_SENDMAIL=true +WITHOUT_SHAREDOCS=true +WITHOUT_SYSCONS=true +WITHOUT_LIB32=true +" +CONF_INSTALL="$CONF_BUILD +INSTALL_NODEBUG=t +NOPORTDOCS=t +NO_INSTALL_MANPAGES=t +" +# The following would help... +# WITHOUT_TOOLCHAIN=true can't build ports +# WITHOUT_INSTALLLIB=true libgcc.a +# +# from the build +# WITHOUT_INFO=true makeinfo +# WITHOUT_RCS=true +PKG_ONLY_MAKE_CONF=" +WITHOUT_TOOLCHAIN=true +WITHOUT_INSTALLLIB=true +WITHOUT_INFO=true +WITHOUT_RCS=true +" + +NANO_PACKAGE_ONLY=1 + +# install a package from a pre-built binary +do_add_pkg () +{ + # Need to create ${NANO_OBJ}/ports in this add_pkg_${port} function + set -x + mkdir -p ${NANO_OBJ}/ports/distfiles + mkdir -p ${NANO_OBJ}/ports/packages + mkdir -p ${NANO_WORLDDIR}/usr/ports/packages + mkdir -p ${NANO_WORLDDIR}/usr/ports/distfiles + mount -t nullfs -o noatime ${NANO_OBJ}/ports/packages \ + ${NANO_WORLDDIR}/usr/ports/packages + mount -t nullfs -o noatime ${NANO_OBJ}/ports/distfiles \ + ${NANO_WORLDDIR}/usr/ports/distfiles + CR env ASSUME_ALWAYS_YES=YES SIGNATURE_TYPE=none /usr/sbin/pkg add /usr/ports/packages/All/$1.txz + umount ${NANO_WORLDDIR}/usr/ports/distfiles + umount ${NANO_WORLDDIR}/usr/ports/packages + rmdir ${NANO_WORLDDIR}/usr/ports/packages + rmdir ${NANO_WORLDDIR}/usr/ports/distfiles + rmdir ${NANO_WORLDDIR}/usr/ports + set +x +} + +# Build a port (with the side effect of creating a package) +do_add_port () +{ + local port_path + port_path=$1 + shift + set -x + # Need to create ${NANO_OBJ}/ports in this add_port_${port} function + mkdir -p ${NANO_OBJ}/ports/distfiles + mkdir -p ${NANO_OBJ}/ports/packages + mkdir -p ${NANO_PORTS}/packages + mkdir -p ${NANO_PORTS}/distfiles + mkdir -p ${NANO_WORLDDIR}/usr/src + mkdir -p ${NANO_WORLDDIR}/usr/ports + mount -t nullfs -o noatime ${NANO_SRC} ${NANO_WORLDDIR}/usr/src + mount -t nullfs -o noatime ${NANO_PORTS} ${NANO_WORLDDIR}/usr/ports + mount -t nullfs -o noatime ${NANO_OBJ}/ports/packages \ + ${NANO_WORLDDIR}/usr/ports/packages + mount -t nullfs -o noatime ${NANO_OBJ}/ports/distfiles \ + ${NANO_WORLDDIR}/usr/ports/distfiles + mkdir -p ${NANO_WORLDDIR}/dev + mount -t devfs devfs ${NANO_WORLDDIR}/dev + mkdir -p ${NANO_WORLDDIR}/usr/workdir + cp /etc/resolv.conf ${NANO_WORLDDIR}/etc/resolv.conf + # OK, a little inefficient, but likely not enough to worry about. + CR ldconfig /lib /usr/lib /usr/local/lib + CR ldconfig -R + CR ldconfig -r +# Improvement: Don't know why package-recursive don't works here + CR "env UNAME_p=${NANO_ARCH} TARGET=${NANO_ARCH} \ + TARGET_ARCH=${NANO_ARCH} PORTSDIR=${NANO_PORTS} make \ + __MAKE_CONF=${NANO_MAKE_CONF_BUILD} \ + WRKDIRPREFIX=/usr/workdir -C /usr/ports/$port_path \ + package-recursive BATCH=yes $* clean FORCE_PKG_REGISTER=t" + rm ${NANO_WORLDDIR}/etc/resolv.conf + rm -rf ${NANO_WORLDDIR}/usr/obj + rm -rf ${NANO_WORLDDIR}/usr/workdir + umount ${NANO_WORLDDIR}/dev + umount ${NANO_WORLDDIR}/usr/ports/packages + umount ${NANO_WORLDDIR}/usr/ports/distfiles + umount ${NANO_WORLDDIR}/usr/ports + umount ${NANO_WORLDDIR}/usr/src + set +x +} + +# Need to check if this function works with cross-compiling architecture!!!! +# Recursive complex fonction: Generate one function for each ports +add_port () { + local port_path=$1 + local port=`echo $1 | sed -e 's/\//_/'` + shift + # Check if package allready exist + # Need to: + # 1. check ARCH of this package! + # 2. Add a trap + cd ${NANO_PORTS}/${port_path} + PKG_NAME=`env PORTSDIR=${NANO_PORTS} make __MAKE_CONF=${NANO_MAKE_CONF_BUILD} package-name` + if [ -f ${NANO_OBJ}/ports/packages/All/${PKG_NAME}.txz ]; then + # Pkg file found: Generate add_pkg_NAME function + eval " + add_pkg_${port} () { + do_add_pkg ${PKG_NAME} + } + customize_cmd add_pkg_${port} + " + else + # No pkg file: Generate add_port_NAME function + eval " + add_port_${port} () { + do_add_port ${port_path} $* + } + customize_cmd add_port_${port} + " + NANO_PACKAGE_ONLY=0 + fi +} + +create_diskimage ( ) ( + local extra + + pprint 2 "build diskimage ${NANO_NAME}" + pprint 3 "log: ${NANO_OBJ}/_.di" + + ( + if [ ! -z ${NANO_NOPRIV_BUILD} ]; then + extra="-F ${NANO_OBJ}/_.metalog" + fi + + for i in s1 s2 s3 s4 empty; do + rm -fr ${NANO_OBJ}/_.${i}* + done + + if [ ! -z "${NANO_SLICE_FAT}" ]; then + echo Creating MSDOS partition for kernel + newfs_msdos -C ${NANO_SLICE_FAT_SIZE:-100m} -F 16 -L ${NANO_NAME} \ + ${NANO_OBJ}/_.${NANO_SLICE_FAT} + fi + echo Creating main partition + sz=${NANO_SLICE_ROOT_SIZE:+-s ${NANO_SLICE_ROOT_SIZE}} + makefs ${extra} -B little $sz -t ffs ${NANO_OBJ}/_.${NANO_SLICE_ROOT}a "${NANO_WORLDDIR}" + if [ -z "${NANO_CFGDIR}" ]; then + echo "Faking cfg dir, it's empty" + NANO_CFGDIR=${NANO_OBJ}/_.empty + mkdir ${NANO_CFGDIR} + fi + echo Creating cfg parittion +# XXX -F cfg-mtree + makefs -B little -t ffs -s ${NANO_SLICE_CFG_SIZE:-100m} \ + ${NANO_OBJ}/_.${NANO_SLICE_CFG} "${NANO_CFGDIR}" + # data slice not supported since we need the part for FAT for + # booting + echo Slicing up the main partition into a full bsd part + mkimg -s bsd -p freebsd-ufs:=${NANO_OBJ}/_.${NANO_SLICE_ROOT}a \ + -o ${NANO_OBJ}/_.${NANO_SLICE_ROOT} + echo Making the whole shooting match + if [ ! -z $NANO_SLICE_FAT ]; then + eval $NANO_SLICE_FAT=fat16b + fi + eval $NANO_SLICE_CFG=freebsd + eval $NANO_SLICE_ROOT=freebsd + if [ ! -z "${NANO_SLICE_FAT}" ]; then + mkimg -s mbr -p ${s1}:=${NANO_OBJ}/_.s1 \ + -p ${s2}:=${NANO_OBJ}/_.s2 \ + -p ${s3}:=${NANO_OBJ}/_.s3 \ + -o ${NANO_OBJ}/_.disk.image.${NANO_NAME} + else + # s1 is cfg, s2 is /, not sure how to make that + # boot (marked as active) with mkimg yet + mkimg -s mbr -p ${s1}:=${NANO_OBJ}/_.s1 \ + -p ${s2}:=${NANO_OBJ}/_.s2 + -o ${NANO_OBJ}/_.disk.image.${NANO_NAME} + ) > ${NANO_OBJ}/_.di 2>&1 +) + +die() +{ + echo "$*" + exit 1 +} + +# Automatically include the packaging port here so it is always first so it +# builds the port and adds the package so we can add other packages. +#XXX Not sure this works for cross build, so punting for the moment +#add_port ports-mgmt/pkg +#add_port security/sudo +#add_port ftp/curl + +rp=$(realpath ${NANO_OBJ}/) +__a=`mount | grep ${rp} | awk '{print length($3), $3;}' | sort -rn | awk '{$1=""; print;}'` +if [ -n "$__a" ]; then + echo "unmounting $__a" + umount $__a +fi + +NANO_BOOTLOADER="boot/boot0" + +if [ "$DEBUG" = 1 ]; then + DEBUG_BUILD=" +DEBUG_FLAGS= -g +" +else + DEBUG_INSTALL=" +INSTALL_NODEBUG= t +" +fi + +CONF_INSTALL="$CONF_BUILD +${DEBUG_BUILD} +" +CONF_INSTALL="$CONF_INSTALL +${DEBUG_INSTALL} +" + +if [ "${NANO_PACKAGE_ONLY}" -eq 1 ]; then + CONF_INSTALL="${CONF_INSTALL} +${PKG_ONLY_MAKE_CONF} +" + echo "Automatically building a thin image with packages" +else + echo "Automatically building a * * F A T * * image so we can build ports" +fi + +VARS="MASTER_SITE_BACKUP MASTER_SITE_OVERRIDE PACKAGEROOT PACKAGESITE" + +for var in $VARS; do + val=$(eval echo "\$$var") + if [ -n "$val" ]; then + CONF_INSTALL="${CONF_INSTALL} +$var=$val" + fi +done + +hack_nsswitch_conf ( ) +{ + # Remove all references to NIS in the nsswitch.conf file + # Not sure this is still needed, but FreeNAS has it... + sed -i.bak -es/nis/files/g ${NANO_WORLDDIR}/etc/nsswitch.conf + rm -f ${NANO_WORLDDIR}/etc/nsswitch.conf.bak +} +customize_cmd hack_nsswitch_conf + +save_build ( ) +{ + VERSION_FILE=${NANO_WORLDDIR}/etc/version + if [ "${SVNREVISION}" = "${REVISION}" ]; then + echo "${NANO_NAME}" > "${VERSION_FILE}" + else + echo "${NANO_NAME} (${SVNREVISION})" > "${VERSION_FILE}" + fi +} +customize_cmd save_build + +remove_patch_divots ( ) +{ + find ${NANO_WORLDDIR} -name \*.orig -or -name \*.rej -delete +} +customize_cmd remove_patch_divots + +shrink_md_fbsize() +{ + # We have a lot of little files on our memory disks. Let's decrease + # the block and frag size to fit more little files on them (this + # halves our space requirement by ~50% on /etc and /var on 8.x -- + # and gives us more back on 9.x as the default block and frag size + # are 4 times larger). + sed -i '' -e 's,-S -i 4096,-S -i 4096 -b 4096 -f 512,' \ + ${NANO_WORLDDIR}/etc/rc.initdiskless +} +customize_cmd shrink_md_fbsize + +if [ "${DEBUG}" = 1 ]; then + +unmute_console_logging() +{ + # /var is small. Don't fill it up with messages from console.log + # because it's a chatty log. + sed -i '' -e 's/#console.info/console.info/' \ + "${NANO_WORLDDIR}/etc/syslog.conf" +} +customize_cmd unmute_console_logging + +fi + +product_custom() +{ + if [ -z ${NANO_NOPRIV_BUILD} ]; then + # Last second tweaks -- generally not needed + chown -R root:wheel ${NANO_WORLDDIR}/root + chmod 0755 ${NANO_WORLDDIR}/root/* + chmod 0755 ${NANO_WORLDDIR}/* + chown -R root:wheel ${NANO_WORLDDIR}/etc + chown -R root:wheel ${NANO_WORLDDIR}/boot + chown root:wheel ${NANO_WORLDDIR}/ + chown root:wheel ${NANO_WORLDDIR}/usr + else + # Construct an mtree after our messing around with the tree + # Trim out all the uid / gid stuff, since for new files it + # is likely wrong, and for other files it doesn't matter. + mtree -p ${NANO_WORLDDIR} -c | \ + mtree -C | \ + sed -e 's/ uid=[0-9][0-9]* / /g;s/ gid=[0-9][0-9]* / /' \ + > ${NANO_OBJ}/_.mtree.post + + # Sort the metalog, and save the original. Sadly, this + # seems to expand the uname= and gname= to uid= and gid= + # which is lame and likely a bug in mtree. The man page + # is just vague enough to be infuriating as to the proper + # behavior. Happily, it removes all the // that can confound + # things. + mtree -C -S -f ${NANO_OBJ}/_.metalog > ${NANO_OBJ}/_.mtree.pre + mv ${NANO_OBJ}/_.metalog ${NANO_OBJ}/_.metalog.install + + # mtree -f -f produces a comm-like output. The first column will + # be the files we deleted, so we ignore it. The second column is + # the same in both, so we pass it through. The third column is + # listed twice, so we ignore the second one. We also trim out + # the size, because size just doesn't matter as nanobsd and + # customizations often tweak files changing their size. We also + # add 'optional' to every file in case something slipped through + # that's gone from the tree, though maybe that's a real bug. + # + # To make matters worse, currently mtree in freebsd uses the + # old 'file' keyword rather than the newer type=file. Ditto + # dir and link. Also, nlinks is output, which is lame. And + # there's a bloatload of extra flags=none, which I remove too. + # + # Even worse is that all the uid / gid stuff is also tossed + # into the scrap heap. Hope they weren't important. + # + # And somewhere along the way, flags seem to have gone missing. + # + # Oh, and we have to add back in ./ to keep makefs happy. + # + # And then we have to sort the damn hing so directories come + # before subdirectories + # + # Note: For reasons unknown, all the directories are changing + # from 755 to 775, so that's why we ignore the second line. + # We also get repeats for all the files whose size changed. + # Perhaps we should filter those going into the pre/post files + # and not here. + mtree -f ${NANO_OBJ}/_.mtree.pre -f ${NANO_OBJ}/_.mtree.post | \ + awk ' + function frob_bogus_mtree_line(old) { + line = "./" old " gid=0 uid=0" + # XXX make this a damn function + sub(/^\.\/\./, ".", line); + sub(/ file /, " type=file ", line); + sub(/ dir /, " type=dir ", line); + sub(/ link /, " type=link ", line); + sub(/ size=[0-9][0-9]*/, "", line); + sub(/ nlinks=[0-9][0-9]*/, "", line); + sub(/ flags=none*/, "", line); + return line; + } + BEGIN { + x = 0; + FS="\t"; + print "#mtree 2.0"; + } + $1 != "" {} + $2 != "" { + print frob_bogus_mtree_line($2); + } + $3 != "" { + if (x == 0) { + print frob_bogus_mtree_line($3); + x = 1; + } else { + x = 0; + } + } + ' | sort > ${NANO_OBJ}/_.metalog + fi +} +late_customize_cmd product_custom Added: head/tools/tools/nanobsd/embedded/qemu-amd64.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/embedded/qemu-amd64.cfg Sat Dec 5 04:43:56 2015 (r291842) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +#- +# Copyright (c) 2015 Warner Losh. All Rights Reserved. +# Copyright (c) 2010-2011 iXsystems, Inc., 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 iXsystems, Inc. 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. +# +# This file is heavily derived from both Sam Leffler's Avilia config, +# as well as the BSDRP project's config file. Neither of these have +# an explicit copyright/license statement, but are implicitly BSDL. This +# example has been taken from the FreeNAS project and simplified to meet +# the needs of the example. +# + +NANO_ARCH=amd64 +NANO_KERNEL=GENERIC +NANO_DRIVE=ada0 +NANO_NAME=qemu-amd64 + +export EMBED_OMIT_FAT=t + +. common # Pull in common definitions, keep last Added: head/tools/tools/nanobsd/embedded/qemu-i386.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/embedded/qemu-i386.cfg Sat Dec 5 04:43:56 2015 (r291842) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +#- +# Copyright (c) 2015 Warner Losh. All Rights Reserved. +# Copyright (c) 2010-2011 iXsystems, Inc., 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 iXsystems, Inc. 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. +# +# This file is heavily derived from both Sam Leffler's Avilia config, +# as well as the BSDRP project's config file. Neither of these have +# an explicit copyright/license statement, but are implicitly BSDL. This +# example has been taken from the FreeNAS project and simplified to meet +# the needs of the example. +# + +NANO_ARCH=i386 +NANO_KERNEL=GENERIC +NANO_DRIVE=ada0 +NANO_NAME=qemu-i386 + +export EMBED_OMIT_FAT=t + +. common # Pull in common definitions, keep last Added: head/tools/tools/nanobsd/embedded/qemu-mips.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/embedded/qemu-mips.cfg Sat Dec 5 04:43:56 2015 (r291842) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +#- +# Copyright (c) 2015 Warner Losh. All Rights Reserved. +# Copyright (c) 2010-2011 iXsystems, Inc., 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 iXsystems, Inc. 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. +# +# This file is heavily derived from both Sam Leffler's Avilia config, +# as well as the BSDRP project's config file. Neither of these have +# an explicit copyright/license statement, but are implicitly BSDL. This +# example has been taken from the FreeNAS project and simplified to meet +# the needs of the example. +# + +NANO_ARCH=mips +NANO_KERNEL=MALTA +NANO_DRIVE=ada0 +NANO_NAME=qemu-mips + +export EMBED_OMIT_FAT=t + +. common # Pull in common definitions, keep last Added: head/tools/tools/nanobsd/embedded/qemu-mips64.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/embedded/qemu-mips64.cfg Sat Dec 5 04:43:56 2015 (r291842) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +#- +# Copyright (c) 2015 Warner Losh. All Rights Reserved. +# Copyright (c) 2010-2011 iXsystems, Inc., 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 iXsystems, Inc. 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. +# +# This file is heavily derived from both Sam Leffler's Avilia config, +# as well as the BSDRP project's config file. Neither of these have +# an explicit copyright/license statement, but are implicitly BSDL. This +# example has been taken from the FreeNAS project and simplified to meet +# the needs of the example. +# + +NANO_ARCH=mips +NANO_KERNEL=MALTA64 +NANO_DRIVE=ada0 +NANO_NAME=qemu-mips64 + +export EMBED_OMIT_FAT=t + +. common # Pull in common definitions, keep last Added: head/tools/tools/nanobsd/embedded/qemu-powerpc.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/embedded/qemu-powerpc.cfg Sat Dec 5 04:43:56 2015 (r291842) @@ -0,0 +1,43 @@ +# $FreeBSD$ + +#- +# Copyright (c) 2015 Warner Losh. All Rights Reserved. +# Copyright (c) 2010-2011 iXsystems, Inc., 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 iXsystems, Inc. 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. +# +# This file is heavily derived from both Sam Leffler's Avilia config, +# as well as the BSDRP project's config file. Neither of these have +# an explicit copyright/license statement, but are implicitly BSDL. This +# example has been taken from the FreeNAS project and simplified to meet +# the needs of the example. +# + +# Open question: do we have one for MAC G4 and one for Book-E? +NANO_ARCH=powerpc +NANO_KERNEL=GENERIC +NANO_DRIVE=ada0 +NANO_NAME=qemu-powerpc + +export EMBED_OMIT_FAT=t + +. common # Pull in common definitions, keep last Added: head/tools/tools/nanobsd/embedded/qemu-powerpc64.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/embedded/qemu-powerpc64.cfg Sat Dec 5 04:43:56 2015 (r291842) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +#- +# Copyright (c) 2015 Warner Losh. All Rights Reserved. +# Copyright (c) 2010-2011 iXsystems, Inc., 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 iXsystems, Inc. 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. +# +# This file is heavily derived from both Sam Leffler's Avilia config, +# as well as the BSDRP project's config file. Neither of these have +# an explicit copyright/license statement, but are implicitly BSDL. This +# example has been taken from the FreeNAS project and simplified to meet +# the needs of the example. +# + +NANO_ARCH=powerpc64 +NANO_KERNEL=GENERIC64 +NANO_DRIVE=ada0 +NANO_NAME=qemu-powerpc64 + +export EMBED_OMIT_FAT=t + +. common # Pull in common definitions, keep last Added: head/tools/tools/nanobsd/embedded/qemu-sparc64.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/embedded/qemu-sparc64.cfg Sat Dec 5 04:43:56 2015 (r291842) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +#- +# Copyright (c) 2015 Warner Losh. All Rights Reserved. +# Copyright (c) 2010-2011 iXsystems, Inc., 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 iXsystems, Inc. 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. +# +# This file is heavily derived from both Sam Leffler's Avilia config, +# as well as the BSDRP project's config file. Neither of these have +# an explicit copyright/license statement, but are implicitly BSDL. This +# example has been taken from the FreeNAS project and simplified to meet +# the needs of the example. +# + +NANO_ARCH=sparc64 +NANO_KERNEL=GENERIC +NANO_DRIVE=ada0 +NANO_NAME=qemu-sparc64 + +export EMBED_OMIT_FAT=t + +. common # Pull in common definitions, keep last Added: head/tools/tools/nanobsd/embedded/rpi.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/embedded/rpi.cfg Sat Dec 5 04:43:56 2015 (r291842) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +#- +# Copyright (c) 2015 Warner Losh. All Rights Reserved. +# Copyright (c) 2010-2011 iXsystems, Inc., 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 iXsystems, Inc. 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. +# +# This file is heavily derived from both Sam Leffler's Avilia config, +# as well as the BSDRP project's config file. Neither of these have +# an explicit copyright/license statement, but are implicitly BSDL. This +# example has been taken from the FreeNAS project and simplified to meet +# the needs of the example. +# + +NANO_ARCH=armv6 +NANO_KERNEL=RPI-B +NANO_DRIVE=mmcsd0 +NANO_NAME=rpi-b +NANO_BOOT_PKG=u-boot-rpi +NANO_CPUTYPE=arm1176jzf-s + +. common # Pull in common definitions, keep last Added: head/tools/tools/nanobsd/embedded/rpi2.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/embedded/rpi2.cfg Sat Dec 5 04:43:56 2015 (r291842) @@ -0,0 +1,42 @@ +# $FreeBSD$ + +#- +# Copyright (c) 2015 Warner Losh. All Rights Reserved. +# Copyright (c) 2010-2011 iXsystems, Inc., All rights reserved. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Dec 5 05:20:09 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 526BBA4117B for ; Sat, 5 Dec 2015 05:20:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qg0-x229.google.com (mail-qg0-x229.google.com [IPv6:2607:f8b0:400d:c04::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 149021D97 for ; Sat, 5 Dec 2015 05:20:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qgec40 with SMTP id c40so106547380qge.2 for ; Fri, 04 Dec 2015 21:20:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=bV6YlqEQ+aRAfX93iyt2o2Ep/uxbuiFJVDPY/ZolT2w=; b=g5/U0fi6zR2ATC4Y4SFT0Tx9RpMQdgWX3QrTQnefoh06S/cpBnLCaZ3IcPp59YLO9h FQ7teBcE1Ge1N3B9O/yhyNsC34pHVMUo1vziMoMMUFMDRC86JEQoTKNs/v/zBUyT7sRd iOhEEpWLktM/WJr33rzII4AI1NxX385M4fsPyaFdfJF+qwQ5knCSAzTD3xflEWjzK2j9 r6RBzaKhXST3LZw381N9yPhAFe3xXdWeB2AMrto+I+FziBZvV2hCWNHxgNnNoIU0S88U UbMCeycCkIz6uK94rrdu+nak7igB9DqgtLbvAqOoo3X7Jm7GqcWg4979ty9FSNOSdyQe 5l+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=bV6YlqEQ+aRAfX93iyt2o2Ep/uxbuiFJVDPY/ZolT2w=; b=JppMfiEmpx9yFQtXEQE9UwPw/MOhV4B32/RMoM0gausf7fSEDFC4DOJ0qSU8Lz0jDa TJDPLw+CQvaxG4AzMYptWfDfbPJ2nL2Kvugp2naef9XAgiEnF9gqmnQMxsb1QQULxKVM YOnK31P/u/EnTZE+vsArv0oh66wAPwHCEHOYa5MCMLttNkS89Uz7EXEJdhBp2QrMHPFV NuLXxM4PFg5iMmhsxfYZWeFKRT6XAP5AV/VYdW6P60WGNoBI2u1GVahkKAp9njqUlepr Vl9LapiDVK8xYr/8d06nD/l3Rd8iqvPpv41bFtZjNFaORC42mwKecONC4RGHhQH0W5Pb Qz0A== X-Gm-Message-State: ALoCoQk5TrWbrXCHUsV3mdFCM92GLwXxZ1N39s+FN5gcnLYiIDAsFzx6Poo7D6/lLlHuO55xaXP1 MIME-Version: 1.0 X-Received: by 10.140.250.70 with SMTP id v67mr25577952qhc.43.1449292807968; Fri, 04 Dec 2015 21:20:07 -0800 (PST) Sender: wlosh@bsdimp.com Received: by 10.140.27.181 with HTTP; Fri, 4 Dec 2015 21:20:07 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: <4E9A0C74-DC06-41E3-A27D-46FF06A98C95@gmail.com> References: <201511091040.tA9AeG0B038056@repo.freebsd.org> <20151109223117.Y2340@besplex.bde.org> <4E9A0C74-DC06-41E3-A27D-46FF06A98C95@gmail.com> Date: Fri, 4 Dec 2015 22:20:07 -0700 X-Google-Sender-Auth: Wqk8KzhOL9uNm9ZkGt760fCsYiY Message-ID: Subject: Re: svn commit: r290605 - in head/lib/msun: . man From: Warner Losh To: NGie Cooper Cc: Bruce Evans , Garrett Cooper , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 05:20:09 -0000 On Fri, Dec 4, 2015 at 7:34 PM, NGie Cooper wrote: > Hi Bruce! > > > On Nov 9, 2015, at 04:03, Bruce Evans wrote: > > > > On Mon, 9 Nov 2015, Garrett Cooper wrote: > > > >> Log: > >> Document powl(3) > > > > powl was garbage that was intentionally undocumented. At least, I > > intentionally ignored its non-documentation together with it. > > POSIX documents it and I noticed it was missing when porting the msun > testcases from NetBSD. That=E2=80=99s the reason why I filed the bug. > > > powl doesn't compute the value of .Ar x to the exponent .Ar y. It > computes > > the value of (double)(.Ar x) to the exponent (double)(.Ar y), converted > to > > double. > > Hmmm? The types look ok per the function signatures in lib/msun: > > lib/msun/src/imprecise.c:imprecise_powl(long double x, long double y) > lib/msun/src/math.h:long double powl(long double, long double); > The prototype is right. The code is poo. It does as Bruce says. That's why it wasn't documented. People might think it was safe to use. > > These are bugs that need to be fixed then in the longterm, but in the > short term should be documented under CAVEATS. > It is so aweful, it should have remained undocumented until a suitable implementation showed up. > > I doubt that the rest of this section (about exception handling) is > > correct for powl(). > > > > The section on errors wasn't changed since it uses generic pow(). It > > claims that the error is generally less than 1 ulp. But for powl(), > > the error is generally more that 4096 ulps. Much more when the > > error exponentiates. powf() and pow() do well to avoid exponentiation > > of roundoff errors. > > I think the comment above applies here too about adding some notes to > CAVEATS. > This is what makes it poo. 4096 ulps is really horrific. Warner From owner-svn-src-all@freebsd.org Sat Dec 5 07:04:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45A0CA414AC; Sat, 5 Dec 2015 07:04:13 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 214D61108; Sat, 5 Dec 2015 07:04:13 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB574CWU059145; Sat, 5 Dec 2015 07:04:12 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB574BL8059141; Sat, 5 Dec 2015 07:04:11 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512050704.tB574BL8059141@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 5 Dec 2015 07:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291843 - in head: share/man/man4 sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 07:04:13 -0000 Author: arybchik Date: Sat Dec 5 07:04:11 2015 New Revision: 291843 URL: https://svnweb.freebsd.org/changeset/base/291843 Log: sfxge: support for MCDI logging implemented Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4355 Modified: head/share/man/man4/sfxge.4 head/sys/dev/sfxge/sfxge.c head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_mcdi.c Modified: head/share/man/man4/sfxge.4 ============================================================================== --- head/share/man/man4/sfxge.4 Sat Dec 5 04:43:56 2015 (r291842) +++ head/share/man/man4/sfxge.4 Sat Dec 5 07:04:11 2015 (r291843) @@ -148,6 +148,14 @@ Number of packets with payload that must before a connection is eligible for LRO. The idea is we should avoid coalescing segments when the sender is recovering from loss, because reducing the ACK rate can damage performance. +.It Va hw.sfxge.mcdi_logging +Enable logging of MCDI protocol messages (only available if enabled at compile-time). +.It Va hw.sfxge.N.mcdi_logging +Enable or disable logging of MCDI protocol messages on a per-port basis. The default for each +port will be the value of +.Va hw.sfxge.mcdi_logging. +The logging may also be enabled or disabled after the driver is loaded using the sysctl +.Va dev.sfxge.%d.mcdi_logging. .El .Sh SUPPORT For general information and support, Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Sat Dec 5 04:43:56 2015 (r291842) +++ head/sys/dev/sfxge/sfxge.c Sat Dec 5 07:04:11 2015 (r291843) @@ -95,6 +95,12 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_ring, &sfxge_tx_ring_entries, 0, "Maximum number of descriptors in a transmit ring"); +#if EFSYS_OPT_MCDI_LOGGING +#define SFXGE_PARAM_MCDI_LOGGING SFXGE_PARAM(mcdi_logging) +static int sfxge_mcdi_logging = 0; +TUNABLE_INT(SFXGE_PARAM_MCDI_LOGGING, &sfxge_mcdi_logging); +#endif + static void sfxge_reset(void *arg, int npending); @@ -620,6 +626,9 @@ sfxge_create(struct sfxge_softc *sc) efx_nic_t *enp; int error; char rss_param_name[sizeof(SFXGE_PARAM(%d.max_rss_channels))]; +#if EFSYS_OPT_MCDI_LOGGING + char mcdi_log_param_name[sizeof(SFXGE_PARAM(%d.mcdi_logging))]; +#endif dev = sc->dev; @@ -630,6 +639,13 @@ sfxge_create(struct sfxge_softc *sc) SFXGE_PARAM(%d.max_rss_channels), (int)device_get_unit(dev)); TUNABLE_INT_FETCH(rss_param_name, &sc->max_rss_channels); +#if EFSYS_OPT_MCDI_LOGGING + sc->mcdi_logging = sfxge_mcdi_logging; + snprintf(mcdi_log_param_name, sizeof(mcdi_log_param_name), + SFXGE_PARAM(%d.mcdi_logging), + (int)device_get_unit(dev)); + TUNABLE_INT_FETCH(mcdi_log_param_name, &sc->mcdi_logging); +#endif sc->stats_node = SYSCTL_ADD_NODE( device_get_sysctl_ctx(dev), Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Sat Dec 5 04:43:56 2015 (r291842) +++ head/sys/dev/sfxge/sfxge.h Sat Dec 5 07:04:11 2015 (r291843) @@ -281,6 +281,9 @@ struct sfxge_softc { unsigned int txq_count; int tso_fw_assisted; +#if EFSYS_OPT_MCDI_LOGGING + int mcdi_logging; +#endif }; #define SFXGE_LINK_UP(sc) ((sc)->port.link_mode != EFX_LINK_DOWN) Modified: head/sys/dev/sfxge/sfxge_mcdi.c ============================================================================== --- head/sys/dev/sfxge/sfxge_mcdi.c Sat Dec 5 04:43:56 2015 (r291842) +++ head/sys/dev/sfxge/sfxge_mcdi.c Sat Dec 5 07:04:11 2015 (r291843) @@ -49,6 +49,10 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" +#if EFSYS_OPT_MCDI_LOGGING +#include +#endif + #define SFXGE_MCDI_POLL_INTERVAL_MIN 10 /* 10us in 1us units */ #define SFXGE_MCDI_POLL_INTERVAL_MAX 100000 /* 100ms in 1us units */ #define SFXGE_MCDI_WATCHDOG_INTERVAL 10000000 /* 10s in 1us units */ @@ -163,6 +167,64 @@ sfxge_mcdi_exception(void *arg, efx_mcdi sfxge_schedule_reset(sc); } +#if EFSYS_OPT_MCDI_LOGGING + +#define SFXGE_MCDI_LOG_BUF_SIZE 128 + +static size_t +sfxge_mcdi_do_log(char *buffer, void *data, size_t data_size, + size_t pfxsize, size_t position) +{ + uint32_t *words = data; + size_t i; + + for (i = 0; i < data_size; i += sizeof(*words)) { + if (position + 2 * sizeof(*words) + 1 >= SFXGE_MCDI_LOG_BUF_SIZE) { + buffer[position] = '\0'; + printf("%s \\\n", buffer); + position = pfxsize; + } + snprintf(buffer + position, SFXGE_MCDI_LOG_BUF_SIZE - position, + " %08x", *words); + words++; + position += 2 * sizeof(uint32_t) + 1; + } + return (position); +} + +static void +sfxge_mcdi_logger(void *arg, efx_log_msg_t type, + void *header, size_t header_size, + void *data, size_t data_size) +{ + struct sfxge_softc *sc = (struct sfxge_softc *)arg; + char buffer[SFXGE_MCDI_LOG_BUF_SIZE]; + size_t pfxsize; + size_t start; + + if (!sc->mcdi_logging) + return; + + pfxsize = snprintf(buffer, sizeof(buffer), + "sfc %04x:%02x:%02x.%02x %s MCDI RPC %s:", + pci_get_domain(sc->dev), + pci_get_bus(sc->dev), + pci_get_slot(sc->dev), + pci_get_function(sc->dev), + device_get_nameunit(sc->dev), + type == EFX_LOG_MCDI_REQUEST ? "REQ" : + type == EFX_LOG_MCDI_RESPONSE ? "RESP" : "???"); + start = sfxge_mcdi_do_log(buffer, header, header_size, + pfxsize, pfxsize); + start = sfxge_mcdi_do_log(buffer, data, data_size, pfxsize, start); + if (start != pfxsize) { + buffer[start] = '\0'; + printf("%s\n", buffer); + } +} + +#endif + int sfxge_mcdi_ioctl(struct sfxge_softc *sc, sfxge_ioc_t *ip) { @@ -269,6 +331,14 @@ sfxge_mcdi_init(struct sfxge_softc *sc) emtp->emt_execute = sfxge_mcdi_execute; emtp->emt_ev_cpl = sfxge_mcdi_ev_cpl; emtp->emt_exception = sfxge_mcdi_exception; +#if EFSYS_OPT_MCDI_LOGGING + emtp->emt_logger = sfxge_mcdi_logger; + SYSCTL_ADD_INT(device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), + OID_AUTO, "mcdi_logging", CTLFLAG_RW, + &sc->mcdi_logging, 0, + "MCDI logging"); +#endif if ((rc = efx_mcdi_init(enp, emtp)) != 0) goto fail; From owner-svn-src-all@freebsd.org Sat Dec 5 07:46:40 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE185A41AD6; Sat, 5 Dec 2015 07:46:39 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C48B1F26; Sat, 5 Dec 2015 07:46:39 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB57kcVL071536; Sat, 5 Dec 2015 07:46:38 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB57kbpA071522; Sat, 5 Dec 2015 07:46:37 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201512050746.tB57kbpA071522@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sat, 5 Dec 2015 07:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291844 - in stable/10: share/man/man4 sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 07:46:40 -0000 Author: kevlo Date: Sat Dec 5 07:46:37 2015 New Revision: 291844 URL: https://svnweb.freebsd.org/changeset/base/291844 Log: MFC r291238: Add dependency to uether. Reviewed by: hselasky Modified: stable/10/share/man/man4/aue.4 stable/10/share/man/man4/axe.4 stable/10/share/man/man4/axge.4 stable/10/share/man/man4/cdce.4 stable/10/share/man/man4/cue.4 stable/10/share/man/man4/ipheth.4 stable/10/share/man/man4/kue.4 stable/10/share/man/man4/mos.4 stable/10/share/man/man4/rue.4 stable/10/share/man/man4/smsc.4 stable/10/share/man/man4/udav.4 stable/10/share/man/man4/urndis.4 stable/10/sys/conf/NOTES stable/10/sys/conf/files Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/aue.4 ============================================================================== --- stable/10/share/man/man4/aue.4 Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/share/man/man4/aue.4 Sat Dec 5 07:46:37 2015 (r291844) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 7, 2006 +.Dd November 24, 2015 .Dt AUE 4 .Os .Sh NAME @@ -45,6 +45,7 @@ kernel configuration file: .Cd "device ohci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device aue" .Ed .Pp Modified: stable/10/share/man/man4/axe.4 ============================================================================== --- stable/10/share/man/man4/axe.4 Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/share/man/man4/axe.4 Sat Dec 5 07:46:37 2015 (r291844) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 25, 2013 +.Dd November 24, 2015 .Dt AXE 4 .Os .Sh NAME @@ -46,6 +46,7 @@ kernel configuration file: .Cd "device ohci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device axe" .Ed .Pp Modified: stable/10/share/man/man4/axge.4 ============================================================================== --- stable/10/share/man/man4/axge.4 Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/share/man/man4/axge.4 Sat Dec 5 07:46:37 2015 (r291844) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2013 +.Dd November 24, 2015 .Dt AXGE 4 .Os .Sh NAME @@ -47,6 +47,7 @@ kernel configuration file: .Cd "device ohci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device axge" .Ed .Pp Modified: stable/10/share/man/man4/cdce.4 ============================================================================== --- stable/10/share/man/man4/cdce.4 Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/share/man/man4/cdce.4 Sat Dec 5 07:46:37 2015 (r291844) @@ -28,7 +28,7 @@ .\" $NetBSD: cdce.4,v 1.4 2004/12/08 18:35:56 peter Exp $ .\" $FreeBSD$ .\" -.Dd September 25, 2014 +.Dd November 24, 2015 .Dt CDCE 4 .Os .Sh NAME @@ -42,6 +42,8 @@ kernel configuration file: .Cd "device uhci" .Cd "device ohci" .Cd "device usb" +.Cd "device miibus" +.Cd "device uether" .Cd "device cdce" .Ed .Pp Modified: stable/10/share/man/man4/cue.4 ============================================================================== --- stable/10/share/man/man4/cue.4 Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/share/man/man4/cue.4 Sat Dec 5 07:46:37 2015 (r291844) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd November 24, 2015 .Dt CUE 4 .Os .Sh NAME @@ -44,6 +44,8 @@ kernel configuration file: .Cd "device uhci" .Cd "device ohci" .Cd "device usb" +.Cd "device miibus" +.Cd "device uether" .Cd "device cue" .Ed .Pp Modified: stable/10/share/man/man4/ipheth.4 ============================================================================== --- stable/10/share/man/man4/ipheth.4 Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/share/man/man4/ipheth.4 Sat Dec 5 07:46:37 2015 (r291844) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 30, 2014 +.Dd November 24, 2015 .Dt IPHETH 4 .Os .Sh NAME @@ -47,6 +47,8 @@ following lines in your kernel configura .Cd "device uhci" .Cd "device ohci" .Cd "device usb" +.Cd "device miibus" +.Cd "device uether" .Cd "device ipheth" .Ed .Sh DESCRIPTION Modified: stable/10/share/man/man4/kue.4 ============================================================================== --- stable/10/share/man/man4/kue.4 Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/share/man/man4/kue.4 Sat Dec 5 07:46:37 2015 (r291844) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 7, 2006 +.Dd November 24, 2015 .Dt KUE 4 .Os .Sh NAME @@ -44,6 +44,8 @@ kernel configuration file: .Cd "device uhci" .Cd "device ohci" .Cd "device usb" +.Cd "device miibus" +.Cd "device uether" .Cd "device kue" .Ed .Pp Modified: stable/10/share/man/man4/mos.4 ============================================================================== --- stable/10/share/man/man4/mos.4 Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/share/man/man4/mos.4 Sat Dec 5 07:46:37 2015 (r291844) @@ -15,7 +15,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 14, 2011 +.Dd November 24, 2015 .Dt MOS 4 .Os .Sh NAME @@ -31,6 +31,7 @@ kernel configuration file: .Cd "device ehci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device mos" .Ed .Pp Modified: stable/10/share/man/man4/rue.4 ============================================================================== --- stable/10/share/man/man4/rue.4 Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/share/man/man4/rue.4 Sat Dec 5 07:46:37 2015 (r291844) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 2011 +.Dd November 24, 2015 .Dt RUE 4 .Os .Sh NAME @@ -40,6 +40,7 @@ kernel configuration file: .Cd "device ohci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device rue" .Ed .Pp Modified: stable/10/share/man/man4/smsc.4 ============================================================================== --- stable/10/share/man/man4/smsc.4 Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/share/man/man4/smsc.4 Sat Dec 5 07:46:37 2015 (r291844) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 26, 2014 +.Dd November 24, 2015 .Dt SMSC 4 .Os .Sh NAME @@ -48,6 +48,7 @@ following lines in your kernel configura .Cd "device ohci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device smsc" .Ed .Sh DESCRIPTION Modified: stable/10/share/man/man4/udav.4 ============================================================================== --- stable/10/share/man/man4/udav.4 Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/share/man/man4/udav.4 Sat Dec 5 07:46:37 2015 (r291844) @@ -32,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd November 24, 2015 .Dt UDAV 4 .Os .Sh NAME @@ -48,6 +48,7 @@ kernel configuration file: .Cd "device ohci" .Cd "device usb" .Cd "device miibus" +.Cd "device uether" .Cd "device udav" .Ed .Pp Modified: stable/10/share/man/man4/urndis.4 ============================================================================== --- stable/10/share/man/man4/urndis.4 Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/share/man/man4/urndis.4 Sat Dec 5 07:46:37 2015 (r291844) @@ -45,6 +45,8 @@ kernel configuration file: .Cd "device ohci" .Cd "device xhci" .Cd "device usb" +.Cd "device miibus" +.Cd "device uether" .Cd "device urndis" .Ed .Pp Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/sys/conf/NOTES Sat Dec 5 07:46:37 2015 (r291844) @@ -2705,6 +2705,8 @@ device uvisor # USB serial support for DDI pocket's PHS device uvscom # +# USB ethernet support +device uether # ADMtek USB ethernet. Supports the LinkSys USB100TX, # the Billionton USB100, the Melco LU-ATX, the D-Link DSB-650TX # and the SMC 2202USB. Also works with the ADMtek AN986 Pegasus Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sat Dec 5 07:04:11 2015 (r291843) +++ stable/10/sys/conf/files Sat Dec 5 07:46:37 2015 (r291844) @@ -2482,9 +2482,9 @@ dev/usb/net/if_udav.c optional udav dev/usb/net/if_usie.c optional usie dev/usb/net/if_urndis.c optional urndis dev/usb/net/ruephy.c optional rue -dev/usb/net/usb_ethernet.c optional aue | axe | axge | cdce | cue | kue | \ - mos | rue | smsc | udav | ipheth | \ - urndis +dev/usb/net/usb_ethernet.c optional uether | aue | axe | axge | cdce | \ + cue | ipheth | kue | mos | rue | \ + smsc | udav | urndis dev/usb/net/uhso.c optional uhso # # USB WLAN drivers From owner-svn-src-all@freebsd.org Sat Dec 5 08:10:33 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFC1EA410A9; Sat, 5 Dec 2015 08:10:33 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F5DF1810; Sat, 5 Dec 2015 08:10:33 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB58AWoT077446; Sat, 5 Dec 2015 08:10:32 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB58AW8a077444; Sat, 5 Dec 2015 08:10:32 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512050810.tB58AW8a077444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 5 Dec 2015 08:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291845 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 08:10:33 -0000 Author: arybchik Date: Sat Dec 5 08:10:32 2015 New Revision: 291845 URL: https://svnweb.freebsd.org/changeset/base/291845 Log: sfxge: cleanup: remove SFL9122 "Huntington" PCI IDs The SFL9122 "Huntington" controller was never built. Submitted by: Mark Spender Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/efx.h head/sys/dev/sfxge/common/efx_nic.c Modified: head/sys/dev/sfxge/common/efx.h ============================================================================== --- head/sys/dev/sfxge/common/efx.h Sat Dec 5 07:46:37 2015 (r291844) +++ head/sys/dev/sfxge/common/efx.h Sat Dec 5 08:10:32 2015 (r291845) @@ -85,11 +85,9 @@ efx_infer_family( #define EFX_PCI_DEVID_HUNTINGTON_PF_UNINIT 0x0901 #define EFX_PCI_DEVID_FARMINGDALE 0x0903 /* SFC9120 PF */ -#define EFX_PCI_DEVID_HUNTINGTON 0x0913 /* SFL9122 PF */ #define EFX_PCI_DEVID_GREENPORT 0x0923 /* SFC9140 PF */ #define EFX_PCI_DEVID_FARMINGDALE_VF 0x1903 /* SFC9120 VF */ -#define EFX_PCI_DEVID_HUNTINGTON_VF 0x1913 /* SFL9122 VF */ #define EFX_PCI_DEVID_GREENPORT_VF 0x1923 /* SFC9140 VF */ Modified: head/sys/dev/sfxge/common/efx_nic.c ============================================================================== --- head/sys/dev/sfxge/common/efx_nic.c Sat Dec 5 07:46:37 2015 (r291844) +++ head/sys/dev/sfxge/common/efx_nic.c Sat Dec 5 08:10:32 2015 (r291845) @@ -76,13 +76,11 @@ efx_family( case EFX_PCI_DEVID_FARMINGDALE: case EFX_PCI_DEVID_GREENPORT: - case EFX_PCI_DEVID_HUNTINGTON: *efp = EFX_FAMILY_HUNTINGTON; return (0); case EFX_PCI_DEVID_FARMINGDALE_VF: case EFX_PCI_DEVID_GREENPORT_VF: - case EFX_PCI_DEVID_HUNTINGTON_VF: *efp = EFX_FAMILY_HUNTINGTON; return (0); #endif From owner-svn-src-all@freebsd.org Sat Dec 5 08:21:46 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7172DA41318; Sat, 5 Dec 2015 08:21:46 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B3C41DDF; Sat, 5 Dec 2015 08:21:46 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB58Ljr1082836; Sat, 5 Dec 2015 08:21:45 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB58LjBi082835; Sat, 5 Dec 2015 08:21:45 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512050821.tB58LjBi082835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 5 Dec 2015 08:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291846 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 08:21:46 -0000 Author: arybchik Date: Sat Dec 5 08:21:45 2015 New Revision: 291846 URL: https://svnweb.freebsd.org/changeset/base/291846 Log: sfxge: cleanup: remove set but not used saved_spec variable Required to build with -Werror=unused-but-set-variable. Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/efx_filter.c Modified: head/sys/dev/sfxge/common/efx_filter.c ============================================================================== --- head/sys/dev/sfxge/common/efx_filter.c Sat Dec 5 08:10:32 2015 (r291845) +++ head/sys/dev/sfxge/common/efx_filter.c Sat Dec 5 08:21:45 2015 (r291846) @@ -1345,7 +1345,6 @@ falconsiena_filter_delete( falconsiena_filter_t *fsfp = enp->en_filter.ef_falconsiena_filter; falconsiena_filter_tbl_id_t tbl_id; falconsiena_filter_tbl_t *fsftp; - falconsiena_filter_spec_t *saved_spec; efx_oword_t filter; int filter_idx; unsigned int depth; @@ -1369,8 +1368,6 @@ falconsiena_filter_delete( if (rc != 0) goto fail2; - saved_spec = &fsftp->fsft_spec[filter_idx]; - falconsiena_filter_clear_entry(enp, fsftp, filter_idx); if (fsftp->fsft_used == 0) falconsiena_filter_reset_search_depth(fsfp, tbl_id); From owner-svn-src-all@freebsd.org Sat Dec 5 08:24:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 834EDA41383; Sat, 5 Dec 2015 08:24:55 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44B641FCE; Sat, 5 Dec 2015 08:24:55 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB58OsMb082985; Sat, 5 Dec 2015 08:24:54 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB58Osus082984; Sat, 5 Dec 2015 08:24:54 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512050824.tB58Osus082984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 5 Dec 2015 08:24:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291847 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 08:24:55 -0000 Author: arybchik Date: Sat Dec 5 08:24:54 2015 New Revision: 291847 URL: https://svnweb.freebsd.org/changeset/base/291847 Log: sfxge: cleanup: remove set but not used variable with parse error indication Required to build with -Werror=unused-but-set-variable. Keep it under #if 0 as a reminder for parse error processing. Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/hunt_ev.c Modified: head/sys/dev/sfxge/common/hunt_ev.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_ev.c Sat Dec 5 08:21:45 2015 (r291846) +++ head/sys/dev/sfxge/common/hunt_ev.c Sat Dec 5 08:24:54 2015 (r291847) @@ -492,7 +492,9 @@ hunt_ev_rx( { efx_nic_t *enp = eep->ee_enp; uint32_t size; +#if 0 boolean_t parse_err; +#endif uint32_t label; uint32_t mcast; uint32_t eth_base_class; @@ -539,7 +541,10 @@ hunt_ev_rx( flags |= EFX_PKT_CONT; } +#if 0 + /* TODO What to do if the packet is flagged with parsing error */ parse_err = (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_PARSE_INCOMPLETE) != 0); +#endif label = EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_QLABEL); if (EFX_QWORD_FIELD(*eqp, ESF_DZ_RX_ECRC_ERR) != 0) { @@ -623,7 +628,9 @@ hunt_ev_rx( switch (l3_class) { case ESE_DZ_L3_CLASS_RSVD7: /* Used by firmware for packet overrun */ +#if 0 parse_err = B_TRUE; +#endif flags |= EFX_DISCARD; break; From owner-svn-src-all@freebsd.org Sat Dec 5 08:26:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DC63A41409; Sat, 5 Dec 2015 08:26:18 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED6931144; Sat, 5 Dec 2015 08:26:17 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB58QHfI083077; Sat, 5 Dec 2015 08:26:17 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB58QHJ3083076; Sat, 5 Dec 2015 08:26:17 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512050826.tB58QHJ3083076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 5 Dec 2015 08:26:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291848 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 08:26:18 -0000 Author: arybchik Date: Sat Dec 5 08:26:16 2015 New Revision: 291848 URL: https://svnweb.freebsd.org/changeset/base/291848 Log: sfxge: cleanup: remove set but not used trailer variable Required to build with -Werror=unused-but-set-variable. Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Modified: head/sys/dev/sfxge/common/hunt_nvram.c Modified: head/sys/dev/sfxge/common/hunt_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_nvram.c Sat Dec 5 08:24:54 2015 (r291847) +++ head/sys/dev/sfxge/common/hunt_nvram.c Sat Dec 5 08:26:16 2015 (r291848) @@ -853,7 +853,6 @@ hunt_nvram_buf_segment_size( efx_rc_t rc; tlv_cursor_t cursor; struct tlv_partition_header *header; - struct tlv_partition_trailer *trailer; uint32_t cksum; int pos; uint32_t *end_tag_position; @@ -883,7 +882,6 @@ hunt_nvram_buf_segment_size( rc = EINVAL; goto fail4; } - trailer = (struct tlv_partition_trailer *)tlv_item(&cursor); if ((rc = tlv_advance(&cursor)) != 0) { rc = EINVAL; From owner-svn-src-all@freebsd.org Sat Dec 5 08:34:53 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBB55A415CD; Sat, 5 Dec 2015 08:34:52 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFB6215D3; Sat, 5 Dec 2015 08:34:52 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB58YpRZ085830; Sat, 5 Dec 2015 08:34:51 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB58YpLa085829; Sat, 5 Dec 2015 08:34:51 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512050834.tB58YpLa085829@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 5 Dec 2015 08:34:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291849 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 08:34:53 -0000 Author: arybchik Date: Sat Dec 5 08:34:51 2015 New Revision: 291849 URL: https://svnweb.freebsd.org/changeset/base/291849 Log: sfxge: pick up the new TLV structures The header is auto-generated from firmware sources. 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 Sat Dec 5 08:26:16 2015 (r291848) +++ head/sys/dev/sfxge/common/ef10_tlv_layout.h Sat Dec 5 08:34:51 2015 (r291849) @@ -194,7 +194,9 @@ struct tlv_port_mac { /* Static VPD. * * This is the portion of VPD which is set at manufacturing time and not - * expected to change. It is formatted as a standard PCI VPD block. + * expected to change. It is formatted as a standard PCI VPD block. There are + * global and per-pf TLVs for this, the global TLV is new for Medford and is + * used in preference to the per-pf TLV. */ #define TLV_TAG_PF_STATIC_VPD(pf) (0x00030000 + (pf)) @@ -205,11 +207,21 @@ struct tlv_pf_static_vpd { uint8_t bytes[]; }; +#define TLV_TAG_GLOBAL_STATIC_VPD (0x001f0000) + +struct tlv_global_static_vpd { + uint32_t tag; + uint32_t length; + uint8_t bytes[]; +}; + /* Dynamic VPD. * * This is the portion of VPD which may be changed (e.g. by firmware updates). - * It is formatted as a standard PCI VPD block. + * It is formatted as a standard PCI VPD block. There are global and per-pf TLVs + * for this, the global TLV is new for Medford and is used in preference to the + * per-pf TLV. */ #define TLV_TAG_PF_DYNAMIC_VPD(pf) (0x10030000 + (pf)) @@ -220,11 +232,21 @@ struct tlv_pf_dynamic_vpd { uint8_t bytes[]; }; +#define TLV_TAG_GLOBAL_DYNAMIC_VPD (0x10200000) + +struct tlv_global_dynamic_vpd { + uint32_t tag; + uint32_t length; + uint8_t bytes[]; +}; + /* "DBI" PCI config space changes. * * This is a set of edits made to the default PCI config space values before - * the device is allowed to enumerate. + * the device is allowed to enumerate. There are global and per-pf TLVs for + * this, the global TLV is new for Medford and is used in preference to the + * per-pf TLV. */ #define TLV_TAG_PF_DBI(pf) (0x00040000 + (pf)) @@ -240,6 +262,19 @@ struct tlv_pf_dbi { }; +#define TLV_TAG_GLOBAL_DBI (0x00210000) + +struct tlv_global_dbi { + uint32_t tag; + uint32_t length; + struct { + uint16_t addr; + uint16_t byte_enables; + uint32_t value; + } items[]; +}; + + /* Partition subtype codes. * * A subtype may optionally be stored for each type of partition present in @@ -289,7 +324,7 @@ struct tlv_pcie_config { int16_t max_pf_number; /**< Largest PF RID (lower PFs may be hidden) */ uint16_t pf_aper; /**< BIU aperture for PF BAR2 */ uint16_t vf_aper; /**< BIU aperture for VF BAR0 */ - uint16_t int_aper; /**< BIU aperture for PF BAR4 and VF BAR2 */ + uint16_t int_aper; /**< BIU aperture for PF BAR4 and VF BAR2 */ #define TLV_MAX_PF_DEFAULT (-1) /* Use FW default for largest PF RID */ #define TLV_APER_DEFAULT (0xFFFF) /* Use FW default for a given aperture */ }; @@ -305,13 +340,13 @@ struct tlv_per_pf_pcie_config { uint32_t tag; uint32_t length; uint8_t vfs_total; - uint8_t port_allocation; + uint8_t port_allocation; uint16_t vectors_per_pf; uint16_t vectors_per_vf; uint8_t pf_bar0_aperture; uint8_t pf_bar2_aperture; uint8_t vf_bar0_aperture; - uint8_t vf_base; + uint8_t vf_base; uint16_t supp_pagesz; uint16_t msix_vec_base; }; @@ -320,7 +355,8 @@ struct tlv_per_pf_pcie_config { /* Development ONLY. This is a single TLV tag for all the gubbins * that can be set through the MC command-line other than the PCIe * settings. This is a temporary measure. */ -#define TLV_TAG_TMP_GUBBINS (0x10090000) +#define TLV_TAG_TMP_GUBBINS (0x10090000) /* legacy symbol - do not use */ +#define TLV_TAG_TMP_GUBBINS_HUNT TLV_TAG_TMP_GUBBINS struct tlv_tmp_gubbins { uint32_t tag; @@ -393,16 +429,16 @@ struct tlv_firmware_options { }; /* Voltage settings - * + * * Intended for boards with A0 silicon where the core voltage may - * need tweaking. Most likely set once when the pass voltage is + * need tweaking. Most likely set once when the pass voltage is * determined. */ #define TLV_TAG_0V9_SETTINGS (0x000c0000) struct tlv_0v9_settings { uint32_t tag; - uint32_t length; + uint32_t length; uint16_t flags; /* Boards with high 0v9 settings may need active cooling */ #define TLV_TAG_0V9_REQUIRES_FAN (1) uint16_t target_voltage; /* In millivolts */ @@ -411,17 +447,18 @@ struct tlv_0v9_settings { uint16_t warn_low; /* In millivolts */ uint16_t warn_high; /* In millivolts */ uint16_t panic_low; /* In millivolts */ - uint16_t panic_high; /* In millivolts */ + uint16_t panic_high; /* In millivolts */ }; /* Clock configuration */ -#define TLV_TAG_CLOCK_CONFIG (0x000d0000) +#define TLV_TAG_CLOCK_CONFIG (0x000d0000) /* legacy symbol - do not use */ +#define TLV_TAG_CLOCK_CONFIG_HUNT TLV_TAG_CLOCK_CONFIG struct tlv_clock_config { uint32_t tag; - uint32_t length; + uint32_t length; uint16_t clk_sys; /* MHz */ uint16_t clk_dpcpu; /* MHz */ uint16_t clk_icore; /* MHz */ @@ -460,7 +497,8 @@ struct tlv_global_mac { uint16_t reserved2; }; -#define TLV_TAG_ATB_0V9_TARGET (0x000f0000) +#define TLV_TAG_ATB_0V9_TARGET (0x000f0000) /* legacy symbol - do not use */ +#define TLV_TAG_ATB_0V9_TARGET_HUNT TLV_TAG_ATB_0V9_TARGET /* The target value for the 0v9 power rail measured on-chip at the * analogue test bus */ @@ -485,7 +523,7 @@ struct tlv_pcie_config_r2 { uint16_t visible_pfs; /**< Bitmap of visible PFs */ uint16_t pf_aper; /**< BIU aperture for PF BAR2 */ uint16_t vf_aper; /**< BIU aperture for VF BAR0 */ - uint16_t int_aper; /**< BIU aperture for PF BAR4 and VF BAR2 */ + uint16_t int_aper; /**< BIU aperture for PF BAR4 and VF BAR2 */ }; /* Dynamic port mode. From owner-svn-src-all@freebsd.org Sat Dec 5 08:46:42 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0BDFA418C0; Sat, 5 Dec 2015 08:46:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A73E1CD0; Sat, 5 Dec 2015 08:46:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB58kfhY088811; Sat, 5 Dec 2015 08:46:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB58kfZ4088810; Sat, 5 Dec 2015 08:46:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201512050846.tB58kfZ4088810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 5 Dec 2015 08:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291850 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 08:46:42 -0000 Author: kib Date: Sat Dec 5 08:46:41 2015 New Revision: 291850 URL: https://svnweb.freebsd.org/changeset/base/291850 Log: In the pmap_set_pg() function, which enables the global bit on the ptes mapping the kernel on CPUs where global TLB entries are supported, revert to flushing only non-global entries, i.e. to the pre-r291688 state. There is no need to flush global TLB entries, since only global entries created during the previous iterations of the loop could exist at this moment. Submitted by: alc Differential revision: https://reviews.freebsd.org/D4368 Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sat Dec 5 08:34:51 2015 (r291849) +++ head/sys/i386/i386/pmap.c Sat Dec 5 08:46:41 2015 (r291850) @@ -655,7 +655,7 @@ pmap_set_pg(void) va = KERNBASE + KERNLOAD; while (va < endva) { pdir_pde(PTD, va) |= pgeflag; - invltlb_glob(); /* Play it safe, invltlb() every time */ + invltlb(); /* Flush non-PG_G entries. */ va += NBPDR; } } else { @@ -664,7 +664,7 @@ pmap_set_pg(void) pte = vtopte(va); if (*pte) *pte |= pgeflag; - invltlb_glob(); /* Play it safe, invltlb() every time */ + invltlb(); /* Flush non-PG_G entries. */ va += PAGE_SIZE; } } From owner-svn-src-all@freebsd.org Sat Dec 5 08:52:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A0CDA41B3F; Sat, 5 Dec 2015 08:52:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65244112F; Sat, 5 Dec 2015 08:52:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB58qbno091472; Sat, 5 Dec 2015 08:52:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB58qbW9091471; Sat, 5 Dec 2015 08:52:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201512050852.tB58qbW9091471@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 5 Dec 2015 08:52:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291851 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 08:52:38 -0000 Author: kib Date: Sat Dec 5 08:52:37 2015 New Revision: 291851 URL: https://svnweb.freebsd.org/changeset/base/291851 Log: It seems that at least some KVM versions advertise support for EIO suppression but the version of the IOAPIC reported is 0x11 and neither IOAPIC EOIR nor the Linux trick of temporal reprogramming of the pin to edge-trigger mode to issue EOI work. Disable eoi suppression if KVM is detected. The mode can still be forced with the tunable. Reported and tested by: Roman Mamontov Sponsored by: The FreeBSD Foundation Modified: head/sys/x86/x86/local_apic.c Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Sat Dec 5 08:46:41 2015 (r291850) +++ head/sys/x86/x86/local_apic.c Sat Dec 5 08:52:37 2015 (r291851) @@ -467,10 +467,20 @@ native_lapic_init(vm_paddr_t addr) * we by default enable suppression even when system only has * one IO-APIC, since EOI is broadcasted to all APIC agents, * including CPUs, otherwise. + * + * It seems that at least some KVM versions report + * EOI_SUPPRESSION bit, but auto-EOI does not work. */ ver = lapic_read32(LAPIC_VERSION); if ((ver & APIC_VER_EOI_SUPPRESSION) != 0) { lapic_eoi_suppression = 1; + if (vm_guest == VM_GUEST_VM && + !strcmp(hv_vendor, "KVMKVMKVM")) { + if (bootverbose) + printf( + "KVM -- disabling lapic eoi suppression\n"); + lapic_eoi_suppression = 0; + } TUNABLE_INT_FETCH("hw.lapic_eoi_suppression", &lapic_eoi_suppression); } From owner-svn-src-all@freebsd.org Sat Dec 5 09:32:38 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6562A40682; Sat, 5 Dec 2015 09:32:37 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A513D1882; Sat, 5 Dec 2015 09:32:37 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB59Wa2R003331; Sat, 5 Dec 2015 09:32:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB59Waii003325; Sat, 5 Dec 2015 09:32:36 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201512050932.tB59Waii003325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 5 Dec 2015 09:32:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291852 - in head/sys: arm/arm arm/include cddl/dev/fbt/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 09:32:38 -0000 Author: andrew Date: Sat Dec 5 09:32:36 2015 New Revision: 291852 URL: https://svnweb.freebsd.org/changeset/base/291852 Log: Move the check to see if we are tracing a function with the DTrace Function Boundary Trace to assembly to reduce the overhead of these checks. Submitted by: Howard Su Relnotes: Yes Differential Revision: https://reviews.freebsd.org/D4266 Modified: head/sys/arm/arm/exception.S head/sys/arm/arm/genassym.c head/sys/arm/arm/trap-v6.c head/sys/arm/arm/undefined.c head/sys/arm/include/trap.h head/sys/cddl/dev/fbt/arm/fbt_isa.c Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Sat Dec 5 08:52:37 2015 (r291851) +++ head/sys/arm/arm/exception.S Sat Dec 5 09:32:36 2015 (r291852) @@ -52,13 +52,15 @@ #include #include #include +#include + __FBSDID("$FreeBSD$"); #ifdef KDTRACE_HOOKS .bss .align 4 - .global _C_LABEL(dtrace_invop_calltrap_addr) -_C_LABEL(dtrace_invop_calltrap_addr): + .global _C_LABEL(dtrace_invop_jump_addr) +_C_LABEL(dtrace_invop_jump_addr): .word 0 .word 0 #endif @@ -361,9 +363,39 @@ END(data_abort_entry) */ ASENTRY_NP(undefined_entry) PUSHFRAMEINSVC /* mode stack, build trapframe there. */ + mov r4, r0 /* R0 contains SPSR */ adr lr, exception_exit /* Return from handler via standard */ - mov r0, sp /* exception exit routine. Pass the */ - b undefinedinstruction /* trapframe to the handler. */ + mov r0, sp /* exception exit routine. pass frame */ + + ldr r2, [sp, #(TF_PC)] /* load pc */ +#if __ARM_ARCH >= 7 + tst r4, #(PSR_T) /* test if PSR_T */ + subne r2, r2, #(THUMB_INSN_SIZE) + subeq r2, r2, #(INSN_SIZE) +#else + sub r2, r2, #(INSN_SIZE) /* fix pc */ +#endif + str r2, [sp, #TF_PC] /* store pc */ + +#ifdef KDTRACE_HOOKS + /* Check if dtrace is enabled */ + ldr r1, =_C_LABEL(dtrace_invop_jump_addr) + ldr r3, [r1] + cmp r3, #0 + beq undefinedinstruction + + and r4, r4, #(PSR_MODE) /* Mask out unneeded bits */ + cmp r4, #(PSR_USR32_MODE) /* Check if we came from usermode */ + beq undefinedinstruction + + ldr r4, [r2] /* load instrution */ + ldr r1, =FBT_BREAKPOINT /* load fbt inv op */ + cmp r1, r4 + bne undefinedinstruction + + bx r3 /* call invop_jump_addr */ +#endif + b undefinedinstruction /* call stadnard handler */ END(undefined_entry) /* Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Sat Dec 5 08:52:37 2015 (r291851) +++ head/sys/arm/arm/genassym.c Sat Dec 5 09:32:36 2015 (r291852) @@ -118,6 +118,7 @@ ASSYM(MD_TP, offsetof(struct mdthread, m ASSYM(MD_RAS_START, offsetof(struct mdthread, md_ras_start)); ASSYM(MD_RAS_END, offsetof(struct mdthread, md_ras_end)); +ASSYM(TF_SPSR, offsetof(struct trapframe, tf_spsr)); ASSYM(TF_R0, offsetof(struct trapframe, tf_r0)); ASSYM(TF_R1, offsetof(struct trapframe, tf_r1)); ASSYM(TF_PC, offsetof(struct trapframe, tf_pc)); Modified: head/sys/arm/arm/trap-v6.c ============================================================================== --- head/sys/arm/arm/trap-v6.c Sat Dec 5 08:52:37 2015 (r291851) +++ head/sys/arm/arm/trap-v6.c Sat Dec 5 09:32:36 2015 (r291852) @@ -66,6 +66,10 @@ __FBSDID("$FreeBSD$"); #include #endif +#ifdef KDTRACE_HOOKS +#include +#endif + extern char fusubailout[]; extern char cachebailout[]; @@ -561,6 +565,13 @@ abort_fatal(struct trapframe *tf, u_int const char *rw_mode; usermode = TRAPF_USERMODE(tf); +#ifdef KDTRACE_HOOKS + if (!usermode) { + if (dtrace_trap_func != NULL && (*dtrace_trap_func)(tf, far)) + return (0); + } +#endif + mode = usermode ? "user" : "kernel"; rw_mode = fsr & FSR_WNR ? "write" : "read"; disable_interrupts(PSR_I|PSR_F); Modified: head/sys/arm/arm/undefined.c ============================================================================== --- head/sys/arm/arm/undefined.c Sat Dec 5 08:52:37 2015 (r291851) +++ head/sys/arm/arm/undefined.c Sat Dec 5 09:32:36 2015 (r291852) @@ -99,10 +99,6 @@ __FBSDID("$FreeBSD$"); #define COPROC_VFP 10 -#ifdef KDTRACE_HOOKS -int (*dtrace_invop_jump_addr)(struct trapframe *); -#endif - static int gdb_trapper(u_int, u_int, struct trapframe *, int); LIST_HEAD(, undefined_handler) undefined_handlers[MAX_COPROCS]; @@ -206,12 +202,6 @@ undefinedinstruction(struct trapframe *f PCPU_INC(cnt.v_trap); -#if __ARM_ARCH >= 7 - if ((frame->tf_spsr & PSR_T) != 0) - frame->tf_pc -= THUMB_INSN_SIZE; - else -#endif - frame->tf_pc -= INSN_SIZE; fault_pc = frame->tf_pc; /* @@ -350,12 +340,6 @@ undefinedinstruction(struct trapframe *f #endif return; } -#ifdef KDTRACE_HOOKS - else if (dtrace_invop_jump_addr != 0) { - dtrace_invop_jump_addr(frame); - return; - } -#endif else panic("Undefined instruction in kernel.\n"); } Modified: head/sys/arm/include/trap.h ============================================================================== --- head/sys/arm/include/trap.h Sat Dec 5 08:52:37 2015 (r291851) +++ head/sys/arm/include/trap.h Sat Dec 5 09:32:36 2015 (r291852) @@ -7,4 +7,5 @@ #define GDB5_BREAKPOINT 0xe7ffdefe #define PTRACE_BREAKPOINT 0xe7fffff0 #define KERNEL_BREAKPOINT 0xe7ffffff +#define FBT_BREAKPOINT 0xe7f000f0 #endif /* _MACHINE_TRAP_H_ */ Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c ============================================================================== --- head/sys/cddl/dev/fbt/arm/fbt_isa.c Sat Dec 5 08:52:37 2015 (r291851) +++ head/sys/cddl/dev/fbt/arm/fbt_isa.c Sat Dec 5 09:32:36 2015 (r291852) @@ -35,11 +35,10 @@ #include #include +#include #include "fbt.h" -#define FBT_PATCHVAL 0xe7f000f0 /* Specified undefined instruction */ - #define FBT_PUSHM 0xe92d0000 #define FBT_POPM 0xe8bd0000 #define FBT_JUMP 0xea000000 @@ -53,15 +52,20 @@ fbt_invop(uintptr_t addr, uintptr_t *sta struct trapframe *frame = (struct trapframe *)stack; solaris_cpu_t *cpu = &solaris_cpu[curcpu]; fbt_probe_t *fbt = fbt_probetab[FBT_ADDR2NDX(addr)]; + register_t fifthparam; for (; fbt != NULL; fbt = fbt->fbtp_hashnext) { if ((uintptr_t)fbt->fbtp_patchpoint == addr) { cpu->cpu_dtrace_caller = addr; - /* TODO: Need 5th parameter from stack */ + /* Get 5th parameter from stack */ + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); + fifthparam = *(register_t *)frame->tf_usr_sp; + DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | CPU_DTRACE_BADADDR); + dtrace_probe(fbt->fbtp_id, frame->tf_r0, frame->tf_r1, frame->tf_r2, - frame->tf_r3, 0); + frame->tf_r3, fifthparam); cpu->cpu_dtrace_caller = 0; @@ -77,7 +81,7 @@ fbt_patch_tracepoint(fbt_probe_t *fbt, f { *fbt->fbtp_patchpoint = val; - cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, 4); + cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, sizeof(val)); } int @@ -104,13 +108,6 @@ fbt_provide_module_function(linker_file_ if (name[0] == '_' && name[1] == '_') return (0); - /* - * Architecture-specific exclusion list, largely to do with FBT trap - * processing, to prevent reentrance. - */ - if (strcmp(name, "undefinedinstruction") == 0) - return (0); - instr = (uint32_t *)symval->value; limit = (uint32_t *)(symval->value + symval->size); @@ -125,12 +122,12 @@ fbt_provide_module_function(linker_file_ fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO); fbt->fbtp_name = name; fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, - name, FBT_ENTRY, 3, fbt); + name, FBT_ENTRY, 2, fbt); fbt->fbtp_patchpoint = instr; fbt->fbtp_ctl = lf; fbt->fbtp_loadcnt = lf->loadcnt; fbt->fbtp_savedval = *instr; - fbt->fbtp_patchval = FBT_PATCHVAL; + fbt->fbtp_patchval = FBT_BREAKPOINT; fbt->fbtp_rval = DTRACE_INVOP_PUSHM; fbt->fbtp_symindx = symindx; @@ -157,7 +154,6 @@ again: start = (uint32_t *)symval->value; if (target >= limit || target < start) break; - instr++; /* skip delay slot */ } } @@ -171,7 +167,7 @@ again: fbt->fbtp_name = name; if (retfbt == NULL) { fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, - name, FBT_RETURN, 3, fbt); + name, FBT_RETURN, 2, fbt); } else { retfbt->fbtp_next = fbt; fbt->fbtp_id = retfbt->fbtp_id; @@ -187,7 +183,7 @@ again: else fbt->fbtp_rval = DTRACE_INVOP_POPM; fbt->fbtp_savedval = *instr; - fbt->fbtp_patchval = FBT_PATCHVAL; + fbt->fbtp_patchval = FBT_BREAKPOINT; fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; fbt_probetab[FBT_ADDR2NDX(instr)] = fbt; From owner-svn-src-all@freebsd.org Sat Dec 5 09:50:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 775B3A40EA1; Sat, 5 Dec 2015 09:50:39 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4190B1E36; Sat, 5 Dec 2015 09:50:39 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB59ocuH007905; Sat, 5 Dec 2015 09:50:38 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB59oc3N007901; Sat, 5 Dec 2015 09:50:38 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201512050950.tB59oc3N007901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Sat, 5 Dec 2015 09:50:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291853 - in head/sys: net netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 09:50:39 -0000 Author: melifaro Date: Sat Dec 5 09:50:37 2015 New Revision: 291853 URL: https://svnweb.freebsd.org/changeset/base/291853 Log: Remove LLE read lock from IPv4 fast path. LLE structure is mostly unchanged during its lifecycle. To be more specific, there are 2 things relevant for fast path lookup code: 1) link-level address change. Since r286722, these updates are performed under AFDATA WLOCK. 2) Some sort of feedback indicating that this particular entry is used so we re-send arp request to perform reachability verification instead of expiring entry. The only signal that is needed from fast path is something like binary yes/no. The latter is solved by the following changes: 1) introduce special r_skip_req field which is read lockless by fast path, but updated under (new) req_mutex mutex. If this field is non-zero, then fast path will acquire lock and set it back to 0. 2) introduce simple state machine: incomplete->reachable<->verify->deleted. Before that we implicitely had incomplete->reachable->deleted state machine, with V_arpt_keep between "reachable" and "deleted". Verification was performed in runtime 5 seconds before V_arpt_keep expire. This is changed to "change state to verify 5 seconds before V_arpt_keep, set r_skip_req to non-zero value and check it every second". If the value is zero - then send arp verification probe. These changes do not introduce any signifficant control plane overhead: typically lle callout timer would fire 1 time more each V_arpt_keep (1200s) for used lles and up to arp_maxtries (5) for dead lles. As a result, all packets towards "reachable" lle are handled by fast path without acquiring lle read lock. Additional "req_mutex" is needed because callout / arpresolve_slow() or eventhandler might keep LLE lock for signifficant amount of time, which might not be feasible for fast path locking (e.g. having rmlock as ether AFDATA or lltable own lock). Differential Revision: https://reviews.freebsd.org/D3688 Modified: head/sys/net/if_llatbl.c head/sys/net/if_llatbl.h head/sys/netinet/if_ether.c head/sys/netinet/in.c Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Sat Dec 5 09:32:36 2015 (r291852) +++ head/sys/net/if_llatbl.c Sat Dec 5 09:50:37 2015 (r291853) @@ -284,6 +284,7 @@ lltable_set_entry_addr(struct ifnet *ifp bcopy(lladdr, &lle->ll_addr, ifp->if_addrlen); lle->la_flags |= LLE_VALID; + lle->r_flags |= RLLE_VALID; } /* @@ -640,6 +641,7 @@ lla_rt_output(struct rt_msghdr *rtm, str if ((rtm->rtm_flags & RTF_ANNOUNCE)) lle->la_flags |= LLE_PUB; lle->la_flags |= LLE_VALID; + lle->r_flags |= RLLE_VALID; lle->la_expire = rtm->rtm_rmx.rmx_expire; laflags = lle->la_flags; Modified: head/sys/net/if_llatbl.h ============================================================================== --- head/sys/net/if_llatbl.h Sat Dec 5 09:32:36 2015 (r291852) +++ head/sys/net/if_llatbl.h Sat Dec 5 09:50:37 2015 (r291853) @@ -63,7 +63,8 @@ struct llentry { uint16_t mac16[3]; uint8_t mac8[20]; /* IB needs 20 bytes. */ } ll_addr; - uint32_t spare0; + uint16_t r_flags; /* LLE runtime flags */ + uint16_t r_skip_req; /* feedback from fast path */ uint64_t spare1; struct lltable *lle_tbl; @@ -83,6 +84,7 @@ struct llentry { LIST_ENTRY(llentry) lle_chain; /* chain of deleted items */ struct callout lle_timer; struct rwlock lle_lock; + struct mtx req_mtx; }; #define LLE_WLOCK(lle) rw_wlock(&(lle)->lle_lock) @@ -95,6 +97,12 @@ struct llentry { #define LLE_LOCK_DESTROY(lle) rw_destroy(&(lle)->lle_lock) #define LLE_WLOCK_ASSERT(lle) rw_assert(&(lle)->lle_lock, RA_WLOCKED) +#define LLE_REQ_INIT(lle) mtx_init(&(lle)->req_mtx, "lle req", \ + NULL, MTX_DEF) +#define LLE_REQ_DESTROY(lle) mtx_destroy(&(lle)->req_mtx) +#define LLE_REQ_LOCK(lle) mtx_lock(&(lle)->req_mtx) +#define LLE_REQ_UNLOCK(lle) mtx_unlock(&(lle)->req_mtx) + #define LLE_IS_VALID(lle) (((lle) != NULL) && ((lle) != (void *)-1)) #define LLE_ADDREF(lle) do { \ @@ -187,6 +195,11 @@ MALLOC_DECLARE(M_LLTABLE); #define LLE_LINKED 0x0040 /* linked to lookup structure */ /* LLE request flags */ #define LLE_EXCLUSIVE 0x2000 /* return lle xlocked */ +#define LLE_UNLOCKED 0x4000 /* return lle unlocked */ + +/* LLE flags used by fastpath code */ +#define RLLE_VALID 0x0001 /* entry is valid */ +#define RLLE_IFADDR LLE_IFADDR /* entry is ifaddr */ #define LLATBL_HASH(key, mask) \ (((((((key >> 8) ^ key) >> 8) ^ key) >> 8) ^ key) & mask) Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Sat Dec 5 09:32:36 2015 (r291852) +++ head/sys/netinet/if_ether.c Sat Dec 5 09:50:37 2015 (r291853) @@ -78,6 +78,14 @@ static struct timeval arp_lastlog; static int arp_curpps; static int arp_maxpps = 1; +/* Simple ARP state machine */ +enum arp_llinfo_state { + ARP_LLINFO_INCOMPLETE = 0, /* No LLE data */ + ARP_LLINFO_REACHABLE, /* LLE is valid */ + ARP_LLINFO_VERIFY, /* LLE is valid, need refresh */ + ARP_LLINFO_DELETED, /* LLE is deleted */ +}; + SYSCTL_DECL(_net_link_ether); static SYSCTL_NODE(_net_link_ether, PF_INET, inet, CTLFLAG_RW, 0, ""); static SYSCTL_NODE(_net_link_ether, PF_ARP, arp, CTLFLAG_RW, 0, ""); @@ -89,6 +97,7 @@ static VNET_DEFINE(int, arp_maxtries) = static VNET_DEFINE(int, arp_proxyall) = 0; static VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for * 20 seconds */ +static VNET_DEFINE(int, arpt_rexmit) = 1; /* retransmit arp entries, sec*/ VNET_PCPUSTAT_DEFINE(struct arpstat, arpstat); /* ARP statistics, see if_arp.h */ VNET_PCPUSTAT_SYSINIT(arpstat); @@ -100,6 +109,7 @@ static VNET_DEFINE(int, arp_maxhold) = 1 #define V_arpt_keep VNET(arpt_keep) #define V_arpt_down VNET(arpt_down) +#define V_arpt_rexmit VNET(arpt_rexmit) #define V_arp_maxtries VNET(arp_maxtries) #define V_arp_proxyall VNET(arp_proxyall) #define V_arp_maxhold VNET(arp_maxhold) @@ -161,6 +171,7 @@ arptimer(void *arg) { struct llentry *lle = (struct llentry *)arg; struct ifnet *ifp; + int r_skip_req; if (lle->la_flags & LLE_STATIC) { return; @@ -188,6 +199,55 @@ arptimer(void *arg) ifp = lle->lle_tbl->llt_ifp; CURVNET_SET(ifp->if_vnet); + switch (lle->ln_state) { + case ARP_LLINFO_REACHABLE: + + /* + * Expiration time is approaching. + * Let's try to refresh entry if it is still + * in use. + * + * Set r_skip_req to get feedback from + * fast path. Change state and re-schedule + * ourselves. + */ + LLE_REQ_LOCK(lle); + lle->r_skip_req = 1; + LLE_REQ_UNLOCK(lle); + lle->ln_state = ARP_LLINFO_VERIFY; + callout_schedule(&lle->lle_timer, hz * V_arpt_rexmit); + LLE_WUNLOCK(lle); + CURVNET_RESTORE(); + return; + case ARP_LLINFO_VERIFY: + LLE_REQ_LOCK(lle); + r_skip_req = lle->r_skip_req; + LLE_REQ_UNLOCK(lle); + + if (r_skip_req == 0 && lle->la_preempt > 0) { + /* Entry was used, issue refresh request */ + struct in_addr dst; + dst = lle->r_l3addr.addr4; + lle->la_preempt--; + callout_schedule(&lle->lle_timer, hz * V_arpt_rexmit); + LLE_WUNLOCK(lle); + arprequest(ifp, NULL, &dst, NULL); + CURVNET_RESTORE(); + return; + } + /* Nothing happened. Reschedule if not too late */ + if (lle->la_expire > time_uptime) { + callout_schedule(&lle->lle_timer, hz * V_arpt_rexmit); + LLE_WUNLOCK(lle); + CURVNET_RESTORE(); + return; + } + break; + case ARP_LLINFO_INCOMPLETE: + case ARP_LLINFO_DELETED: + break; + } + if ((lle->la_flags & LLE_DELETED) == 0) { int evt; @@ -353,26 +413,16 @@ arpresolve_full(struct ifnet *ifp, int i if ((la->la_flags & LLE_VALID) && ((la->la_flags & LLE_STATIC) || la->la_expire > time_uptime)) { bcopy(&la->ll_addr, desten, ifp->if_addrlen); - renew = 0; - /* - * If entry has an expiry time and it is approaching, - * see if we need to send an ARP request within this - * arpt_down interval. - */ - if (!(la->la_flags & LLE_STATIC) && - time_uptime + la->la_preempt > la->la_expire) { - renew = 1; - la->la_preempt--; - } + /* Check if we have feedback request from arptimer() */ + if (la->r_skip_req != 0) { + LLE_REQ_LOCK(la); + la->r_skip_req = 0; /* Notify that entry was used */ + LLE_REQ_UNLOCK(la); + } if (pflags != NULL) - *pflags = la->la_flags; - + *pflags = la->la_flags & (LLE_VALID|LLE_IFADDR); LLE_WUNLOCK(la); - - if (renew == 1) - arprequest(ifp, NULL, &SIN(dst)->sin_addr, NULL); - return (0); } @@ -440,7 +490,7 @@ arpresolve_full(struct ifnet *ifp, int i * m is the mbuf. May be NULL if we don't have a packet. * dst is the next hop, * desten is the storage to put LL address. - * flags returns lle entry flags. + * flags returns subset of lle flags: LLE_VALID | LLE_IFADDR * * On success, desten and flags are filled in and the function returns 0; * If the packet must be held pending resolution, we return EWOULDBLOCK @@ -452,7 +502,6 @@ arpresolve(struct ifnet *ifp, int is_gw, const struct sockaddr *dst, u_char *desten, uint32_t *pflags) { struct llentry *la = 0; - int renew; if (pflags != NULL) *pflags = 0; @@ -472,40 +521,24 @@ arpresolve(struct ifnet *ifp, int is_gw, } IF_AFDATA_RLOCK(ifp); - la = lla_lookup(LLTABLE(ifp), 0, dst); - IF_AFDATA_RUNLOCK(ifp); - - if (la == NULL) - return (arpresolve_full(ifp, is_gw, 1, m, dst, desten, pflags)); - - if ((la->la_flags & LLE_VALID) && - ((la->la_flags & LLE_STATIC) || la->la_expire > time_uptime)) { + la = lla_lookup(LLTABLE(ifp), LLE_UNLOCKED, dst); + if (la != NULL && (la->r_flags & RLLE_VALID) != 0) { + /* Entry found, let's copy lle info */ bcopy(&la->ll_addr, desten, ifp->if_addrlen); - renew = 0; - /* - * If entry has an expiry time and it is approaching, - * see if we need to send an ARP request within this - * arpt_down interval. - */ - if (!(la->la_flags & LLE_STATIC) && - time_uptime + la->la_preempt > la->la_expire) { - renew = 1; - la->la_preempt--; - } - if (pflags != NULL) - *pflags = la->la_flags; - - LLE_RUNLOCK(la); - - if (renew == 1) - arprequest(ifp, NULL, &SIN(dst)->sin_addr, NULL); - + *pflags = LLE_VALID | (la->r_flags & RLLE_IFADDR); + /* Check if we have feedback request from arptimer() */ + if (la->r_skip_req != 0) { + LLE_REQ_LOCK(la); + la->r_skip_req = 0; /* Notify that entry was used */ + LLE_REQ_UNLOCK(la); + } + IF_AFDATA_RUNLOCK(ifp); return (0); } - LLE_RUNLOCK(la); + IF_AFDATA_RUNLOCK(ifp); - return (arpresolve_full(ifp, is_gw, 0, m, dst, desten, pflags)); + return (arpresolve_full(ifp, is_gw, 1, m, dst, desten, pflags)); } /* @@ -1042,6 +1075,9 @@ arp_check_update_lle(struct arphdr *ah, IF_AFDATA_WUNLOCK(ifp); LLE_REMREF(la); + + /* Clear fast path feedback request if set */ + la->r_skip_req = 0; } arp_mark_lle_reachable(la); @@ -1073,17 +1109,21 @@ arp_check_update_lle(struct arphdr *ah, static void arp_mark_lle_reachable(struct llentry *la) { - int canceled; + int canceled, wtime; LLE_WLOCK_ASSERT(la); + la->ln_state = ARP_LLINFO_REACHABLE; EVENTHANDLER_INVOKE(lle_event, la, LLENTRY_RESOLVED); if (!(la->la_flags & LLE_STATIC)) { LLE_ADDREF(la); la->la_expire = time_uptime + V_arpt_keep; + wtime = V_arpt_keep - V_arp_maxtries * V_arpt_rexmit; + if (wtime < 0) + wtime = V_arpt_keep; canceled = callout_reset(&la->lle_timer, - hz * V_arpt_keep, arptimer, la); + hz * wtime, arptimer, la); if (canceled) LLE_REMREF(la); } Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sat Dec 5 09:32:36 2015 (r291852) +++ head/sys/netinet/in.c Sat Dec 5 09:50:37 2015 (r291853) @@ -1013,6 +1013,7 @@ in_lltable_destroy_lle(struct llentry *l LLE_WUNLOCK(lle); LLE_LOCK_DESTROY(lle); + LLE_REQ_DESTROY(lle); free(lle, M_LLTABLE); } @@ -1034,6 +1035,7 @@ in_lltable_new(struct in_addr addr4, u_i lle->base.lle_refcnt = 1; lle->base.lle_free = in_lltable_destroy_lle; LLE_LOCK_INIT(&lle->base); + LLE_REQ_INIT(&lle->base); callout_init(&lle->base.lle_timer, 1); return (&lle->base); @@ -1257,9 +1259,12 @@ in_lltable_alloc(struct lltable *llt, u_ return (NULL); } lle->la_flags = flags; + if (flags & LLE_STATIC) + lle->r_flags |= RLLE_VALID; if ((flags & LLE_IFADDR) == LLE_IFADDR) { lltable_set_entry_addr(ifp, lle, IF_LLADDR(ifp)); lle->la_flags |= LLE_STATIC; + lle->r_flags |= (RLLE_VALID | RLLE_IFADDR); } return (lle); @@ -1283,6 +1288,13 @@ in_lltable_lookup(struct lltable *llt, u if (lle == NULL) return (NULL); + KASSERT((flags & (LLE_UNLOCKED|LLE_EXCLUSIVE)) != + (LLE_UNLOCKED|LLE_EXCLUSIVE),("wrong lle request flags: 0x%X", + flags)); + + if (flags & LLE_UNLOCKED) + return (lle); + if (flags & LLE_EXCLUSIVE) LLE_WLOCK(lle); else From owner-svn-src-all@freebsd.org Sat Dec 5 09:54:00 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9529BA42040; Sat, 5 Dec 2015 09:54:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56720122A; Sat, 5 Dec 2015 09:54:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB59rxmE010601; Sat, 5 Dec 2015 09:53:59 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB59rwkT010587; Sat, 5 Dec 2015 09:53:58 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201512050953.tB59rwkT010587@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 5 Dec 2015 09:53:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r291854 - in releng: 10.1 10.1/crypto/openssl/crypto/asn1 10.1/crypto/openssl/crypto/rsa 10.1/crypto/openssl/ssl 10.1/sys/conf 10.2 10.2/crypto/openssl/crypto/asn1 10.2/crypto/openssl/c... X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 09:54:00 -0000 Author: delphij Date: Sat Dec 5 09:53:58 2015 New Revision: 291854 URL: https://svnweb.freebsd.org/changeset/base/291854 Log: Fix OpenSSL multiple vulnerabilities. Security: FreeBSD-SA-15:26.openssl Approved by: so Modified: releng/10.1/UPDATING releng/10.1/crypto/openssl/crypto/asn1/tasn_dec.c releng/10.1/crypto/openssl/crypto/rsa/rsa_ameth.c releng/10.1/crypto/openssl/ssl/s3_clnt.c releng/10.1/crypto/openssl/ssl/s3_srvr.c releng/10.1/sys/conf/newvers.sh releng/10.2/UPDATING releng/10.2/crypto/openssl/crypto/asn1/tasn_dec.c releng/10.2/crypto/openssl/crypto/rsa/rsa_ameth.c releng/10.2/sys/conf/newvers.sh releng/9.3/UPDATING releng/9.3/crypto/openssl/crypto/asn1/tasn_dec.c releng/9.3/sys/conf/newvers.sh Modified: releng/10.1/UPDATING ============================================================================== --- releng/10.1/UPDATING Sat Dec 5 09:50:37 2015 (r291853) +++ releng/10.1/UPDATING Sat Dec 5 09:53:58 2015 (r291854) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20151205 p25 FreeBSD-SA-15:26.openssl + + Fix multiple OpenSSL vulnerabilities. [SA-15:26] + 20151104 p24 FreeBSD-SA-15:25.ntp [revised] FreeBSD-EN-15:19.kqueue FreeBSD-EN-15:20.vm Modified: releng/10.1/crypto/openssl/crypto/asn1/tasn_dec.c ============================================================================== --- releng/10.1/crypto/openssl/crypto/asn1/tasn_dec.c Sat Dec 5 09:50:37 2015 (r291853) +++ releng/10.1/crypto/openssl/crypto/asn1/tasn_dec.c Sat Dec 5 09:53:58 2015 (r291854) @@ -169,6 +169,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, int otag; int ret = 0; ASN1_VALUE **pchptr, *ptmpval; + int combine = aclass & ASN1_TFLG_COMBINE; + aclass &= ~ASN1_TFLG_COMBINE; if (!pval) return 0; if (aux && aux->asn1_cb) @@ -534,7 +536,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, auxerr: ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_AUX_ERROR); err: - ASN1_item_ex_free(pval, it); + if (combine == 0) + ASN1_item_ex_free(pval, it); if (errtt) ERR_add_error_data(4, "Field=", errtt->field_name, ", Type=", it->sname); @@ -762,7 +765,7 @@ static int asn1_template_noexp_d2i(ASN1_ { /* Nothing special */ ret = ASN1_item_ex_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item), - -1, 0, opt, ctx); + -1, tt->flags & ASN1_TFLG_COMBINE, opt, ctx); if (!ret) { ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I, Modified: releng/10.1/crypto/openssl/crypto/rsa/rsa_ameth.c ============================================================================== --- releng/10.1/crypto/openssl/crypto/rsa/rsa_ameth.c Sat Dec 5 09:50:37 2015 (r291853) +++ releng/10.1/crypto/openssl/crypto/rsa/rsa_ameth.c Sat Dec 5 09:53:58 2015 (r291854) @@ -287,7 +287,7 @@ static RSA_PSS_PARAMS *rsa_pss_decode(co { ASN1_TYPE *param = pss->maskGenAlgorithm->parameter; if (OBJ_obj2nid(pss->maskGenAlgorithm->algorithm) == NID_mgf1 - && param->type == V_ASN1_SEQUENCE) + && param && param->type == V_ASN1_SEQUENCE) { p = param->value.sequence->data; plen = param->value.sequence->length; Modified: releng/10.1/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- releng/10.1/crypto/openssl/ssl/s3_clnt.c Sat Dec 5 09:50:37 2015 (r291853) +++ releng/10.1/crypto/openssl/ssl/s3_clnt.c Sat Dec 5 09:53:58 2015 (r291854) @@ -1360,8 +1360,6 @@ int ssl3_get_key_exchange(SSL *s) #ifndef OPENSSL_NO_PSK if (alg_k & SSL_kPSK) { - char tmp_id_hint[PSK_MAX_IDENTITY_LEN+1]; - param_len = 2; if (param_len > n) { @@ -1390,16 +1388,8 @@ int ssl3_get_key_exchange(SSL *s) } param_len += i; - /* If received PSK identity hint contains NULL - * characters, the hint is truncated from the first - * NULL. p may not be ending with NULL, so create a - * NULL-terminated string. */ - memcpy(tmp_id_hint, p, i); - memset(tmp_id_hint+i, 0, PSK_MAX_IDENTITY_LEN+1-i); - if (s->ctx->psk_identity_hint != NULL) - OPENSSL_free(s->ctx->psk_identity_hint); - s->ctx->psk_identity_hint = BUF_strdup(tmp_id_hint); - if (s->ctx->psk_identity_hint == NULL) + s->session->psk_identity_hint = BUF_strndup((char *)p, i); + if (s->session->psk_identity_hint == NULL) { al=SSL_AD_HANDSHAKE_FAILURE; SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE, ERR_R_MALLOC_FAILURE); @@ -3009,7 +2999,7 @@ int ssl3_send_client_key_exchange(SSL *s } memset(identity, 0, sizeof(identity)); - psk_len = s->psk_client_callback(s, s->ctx->psk_identity_hint, + psk_len = s->psk_client_callback(s, s->session->psk_identity_hint, identity, sizeof(identity) - 1, psk_or_pre_ms, sizeof(psk_or_pre_ms)); if (psk_len > PSK_MAX_PSK_LEN) Modified: releng/10.1/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- releng/10.1/crypto/openssl/ssl/s3_srvr.c Sat Dec 5 09:50:37 2015 (r291853) +++ releng/10.1/crypto/openssl/ssl/s3_srvr.c Sat Dec 5 09:53:58 2015 (r291854) @@ -2827,7 +2827,7 @@ int ssl3_get_client_key_exchange(SSL *s) if (s->session->psk_identity != NULL) OPENSSL_free(s->session->psk_identity); - s->session->psk_identity = BUF_strdup((char *)p); + s->session->psk_identity = BUF_strndup((char *)p, i); if (s->session->psk_identity == NULL) { SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE, Modified: releng/10.1/sys/conf/newvers.sh ============================================================================== --- releng/10.1/sys/conf/newvers.sh Sat Dec 5 09:50:37 2015 (r291853) +++ releng/10.1/sys/conf/newvers.sh Sat Dec 5 09:53:58 2015 (r291854) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.1" -BRANCH="RELEASE-p24" +BRANCH="RELEASE-p25" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/10.2/UPDATING ============================================================================== --- releng/10.2/UPDATING Sat Dec 5 09:50:37 2015 (r291853) +++ releng/10.2/UPDATING Sat Dec 5 09:53:58 2015 (r291854) @@ -16,6 +16,10 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20151205 p8 FreeBSD-SA-15:26.openssl + + Fix multiple OpenSSL vulnerabilities. [SA-15:26] + 20151104 p7 FreeBSD-SA-15:25.ntp [revised] FreeBSD-EN-15:19.kqueue FreeBSD-EN-15:20.vm Modified: releng/10.2/crypto/openssl/crypto/asn1/tasn_dec.c ============================================================================== --- releng/10.2/crypto/openssl/crypto/asn1/tasn_dec.c Sat Dec 5 09:50:37 2015 (r291853) +++ releng/10.2/crypto/openssl/crypto/asn1/tasn_dec.c Sat Dec 5 09:53:58 2015 (r291854) @@ -180,6 +180,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, int otag; int ret = 0; ASN1_VALUE **pchptr, *ptmpval; + int combine = aclass & ASN1_TFLG_COMBINE; + aclass &= ~ASN1_TFLG_COMBINE; if (!pval) return 0; if (aux && aux->asn1_cb) @@ -500,7 +502,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, auxerr: ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_AUX_ERROR); err: - ASN1_item_ex_free(pval, it); + if (combine == 0) + ASN1_item_ex_free(pval, it); if (errtt) ERR_add_error_data(4, "Field=", errtt->field_name, ", Type=", it->sname); @@ -689,7 +692,7 @@ static int asn1_template_noexp_d2i(ASN1_ } else { /* Nothing special */ ret = ASN1_item_ex_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item), - -1, 0, opt, ctx); + -1, tt->flags & ASN1_TFLG_COMBINE, opt, ctx); if (!ret) { ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I, ERR_R_NESTED_ASN1_ERROR); goto err; Modified: releng/10.2/crypto/openssl/crypto/rsa/rsa_ameth.c ============================================================================== --- releng/10.2/crypto/openssl/crypto/rsa/rsa_ameth.c Sat Dec 5 09:50:37 2015 (r291853) +++ releng/10.2/crypto/openssl/crypto/rsa/rsa_ameth.c Sat Dec 5 09:53:58 2015 (r291854) @@ -279,7 +279,7 @@ static RSA_PSS_PARAMS *rsa_pss_decode(co if (pss->maskGenAlgorithm) { ASN1_TYPE *param = pss->maskGenAlgorithm->parameter; if (OBJ_obj2nid(pss->maskGenAlgorithm->algorithm) == NID_mgf1 - && param->type == V_ASN1_SEQUENCE) { + && param && param->type == V_ASN1_SEQUENCE) { p = param->value.sequence->data; plen = param->value.sequence->length; *pmaskHash = d2i_X509_ALGOR(NULL, &p, plen); Modified: releng/10.2/sys/conf/newvers.sh ============================================================================== --- releng/10.2/sys/conf/newvers.sh Sat Dec 5 09:50:37 2015 (r291853) +++ releng/10.2/sys/conf/newvers.sh Sat Dec 5 09:53:58 2015 (r291854) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="10.2" -BRANCH="RELEASE-p7" +BRANCH="RELEASE-p8" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.3/UPDATING ============================================================================== --- releng/9.3/UPDATING Sat Dec 5 09:50:37 2015 (r291853) +++ releng/9.3/UPDATING Sat Dec 5 09:53:58 2015 (r291854) @@ -11,6 +11,10 @@ handbook: Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. +20151205 p31 FreeBSD-SA-15:26.openssl + + Fix OpenSSL X509_ATTRIBUTE memory leak. [SA-15:26] + 20151104 p30 FreeBSD-SA-15:25.ntp [revised] FreeBSD-EN-15:19.kqueue FreeBSD-EN-15:20.vm Modified: releng/9.3/crypto/openssl/crypto/asn1/tasn_dec.c ============================================================================== --- releng/9.3/crypto/openssl/crypto/asn1/tasn_dec.c Sat Dec 5 09:50:37 2015 (r291853) +++ releng/9.3/crypto/openssl/crypto/asn1/tasn_dec.c Sat Dec 5 09:53:58 2015 (r291854) @@ -167,6 +167,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, int otag; int ret = 0; ASN1_VALUE **pchptr, *ptmpval; + int combine = aclass & ASN1_TFLG_COMBINE; + aclass &= ~ASN1_TFLG_COMBINE; if (!pval) return 0; if (aux && aux->asn1_cb) @@ -532,7 +534,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, auxerr: ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_AUX_ERROR); err: - ASN1_item_ex_free(pval, it); + if (combine == 0) + ASN1_item_ex_free(pval, it); if (errtt) ERR_add_error_data(4, "Field=", errtt->field_name, ", Type=", it->sname); @@ -758,7 +761,7 @@ static int asn1_template_noexp_d2i(ASN1_ { /* Nothing special */ ret = ASN1_item_ex_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item), - -1, 0, opt, ctx); + -1, tt->flags & ASN1_TFLG_COMBINE, opt, ctx); if (!ret) { ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I, Modified: releng/9.3/sys/conf/newvers.sh ============================================================================== --- releng/9.3/sys/conf/newvers.sh Sat Dec 5 09:50:37 2015 (r291853) +++ releng/9.3/sys/conf/newvers.sh Sat Dec 5 09:53:58 2015 (r291854) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.3" -BRANCH="RELEASE-p30" +BRANCH="RELEASE-p31" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@freebsd.org Sat Dec 5 10:00:02 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CABB9A4214A; Sat, 5 Dec 2015 10:00:02 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A48A14C4; Sat, 5 Dec 2015 10:00:02 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5A01bZ010876; Sat, 5 Dec 2015 10:00:01 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5A01W7010875; Sat, 5 Dec 2015 10:00:01 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201512051000.tB5A01W7010875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 5 Dec 2015 10:00:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291855 - head/sys/cddl/dev/profile X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 10:00:02 -0000 Author: andrew Date: Sat Dec 5 10:00:01 2015 New Revision: 291855 URL: https://svnweb.freebsd.org/changeset/base/291855 Log: Allow the artificial profile frames to be adjusted as needed by the user. While here update for armv6 to a tested value. Submitted by: Howard Su Reviewed by: stat Differential Revision: https://reviews.freebsd.org/D4315 Modified: head/sys/cddl/dev/profile/profile.c Modified: head/sys/cddl/dev/profile/profile.c ============================================================================== --- head/sys/cddl/dev/profile/profile.c Sat Dec 5 09:53:58 2015 (r291854) +++ head/sys/cddl/dev/profile/profile.c Sat Dec 5 10:00:01 2015 (r291855) @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -134,10 +135,7 @@ struct profile_probe_percpu; #endif #ifdef __arm__ -/* - * At least on ARMv7, this appears to work quite well. - */ -#define PROF_ARTIFICIAL_FRAMES 10 +#define PROF_ARTIFICIAL_FRAMES 3 #endif #ifdef __aarch64__ @@ -233,7 +231,12 @@ static dtrace_pops_t profile_pops = { static struct cdev *profile_cdev; static dtrace_provider_id_t profile_id; static hrtime_t profile_interval_min = NANOSEC / 5000; /* 5000 hz */ -static int profile_aframes = 0; /* override */ +static int profile_aframes = PROF_ARTIFICIAL_FRAMES; + +SYSCTL_DECL(_kern_dtrace); +SYSCTL_NODE(_kern_dtrace, OID_AUTO, profile, CTLFLAG_RD, 0, "DTrace profile parameters"); +SYSCTL_INT(_kern_dtrace_profile, OID_AUTO, aframes, CTLFLAG_RW, &profile_aframes, + 0, "Skipped frames for profile provider"); static sbintime_t nsec_to_sbt(hrtime_t nsec) @@ -352,7 +355,7 @@ profile_create(hrtime_t interval, char * prof->prof_kind = kind; prof->prof_id = dtrace_probe_create(profile_id, NULL, NULL, name, - profile_aframes ? profile_aframes : PROF_ARTIFICIAL_FRAMES, prof); + profile_aframes, prof); } /*ARGSUSED*/ From owner-svn-src-all@freebsd.org Sat Dec 5 10:10:19 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D92CA42528; Sat, 5 Dec 2015 10:10:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A66D10C3; Sat, 5 Dec 2015 10:10:19 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5AAIHa014284; Sat, 5 Dec 2015 10:10:18 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5AAIGX014283; Sat, 5 Dec 2015 10:10:18 GMT (envelope-from np@FreeBSD.org) Message-Id: <201512051010.tB5AAIGX014283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 5 Dec 2015 10:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291856 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 10:10:19 -0000 Author: np Date: Sat Dec 5 10:10:18 2015 New Revision: 291856 URL: https://svnweb.freebsd.org/changeset/base/291856 Log: Fix RSS build. Reported by: arybchik@ Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Sat Dec 5 10:00:01 2015 (r291855) +++ head/sys/dev/cxgbe/t4_main.c Sat Dec 5 10:10:18 2015 (r291856) @@ -3916,7 +3916,7 @@ vi_full_init(struct vi_info *vi) for (i = 0; i < vi->rss_size;) { #ifdef RSS j = rss_get_indirection_to_bucket(i); - j %= pi->vrxq; + j %= vi->nrxq; rxq = &sc->sge.rxq[vi->first_rxq + j]; rss[i++] = rxq->iq.abs_id; #else From owner-svn-src-all@freebsd.org Sat Dec 5 12:40:44 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C4C5A406E8; Sat, 5 Dec 2015 12:40:44 +0000 (UTC) (envelope-from howard0su@gmail.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 074711378; Sat, 5 Dec 2015 12:40:43 +0000 (UTC) (envelope-from howard0su@gmail.com) Received: by iofh3 with SMTP id h3so142163241iof.3; Sat, 05 Dec 2015 04:40:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PDQxj1ZY81fHUPa506+/qZ0MRKxPkHigTMPlSpWAizU=; b=URJ3aVB/Jf2xRrk8E/M1mgV443/q3p5oUwWrHVbjDSYEi3KhWBP0gRJvc/E5kSbwG8 IX8BbHA8vCxPejvDF9/oXKfZZRAbDFweGl+fIGeKnjn7n1bAT4OM8D/yzt6jC11NGzAz q0WcDbwj0QJ4iXM5o9jM4rhHAzlaQLZ9bQwRXNo60d/rQva92dY2eTrwrVQ5cDPevAbG NibO5/OgJdMBT/yhtDAGccyqPp9x2R+yoXb1pdjN+HaorcfN44U9qs1lmEqlaecnC3cw nb0rmLDXf+LJCmi2vS00O42+dMN+iZqp1wQEGr+SYSRecy3n/5Y+o/mRrSexwmsnum5E MxbQ== MIME-Version: 1.0 X-Received: by 10.107.164.24 with SMTP id n24mr18732959ioe.21.1449319243103; Sat, 05 Dec 2015 04:40:43 -0800 (PST) Received: by 10.107.164.167 with HTTP; Sat, 5 Dec 2015 04:40:43 -0800 (PST) In-Reply-To: <201512050110.tB51A5pO047682@repo.freebsd.org> References: <201512050110.tB51A5pO047682@repo.freebsd.org> Date: Sat, 5 Dec 2015 20:40:43 +0800 Message-ID: Subject: Re: svn commit: r291830 - head/tools/tools/nanobsd From: Howard Su To: Warner Losh Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 12:40:44 -0000 On Saturday, December 5, 2015, Warner Losh wrote: > Author: imp > Date: Sat Dec 5 01:10:04 2015 > New Revision: 291830 > URL: https://svnweb.freebsd.org/changeset/base/291830 > > Log: > Setting NANO_NOPRIV_BUILD will now add -DNO_ROOT and METALOG=xxxx as > appropriate. First step in supporting a build w/o root. More to > follow as actions by customization scripts are not (yet) recorded in > the metalog, and duplicate entries in it aren't removed. > > Modified: > head/tools/tools/nanobsd/defaults.sh (contents, props changed) > > Modified: head/tools/tools/nanobsd/defaults.sh > > ============================================================================== > --- head/tools/tools/nanobsd/defaults.sh Sat Dec 5 00:54:43 2015 > (r291829) > +++ head/tools/tools/nanobsd/defaults.sh Sat Dec 5 01:10:04 2015 > (r291830) > @@ -340,6 +340,10 @@ make_conf_install ( ) ( > nano_global_make_env > echo "${CONF_WORLD}" > echo "${CONF_INSTALL}" > + if [ ! -z "${NANO_NOPRIV_BUILD}" ]; then > + echo NO_ROOT=t > + echo METALOG=${NANO_METALOG} > + fi > ) > ${NANO_MAKE_CONF_INSTALL} > ) > > @@ -951,11 +955,14 @@ set_defaults_and_export ( ) { > NANO_MAKE_CONF_INSTALL=${NANO_OBJ}/make.conf.install > > # Override user's NANO_DRIVE if they specified a NANO_LABEL > - [ ! -z "${NANO_LABEL}" ] && NANO_DRIVE="ufs/${NANO_LABEL}" > + [ ! -z "${NANO_LABEL}" ] && NANO_DRIVE="ufs/${NANO_LABEL}" || true > > # Set a default NANO_TOOLS to NANO_SRC/NANO_TOOLS if it exists. > [ ! -d "${NANO_TOOLS}" ] && [ -d "${NANO_SRC}/${NANO_TOOLS}" ] && \ > - NANO_TOOLS="${NANO_SRC}/${NANO_TOOLS}" > + NANO_TOOLS="${NANO_SRC}/${NANO_TOOLS}" || true > + > + [ ! -z "${NANO_NOPRIV_BUILD" ] && [ -z "${NANO_METALOG}"] && \ > ^ missing } > + NANO_METALOG=${NANO_OBJ}/_.metalog || true > > NANO_STARTTIME=`date +%s` > pprint 3 "Exporting NanoBSD variables" > @@ -985,6 +992,8 @@ set_defaults_and_export ( ) { > export_var NANO_BOOTLOADER > export_var NANO_LABEL > export_var NANO_MODULES > + export_var NANO_NOPRIV_BUILD > + export_var NANO_METALOG > export_var SRCCONF > export_var SRC_ENV_CONF > } > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org > " > -- -Howard From owner-svn-src-all@freebsd.org Sat Dec 5 12:53:14 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DA29A409A7; Sat, 5 Dec 2015 12:53:14 +0000 (UTC) (envelope-from howard0su@gmail.com) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 000541A8F; Sat, 5 Dec 2015 12:53:13 +0000 (UTC) (envelope-from howard0su@gmail.com) Received: by igcph11 with SMTP id ph11so49341491igc.1; Sat, 05 Dec 2015 04:53:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=BAyfRdqKNne0GJy/ZS2LHWuVbi2eBserr4vg4Bl3ud0=; b=G1jJfgEWx/aEYUaSpdzNG6QYwUlI33xU7G6x1iSHjju/oM1UnHKVofJ16CofSX311u WuqEAxcBpOhxCnbTLGiGq83QjFcKLSr4y/sMkUvNqwO53tTMKHV6mdScNmX1/3WIcYWP H/sHEqQyRA920HaKlVXw10y+BukPTpNngF25bz/FtpCdgSmY035D7GGHjaEeZXS1iHnq GpTPL9b2dN0CHo078sfSou92waDimy06DtA7/XH7aHCsqPCIX4a3ZoulDnD4U7PgXsJ/ AnPBcjF3leIt0LSP37Fa7Zt9QSdDRJT2SqsiDJ0iPkubhCvXlYKj/xAnKJq+q7CYJfhg v7FQ== MIME-Version: 1.0 X-Received: by 10.50.150.100 with SMTP id uh4mr8257693igb.23.1449319993407; Sat, 05 Dec 2015 04:53:13 -0800 (PST) Received: by 10.107.164.167 with HTTP; Sat, 5 Dec 2015 04:53:13 -0800 (PST) In-Reply-To: <201512050932.tB59Waii003325@repo.freebsd.org> References: <201512050932.tB59Waii003325@repo.freebsd.org> Date: Sat, 5 Dec 2015 20:53:13 +0800 Message-ID: Subject: Re: svn commit: r291852 - in head/sys: arm/arm arm/include cddl/dev/fbt/arm From: Howard Su To: Andrew Turner Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 12:53:14 -0000 On Saturday, December 5, 2015, Andrew Turner wrote: > Author: andrew > Date: Sat Dec 5 09:32:36 2015 > New Revision: 291852 > URL: https://svnweb.freebsd.org/changeset/base/291852 > > Log: > Move the check to see if we are tracing a function with the DTrace > Function > Boundary Trace to assembly to reduce the overhead of these checks. > > Submitted by: Howard Su > > Relnotes: Yes > Differential Revision: https://reviews.freebsd.org/D4266 > > Modified: > head/sys/arm/arm/exception.S > head/sys/arm/arm/genassym.c > head/sys/arm/arm/trap-v6.c > head/sys/arm/arm/undefined.c > head/sys/arm/include/trap.h > head/sys/cddl/dev/fbt/arm/fbt_isa.c > > Modified: head/sys/arm/arm/exception.S > > ============================================================================== > --- head/sys/arm/arm/exception.S Sat Dec 5 08:52:37 2015 > (r291851) > +++ head/sys/arm/arm/exception.S Sat Dec 5 09:32:36 2015 > (r291852) > @@ -52,13 +52,15 @@ > #include > #include > #include > +#include > + > __FBSDID("$FreeBSD$"); > > #ifdef KDTRACE_HOOKS > .bss > .align 4 > - .global _C_LABEL(dtrace_invop_calltrap_addr) > -_C_LABEL(dtrace_invop_calltrap_addr): > + .global _C_LABEL(dtrace_invop_jump_addr) > +_C_LABEL(dtrace_invop_jump_addr): > .word 0 > .word 0 > #endif > @@ -361,9 +363,39 @@ END(data_abort_entry) > */ > ASENTRY_NP(undefined_entry) > PUSHFRAMEINSVC /* mode stack, build trapframe > there. */ > + mov r4, r0 /* R0 contains SPSR */ > adr lr, exception_exit /* Return from handler via > standard */ > - mov r0, sp /* exception exit routine. Pass > the */ > - b undefinedinstruction /* trapframe to the handler. */ > + mov r0, sp /* exception exit routine. pass > frame */ > + > + ldr r2, [sp, #(TF_PC)] /* load pc */ > +#if __ARM_ARCH >= 7 > + tst r4, #(PSR_T) /* test if PSR_T */ > + subne r2, r2, #(THUMB_INSN_SIZE) > + subeq r2, r2, #(INSN_SIZE) > +#else > + sub r2, r2, #(INSN_SIZE) /* fix pc */ > +#endif > + str r2, [sp, #TF_PC] /* store pc */ > + > +#ifdef KDTRACE_HOOKS > + /* Check if dtrace is enabled */ > + ldr r1, =_C_LABEL(dtrace_invop_jump_addr) > + ldr r3, [r1] > + cmp r3, #0 > + beq undefinedinstruction > + > + and r4, r4, #(PSR_MODE) /* Mask out unneeded bits */ > + cmp r4, #(PSR_USR32_MODE) /* Check if we came from usermode > */ > + beq undefinedinstruction > + > + ldr r4, [r2] /* load instrution */ > + ldr r1, =FBT_BREAKPOINT /* load fbt inv op */ > + cmp r1, r4 > + bne undefinedinstruction > + > + bx r3 /* call invop_jump_addr */ > +#endif > + b undefinedinstruction /* call stadnard handler */ > END(undefined_entry) > > /* > > Modified: head/sys/arm/arm/genassym.c > > ============================================================================== > --- head/sys/arm/arm/genassym.c Sat Dec 5 08:52:37 2015 (r291851) > +++ head/sys/arm/arm/genassym.c Sat Dec 5 09:32:36 2015 (r291852) > @@ -118,6 +118,7 @@ ASSYM(MD_TP, offsetof(struct mdthread, m > ASSYM(MD_RAS_START, offsetof(struct mdthread, md_ras_start)); > ASSYM(MD_RAS_END, offsetof(struct mdthread, md_ras_end)); > > +ASSYM(TF_SPSR, offsetof(struct trapframe, tf_spsr)); > ASSYM(TF_R0, offsetof(struct trapframe, tf_r0)); > ASSYM(TF_R1, offsetof(struct trapframe, tf_r1)); > ASSYM(TF_PC, offsetof(struct trapframe, tf_pc)); > > Modified: head/sys/arm/arm/trap-v6.c > > ============================================================================== > --- head/sys/arm/arm/trap-v6.c Sat Dec 5 08:52:37 2015 (r291851) > +++ head/sys/arm/arm/trap-v6.c Sat Dec 5 09:32:36 2015 (r291852) > @@ -66,6 +66,10 @@ __FBSDID("$FreeBSD$"); > #include > #endif > > +#ifdef KDTRACE_HOOKS > +#include > +#endif > + > extern char fusubailout[]; > extern char cachebailout[]; > > @@ -561,6 +565,13 @@ abort_fatal(struct trapframe *tf, u_int > const char *rw_mode; > > usermode = TRAPF_USERMODE(tf); > +#ifdef KDTRACE_HOOKS > + if (!usermode) { > + if (dtrace_trap_func != NULL && (*dtrace_trap_func)(tf, > far)) > + return (0); > + } > +#endif > + > mode = usermode ? "user" : "kernel"; > rw_mode = fsr & FSR_WNR ? "write" : "read"; > disable_interrupts(PSR_I|PSR_F); > > Modified: head/sys/arm/arm/undefined.c > > ============================================================================== > --- head/sys/arm/arm/undefined.c Sat Dec 5 08:52:37 2015 > (r291851) > +++ head/sys/arm/arm/undefined.c Sat Dec 5 09:32:36 2015 > (r291852) > @@ -99,10 +99,6 @@ __FBSDID("$FreeBSD$"); > > #define COPROC_VFP 10 > > -#ifdef KDTRACE_HOOKS > -int (*dtrace_invop_jump_addr)(struct trapframe *); > -#endif > - > static int gdb_trapper(u_int, u_int, struct trapframe *, int); > > LIST_HEAD(, undefined_handler) undefined_handlers[MAX_COPROCS]; > @@ -206,12 +202,6 @@ undefinedinstruction(struct trapframe *f > > PCPU_INC(cnt.v_trap); > > -#if __ARM_ARCH >= 7 > - if ((frame->tf_spsr & PSR_T) != 0) > - frame->tf_pc -= THUMB_INSN_SIZE; > - else > -#endif > - frame->tf_pc -= INSN_SIZE; > fault_pc = frame->tf_pc; > > /* > @@ -350,12 +340,6 @@ undefinedinstruction(struct trapframe *f > #endif > return; > } > -#ifdef KDTRACE_HOOKS > - else if (dtrace_invop_jump_addr != 0) { > - dtrace_invop_jump_addr(frame); > - return; > - } > -#endif > else > panic("Undefined instruction in kernel.\n"); > } > > Modified: head/sys/arm/include/trap.h > > ============================================================================== > --- head/sys/arm/include/trap.h Sat Dec 5 08:52:37 2015 (r291851) > +++ head/sys/arm/include/trap.h Sat Dec 5 09:32:36 2015 (r291852) > @@ -7,4 +7,5 @@ > #define GDB5_BREAKPOINT 0xe7ffdefe > #define PTRACE_BREAKPOINT 0xe7fffff0 > #define KERNEL_BREAKPOINT 0xe7ffffff > +#define FBT_BREAKPOINT 0xe7f000f0 > #endif /* _MACHINE_TRAP_H_ */ > > Modified: head/sys/cddl/dev/fbt/arm/fbt_isa.c > > ============================================================================== > --- head/sys/cddl/dev/fbt/arm/fbt_isa.c Sat Dec 5 08:52:37 2015 > (r291851) > +++ head/sys/cddl/dev/fbt/arm/fbt_isa.c Sat Dec 5 09:32:36 2015 > (r291852) > @@ -35,11 +35,10 @@ > #include > > #include > +#include > > #include "fbt.h" > > -#define FBT_PATCHVAL 0xe7f000f0 /* Specified undefined > instruction */ > - > #define FBT_PUSHM 0xe92d0000 > #define FBT_POPM 0xe8bd0000 > #define FBT_JUMP 0xea000000 > @@ -53,15 +52,20 @@ fbt_invop(uintptr_t addr, uintptr_t *sta > struct trapframe *frame = (struct trapframe *)stack; > solaris_cpu_t *cpu = &solaris_cpu[curcpu]; > fbt_probe_t *fbt = fbt_probetab[FBT_ADDR2NDX(addr)]; > + register_t fifthparam; > > for (; fbt != NULL; fbt = fbt->fbtp_hashnext) { > if ((uintptr_t)fbt->fbtp_patchpoint == addr) { > cpu->cpu_dtrace_caller = addr; > > - /* TODO: Need 5th parameter from stack */ > + /* Get 5th parameter from stack */ > + DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); > + fifthparam = *(register_t *)frame->tf_usr_sp; > + DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | > CPU_DTRACE_BADADDR); > + > dtrace_probe(fbt->fbtp_id, frame->tf_r0, > frame->tf_r1, frame->tf_r2, > - frame->tf_r3, 0); > + frame->tf_r3, fifthparam); > > cpu->cpu_dtrace_caller = 0; > > @@ -77,7 +81,7 @@ fbt_patch_tracepoint(fbt_probe_t *fbt, f > { > > *fbt->fbtp_patchpoint = val; > - cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, 4); > + cpu_icache_sync_range((vm_offset_t)fbt->fbtp_patchpoint, > sizeof(val)); > } > > int > @@ -104,13 +108,6 @@ fbt_provide_module_function(linker_file_ > if (name[0] == '_' && name[1] == '_') > return (0); > > - /* > - * Architecture-specific exclusion list, largely to do with FBT > trap > - * processing, to prevent reentrance. > - */ > - if (strcmp(name, "undefinedinstruction") == 0) > - return (0); > - > instr = (uint32_t *)symval->value; > limit = (uint32_t *)(symval->value + symval->size); > > @@ -125,12 +122,12 @@ fbt_provide_module_function(linker_file_ > fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO); > fbt->fbtp_name = name; > fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, > - name, FBT_ENTRY, 3, fbt); > + name, FBT_ENTRY, 2, fbt); > fbt->fbtp_patchpoint = instr; > fbt->fbtp_ctl = lf; > fbt->fbtp_loadcnt = lf->loadcnt; > fbt->fbtp_savedval = *instr; > - fbt->fbtp_patchval = FBT_PATCHVAL; > + fbt->fbtp_patchval = FBT_BREAKPOINT; > fbt->fbtp_rval = DTRACE_INVOP_PUSHM; > fbt->fbtp_symindx = symindx; > > @@ -157,7 +154,6 @@ again: > start = (uint32_t *)symval->value; > if (target >= limit || target < start) > break; > - instr++; /* skip delay slot */ > } > } > > @@ -171,7 +167,7 @@ again: > fbt->fbtp_name = name; > if (retfbt == NULL) { > fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, > - name, FBT_RETURN, 3, fbt); > + name, FBT_RETURN, 2, fbt); > } else { > retfbt->fbtp_next = fbt; > fbt->fbtp_id = retfbt->fbtp_id; > @@ -187,7 +183,7 @@ again: > else > fbt->fbtp_rval = DTRACE_INVOP_POPM; > fbt->fbtp_savedval = *instr; > - fbt->fbtp_patchval = FBT_PATCHVAL; > + fbt->fbtp_patchval = FBT_BREAKPOINT; > fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)]; > fbt_probetab[FBT_ADDR2NDX(instr)] = fbt; > > While I am here, 1. Remove a copy&paste code to skip "delay slot" which ARM doesn't have. 2. Support fifth arg in fbt. this leads to add missing KDTRACE hook code in trap-v6.c -- -Howard From owner-svn-src-all@freebsd.org Sat Dec 5 12:55:36 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38430A40AD0; Sat, 5 Dec 2015 12:55:36 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07EDA1C2E; Sat, 5 Dec 2015 12:55:35 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5CtZAM063334; Sat, 5 Dec 2015 12:55:35 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5CtZov063333; Sat, 5 Dec 2015 12:55:35 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201512051255.tB5CtZov063333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 5 Dec 2015 12:55:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291857 - head/bin/sh/tests/parameters X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 12:55:36 -0000 Author: jilles Date: Sat Dec 5 12:55:34 2015 New Revision: 291857 URL: https://svnweb.freebsd.org/changeset/base/291857 Log: sh: Link tests/parameters/positional8.0 to the build. This was forgotten in r291025. Modified: head/bin/sh/tests/parameters/Makefile Modified: head/bin/sh/tests/parameters/Makefile ============================================================================== --- head/bin/sh/tests/parameters/Makefile Sat Dec 5 10:10:18 2015 (r291856) +++ head/bin/sh/tests/parameters/Makefile Sat Dec 5 12:55:34 2015 (r291857) @@ -20,6 +20,7 @@ FILES+= positional4.0 FILES+= positional5.0 FILES+= positional6.0 FILES+= positional7.0 +FILES+= positional8.0 FILES+= pwd1.0 FILES+= pwd2.0 From owner-svn-src-all@freebsd.org Sat Dec 5 15:08:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 349F6A4183A; Sat, 5 Dec 2015 15:08:03 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E51771FAD; Sat, 5 Dec 2015 15:08:02 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5F81aq001335; Sat, 5 Dec 2015 15:08:01 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5F81CZ001333; Sat, 5 Dec 2015 15:08:01 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201512051508.tB5F81CZ001333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 5 Dec 2015 15:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291858 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 15:08:03 -0000 Author: avos Date: Sat Dec 5 15:08:01 2015 New Revision: 291858 URL: https://svnweb.freebsd.org/changeset/base/291858 Log: urtwn: fix some regressions after r290630 - Restore R92C_TXDW4_HWSEQ_EN bit - it is used by non-8188EU chips. - Fix DRVRATE bit usage. Tested with: - RTL8188EU, STA mode. - RTL8188CUS, STA mode. Reviewed by: kevlo Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D4352 Modified: head/sys/dev/usb/wlan/if_urtwn.c head/sys/dev/usb/wlan/if_urtwnreg.h Modified: head/sys/dev/usb/wlan/if_urtwn.c ============================================================================== --- head/sys/dev/usb/wlan/if_urtwn.c Sat Dec 5 12:55:34 2015 (r291857) +++ head/sys/dev/usb/wlan/if_urtwn.c Sat Dec 5 15:08:01 2015 (r291858) @@ -1601,14 +1601,16 @@ urtwn_init_beacon(struct urtwn_softc *sc SM(R92C_TXDW1_QSEL, R92C_TXDW1_QSEL_BEACON) | SM(R92C_TXDW1_RAID, R92C_RAID_11B)); - if (sc->chip & URTWN_CHIP_88E) + if (sc->chip & URTWN_CHIP_88E) { txd->txdw1 |= htole32(SM(R88E_TXDW1_MACID, URTWN_MACID_BC)); - else + txd->txdseq |= htole16(R88E_TXDSEQ_HWSEQ_EN); + } else { txd->txdw1 |= htole32(SM(R92C_TXDW1_MACID, URTWN_MACID_BC)); + txd->txdw4 |= htole32(R92C_TXDW4_HWSEQ_EN); + } txd->txdw4 = htole32(R92C_TXDW4_DRVRATE); txd->txdw5 = htole32(SM(R92C_TXDW5_DATARATE, URTWN_RIDX_CCK1)); - txd->txdseq = htole16(R92C_TXDSEQ_HWSEQ_EN); } static int @@ -2249,13 +2251,17 @@ urtwn_tx_data(struct urtwn_softc *sc, st txd->txdw1 |= htole32(SM(R92C_TXDW1_MACID, macid)); txd->txdw5 |= htole32(SM(R92C_TXDW5_DATARATE, ridx)); - /* not sure here */ - if (ridx <= URTWN_RIDX_CCK11) + /* Force this rate if needed. */ + if (ismcast || type != IEEE80211_FC0_TYPE_DATA || + (m->m_flags & M_EAPOL)) txd->txdw4 |= htole32(R92C_TXDW4_DRVRATE); if (!IEEE80211_QOS_HAS_SEQ(wh)) { /* Use HW sequence numbering for non-QoS frames. */ - txd->txdseq = htole16(R92C_TXDSEQ_HWSEQ_EN); + if (sc->chip & URTWN_CHIP_88E) + txd->txdseq = htole16(R88E_TXDSEQ_HWSEQ_EN); + else + txd->txdw4 |= htole32(R92C_TXDW4_HWSEQ_EN); } else { /* Set sequence number. */ txd->txdseq = htole16(M_SEQNO_GET(m) % IEEE80211_SEQ_RANGE); Modified: head/sys/dev/usb/wlan/if_urtwnreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwnreg.h Sat Dec 5 12:55:34 2015 (r291857) +++ head/sys/dev/usb/wlan/if_urtwnreg.h Sat Dec 5 15:08:01 2015 (r291858) @@ -1055,12 +1055,13 @@ struct r92c_tx_desc { uint16_t txdw3; uint16_t txdseq; -#define R92C_TXDSEQ_HWSEQ_EN 0x8000 +#define R88E_TXDSEQ_HWSEQ_EN 0x8000 uint32_t txdw4; #define R92C_TXDW4_RTSRATE_M 0x0000003f #define R92C_TXDW4_RTSRATE_S 0 #define R92C_TXDW4_HWSEQ_QOS 0x00000040 +#define R92C_TXDW4_HWSEQ_EN 0x00000080 #define R92C_TXDW4_DRVRATE 0x00000100 #define R92C_TXDW4_CTS2SELF 0x00000800 #define R92C_TXDW4_RTSEN 0x00001000 From owner-svn-src-all@freebsd.org Sat Dec 5 15:09:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 095F8A418CA; Sat, 5 Dec 2015 15:09:21 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBD68113B; Sat, 5 Dec 2015 15:09:20 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5F9J1J001426; Sat, 5 Dec 2015 15:09:19 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5F9J1O001425; Sat, 5 Dec 2015 15:09:19 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201512051509.tB5F9J1O001425@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Sat, 5 Dec 2015 15:09:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291859 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 15:09:21 -0000 Author: kevlo Date: Sat Dec 5 15:09:19 2015 New Revision: 291859 URL: https://svnweb.freebsd.org/changeset/base/291859 Log: Remove a duplicate definition. Modified: head/sys/dev/uart/uart_dev_imx.h Modified: head/sys/dev/uart/uart_dev_imx.h ============================================================================== --- head/sys/dev/uart/uart_dev_imx.h Sat Dec 5 15:08:01 2015 (r291858) +++ head/sys/dev/uart/uart_dev_imx.h Sat Dec 5 15:09:19 2015 (r291859) @@ -124,7 +124,6 @@ #define IMXUART_UFCR_TXTL_SHIFT 10 #define IMXUART_UFCR_RFDIV_MASK (0x07 << 7) #define IMXUART_UFCR_RFDIV_SHIFT 7 -#define IMXUART_UFCR_RFDIV_SHIFT 7 #define IMXUART_UFCR_RFDIV_DIV6 (0 << 7) #define IMXUART_UFCR_RFDIV_DIV5 (1 << 7) #define IMXUART_UFCR_RFDIV_DIV4 (2 << 7) From owner-svn-src-all@freebsd.org Sat Dec 5 16:28:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6773A426CE; Sat, 5 Dec 2015 16:28:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2D8A1DC9; Sat, 5 Dec 2015 16:28:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5GSEPS024372; Sat, 5 Dec 2015 16:28:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5GSEnr024370; Sat, 5 Dec 2015 16:28:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201512051628.tB5GSEnr024370@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 5 Dec 2015 16:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291860 - in head/tools/tools/nanobsd: . embedded X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 16:28:15 -0000 Author: imp Date: Sat Dec 5 16:28:14 2015 New Revision: 291860 URL: https://svnweb.freebsd.org/changeset/base/291860 Log: Stupid last minute changes: Add missing } and fi Pointed out by: Howard Su Modified: head/tools/tools/nanobsd/defaults.sh (contents, props changed) head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/defaults.sh ============================================================================== --- head/tools/tools/nanobsd/defaults.sh Sat Dec 5 15:09:19 2015 (r291859) +++ head/tools/tools/nanobsd/defaults.sh Sat Dec 5 16:28:14 2015 (r291860) @@ -961,7 +961,7 @@ set_defaults_and_export ( ) { [ ! -d "${NANO_TOOLS}" ] && [ -d "${NANO_SRC}/${NANO_TOOLS}" ] && \ NANO_TOOLS="${NANO_SRC}/${NANO_TOOLS}" || true - [ ! -z "${NANO_NOPRIV_BUILD" ] && [ -z "${NANO_METALOG}"] && \ + [ ! -z "${NANO_NOPRIV_BUILD}" ] && [ -z "${NANO_METALOG}"] && \ NANO_METALOG=${NANO_OBJ}/_.metalog || true NANO_STARTTIME=`date +%s` Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Sat Dec 5 15:09:19 2015 (r291859) +++ head/tools/tools/nanobsd/embedded/common Sat Dec 5 16:28:14 2015 (r291860) @@ -359,6 +359,7 @@ create_diskimage ( ) ( mkimg -s mbr -p ${s1}:=${NANO_OBJ}/_.s1 \ -p ${s2}:=${NANO_OBJ}/_.s2 -o ${NANO_OBJ}/_.disk.image.${NANO_NAME} + fi ) > ${NANO_OBJ}/_.di 2>&1 ) From owner-svn-src-all@freebsd.org Sat Dec 5 17:01:39 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B19D4A42C9D; Sat, 5 Dec 2015 17:01:39 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 816B61B40; Sat, 5 Dec 2015 17:01:39 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5H1cUX035069; Sat, 5 Dec 2015 17:01:38 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5H1c2c035068; Sat, 5 Dec 2015 17:01:38 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201512051701.tB5H1c2c035068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Sat, 5 Dec 2015 17:01:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291861 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 17:01:39 -0000 Author: cem Date: Sat Dec 5 17:01:38 2015 New Revision: 291861 URL: https://svnweb.freebsd.org/changeset/base/291861 Log: style.9: Add a small blurb about allowing bool It was allowed before, but make it very explicit it is allowed now. And prefer 'bool' to older types that were used for the same purpose -- int and boolean_t. Like with the C99 fixed-width types, use common sense when changing old code. No igor regressions. Suggested by: bde <20151205031713.T3286@besplex.bde.org> Reviewed by: glebius, davide, bapt (earlier versions) Reviewed by: imp Feedback from: julian Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4384 Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Sat Dec 5 16:28:14 2015 (r291860) +++ head/share/man/man9/style.9 Sat Dec 5 17:01:38 2015 (r291861) @@ -26,7 +26,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd November 22, 2015 +.Dd December 5, 2015 .Dt STYLE 9 .Os .Sh NAME @@ -288,6 +288,30 @@ Like white-space commits, care should be .Vt uintXX_t only commits. .Pp +Similarly, the project is slowly moving to use the +.St -isoC-99 +.Vt bool +in preference to the older +.Vt int +or +.Vt boolean_t . +New code should use +.Vt bool , +and old code may be converted if it is +reasonable to do so. +Literal values are named +.Dv true +and +.Dv false . +These are preferred to the old spellings +.Dv TRUE +and +.Dv FALSE . +Userspace code should include +.In stdbool.h , +while kernel code should include +.In sys/types.h . +.Pp Enumeration values are all uppercase. .Bd -literal enum enumtype { ONE, TWO } et; From owner-svn-src-all@freebsd.org Sat Dec 5 17:06:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 762B3A42DC1; Sat, 5 Dec 2015 17:06:34 +0000 (UTC) (envelope-from kubito@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F3D01F23; Sat, 5 Dec 2015 17:06:34 +0000 (UTC) (envelope-from kubito@gmail.com) Received: by wmec201 with SMTP id c201so113656688wme.0; Sat, 05 Dec 2015 09:06:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=L3va/+p2SxTqYrJ9jyhbSxV4t0Sqq+WaKcUQePrWEvk=; b=e9z8uh6XNlPtHZr1NyOdxcBNoOnXZrXSZcMvG5/3ojv1/a20SsnsuJnA15vapjkPmf M5u+KA4OOqBoiwzkf7YLOXZpbptv2N6zi2ZUEXQ+ZmbLIdvMRY8wnIQ+r1TrKMdNuVyL FmDjoDMwmFtVXe+GKG/4amfH7VhWflUp/kjk77ugcHfOHfqgTyjg97oFLDdy89Kg+twg /jGrBYfG9fKLBBp1u962M56JPdrGJ/ZATdyukaLztP0cAqxDWZYmgmFUniDg0Hk7tB7Y 6Yk5l+PzSggZDVyMYhpu55b5SmcsEUrNtnft91A4SBgoUReIOqu9qYR+TRySVjEH1iMk FxdA== X-Received: by 10.194.87.39 with SMTP id u7mr23783762wjz.11.1449335191585; Sat, 05 Dec 2015 09:06:31 -0800 (PST) Received: from orwell.gmail.com (dhcp-077-248-147-050.chello.nl. [77.248.147.50]) by smtp.gmail.com with ESMTPSA id kc9sm17163832wjc.34.2015.12.05.09.06.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Dec 2015 09:06:30 -0800 (PST) Sender: Raphael Kubo da Costa From: Raphael Kubo da Costa To: Eric van Gyzen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r289315 - in head: include lib/libc/resolv share/man/man5 References: <201510141426.t9EEQiWX079418__45653.4197823659$1444832818$gmane$org@repo.freebsd.org> Date: Sat, 05 Dec 2015 18:06:24 +0100 In-Reply-To: <201510141426.t9EEQiWX079418__45653.4197823659$1444832818$gmane$org@repo.freebsd.org> (Eric van Gyzen's message of "Wed, 14 Oct 2015 14:26:44 +0000 (UTC)") Message-ID: <86r3j06d0v.fsf@FreeBSD.org> User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 17:06:34 -0000 Eric van Gyzen writes: > Author: vangyzen > Date: Wed Oct 14 14:26:44 2015 > New Revision: 289315 > URL: https://svnweb.freebsd.org/changeset/base/289315 > > Log: > resolver: automatically reload /etc/resolv.conf > > [...] > > Modified: head/include/resolv.h > ============================================================================== > --- head/include/resolv.h Wed Oct 14 12:46:05 2015 (r289314) > +++ head/include/resolv.h Wed Oct 14 14:26:44 2015 (r289315) > > [...] > > @@ -188,6 +189,8 @@ struct __res_state { > } _ext; > } _u; > u_char *_rnd; /*%< PRIVATE: random state */ > + struct timespec conf_mtim; /*%< mod time of loaded resolv.conf */ > + time_t conf_stat; /*%< time of last stat(resolv.conf) */ > }; With this change, including the headers listed in resolver(3), sys/types.h, netinet/in.h, arpa/nameser.h and resolv.h is not enough, as resolv.h now depends on sys/time.h. This has broken at least one port, net-mgmt/sx. It includes those 4 headers to find if the resolver library is in libc. The test program fails like this: In file included from conftest.c:31: /usr/include/resolv.h:192:18: error: field has incomplete type 'struct timespec' struct timespec conf_mtim; /*%< mod time of loaded resolv.conf */ ^ /usr/include/resolv.h:192:9: note: forward declaration of 'struct timespec' struct timespec conf_mtim; /*%< mod time of loaded resolv.conf */ ^ From owner-svn-src-all@freebsd.org Sat Dec 5 17:11:15 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5E4BA42E99; Sat, 5 Dec 2015 17:11:15 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80EA21130; Sat, 5 Dec 2015 17:11:15 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5HBEMc036052; Sat, 5 Dec 2015 17:11:14 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5HBEZp036051; Sat, 5 Dec 2015 17:11:14 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512051711.tB5HBEZp036051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 5 Dec 2015 17:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291862 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 17:11:15 -0000 Author: arybchik Date: Sat Dec 5 17:11:14 2015 New Revision: 291862 URL: https://svnweb.freebsd.org/changeset/base/291862 Log: sfxge: erase nvram partitions in chunks equal to their erase size The erase size is reported by the nvram info command. Submitted by: Paul Fox Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4386 Modified: head/sys/dev/sfxge/common/hunt_nvram.c Modified: head/sys/dev/sfxge/common/hunt_nvram.c ============================================================================== --- head/sys/dev/sfxge/common/hunt_nvram.c Sat Dec 5 17:01:38 2015 (r291861) +++ head/sys/dev/sfxge/common/hunt_nvram.c Sat Dec 5 17:11:14 2015 (r291862) @@ -1363,12 +1363,37 @@ hunt_nvram_partn_erase( __in size_t size) { efx_rc_t rc; + uint32_t erase_size; - if ((rc = efx_mcdi_nvram_erase(enp, partn, offset, size)) != 0) + if ((rc = efx_mcdi_nvram_info(enp, partn, NULL, NULL, + &erase_size, NULL)) != 0) goto fail1; + if (erase_size == 0) { + if ((rc = efx_mcdi_nvram_erase(enp, partn, offset, size)) != 0) + goto fail2; + } else { + if (size % erase_size != 0) { + rc = EINVAL; + goto fail3; + } + while (size > 0) { + if ((rc = efx_mcdi_nvram_erase(enp, partn, offset, + erase_size)) != 0) + goto fail4; + offset += erase_size; + size -= erase_size; + } + } + return (0); +fail4: + EFSYS_PROBE(fail4); +fail3: + EFSYS_PROBE(fail3); +fail2: + EFSYS_PROBE(fail2); fail1: EFSYS_PROBE1(fail1, efx_rc_t, rc); From owner-svn-src-all@freebsd.org Sat Dec 5 17:16:59 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1004A42FF3 for ; Sat, 5 Dec 2015 17:16:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-oi0-x234.google.com (mail-oi0-x234.google.com [IPv6:2607:f8b0:4003:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 65B3315FA for ; Sat, 5 Dec 2015 17:16:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by oige206 with SMTP id e206so81350277oig.2 for ; Sat, 05 Dec 2015 09:16:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=qkuQE74j/B+9th3Ir03ripFcaWQ9rgUQ1YLgGKy16ko=; b=XzzZwC/9zyBlJnCGx8+GS7uZTT2BxS5RdG2NBiEfEolZdTnQP07osemwOh7p1LM31M q//JoC8EcGGRtFCjx8uaEQZHJbgejhCTXwiG8WJhWC7HIvWGsvf3jGW3H7tXCaKc9FBt ASlTj6JIuHi3OLJWm5D7QsTkhOnL2nqNpG5pXxEDuiohS0Zrpsd3MUXSwjapN8BS2dsy 3Kvn5g34i87A2xtZv+G8+2xC7bsA3yR21BfzlwKyifRYt/hq+N7iJ3eZD/u1652gKPT2 PSkpm3c3y/yLWUv417e6g8yuNUG1U49AgJEIcoTjxxZWtt3oM+JUEUGyHS16tXdUEvEN N4Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=qkuQE74j/B+9th3Ir03ripFcaWQ9rgUQ1YLgGKy16ko=; b=LSvJPM3AjCjLeigXWyJ9HdmX4kYbV/ILzHU6K75ClDnpg/EqqTKatYLi7NbsK4m1mb IxPwSyX+DepktNYOla/KXHaC4Xq6sh61nw3XdAeiCrZekHVfHVpm7M4vFMqLT40TcRhh ee//wxSsgqnzoG+FFMJ6G3am/cBB9g0j3TrOJrPtHHAodF12Q5allYbQSvrNc+fybmry wz9ffnUTrW4Osu9d4WSUHC17VFrueN+tc+nQcjD5XMnJBSP10GXO/y/bjkrRopYVmMk4 W8wvIWHIOQBFUAg9/JAdzbm1QC4YJxLi89PJSYK4AQ7in3Ab/yX8Z4Q9lMJGiGr9RFlm nmpQ== X-Gm-Message-State: ALoCoQkDXYZHVl29pwgnor7NxEb44O5r0N8GnONjYrtZq7pRWb6CG6ce2GrhQDflCdX/7mx6JdPG X-Received: by 10.202.81.73 with SMTP id f70mr6651741oib.34.1449335818491; Sat, 05 Dec 2015 09:16:58 -0800 (PST) Received: from ?IPv6:2601:280:4900:3700:9562:9bd6:31bc:dd06? ([2601:280:4900:3700:9562:9bd6:31bc:dd06]) by smtp.gmail.com with ESMTPSA id kw1sm8141602obb.28.2015.12.05.09.16.57 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 05 Dec 2015 09:16:58 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r291830 - head/tools/tools/nanobsd Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_F8A54E2E-6C6D-42F9-959E-5D18457F1ABE"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: Date: Sat, 5 Dec 2015 10:16:54 -0700 Cc: Warner Losh , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: References: <201512050110.tB51A5pO047682@repo.freebsd.org> To: Howard Su X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 17:16:59 -0000 --Apple-Mail=_F8A54E2E-6C6D-42F9-959E-5D18457F1ABE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 5, 2015, at 5:40 AM, Howard Su wrote: >=20 >=20 >=20 > On Saturday, December 5, 2015, Warner Losh wrote: > Author: imp > Date: Sat Dec 5 01:10:04 2015 > New Revision: 291830 > URL: https://svnweb.freebsd.org/changeset/base/291830 >=20 > Log: > Setting NANO_NOPRIV_BUILD will now add -DNO_ROOT and METALOG=3Dxxxx = as > appropriate. First step in supporting a build w/o root. More to > follow as actions by customization scripts are not (yet) recorded in > the metalog, and duplicate entries in it aren't removed. >=20 > Modified: > head/tools/tools/nanobsd/defaults.sh (contents, props changed) >=20 > Modified: head/tools/tools/nanobsd/defaults.sh > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/tools/tools/nanobsd/defaults.sh Sat Dec 5 00:54:43 = 2015 (r291829) > +++ head/tools/tools/nanobsd/defaults.sh Sat Dec 5 01:10:04 = 2015 (r291830) > @@ -340,6 +340,10 @@ make_conf_install ( ) ( > nano_global_make_env > echo "${CONF_WORLD}" > echo "${CONF_INSTALL}" > + if [ ! -z "${NANO_NOPRIV_BUILD}" ]; then > + echo NO_ROOT=3Dt > + echo METALOG=3D${NANO_METALOG} > + fi > ) > ${NANO_MAKE_CONF_INSTALL} > ) >=20 > @@ -951,11 +955,14 @@ set_defaults_and_export ( ) { > NANO_MAKE_CONF_INSTALL=3D${NANO_OBJ}/make.conf.install >=20 > # Override user's NANO_DRIVE if they specified a NANO_LABEL > - [ ! -z "${NANO_LABEL}" ] && NANO_DRIVE=3D"ufs/${NANO_LABEL}" > + [ ! -z "${NANO_LABEL}" ] && NANO_DRIVE=3D"ufs/${NANO_LABEL}" = || true >=20 > # Set a default NANO_TOOLS to NANO_SRC/NANO_TOOLS if it = exists. > [ ! -d "${NANO_TOOLS}" ] && [ -d "${NANO_SRC}/${NANO_TOOLS}" ] = && \ > - NANO_TOOLS=3D"${NANO_SRC}/${NANO_TOOLS}" > + NANO_TOOLS=3D"${NANO_SRC}/${NANO_TOOLS}" || true > + > + [ ! -z "${NANO_NOPRIV_BUILD" ] && [ -z "${NANO_METALOG}"] && \ > ^ = missing } Ah, that=E2=80=99s what I get for =E2=80=98tidying up=E2=80=99 a couple = of things just before the commit and not running a final, final test run :( Fixed. Warner > + NANO_METALOG=3D${NANO_OBJ}/_.metalog || true >=20 > NANO_STARTTIME=3D`date +%s` > pprint 3 "Exporting NanoBSD variables" > @@ -985,6 +992,8 @@ set_defaults_and_export ( ) { > export_var NANO_BOOTLOADER > export_var NANO_LABEL > export_var NANO_MODULES > + export_var NANO_NOPRIV_BUILD > + export_var NANO_METALOG > export_var SRCCONF > export_var SRC_ENV_CONF > } > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to = "svn-src-head-unsubscribe@freebsd.org" >=20 >=20 > -- > -Howard --Apple-Mail=_F8A54E2E-6C6D-42F9-959E-5D18457F1ABE Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJWYxwIAAoJEGwc0Sh9sBEAj6kP/2R/Tbz30a5IghPrRBPDJkeN 8DWvdON5n6rPAwOE34ACqtCtMW6FvFrHDEMc55qijq9myZk1HvNpG4DMao+9U3MX FJGPcvyYa0z4xt/idNxcLJndxp57rtOctN5kU8h7Xz2YUFvYT73pR1VQbMhpsch0 U2k2dGreaVEOaOluu109GtViD9McgyRVxbAQ7yi6IVLCAwYPpeoE/H/ietS6o3YQ mK5R8bKocuCCnbLfM55Fh2+/3yHz4pzY+e/Ap6TXpWKxLD9SbvOEI3QfanzlHeJc z6xgvudqNCBJKAettZFblC/c2/YP/P789SlOcOv1A0KQTM2nZGNHozSJNkzBRnu8 azq9Vdtj9StefzDh4TG6G4czhe66VETVXzO3gOBJgdVaISiBZ7rkCNbNI6jqzQ4/ Bl5Cfri9AbMdepSmtMmvV/XkUgEtX6aklkYQ0HqBeyxJsVIF/rLS/6g7i4C5HAZI 2kk0WKUCVJR0LKXHF5mdqZhtEJ/NIMddpv+53Szu57T6z995FGYtGfkdecTGtitE iSRZHp2ZTBooeifArVxiY2X82y3WTg9R221S8v/5QEDR4iWLfx7OGbrin5CLj9Sw sAWWfJcG4Ca7Onap5HkJKRDGGuGETQW9ELa8h3v56t3E8MJ0Wxe7WOXtJJsTAdUv 9FyaJNkK6L4zvVP8a6c1 =pLpO -----END PGP SIGNATURE----- --Apple-Mail=_F8A54E2E-6C6D-42F9-959E-5D18457F1ABE-- From owner-svn-src-all@freebsd.org Sat Dec 5 17:26:17 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AED4EA41296; Sat, 5 Dec 2015 17:26:17 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CAFE1B71; Sat, 5 Dec 2015 17:26:17 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by wmww144 with SMTP id w144so96286365wmw.1; Sat, 05 Dec 2015 09:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OfrsDiLkd+iae8RLRQvQQ2NaG9oTArg8hiEn/u9iJ0U=; b=Wrnr3bFGff9X9ViZV5on1c9NEMey/2hkaDe2+HhrPg080N6hjJQQTLfcmXjzdqs93S CGJyStc2UZ86Nlb9HK75by0AlnaSl1iyenl2RyAuQea+YMpe9DIV+1F1evbVc6nf39kl m6CK8wJbzrbFU1V/J7zXK9IRIVdqdMPKcMuoQISSWHBH0EVeITfxcPy9rBV4Vl6gPnK0 Og6jv1RyYEd1gMdv46RFDQnkmKI9M3cDst4fh+GvHGJe3wcbubZ40vz3wTAFnUJE890+ 8QDGg4niFjSWB6DMYybVUtKWwzuJe69eEw8ISFIf+0fC8rIskuvBRsJkjKavU0WvLwtk IgSw== MIME-Version: 1.0 X-Received: by 10.194.79.201 with SMTP id l9mr26780864wjx.151.1449336375835; Sat, 05 Dec 2015 09:26:15 -0800 (PST) Received: by 10.27.10.199 with HTTP; Sat, 5 Dec 2015 09:26:15 -0800 (PST) In-Reply-To: <201512051628.tB5GSEnr024370@repo.freebsd.org> References: <201512051628.tB5GSEnr024370@repo.freebsd.org> Date: Sat, 5 Dec 2015 11:26:15 -0600 Message-ID: Subject: Re: svn commit: r291860 - in head/tools/tools/nanobsd: . embedded From: Benjamin Kaduk To: Warner Losh Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 17:26:17 -0000 On Sat, Dec 5, 2015 at 10:28 AM, Warner Losh wrote: > Author: imp > Date: Sat Dec 5 16:28:14 2015 > New Revision: 291860 > URL: https://svnweb.freebsd.org/changeset/base/291860 > > Log: > Stupid last minute changes: Add missing } and fi > > Pointed out by: Howard Su > > Modified: > head/tools/tools/nanobsd/defaults.sh (contents, props changed) > head/tools/tools/nanobsd/embedded/common > > Modified: head/tools/tools/nanobsd/defaults.sh > > ============================================================================== > --- head/tools/tools/nanobsd/defaults.sh Sat Dec 5 15:09:19 2015 > (r291859) > +++ head/tools/tools/nanobsd/defaults.sh Sat Dec 5 16:28:14 2015 > (r291860) > @@ -961,7 +961,7 @@ set_defaults_and_export ( ) { > [ ! -d "${NANO_TOOLS}" ] && [ -d "${NANO_SRC}/${NANO_TOOLS}" ] && \ > NANO_TOOLS="${NANO_SRC}/${NANO_TOOLS}" || true > > - [ ! -z "${NANO_NOPRIV_BUILD" ] && [ -z "${NANO_METALOG}"] && \ > + [ ! -z "${NANO_NOPRIV_BUILD}" ] && [ -z "${NANO_METALOG}"] && \ > Hmm, is there still a missing space between '"' and ']' in the second clause? -Ben > NANO_METALOG=${NANO_OBJ}/_.metalog || true > From owner-svn-src-all@freebsd.org Sat Dec 5 17:40:13 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53A75A414E0; Sat, 5 Dec 2015 17:40:13 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 043DE102B; Sat, 5 Dec 2015 17:40:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5HeCXd044520; Sat, 5 Dec 2015 17:40:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5HeBn6044518; Sat, 5 Dec 2015 17:40:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201512051740.tB5HeBn6044518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 5 Dec 2015 17:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291863 - in head/tools/tools/nanobsd: . embedded X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 17:40:13 -0000 Author: imp Date: Sat Dec 5 17:40:11 2015 New Revision: 291863 URL: https://svnweb.freebsd.org/changeset/base/291863 Log: When building no-priv, chmod etc/defaults/rc.conf before appending to it and then chmod back. There's no chmod -push / chmod -pop so hard code 444 as the right permissions here. Also, fix more stray detritus that crept in (out?) while re-arranging the deck chairs. Modified: head/tools/tools/nanobsd/defaults.sh (contents, props changed) head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/defaults.sh ============================================================================== --- head/tools/tools/nanobsd/defaults.sh Sat Dec 5 17:11:14 2015 (r291862) +++ head/tools/tools/nanobsd/defaults.sh Sat Dec 5 17:40:11 2015 (r291863) @@ -490,7 +490,9 @@ setup_nanobsd_etc ( ) ( touch etc/diskless # Make root filesystem R/O by default + [ ! -z "${NANO_NOPRIV_BUILD}" ] && chmod 666 etc/defaults/rc.conf echo "root_rw_mount=NO" >> etc/defaults/rc.conf + [ ! -z "${NANO_NOPRIV_BUILD}" ] && chmod 444 etc/defaults/rc.conf # save config file for scripts echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf @@ -961,7 +963,7 @@ set_defaults_and_export ( ) { [ ! -d "${NANO_TOOLS}" ] && [ -d "${NANO_SRC}/${NANO_TOOLS}" ] && \ NANO_TOOLS="${NANO_SRC}/${NANO_TOOLS}" || true - [ ! -z "${NANO_NOPRIV_BUILD}" ] && [ -z "${NANO_METALOG}"] && \ + [ ! -z "${NANO_NOPRIV_BUILD}" ] && [ -z "${NANO_METALOG}" ] && \ NANO_METALOG=${NANO_OBJ}/_.metalog || true NANO_STARTTIME=`date +%s` Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Sat Dec 5 17:11:14 2015 (r291862) +++ head/tools/tools/nanobsd/embedded/common Sat Dec 5 17:40:11 2015 (r291863) @@ -357,7 +357,7 @@ create_diskimage ( ) ( # s1 is cfg, s2 is /, not sure how to make that # boot (marked as active) with mkimg yet mkimg -s mbr -p ${s1}:=${NANO_OBJ}/_.s1 \ - -p ${s2}:=${NANO_OBJ}/_.s2 + -p ${s2}:=${NANO_OBJ}/_.s2 \ -o ${NANO_OBJ}/_.disk.image.${NANO_NAME} fi ) > ${NANO_OBJ}/_.di 2>&1 From owner-svn-src-all@freebsd.org Sat Dec 5 18:09:07 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DBB4A419B5; Sat, 5 Dec 2015 18:09:07 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-oi0-x232.google.com (mail-oi0-x232.google.com [IPv6:2607:f8b0:4003:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C207E1C18; Sat, 5 Dec 2015 18:09:06 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by oixx65 with SMTP id x65so81676152oix.0; Sat, 05 Dec 2015 10:09:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=acFjdPJcLLZ3y8HZceKyonoNNXTl4M5RbC1gbp2RjIE=; b=ygJ6GqCbSQkT6nf7ifFT1LzCakaTCGfD/t6YEb2565R5Eo2aDJgjltAnN5Vtcu6tPf Ks7IZIuHXuthTiXp4VqqfPCb33Gxyc77ejV9OQ4UN9bsOuTGjQYiewor/jui+mGGJq6k GBQY8/V0Qz5u3VOzEiPwDbutW66Q5ABT60vKys8NKQdOM1Se48yPd2kqpnpBFEQbLn5Q +DG3jPcZ9YABHn39YVaBjgOj/aJK3onO5YW8xfmWIVCiQCy8N6E2RhmSIYZX0eI7iO7I UO8tfzjZoHdIfnURWbcn0jLRVGWYnmb6I6uNDFzFE1YmOTh0B6Wu7jl+4j2v39TPTE95 INjA== X-Received: by 10.202.73.214 with SMTP id w205mr16141517oia.91.1449338946035; Sat, 05 Dec 2015 10:09:06 -0800 (PST) Received: from ?IPv6:2601:601:800:126d:a463:48bc:7725:7f6a? ([2601:601:800:126d:a463:48bc:7725:7f6a]) by smtp.gmail.com with ESMTPSA id z190sm8235904oig.25.2015.12.05.10.09.04 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Dec 2015 10:09:04 -0800 (PST) Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r291860 - in head/tools/tools/nanobsd: . embedded From: Garrett Cooper X-Mailer: iPhone Mail (13B143) In-Reply-To: Date: Sat, 5 Dec 2015 10:09:03 -0800 Cc: Warner Losh , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <6A5C1B44-49E2-4E61-B915-B2424A96F574@gmail.com> References: <201512051628.tB5GSEnr024370@repo.freebsd.org> To: Benjamin Kaduk Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 18:09:07 -0000 > On Dec 5, 2015, at 09:26, Benjamin Kaduk wrote: ... >> - [ ! -z "${NANO_NOPRIV_BUILD" ] && [ -z "${NANO_METALOG}"] && \ >> + [ ! -z "${NANO_NOPRIV_BUILD}" ] && [ -z "${NANO_METALOG}"] && \ >=20 > Hmm, is there still a missing space between '"' and ']' in the second clau= se? Yup. Still broken, but at least it won't die immediate due to a syntax error= like it would have before this commit.= From owner-svn-src-all@freebsd.org Sat Dec 5 18:56:23 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C6E4A42256; Sat, 5 Dec 2015 18:56:23 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4F371FEB; Sat, 5 Dec 2015 18:56:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5IuMr0067500; Sat, 5 Dec 2015 18:56:22 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5IuMsg067499; Sat, 5 Dec 2015 18:56:22 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512051856.tB5IuMsg067499@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 5 Dec 2015 18:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291864 - head/lib/libc/tests/ssp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 18:56:23 -0000 Author: bdrewery Date: Sat Dec 5 18:56:21 2015 New Revision: 291864 URL: https://svnweb.freebsd.org/changeset/base/291864 Log: Fix regression in r291738: This really wants -lssp. The normal LIBADD is ssp_nonshared. This also had a DPADD on LIBSSP which does not actually exist, it is blank. Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libc/tests/ssp/Makefile Modified: head/lib/libc/tests/ssp/Makefile ============================================================================== --- head/lib/libc/tests/ssp/Makefile Sat Dec 5 17:40:11 2015 (r291863) +++ head/lib/libc/tests/ssp/Makefile Sat Dec 5 18:56:21 2015 (r291864) @@ -10,7 +10,7 @@ CFLAGS.h_raw+= -fstack-protector-all -Ws CFLAGS.h_raw+= -fsanitize=bounds .elif ${COMPILER_TYPE} == "gcc" CFLAGS.h_raw+= --param ssp-buffer-size=1 -LIBADD+= ssp +LDADD+= -lssp .endif NETBSD_ATF_TESTS_SH= ssp_test From owner-svn-src-all@freebsd.org Sat Dec 5 19:00:34 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DC5CA422FF; Sat, 5 Dec 2015 19:00:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 290811233; Sat, 5 Dec 2015 19:00:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id 246E41573; Sat, 5 Dec 2015 19:00:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id E516B17AA9; Sat, 5 Dec 2015 19:00:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id Fs7jxhZzQoAH; Sat, 5 Dec 2015 19:00:31 +0000 (UTC) Subject: Re: svn commit: r291864 - head/lib/libc/tests/ssp DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 61B5317AA2 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201512051856.tB5IuMsg067499@repo.freebsd.org> From: Bryan Drewery Organization: FreeBSD Message-ID: <5663344E.2050308@FreeBSD.org> Date: Sat, 5 Dec 2015 11:00:30 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <201512051856.tB5IuMsg067499@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 19:00:34 -0000 On 12/5/15 10:56 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Sat Dec 5 18:56:21 2015 > New Revision: 291864 > URL: https://svnweb.freebsd.org/changeset/base/291864 > > Log: > Fix regression in r291738: This really wants -lssp. > > The normal LIBADD is ssp_nonshared. This also had a DPADD on LIBSSP which > does not actually exist, it is blank. > > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/lib/libc/tests/ssp/Makefile > > Modified: head/lib/libc/tests/ssp/Makefile > ============================================================================== > --- head/lib/libc/tests/ssp/Makefile Sat Dec 5 17:40:11 2015 (r291863) > +++ head/lib/libc/tests/ssp/Makefile Sat Dec 5 18:56:21 2015 (r291864) > @@ -10,7 +10,7 @@ CFLAGS.h_raw+= -fstack-protector-all -Ws > CFLAGS.h_raw+= -fsanitize=bounds > .elif ${COMPILER_TYPE} == "gcc" > CFLAGS.h_raw+= --param ssp-buffer-size=1 > -LIBADD+= ssp > +LDADD+= -lssp > .endif > > NETBSD_ATF_TESTS_SH= ssp_test > This may actually need to be LIBADD+=ssp_nonshared. I am just too busy at the moment to look into it properly. -- Regards, Bryan Drewery From owner-svn-src-all@freebsd.org Sat Dec 5 19:12:18 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2CDE0A4250E; Sat, 5 Dec 2015 19:12:18 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EAD5A1A3C; Sat, 5 Dec 2015 19:12:17 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5JCHwA073292; Sat, 5 Dec 2015 19:12:17 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5JCHfh073291; Sat, 5 Dec 2015 19:12:17 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201512051912.tB5JCHfh073291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Sat, 5 Dec 2015 19:12:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r291865 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 19:12:18 -0000 Author: gnn Date: Sat Dec 5 19:12:16 2015 New Revision: 291865 URL: https://svnweb.freebsd.org/changeset/base/291865 Log: Free Jonathan T. Looney (jtl@) from mentorship. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Sat Dec 5 18:56:21 2015 (r291864) +++ svnadmin/conf/mentors Sat Dec 5 19:12:16 2015 (r291865) @@ -23,7 +23,6 @@ erj gnn Co-mentor: jfv jceel wkoszek Co-mentor: cognet jkh rwatson jonathan rwatson -jtl gnn jwd rmacklem kadesai ken Co-mentor: scottl, ambrisko mahrens mckusick From owner-svn-src-all@freebsd.org Sat Dec 5 19:58:32 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36D7EA42C3F for ; Sat, 5 Dec 2015 19:58:32 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-x233.google.com (mail-ob0-x233.google.com [IPv6:2607:f8b0:4003:c01::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D32AE190E for ; Sat, 5 Dec 2015 19:58:31 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by obciw8 with SMTP id iw8so5407648obc.1 for ; Sat, 05 Dec 2015 11:58:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :message-id:references:to; bh=fVGX7Ld3n5vw7pMKLsL5gDQFEVjttNzU1fFn8ebdV54=; b=OYlEdTVV6zuYXaL1TPZSQACLkt/b9k1Pv3scNmEe6moJZGp7vA57F4rYPrA/8iJ3Bg w1fmUi0afx/T/fO0nZiB6N5PnyoHbZfaQZYkV4S8wm/sySVoQ4zND6J1DbgqfExp7efT xacglxpoCQ7bvYp5BHDa/vPXXgHaz0Y88B91qtr/gPXTtM2OH+4Xvyy53MC3fRCFLAPX 0cBziBEstPjCHajHXQcNDWGBPhkgMuaRYBDa8/pdtMrV1XUATUkJQJ7644Tcad/tw9Hb xWxEgaWIVLmJQyHx+iz8Ls73z6RTQ6BH9+s0GjiGrfjmsTlun8mH0MeBbXJN47mm12U8 Ysug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=fVGX7Ld3n5vw7pMKLsL5gDQFEVjttNzU1fFn8ebdV54=; b=E8DWDuHzOco/arideDz5wAh2yYt0qKAkbhJU08dCZ0mr+jtVx9fu93JFixhMaeD1f4 SXt++6vstT1WEvCF1s5M7s1qtDvHq7kxMgWgDiFO8b7sHY84bttlIhSKqiC/huOfVP2a fD+ApVLK9YfoIvqJUuI+MRqzcZhiMVux4rzMpi5t9x0QQWCWk05tUzWN0BpP5IQ0+qr7 d144cvY6e2svkaL6Wi50cvS4poukYcHldibOMThXVQDMyCWZuT6kKtTAnkhYBctdiz8B L0QR5ifLaZ1AGM0DMM8lq3qLIzT9qVYAnCYBNwkrUypFFnlp/Pa55lFsmTyj6nR4tcB3 EEgQ== X-Gm-Message-State: ALoCoQmHJGwv30yfrOn4lWPp3T1oBMx+kM1e1qTJglaPJllI9QcU5PL9xqxc9S5jHO0Xsk/PA0gG X-Received: by 10.182.214.40 with SMTP id nx8mr14787372obc.20.1449345510933; Sat, 05 Dec 2015 11:58:30 -0800 (PST) Received: from ?IPv6:2601:280:4900:3700:9562:9bd6:31bc:dd06? ([2601:280:4900:3700:9562:9bd6:31bc:dd06]) by smtp.gmail.com with ESMTPSA id qk2sm8331346oeb.7.2015.12.05.11.58.30 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 05 Dec 2015 11:58:30 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r291860 - in head/tools/tools/nanobsd: . embedded Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: multipart/signed; boundary="Apple-Mail=_BA75AE47-9276-420F-99E6-A3B149C44AF9"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5.2 From: Warner Losh In-Reply-To: <6A5C1B44-49E2-4E61-B915-B2424A96F574@gmail.com> Date: Sat, 5 Dec 2015 12:58:28 -0700 Cc: Benjamin Kaduk , Warner Losh , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: References: <201512051628.tB5GSEnr024370@repo.freebsd.org> <6A5C1B44-49E2-4E61-B915-B2424A96F574@gmail.com> To: Garrett Cooper X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 19:58:32 -0000 --Apple-Mail=_BA75AE47-9276-420F-99E6-A3B149C44AF9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Dec 5, 2015, at 11:09 AM, Garrett Cooper = wrote: >=20 >=20 > On Dec 5, 2015, at 09:26, Benjamin Kaduk wrote: >=20 > ... >=20 >> - [ ! -z "${NANO_NOPRIV_BUILD" ] && [ -z "${NANO_METALOG}"] && = \ >> + [ ! -z "${NANO_NOPRIV_BUILD}" ] && [ -z "${NANO_METALOG}"] && = \ >>=20 >> Hmm, is there still a missing space between '"' and ']' in the second = clause? >=20 > Yup. Still broken, but at least it won't die immediate due to a syntax = error like it would have before this commit. Fixed in a second commit. And more cleanup of setting variables like = this are coming thanks to some hints from elsewhere. Warner --Apple-Mail=_BA75AE47-9276-420F-99E6-A3B149C44AF9 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJWY0HlAAoJEGwc0Sh9sBEAwBkP/3Qwzbzf4UiZgZOmx14muMcd Jxa2z0QT+hT2wYxRe69SV/55B97CPfIy1R0Y6ZBcAkWgPUkHrk8UF6z4JdszaosM /zikBgeUtsnCH3lGpuX05NA+7Ha9PCUPCEj6mNTB0M4Q8+zcZFTots91xXuCmNHx sNtDexgx1QpFlHSBp3HUwsTz1rq6E7Q274o1OBRM7sL0FsSdApOceBE+dfJeDEn9 WNbMsnCejsg68vEzRwYfPd2PLJSw75KCtGbBd0BAPYLURoSdGVVabw4mEZuQO1aq 9QkHXg+yCVyuYYjlcJ2FScQpO3FpIk3MzZgaPiBsucGBHZXCsfVMDLW871Hi/KE9 d63HcuyHtGs6a4WreeXbcvcTCeVx+J/hcUoen8UKmlKkJCgDMvaKShaFrcNmYIRG R4mdvcwyio8Bq5lmxeeoc5P9aEMh8L8xetTdeyO5HCeeF8wfeERSDLeitnJbpii8 8WQwOL4WCuWXpKWpoO7MQIDc5IL/B2XRz7MrdE0zlz1zA9ciio9NpcU0idz5JnPl FTAbJ5FctHPKd4AY0JxGWQy3f7nTL202I7GVX4Xn6BHjtg7YNOpWWdjwnWrrI/NR /JrRuDW+AuEdtHbX+jESG+TjwD55wODRqm2YbjIWXwcoT2wqVrE5wn3un8qO+tSk cKrzs9Z05wRGIMg0jcfo =7hZl -----END PGP SIGNATURE----- --Apple-Mail=_BA75AE47-9276-420F-99E6-A3B149C44AF9-- From owner-svn-src-all@freebsd.org Sat Dec 5 20:25:16 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A6B3A41101; Sat, 5 Dec 2015 20:25:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 615081300; Sat, 5 Dec 2015 20:25:16 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5KPFUg093630; Sat, 5 Dec 2015 20:25:15 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5KPF11093629; Sat, 5 Dec 2015 20:25:15 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201512052025.tB5KPF11093629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 5 Dec 2015 20:25:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291866 - stable/10/gnu/usr.bin/cc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 20:25:16 -0000 Author: bdrewery Date: Sat Dec 5 20:25:15 2015 New Revision: 291866 URL: https://svnweb.freebsd.org/changeset/base/291866 Log: Add dependency for c++filt on libiberty. This is a direct commit since c++filt does not exist in head. This ws racing after my SUBDIR_PARALLEL changes here recently. Reported by: peter Sponsored by: EMC / Isilon Storage Division Modified: stable/10/gnu/usr.bin/cc/Makefile Modified: stable/10/gnu/usr.bin/cc/Makefile ============================================================================== --- stable/10/gnu/usr.bin/cc/Makefile Sat Dec 5 19:12:16 2015 (r291865) +++ stable/10/gnu/usr.bin/cc/Makefile Sat Dec 5 20:25:15 2015 (r291866) @@ -26,6 +26,7 @@ SUBDIR+= gcov .endif SUBDIR_DEPEND_c++:= libcpp libiberty +SUBDIR_DEPEND_c++filt= libiberty SUBDIR_DEPEND_cc= libcpp libiberty SUBDIR_DEPEND_cpp= libcpp libiberty SUBDIR_DEPEND_cc1plus= cc_int libcpp libdecnumber libiberty From owner-svn-src-all@freebsd.org Sat Dec 5 21:28:55 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF66EA401FE; Sat, 5 Dec 2015 21:28:55 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56B591EC4; Sat, 5 Dec 2015 21:28:55 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5LSsJY011763; Sat, 5 Dec 2015 21:28:54 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5LSsQB011762; Sat, 5 Dec 2015 21:28:54 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201512052128.tB5LSsQB011762@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 5 Dec 2015 21:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291867 - stable/10/sys/fs/nfsclient X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 21:28:55 -0000 Author: rmacklem Date: Sat Dec 5 21:28:54 2015 New Revision: 291867 URL: https://svnweb.freebsd.org/changeset/base/291867 Log: MFC: r291117 Revert r283330 since it broke directory caching in the client. At this time I cannot see a way to fix directory caching when it has partial blocks in the buffer cache, due to the fact that the syscall's uio_offset won't stay the same as the lblkno * NFS_DIRBLKSIZ offset. Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sat Dec 5 20:25:15 2015 (r291866) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sat Dec 5 21:28:54 2015 (r291867) @@ -3087,6 +3087,25 @@ nfsrpc_readdir(vnode_t vp, struct uio *u *eofp = eof; } + /* + * Add extra empty records to any remaining DIRBLKSIZ chunks. + */ + while (uio_uio_resid(uiop) > 0 && ((size_t)(uio_uio_resid(uiop))) != tresid) { + dp = (struct dirent *) CAST_DOWN(caddr_t, uio_iov_base(uiop)); + dp->d_type = DT_UNKNOWN; + dp->d_fileno = 0; + dp->d_namlen = 0; + dp->d_name[0] = '\0'; + tl = (u_int32_t *)&dp->d_name[4]; + *tl++ = cookie.lval[0]; + *tl = cookie.lval[1]; + dp->d_reclen = DIRBLKSIZ; + uio_iov_base_add(uiop, DIRBLKSIZ); + uio_iov_len_add(uiop, -(DIRBLKSIZ)); + uio_uio_resid_add(uiop, -(DIRBLKSIZ)); + uiop->uio_offset += DIRBLKSIZ; + } + nfsmout: if (nd->nd_mrep != NULL) mbuf_freem(nd->nd_mrep); @@ -3561,6 +3580,25 @@ nfsrpc_readdirplus(vnode_t vp, struct ui *eofp = eof; } + /* + * Add extra empty records to any remaining DIRBLKSIZ chunks. + */ + while (uio_uio_resid(uiop) > 0 && uio_uio_resid(uiop) != tresid) { + dp = (struct dirent *)uio_iov_base(uiop); + dp->d_type = DT_UNKNOWN; + dp->d_fileno = 0; + dp->d_namlen = 0; + dp->d_name[0] = '\0'; + tl = (u_int32_t *)&dp->d_name[4]; + *tl++ = cookie.lval[0]; + *tl = cookie.lval[1]; + dp->d_reclen = DIRBLKSIZ; + uio_iov_base_add(uiop, DIRBLKSIZ); + uio_iov_len_add(uiop, -(DIRBLKSIZ)); + uio_uio_resid_add(uiop, -(DIRBLKSIZ)); + uiop->uio_offset += DIRBLKSIZ; + } + nfsmout: if (nd->nd_mrep != NULL) mbuf_freem(nd->nd_mrep); From owner-svn-src-all@freebsd.org Sat Dec 5 21:38:05 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 873B8A40402; Sat, 5 Dec 2015 21:38:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61DB812AC; Sat, 5 Dec 2015 21:38:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5Lc4XG014567; Sat, 5 Dec 2015 21:38:04 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5Lc4x9014566; Sat, 5 Dec 2015 21:38:04 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201512052138.tB5Lc4x9014566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 5 Dec 2015 21:38:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291868 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 21:38:05 -0000 Author: mav Date: Sat Dec 5 21:38:04 2015 New Revision: 291868 URL: https://svnweb.freebsd.org/changeset/base/291868 Log: Rework WWNs generation to make cards without NVRAM more useful. Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Sat Dec 5 21:28:54 2015 (r291867) +++ head/sys/dev/isp/isp_freebsd.c Sat Dec 5 21:38:04 2015 (r291868) @@ -4550,91 +4550,52 @@ isp_uninit(ispsoftc_t *isp) ISP_DISABLE_INTS(isp); } -/* - * When we want to get the 'default' WWNs (when lacking NVRAM), we pick them - * up from our platform default (defww{p|n}n) and morph them based upon - * channel. - * - * When we want to get the 'active' WWNs, we get NVRAM WWNs and then morph them - * based upon channel. - */ - uint64_t isp_default_wwn(ispsoftc_t * isp, int chan, int isactive, int iswwnn) { uint64_t seed; struct isp_fc *fc = ISP_FC_PC(isp, chan); - /* - * If we're asking for a active WWN, the default overrides get - * returned, otherwise the NVRAM value is picked. - * - * If we're asking for a default WWN, we just pick the default override. - */ + /* First try to use explicitly configured WWNs. */ + seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; + if (seed) + return (seed); + + /* Otherwise try to use WWNs from NVRAM. */ if (isactive) { - seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; - if (seed) { - return (seed); - } - seed = iswwnn ? FCPARAM(isp, chan)->isp_wwnn_nvram : FCPARAM(isp, chan)->isp_wwpn_nvram; - if (seed) { + seed = iswwnn ? FCPARAM(isp, chan)->isp_wwnn_nvram : + FCPARAM(isp, chan)->isp_wwpn_nvram; + if (seed) return (seed); - } - return (0x400000007F000009ull); } - seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; - - /* - * For channel zero just return what we have. For either ACTIVE or - * DEFAULT cases, we depend on default override of NVRAM values for - * channel zero. - */ - if (chan == 0) { - return (seed); + /* If still no WWNs, try to steal them from the first channel. */ + if (chan > 0) { + seed = iswwnn ? ISP_FC_PC(isp, 0)->def_wwnn : + ISP_FC_PC(isp, 0)->def_wwpn; + if (seed == 0) { + seed = iswwnn ? FCPARAM(isp, 0)->isp_wwnn_nvram : + FCPARAM(isp, 0)->isp_wwpn_nvram; + } } - /* - * For other channels, we are doing one of three things: - * - * 1. If what we have now is non-zero, return it. Otherwise we morph - * values from channel 0. 2. If we're here for a WWPN we synthesize - * it if Channel 0's wwpn has a type 2 NAA. 3. If we're here for a - * WWNN we synthesize it if Channel 0's wwnn has a type 2 NAA. - */ - - if (seed) { - return (seed); + /* If still nothing -- improvise. */ + if (seed == 0) { + seed = 0x400000007F000000ull + device_get_unit(isp->isp_dev); + if (!iswwnn) + seed ^= 0x0100000000000000ULL; } - seed = iswwnn ? ISP_FC_PC(isp, 0)->def_wwnn : ISP_FC_PC(isp, 0)->def_wwpn; - if (seed == 0) - seed = iswwnn ? FCPARAM(isp, 0)->isp_wwnn_nvram : FCPARAM(isp, 0)->isp_wwpn_nvram; - if (((seed >> 60) & 0xf) == 2) { + /* For additional channels we have to improvise even more. */ + if (!iswwnn && chan > 0) { /* - * The type 2 NAA fields for QLogic cards appear be laid out - * thusly: - * - * bits 63..60 NAA == 2 bits 59..57 unused/zero bit 56 - * port (1) or node (0) WWN distinguishor bit 48 - * physical port on dual-port chips (23XX/24XX) - * - * This is somewhat nutty, particularly since bit 48 is - * irrelevant as they assign separate serial numbers to - * different physical ports anyway. - * * We'll stick our channel number plus one first into bits * 57..59 and thence into bits 52..55 which allows for 8 bits - * of channel which is comfortably more than our maximum - * (126) now. + * of channel which is enough for our maximum of 255 channels. */ - seed &= ~0x0FF0000000000000ULL; - if (iswwnn == 0) { - seed |= ((uint64_t) (chan + 1) & 0xf) << 56; - seed |= ((uint64_t) ((chan + 1) >> 4) & 0xf) << 52; - } - } else { - seed = 0; + seed ^= 0x0100000000000000ULL; + seed ^= ((uint64_t) (chan + 1) & 0xf) << 56; + seed ^= ((uint64_t) ((chan + 1) >> 4) & 0xf) << 52; } return (seed); } From owner-svn-src-all@freebsd.org Sat Dec 5 21:38:54 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E9059A40489; Sat, 5 Dec 2015 21:38:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9E7E145B; Sat, 5 Dec 2015 21:38:54 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5Lcr8T014640; Sat, 5 Dec 2015 21:38:53 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5LcrP7014635; Sat, 5 Dec 2015 21:38:53 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201512052138.tB5LcrP7014635@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 5 Dec 2015 21:38:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291869 - in stable/10/sys/fs: nfs nfsserver X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 21:38:55 -0000 Author: rmacklem Date: Sat Dec 5 21:38:53 2015 New Revision: 291869 URL: https://svnweb.freebsd.org/changeset/base/291869 Log: MFC: r291150 When the nfsd threads are terminated, the NFSv4 server state (opens, locks, etc) is retained, which I believe is correct behaviour. However, for NFSv4.1, the server also retained a reference to the xprt (RPC transport socket structure) for the backchannel. This caused svcpool_destroy() to not call SVC_DESTROY() for the xprt and allowed a socket upcall to occur after the mutexes in the svcpool were destroyed, causing a crash. This patch fixes the code so that the backchannel xprt structure is dereferenced just before svcpool_destroy() is called, so the code does do an SVC_DESTROY() on the xprt, which shuts down the socket upcall. Modified: stable/10/sys/fs/nfs/nfs_var.h stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfs/nfs_var.h ============================================================================== --- stable/10/sys/fs/nfs/nfs_var.h Sat Dec 5 21:38:04 2015 (r291868) +++ stable/10/sys/fs/nfs/nfs_var.h Sat Dec 5 21:38:53 2015 (r291869) @@ -135,6 +135,7 @@ int nfsrv_checksequence(struct nfsrv_des uint32_t *, int, uint32_t *, NFSPROC_T *); int nfsrv_checkreclaimcomplete(struct nfsrv_descript *); void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **); +void nfsrv_freeallbackchannel_xprts(void); /* nfs_nfsdserv.c */ int nfsrvd_access(struct nfsrv_descript *, int, Modified: stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c Sat Dec 5 21:38:04 2015 (r291868) +++ stable/10/sys/fs/nfsserver/nfs_nfsdkrpc.c Sat Dec 5 21:38:53 2015 (r291869) @@ -547,6 +547,7 @@ nfsrvd_init(int terminating) if (terminating) { nfsd_master_proc = NULL; NFSD_UNLOCK(); + nfsrv_freeallbackchannel_xprts(); svcpool_destroy(nfsrvd_pool); nfsrvd_pool = NULL; NFSD_LOCK(); Modified: stable/10/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Sat Dec 5 21:38:04 2015 (r291868) +++ stable/10/sys/fs/nfsserver/nfs_nfsdstate.c Sat Dec 5 21:38:53 2015 (r291869) @@ -4188,10 +4188,23 @@ nfsrv_docallback(struct nfsclient *clp, if (!error) { if ((nd->nd_flag & ND_NFSV41) != 0) { KASSERT(sep != NULL, ("sep NULL")); - error = newnfs_request(nd, NULL, clp, &clp->lc_req, - NULL, NULL, cred, clp->lc_program, - clp->lc_req.nr_vers, NULL, 1, NULL, - &sep->sess_cbsess); + if (sep->sess_cbsess.nfsess_xprt != NULL) + error = newnfs_request(nd, NULL, clp, + &clp->lc_req, NULL, NULL, cred, + clp->lc_program, clp->lc_req.nr_vers, NULL, + 1, NULL, &sep->sess_cbsess); + else { + /* + * This should probably never occur, but if a + * client somehow does an RPC without a + * SequenceID Op that causes a callback just + * after the nfsd threads have been terminated + * and restared we could conceivably get here + * without a backchannel xprt. + */ + printf("nfsrv_docallback: no xprt\n"); + error = ECONNREFUSED; + } nfsrv_freesession(sep, NULL); } else error = newnfs_request(nd, NULL, clp, &clp->lc_req, @@ -5776,14 +5789,16 @@ nfsrv_checksequence(struct nfsrv_descrip * If this session handles the backchannel, save the nd_xprt for this * RPC, since this is the one being used. */ - if (sep->sess_cbsess.nfsess_xprt != NULL && + if (sep->sess_clp->lc_req.nr_client != NULL && (sep->sess_crflags & NFSV4CRSESS_CONNBACKCHAN) != 0) { savxprt = sep->sess_cbsess.nfsess_xprt; SVC_ACQUIRE(nd->nd_xprt); - nd->nd_xprt->xp_p2 = savxprt->xp_p2; + nd->nd_xprt->xp_p2 = + sep->sess_clp->lc_req.nr_client->cl_private; nd->nd_xprt->xp_idletimeout = 0; /* Disable timeout. */ sep->sess_cbsess.nfsess_xprt = nd->nd_xprt; - SVC_RELEASE(savxprt); + if (savxprt != NULL) + SVC_RELEASE(savxprt); } *sflagsp = 0; @@ -6042,3 +6057,29 @@ nfsv4_getcbsession(struct nfsclient *clp return (0); } +/* + * Free up all backchannel xprts. This needs to be done when the nfsd threads + * exit, since those transports will all be going away. + * This is only called after all the nfsd threads are done performing RPCs, + * so locking shouldn't be an issue. + */ +APPLESTATIC void +nfsrv_freeallbackchannel_xprts(void) +{ + struct nfsdsession *sep; + struct nfsclient *clp; + SVCXPRT *xprt; + int i; + + for (i = 0; i < nfsrv_clienthashsize; i++) { + LIST_FOREACH(clp, &nfsclienthash[i], lc_hash) { + LIST_FOREACH(sep, &clp->lc_session, sess_list) { + xprt = sep->sess_cbsess.nfsess_xprt; + sep->sess_cbsess.nfsess_xprt = NULL; + if (xprt != NULL) + SVC_RELEASE(xprt); + } + } + } +} + From owner-svn-src-all@freebsd.org Sat Dec 5 21:49:37 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E0AEA407EC; Sat, 5 Dec 2015 21:49:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 402481B8F; Sat, 5 Dec 2015 21:49:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5Lna0o017704; Sat, 5 Dec 2015 21:49:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5LnZtE017695; Sat, 5 Dec 2015 21:49:35 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512052149.tB5LnZtE017695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 21:49:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291870 - in stable/10: contrib/netbsd-tests/lib/libc/c063 lib/libc/tests lib/libc/tests/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 21:49:37 -0000 Author: ngie Date: Sat Dec 5 21:49:35 2015 New Revision: 291870 URL: https://svnweb.freebsd.org/changeset/base/291870 Log: MFC r283801,r290846,r290851,r290856,r290860: r283801 (by araujo): Fix warning of implicit declaration of function 'mkdir'. Differential Revision: D2662 Reviewed by: rodrigc, ngie r290846: Bump WARNS to 2 Sponsored by: EMC / Isilon Storage Division r290851: Change WARNS to 2 across the board with all the libc testcases This effectively "reverts" r290846 Sponsored by: EMC / Isilon Storage Division r290856 (by bapt): also skip the definition of ':fopen_regular' to avoid the build to fail due to unused variables defined by ATF macros r290860 (by bapt): Remove unused variables to fix building world Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_openat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c stable/10/lib/libc/tests/Makefile.netbsd-tests stable/10/lib/libc/tests/stdio/fmemopen2_test.c stable/10/lib/libc/tests/stdio/getdelim_test.c stable/10/lib/libc/tests/stdio/perror_test.c stable/10/lib/libc/tests/stdio/scanfloat_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c Sat Dec 5 21:38:53 2015 (r291869) +++ stable/10/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c Sat Dec 5 21:49:35 2015 (r291870) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_faccessat.c,v 1.2 20 #include #include #include +#ifdef __FreeBSD__ +#include +#endif #define DIR "dir" #define FILE "dir/faccessat" Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_openat.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/c063/t_openat.c Sat Dec 5 21:38:53 2015 (r291869) +++ stable/10/contrib/netbsd-tests/lib/libc/c063/t_openat.c Sat Dec 5 21:49:35 2015 (r291870) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_openat.c,v 1.2 2013/ #include #include #include +#ifdef __FreeBSD__ +#include +#endif #define DIR "dir" #define FILE "dir/openat" Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c Sat Dec 5 21:38:53 2015 (r291869) +++ stable/10/contrib/netbsd-tests/lib/libc/c063/t_readlinkat.c Sat Dec 5 21:49:35 2015 (r291870) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_readlinkat.c,v 1.3 2 #include #include #include +#ifdef __FreeBSD__ +#include +#endif #define DIR "dir" #define FILE "dir/readlinkat" Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c Sat Dec 5 21:38:53 2015 (r291869) +++ stable/10/contrib/netbsd-tests/lib/libc/c063/t_unlinkat.c Sat Dec 5 21:49:35 2015 (r291870) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_unlinkat.c,v 1.2 201 #include #include #include +#ifdef __FreeBSD__ +#include +#endif #define DIR "dir" #define FILE "dir/unlinkat" Modified: stable/10/lib/libc/tests/Makefile.netbsd-tests ============================================================================== --- stable/10/lib/libc/tests/Makefile.netbsd-tests Sat Dec 5 21:38:53 2015 (r291869) +++ stable/10/lib/libc/tests/Makefile.netbsd-tests Sat Dec 5 21:49:35 2015 (r291870) @@ -4,4 +4,6 @@ OBJTOP?= ${.OBJDIR:H:H:H:H} SRCTOP?= ${.CURDIR:H:H:H:H} TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/lib/libc/${.CURDIR:T} +WARNS?= 2 + .include Modified: stable/10/lib/libc/tests/stdio/fmemopen2_test.c ============================================================================== --- stable/10/lib/libc/tests/stdio/fmemopen2_test.c Sat Dec 5 21:38:53 2015 (r291869) +++ stable/10/lib/libc/tests/stdio/fmemopen2_test.c Sat Dec 5 21:49:35 2015 (r291870) @@ -104,10 +104,9 @@ ATF_TC_WITHOUT_HEAD(test_autoalloc); ATF_TC_BODY(test_autoalloc, tc) { /* Let fmemopen allocate the buffer. */ - char str[] = "A quick test"; FILE *fp; long pos; - size_t nofw, nofr, i; + size_t nofw, i; int rc; /* Open a FILE * using fmemopen. */ Modified: stable/10/lib/libc/tests/stdio/getdelim_test.c ============================================================================== --- stable/10/lib/libc/tests/stdio/getdelim_test.c Sat Dec 5 21:38:53 2015 (r291869) +++ stable/10/lib/libc/tests/stdio/getdelim_test.c Sat Dec 5 21:49:35 2015 (r291870) @@ -113,7 +113,6 @@ ATF_TC_BODY(getline_basic, tc) ATF_TC_WITHOUT_HEAD(stream_error); ATF_TC_BODY(stream_error, tc) { - FILE *fp; char *line; size_t linecap; Modified: stable/10/lib/libc/tests/stdio/perror_test.c ============================================================================== --- stable/10/lib/libc/tests/stdio/perror_test.c Sat Dec 5 21:38:53 2015 (r291869) +++ stable/10/lib/libc/tests/stdio/perror_test.c Sat Dec 5 21:49:35 2015 (r291870) @@ -48,7 +48,7 @@ static char tmpfil[PATH_MAX]; ATF_TC_WITHOUT_HEAD(perror_test); ATF_TC_BODY(perror_test, tc) { - char buf[512], lbuf[512]; + char lbuf[512]; int i; char *s; Modified: stable/10/lib/libc/tests/stdio/scanfloat_test.c ============================================================================== --- stable/10/lib/libc/tests/stdio/scanfloat_test.c Sat Dec 5 21:38:53 2015 (r291869) +++ stable/10/lib/libc/tests/stdio/scanfloat_test.c Sat Dec 5 21:49:35 2015 (r291870) @@ -58,7 +58,6 @@ ATF_TC_BODY(normalized_numbers, tc) long double ld = 0.0; double d = 0.0; float f = 0.0; - char *endp; buf[0] = '\0'; ATF_REQUIRE(setlocale(LC_NUMERIC, "")); @@ -157,7 +156,6 @@ ATF_TC_BODY(infinities_and_nans, tc) long double ld = 0.0; double d = 0.0; float f = 0.0; - char *endp; ATF_REQUIRE(setlocale(LC_NUMERIC, "C")); @@ -205,11 +203,8 @@ ATF_TC_BODY(infinities_and_nans, tc) ATF_TC_WITHOUT_HEAD(rounding_tests); ATF_TC_BODY(rounding_tests, tc) { - char buf[128]; long double ld = 0.0; double d = 0.0; - float f = 0.0; - char *endp; ATF_REQUIRE(setlocale(LC_NUMERIC, "C")); @@ -287,10 +282,6 @@ ATF_TC_BODY(rounding_tests, tc) ATF_TC_WITHOUT_HEAD(strtod); ATF_TC_BODY(strtod, tc) { - char buf[128]; - long double ld = 0.0; - double d = 0.0; - float f = 0.0; char *endp; ATF_REQUIRE(setlocale(LC_NUMERIC, "C")); From owner-svn-src-all@freebsd.org Sat Dec 5 21:58:22 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDE8DA40A0D; Sat, 5 Dec 2015 21:58:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC9FE1F4C; Sat, 5 Dec 2015 21:58:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5LwLRX020599; Sat, 5 Dec 2015 21:58:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5LwL3s020598; Sat, 5 Dec 2015 21:58:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512052158.tB5LwL3s020598@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 21:58:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291871 - stable/10/lib/libc/locale X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 21:58:23 -0000 Author: ngie Date: Sat Dec 5 21:58:21 2015 New Revision: 291871 URL: https://svnweb.freebsd.org/changeset/base/291871 Log: MFC r291296: Link localeconv(3) to localeconv_l(3) Modified: stable/10/lib/libc/locale/Makefile.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/locale/Makefile.inc ============================================================================== --- stable/10/lib/libc/locale/Makefile.inc Sat Dec 5 21:49:35 2015 (r291870) +++ stable/10/lib/libc/locale/Makefile.inc Sat Dec 5 21:58:21 2015 (r291871) @@ -78,6 +78,7 @@ MLINKS+=iswalnum_l.3 iswalpha_l.3 iswaln iswalnum_l.3 iswspecial_l.3 iswalnum_l.3 nextwctype_l.3 \ iswalnum_l.3 towctrans_l.3 iswalnum_l.3 wctrans_l.3 MLINKS+=isxdigit.3 ishexnumber.3 +MLINKS+=localeconv.3 localeconv_l.3 MLINKS+=mbrtowc.3 mbrtoc16.3 mbrtowc.3 mbrtoc32.3 MLINKS+=mbsrtowcs.3 mbsnrtowcs.3 MLINKS+=wcrtomb.3 c16rtomb.3 wcrtomb.3 c32rtomb.3 From owner-svn-src-all@freebsd.org Sat Dec 5 22:07:03 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87BAEA40BF2; Sat, 5 Dec 2015 22:07:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A072132B; Sat, 5 Dec 2015 22:07:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5M72tG023529; Sat, 5 Dec 2015 22:07:02 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5M72QF023528; Sat, 5 Dec 2015 22:07:02 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201512052207.tB5M72QF023528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 5 Dec 2015 22:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291872 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 22:07:03 -0000 Author: mav Date: Sat Dec 5 22:07:02 2015 New Revision: 291872 URL: https://svnweb.freebsd.org/changeset/base/291872 Log: There is no priority request queue on 16Gig chips. Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sat Dec 5 21:58:21 2015 (r291871) +++ head/sys/dev/isp/isp.c Sat Dec 5 22:07:02 2015 (r291872) @@ -658,8 +658,10 @@ isp_reset(ispsoftc_t *isp, int do_load_d ISP_WRITE(isp, isp->isp_respinrp, 0); ISP_WRITE(isp, isp->isp_respoutrp, 0); if (IS_24XX(isp)) { - ISP_WRITE(isp, BIU2400_PRI_REQINP, 0); - ISP_WRITE(isp, BIU2400_PRI_REQOUTP, 0); + if (!IS_26XX(isp)) { + ISP_WRITE(isp, BIU2400_PRI_REQINP, 0); + ISP_WRITE(isp, BIU2400_PRI_REQOUTP, 0); + } ISP_WRITE(isp, BIU2400_ATIO_RSPINP, 0); ISP_WRITE(isp, BIU2400_ATIO_RSPOUTP, 0); } From owner-svn-src-all@freebsd.org Sat Dec 5 22:44:08 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88E1AA422C4; Sat, 5 Dec 2015 22:44:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DA2C1015; Sat, 5 Dec 2015 22:44:08 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5Mi76Z034953; Sat, 5 Dec 2015 22:44:07 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5Mi75j034951; Sat, 5 Dec 2015 22:44:07 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512052244.tB5Mi75j034951@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 22:44:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291873 - in stable/10: contrib/netbsd-tests/lib/libcrypt lib/libcrypt/tests X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 22:44:08 -0000 Author: ngie Date: Sat Dec 5 22:44:07 2015 New Revision: 291873 URL: https://svnweb.freebsd.org/changeset/base/291873 Log: MFC r290908,r291615: r290908: Integrate contrib/netbsd-tests/lib/libcrypt/t_crypt.c in to the FreeBSD test suite as lib/libcrypt/crypt_test Sponsored by: EMC / Isilon Storage Division r291615 (by rodrigc): Hack test so that it works on FreeBSD. Modified: stable/10/contrib/netbsd-tests/lib/libcrypt/t_crypt.c stable/10/lib/libcrypt/tests/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libcrypt/t_crypt.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libcrypt/t_crypt.c Sat Dec 5 22:07:02 2015 (r291872) +++ stable/10/contrib/netbsd-tests/lib/libcrypt/t_crypt.c Sat Dec 5 22:44:07 2015 (r291873) @@ -124,11 +124,13 @@ ATF_TC_HEAD(crypt_salts, tc) ATF_TC_BODY(crypt_salts, tc) { for (size_t i = 0; tests[i].hash; i++) { + char *hash = crypt(tests[i].pw, tests[i].hash); #if defined(__FreeBSD__) - if (22 <= i) + if (i >= 22 && i != 24 && i != 25) atf_tc_expect_fail("Old-style/bad inputs fail on FreeBSD"); + else + atf_tc_expect_pass(); #endif - char *hash = crypt(tests[i].pw, tests[i].hash); if (!hash) { ATF_CHECK_MSG(0, "Test %zu NULL\n", i); continue; Modified: stable/10/lib/libcrypt/tests/Makefile ============================================================================== --- stable/10/lib/libcrypt/tests/Makefile Sat Dec 5 22:07:02 2015 (r291872) +++ stable/10/lib/libcrypt/tests/Makefile Sat Dec 5 22:44:07 2015 (r291873) @@ -1,13 +1,17 @@ # $FreeBSD$ -# exercise libcrypt +SRCTOP= ${.CURDIR:H:H:H} +OBJTOP= ${.OBJDIR:H:H:H} +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libcrypt TESTSDIR= ${TESTSBASE}/lib/libcrypt -ATF_TESTS_C= crypt_tests +NETBSD_ATF_TESTS_C+= crypt_test CFLAGS+= -I${.CURDIR:H} DPADD+= ${LIBCRYPT} LDADD+= -lcrypt +.include + .include From owner-svn-src-all@freebsd.org Sat Dec 5 22:51:21 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64BF1A4234E; Sat, 5 Dec 2015 22:51:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31C6B12A3; Sat, 5 Dec 2015 22:51:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5MpKg5035251; Sat, 5 Dec 2015 22:51:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5MpKSd035250; Sat, 5 Dec 2015 22:51:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512052251.tB5MpKSd035250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 22:51:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r291874 - stable/10/rescue/rescue X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 22:51:21 -0000 Author: ngie Date: Sat Dec 5 22:51:20 2015 New Revision: 291874 URL: https://svnweb.freebsd.org/changeset/base/291874 Log: MFC r289452,r289469: r289452 (by trasz): Add iscsictl(8) and iscsid(8) to rescue(8). The point is to make it easier to build md_root images from rescue(8), to use with iSCSI boot. The change increases the size of rescue by 62kB, from 8728kB to 8790kB. Reviewed by: bapt@ Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3865 r289469: Make iscsictl and iscsid build if MK_ISCSI == yes Modified: stable/10/rescue/rescue/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/rescue/rescue/Makefile ============================================================================== --- stable/10/rescue/rescue/Makefile Sat Dec 5 22:44:07 2015 (r291873) +++ stable/10/rescue/rescue/Makefile Sat Dec 5 22:51:20 2015 (r291874) @@ -224,5 +224,10 @@ CRUNCH_ALIAS_chown= chgrp ################################################################## CRUNCH_LIBS+= -lm +.if ${MK_ISCSI} != "no" +CRUNCH_PROGS_usr.bin+= iscsictl +CRUNCH_PROGS_usr.sbin+= iscsid +.endif + .include .include From owner-svn-src-all@freebsd.org Sat Dec 5 22:57:01 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28F68A425BF; Sat, 5 Dec 2015 22:57:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8B5517A9; Sat, 5 Dec 2015 22:57:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5Mux0B038038; Sat, 5 Dec 2015 22:56:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5MuvTE038017; Sat, 5 Dec 2015 22:56:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512052256.tB5MuvTE038017@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 22:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291875 - in stable/9: include include/xlocale lib/libc/locale sys/sys tools/regression/lib/libc/locale X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 22:57:01 -0000 Author: ngie Date: Sat Dec 5 22:56:57 2015 New Revision: 291875 URL: https://svnweb.freebsd.org/changeset/base/291875 Log: MFstable/10 r250883,r251314: r250883 (by ed): Add . The header, part of C11, adds a small number of utility functions for 16/32-bit "universal" characters, which may or may not be UTF-16/32. As our wchar_t is already ISO 10646, simply add light-weight wrappers around wcrtomb() and mbrtowc(). While there, also add (non-yet-standard) _l functions, similar to the ones we already have for the other locale-dependent functions. Reviewed by: theraven r251314 (by ed): Add libiconv based versions of *c16*() and *c32*(). I initially thought wchar_t was locale independent, but this seems to be only the case on Linux. This means that we cannot depend on the *wc*() routines to implement *c16*() and *c32*(). Instead, use the Citrus libiconv that is part of libc. I'll see if there is anything I can do to make the existing functions somewhat useful in case the system is built without libiconv in the nearby future. If not, I'll simply remove the broken implementations. Reviewed by: jilles, gabor Added: stable/9/include/uchar.h - copied unchanged from r250883, head/include/uchar.h stable/9/include/xlocale/_uchar.h - copied unchanged from r250883, head/include/xlocale/_uchar.h stable/9/lib/libc/locale/c16rtomb.c - copied unchanged from r250883, head/lib/libc/locale/c16rtomb.c stable/9/lib/libc/locale/c16rtomb_iconv.c - copied unchanged from r251314, head/lib/libc/locale/c16rtomb_iconv.c stable/9/lib/libc/locale/c32rtomb.c - copied unchanged from r250883, head/lib/libc/locale/c32rtomb.c stable/9/lib/libc/locale/c32rtomb_iconv.c - copied unchanged from r251314, head/lib/libc/locale/c32rtomb_iconv.c stable/9/lib/libc/locale/cXXrtomb_iconv.h - copied unchanged from r251314, head/lib/libc/locale/cXXrtomb_iconv.h stable/9/lib/libc/locale/mbrtoc16.c - copied unchanged from r250883, head/lib/libc/locale/mbrtoc16.c stable/9/lib/libc/locale/mbrtoc16_iconv.c - copied unchanged from r251314, head/lib/libc/locale/mbrtoc16_iconv.c stable/9/lib/libc/locale/mbrtoc32.c - copied unchanged from r250883, head/lib/libc/locale/mbrtoc32.c stable/9/lib/libc/locale/mbrtoc32_iconv.c - copied unchanged from r251314, head/lib/libc/locale/mbrtoc32_iconv.c stable/9/lib/libc/locale/mbrtocXX_iconv.h - copied unchanged from r251314, head/lib/libc/locale/mbrtocXX_iconv.h stable/9/tools/regression/lib/libc/locale/test-c16rtomb.c - copied, changed from r250883, head/tools/regression/lib/libc/locale/test-c16rtomb.c stable/9/tools/regression/lib/libc/locale/test-mbrtoc16.c - copied, changed from r250883, head/tools/regression/lib/libc/locale/test-mbrtoc16.c Modified: stable/9/include/Makefile stable/9/include/stdatomic.h stable/9/include/xlocale/Makefile stable/9/lib/libc/locale/Makefile.inc stable/9/lib/libc/locale/Symbol.map stable/9/lib/libc/locale/mbrtowc.3 stable/9/lib/libc/locale/wcrtomb.3 stable/9/lib/libc/locale/xlocale_private.h stable/9/sys/sys/_types.h stable/9/tools/regression/lib/libc/locale/Makefile Directory Properties: stable/9/ (props changed) stable/9/include/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) stable/9/tools/regression/lib/libc/ (props changed) Modified: stable/9/include/Makefile ============================================================================== --- stable/9/include/Makefile Sat Dec 5 22:51:20 2015 (r291874) +++ stable/9/include/Makefile Sat Dec 5 22:56:57 2015 (r291875) @@ -23,7 +23,7 @@ INCS= a.out.h ar.h assert.h bitstring.h stdnoreturn.h stdio.h stdlib.h string.h stringlist.h \ strings.h sysexits.h tar.h termios.h tgmath.h \ time.h timeconv.h timers.h ttyent.h \ - ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h \ + uchar.h ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h \ wchar.h wctype.h wordexp.h xlocale.h .PATH: ${.CURDIR}/../contrib/libc-vis Modified: stable/9/include/stdatomic.h ============================================================================== --- stable/9/include/stdatomic.h Sat Dec 5 22:51:20 2015 (r291874) +++ stable/9/include/stdatomic.h Sat Dec 5 22:56:57 2015 (r291875) @@ -145,10 +145,8 @@ typedef _Atomic(long) atomic_long; typedef _Atomic(unsigned long) atomic_ulong; typedef _Atomic(long long) atomic_llong; typedef _Atomic(unsigned long long) atomic_ullong; -#if 0 typedef _Atomic(__char16_t) atomic_char16_t; typedef _Atomic(__char32_t) atomic_char32_t; -#endif typedef _Atomic(___wchar_t) atomic_wchar_t; typedef _Atomic(__int_least8_t) atomic_int_least8_t; typedef _Atomic(__uint_least8_t) atomic_uint_least8_t; Copied: stable/9/include/uchar.h (from r250883, head/include/uchar.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/include/uchar.h Sat Dec 5 22:56:57 2015 (r291875, copy of r250883, head/include/uchar.h) @@ -0,0 +1,60 @@ +/*- + * Copyright (c) 2013 Ed Schouten + * 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$ + */ + +#ifndef _UCHAR_H_ +#define _UCHAR_H_ + +#include +#include + +#ifndef _MBSTATE_T_DECLARED +typedef __mbstate_t mbstate_t; +#define _MBSTATE_T_DECLARED +#endif + +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + +typedef __char16_t char16_t; +typedef __char32_t char32_t; + +__BEGIN_DECLS +size_t c16rtomb(char * __restrict, char16_t, mbstate_t * __restrict); +size_t c32rtomb(char * __restrict, char32_t, mbstate_t * __restrict); +size_t mbrtoc16(char16_t * __restrict, const char * __restrict, size_t, + mbstate_t * __restrict); +size_t mbrtoc32(char32_t * __restrict, const char * __restrict, size_t, + mbstate_t * __restrict); +#if __BSD_VISIBLE || defined(_XLOCALE_H_) +#include +#endif +__END_DECLS + +#endif /* !_UCHAR_H_ */ Modified: stable/9/include/xlocale/Makefile ============================================================================== --- stable/9/include/xlocale/Makefile Sat Dec 5 22:51:20 2015 (r291874) +++ stable/9/include/xlocale/Makefile Sat Dec 5 22:56:57 2015 (r291875) @@ -2,7 +2,7 @@ NO_OBJ= INCS= _ctype.h _inttypes.h _langinfo.h _locale.h _monetary.h _stdio.h\ - _stdlib.h _string.h _time.h _wchar.h + _stdlib.h _string.h _time.h _uchar.h _wchar.h INCSDIR=${INCLUDEDIR}/xlocale .include Copied: stable/9/include/xlocale/_uchar.h (from r250883, head/include/xlocale/_uchar.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/include/xlocale/_uchar.h Sat Dec 5 22:56:57 2015 (r291875, copy of r250883, head/include/xlocale/_uchar.h) @@ -0,0 +1,46 @@ +/*- + * Copyright (c) 2013 Ed Schouten + * 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$ + */ + +#ifndef _LOCALE_T_DEFINED +#define _LOCALE_T_DEFINED +typedef struct _xlocale *locale_t; +#endif + +#ifndef _XLOCALE_UCHAR_H_ +#define _XLOCALE_UCHAR_H_ + +size_t c16rtomb_l(char * __restrict, char16_t, mbstate_t * __restrict, + locale_t); +size_t c32rtomb_l(char * __restrict, char32_t, mbstate_t * __restrict, + locale_t); +size_t mbrtoc16_l(char16_t * __restrict, const char * __restrict, size_t, + mbstate_t * __restrict, locale_t); +size_t mbrtoc32_l(char32_t * __restrict, const char * __restrict, size_t, + mbstate_t * __restrict, locale_t); + +#endif /* _XLOCALE_UCHAR_H_ */ Modified: stable/9/lib/libc/locale/Makefile.inc ============================================================================== --- stable/9/lib/libc/locale/Makefile.inc Sat Dec 5 22:51:20 2015 (r291874) +++ stable/9/lib/libc/locale/Makefile.inc Sat Dec 5 22:56:57 2015 (r291875) @@ -23,6 +23,12 @@ SRCS+= ascii.c big5.c btowc.c collate.c wcwidth.c\ xlocale.c +.if ${MK_ICONV} != "no" +SRCS+= c16rtomb_iconv.c c32rtomb_iconv.c mbrtoc16_iconv.c mbrtoc32_iconv.c +.else +SRCS+= c16rtomb.c c32rtomb.c mbrtoc16.c mbrtoc32.c +.endif + SYM_MAPS+=${.CURDIR}/locale/Symbol.map MAN+= btowc.3 \ @@ -72,7 +78,9 @@ MLINKS+=iswalnum_l.3 iswalpha_l.3 iswaln iswalnum_l.3 iswspecial_l.3 iswalnum_l.3 nextwctype_l.3 \ iswalnum_l.3 towctrans_l.3 iswalnum_l.3 wctrans_l.3 MLINKS+=isxdigit.3 ishexnumber.3 +MLINKS+=mbrtowc.3 mbrtoc16.3 mbrtowc.3 mbrtoc32.3 MLINKS+=mbsrtowcs.3 mbsnrtowcs.3 +MLINKS+=wcrtomb.3 c16rtomb.3 wcrtomb.3 c32rtomb.3 MLINKS+=wcsrtombs.3 wcsnrtombs.3 MLINKS+=wcstod.3 wcstof.3 wcstod.3 wcstold.3 MLINKS+=wcstol.3 wcstoul.3 wcstol.3 wcstoll.3 wcstol.3 wcstoull.3 \ Modified: stable/9/lib/libc/locale/Symbol.map ============================================================================== --- stable/9/lib/libc/locale/Symbol.map Sat Dec 5 22:51:20 2015 (r291874) +++ stable/9/lib/libc/locale/Symbol.map Sat Dec 5 22:56:57 2015 (r291875) @@ -199,6 +199,14 @@ FBSD_1.3 { __istype_l; __runes_for_locale; _ThreadRuneLocale; + c16rtomb; + c16rtomb_l; + c32rtomb; + c32rtomb_l; + mbrtoc16; + mbrtoc16_l; + mbrtoc32; + mbrtoc32_l; }; FBSDprivate_1.0 { Copied: stable/9/lib/libc/locale/c16rtomb.c (from r250883, head/lib/libc/locale/c16rtomb.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/locale/c16rtomb.c Sat Dec 5 22:56:57 2015 (r291875, copy of r250883, head/lib/libc/locale/c16rtomb.c) @@ -0,0 +1,81 @@ +/*- + * Copyright (c) 2013 Ed Schouten + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include "xlocale_private.h" + +typedef struct { + char16_t lead_surrogate; + mbstate_t c32_mbstate; +} _Char16State; + +size_t +c16rtomb_l(char * __restrict s, char16_t c16, mbstate_t * __restrict ps, + locale_t locale) +{ + _Char16State *cs; + char32_t c32; + + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->c16rtomb; + cs = (_Char16State *)ps; + + /* If s is a null pointer, the value of parameter c16 is ignored. */ + if (s == NULL) { + c32 = 0; + } else if (cs->lead_surrogate >= 0xd800 && + cs->lead_surrogate <= 0xdbff) { + /* We should see a trail surrogate now. */ + if (c16 < 0xdc00 || c16 > 0xdfff) { + errno = EILSEQ; + return ((size_t)-1); + } + c32 = 0x10000 + ((cs->lead_surrogate & 0x3ff) << 10 | + (c16 & 0x3ff)); + } else if (c16 >= 0xd800 && c16 <= 0xdbff) { + /* Store lead surrogate for next invocation. */ + cs->lead_surrogate = c16; + return (0); + } else { + /* Regular character. */ + c32 = c16; + } + cs->lead_surrogate = 0; + + return (c32rtomb_l(s, c32, &cs->c32_mbstate, locale)); +} + +size_t +c16rtomb(char * __restrict s, char16_t c16, mbstate_t * __restrict ps) +{ + + return (c16rtomb_l(s, c16, ps, __get_locale())); +} Copied: stable/9/lib/libc/locale/c16rtomb_iconv.c (from r251314, head/lib/libc/locale/c16rtomb_iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/locale/c16rtomb_iconv.c Sat Dec 5 22:56:57 2015 (r291875, copy of r251314, head/lib/libc/locale/c16rtomb_iconv.c) @@ -0,0 +1,8 @@ +/* $FreeBSD$ */ +#define charXX_t char16_t +#define cXXrtomb c16rtomb +#define cXXrtomb_l c16rtomb_l +#define SRCBUF_LEN 2 +#define UTF_XX_INTERNAL "UTF-16-INTERNAL" + +#include "cXXrtomb_iconv.h" Copied: stable/9/lib/libc/locale/c32rtomb.c (from r250883, head/lib/libc/locale/c32rtomb.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/locale/c32rtomb.c Sat Dec 5 22:56:57 2015 (r291875, copy of r250883, head/lib/libc/locale/c32rtomb.c) @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 2013 Ed Schouten + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include "xlocale_private.h" + +size_t +c32rtomb_l(char * __restrict s, char32_t c32, mbstate_t * __restrict ps, + locale_t locale) +{ + + /* Unicode Standard 5.0, D90: ill-formed characters. */ + if ((c32 >= 0xd800 && c32 <= 0xdfff) || c32 > 0x10ffff) { + errno = EILSEQ; + return ((size_t)-1); + } + + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->c32rtomb; + + /* Assume wchar_t uses UTF-32. */ + return (wcrtomb_l(s, c32, ps, locale)); +} + +size_t +c32rtomb(char * __restrict s, char32_t c32, mbstate_t * __restrict ps) +{ + + return (c32rtomb_l(s, c32, ps, __get_locale())); +} Copied: stable/9/lib/libc/locale/c32rtomb_iconv.c (from r251314, head/lib/libc/locale/c32rtomb_iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/locale/c32rtomb_iconv.c Sat Dec 5 22:56:57 2015 (r291875, copy of r251314, head/lib/libc/locale/c32rtomb_iconv.c) @@ -0,0 +1,8 @@ +/* $FreeBSD$ */ +#define charXX_t char32_t +#define cXXrtomb c32rtomb +#define cXXrtomb_l c32rtomb_l +#define SRCBUF_LEN 1 +#define UTF_XX_INTERNAL "UTF-32-INTERNAL" + +#include "cXXrtomb_iconv.h" Copied: stable/9/lib/libc/locale/cXXrtomb_iconv.h (from r251314, head/lib/libc/locale/cXXrtomb_iconv.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/locale/cXXrtomb_iconv.h Sat Dec 5 22:56:57 2015 (r291875, copy of r251314, head/lib/libc/locale/cXXrtomb_iconv.h) @@ -0,0 +1,115 @@ +/*- + * Copyright (c) 2013 Ed Schouten + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include +#include +#include + +#include "../iconv/citrus_hash.h" +#include "../iconv/citrus_module.h" +#include "../iconv/citrus_iconv.h" +#include "xlocale_private.h" + +typedef struct { + bool initialized; + struct _citrus_iconv iconv; + union { + charXX_t widechar[SRCBUF_LEN]; + char bytes[sizeof(charXX_t) * SRCBUF_LEN]; + } srcbuf; + size_t srcbuf_len; +} _ConversionState; +_Static_assert(sizeof(_ConversionState) <= sizeof(mbstate_t), + "Size of _ConversionState must not exceed mbstate_t's size."); + +size_t +cXXrtomb_l(char * __restrict s, charXX_t c, mbstate_t * __restrict ps, + locale_t locale) +{ + _ConversionState *cs; + struct _citrus_iconv *handle; + char *src, *dst; + size_t srcleft, dstleft, invlen; + int err; + + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->cXXrtomb; + cs = (_ConversionState *)ps; + handle = &cs->iconv; + + /* Reinitialize mbstate_t. */ + if (s == NULL || !cs->initialized) { + if (_citrus_iconv_open(&handle, UTF_XX_INTERNAL, + nl_langinfo_l(CODESET, locale)) != 0) { + cs->initialized = false; + errno = EINVAL; + return (-1); + } + handle->cv_shared->ci_discard_ilseq = true; + handle->cv_shared->ci_hooks = NULL; + cs->srcbuf_len = 0; + cs->initialized = true; + if (s == NULL) + return (1); + } + + assert(cs->srcbuf_len < sizeof(cs->srcbuf.widechar) / sizeof(charXX_t)); + cs->srcbuf.widechar[cs->srcbuf_len++] = c; + + /* Perform conversion. */ + src = cs->srcbuf.bytes; + srcleft = cs->srcbuf_len * sizeof(charXX_t); + dst = s; + dstleft = MB_CUR_MAX_L(locale); + err = _citrus_iconv_convert(handle, &src, &srcleft, &dst, &dstleft, + 0, &invlen); + + /* Character is part of a surrogate pair. We need more input. */ + if (err == EINVAL) + return (0); + cs->srcbuf_len = 0; + + /* Illegal sequence. */ + if (dst == s) { + errno = EILSEQ; + return ((size_t)-1); + } + return (dst - s); +} + +size_t +cXXrtomb(char * __restrict s, charXX_t c, mbstate_t * __restrict ps) +{ + + return (cXXrtomb_l(s, c, ps, __get_locale())); +} Copied: stable/9/lib/libc/locale/mbrtoc16.c (from r250883, head/lib/libc/locale/mbrtoc16.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/locale/mbrtoc16.c Sat Dec 5 22:56:57 2015 (r291875, copy of r250883, head/lib/libc/locale/mbrtoc16.c) @@ -0,0 +1,89 @@ +/*- + * Copyright (c) 2013 Ed Schouten + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include "xlocale_private.h" + +typedef struct { + char16_t trail_surrogate; + mbstate_t c32_mbstate; +} _Char16State; + +size_t +mbrtoc16_l(char16_t * __restrict pc16, const char * __restrict s, size_t n, + mbstate_t * __restrict ps, locale_t locale) +{ + _Char16State *cs; + char32_t c32; + ssize_t len; + + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->mbrtoc16; + cs = (_Char16State *)ps; + + /* + * Call straight into mbrtoc32_l() if we don't need to return a + * character value. According to the spec, if s is a null + * pointer, the value of parameter pc16 is also ignored. + */ + if (pc16 == NULL || s == NULL) { + cs->trail_surrogate = 0; + return (mbrtoc32_l(NULL, s, n, &cs->c32_mbstate, locale)); + } + + /* Return the trail surrogate from the previous invocation. */ + if (cs->trail_surrogate >= 0xdc00 && cs->trail_surrogate <= 0xdfff) { + *pc16 = cs->trail_surrogate; + cs->trail_surrogate = 0; + return ((size_t)-3); + } + + len = mbrtoc32_l(&c32, s, n, &cs->c32_mbstate, locale); + if (len >= 0) { + if (c32 < 0x10000) { + /* Fits in one UTF-16 character. */ + *pc16 = c32; + } else { + /* Split up in a surrogate pair. */ + c32 -= 0x10000; + *pc16 = 0xd800 | (c32 >> 10); + cs->trail_surrogate = 0xdc00 | (c32 & 0x3ff); + } + } + return (len); +} + +size_t +mbrtoc16(char16_t * __restrict pc16, const char * __restrict s, size_t n, + mbstate_t * __restrict ps) +{ + + return (mbrtoc16_l(pc16, s, n, ps, __get_locale())); +} Copied: stable/9/lib/libc/locale/mbrtoc16_iconv.c (from r251314, head/lib/libc/locale/mbrtoc16_iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/locale/mbrtoc16_iconv.c Sat Dec 5 22:56:57 2015 (r291875, copy of r251314, head/lib/libc/locale/mbrtoc16_iconv.c) @@ -0,0 +1,8 @@ +/* $FreeBSD$ */ +#define charXX_t char16_t +#define mbrtocXX mbrtoc16 +#define mbrtocXX_l mbrtoc16_l +#define DSTBUF_LEN 2 +#define UTF_XX_INTERNAL "UTF-16-INTERNAL" + +#include "mbrtocXX_iconv.h" Copied: stable/9/lib/libc/locale/mbrtoc32.c (from r250883, head/lib/libc/locale/mbrtoc32.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/locale/mbrtoc32.c Sat Dec 5 22:56:57 2015 (r291875, copy of r250883, head/lib/libc/locale/mbrtoc32.c) @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2013 Ed Schouten + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include "xlocale_private.h" + +size_t +mbrtoc32_l(char32_t * __restrict pc32, const char * __restrict s, size_t n, + mbstate_t * __restrict ps, locale_t locale) +{ + + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->mbrtoc32; + + /* Assume wchar_t uses UTF-32. */ + return (mbrtowc_l(pc32, s, n, ps, locale)); +} + +size_t +mbrtoc32(char32_t * __restrict pc32, const char * __restrict s, size_t n, + mbstate_t * __restrict ps) +{ + + return (mbrtoc32_l(pc32, s, n, ps, __get_locale())); +} Copied: stable/9/lib/libc/locale/mbrtoc32_iconv.c (from r251314, head/lib/libc/locale/mbrtoc32_iconv.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/locale/mbrtoc32_iconv.c Sat Dec 5 22:56:57 2015 (r291875, copy of r251314, head/lib/libc/locale/mbrtoc32_iconv.c) @@ -0,0 +1,8 @@ +/* $FreeBSD$ */ +#define charXX_t char32_t +#define mbrtocXX mbrtoc32 +#define mbrtocXX_l mbrtoc32_l +#define DSTBUF_LEN 1 +#define UTF_XX_INTERNAL "UTF-32-INTERNAL" + +#include "mbrtocXX_iconv.h" Copied: stable/9/lib/libc/locale/mbrtocXX_iconv.h (from r251314, head/lib/libc/locale/mbrtocXX_iconv.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/lib/libc/locale/mbrtocXX_iconv.h Sat Dec 5 22:56:57 2015 (r291875, copy of r251314, head/lib/libc/locale/mbrtocXX_iconv.h) @@ -0,0 +1,158 @@ +/*- + * Copyright (c) 2013 Ed Schouten + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include +#include +#include +#include +#include +#include + +#include "../iconv/citrus_hash.h" +#include "../iconv/citrus_module.h" +#include "../iconv/citrus_iconv.h" +#include "xlocale_private.h" + +typedef struct { + bool initialized; + struct _citrus_iconv iconv; + char srcbuf[MB_LEN_MAX]; + size_t srcbuf_len; + union { + charXX_t widechar[DSTBUF_LEN]; + char bytes[sizeof(charXX_t) * DSTBUF_LEN]; + } dstbuf; + size_t dstbuf_len; +} _ConversionState; +_Static_assert(sizeof(_ConversionState) <= sizeof(mbstate_t), + "Size of _ConversionState must not exceed mbstate_t's size."); + +size_t +mbrtocXX_l(charXX_t * __restrict pc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps, locale_t locale) +{ + _ConversionState *cs; + struct _citrus_iconv *handle; + size_t i, retval; + charXX_t retchar; + + FIX_LOCALE(locale); + if (ps == NULL) + ps = &locale->mbrtocXX; + cs = (_ConversionState *)ps; + handle = &cs->iconv; + + /* Reinitialize mbstate_t. */ + if (s == NULL || !cs->initialized) { + if (_citrus_iconv_open(&handle, + nl_langinfo_l(CODESET, locale), UTF_XX_INTERNAL) != 0) { + cs->initialized = false; + errno = EINVAL; + return (-1); + } + handle->cv_shared->ci_discard_ilseq = true; + handle->cv_shared->ci_hooks = NULL; + cs->srcbuf_len = cs->dstbuf_len = 0; + cs->initialized = true; + if (s == NULL) + return (0); + } + + /* See if we still have characters left from the previous invocation. */ + if (cs->dstbuf_len > 0) { + retval = (size_t)-3; + goto return_char; + } + + /* Fill up the read buffer as far as possible. */ + if (n > sizeof(cs->srcbuf) - cs->srcbuf_len) + n = sizeof(cs->srcbuf) - cs->srcbuf_len; + memcpy(cs->srcbuf + cs->srcbuf_len, s, n); + + /* Convert as few characters to the dst buffer as possible. */ + for (i = 0; ; i++) { + char *src, *dst; + size_t srcleft, dstleft, invlen; + int err; + + src = cs->srcbuf; + srcleft = cs->srcbuf_len + n; + dst = cs->dstbuf.bytes; + dstleft = i * sizeof(charXX_t); + assert(srcleft <= sizeof(cs->srcbuf) && + dstleft <= sizeof(cs->dstbuf.bytes)); + err = _citrus_iconv_convert(handle, &src, &srcleft, + &dst, &dstleft, 0, &invlen); + cs->dstbuf_len = (dst - cs->dstbuf.bytes) / sizeof(charXX_t); + + /* Got new character(s). Return the first. */ + if (cs->dstbuf_len > 0) { + assert(src - cs->srcbuf > cs->srcbuf_len); + retval = src - cs->srcbuf - cs->srcbuf_len; + cs->srcbuf_len = 0; + goto return_char; + } + + /* Increase dst buffer size, to obtain the surrogate pair. */ + if (err == E2BIG) + continue; + + /* Illegal sequence. */ + if (invlen > 0) { + cs->srcbuf_len = 0; + errno = EILSEQ; + return ((size_t)-1); + } + + /* Save unprocessed remainder for the next invocation. */ + memmove(cs->srcbuf, src, srcleft); + cs->srcbuf_len = srcleft; + return ((size_t)-2); + } + +return_char: + retchar = cs->dstbuf.widechar[0]; + memmove(&cs->dstbuf.widechar[0], &cs->dstbuf.widechar[1], + --cs->dstbuf_len * sizeof(charXX_t)); + if (pc != NULL) + *pc = retchar; + if (retchar == 0) + return (0); + return (retval); +} + +size_t +mbrtocXX(charXX_t * __restrict pc, const char * __restrict s, size_t n, + mbstate_t * __restrict ps) +{ + + return (mbrtocXX_l(pc, s, n, ps, __get_locale())); +} Modified: stable/9/lib/libc/locale/mbrtowc.3 ============================================================================== --- stable/9/lib/libc/locale/mbrtowc.3 Sat Dec 5 22:51:20 2015 (r291874) +++ stable/9/lib/libc/locale/mbrtowc.3 Sat Dec 5 22:56:57 2015 (r291875) @@ -24,11 +24,13 @@ .\" .\" $FreeBSD$ .\" -.Dd April 8, 2004 +.Dd May 21, 2013 .Dt MBRTOWC 3 .Os .Sh NAME -.Nm mbrtowc +.Nm mbrtowc , +.Nm mbrtoc16 , +.Nm mbrtoc32 .Nd "convert a character to a wide-character code (restartable)" .Sh LIBRARY .Lb libc @@ -36,35 +38,51 @@ .In wchar.h .Ft size_t .Fo mbrtowc -.Fa "wchar_t * restrict pwc" "const char * restrict s" "size_t n" +.Fa "wchar_t * restrict pc" "const char * restrict s" "size_t n" +.Fa "mbstate_t * restrict ps" +.Fc +.In uchar.h +.Ft size_t +.Fo mbrtoc16 +.Fa "char16_t * restrict pc" "const char * restrict s" "size_t n" +.Fa "mbstate_t * restrict ps" +.Fc +.Ft size_t +.Fo mbrtoc32 +.Fa "char32_t * restrict pc" "const char * restrict s" "size_t n" .Fa "mbstate_t * restrict ps" .Fc .Sh DESCRIPTION The -.Fn mbrtowc -function inspects at most +.Fn mbrtowc , +.Fn mbrtoc16 +and +.Fn mbrtoc32 +functions inspect at most .Fa n bytes pointed to by .Fa s to determine the number of bytes needed to complete the next multibyte character. If a character can be completed, and -.Fa pwc +.Fa pc is not .Dv NULL , the wide character which is represented by .Fa s is stored in the -.Vt wchar_t +.Vt wchar_t , +.Vt char16_t +or +.Vt char32_t it points to. .Pp If .Fa s is .Dv NULL , -.Fn mbrtowc -behaves as if -.Fa pwc +these functions behave as if +.Fa pc was .Dv NULL , .Fa s @@ -81,15 +99,24 @@ argument, is used to keep track of the shift state. If it is .Dv NULL , -.Fn mbrtowc -uses an internal, static +these functions use an internal, static .Vt mbstate_t object, which is initialized to the initial conversion state at program startup. +.Pp +As a single +.Vt char16_t +is not large enough to represent certain multibyte characters, the +.Fn mbrtoc16 +function may need to be invoked multiple times to convert a single +multibyte character sequence. .Sh RETURN VALUES The -.Fn mbrtowc -functions returns: +.Fn mbrtowc , +.Fn mbrtoc16 +and +.Fn mbrtoc32 +functions return: .Bl -tag -width indent .It 0 The next @@ -100,10 +127,13 @@ represent the null wide character .It >0 The next .Fa n -or fewer bytes -represent a valid character, -.Fn mbrtowc -returns the number of bytes used to complete the multibyte character. +or fewer bytes represent a valid character, these functions +return the number of bytes used to complete the multibyte character. +.It Po Vt size_t Pc Ns \-1 +An encoding error has occurred. +The next +.Fa n +or fewer bytes do not contribute to a valid multibyte character. .It Po Vt size_t Pc Ns \-2 The next .Fa n @@ -111,16 +141,23 @@ contribute to, but do not complete, a va and all .Fa n bytes have been processed. -.It Po Vt size_t Pc Ns \-1 -An encoding error has occurred. -The next -.Fa n -or fewer bytes do not contribute to a valid multibyte character. +.El +.Pp +The +.Fn mbrtoc16 +function also returns: +.Bl -tag -width indent +.It Po Vt size_t Pc Ns \-3 +The next character resulting from a previous call has been stored. +No bytes from the input have been consumed. .El .Sh ERRORS The -.Fn mbrtowc -function will fail if: +.Fn mbrtowc , +.Fn mbrtoc16 +and +.Fn mbrtoc32 +functions will fail if: .Bl -tag -width Er .It Bq Er EILSEQ An invalid multibyte sequence was detected. @@ -134,6 +171,9 @@ The conversion state is invalid. .Xr wcrtomb 3 .Sh STANDARDS The -.Fn mbrtowc -function conforms to -.St -isoC-99 . +.Fn mbrtowc , +.Fn mbrtoc16 +and +.Fn mbrtoc32 +functions conform to +.St -isoC-2011 . Modified: stable/9/lib/libc/locale/wcrtomb.3 ============================================================================== --- stable/9/lib/libc/locale/wcrtomb.3 Sat Dec 5 22:51:20 2015 (r291874) +++ stable/9/lib/libc/locale/wcrtomb.3 Sat Dec 5 22:56:57 2015 (r291875) @@ -24,24 +24,34 @@ .\" .\" $FreeBSD$ .\" -.Dd April 8, 2004 +.Dd May 21, 2013 .Dt WCRTOMB 3 .Os .Sh NAME -.Nm wcrtomb +.Nm wcrtomb , +.Nm c16rtomb , +.Nm c32rtomb .Nd "convert a wide-character code to a character (restartable)" .Sh LIBRARY .Lb libc .Sh SYNOPSIS .In wchar.h .Ft size_t -.Fn wcrtomb "char * restrict s" "wchar_t wc" "mbstate_t * restrict ps" +.Fn wcrtomb "char * restrict s" "wchar_t c" "mbstate_t * restrict ps" +.In uchar.h +.Ft size_t *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Dec 5 23:59:31 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 606E6A3F045; Sat, 5 Dec 2015 23:59:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 291F11DDE; Sat, 5 Dec 2015 23:59:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB5NxUJg059760; Sat, 5 Dec 2015 23:59:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB5NxUo5059759; Sat, 5 Dec 2015 23:59:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512052359.tB5NxUo5059759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 5 Dec 2015 23:59:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291876 - head/sys/boot/uboot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 23:59:31 -0000 Author: ngie Date: Sat Dec 5 23:59:30 2015 New Revision: 291876 URL: https://svnweb.freebsd.org/changeset/base/291876 Log: Remove stray unescaped `%` in `Booting from ...` informational message PR: 204944 MFC after: 1 week X-MFC with: r291164 Reported by: David Binderman Sponsored by: EMC / Isilon Storage Division Modified: head/sys/boot/uboot/common/main.c Modified: head/sys/boot/uboot/common/main.c ============================================================================== --- head/sys/boot/uboot/common/main.c Sat Dec 5 22:56:57 2015 (r291875) +++ head/sys/boot/uboot/common/main.c Sat Dec 5 23:59:30 2015 (r291876) @@ -488,7 +488,7 @@ main(void) ldev = uboot_fmtdev(&currdev); env_setenv("currdev", EV_VOLATILE, ldev, uboot_setcurrdev, env_nounset); env_setenv("loaddev", EV_VOLATILE, ldev, env_noset, env_nounset); - printf("Booting from %s %\n", ldev); + printf("Booting from %s\n", ldev); setenv("LINES", "24", 1); /* optional */ setenv("prompt", "loader>", 1);