svn commit: r278438 - head/sys/dev/drm2/radeon
Author: dim Date: Mon Feb 9 07:56:50 2015 New Revision: 278438 URL: https://svnweb.freebsd.org/changeset/base/278438 Log: After r278004 was committed, Bruce Evans noted that the casts were actually completely unnecessary, here: https://lists.freebsd.org/pipermail/svn-src-all/2015-February/098478.html Remove the casts, and just assign &xxx_io_mc_regs[0][0] directly. Reviewed by: dumbbell MFC after:3 days Differential Revision: https://reviews.freebsd.org/D1748 Modified: head/sys/dev/drm2/radeon/ni.c head/sys/dev/drm2/radeon/si.c Modified: head/sys/dev/drm2/radeon/ni.c == --- head/sys/dev/drm2/radeon/ni.c Mon Feb 9 07:52:45 2015 (r278437) +++ head/sys/dev/drm2/radeon/ni.c Mon Feb 9 07:56:50 2015 (r278438) @@ -190,23 +190,23 @@ int ni_mc_load_microcode(struct radeon_d switch (rdev->family) { case CHIP_BARTS: - io_mc_regs = (const u32 *)&barts_io_mc_regs; + io_mc_regs = &barts_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_TURKS: - io_mc_regs = (const u32 *)&turks_io_mc_regs; + io_mc_regs = &turks_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAICOS: default: - io_mc_regs = (const u32 *)&caicos_io_mc_regs; + io_mc_regs = &caicos_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAYMAN: - io_mc_regs = (const u32 *)&cayman_io_mc_regs; + io_mc_regs = &cayman_io_mc_regs[0][0]; ucode_size = CAYMAN_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; Modified: head/sys/dev/drm2/radeon/si.c == --- head/sys/dev/drm2/radeon/si.c Mon Feb 9 07:52:45 2015 (r278437) +++ head/sys/dev/drm2/radeon/si.c Mon Feb 9 07:56:50 2015 (r278438) @@ -190,18 +190,18 @@ static int si_mc_load_microcode(struct r switch (rdev->family) { case CHIP_TAHITI: - io_mc_regs = (const u32 *)&tahiti_io_mc_regs; + io_mc_regs = &tahiti_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_PITCAIRN: - io_mc_regs = (const u32 *)&pitcairn_io_mc_regs; + io_mc_regs = &pitcairn_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_VERDE: default: - io_mc_regs = (const u32 *)&verde_io_mc_regs; + io_mc_regs = &verde_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278437 - in stable: 10/usr.sbin/syslogd 9/usr.sbin/syslogd
Author: dim Date: Mon Feb 9 07:52:45 2015 New Revision: 278437 URL: https://svnweb.freebsd.org/changeset/base/278437 Log: MFC r278297: Fix two clang 3.6.0 warnings in usr.sbin/syslogd: usr.sbin/syslogd/syslogd.c:1023:10: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] f->f_prevline && !strcmp(msg, f->f_prevline) && ~~~^~ usr.sbin/syslogd/syslogd.c:1178:16: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] } else if (f->f_prevline) { ~~ ~~~^~ In both cases, the f_prevline field of struct filed is a char array, so it can never be null. Remove the checks. Reviewed by: jilles Differential Revision: https://reviews.freebsd.org/D1716 Modified: stable/9/usr.sbin/syslogd/syslogd.c Directory Properties: stable/9/usr.sbin/syslogd/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/9/usr.sbin/syslogd/syslogd.c == --- stable/9/usr.sbin/syslogd/syslogd.c Mon Feb 9 07:49:41 2015 (r278436) +++ stable/9/usr.sbin/syslogd/syslogd.c Mon Feb 9 07:52:45 2015 (r278437) @@ -1019,7 +1019,7 @@ logmsg(int pri, const char *msg, const c */ if (no_compress - (f->f_type != F_PIPE) < 1 && (flags & MARK) == 0 && msglen == f->f_prevlen && - f->f_prevline && !strcmp(msg, f->f_prevline) && + !strcmp(msg, f->f_prevline) && !strcasecmp(from, f->f_prevhost)) { (void)strlcpy(f->f_lasttime, timestamp, sizeof(f->f_lasttime)); @@ -1174,11 +1174,9 @@ fprintlog(struct filed *f, int flags, co v->iov_base = repbuf; v->iov_len = snprintf(repbuf, sizeof repbuf, "last message repeated %d times", f->f_prevcount); - } else if (f->f_prevline) { + } else { v->iov_base = f->f_prevline; v->iov_len = f->f_prevlen; - } else { - return; } v++; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278437 - in stable: 10/usr.sbin/syslogd 9/usr.sbin/syslogd
Author: dim Date: Mon Feb 9 07:52:45 2015 New Revision: 278437 URL: https://svnweb.freebsd.org/changeset/base/278437 Log: MFC r278297: Fix two clang 3.6.0 warnings in usr.sbin/syslogd: usr.sbin/syslogd/syslogd.c:1023:10: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] f->f_prevline && !strcmp(msg, f->f_prevline) && ~~~^~ usr.sbin/syslogd/syslogd.c:1178:16: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] } else if (f->f_prevline) { ~~ ~~~^~ In both cases, the f_prevline field of struct filed is a char array, so it can never be null. Remove the checks. Reviewed by: jilles Differential Revision: https://reviews.freebsd.org/D1716 Modified: stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/usr.sbin/syslogd/syslogd.c Directory Properties: stable/9/usr.sbin/syslogd/ (props changed) Modified: stable/10/usr.sbin/syslogd/syslogd.c == --- stable/10/usr.sbin/syslogd/syslogd.cMon Feb 9 07:49:41 2015 (r278436) +++ stable/10/usr.sbin/syslogd/syslogd.cMon Feb 9 07:52:45 2015 (r278437) @@ -1020,7 +1020,7 @@ logmsg(int pri, const char *msg, const c */ if (no_compress - (f->f_type != F_PIPE) < 1 && (flags & MARK) == 0 && msglen == f->f_prevlen && - f->f_prevline && !strcmp(msg, f->f_prevline) && + !strcmp(msg, f->f_prevline) && !strcasecmp(from, f->f_prevhost)) { (void)strlcpy(f->f_lasttime, timestamp, sizeof(f->f_lasttime)); @@ -1175,11 +1175,9 @@ fprintlog(struct filed *f, int flags, co v->iov_base = repbuf; v->iov_len = snprintf(repbuf, sizeof repbuf, "last message repeated %d times", f->f_prevcount); - } else if (f->f_prevline) { + } else { v->iov_base = f->f_prevline; v->iov_len = f->f_prevlen; - } else { - return; } v++; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278436 - in stable: 10/sys/sys 9/sys/sys
Author: dim Date: Mon Feb 9 07:49:41 2015 New Revision: 278436 URL: https://svnweb.freebsd.org/changeset/base/278436 Log: MFC r278222: Mark typedefs for manually implementing _Static_assert() as unused, so they won't show up unecessarily for -Wunused-local-typedefs. Modified: stable/10/sys/sys/cdefs.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/sys/cdefs.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/sys/cdefs.h == --- stable/10/sys/sys/cdefs.h Mon Feb 9 07:45:46 2015(r278435) +++ stable/10/sys/sys/cdefs.h Mon Feb 9 07:49:41 2015(r278436) @@ -289,7 +289,8 @@ #elif defined(__COUNTER__) #define_Static_assert(x, y)__Static_assert(x, __COUNTER__) #define__Static_assert(x, y) ___Static_assert(x, y) -#define___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] +#define___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ + __unused #else #define_Static_assert(x, y)struct __hack #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278436 - in stable: 10/sys/sys 9/sys/sys
Author: dim Date: Mon Feb 9 07:49:41 2015 New Revision: 278436 URL: https://svnweb.freebsd.org/changeset/base/278436 Log: MFC r278222: Mark typedefs for manually implementing _Static_assert() as unused, so they won't show up unecessarily for -Wunused-local-typedefs. Modified: stable/9/sys/sys/cdefs.h Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/sys/cdefs.h Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/sys/cdefs.h == --- stable/9/sys/sys/cdefs.hMon Feb 9 07:45:46 2015(r278435) +++ stable/9/sys/sys/cdefs.hMon Feb 9 07:49:41 2015(r278436) @@ -250,7 +250,8 @@ #ifdef __COUNTER__ #define_Static_assert(x, y)__Static_assert(x, __COUNTER__) #define__Static_assert(x, y) ___Static_assert(x, y) -#define___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] +#define___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ + __unused #else #define_Static_assert(x, y)struct __hack #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278435 - in stable: 10/sys/fs/smbfs 9/sys/fs/smbfs
Author: dim Date: Mon Feb 9 07:45:46 2015 New Revision: 278435 URL: https://svnweb.freebsd.org/changeset/base/278435 Log: MFC r277953: Fix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST. No functional change. Modified: stable/9/sys/fs/smbfs/smbfs_subr.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/fs/smbfs/smbfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/fs/smbfs/smbfs_subr.c == --- stable/9/sys/fs/smbfs/smbfs_subr.c Mon Feb 9 07:08:54 2015 (r278434) +++ stable/9/sys/fs/smbfs/smbfs_subr.c Mon Feb 9 07:45:46 2015 (r278435) @@ -202,8 +202,8 @@ smbfs_fname_tolocal(struct smb_vc *vcp, if (error) return error; */ - error = iconv_conv_case - (vcp->vc_tolocal, (const char **)&ibuf, &ilen, &obuf, &olen, copt); + error = iconv_conv_case(vcp->vc_tolocal, + __DECONST(const char **, &ibuf), &ilen, &obuf, &olen, copt); if (error && SMB_UNICODE_STRINGS(vcp)) { /* * If using unicode, leaving a file name as it was when ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278435 - in stable: 10/sys/fs/smbfs 9/sys/fs/smbfs
Author: dim Date: Mon Feb 9 07:45:46 2015 New Revision: 278435 URL: https://svnweb.freebsd.org/changeset/base/278435 Log: MFC r277953: Fix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST. No functional change. Modified: stable/10/sys/fs/smbfs/smbfs_subr.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/fs/smbfs/smbfs_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/fs/smbfs/smbfs_subr.c == --- stable/10/sys/fs/smbfs/smbfs_subr.c Mon Feb 9 07:08:54 2015 (r278434) +++ stable/10/sys/fs/smbfs/smbfs_subr.c Mon Feb 9 07:45:46 2015 (r278435) @@ -170,8 +170,8 @@ smbfs_fname_tolocal(struct smb_vc *vcp, if (error) return error; */ - error = iconv_conv_case - (vcp->vc_tolocal, (const char **)&ibuf, &ilen, &obuf, &olen, copt); + error = iconv_conv_case(vcp->vc_tolocal, + __DECONST(const char **, &ibuf), &ilen, &obuf, &olen, copt); if (error && SMB_UNICODE_STRINGS(vcp)) { /* * If using unicode, leaving a file name as it was when ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278434 - head/sys/powerpc/pseries
Author: nwhitehorn Date: Mon Feb 9 07:08:54 2015 New Revision: 278434 URL: https://svnweb.freebsd.org/changeset/base/278434 Log: Fix typo in PTE insertion overflow handling: use the page we're actually returning, not the one we just looked at. Modified: head/sys/powerpc/pseries/mmu_phyp.c Modified: head/sys/powerpc/pseries/mmu_phyp.c == --- head/sys/powerpc/pseries/mmu_phyp.c Mon Feb 9 06:20:34 2015 (r278433) +++ head/sys/powerpc/pseries/mmu_phyp.c Mon Feb 9 07:08:54 2015 (r278434) @@ -299,7 +299,10 @@ mphyp_pte_spillable_ident(u_int ptegidx, } } - phyp_pft_hcall(H_READ, 0, slot, 0, 0, &to_evict->pte_hi, + if (k == -1) + return (k); + + phyp_pft_hcall(H_READ, 0, k, 0, 0, &to_evict->pte_hi, &to_evict->pte_lo, &junk); return (k); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/libl
On Feb 8, 2015, at 22:20, Rui Paulo wrote: > > Author: rpaulo > Date: Mon Feb 9 06:20:34 2015 > New Revision: 278433 > URL: https://svnweb.freebsd.org/changeset/base/278433 > > Log: > Merge xz 5.2.0. > > This brings support for multi-threaded compression. This brings close > N times faster compression where N is the number of CPU cores. > Because of this, liblzma now depends on libthr. Gah, terrible wording. I bet I couldn't repeat the word "this" three times in a row if I wanted to... -- Rui Paulo ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278433 - in head: . contrib/xz contrib/xz/src/common contrib/xz/src/liblzma contrib/xz/src/liblzma/api contrib/xz/src/liblzma/api/lzma contrib/xz/src/liblzma/check contrib/xz/src/liblz...
Author: rpaulo Date: Mon Feb 9 06:20:34 2015 New Revision: 278433 URL: https://svnweb.freebsd.org/changeset/base/278433 Log: Merge xz 5.2.0. This brings support for multi-threaded compression. This brings close N times faster compression where N is the number of CPU cores. Because of this, liblzma now depends on libthr. Soon libarchive will be modified to use the new lzma API. Thanks to antoine@ for the exp-run. Differential Revision: https://reviews.freebsd.org/D1786 Reviewed by: bapt Added: head/contrib/xz/src/liblzma/api/lzma/lzma12.h - copied unchanged from r278308, vendor/xz/dist/src/liblzma/api/lzma/lzma12.h head/contrib/xz/src/liblzma/common/block_buffer_encoder.h - copied unchanged from r278308, vendor/xz/dist/src/liblzma/common/block_buffer_encoder.h head/contrib/xz/src/liblzma/common/hardware_cputhreads.c - copied unchanged from r278308, vendor/xz/dist/src/liblzma/common/hardware_cputhreads.c head/contrib/xz/src/liblzma/common/memcmplen.h - copied unchanged from r278308, vendor/xz/dist/src/liblzma/common/memcmplen.h head/contrib/xz/src/liblzma/common/outqueue.c - copied unchanged from r278308, vendor/xz/dist/src/liblzma/common/outqueue.c head/contrib/xz/src/liblzma/common/outqueue.h - copied unchanged from r278308, vendor/xz/dist/src/liblzma/common/outqueue.h head/contrib/xz/src/liblzma/common/stream_encoder_mt.c - copied unchanged from r278308, vendor/xz/dist/src/liblzma/common/stream_encoder_mt.c head/contrib/xz/src/liblzma/liblzma.map - copied unchanged from r278308, vendor/xz/dist/src/liblzma/liblzma.map head/contrib/xz/src/liblzma/validate_map.sh - copied unchanged from r278308, vendor/xz/dist/src/liblzma/validate_map.sh head/contrib/xz/src/xz/mytime.c - copied unchanged from r278308, vendor/xz/dist/src/xz/mytime.c head/contrib/xz/src/xz/mytime.h - copied unchanged from r278308, vendor/xz/dist/src/xz/mytime.h Deleted: head/contrib/xz/src/liblzma/api/lzma/lzma.h head/contrib/xz/src/liblzma/common/stream_encoder.h Modified: head/Makefile.inc1 head/ObsoleteFiles.inc head/contrib/xz/ChangeLog head/contrib/xz/THANKS head/contrib/xz/TODO head/contrib/xz/src/common/mythread.h head/contrib/xz/src/common/sysdefs.h head/contrib/xz/src/common/tuklib_cpucores.c head/contrib/xz/src/common/tuklib_physmem.c head/contrib/xz/src/liblzma/api/lzma.h head/contrib/xz/src/liblzma/api/lzma/base.h head/contrib/xz/src/liblzma/api/lzma/block.h head/contrib/xz/src/liblzma/api/lzma/container.h head/contrib/xz/src/liblzma/api/lzma/filter.h head/contrib/xz/src/liblzma/api/lzma/hardware.h head/contrib/xz/src/liblzma/api/lzma/index.h head/contrib/xz/src/liblzma/api/lzma/index_hash.h head/contrib/xz/src/liblzma/api/lzma/version.h head/contrib/xz/src/liblzma/check/check.h head/contrib/xz/src/liblzma/check/sha256.c head/contrib/xz/src/liblzma/common/alone_decoder.c head/contrib/xz/src/liblzma/common/alone_decoder.h head/contrib/xz/src/liblzma/common/alone_encoder.c head/contrib/xz/src/liblzma/common/auto_decoder.c head/contrib/xz/src/liblzma/common/block_buffer_decoder.c head/contrib/xz/src/liblzma/common/block_buffer_encoder.c head/contrib/xz/src/liblzma/common/block_decoder.c head/contrib/xz/src/liblzma/common/block_decoder.h head/contrib/xz/src/liblzma/common/block_encoder.c head/contrib/xz/src/liblzma/common/block_encoder.h head/contrib/xz/src/liblzma/common/block_header_decoder.c head/contrib/xz/src/liblzma/common/block_header_encoder.c head/contrib/xz/src/liblzma/common/block_util.c head/contrib/xz/src/liblzma/common/common.c head/contrib/xz/src/liblzma/common/common.h head/contrib/xz/src/liblzma/common/easy_buffer_encoder.c head/contrib/xz/src/liblzma/common/easy_encoder.c head/contrib/xz/src/liblzma/common/filter_buffer_decoder.c head/contrib/xz/src/liblzma/common/filter_buffer_encoder.c head/contrib/xz/src/liblzma/common/filter_common.c head/contrib/xz/src/liblzma/common/filter_common.h head/contrib/xz/src/liblzma/common/filter_decoder.c head/contrib/xz/src/liblzma/common/filter_decoder.h head/contrib/xz/src/liblzma/common/filter_encoder.c head/contrib/xz/src/liblzma/common/filter_encoder.h head/contrib/xz/src/liblzma/common/filter_flags_decoder.c head/contrib/xz/src/liblzma/common/index.c head/contrib/xz/src/liblzma/common/index_decoder.c head/contrib/xz/src/liblzma/common/index_encoder.c head/contrib/xz/src/liblzma/common/index_encoder.h head/contrib/xz/src/liblzma/common/index_hash.c head/contrib/xz/src/liblzma/common/stream_buffer_decoder.c head/contrib/xz/src/liblzma/common/stream_buffer_encoder.c head/contrib/xz/src/liblzma/common/stream_decoder.c head/contrib/xz/src/liblzma/common/stream_decoder.h head/contrib/xz/src/liblzma/common/stream_encoder.c head/contrib/xz/src/liblzma/delta/delta_common.c head/contrib/xz/src/liblzma/delta/delta_decoder.c head/contrib/xz/src/li
Re: svn commit: r278431 - head/sys/contrib/vchiq/interface/vchiq_arm
On Mon, 9 Feb 2015, Oleksandr Tymoshenko wrote: Log: Do not mark shared structures as __packed, it leads to race condition If structure packed as __packed clang (and probably gcc) generates code that loads word fields (e.g. tx_pos) byte-by-byte and if it's modified by VideoCore in the same time as ARM loads the value result is going to be mixed combination of bytes from previous value and new one. Most uses of __packed are bugs. It gives pessimizations as well as non-atomic accesses for sub-object accesses. I think the full bugs only occur when arch has strict alignment requirements and the alignment of the __packed objects is not known. This means that only lesser bugs occur on x86 (unless you enable alignment checking, but this arguably breaks the ABI). The compiler just generates possibly-misaligned full-width accesses if the arch doesn't have strict alignment requirements. Often the acceses turn out to be aligned at runtime. Otherwise, the hardware does them atomically, with a smaller efficiency penalty than split accesses. Many packed structs should also be declared as __aligned(N). This is rarely done. Old networking code in uses __packed just once, and this also uses __aligned(4) (for struct ip) Newer networking code in (for ipv6) is massively pessimized, with __packed used extensively and __aligned(N) never used with __packed. sctp is worse. It uses its own macro that defeats grepping for __packed. It has 82 instances of this in where ipv6 has only 34. Newer networking should need __packed less than old ones, since no one would misdesign a data struct so that it needs packing now. gcc documents the -Wpacked flag for finding some cases of bogus packing. It is rarely used. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278432 - in stable/10/sys/arm/ti: . am335x
Author: rpaulo Date: Mon Feb 9 02:49:10 2015 New Revision: 278432 URL: https://svnweb.freebsd.org/changeset/base/278432 Log: MFC r277958, r278061: ti_pruss: make sure the mmap'ed memory region is uncacheable. am335x_clk_pruss_activate(): use the L3F clock. Modified: stable/10/sys/arm/ti/am335x/am335x_prcm.c stable/10/sys/arm/ti/ti_pruss.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/am335x/am335x_prcm.c == --- stable/10/sys/arm/ti/am335x/am335x_prcm.c Mon Feb 9 02:31:27 2015 (r278431) +++ stable/10/sys/arm/ti/am335x/am335x_prcm.c Mon Feb 9 02:49:10 2015 (r278432) @@ -502,7 +502,7 @@ am335x_clk_gpio_activate(struct ti_clock /* set *_CLKCTRL register MODULEMODE[1:0] to enable(2) */ /* set *_CLKCTRL register OPTFCLKEN_GPIO_1_G DBCLK[18] to FCLK_EN(1) */ prcm_write_4(clk_details->clkctrl_reg, 2 | (1 << 18)); - while ((prcm_read_4(clk_details->clkctrl_reg) & + while ((prcm_read_4(clk_details->clkctrl_reg) & (3 | (1 << 18) )) != (2 | (1 << 18))) DELAY(10); @@ -724,11 +724,11 @@ am335x_clk_lcdc_activate(struct ti_clock prcm_write_4(CM_WKUP_CM_CLKMODE_DPLL_DISP, 0x4); /* Make sure it's in bypass mode */ - while (!(prcm_read_4(CM_WKUP_CM_IDLEST_DPLL_DISP) + while (!(prcm_read_4(CM_WKUP_CM_IDLEST_DPLL_DISP) & (1 << 8))) DELAY(10); - /* + /* * For now set frequency to 5xSYSFREQ * More flexible control might be required */ @@ -738,7 +738,7 @@ am335x_clk_lcdc_activate(struct ti_clock prcm_write_4(CM_WKUP_CM_CLKMODE_DPLL_DISP, 0x7); int timeout = 1; - while ((!(prcm_read_4(CM_WKUP_CM_IDLEST_DPLL_DISP) + while ((!(prcm_read_4(CM_WKUP_CM_IDLEST_DPLL_DISP) & (1 << 0))) && timeout--) DELAY(10); @@ -786,9 +786,9 @@ am335x_clk_pruss_activate(struct ti_cloc while ((prcm_read_4(CM_PER_PRUSS_CLKSTCTRL) & (1<<6)) == 0) DELAY(10); - /* Select DISP DPLL as OCP clock */ - prcm_write_4(CLKSEL_PRUSS_OCP_CLK, 1); - while ((prcm_read_4(CLKSEL_PRUSS_OCP_CLK) & 0x3) != 1) + /* Select L3F as OCP clock */ + prcm_write_4(CLKSEL_PRUSS_OCP_CLK, 0); + while ((prcm_read_4(CLKSEL_PRUSS_OCP_CLK) & 0x3) != 0) DELAY(10); /* Clear the RESET bit */ Modified: stable/10/sys/arm/ti/ti_pruss.c == --- stable/10/sys/arm/ti/ti_pruss.c Mon Feb 9 02:31:27 2015 (r278431) +++ stable/10/sys/arm/ti/ti_pruss.c Mon Feb 9 02:49:10 2015 (r278432) @@ -259,6 +259,7 @@ ti_pruss_mmap(struct cdev *cdev, vm_ooff if (offset > rman_get_size(sc->sc_mem_res)) return (-1); *paddr = rman_get_start(sc->sc_mem_res) + offset; + *memattr = VM_MEMATTR_UNCACHEABLE; return (0); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278431 - head/sys/contrib/vchiq/interface/vchiq_arm
Author: gonzo Date: Mon Feb 9 02:31:27 2015 New Revision: 278431 URL: https://svnweb.freebsd.org/changeset/base/278431 Log: Do not mark shared structures as __packed, it leads to race condition If structure packed as __packed clang (and probably gcc) generates code that loads word fields (e.g. tx_pos) byte-by-byte and if it's modified by VideoCore in the same time as ARM loads the value result is going to be mixed combination of bytes from previous value and new one. Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h == --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h Mon Feb 9 02:27:33 2015(r278430) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_core.h Mon Feb 9 02:31:27 2015(r278431) @@ -280,7 +280,7 @@ typedef struct vchiq_slot_info_struct { /* Use two counters rather than one to avoid the need for a mutex. */ short use_count; short release_count; -} __packed VCHIQ_SLOT_INFO_T; /* XXXGONZO: check it */ +} VCHIQ_SLOT_INFO_T; typedef struct vchiq_service_struct { VCHIQ_SERVICE_BASE_T base; @@ -381,7 +381,7 @@ typedef struct vchiq_shared_state_struct /* Debugging state */ int debug[DEBUG_MAX]; -} __packed VCHIQ_SHARED_STATE_T; +} VCHIQ_SHARED_STATE_T; typedef struct vchiq_slot_zero_struct { int magic; @@ -395,7 +395,7 @@ typedef struct vchiq_slot_zero_struct { VCHIQ_SHARED_STATE_T master; VCHIQ_SHARED_STATE_T slave; VCHIQ_SLOT_INFO_T slots[VCHIQ_MAX_SLOTS]; -} __packed VCHIQ_SLOT_ZERO_T; +} VCHIQ_SLOT_ZERO_T; struct vchiq_state_struct { int id; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278430 - head/sys/contrib/vchiq/interface/vchiq_arm
Author: gonzo Date: Mon Feb 9 02:27:33 2015 New Revision: 278430 URL: https://svnweb.freebsd.org/changeset/base/278430 Log: Remove unused variables Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c == --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Mon Feb 9 02:17:21 2015(r278429) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_2835_arm.c Mon Feb 9 02:27:33 2015(r278430) @@ -252,7 +252,6 @@ VCHIQ_STATUS_T vchiq_prepare_bulk_data(VCHIQ_BULK_T *bulk, VCHI_MEM_HANDLE_T memhandle, void *offset, int size, int dir) { - PAGELIST_T *pagelist; BULKINFO_T *bi; int ret; @@ -518,7 +517,6 @@ free_pagelist(BULKINFO_T *bi, int actual { vm_page_t*pages; unsigned int num_pages, i; - void *page_address; PAGELIST_T *pagelist; pagelist = bi->pagelist; Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c == --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Mon Feb 9 02:17:21 2015(r278429) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Mon Feb 9 02:27:33 2015(r278430) @@ -2387,7 +2387,6 @@ vchiq_release_internal(VCHIQ_STATE_T *st VCHIQ_STATUS_T ret = VCHIQ_SUCCESS; char entity[16]; int *entity_uc; - int local_uc, local_entity_uc; if (!arm_state) goto out; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278429 - head/sys/powerpc/powerpc
Author: nwhitehorn Date: Mon Feb 9 02:17:21 2015 New Revision: 278429 URL: https://svnweb.freebsd.org/changeset/base/278429 Log: Fix an extremely subtle concurrency bug triggered by running on 32-thread POWER8 systems. During thread switch, there was a very small window when the stack pointer was set to the stack pointer of the outgoing thread, but after the lock on that thread had already been released. If, during that window, the outgoing thread were rescheduled on another CPU and begin execution and an exception were taken on the original CPU, the trap handler and the outgoing thread would simultaneously execute on the same stack, causing memory corruption. Fix this by making sure to release the old thread only after cpu_switch() is done with its stack. MFC after:2 weeks Sponsored by: FreeBSD Foundation Modified: head/sys/powerpc/powerpc/swtch64.S Modified: head/sys/powerpc/powerpc/swtch64.S == --- head/sys/powerpc/powerpc/swtch64.S Mon Feb 9 02:13:36 2015 (r278428) +++ head/sys/powerpc/powerpc/swtch64.S Mon Feb 9 02:17:21 2015 (r278429) @@ -72,6 +72,8 @@ TOC_ENTRY(blocked_lock) */ ENTRY(cpu_throw) mr %r13, %r4 + li %r14,0 /* Tell cpu_switchin not to release a thread */ + b cpu_switchin /* @@ -139,10 +141,7 @@ ENTRY(cpu_switch) bl pmap_deactivate /* Deactivate the current pmap */ nop - addi%r1,%r1,48 - sync/* Make sure all of that finished */ - std %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ cpu_switchin: #if defined(SMP) && defined(SCHED_ULE) @@ -154,14 +153,20 @@ blocked_loop: beq-blocked_loop isync #endif + + ld %r17,TD_PCB(%r13) /* Get new PCB */ + ld %r1,PCB_SP(%r17)/* Load the stack pointer */ - mfsprg %r7,0 /* Get the pcpu pointer */ + /* Release old thread now that we have a stack pointer set up */ + cmpdi %r14,0 + beq-1f + std %r16,TD_LOCK(%r14) /* ULE: update old thread's lock */ + +1: mfsprg %r7,0 /* Get the pcpu pointer */ std %r13,PC_CURTHREAD(%r7) /* Store new current thread */ ld %r17,TD_PCB(%r13) /* Store new current PCB */ std %r17,PC_CURPCB(%r7) - stdu%r1,-48(%r1) - mr %r3,%r13/* Get new thread ptr */ bl pmap_activate /* Activate the new address space */ nop ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278428 - head/sys/powerpc/pseries
Author: nwhitehorn Date: Mon Feb 9 02:13:36 2015 New Revision: 278428 URL: https://svnweb.freebsd.org/changeset/base/278428 Log: Technically speaking, using one virtal processor area for all CPUs is a violation of the spec. Make duplicate entries for each CPU. Modified: head/sys/powerpc/pseries/platform_chrp.c Modified: head/sys/powerpc/pseries/platform_chrp.c == --- head/sys/powerpc/pseries/platform_chrp.cMon Feb 9 02:12:38 2015 (r278427) +++ head/sys/powerpc/pseries/platform_chrp.cMon Feb 9 02:13:36 2015 (r278428) @@ -58,7 +58,7 @@ extern void *ap_pcpu; #endif #ifdef __powerpc64__ -static uint8_t splpar_vpa[640] __aligned(64); +static uint8_t splpar_vpa[MAXCPU][640] __aligned(128); /* XXX: dpcpu */ #endif static vm_offset_t realmaxaddr = VM_MAX_ADDRESS; @@ -124,6 +124,8 @@ chrp_probe(platform_t plat) static int chrp_attach(platform_t plat) { + int i; + #ifdef __powerpc64__ /* XXX: check for /rtas/ibm,hypertas-functions? */ if (!(mfmsr() & PSL_HV)) { @@ -136,14 +138,19 @@ chrp_attach(platform_t plat) cpu_idle_hook = phyp_cpu_idle; /* Set up important VPA fields */ - bzero(splpar_vpa, sizeof(splpar_vpa)); - splpar_vpa[4] = (uint8_t)((sizeof(splpar_vpa) >> 8) & 0xff); - splpar_vpa[5] = (uint8_t)(sizeof(splpar_vpa) & 0xff); - splpar_vpa[0xba] = 1; /* Maintain FPRs */ - splpar_vpa[0xbb] = 1; /* Maintain PMCs */ - splpar_vpa[0xfc] = 0xff;/* Maintain full SLB */ - splpar_vpa[0xfd] = 0xff; - splpar_vpa[0xff] = 1; /* Maintain Altivec */ + for (i = 0; i < MAXCPU; i++) { + bzero(splpar_vpa[i], sizeof(splpar_vpa)); + /* First two: VPA size */ + splpar_vpa[i][4] = + (uint8_t)((sizeof(splpar_vpa[i]) >> 8) & 0xff); + splpar_vpa[i][5] = + (uint8_t)(sizeof(splpar_vpa[i]) & 0xff); + splpar_vpa[i][0xba] = 1;/* Maintain FPRs */ + splpar_vpa[i][0xbb] = 1;/* Maintain PMCs */ + splpar_vpa[i][0xfc] = 0xff; /* Maintain full SLB */ + splpar_vpa[i][0xfd] = 0xff; + splpar_vpa[i][0xff] = 1;/* Maintain Altivec */ + } mb(); /* Set up hypervisor CPU stuff */ @@ -492,11 +499,12 @@ static void chrp_smp_ap_init(platform_t platform) { if (!(mfmsr() & PSL_HV)) { + /* Register VPA */ + phyp_hcall(H_REGISTER_VPA, 1UL, PCPU_GET(cpuid), + splpar_vpa[PCPU_GET(cpuid)]); + /* Set interrupt priority */ phyp_hcall(H_CPPR, 0xff); - - /* Register VPA */ - phyp_hcall(H_REGISTER_VPA, 1UL, PCPU_GET(cpuid), splpar_vpa); } } #else ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278427 - head/sys/powerpc/aim
Author: nwhitehorn Date: Mon Feb 9 02:12:38 2015 New Revision: 278427 URL: https://svnweb.freebsd.org/changeset/base/278427 Log: Simplify trapcode setup by placing a copy of the generic trap handler at every possible trap address by default. This also makes sure the kernel notices (and panics at) traps from newer CPUs that the kernel was not expecting rather than executing gibberish memory. Modified: head/sys/powerpc/aim/machdep.c Modified: head/sys/powerpc/aim/machdep.c == --- head/sys/powerpc/aim/machdep.c Mon Feb 9 01:45:06 2015 (r278426) +++ head/sys/powerpc/aim/machdep.c Mon Feb 9 02:12:38 2015 (r278427) @@ -256,6 +256,7 @@ powerpc_init(vm_offset_t fdt, vm_offset_ vm_offset_t startkernel, endkernel; void*generictrap; size_t trap_offset, trapsize; + vm_offset_t trap; void*kmdp; char *env; register_t msr, scratch; @@ -481,20 +482,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_ #endif /* -* Copy a code snippet to restore 32-bit bridge mode -* to the top of every non-generic trap handler -*/ - - trap_offset += (size_t)&restorebridgesize; - bcopy(&restorebridge, (void *)EXC_RST, trap_offset); - bcopy(&restorebridge, (void *)EXC_DSI, trap_offset); - bcopy(&restorebridge, (void *)EXC_ALI, trap_offset); - bcopy(&restorebridge, (void *)EXC_PGM, trap_offset); - bcopy(&restorebridge, (void *)EXC_MCHK, trap_offset); - bcopy(&restorebridge, (void *)EXC_TRC, trap_offset); - bcopy(&restorebridge, (void *)EXC_BPT, trap_offset); - - /* * Set the common trap entry point to the one that * knows to restore 32-bit operation on execution. */ @@ -507,14 +494,35 @@ powerpc_init(vm_offset_t fdt, vm_offset_ #else /* powerpc64 */ cpu_features |= PPC_FEATURE_64; generictrap = &trapcode; - - /* Set TOC base so that the interrupt code can get at it */ - *((void **)TRAP_GENTRAP) = &trapcode2; - *((register_t *)TRAP_TOCBASE) = toc; #endif trapsize = (size_t)&trapcodeend - (size_t)&trapcode; + /* +* Copy generic handler into every possible trap. Special cases will get +* different ones in a minute. +*/ + for (trap = EXC_RST; trap < EXC_LAST; trap += 0x20) + bcopy(generictrap, (void *)trap, trapsize); + + #ifndef __powerpc64__ + if (cpu_features & PPC_FEATURE_64) { + /* +* Copy a code snippet to restore 32-bit bridge mode +* to the top of every non-generic trap handler +*/ + + trap_offset += (size_t)&restorebridgesize; + bcopy(&restorebridge, (void *)EXC_RST, trap_offset); + bcopy(&restorebridge, (void *)EXC_DSI, trap_offset); + bcopy(&restorebridge, (void *)EXC_ALI, trap_offset); + bcopy(&restorebridge, (void *)EXC_PGM, trap_offset); + bcopy(&restorebridge, (void *)EXC_MCHK, trap_offset); + bcopy(&restorebridge, (void *)EXC_TRC, trap_offset); + bcopy(&restorebridge, (void *)EXC_BPT, trap_offset); + } + #endif + bcopy(&rstcode, (void *)(EXC_RST + trap_offset), (size_t)&rstcodeend - (size_t)&rstcode); @@ -527,31 +535,20 @@ powerpc_init(vm_offset_t fdt, vm_offset_ (size_t)&dblow); bcopy(&dblow, (void *)(EXC_BPT + trap_offset), (size_t)&dbend - (size_t)&dblow); -#else - bcopy(generictrap, (void *)EXC_MCHK, trapsize); - bcopy(generictrap, (void *)EXC_PGM, trapsize); - bcopy(generictrap, (void *)EXC_TRC, trapsize); - bcopy(generictrap, (void *)EXC_BPT, trapsize); #endif bcopy(&alitrap, (void *)(EXC_ALI + trap_offset), (size_t)&aliend - (size_t)&alitrap); bcopy(&dsitrap, (void *)(EXC_DSI + trap_offset), (size_t)&dsiend - (size_t)&dsitrap); - bcopy(generictrap, (void *)EXC_ISI, trapsize); + #ifdef __powerpc64__ + /* Set TOC base so that the interrupt code can get at it */ + *((void **)TRAP_GENTRAP) = &trapcode2; + *((register_t *)TRAP_TOCBASE) = toc; + bcopy(&slbtrap, (void *)EXC_DSE,(size_t)&slbtrapend - (size_t)&slbtrap); bcopy(&slbtrap, (void *)EXC_ISE,(size_t)&slbtrapend - (size_t)&slbtrap); - #endif - bcopy(generictrap, (void *)EXC_EXI, trapsize); - bcopy(generictrap, (void *)EXC_FPU, trapsize); - bcopy(generictrap, (void *)EXC_DECR, trapsize); - bcopy(generictrap, (void *)EXC_SC, trapsize); - bcopy(generictrap, (void *)EXC_FPA, trapsize)
svn commit: r278426 - vendor/lldb/lldb-r228549
Author: emaste Date: Mon Feb 9 01:45:06 2015 New Revision: 278426 URL: https://svnweb.freebsd.org/changeset/base/278426 Log: Tag trimmed lldb r228549 Added: vendor/lldb/lldb-r228549/ - copied from r278425, vendor/lldb/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278425 - in vendor/lldb/dist: include/lldb include/lldb/API include/lldb/Breakpoint include/lldb/Core include/lldb/DataFormatters include/lldb/Expression include/lldb/Host include/lldb...
Author: emaste Date: Mon Feb 9 01:44:09 2015 New Revision: 278425 URL: https://svnweb.freebsd.org/changeset/base/278425 Log: Import LLDB as of upstream SVN 228549 (git 39760838) Added: vendor/lldb/dist/include/lldb/API/SBLaunchInfo.h (contents, props changed) vendor/lldb/dist/include/lldb/Core/FormatEntity.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/StringConvert.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/common/ vendor/lldb/dist/include/lldb/Host/common/NativeBreakpoint.h - copied unchanged from r278424, vendor/lldb/dist/source/Host/common/NativeBreakpoint.h vendor/lldb/dist/include/lldb/Host/common/NativeBreakpointList.h - copied unchanged from r278424, vendor/lldb/dist/source/Host/common/NativeBreakpointList.h vendor/lldb/dist/include/lldb/Host/common/NativeProcessProtocol.h - copied, changed from r278424, vendor/lldb/dist/source/Host/common/NativeProcessProtocol.h vendor/lldb/dist/include/lldb/Host/common/NativeRegisterContext.h - copied, changed from r278424, vendor/lldb/dist/include/lldb/Target/NativeRegisterContext.h vendor/lldb/dist/include/lldb/Host/common/NativeRegisterContextRegisterInfo.h - copied, changed from r278424, vendor/lldb/dist/include/lldb/Target/NativeRegisterContextRegisterInfo.h vendor/lldb/dist/include/lldb/Host/common/NativeThreadProtocol.h - copied, changed from r278424, vendor/lldb/dist/source/Host/common/NativeThreadProtocol.h vendor/lldb/dist/include/lldb/Host/common/NativeWatchpointList.h (contents, props changed) vendor/lldb/dist/include/lldb/Host/common/SoftwareBreakpoint.h - copied unchanged from r278424, vendor/lldb/dist/source/Host/common/SoftwareBreakpoint.h vendor/lldb/dist/include/lldb/Interpreter/OptionValueFormatEntity.h (contents, props changed) vendor/lldb/dist/source/API/SBLaunchInfo.cpp (contents, props changed) vendor/lldb/dist/source/Core/FormatEntity.cpp (contents, props changed) vendor/lldb/dist/source/Host/common/NativeRegisterContext.cpp - copied, changed from r278424, vendor/lldb/dist/source/Target/NativeRegisterContext.cpp vendor/lldb/dist/source/Host/common/NativeRegisterContextRegisterInfo.cpp - copied, changed from r278424, vendor/lldb/dist/source/Target/NativeRegisterContextRegisterInfo.cpp vendor/lldb/dist/source/Host/common/NativeWatchpointList.cpp (contents, props changed) vendor/lldb/dist/source/Host/common/StringConvert.cpp (contents, props changed) vendor/lldb/dist/source/Interpreter/OptionValueFormatEntity.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/Process/POSIX/CrashReason.cpp (contents, props changed) vendor/lldb/dist/source/Plugins/Process/POSIX/CrashReason.h (contents, props changed) Deleted: vendor/lldb/dist/include/lldb/Target/NativeRegisterContext.h vendor/lldb/dist/include/lldb/Target/NativeRegisterContextRegisterInfo.h vendor/lldb/dist/source/Host/common/NativeBreakpoint.h vendor/lldb/dist/source/Host/common/NativeBreakpointList.h vendor/lldb/dist/source/Host/common/NativeProcessProtocol.h vendor/lldb/dist/source/Host/common/NativeThreadProtocol.h vendor/lldb/dist/source/Host/common/SoftwareBreakpoint.h vendor/lldb/dist/source/Target/NativeRegisterContext.cpp vendor/lldb/dist/source/Target/NativeRegisterContextRegisterInfo.cpp Modified: vendor/lldb/dist/include/lldb/API/SBPlatform.h vendor/lldb/dist/include/lldb/API/SBTarget.h vendor/lldb/dist/include/lldb/API/SBType.h vendor/lldb/dist/include/lldb/Breakpoint/Breakpoint.h vendor/lldb/dist/include/lldb/Breakpoint/BreakpointLocation.h vendor/lldb/dist/include/lldb/Breakpoint/StoppointLocation.h vendor/lldb/dist/include/lldb/Core/ArchSpec.h vendor/lldb/dist/include/lldb/Core/Broadcaster.h vendor/lldb/dist/include/lldb/Core/Connection.h vendor/lldb/dist/include/lldb/Core/ConnectionMachPort.h vendor/lldb/dist/include/lldb/Core/ConnectionSharedMemory.h vendor/lldb/dist/include/lldb/Core/Debugger.h vendor/lldb/dist/include/lldb/Core/Disassembler.h vendor/lldb/dist/include/lldb/Core/Mangled.h vendor/lldb/dist/include/lldb/Core/Module.h vendor/lldb/dist/include/lldb/Core/RegularExpression.h vendor/lldb/dist/include/lldb/Core/ValueObject.h vendor/lldb/dist/include/lldb/Core/ValueObjectSyntheticFilter.h vendor/lldb/dist/include/lldb/DataFormatters/TypeSummary.h vendor/lldb/dist/include/lldb/Expression/ASTResultSynthesizer.h vendor/lldb/dist/include/lldb/Expression/ASTStructExtractor.h vendor/lldb/dist/include/lldb/Expression/IRExecutionUnit.h vendor/lldb/dist/include/lldb/Host/File.h vendor/lldb/dist/include/lldb/Host/Host.h vendor/lldb/dist/include/lldb/Host/PipeBase.h vendor/lldb/dist/include/lldb/Host/Socket.h vendor/lldb/dist/include/lldb/Host/SocketAddress.h vendor/lldb/dist/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h vendor/lldb/dist/include/lldb/Host/posix/PipePosix.h vendor/lldb/dist/include/lldb/Interpreter/A
svn commit: r278424 - stable/10/sys/i386/conf
Author: marius Date: Sun Feb 8 23:09:01 2015 New Revision: 278424 URL: https://svnweb.freebsd.org/changeset/base/278424 Log: MFC: r276377, r276714 - No longer exclude malo(4) and mwl(4), they have been fixed in r275870 (MFCed to stable/10 in r278415) and r275871 (MFCed to stable/10 in r278416) respectively to build with PAE enabled. - For the PAE kernel configuration file, no longer exclude devices that are known to be 64-bit DMA clean from amd64. Modified: stable/10/sys/i386/conf/PAE stable/10/sys/i386/conf/XEN Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/conf/PAE == --- stable/10/sys/i386/conf/PAE Sun Feb 8 23:04:32 2015(r278423) +++ stable/10/sys/i386/conf/PAE Sun Feb 8 23:09:01 2015(r278424) @@ -10,77 +10,14 @@ ident PAE-GENERIC # To make a PAE kernel, the next option is needed optionsPAE # Physical Address Extensions Kernel -# The following modules don't build with PAE enabled. -makeoptionsWITHOUT_MODULES="ctl dpt hptmv ida malo mwl" - -# force isp firmware to fully loaded -device ispfw - -# What follows is a list of drivers that are normally in GENERIC, but either -# don't work or are untested with PAE. Be very careful before enabling any -# of these drivers. Drivers which use DMA and don't handle 64 bit physical -# address properly may cause data corruption when used in a machine with more -# than 4 gigabytes of memory. - -nodevice ahb -nodevice sym -nodevice trm - -nodevice adv -nodevice adw -nodevice aha -nodevice aic -nodevice bt - -nodevice ncv -nodevice nsp -nodevice stg - -nodevice asr +# The following drivers don't build with PAE enabled. +makeoptionsWITHOUT_MODULES="ctl dpt hptmv ida" nodevice dpt -nodevice mly nodevice hptmv -nodevice hptnr -nodevice hptrr - nodevice ida -nodevice mlx -nodevice pst - -nodevice agp - -nodevice txp -nodevice vx - -nodevice nve -nodevice pcn -nodevice sf -nodevice sis -nodevice ste -nodevice tl -nodevice tx -nodevice vr -nodevice wb -nodevice cs -nodevice ed -nodevice ex -nodevice ep -nodevice fe -nodevice ie -nodevice sn -nodevice xe - -nodevice an -nodevice ath # Atheros pci/cardbus NICs -nodevice ath_pci -nodevice ath_hal -nodevice ath_rate_sample # SampleRate tx rate control for ath -nodevice ipw -nodevice iwi -nodevice iwn -nodevice malo -nodevice mwl -nodevice ral -nodevice wi -nodevice wpi +# The following drivers don't work with PAE enabled. +makeoptionsWITHOUT_MODULES+="asr ncr pst" +nodevice asr +nodevice ncr +nodevice pst Modified: stable/10/sys/i386/conf/XEN == --- stable/10/sys/i386/conf/XEN Sun Feb 8 23:04:32 2015(r278423) +++ stable/10/sys/i386/conf/XEN Sun Feb 8 23:09:01 2015(r278424) @@ -8,8 +8,11 @@ ident XEN makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols -# The following modules don't build with PAE and XEN enabled. -makeoptionsWITHOUT_MODULES="ctl cxgb dpt drm drm2 hptmv ida malo mwl rdma" +# The following drivers don't build with PAE or XEN enabled. +makeoptionsWITHOUT_MODULES="ctl cxgb dpt drm drm2 hptmv ida rdma" + +# The following drivers don't work with PAE enabled. +makeoptionsWITHOUT_MODULES+="asr ncr pst" optionsSCHED_ULE # ULE scheduler optionsPREEMPTION # Enable kernel thread preemption ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278423 - stable/10/sys/i386/xen
Author: marius Date: Sun Feb 8 23:04:32 2015 New Revision: 278423 URL: https://svnweb.freebsd.org/changeset/base/278423 Log: MFC: r274054 (missed in r276076) Fix XEN kernel build. Modified: stable/10/sys/i386/xen/mp_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/xen/mp_machdep.c == --- stable/10/sys/i386/xen/mp_machdep.c Sun Feb 8 23:03:41 2015 (r278422) +++ stable/10/sys/i386/xen/mp_machdep.c Sun Feb 8 23:04:32 2015 (r278423) @@ -604,7 +604,7 @@ init_secondary(void) #endif /* set up FPU state on the AP */ - npxinit(); + npxinit(false); #if 0 /* A quick check from sanity claus */ if (PCPU_GET(apic_id) != lapic_id()) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278422 - head/lib/libedit
Author: bapt Date: Sun Feb 8 23:03:41 2015 New Revision: 278422 URL: https://svnweb.freebsd.org/changeset/base/278422 Log: revert r278414 Reported by: bz Modified: head/lib/libedit/readline.c Modified: head/lib/libedit/readline.c == --- head/lib/libedit/readline.c Sun Feb 8 22:47:34 2015(r278421) +++ head/lib/libedit/readline.c Sun Feb 8 23:03:41 2015(r278422) @@ -395,9 +395,6 @@ readline(const char *p) char *buf; static int used_event_hook; - if (line == NULL) - return 0; - if (e == NULL || h == NULL) rl_initialize(); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278420 - stable/10/bin/ln
Author: jilles Date: Sun Feb 8 22:46:29 2015 New Revision: 278420 URL: https://svnweb.freebsd.org/changeset/base/278420 Log: MFC r276359: symlink(7): Note that stat(1) does not follow symlinks by default. Modified: stable/10/bin/ln/symlink.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/ln/symlink.7 == --- stable/10/bin/ln/symlink.7 Sun Feb 8 22:30:12 2015(r278419) +++ stable/10/bin/ln/symlink.7 Sun Feb 8 22:46:29 2015(r278420) @@ -29,7 +29,7 @@ .\"@(#)symlink.7 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd April 25, 2010 +.Dd December 29, 2014 .Dt SYMLINK 7 .Os .Sh NAME @@ -219,7 +219,7 @@ would change the ownership of .Dq Li slink itself. .Pp -There are four exceptions to this rule. +There are five exceptions to this rule. The .Xr mv 1 and @@ -262,13 +262,12 @@ a file tree.) .Pp The .Xr file 1 -command is also an exception to this rule. -The -.Xr file 1 -command does not follow symbolic links named as argument by default. -The -.Xr file 1 -command does follow symbolic links named as argument if +and +.Xr stat 1 +commands are also exceptions to this rule. +These +commands do not follow symbolic links named as argument by default, +but do follow symbolic links named as argument if the .Fl L option is specified. .Pp ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278421 - stable/9/bin/ln
Author: jilles Date: Sun Feb 8 22:47:34 2015 New Revision: 278421 URL: https://svnweb.freebsd.org/changeset/base/278421 Log: MFC r276359: symlink(7): Note that stat(1) does not follow symlinks by default. Modified: stable/9/bin/ln/symlink.7 Directory Properties: stable/9/bin/ln/ (props changed) Modified: stable/9/bin/ln/symlink.7 == --- stable/9/bin/ln/symlink.7 Sun Feb 8 22:46:29 2015(r278420) +++ stable/9/bin/ln/symlink.7 Sun Feb 8 22:47:34 2015(r278421) @@ -29,7 +29,7 @@ .\"@(#)symlink.7 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd April 25, 2010 +.Dd December 29, 2014 .Dt SYMLINK 7 .Os .Sh NAME @@ -219,7 +219,7 @@ would change the ownership of .Dq Li slink itself. .Pp -There are four exceptions to this rule. +There are five exceptions to this rule. The .Xr mv 1 and @@ -262,13 +262,12 @@ a file tree.) .Pp The .Xr file 1 -command is also an exception to this rule. -The -.Xr file 1 -command does not follow symbolic links named as argument by default. -The -.Xr file 1 -command does follow symbolic links named as argument if +and +.Xr stat 1 +commands are also exceptions to this rule. +These +commands do not follow symbolic links named as argument by default, +but do follow symbolic links named as argument if the .Fl L option is specified. .Pp ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278419 - stable/9/sys/dev/malo
Author: marius Date: Sun Feb 8 22:30:12 2015 New Revision: 278419 URL: https://svnweb.freebsd.org/changeset/base/278419 Log: MFC: r275871 Update the use of bus space macros to be more correct. Modified: stable/9/sys/dev/malo/if_malo_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/malo/if_malo_pci.c == --- stable/9/sys/dev/malo/if_malo_pci.c Sun Feb 8 22:29:57 2015 (r278418) +++ stable/9/sys/dev/malo/if_malo_pci.c Sun Feb 8 22:30:12 2015 (r278419) @@ -223,9 +223,9 @@ malo_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ 0, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL,/* lockfunc */ NULL,/* lockarg */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278418 - stable/10/sys/dev/malo
Author: marius Date: Sun Feb 8 22:29:57 2015 New Revision: 278418 URL: https://svnweb.freebsd.org/changeset/base/278418 Log: MFC: r275871 Update the use of bus space macros to be more correct. Modified: stable/10/sys/dev/malo/if_malo_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/malo/if_malo_pci.c == --- stable/10/sys/dev/malo/if_malo_pci.cSun Feb 8 22:29:06 2015 (r278417) +++ stable/10/sys/dev/malo/if_malo_pci.cSun Feb 8 22:29:57 2015 (r278418) @@ -223,9 +223,9 @@ malo_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ 0, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL,/* lockfunc */ NULL,/* lockarg */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278417 - stable/10/lib/libc/gen
Author: jilles Date: Sun Feb 8 22:29:06 2015 New Revision: 278417 URL: https://svnweb.freebsd.org/changeset/base/278417 Log: MFC r268857: ttyname(3): Fix EBADF/ENOTTY error descriptions. Also, make sure to document the return values and errors for all three functions in the man page. PR: 191931 Modified: stable/10/lib/libc/gen/ttyname.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/ttyname.3 == --- stable/10/lib/libc/gen/ttyname.3Sun Feb 8 22:27:23 2015 (r278416) +++ stable/10/lib/libc/gen/ttyname.3Sun Feb 8 22:29:06 2015 (r278417) @@ -28,7 +28,7 @@ .\" @(#)ttyname.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 14, 2005 +.Dd July 18, 2014 .Dt TTYNAME 3 .Os .Sh NAME @@ -76,6 +76,14 @@ function takes a buffer and length as arguments to avoid this problem. .Sh RETURN VALUES The +.Fn isatty +function returns 1 if +.Fa fd +refers to a terminal type device; +otherwise, it returns 0 and may set +.Va errno +to indicate the error. +The .Fn ttyname function returns the null terminated name if the device is found and @@ -89,15 +97,23 @@ The function returns 0 if successful. Otherwise an error number is returned. .Sh ERRORS -The -.Fn ttyname_r -may fail and return the following error codes: +These functions may fail if: .Bl -tag -width Er -.It Bq Er ENOTTY +.It Bq Er EBADF The .Fa fd argument is not a valid file descriptor. +.It Bq Er ENOTTY +The file associated with +.Fa fd +is not a terminal. +.El +.Pp +Additionally, +.Fn ttyname_r +may fail if: +.Bl -tag -width Er .It Bq Er ERANGE The .Fa bufsize ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278416 - stable/9/sys/dev/mwl
Author: marius Date: Sun Feb 8 22:27:23 2015 New Revision: 278416 URL: https://svnweb.freebsd.org/changeset/base/278416 Log: MFC: r275870 Use the correct macro for listing the maximum bus space size. Modified: stable/9/sys/dev/mwl/if_mwl_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mwl/if_mwl_pci.c == --- stable/9/sys/dev/mwl/if_mwl_pci.c Sun Feb 8 22:27:17 2015 (r278415) +++ stable/9/sys/dev/mwl/if_mwl_pci.c Sun Feb 8 22:27:23 2015 (r278416) @@ -175,9 +175,9 @@ mwl_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ MWL_TXDESC, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL,/* lockfunc */ NULL,/* lockarg */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278415 - stable/10/sys/dev/mwl
Author: marius Date: Sun Feb 8 22:27:17 2015 New Revision: 278415 URL: https://svnweb.freebsd.org/changeset/base/278415 Log: MFC: r275870 Use the correct macro for listing the maximum bus space size. Modified: stable/10/sys/dev/mwl/if_mwl_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mwl/if_mwl_pci.c == --- stable/10/sys/dev/mwl/if_mwl_pci.c Sun Feb 8 22:24:18 2015 (r278414) +++ stable/10/sys/dev/mwl/if_mwl_pci.c Sun Feb 8 22:27:17 2015 (r278415) @@ -175,9 +175,9 @@ mwl_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ MWL_TXDESC, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL,/* lockfunc */ NULL,/* lockarg */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278413 - in stable/10: contrib/netbsd-tests/lib/libc/gen lib/libc/gen
Author: jilles Date: Sun Feb 8 22:24:03 2015 New Revision: 278413 URL: https://svnweb.freebsd.org/changeset/base/278413 Log: MFC r278038: ttyname_r(): Return actual error, not always [ENOTTY]. Adjust the test that used to fail because of this bug. PR: 191936 Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c stable/10/lib/libc/gen/ttyname.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c == --- stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Sun Feb 8 22:17:20 2015(r278412) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Sun Feb 8 22:24:03 2015(r278413) @@ -107,9 +107,6 @@ ATF_TC_BODY(ttyname_r_err, tc) ATF_REQUIRE(rv == ERANGE); } -#ifdef __FreeBSD__ - atf_tc_expect_fail("FreeBSD returns ENOTTY instead of EBADF; see bin/191936"); -#endif rv = ttyname_r(-1, buf, ttymax); ATF_REQUIRE(rv == EBADF); Modified: stable/10/lib/libc/gen/ttyname.c == --- stable/10/lib/libc/gen/ttyname.cSun Feb 8 22:17:20 2015 (r278412) +++ stable/10/lib/libc/gen/ttyname.cSun Feb 8 22:24:03 2015 (r278413) @@ -65,7 +65,7 @@ ttyname_r(int fd, char *buf, size_t len) /* Must be a terminal. */ if (!isatty(fd)) - return (ENOTTY); + return (errno); /* Must have enough room */ if (len <= sizeof(_PATH_DEV)) return (ERANGE); @@ -73,7 +73,7 @@ ttyname_r(int fd, char *buf, size_t len) strcpy(buf, _PATH_DEV); used = strlen(buf); if (fdevname_r(fd, buf + used, len - used) == NULL) - return (ENOTTY); + return (errno == EINVAL ? ERANGE : errno); return (0); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278414 - head/lib/libedit
Author: bapt Date: Sun Feb 8 22:24:18 2015 New Revision: 278414 URL: https://svnweb.freebsd.org/changeset/base/278414 Log: Reapply r255891 Modified: head/lib/libedit/readline.c Modified: head/lib/libedit/readline.c == --- head/lib/libedit/readline.c Sun Feb 8 22:24:03 2015(r278413) +++ head/lib/libedit/readline.c Sun Feb 8 22:24:18 2015(r278414) @@ -395,6 +395,9 @@ readline(const char *p) char *buf; static int used_event_hook; + if (line == NULL) + return 0; + if (e == NULL || h == NULL) rl_initialize(); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278412 - stable/10/sys/ia64/ia64
Author: peter Date: Sun Feb 8 22:17:20 2015 New Revision: 278412 URL: https://svnweb.freebsd.org/changeset/base/278412 Log: Repair ia64 build after r278347 - remove const from set_mcontext Modified: stable/10/sys/ia64/ia64/machdep.c Modified: stable/10/sys/ia64/ia64/machdep.c == --- stable/10/sys/ia64/ia64/machdep.c Sun Feb 8 22:11:24 2015 (r278411) +++ stable/10/sys/ia64/ia64/machdep.c Sun Feb 8 22:17:20 2015 (r278412) @@ -1262,7 +1262,7 @@ get_mcontext(struct thread *td, mcontext } int -set_mcontext(struct thread *td, const mcontext_t *mc) +set_mcontext(struct thread *td, mcontext_t *mc) { struct _special s; struct trapframe *tf; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278411 - stable/10/lib/libedit
Author: bapt Date: Sun Feb 8 22:11:24 2015 New Revision: 278411 URL: https://svnweb.freebsd.org/changeset/base/278411 Log: MFC: r265863 libedit: add H_SAVE_FP which saves history to a file pointer. H_SAVE_FP is similar to H_SAVE but operates on a FILE* instead of a filename. This is useful when operating in capability mode. Reviewed by: chris...@netbsd.org, pfg Modified: stable/10/lib/libedit/editline.3 stable/10/lib/libedit/hist.h stable/10/lib/libedit/histedit.h stable/10/lib/libedit/history.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libedit/editline.3 == --- stable/10/lib/libedit/editline.3Sun Feb 8 21:58:25 2015 (r278410) +++ stable/10/lib/libedit/editline.3Sun Feb 8 22:11:24 2015 (r278411) @@ -682,6 +682,9 @@ Load the history list stored in .It Dv H_SAVE , Fa "const char *file" Save the history list to .Fa file . +.It Dv H_SAVE_FP , Fa "FILE*" +Save the history list to the opened +.Fa FILE* . .It Dv H_SETUNIQUE , Fa "int unique" Set flag that adjacent identical event strings should not be entered into the history. Modified: stable/10/lib/libedit/hist.h == --- stable/10/lib/libedit/hist.hSun Feb 8 21:58:25 2015 (r278410) +++ stable/10/lib/libedit/hist.hSun Feb 8 22:11:24 2015 (r278411) @@ -65,6 +65,7 @@ typedef struct el_history_t { #defineHIST_SET(el, num) HIST_FUN(el, H_SET, num) #defineHIST_LOAD(el, fname)HIST_FUN(el, H_LOAD fname) #defineHIST_SAVE(el, fname)HIST_FUN(el, H_SAVE fname) +#defineHIST_SAVE_FP(el, fp)HIST_FUN(el, H_SAVE_FP fp) protected int hist_init(EditLine *); protected void hist_end(EditLine *); Modified: stable/10/lib/libedit/histedit.h == --- stable/10/lib/libedit/histedit.hSun Feb 8 21:58:25 2015 (r278410) +++ stable/10/lib/libedit/histedit.hSun Feb 8 22:11:24 2015 (r278411) @@ -208,6 +208,7 @@ int history(History *, HistEvent *, int #defineH_NEXT_EVDATA 23 /* , const int, histdata_t *); */ #defineH_DELDATA 24 /* , int, histdata_t *);*/ #defineH_REPLACE 25 /* , const char *, histdata_t); */ +#defineH_SAVE_FP 26 /* , FILE*);*/ /* Modified: stable/10/lib/libedit/history.c == --- stable/10/lib/libedit/history.c Sun Feb 8 21:58:25 2015 (r278410) +++ stable/10/lib/libedit/history.c Sun Feb 8 22:11:24 2015 (r278411) @@ -103,6 +103,7 @@ private int history_getunique(History *, private int history_set_fun(History *, History *); private int history_load(History *, const char *); private int history_save(History *, const char *); +private int history_save_fp(History *, FILE*); private int history_prev_event(History *, HistEvent *, int); private int history_next_event(History *, HistEvent *, int); private int history_next_string(History *, HistEvent *, const char *); @@ -773,22 +774,16 @@ done: return (i); } - -/* history_save(): - * History save function +/* history_save_fp(): + * History save with open FILE* */ -private int -history_save(History *h, const char *fname) +private int history_save_fp(History *h, FILE* fp) { - FILE *fp; HistEvent ev; int i = -1, retval; size_t len, max_size; char *ptr; - if ((fp = fopen(fname, "w")) == NULL) - return (-1); - if (fchmod(fileno(fp), S_IRUSR|S_IWUSR) == -1) goto done; if (fputs(hist_cookie, fp) == EOF) @@ -816,6 +811,26 @@ history_save(History *h, const char *fna oomem: h_free((ptr_t)ptr); done: + return (i); + +} + + +/* history_save(): + * History save function + */ +private int +history_save(History *h, const char *fname) +{ + FILE *fp; + int i; + + if ((fp = fopen(fname, "w")) == NULL) + return (-1); + + i = history_save_fp(h, fp); + +done: (void) fclose(fp); return (i); } @@ -1001,6 +1016,12 @@ history(History *h, HistEvent *ev, int f he_seterrev(ev, _HE_HIST_WRITE); break; + case H_SAVE_FP: + retval = history_save_fp(h, va_arg(va, FILE*)); + if (retval == -1) + he_seterrev(ev, _HE_HIST_WRITE); + break; + case H_PREV_EVENT: retval = history_prev_event(h, ev, va_arg(va, int)); break; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail
svn commit: r278410 - stable/10/lib/libc/gen
Author: jilles Date: Sun Feb 8 21:58:25 2015 New Revision: 278410 URL: https://svnweb.freebsd.org/changeset/base/278410 Log: MFC r277862: sem_post(): Fix and document semaphore value overflow error. The error code is per Austin Group issue #315. I provided different wording for the manual page change. Submitted by: pluknet Modified: stable/10/lib/libc/gen/sem_new.c stable/10/lib/libc/gen/sem_post.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/sem_new.c == --- stable/10/lib/libc/gen/sem_new.cSun Feb 8 21:49:29 2015 (r278409) +++ stable/10/lib/libc/gen/sem_new.cSun Feb 8 21:58:25 2015 (r278410) @@ -439,8 +439,10 @@ _sem_post(sem_t *sem) do { count = sem->_kern._count; - if (count + 1 > SEM_VALUE_MAX) - return (EOVERFLOW); + if (count + 1 > SEM_VALUE_MAX) { + errno = EOVERFLOW; + return (-1); + } } while(!atomic_cmpset_rel_int(&sem->_kern._count, count, count+1)); (void)usem_wake(&sem->_kern); return (0); Modified: stable/10/lib/libc/gen/sem_post.3 == --- stable/10/lib/libc/gen/sem_post.3 Sun Feb 8 21:49:29 2015 (r278409) +++ stable/10/lib/libc/gen/sem_post.3 Sun Feb 8 21:58:25 2015 (r278410) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2000 +.Dd January 28, 2015 .Dt SEM_POST 3 .Os .Sh NAME @@ -65,6 +65,9 @@ The .Fa sem argument points to an invalid semaphore. +.It Bq Er EOVERFLOW +The semaphore value would exceed +.Dv SEM_VALUE_MAX . .El .Sh SEE ALSO .Xr sem_getvalue 3 , ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278409 - stable/8/sys/dev/uart
Author: marius Date: Sun Feb 8 21:49:29 2015 New Revision: 278409 URL: https://svnweb.freebsd.org/changeset/base/278409 Log: MFC: r266744, r267712, r276351, r277043 - Add PCI ID for AMT based serial interface found on the Lenovo T61. - add support for MosChip MCS9922... This is found on an ExpressCard.. [1] - Add PCI ID for the Oxford Semiconductor OXPCIe952 device. PR: 186891 [1] Modified: stable/8/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/uart/ (props changed) Modified: stable/8/sys/dev/uart/uart_bus_pci.c == --- stable/8/sys/dev/uart/uart_bus_pci.cSun Feb 8 21:41:26 2015 (r278408) +++ stable/8/sys/dev/uart/uart_bus_pci.cSun Feb 8 21:49:29 2015 (r278409) @@ -112,12 +112,15 @@ static const struct pci_id pci_ns8250_id 8 * DEFAULT_RCLK }, { 0x1415, 0x950b, 0x, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART", 0x10, 16384000 }, +{ 0x1415, 0xc120, 0x, 0, "Oxford Semiconductor OXPCIe952 PCIe 16950 UART", + 0x10 }, { 0x14e4, 0x4344, 0x, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x, 0x, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x1fd4, 0x1999, 0x1fd4, 0x0001, "Sunix SER5 Serial Port", 0x10, 8 * DEFAULT_RCLK }, { 0x8086, 0x1c3d, 0x, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0x, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, +{ 0x8086, 0x2a07, 0x, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 }, { 0x8086, 0x2e17, 0x, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0x, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, @@ -135,6 +138,8 @@ static const struct pci_id pci_ns8250_id "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9904, 0xa000, 0x1000, "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, +{ 0x9710, 0x9922, 0xa000, 0x1000, + "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0x, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0x, 0, 0x, 0, NULL, 0, 0} }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278408 - stable/9/sys/dev/uart
Author: marius Date: Sun Feb 8 21:41:26 2015 New Revision: 278408 URL: https://svnweb.freebsd.org/changeset/base/278408 Log: MFC: r266744, r267712, r276351, r277043 - Add PCI ID for AMT based serial interface found on the Lenovo T61. - add support for MosChip MCS9922... This is found on an ExpressCard.. [1] - Add PCI ID for the Oxford Semiconductor OXPCIe952 device. PR: 186891 [1] Modified: stable/9/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/uart/uart_bus_pci.c == --- stable/9/sys/dev/uart/uart_bus_pci.cSun Feb 8 21:41:18 2015 (r278407) +++ stable/9/sys/dev/uart/uart_bus_pci.cSun Feb 8 21:41:26 2015 (r278408) @@ -112,12 +112,15 @@ static const struct pci_id pci_ns8250_id 8 * DEFAULT_RCLK }, { 0x1415, 0x950b, 0x, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART", 0x10, 16384000 }, +{ 0x1415, 0xc120, 0x, 0, "Oxford Semiconductor OXPCIe952 PCIe 16950 UART", + 0x10 }, { 0x14e4, 0x4344, 0x, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x, 0x, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x1fd4, 0x1999, 0x1fd4, 0x0001, "Sunix SER5 Serial Port", 0x10, 8 * DEFAULT_RCLK }, { 0x8086, 0x1c3d, 0x, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0x, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, +{ 0x8086, 0x2a07, 0x, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 }, { 0x8086, 0x2e17, 0x, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0x, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, @@ -136,6 +139,8 @@ static const struct pci_id pci_ns8250_id "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9904, 0xa000, 0x1000, "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, +{ 0x9710, 0x9922, 0xa000, 0x1000, + "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0x, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0x, 0, 0x, 0, NULL, 0, 0} }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278407 - stable/10/sys/dev/uart
Author: marius Date: Sun Feb 8 21:41:18 2015 New Revision: 278407 URL: https://svnweb.freebsd.org/changeset/base/278407 Log: MFC: r266744, r267712, r276351, r277043 - Add PCI ID for AMT based serial interface found on the Lenovo T61. - add support for MosChip MCS9922... This is found on an ExpressCard.. [1] - Add PCI ID for the Oxford Semiconductor OXPCIe952 device. PR: 186891 [1] Modified: stable/10/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/uart/uart_bus_pci.c == --- stable/10/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:31:49 2015 (r278406) +++ stable/10/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:41:18 2015 (r278407) @@ -112,12 +112,15 @@ static const struct pci_id pci_ns8250_id 8 * DEFAULT_RCLK }, { 0x1415, 0x950b, 0x, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART", 0x10, 16384000 }, +{ 0x1415, 0xc120, 0x, 0, "Oxford Semiconductor OXPCIe952 PCIe 16950 UART", + 0x10 }, { 0x14e4, 0x4344, 0x, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x, 0x, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x1fd4, 0x1999, 0x1fd4, 0x0001, "Sunix SER5 Serial Port", 0x10, 8 * DEFAULT_RCLK }, { 0x8086, 0x1c3d, 0x, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0x, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, +{ 0x8086, 0x2a07, 0x, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 }, { 0x8086, 0x2e17, 0x, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0x, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, @@ -136,6 +139,8 @@ static const struct pci_id pci_ns8250_id "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9904, 0xa000, 0x1000, "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, +{ 0x9710, 0x9922, 0xa000, 0x1000, + "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0x, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0x, 0, 0x, 0, NULL, 0, 0} }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278406 - stable/9/sys/dev/ahci
Author: marius Date: Sun Feb 8 21:31:49 2015 New Revision: 278406 URL: https://svnweb.freebsd.org/changeset/base/278406 Log: MFC: r276344 - Const'ify the ahci_ids table. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c == --- stable/9/sys/dev/ahci/ahci.cSun Feb 8 21:31:40 2015 (r278405) +++ stable/9/sys/dev/ahci/ahci.cSun Feb 8 21:31:49 2015 (r278406) @@ -103,7 +103,7 @@ static void ahcipoll(struct cam_sim *sim static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); -static struct { +static const struct { uint32_tid; uint8_t rev; const char *name; @@ -977,14 +977,14 @@ static device_method_t ahci_methods[] = DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_driver = { "ahci", ahci_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, 0, 0); +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_attach), @@ -997,14 +997,14 @@ static device_method_t ahci_ata_methods[ DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_ata_driver = { "ahci", ahci_ata_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, NULL, NULL); MODULE_VERSION(ahci, 1); MODULE_DEPEND(ahci, cam, 1, 1, 1); @@ -1290,14 +1290,14 @@ static device_method_t ahcich_methods[] DEVMETHOD(device_detach,ahci_ch_detach), DEVMETHOD(device_suspend, ahci_ch_suspend), DEVMETHOD(device_resume,ahci_ch_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahcich_driver = { "ahcich", ahcich_methods, sizeof(struct ahci_channel) }; -DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, 0, 0); +DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, NULL, NULL); static void ahci_ch_setleds(device_t dev) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278405 - stable/10/sys/dev/ahci
Author: marius Date: Sun Feb 8 21:31:40 2015 New Revision: 278405 URL: https://svnweb.freebsd.org/changeset/base/278405 Log: MFC: r276344 - Const'ify the ahci_ids table. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/10/sys/dev/ahci/ahci.c stable/10/sys/dev/ahci/ahciem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c == --- stable/10/sys/dev/ahci/ahci.c Sun Feb 8 21:12:54 2015 (r278404) +++ stable/10/sys/dev/ahci/ahci.c Sun Feb 8 21:31:40 2015 (r278405) @@ -99,7 +99,7 @@ static void ahcipoll(struct cam_sim *sim static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); -static struct { +static const struct { uint32_tid; uint8_t rev; const char *name; @@ -1024,14 +1024,14 @@ static device_method_t ahci_methods[] = DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_driver = { "ahci", ahci_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, 0, 0); +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_attach), @@ -1044,14 +1044,14 @@ static device_method_t ahci_ata_methods[ DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_ata_driver = { "ahci", ahci_ata_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, NULL, NULL); MODULE_VERSION(ahci, 1); MODULE_DEPEND(ahci, cam, 1, 1, 1); @@ -1317,14 +1317,14 @@ static device_method_t ahcich_methods[] DEVMETHOD(device_detach,ahci_ch_detach), DEVMETHOD(device_suspend, ahci_ch_suspend), DEVMETHOD(device_resume,ahci_ch_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahcich_driver = { "ahcich", ahcich_methods, sizeof(struct ahci_channel) }; -DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, 0, 0); +DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, NULL, NULL); struct ahci_dc_cb_args { bus_addr_t maddr; Modified: stable/10/sys/dev/ahci/ahciem.c == --- stable/10/sys/dev/ahci/ahciem.c Sun Feb 8 21:12:54 2015 (r278404) +++ stable/10/sys/dev/ahci/ahciem.c Sun Feb 8 21:31:40 2015 (r278405) @@ -273,14 +273,14 @@ static device_method_t ahciem_methods[] DEVMETHOD(device_detach,ahci_em_detach), DEVMETHOD(device_suspend, ahci_em_suspend), DEVMETHOD(device_resume,ahci_em_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahciem_driver = { "ahciem", ahciem_methods, sizeof(struct ahci_enclosure) }; -DRIVER_MODULE(ahciem, ahci, ahciem_driver, ahciem_devclass, 0, 0); +DRIVER_MODULE(ahciem, ahci, ahciem_driver, ahciem_devclass, NULL, NULL); static void ahci_em_setleds(device_t dev, int c) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278404 - stable/9/sys/dev/bce
Author: marius Date: Sun Feb 8 21:12:54 2015 New Revision: 278404 URL: https://svnweb.freebsd.org/changeset/base/278404 Log: MFC: r276313 Const'ify a firmware image missed in r251142 (MFCed to stable/9 in r225736). Modified: stable/9/sys/dev/bce/if_bcefw.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bce/if_bcefw.h == --- stable/9/sys/dev/bce/if_bcefw.h Sun Feb 8 21:12:48 2015 (r278403) +++ stable/9/sys/dev/bce/if_bcefw.h Sun Feb 8 21:12:54 2015 (r278404) @@ -7997,7 +7997,7 @@ const u32 bce_TPAT_b09FwBss[(0x12b4/4) + const u32 bce_TPAT_b09FwSbss[(0x3c/4) + 1] = { 0x0 }; const u32 bce_TPAT_b09FwSdata[(0x0/4) + 1] = { 0x0 }; - + intbce_COM_b09FwReleaseMajor = 0x6; intbce_COM_b09FwReleaseMinor = 0x0; intbce_COM_b09FwReleaseFix = 0x11; @@ -11727,8 +11727,8 @@ const u32 bce_RXP_b09FwText[(0x9090/4) + 0x90cf0009, 0x240d0004, 0x31ee00ff, 0x11cdfd85, 0x24020001, 0x3c010801, 0xa022950d, 0xa002154, 0x0, 0x0 }; -u32bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; -u32bce_RXP_b09FwRodata[(0x33c/4) + 1] = { +const u32 bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; +const u32 bce_RXP_b09FwRodata[(0x33c/4) + 1] = { 0x8003344, 0x8003344, 0x8003420, 0x80033f4, 0x80033d8, 0x8003328, 0x8003328, 0x8003328, 0x800334c, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278403 - stable/10/sys/dev/bce
Author: marius Date: Sun Feb 8 21:12:48 2015 New Revision: 278403 URL: https://svnweb.freebsd.org/changeset/base/278403 Log: MFC: r276313 Const'ify a firmware image missed in r251142. Modified: stable/10/sys/dev/bce/if_bcefw.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bce/if_bcefw.h == --- stable/10/sys/dev/bce/if_bcefw.hSun Feb 8 21:00:51 2015 (r278402) +++ stable/10/sys/dev/bce/if_bcefw.hSun Feb 8 21:12:48 2015 (r278403) @@ -7997,7 +7997,7 @@ const u32 bce_TPAT_b09FwBss[(0x12b4/4) + const u32 bce_TPAT_b09FwSbss[(0x3c/4) + 1] = { 0x0 }; const u32 bce_TPAT_b09FwSdata[(0x0/4) + 1] = { 0x0 }; - + intbce_COM_b09FwReleaseMajor = 0x6; intbce_COM_b09FwReleaseMinor = 0x0; intbce_COM_b09FwReleaseFix = 0x11; @@ -11727,8 +11727,8 @@ const u32 bce_RXP_b09FwText[(0x9090/4) + 0x90cf0009, 0x240d0004, 0x31ee00ff, 0x11cdfd85, 0x24020001, 0x3c010801, 0xa022950d, 0xa002154, 0x0, 0x0 }; -u32bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; -u32bce_RXP_b09FwRodata[(0x33c/4) + 1] = { +const u32 bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; +const u32 bce_RXP_b09FwRodata[(0x33c/4) + 1] = { 0x8003344, 0x8003344, 0x8003420, 0x80033f4, 0x80033d8, 0x8003328, 0x8003328, 0x8003328, 0x800334c, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278402 - head/sys/kern
Author: alc Date: Sun Feb 8 21:00:51 2015 New Revision: 278402 URL: https://svnweb.freebsd.org/changeset/base/278402 Log: Preset the object's color, or alignment, to maximize superpage usage. MFC after:5 days Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c == --- head/sys/kern/uipc_shm.cSun Feb 8 20:48:17 2015(r278401) +++ head/sys/kern/uipc_shm.cSun Feb 8 21:00:51 2015(r278402) @@ -531,9 +531,10 @@ shm_alloc(struct ucred *ucred, mode_t mo shmfd->shm_object = vm_pager_allocate(OBJT_DEFAULT, NULL, shmfd->shm_size, VM_PROT_DEFAULT, 0, ucred); KASSERT(shmfd->shm_object != NULL, ("shm_create: vm_pager_allocate")); + shmfd->shm_object->pg_color = 0; VM_OBJECT_WLOCK(shmfd->shm_object); vm_object_clear_flag(shmfd->shm_object, OBJ_ONEMAPPING); - vm_object_set_flag(shmfd->shm_object, OBJ_NOSPLIT); + vm_object_set_flag(shmfd->shm_object, OBJ_COLORED | OBJ_NOSPLIT); VM_OBJECT_WUNLOCK(shmfd->shm_object); vfs_timestamp(&shmfd->shm_birthtime); shmfd->shm_atime = shmfd->shm_mtime = shmfd->shm_ctime = ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278400 - in stable/9/sys/dev: bge pci
Author: marius Date: Sun Feb 8 20:44:50 2015 New Revision: 278400 URL: https://svnweb.freebsd.org/changeset/base/278400 Log: MFC: r276299 - Make PCI_QUIRK_MSI_INTX_BUG work by using the ID of the actual PCI device for the lookup. - For devices affected by PCI_QUIRK_MSI_INTX_BUG, ensure PCIM_CMD_INTxDIS is cleared when using MSI/MSI-X. - Employ PCI_QUIRK_MSI_INTX_BUG for BCM5714(S)/BCM5715(S)/BCM5780(S) rather than clearing PCIM_CMD_INTxDIS unconditionally for all devices in bge(4). Modified: stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/pci/pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c == --- stable/9/sys/dev/bge/if_bge.c Sun Feb 8 20:44:44 2015 (r278399) +++ stable/9/sys/dev/bge/if_bge.c Sun Feb 8 20:44:50 2015 (r278400) @@ -1937,11 +1937,9 @@ bge_chipinit(struct bge_softc *sc) /* * Disable memory write invalidate. Apparently it is not supported -* properly by these devices. Also ensure that INTx isn't disabled, -* as these chips need it even when using MSI. +* properly by these devices. */ - PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, - PCIM_CMD_INTxDIS | PCIM_CMD_MWIEN, 4); + PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, PCIM_CMD_MWIEN, 4); /* Set the timer prescaler (always 66 MHz). */ CSR_WRITE_4(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ); Modified: stable/9/sys/dev/pci/pci.c == --- stable/9/sys/dev/pci/pci.c Sun Feb 8 20:44:44 2015(r278399) +++ stable/9/sys/dev/pci/pci.c Sun Feb 8 20:44:50 2015(r278400) @@ -270,7 +270,7 @@ static const struct pci_quirk pci_quirks { 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 }, /* -* Atheros AR8161/AR8162/E2200 ethernet controller has a bug that +* Atheros AR8161/AR8162/E2200 Ethernet controllers have a bug that * MSI interrupt does not assert if PCIM_CMD_INTxDIS bit of the * command register is set. */ @@ -278,6 +278,17 @@ static const struct pci_quirk pci_quirks { 0xE0911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0x10901969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + /* +* Broadcom BCM5714(S)/BCM5715(S)/BCM5780(S) Ethernet MACs don't +* issue MSI interrupts with PCIM_CMD_INTxDIS set either. +*/ + { 0x166814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714 */ + { 0x166914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714S */ + { 0x166a14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780 */ + { 0x166b14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780S */ + { 0x167814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715 */ + { 0x167914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715S */ + { 0 } }; @@ -3567,14 +3578,16 @@ pci_setup_intr(device_t dev, device_t ch mte->mte_handlers++; } - if (!pci_has_quirk(pci_get_devid(dev), - PCI_QUIRK_MSI_INTX_BUG)) { - /* -* Make sure that INTx is disabled if we are -* using MSI/MSIX -*/ + /* +* Make sure that INTx is disabled if we are using MSI/MSI-X, +* unless the device is affected by PCI_QUIRK_MSI_INTX_BUG, +* in which case we "enable" INTx so MSI/MSI-X actually works. +*/ + if (!pci_has_quirk(pci_get_devid(child), + PCI_QUIRK_MSI_INTX_BUG)) pci_set_command_bit(dev, child, PCIM_CMD_INTxDIS); - } + else + pci_clear_command_bit(dev, child, PCIM_CMD_INTxDIS); bad: if (error) { (void)bus_generic_teardown_intr(dev, child, irq, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278399 - in stable/10/sys/dev: bge pci
Author: marius Date: Sun Feb 8 20:44:44 2015 New Revision: 278399 URL: https://svnweb.freebsd.org/changeset/base/278399 Log: MFC: r276299 - Make PCI_QUIRK_MSI_INTX_BUG work by using the ID of the actual PCI device for the lookup. - For devices affected by PCI_QUIRK_MSI_INTX_BUG, ensure PCIM_CMD_INTxDIS is cleared when using MSI/MSI-X. - Employ PCI_QUIRK_MSI_INTX_BUG for BCM5714(S)/BCM5715(S)/BCM5780(S) rather than clearing PCIM_CMD_INTxDIS unconditionally for all devices in bge(4). Modified: stable/10/sys/dev/bge/if_bge.c stable/10/sys/dev/pci/pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bge/if_bge.c == --- stable/10/sys/dev/bge/if_bge.c Sun Feb 8 19:18:23 2015 (r278398) +++ stable/10/sys/dev/bge/if_bge.c Sun Feb 8 20:44:44 2015 (r278399) @@ -1937,11 +1937,9 @@ bge_chipinit(struct bge_softc *sc) /* * Disable memory write invalidate. Apparently it is not supported -* properly by these devices. Also ensure that INTx isn't disabled, -* as these chips need it even when using MSI. +* properly by these devices. */ - PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, - PCIM_CMD_INTxDIS | PCIM_CMD_MWIEN, 4); + PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, PCIM_CMD_MWIEN, 4); /* Set the timer prescaler (always 66 MHz). */ CSR_WRITE_4(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ); Modified: stable/10/sys/dev/pci/pci.c == --- stable/10/sys/dev/pci/pci.c Sun Feb 8 19:18:23 2015(r278398) +++ stable/10/sys/dev/pci/pci.c Sun Feb 8 20:44:44 2015(r278399) @@ -257,7 +257,7 @@ static const struct pci_quirk pci_quirks { 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 }, /* -* Atheros AR8161/AR8162/E2200 ethernet controller has a bug that +* Atheros AR8161/AR8162/E2200 Ethernet controllers have a bug that * MSI interrupt does not assert if PCIM_CMD_INTxDIS bit of the * command register is set. */ @@ -265,6 +265,17 @@ static const struct pci_quirk pci_quirks { 0xE0911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0x10901969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + /* +* Broadcom BCM5714(S)/BCM5715(S)/BCM5780(S) Ethernet MACs don't +* issue MSI interrupts with PCIM_CMD_INTxDIS set either. +*/ + { 0x166814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714 */ + { 0x166914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714S */ + { 0x166a14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780 */ + { 0x166b14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780S */ + { 0x167814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715 */ + { 0x167914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715S */ + { 0 } }; @@ -3634,14 +3645,16 @@ pci_setup_intr(device_t dev, device_t ch mte->mte_handlers++; } - if (!pci_has_quirk(pci_get_devid(dev), - PCI_QUIRK_MSI_INTX_BUG)) { - /* -* Make sure that INTx is disabled if we are -* using MSI/MSIX -*/ + /* +* Make sure that INTx is disabled if we are using MSI/MSI-X, +* unless the device is affected by PCI_QUIRK_MSI_INTX_BUG, +* in which case we "enable" INTx so MSI/MSI-X actually works. +*/ + if (!pci_has_quirk(pci_get_devid(child), + PCI_QUIRK_MSI_INTX_BUG)) pci_set_command_bit(dev, child, PCIM_CMD_INTxDIS); - } + else + pci_clear_command_bit(dev, child, PCIM_CMD_INTxDIS); bad: if (error) { (void)bus_generic_teardown_intr(dev, child, irq, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278398 - head/sys/cam/ctl
Author: trasz Date: Sun Feb 8 19:18:23 2015 New Revision: 278398 URL: https://svnweb.freebsd.org/changeset/base/278398 Log: Fix ordering of "*logout" and "*terminate"; no functional changes. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c == --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Feb 8 19:15:14 2015 (r278397) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Feb 8 19:18:23 2015 (r278398) @@ -1702,41 +1702,40 @@ cfiscsi_ioctl_list(struct ctl_iscsi *ci) } static void -cfiscsi_ioctl_terminate(struct ctl_iscsi *ci) +cfiscsi_ioctl_logout(struct ctl_iscsi *ci) { struct icl_pdu *response; struct iscsi_bhs_asynchronous_message *bhsam; - struct ctl_iscsi_terminate_params *citp; + struct ctl_iscsi_logout_params *cilp; struct cfiscsi_session *cs; struct cfiscsi_softc *softc; int found = 0; - citp = (struct ctl_iscsi_terminate_params *)&(ci->data); + cilp = (struct ctl_iscsi_logout_params *)&(ci->data); softc = &cfiscsi_softc; mtx_lock(&softc->lock); TAILQ_FOREACH(cs, &softc->sessions, cs_next) { - if (citp->all == 0 && cs->cs_id != citp->connection_id && - strcmp(cs->cs_initiator_name, citp->initiator_name) != 0 && - strcmp(cs->cs_initiator_addr, citp->initiator_addr) != 0) + if (cilp->all == 0 && cs->cs_id != cilp->connection_id && + strcmp(cs->cs_initiator_name, cilp->initiator_name) != 0 && + strcmp(cs->cs_initiator_addr, cilp->initiator_addr) != 0) continue; response = icl_pdu_new(cs->cs_conn, M_NOWAIT); if (response == NULL) { - /* -* Oh well. Just terminate the connection. -*/ - } else { - bhsam = (struct iscsi_bhs_asynchronous_message *) - response->ip_bhs; - bhsam->bhsam_opcode = ISCSI_BHS_OPCODE_ASYNC_MESSAGE; - bhsam->bhsam_flags = 0x80; - bhsam->bhsam_0x = 0x; - bhsam->bhsam_async_event = - BHSAM_EVENT_TARGET_TERMINATES_SESSION; - cfiscsi_pdu_queue(response); + ci->status = CTL_ISCSI_ERROR; + snprintf(ci->error_str, sizeof(ci->error_str), + "Unable to allocate memory"); + mtx_unlock(&softc->lock); + return; } - cfiscsi_session_terminate(cs); + bhsam = + (struct iscsi_bhs_asynchronous_message *)response->ip_bhs; + bhsam->bhsam_opcode = ISCSI_BHS_OPCODE_ASYNC_MESSAGE; + bhsam->bhsam_flags = 0x80; + bhsam->bhsam_async_event = BHSAM_EVENT_TARGET_REQUESTS_LOGOUT; + bhsam->bhsam_parameter3 = htons(10); + cfiscsi_pdu_queue(response); found++; } mtx_unlock(&softc->lock); @@ -1752,40 +1751,41 @@ cfiscsi_ioctl_terminate(struct ctl_iscsi } static void -cfiscsi_ioctl_logout(struct ctl_iscsi *ci) +cfiscsi_ioctl_terminate(struct ctl_iscsi *ci) { struct icl_pdu *response; struct iscsi_bhs_asynchronous_message *bhsam; - struct ctl_iscsi_logout_params *cilp; + struct ctl_iscsi_terminate_params *citp; struct cfiscsi_session *cs; struct cfiscsi_softc *softc; int found = 0; - cilp = (struct ctl_iscsi_logout_params *)&(ci->data); + citp = (struct ctl_iscsi_terminate_params *)&(ci->data); softc = &cfiscsi_softc; mtx_lock(&softc->lock); TAILQ_FOREACH(cs, &softc->sessions, cs_next) { - if (cilp->all == 0 && cs->cs_id != cilp->connection_id && - strcmp(cs->cs_initiator_name, cilp->initiator_name) != 0 && - strcmp(cs->cs_initiator_addr, cilp->initiator_addr) != 0) + if (citp->all == 0 && cs->cs_id != citp->connection_id && + strcmp(cs->cs_initiator_name, citp->initiator_name) != 0 && + strcmp(cs->cs_initiator_addr, citp->initiator_addr) != 0) continue; response = icl_pdu_new(cs->cs_conn, M_NOWAIT); if (response == NULL) { - ci->status = CTL_ISCSI_ERROR; - snprintf(ci->error_str, sizeof(ci->error_str), - "Unable to allocate memory"); - mtx_unlock(&softc->lock); - return; + /* +* Oh well. Just ter
svn commit: r278397 - in head/sys: cam/ctl dev/iscsi
Author: trasz Date: Sun Feb 8 19:15:14 2015 New Revision: 278397 URL: https://svnweb.freebsd.org/changeset/base/278397 Log: Extend ICL to add receive offload methods. For software ICL backend they are no-ops. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c head/sys/cam/ctl/ctl_frontend_iscsi.h head/sys/dev/iscsi/icl_conn_if.m head/sys/dev/iscsi/icl_soft.c head/sys/dev/iscsi/icl_wrappers.h head/sys/dev/iscsi/iscsi.c head/sys/dev/iscsi/iscsi.h Modified: head/sys/cam/ctl/ctl_frontend_iscsi.c == --- head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Feb 8 19:12:38 2015 (r278396) +++ head/sys/cam/ctl/ctl_frontend_iscsi.c Sun Feb 8 19:15:14 2015 (r278397) @@ -164,6 +164,12 @@ static voidcfiscsi_pdu_handle_task_requ static voidcfiscsi_pdu_handle_data_out(struct icl_pdu *request); static voidcfiscsi_pdu_handle_logout_request(struct icl_pdu *request); static voidcfiscsi_session_terminate(struct cfiscsi_session *cs); +static struct cfiscsi_data_wait*cfiscsi_data_wait_new( + struct cfiscsi_session *cs, union ctl_io *io, + uint32_t initiator_task_tag, + uint32_t *target_transfer_tagp); +static voidcfiscsi_data_wait_free(struct cfiscsi_session *cs, + struct cfiscsi_data_wait *cdw); static struct cfiscsi_target *cfiscsi_target_find(struct cfiscsi_softc *softc, const char *name, uint16_t tag); static struct cfiscsi_target *cfiscsi_target_find_or_create( @@ -929,7 +935,7 @@ cfiscsi_pdu_handle_data_out(struct icl_p CFISCSI_SESSION_UNLOCK(cs); done = (io->scsiio.ext_data_filled != cdw->cdw_r2t_end || io->scsiio.ext_data_filled == io->scsiio.kern_data_len); - uma_zfree(cfiscsi_data_wait_zone, cdw); + cfiscsi_data_wait_free(cs, cdw); if (done) io->scsiio.be_move_done(io); else @@ -1067,6 +1073,45 @@ cfiscsi_callout(void *context) cfiscsi_pdu_queue(cp); } +static struct cfiscsi_data_wait * +cfiscsi_data_wait_new(struct cfiscsi_session *cs, union ctl_io *io, +uint32_t initiator_task_tag, uint32_t *target_transfer_tagp) +{ + struct cfiscsi_data_wait *cdw; + int error; + + cdw = uma_zalloc(cfiscsi_data_wait_zone, M_NOWAIT | M_ZERO); + if (cdw == NULL) { + CFISCSI_SESSION_WARN(cs, + "failed to allocate %zd bytes", sizeof(*cdw)); + return (NULL); + } + + error = icl_conn_transfer_setup(cs->cs_conn, io, target_transfer_tagp, + &cdw->cdw_icl_prv); + if (error != 0) { + CFISCSI_SESSION_WARN(cs, + "icl_conn_transfer_setup() failed with error %d", error); + uma_zfree(cfiscsi_data_wait_zone, cdw); + return (NULL); + } + + cdw->cdw_ctl_io = io; + cdw->cdw_target_transfer_tag = *target_transfer_tagp; + cdw->cdw_initiator_task_tag = initiator_task_tag; + + return (cdw); +} + +static void +cfiscsi_data_wait_free(struct cfiscsi_session *cs, +struct cfiscsi_data_wait *cdw) +{ + + icl_conn_transfer_done(cs->cs_conn, cdw->cdw_icl_prv); + uma_zfree(cfiscsi_data_wait_zone, cdw); +} + static void cfiscsi_session_terminate_tasks(struct cfiscsi_session *cs) { @@ -1106,7 +1151,7 @@ cfiscsi_session_terminate_tasks(struct c */ cdw->cdw_ctl_io->scsiio.io_hdr.port_status = 42; cdw->cdw_ctl_io->scsiio.be_move_done(cdw->cdw_ctl_io); - uma_zfree(cfiscsi_data_wait_zone, cdw); + cfiscsi_data_wait_free(cs, cdw); CFISCSI_SESSION_LOCK(cs); } CFISCSI_SESSION_UNLOCK(cs); @@ -2600,13 +2645,8 @@ cfiscsi_datamove_out(union ctl_io *io) target_transfer_tag = atomic_fetchadd_32(&cs->cs_target_transfer_tag, 1); - -#if 0 - CFISCSI_SESSION_DEBUG(cs, "expecting Data-Out with initiator " - "task tag 0x%x, target transfer tag 0x%x", - bhssc->bhssc_initiator_task_tag, target_transfer_tag); -#endif - cdw = uma_zalloc(cfiscsi_data_wait_zone, M_NOWAIT | M_ZERO); + cdw = cfiscsi_data_wait_new(cs, io, bhssc->bhssc_initiator_task_tag, + &target_transfer_tag); if (cdw == NULL) { CFISCSI_SESSION_WARN(cs, "failed to " "allocate memory; dropping connection"); @@ -2615,6 +2655,12 @@ cfiscsi_datamove_out(union ctl_io *io) cfiscsi_session_terminate(cs); return; } +#if 0 + CFISCSI_SESSION_DEBUG(cs, "expecting Data-Out with initiator " + "task tag 0x%x, target transfer tag 0x%x", + bhssc->bhssc_initiator_task_tag, target_transfer_tag); +#endif +
Re: lost change 272451 - CAP_EVENT for tcpdump (Re: svn commit: r276788 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump
Bryan Drewery writes: > The problem is that pf is implemented differently on FreeBSD and OpenBSD > for pid/uid tracking. The code would be overly complex to support both > and I gave up on that. Even getting it to work on FreeBSD required the > _KERNEL define hack for UID_MAX, which our pf uses to note 'no uid value'. First-class stupidity on POSIX's part which defines FOO_MAX for almost every single integer type but not for uid_t or gid_t. FreeBSD has them, but Linux doesn't, so I usually end up doing #ifndef UID_MAX #define UID_MAX ((uid_t)-1) #endif in cross-platform code. DES -- Dag-Erling Smørgrav - d...@des.no ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278389 - head/sys/powerpc/pseries
Author: nwhitehorn Date: Sun Feb 8 16:50:00 2015 New Revision: 278389 URL: https://svnweb.freebsd.org/changeset/base/278389 Log: Add some error checking on the supplied page size list. This makes sure that we (a) get the correct large page size to provide to pmap and (b) we can alert the user if running under incorrectly-configured PowerKVM on POWER7 and POWER8 systems. MFC after:1 week Modified: head/sys/powerpc/pseries/mmu_phyp.c Modified: head/sys/powerpc/pseries/mmu_phyp.c == --- head/sys/powerpc/pseries/mmu_phyp.c Sun Feb 8 16:30:44 2015 (r278388) +++ head/sys/powerpc/pseries/mmu_phyp.c Sun Feb 8 16:50:00 2015 (r278389) @@ -102,6 +102,7 @@ mphyp_bootstrap(mmu_t mmup, vm_offset_t char buf[8]; uint32_t prop[2]; uint32_t nptlp, shift = 0, slb_encoding = 0; + uint32_t lp_size, lp_encoding; phandle_t dev, node, root; int idx, len, res; @@ -148,9 +149,9 @@ mphyp_bootstrap(mmu_t mmup, vm_offset_t * We have to use a variable length array on the stack * since we have very limited stack space. */ - cell_t arr[len/sizeof(cell_t)]; - res = OF_getprop(node, "ibm,segment-page-sizes", &arr, -sizeof(arr)); + pcell_t arr[len/sizeof(cell_t)]; + res = OF_getencprop(node, "ibm,segment-page-sizes", arr, + sizeof(arr)); len /= 4; idx = 0; while (len > 0) { @@ -160,18 +161,26 @@ mphyp_bootstrap(mmu_t mmup, vm_offset_t idx += 3; len -= 3; while (len > 0 && nptlp) { + lp_size = arr[idx]; + lp_encoding = arr[idx+1]; + if (slb_encoding == SLBV_L && lp_encoding == 0) + break; + idx += 2; len -= 2; nptlp--; } + if (nptlp && slb_encoding == SLBV_L && lp_encoding == 0) + break; } - /* For now we allow shift only to be <= 0x18. */ - if (shift >= 0x18) - shift = 0x18; + if (len == 0) + panic("Standard large pages (SLB[L] = 1, PTE[LP] = 0) " + "not supported by this system. Please enable huge " + "page backing if running under PowerKVM."); moea64_large_page_shift = shift; - moea64_large_page_size = 1ULL << shift; + moea64_large_page_size = 1ULL << lp_size; } moea64_mid_bootstrap(mmup, kernelstart, kernelend); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278379 - in head/sys/dev/usb: . serial
Author: dchagin Date: Sun Feb 8 11:55:29 2015 New Revision: 278379 URL: https://svnweb.freebsd.org/changeset/base/278379 Log: Add Neoway WM620 module ID. MFC after:1 Week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c == --- head/sys/dev/usb/serial/u3g.c Sun Feb 8 10:58:25 2015 (r278378) +++ head/sys/dev/usb/serial/u3g.c Sun Feb 8 11:55:29 2015 (r278379) @@ -399,6 +399,7 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QUALCOMM2, AC8700, 0), U3G_DEV(QUALCOMM2, MF330, 0), U3G_DEV(QUALCOMM2, SIM5218, 0), + U3G_DEV(QUALCOMM2, WM620, 0), U3G_DEV(QUALCOMM2, VW110L, U3GINIT_SCSIEJECT), U3G_DEV(QUALCOMM2, GOBI2000_QDL, 0), U3G_DEV(QUALCOMM2, GOBI2000, 0), Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsSun Feb 8 10:58:25 2015(r278378) +++ head/sys/dev/usb/usbdevsSun Feb 8 11:55:29 2015(r278379) @@ -3577,6 +3577,7 @@ product QUALCOMM2 CDMA_MSM0x3196 CDMA T product QUALCOMM2 AC8700 0x6000 AC8700 product QUALCOMM2 VW110L 0x1000 Vertex Wireless 110L modem product QUALCOMM2 SIM5218 0x9000 SIM5218 +product QUALCOMM2 WM6200x9002 Neoway WM620 product QUALCOMM2 GOBI2000_QDL 0x9204 Qualcomm Gobi 2000 QDL product QUALCOMM2 GOBI2000 0x9205 Qualcomm Gobi 2000 modem product QUALCOMM2 VT80N0x6500 Venus VT80N ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278378 - head/sys/dev/iscsi
Author: trasz Date: Sun Feb 8 10:58:25 2015 New Revision: 278378 URL: https://svnweb.freebsd.org/changeset/base/278378 Log: Make output of "iscsictl -v" and "ctladm islist -v" a little prettier by capitalizing "None". MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/icl.c head/sys/dev/iscsi/icl_soft.c Modified: head/sys/dev/iscsi/icl.c == --- head/sys/dev/iscsi/icl.cSun Feb 8 10:17:20 2015(r278377) +++ head/sys/dev/iscsi/icl.cSun Feb 8 10:58:25 2015(r278378) @@ -96,7 +96,7 @@ icl_find(const char *name) } TAILQ_FOREACH(im, &sc->sc_modules, im_next) { - if (strcmp(im->im_name, name) == 0) + if (strcasecmp(im->im_name, name) == 0) return (im); } Modified: head/sys/dev/iscsi/icl_soft.c == --- head/sys/dev/iscsi/icl_soft.c Sun Feb 8 10:17:20 2015 (r278377) +++ head/sys/dev/iscsi/icl_soft.c Sun Feb 8 10:58:25 2015 (r278378) @@ -1183,7 +1183,7 @@ icl_soft_new_conn(const char *name, stru #endif ic->ic_max_data_segment_length = ICL_MAX_DATA_SEGMENT_LENGTH; ic->ic_name = name; - ic->ic_offload = "none"; + ic->ic_offload = "None"; return (ic); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278374 - in head/sys/dev/cxgbe: . iw_cxgbe tom
Author: np Date: Sun Feb 8 09:28:55 2015 New Revision: 278374 URL: https://svnweb.freebsd.org/changeset/base/278374 Log: cxgbe(4): tidy up some of the interaction between the Upper Layer Drivers (ULDs) and the base if_cxgbe driver. Track the per-adapter activation of ULDs in a new "active_ulds" field. This was done pretty arbitrarily before this change -- via TOM_INIT_DONE in adapter->flags for TOM, and the (1 << MAX_NPORTS) bit in adapter->offload_map for iWARP. iWARP and hw-accelerated iSCSI rely on the TOE (supported by the TOM ULD). The rules are: a) If the iWARP and/or iSCSI ULDs are available when TOE is enabled then iWARP and/or iSCSI are enabled too. b) When the iWARP and iSCSI modules are loaded they go looking for adapters with TOE enabled and enable themselves on that adapter. c) You cannot deactivate or unload the TOM module from underneath iWARP or iSCSI. Any such attempt will fail with EBUSY. MFC after:2 weeks Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/iw_cxgbe/device.c head/sys/dev/cxgbe/offload.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/tom/t4_listen.c head/sys/dev/cxgbe/tom/t4_tom.c Modified: head/sys/dev/cxgbe/adapter.h == --- head/sys/dev/cxgbe/adapter.hSun Feb 8 09:25:06 2015 (r278373) +++ head/sys/dev/cxgbe/adapter.hSun Feb 8 09:28:55 2015 (r278374) @@ -192,7 +192,7 @@ enum { /* INTR_DIRECT = (1 << 2), No longer used. */ MASTER_PF = (1 << 3), ADAP_SYSCTL_CTX = (1 << 4), - TOM_INIT_DONE = (1 << 5), + /* TOM_INIT_DONE= (1 << 5), No longer used */ BUF_PACKING_OK = (1 << 6), CXGBE_BUSY = (1 << 9), @@ -758,7 +758,8 @@ struct adapter { uint16_t doorbells; int open_device_map; #ifdef TCP_OFFLOAD - int offload_map; + int offload_map;/* ports with IFCAP_TOE enabled */ + int active_ulds;/* ULDs activated on this adapter */ #endif int flags; Modified: head/sys/dev/cxgbe/iw_cxgbe/device.c == --- head/sys/dev/cxgbe/iw_cxgbe/device.cSun Feb 8 09:25:06 2015 (r278373) +++ head/sys/dev/cxgbe/iw_cxgbe/device.cSun Feb 8 09:28:55 2015 (r278374) @@ -213,7 +213,7 @@ c4iw_activate(struct adapter *sc) ASSERT_SYNCHRONIZED_OP(sc); - if (isset(&sc->offload_map, MAX_NPORTS)) { + if (uld_active(sc, ULD_IWARP)) { KASSERT(0, ("%s: RDMA already eanbled on sc %p", __func__, sc)); return (0); } @@ -265,9 +265,9 @@ c4iw_activate_all(struct adapter *sc, vo if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4iwact") != 0) return; - if (!isset(&sc->offload_map, MAX_NPORTS) && - t4_activate_uld(sc, ULD_IWARP) == 0) - setbit(&sc->offload_map, MAX_NPORTS); + /* Activate iWARP if any port on this adapter has IFCAP_TOE enabled. */ + if (sc->offload_map && !uld_active(sc, ULD_IWARP)) + (void) t4_activate_uld(sc, ULD_IWARP); end_synchronized_op(sc, 0); } @@ -279,9 +279,8 @@ c4iw_deactivate_all(struct adapter *sc, if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4iwdea") != 0) return; - if (isset(&sc->offload_map, MAX_NPORTS) && - t4_deactivate_uld(sc, ULD_IWARP) == 0) - clrbit(&sc->offload_map, MAX_NPORTS); + if (uld_active(sc, ULD_IWARP)) + (void) t4_deactivate_uld(sc, ULD_IWARP); end_synchronized_op(sc, 0); } Modified: head/sys/dev/cxgbe/offload.h == --- head/sys/dev/cxgbe/offload.hSun Feb 8 09:25:06 2015 (r278373) +++ head/sys/dev/cxgbe/offload.hSun Feb 8 09:28:55 2015 (r278374) @@ -127,9 +127,10 @@ struct t4_virt_res { #ifdef TCP_OFFLOAD enum { - ULD_TOM = 1, - ULD_IWARP = 2, - ULD_ISCSI = 3, + ULD_TOM = 0, + ULD_IWARP, + ULD_ISCSI, + ULD_MAX = ULD_ISCSI }; struct adapter; @@ -156,5 +157,6 @@ int t4_unregister_uld(struct uld_info *) int t4_activate_uld(struct adapter *, int); int t4_deactivate_uld(struct adapter *, int); void t4_iscsi_init(struct ifnet *, unsigned int, const unsigned int *); +int uld_active(struct adapter *, int); #endif #endif Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cSun Feb 8 09:25:06 2015 (r278373) +++ head/sys/dev/cxgbe/t4_main.cSun Feb 8 09:28:55 2015 (r278374) @@ -7144,7 +7144,7 @@ set_filter_mode(struct adapter *sc, uint } #ifdef TCP_OFFLOAD - if (sc->offload_map) {
svn commit: r278372 - head/sys/dev/cxgbe
Author: np Date: Sun Feb 8 08:52:18 2015 New Revision: 278372 URL: https://svnweb.freebsd.org/changeset/base/278372 Log: cxgbe(4): adapter_full_init is always a synchronized operation. MFC after:1 week Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cSun Feb 8 08:42:45 2015 (r278371) +++ head/sys/dev/cxgbe/t4_main.cSun Feb 8 08:52:18 2015 (r278372) @@ -3432,6 +3432,7 @@ adapter_full_init(struct adapter *sc) { int rc, i; + ASSERT_SYNCHRONIZED_OP(sc); ADAPTER_LOCK_ASSERT_NOTOWNED(sc); KASSERT((sc->flags & FULL_INIT_DONE) == 0, ("%s: FULL_INIT_DONE already", __func__)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r278371 - head/sys/dev/cxgbe
Author: np Date: Sun Feb 8 08:42:45 2015 New Revision: 278371 URL: https://svnweb.freebsd.org/changeset/base/278371 Log: cxgbe(4): a change to the synchronization rules within the the driver. This is purely cosmetic because the new rules are already followed. MFC after:1 week Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/adapter.h == --- head/sys/dev/cxgbe/adapter.hSun Feb 8 03:55:12 2015 (r278370) +++ head/sys/dev/cxgbe/adapter.hSun Feb 8 08:42:45 2015 (r278371) @@ -812,7 +812,6 @@ struct adapter { #define ADAPTER_LOCK_ASSERT_OWNED(sc) mtx_assert(&(sc)->sc_lock, MA_OWNED) #define ADAPTER_LOCK_ASSERT_NOTOWNED(sc) mtx_assert(&(sc)->sc_lock, MA_NOTOWNED) -/* XXX: not bulletproof, but much better than nothing */ #define ASSERT_SYNCHRONIZED_OP(sc) \ KASSERT(IS_BUSY(sc) && \ (mtx_owned(&(sc)->sc_lock) || sc->last_op_thr == curthread), \ Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cSun Feb 8 03:55:12 2015 (r278370) +++ head/sys/dev/cxgbe/t4_main.cSun Feb 8 08:42:45 2015 (r278371) @@ -3139,6 +3139,9 @@ mcfail: return (rc); } +/* + * {begin|end}_synchronized_op must be called from the same thread. + */ int begin_synchronized_op(struct adapter *sc, struct port_info *pi, int flags, char *wmesg) @@ -3194,6 +3197,9 @@ done: return (rc); } +/* + * {begin|end}_synchronized_op must be called from the same thread. + */ void end_synchronized_op(struct adapter *sc, int flags) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r278335 - head/sys/boot/forth
On Fri, Feb 06, 2015 at 11:19:18PM +, Devin Teske wrote: > New Revision: 278335 > URL: https://svnweb.freebsd.org/changeset/base/278335 > > Log: > Revert SVN r277693. > > Discussed on: src-committers > Approved by:core (emaste) Why it was reverted, if I may ask? ./danfe ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r278361 - in head/contrib/llvm: lib/Target/X86 patches
Fwiw, FastISel is only used for -O0, maybe the right way to "fix" the breakage is to not use -O0 ? On Sat, Feb 07, 2015 at 04:57:33PM +, Dimitry Andric wrote: > Author: dim > Date: Sat Feb 7 16:57:32 2015 > New Revision: 278361 > URL: https://svnweb.freebsd.org/changeset/base/278361 > > Log: > Back out r278349 and r278350 for now, since this apparently blows up the > kernel build in sys/dev/hptmv/hptproc.c for some people. > > Reported by:sbruno, Matthew Fuller > > Deleted: > head/contrib/llvm/patches/patch-32-llvm-r224884-invalid-reg-replacement.diff > Modified: > head/contrib/llvm/lib/Target/X86/X86FastISel.cpp > > Modified: head/contrib/llvm/lib/Target/X86/X86FastISel.cpp > == > --- head/contrib/llvm/lib/Target/X86/X86FastISel.cpp Sat Feb 7 14:31:51 > 2015(r278360) > +++ head/contrib/llvm/lib/Target/X86/X86FastISel.cpp Sat Feb 7 16:57:32 > 2015(r278361) > @@ -2699,9 +2699,6 @@ bool X86FastISel::FastLowerCall(CallLowe > TM.Options.GuaranteedTailCallOpt)) > return false; > > - SmallVector OutVTs; > - SmallVector ArgRegs; > - >// If this is a constant i1/i8/i16 argument, promote to i32 to avoid an > extra >// instruction. This is safe because it is common to all FastISel supported >// calling conventions on x86. > @@ -2719,34 +2716,28 @@ bool X86FastISel::FastLowerCall(CallLowe > > // Passing bools around ends up doing a trunc to i1 and passing it. > // Codegen this as an argument + "and 1". > -MVT VT; > -auto *TI = dyn_cast(Val); > -unsigned ResultReg; > -if (TI && TI->getType()->isIntegerTy(1) && CLI.CS && > - (TI->getParent() == CLI.CS->getInstruction()->getParent()) && > - TI->hasOneUse()) { > - Value *PrevVal = TI->getOperand(0); > - ResultReg = getRegForValue(PrevVal); > - > - if (!ResultReg) > -return false; > +if (auto *TI = dyn_cast(Val)) { > + if (TI->getType()->isIntegerTy(1) && CLI.CS && > + (TI->getParent() == CLI.CS->getInstruction()->getParent()) && > + TI->hasOneUse()) { > +Val = cast(Val)->getOperand(0); > +unsigned ResultReg = getRegForValue(Val); > > - if (!isTypeLegal(PrevVal->getType(), VT)) > -return false; > +if (!ResultReg) > + return false; > > - ResultReg = > -FastEmit_ri(VT, VT, ISD::AND, ResultReg, hasTrivialKill(PrevVal), 1); > +MVT ArgVT; > +if (!isTypeLegal(Val->getType(), ArgVT)) > + return false; > > - if (!ResultReg) > -return false; > -} else { > - if (!isTypeLegal(Val->getType(), VT)) > -return false; > - ResultReg = getRegForValue(Val); > -} > +ResultReg = > + FastEmit_ri(ArgVT, ArgVT, ISD::AND, ResultReg, Val->hasOneUse(), > 1); > > -ArgRegs.push_back(ResultReg); > -OutVTs.push_back(VT); > +if (!ResultReg) > + return false; > +UpdateValueMap(Val, ResultReg); > + } > +} >} > >// Analyze operands of the call, assigning locations to each operand. > @@ -2758,6 +2749,13 @@ bool X86FastISel::FastLowerCall(CallLowe >if (IsWin64) > CCInfo.AllocateStack(32, 8); > > + SmallVector OutVTs; > + for (auto *Val : OutVals) { > +MVT VT; > +if (!isTypeLegal(Val->getType(), VT)) > + return false; > +OutVTs.push_back(VT); > + } >CCInfo.AnalyzeCallOperands(OutVTs, OutFlags, CC_X86); > >// Get a count of how many bytes are to be pushed on the stack. > @@ -2779,7 +2777,9 @@ bool X86FastISel::FastLowerCall(CallLowe > if (ArgVT == MVT::x86mmx) >return false; > > -unsigned ArgReg = ArgRegs[VA.getValNo()]; > +unsigned ArgReg = getRegForValue(ArgVal); > +if (!ArgReg) > + return false; > > // Promote the value if needed. > switch (VA.getLocInfo()) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"