From owner-svn-src-head@freebsd.org Sun Nov 29 05:08:25 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 05:34:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 05:38:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 05:42:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 05:42:51 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 05:47:54 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 05:49:50 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 06:14:52 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 06:16:27 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 06:40:11 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 07:16:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 11:28:05 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 11:30:18 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 11:37:26 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 12:01:37 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 12:09:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 12:21:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 12:23:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 12:33:57 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 13:14:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 14:27:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 16:28:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 17:35:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 18:14:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 21:01:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 21:42:27 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 22:37:50 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sun Nov 29 22:39:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 02:23:57 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 02:40:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 04:01:28 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 04:41:52 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 04:59:02 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 05:51:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 05:59:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 06:02:37 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 06:27:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 06:34:18 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 06:56:27 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 08:02:54 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 09:02:29 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 09:24:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 10:17:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 10:18:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 13:27:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 16:34:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 16:41:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 17:09:27 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 17:16:53 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 17:35:51 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 18:05:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 18:06:12 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 19:17:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 21:01:28 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 21:53:26 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 21:54:29 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 22:09:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 22:11:36 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 22:16:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 22:29:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 22:35:54 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 22:46:36 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 22:53:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 22:53:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Mon Nov 30 23:37:11 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 00:24:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 00:32:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 00:53:18 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 01:22:11 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 02:48:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 03:00:12 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 03:09:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 05:12:15 2015 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 05:18:53 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 05:18:57 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 05:19:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 05:19:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 05:22:12 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 05:23:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 06:22:29 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 06:23:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 06:11:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 06:29:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 05:29:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 05:59:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 06:06:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 06:09:24 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 06:24:28 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 07:52:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 09:06:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 09:52:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 10:13:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 11:17:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 11:24:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 12:27:37 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 12:37:05 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 13:20:22 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 14:02:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 14:16:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 14:55:26 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 15:26:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 15:29:52 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 15:32:38 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 15:38:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 15:50:36 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 15:54:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 15:55:21 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 15:56:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 16:04:52 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 16:08:39 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 16:13:45 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 16:14:35 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 16:16:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 16:17:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 16:26:46 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 16:31:08 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 16:31:30 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 16:42:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 17:00:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 17:01:28 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 17:31:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 17:38:53 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 17:49:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 17:52:12 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 18:09:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 18:22:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 19:00:45 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 19:18:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 19:20:39 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 19:37:26 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 19:58:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 20:25:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 20:50:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 20:56:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 21:19:18 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 21:22:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 21:25:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 22:03:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 22:05:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 22:19:18 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 22:20:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 22:39:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Tue Dec 1 22:50:33 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 00:01:11 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 00:08:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 00:17:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 00:49:40 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 00:49:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 00:49:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 00:49:51 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 00:54:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 01:17:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 01:23:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 01:24:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 01:47:28 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 01:49:24 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 01:50:24 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 02:11:39 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 02:47:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 04:18:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 05:03:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 05:23:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 05:31:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 05:35:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 05:36:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 08:17:33 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 14:21:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 14:22:59 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 14:24:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 16:29:38 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 18:27:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 20:22:52 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 20:30:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 20:45:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 20:54:22 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 21:13:54 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 22:01:38 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 22:35:26 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Wed Dec 2 22:44:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 00:02:02 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 00:07:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 00:08:51 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 00:10:59 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 02:04:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 05:27:40 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 07:13:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 07:22:54 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 07:25:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 07:28:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 07:42:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 08:06:12 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 08:50:34 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 09:37:22 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 10:17:02 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 10:33:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 10:59:11 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 11:14:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 11:24:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 11:34:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 11:45:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 12:17:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 12:21:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 12:51:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 13:29:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 14:17:30 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 14:21:57 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 14:32:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 14:38:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 14:56:18 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 15:19:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 15:41:12 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 15:49:16 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C8C7A405D9 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 7BA6C1037 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 15:53:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 16:12:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 16:24:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 16:54:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 16:57:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 16:57:46 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 17:02:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 17:03:35 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 17:14:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 17:21:11 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 17:22:47 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 17:22:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 18:40:59 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 254C8A40D12 for ; Thu, 3 Dec 2015 18:40:59 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk0-x231.google.com (mail-qk0-x231.google.com [IPv6:2607:f8b0:400d:c09::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 CA8241F98 for ; Thu, 3 Dec 2015 18:40:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qkao63 with SMTP id o63so33759130qka.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=GkgVPNMsLeGP2CJ5r6VxbGntqsgxZz/Et1u3MJXzGrXSJk/u2UQJge7koXR2nx+DWi pPYY6kPL3ATRU5TN0RMbIJ7Fzycjpk1La7yavsuRV0BQaB/YNI7WWXC5sdMz7ASVxbpM s9G/P4Rxe+BtN5b3xFOUvIQYSrGsHs/Fcny03TYIHPG5F68aPVxvww6YxD1+0sBdAYDQ 3YQMYihKUQtQcY7KuTilByWfgbM4LDZytEBGN/PQRdERom6FJ/KJ0yHMbsSEcw/J8kzu 5nW95JMcN6xYDYoqUv+R6jOIXc4x1f5eZZIf7oHsx5pMRH7asgzHfc+OjijSLxKmsoYf G88A== X-Gm-Message-State: ALoCoQlGuGAr5hdpuKSuYZBwruV2OGEDfxFDg7RsUzMa1ZaxridZ3XvTsxB053YFL59dsfHdZI1i 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 20:54:57 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 21:13:07 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 21:13:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 21:13:34 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 21:13:38 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 21:16:54 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 21:19:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 21:26:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 21:45:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 22:07:02 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 22:39:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 22:40:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Thu Dec 3 22:55:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 00:05:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 00:29:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 01:28:49 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:17:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:17:09 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:17:12 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:17:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:17:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:17:22 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:17:25 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:18:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:17:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:18:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:38:37 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:41:45 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:44:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:45:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 03:54:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 04:27:22 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 05:00:53 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 06:51:39 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 06:54:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 07:10:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 224CEA407A4 for ; Fri, 4 Dec 2015 07:10:56 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-211-152.reflexion.net [208.70.211.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD48C1190 for ; Fri, 4 Dec 2015 07:10:55 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 21210 invoked from network); 4 Dec 2015 07:10:56 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 4 Dec 2015 07:10:56 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v7.80.0) with SMTP; Fri, 04 Dec 2015 02:10:55 -0500 (EST) Received: (qmail 27575 invoked from network); 4 Dec 2015 07:10:55 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with SMTP; 4 Dec 2015 07:10:55 -0000 X-No-Relay: not in my network X-No-Relay: not in my network X-No-Relay: not in my network Received: from [192.168.1.8] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 126801C43BC; Thu, 3 Dec 2015 23:10:40 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: svn commit: r291739 - head/share/mk vs. /usr/src/lib/libc/tests/ssp for powerpc64/gcc builds Message-Id: <2361A90E-50F3-4411-88FE-DF15FA94B42D@dsl-only.net> Date: Thu, 3 Dec 2015 23:10:52 -0800 To: FreeBSD PowerPC ML , FreeBSD Toolchain , svn-src-head@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 07:10:56 -0000 The change to > Log: > Add assertion for when LIBADD should be used rather than = LDADD/DPADD. resulted in my self-hosted powerpc64 buildworld attempt getting: > --- cleandir_subdir_ssp --- > make[6]: "/usr/src/share/mk/src.libnames.mk" line 479: = /usr/src/lib/libc/tests/ssp: Invalid LIBADD used which may need to be = added to src.libnames.mk: > ssp via head/lib/libc/tests/ssp/Makefile having: > .elif ${COMPILER_TYPE} =3D=3D "gcc" > CFLAGS.h_raw+=3D --param ssp-buffer-size=3D1 > LIBADD+=3D ssp > .endif =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-svn-src-head@freebsd.org Fri Dec 4 07:54:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 07:54:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 07:54:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 07:54:21 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 07:55:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 08:49:29 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 09:02:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 10:34:59 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 12:43:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 13:00:36 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 13:32:01 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 13:40:11 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 15:53:49 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 16:32:11 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 16:32:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 17:23:21 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 17:49:46 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 17:51:18 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 17:57:49 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 18:01:33 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 18:05:49 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 18:20:26 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 18:20:56 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 18:34:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 19:00:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 19:01:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 19:10:41 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 19:46:50 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 20:03:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA830A41932 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 6AD951615 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 21:09:21 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 21:51:30 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 23:22:08 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 23:31:33 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Fri Dec 4 23:44:35 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 00:15:05 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 00:54:44 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 01:10:06 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 01:12:46 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 01:13:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 01:13:20 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 01:19:36 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 02:07:57 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 02:18:37 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 02:23:45 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 02:25:21 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 02:34:35 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 04:10:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 04:41:54 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 04:43:58 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 05:20:09 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 64D5DA4117C for ; Sat, 5 Dec 2015 05:20:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qg0-x22f.google.com (mail-qg0-x22f.google.com [IPv6:2607:f8b0:400d:c04::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 149781D98 for ; Sat, 5 Dec 2015 05:20:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by qgcc31 with SMTP id c31so106400928qgc.3 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=Y+TeH5/XHqmYYQkF7bXmAuoWn12hCEvI6BzhDDG/dSahwukiDPWohvNuojdF8A1yeb XmmqwqyI65nnjnMtL5jfVDBoQ2L9VO4ZQiIShZ4ID0Y4j9AZ68RaR9tcpiCnJwpa8u8B M5TqYGQk+GZdFTJ5Q1/T4Z8MPNlM9UfdTc/uUp/n3z/Q5GEb2pgIC/7o8pCUPe2QbE6x /1FANhF6ZYJY6NbCNiHgseNZxLp1Tgqh+3vRVS0GdiN3hkqNNSXt0YfiLbf0hh1/DOEB 8BHqfWVQC+UKTBA1GLuV8OWSAxtDHCBMklmYr49U4ifRhZaITcGt7UWc+QaBVr34wBGB Oyag== X-Gm-Message-State: ALoCoQkrYypVxPDsHwLXW40yNXCHJHy5Noq41oubucUy6jDK6W2ukHod1+bRDOZnBqt2DBptWepJ 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 07:04:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 08:10:33 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 08:21:46 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 08:24:55 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 08:26:18 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 08:34:53 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 08:46:42 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 08:52:38 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 09:32:38 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 09:50:39 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 10:00:02 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 10:10:19 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 12:40:44 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 12:53:14 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 12:55:36 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 15:08:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 15:09:21 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 16:28:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 17:01:39 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 17:06:34 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 17:11:15 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 17:17:00 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE738A42FF5 for ; Sat, 5 Dec 2015 17:16:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-oi0-x22b.google.com (mail-oi0-x22b.google.com [IPv6:2607:f8b0:4003:c06::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 A410115FD for ; Sat, 5 Dec 2015 17:16:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by oiww189 with SMTP id w189so81402362oiw.3 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=AcrUTQV4YJChio73MXtpbAsebMS5p7jux2ATu1FMn8eAeGDAmfESLh4GRprHXbtUPO Dp5AKj+E81hBNwWKIG4SVfgBfL+7XkcXfNidM5cGL+Cx/c5/GRaIwMPhC/rAaH+GeoJx 4Pk/qL4pw/WFYbs17xIKZJiKashjjnuyKHrMeIbzniTim1npK0mBcJUo0rYtWt6b4vs3 2A0079R3KwnPhdRm3TRaoMHe8tiykpsjqPVP2nrr+uzBYqT6hNFEAZ72xSrWqGaOtTe3 9aafFLYK3AeoQOaA25Cy6iCQoX8PBdELWiHMK9iwFjjnVtKKyaKDDyR1by3cV7H+Ipor FZUA== X-Gm-Message-State: ALoCoQkuG8BQHOhUKoVu5mw6B3qoZKDkp2WqSmJx8izjb1GRPq3hXAeG/52qaqoc+D/gn4NMcRw4 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 17:17:00 -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-head@freebsd.org Sat Dec 5 17:26:17 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 17:40:13 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 18:09:07 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 18:56:23 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 19:00:34 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 19:58:32 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37178A42C40 for ; Sat, 5 Dec 2015 19:58:32 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-x231.google.com (mail-ob0-x231.google.com [IPv6:2607:f8b0:4003:c01::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 DA95A190F for ; Sat, 5 Dec 2015 19:58:31 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: by obbnk6 with SMTP id nk6so93280047obb.2 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=hoS/YbhDRHK1u6r4qnFLh8maWNKjTr5mbaLmjc9erDaTCpk/aQanAr/6X79KVkiuMA LDFg1cG6CRSoiY9HrqoBv/enxzWZte/rB4npnOQodaaAXXoeta9Zrc611SA450L1kyVK cQ0ePdnTdZ1TRlIkDH1yiyhGNe3/TzwNt/vGcJ7YOCFm98tISov5K3W8Rt7Ca3sPxOwe vydwQ+ItvHIdNSBq0EH4bOfFAm346o1/R7xtW77k130jmkOGGCisktNDXb88zIazuKyc y7ogtaDGVhNE7TRQGcj54L+cTCHeO/RaMQXoAEvMaqd/znuhCpcuLBGmjH3vI9rreJoj TtXw== X-Gm-Message-State: ALoCoQmSFsyozusM+maUeZIWRjtMGmADk8Bq/96726/9XN5XI+9PTlERhKWd5Olf4jI7xYbSRF0u 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 21:38:05 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 22:07:03 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@freebsd.org Sat Dec 5 23:59:31 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org 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-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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);