svn commit: r312944 - in head: . sys/dev/ic
Author: nyan Date: Sun Jan 29 03:34:49 2017 New Revision: 312944 URL: https://svnweb.freebsd.org/changeset/base/312944 Log: - Remove i8255.h because it's pc98 device. - rsa.h is for both RSA-DV/S ISA and RSA-98III CBUS, but there is no RSA-DV/S support. So it can be removed. Deleted: head/sys/dev/ic/i8255.h head/sys/dev/ic/rsa.h Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Sun Jan 29 02:17:52 2017(r312943) +++ head/ObsoleteFiles.inc Sun Jan 29 03:34:49 2017(r312944) @@ -40,6 +40,8 @@ # 20170128: remove pc98 support OLD_FILES+=usr/include/dev/ic/i8251.h +OLD_FILES+=usr/include/dev/ic/i8255.h +OLD_FILES+=usr/include/dev/ic/rsa.h OLD_FILES+=usr/include/dev/ic/wd33c93reg.h OLD_FILES+=usr/include/sys/disk/pc98.h OLD_FILES+=usr/include/sys/diskpc98.h ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312943 - head/sys/netpfil/pf
Author: loos Date: Sun Jan 29 02:17:52 2017 New Revision: 312943 URL: https://svnweb.freebsd.org/changeset/base/312943 Log: Do not run the pf purge thread while the VNET variables are not initialized, this can cause a divide by zero (if the VNET initialization takes to long to complete). Obtained from:pfSense MFC after:2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c == --- head/sys/netpfil/pf/pf.cSun Jan 29 00:45:52 2017(r312942) +++ head/sys/netpfil/pf/pf.cSun Jan 29 02:17:52 2017(r312943) @@ -129,6 +129,8 @@ VNET_DEFINE(int, pf_tcp_secret_init); #defineV_pf_tcp_secret_init VNET(pf_tcp_secret_init) VNET_DEFINE(int,pf_tcp_iss_off); #defineV_pf_tcp_iss_off VNET(pf_tcp_iss_off) +VNET_DECLARE(int, pf_vnet_active); +#defineV_pf_vnet_active VNET(pf_vnet_active) /* * Queue for pf_intr() sends. @@ -1441,6 +1443,12 @@ pf_purge_thread(void *unused __unused) kproc_exit(0); } + /* Wait while V_pf_default_rule.timeout is initialized. */ + if (V_pf_vnet_active == 0) { + CURVNET_RESTORE(); + continue; + } + /* Process 1/interval fraction of the state table every run. */ idx = pf_purge_expired_states(idx, pf_hashmask / (V_pf_default_rule.timeout[PFTM_INTERVAL] * 10)); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r312917 - in head: share/man/man4 share/man/man4/man4.i386 sys/dev/pci sys/modules/ata/atacbus
In article Ngie Cooper writes: >> On Jan 28, 2017, at 01:58, Takahashi Yoshihiro wrote: >> >> Author: nyan >> Date: Sat Jan 28 09:58:00 2017 >> New Revision: 312917 >> URL: https://svnweb.freebsd.org/changeset/base/312917 >> >> Log: >> Remove more pc98 support. > > Hello Yoshiro-San, > Have appropriate man pages and files been added to ObsoleteFiles.inc? Yes. But I found that there are some pc98 related files even now. I'll remove them and add to ObsoleteFiles.inc. Thank you for your recent work for pc98 removal. --- TAKAHASHI Yoshihiro ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312942 - head/sys/sys
Author: pfg Date: Sun Jan 29 00:45:52 2017 New Revision: 312942 URL: https://svnweb.freebsd.org/changeset/base/312942 Log: Remove GCC's __nonnull() attribute definition. While GCC's __nonnull__ attribute is generally useful to prevent misuse of some functions it also tends to do rather dangerous "optimizations". Now that we have replaced (r312934) all such uses with the clang nullability qualifiers, the GCC attribute is unnecessary. Remove the definition completely to prevent its use in system's headers. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h == --- head/sys/sys/cdefs.hSun Jan 29 00:24:34 2017(r312941) +++ head/sys/sys/cdefs.hSun Jan 29 00:45:52 2017(r312942) @@ -375,14 +375,6 @@ #define__noinline #endif -#if __GNUC_PREREQ__(3, 3) -#define__nonnull(x)__attribute__((__nonnull__(x))) -#define__nonnull_all __attribute__((__nonnull__)) -#else -#define__nonnull(x) -#define__nonnull_all -#endif - #if __GNUC_PREREQ__(3, 4) #define__fastcall __attribute__((__fastcall__)) #define__result_use_check __attribute__((__warn_unused_result__)) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312941 - head/usr.bin/man
Author: ngie Date: Sun Jan 29 00:24:34 2017 New Revision: 312941 URL: https://svnweb.freebsd.org/changeset/base/312941 Log: Update MACHINE/MACHINE_ARCH examples to use arm64/aarch64 instead of i386/pc98 pc98 support was removed in r312910 Modified: head/usr.bin/man/man.1 Modified: head/usr.bin/man/man.1 == --- head/usr.bin/man/man.1 Sun Jan 29 00:12:06 2017(r312940) +++ head/usr.bin/man/man.1 Sun Jan 29 00:24:34 2017(r312941) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 26, 2014 +.Dd January 28, 2017 .Dt MAN 1 .Os .Sh NAME @@ -242,20 +242,20 @@ environment variables. For example, if .Ev MACHINE_ARCH is set to -.Dq Li i386 +.Dq Li aarch64 and .Ev MACHINE is set to -.Dq Li pc98 , +.Dq Li arm64 , .Nm will search the following paths when considering section 4 manual pages in .Pa /usr/share/man : .Pp .Bl -item -offset indent -compact .It -.Pa /usr/share/man/man4/pc98 +.Pa /usr/share/man/man4/aarch64 .It -.Pa /usr/share/man/man4/i386 +.Pa /usr/share/man/man4/arm64 .It .Pa /usr/share/man/man4 .El ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312940 - head/sys/conf
Author: ngie Date: Sun Jan 29 00:12:06 2017 New Revision: 312940 URL: https://svnweb.freebsd.org/changeset/base/312940 Log: Remove non-existent ct(4) dependency for scsi_low.c ct(4) was removed with pc98 in r312910 Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Sun Jan 29 00:05:49 2017(r312939) +++ head/sys/conf/files Sun Jan 29 00:12:06 2017(r312940) @@ -111,7 +111,7 @@ cam/ctl/ctl_error.c optional ctl cam/ctl/ctl_util.c optional ctl cam/ctl/scsi_ctl.c optional ctl cam/scsi/scsi_da.c optional da -cam/scsi/scsi_low.coptional ct | ncv | nsp | stg +cam/scsi/scsi_low.coptional ncv | nsp | stg cam/scsi/scsi_pass.c optional pass cam/scsi/scsi_pt.c optional pt cam/scsi/scsi_sa.c optional sa ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312939 - in head/sys/dev: mmc sdhci
Author: marius Date: Sun Jan 29 00:05:49 2017 New Revision: 312939 URL: https://svnweb.freebsd.org/changeset/base/312939 Log: Fix overly long lines, whitespace and other bugs according to style(9). Modified: head/sys/dev/mmc/mmc.c head/sys/dev/mmc/mmcsd.c head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h head/sys/dev/sdhci/sdhci_acpi.c head/sys/dev/sdhci/sdhci_pci.c Modified: head/sys/dev/mmc/mmc.c == --- head/sys/dev/mmc/mmc.c Sat Jan 28 23:58:17 2017(r312938) +++ head/sys/dev/mmc/mmc.c Sun Jan 29 00:05:49 2017(r312939) @@ -259,7 +259,7 @@ mmc_suspend(device_t dev) err = bus_generic_suspend(dev); if (err) - return (err); + return (err); mmc_power_down(sc); return (0); } @@ -980,10 +980,14 @@ mmc_decode_csd_sd(uint32_t *raw_csd, str csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); - csd->vdd_r_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; - csd->vdd_r_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; - csd->vdd_w_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; - csd->vdd_w_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; + csd->vdd_r_curr_min = + cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; + csd->vdd_r_curr_max = + cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; + csd->vdd_w_curr_min = + cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; + csd->vdd_w_curr_max = + cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; m = mmc_get_bits(raw_csd, 128, 62, 12); e = mmc_get_bits(raw_csd, 128, 47, 3); csd->capacity = ((1 + m) << (e + 2)) * csd->read_bl_len; @@ -1008,8 +1012,8 @@ mmc_decode_csd_sd(uint32_t *raw_csd, str csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); - csd->capacity = ((uint64_t)mmc_get_bits(raw_csd, 128, 48, 22) + 1) * - 512 * 1024; + csd->capacity = ((uint64_t)mmc_get_bits(raw_csd, 128, 48, 22) + + 1) * 512 * 1024; csd->erase_blk_en = mmc_get_bits(raw_csd, 128, 46, 1); csd->erase_sector = mmc_get_bits(raw_csd, 128, 39, 7) + 1; csd->wp_grp_size = mmc_get_bits(raw_csd, 128, 32, 7); @@ -1307,18 +1311,21 @@ mmc_discover_cards(struct mmc_softc *sc) break; } newcard = 1; - if ((err = device_get_children(sc->dev, &devlist, &devcount)) != 0) + if ((err = device_get_children(sc->dev, &devlist, + &devcount)) != 0) return; for (i = 0; i < devcount; i++) { ivar = device_get_ivars(devlist[i]); - if (memcmp(ivar->raw_cid, raw_cid, sizeof(raw_cid)) == 0) { + if (memcmp(ivar->raw_cid, raw_cid, sizeof(raw_cid)) == + 0) { newcard = 0; break; } } free(devlist, M_TEMP); if (bootverbose || mmc_debug) { - device_printf(sc->dev, "%sard detected (CID %08x%08x%08x%08x)\n", + device_printf(sc->dev, + "%sard detected (CID %08x%08x%08x%08x)\n", newcard ? "New c" : "C", raw_cid[0], raw_cid[1], raw_cid[2], raw_cid[3]); } @@ -1370,7 +1377,7 @@ mmc_discover_cards(struct mmc_softc *sc) mmc_app_decode_scr(ivar->raw_scr, &ivar->scr); /* Get card switch capabilities (command class 10). */ if ((ivar->scr.sda_vsn >= 1) && - (ivar->csd.ccc & (1<<10))) { + (ivar->csd.ccc & (1 << 10))) { mmc_sd_switch(sc, SD_SWITCH_MODE_CHECK, SD_SWITCH_GROUP1, SD_SWITCH_NOCHANGE, switch_res); @@ -1537,7 +1544,8 @@ mmc_rescan_cards(struct mmc_softc *sc) ivar = device_get_ivars(devlist[i]); if (mmc_select_card(sc, ivar->rca)) { if (bootverbose || mmc_debug) - device_printf(sc->dev, "Card at relative address %d lost.\n", + device_printf(sc->dev,
svn commit: r312938 - head/share/man/man7
Author: ngie Date: Sat Jan 28 23:58:17 2017 New Revision: 312938 URL: https://svnweb.freebsd.org/changeset/base/312938 Log: Update TARGET/TARGET_ARCH examples to use arm64/aarch64 instead of i386/pc98 pc98 support was removed in r312910 Modified: head/share/man/man7/build.7 head/share/man/man7/release.7 Modified: head/share/man/man7/build.7 == --- head/share/man/man7/build.7 Sat Jan 28 23:51:03 2017(r312937) +++ head/share/man/man7/build.7 Sat Jan 28 23:58:17 2017(r312938) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 20, 2016 +.Dd January 28, 2017 .Dt BUILD 7 .Os .Sh NAME @@ -517,10 +517,10 @@ This is analogous to the .Dq Nm uname Fl m output. This is necessary to cross-build some target architectures. -For example, cross-building for PC98 machines requires -.Va TARGET_ARCH Ns = Ns Li i386 +For example, cross-building for ARM64 machines requires +.Va TARGET_ARCH Ns = Ns Li aarch64 and -.Va TARGET Ns = Ns Li pc98 . +.Va TARGET Ns = Ns Li arm64 . If not set, .Va TARGET defaults to the current hardware platform. Modified: head/share/man/man7/release.7 == --- head/share/man/man7/release.7 Sat Jan 28 23:51:03 2017 (r312937) +++ head/share/man/man7/release.7 Sat Jan 28 23:58:17 2017 (r312938) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2015 +.Dd January 28, 2017 .Dt RELEASE 7 .Os .Sh NAME @@ -620,10 +620,10 @@ This is analogous to the .Dq Nm uname Fl m output. This is necessary to cross-build some target architectures. -For example, cross-building for PC98 machines requires -.Ev TARGET_ARCH Ns = Ns Li i386 +For example, cross-building for ARM64 machines requires +.Ev TARGET_ARCH Ns = Ns Li aarch64 and -.Ev TARGET Ns = Ns Li pc98 . +.Ev TARGET Ns = Ns Li arm64 . If not set, .Ev TARGET defaults to the current hardware platform. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312937 - head/lib
Author: ngie Date: Sat Jan 28 23:51:03 2017 New Revision: 312937 URL: https://svnweb.freebsd.org/changeset/base/312937 Log: Fix typo in lib/Makefile The SUBDIR_DEPEND variable should be for librpcsec_gss, not liblibrpc_gss MFC after:1 week PR: 216409 Reported by: m...@fbsd.e4m.org Modified: head/lib/Makefile Modified: head/lib/Makefile == --- head/lib/Makefile Sat Jan 28 23:47:17 2017(r312936) +++ head/lib/Makefile Sat Jan 28 23:51:03 2017(r312937) @@ -106,7 +106,7 @@ SUBDIR_DEPEND_libdevstat= libkvm SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil SUBDIR_DEPEND_libedit= ncurses SUBDIR_DEPEND_libgeom= libexpat libsbuf -SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi +SUBDIR_DEPEND_librpcsec_gss= libgssapi SUBDIR_DEPEND_libmagic= libz SUBDIR_DEPEND_libmemstat= libkvm SUBDIR_DEPEND_libopie= libmd ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312936 - head/sys/modules
Author: ngie Date: Sat Jan 28 23:47:17 2017 New Revision: 312936 URL: https://svnweb.freebsd.org/changeset/base/312936 Log: Garbage collect pc98-only variables still referenced in sys/modules/Makefile These should have been removed with r312910 Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Sat Jan 28 23:41:38 2017(r312935) +++ head/sys/modules/Makefile Sat Jan 28 23:47:17 2017(r312936) @@ -64,8 +64,6 @@ SUBDIR= \ bwn_pci \ ${_bytgpio} \ cam \ - ${_canbepm} \ - ${_canbus} \ ${_cardbus} \ ${_carp} \ cas \ @@ -91,7 +89,6 @@ SUBDIR= \ ${_crypto} \ ${_cryptodev} \ ${_cs} \ - ${_ct} \ ${_ctau} \ ctl \ ${_cxgb} \ @@ -295,7 +292,6 @@ SUBDIR= \ ${_pflog} \ ${_pfsync} \ plip \ - ${_pmc} \ ${_pms} \ ppbus \ ppc \ @@ -344,7 +340,6 @@ SUBDIR= \ sk \ smbfs \ sn \ - ${_snc} \ snp \ sound \ ${_speaker} \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312935 - head/sys/modules
Author: ngie Date: Sat Jan 28 23:41:38 2017 New Revision: 312935 URL: https://svnweb.freebsd.org/changeset/base/312935 Log: Remove duplicate bhnd SUBDIR entry MFC after:1 week PR: 216413 Reported by: m...@fbsd.e4m.org Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Sat Jan 28 20:54:43 2017(r312934) +++ head/sys/modules/Makefile Sat Jan 28 23:41:38 2017(r312935) @@ -51,7 +51,6 @@ SUBDIR= \ ${_auxio} \ ${_bce} \ bfe \ - bhnd \ bge \ bhnd \ ${_bxe} \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312934 - in head: include lib/libthr/thread sys/sys
Author: pfg Date: Sat Jan 28 20:54:43 2017 New Revision: 312934 URL: https://svnweb.freebsd.org/changeset/base/312934 Log: Make use of clang nullability attributes. Replace uses of the GCC __nonnull__ attribute with the clang nullability qualifiers. The replacement should be transparent for clang developers as the new qualifiers will produce the same warnings and will be useful for static checkers but will not cause aggressive optimizations. GCC will not produce such warnings and developers will have to use upgraded GCC ports built with the system headers from r312538. Hinted by:Apple's Libc-1158.20.4, Bionic libc MFC after:11.1 Release Differential Revision:https://reviews.freebsd.org/D9004 Modified: head/include/err.h head/include/pthread.h head/include/signal.h head/include/stdio.h head/include/stdlib.h head/lib/libthr/thread/thr_private.h head/sys/sys/systm.h Modified: head/include/err.h == --- head/include/err.h Sat Jan 28 17:48:33 2017(r312933) +++ head/include/err.h Sat Jan 28 20:54:43 2017(r312934) @@ -43,6 +43,8 @@ #include #include +__NULLABILITY_PRAGMA_PUSH + __BEGIN_DECLS void err(int, const char *, ...) __dead2 __printf0like(2, 3); void verr(int, const char *, __va_list) __dead2 __printf0like(2, 0); @@ -58,7 +60,8 @@ void vwarnc(int, const char *, __va_list void warnx(const char *, ...) __printflike(1, 2); void vwarnx(const char *, __va_list) __printflike(1, 0); void err_set_file(void *); -void err_set_exit(void (*)(int)); +void err_set_exit(void (* _Nullable)(int)); __END_DECLS +__NULLABILITY_PRAGMA_POP #endif /* !_ERR_H_ */ Modified: head/include/pthread.h == --- head/include/pthread.h Sat Jan 28 17:48:33 2017(r312933) +++ head/include/pthread.h Sat Jan 28 20:54:43 2017(r312934) @@ -46,6 +46,8 @@ #include #include +__NULLABILITY_PRAGMA_PUSH + /* * Run-time invariant values: */ @@ -147,28 +149,35 @@ struct _pthread_cleanup_info { */ __BEGIN_DECLS intpthread_atfork(void (*)(void), void (*)(void), void (*)(void)); -intpthread_attr_destroy(pthread_attr_t *); -intpthread_attr_getstack(const pthread_attr_t * __restrict, - void ** __restrict, size_t * __restrict); -intpthread_attr_getstacksize(const pthread_attr_t *, size_t *); -intpthread_attr_getguardsize(const pthread_attr_t *, size_t *); +intpthread_attr_destroy(pthread_attr_t * _Nonnull); +intpthread_attr_getstack( + const pthread_attr_t * _Nonnull __restrict, + void ** _Nonnull __restrict, + size_t * _Nonnull __restrict); +intpthread_attr_getstacksize(const pthread_attr_t * _Nonnull, + size_t * _Nonnull); +intpthread_attr_getguardsize(const pthread_attr_t * _Nonnull, + size_t * _Nonnull); intpthread_attr_getstackaddr(const pthread_attr_t *, void **); -intpthread_attr_getdetachstate(const pthread_attr_t *, int *); -intpthread_attr_init(pthread_attr_t *); -intpthread_attr_setstacksize(pthread_attr_t *, size_t); -intpthread_attr_setguardsize(pthread_attr_t *, size_t); -intpthread_attr_setstack(pthread_attr_t *, void *, size_t); +intpthread_attr_getdetachstate(const pthread_attr_t * _Nonnull, + int * _Nonnull); +intpthread_attr_init(pthread_attr_t * _Nonnull); +intpthread_attr_setstacksize(pthread_attr_t * _Nonnull, size_t); +intpthread_attr_setguardsize(pthread_attr_t * _Nonnull, size_t); +intpthread_attr_setstack(pthread_attr_t * _Nonnull, void *, + size_t); intpthread_attr_setstackaddr(pthread_attr_t *, void *); -intpthread_attr_setdetachstate(pthread_attr_t *, int); -intpthread_barrier_destroy(pthread_barrier_t *); -intpthread_barrier_init(pthread_barrier_t *, +intpthread_attr_setdetachstate(pthread_attr_t * _Nonnull, int); +intpthread_barrier_destroy(pthread_barrier_t * _Nonnull); +intpthread_barrier_init(pthread_barrier_t * _Nonnull, const pthread_barrierattr_t *, unsigned); -intpthread_barrier_wait(pthread_barrier_t *); -intpthread_barrierattr_destroy(pthread_barrierattr_t *); -intpthread_barrierattr_getpshared(const pthread_barrierattr_t *, - int *); -intpthread_barrierattr_init(pthread_barrierattr_t *); -intpthread_barrierattr_setpshared(pthread_barrierattr_t *, int); +intpthread_barrier_wait(pthread_barrier_t * _Nonnull); +intpthread_barrie
svn commit: r312933 - head/sys/arm/include
Author: cognet Date: Sat Jan 28 17:48:33 2017 New Revision: 312933 URL: https://svnweb.freebsd.org/changeset/base/312933 Log: Remove useless labels. Modified: head/sys/arm/include/atomic-v6.h Modified: head/sys/arm/include/atomic-v6.h == --- head/sys/arm/include/atomic-v6.hSat Jan 28 17:46:04 2017 (r312932) +++ head/sys/arm/include/atomic-v6.hSat Jan 28 17:48:33 2017 (r312933) @@ -198,12 +198,11 @@ atomic_fcmpset_32(volatile uint32_t *p, int ret; __asm __volatile( - "1: mov %0, #1 \n" + " mov %0, #1 \n" " ldrex %1, [%2]\n" " cmp %1, %3 \n" " it eq \n" " strexeq %0, %4, [%2]\n" - "2:" : "=&r" (ret), "=&r" (tmp), "+r" (p), "+r" (_cmpval), "+r" (newval) : : "cc", "memory"); *cmpval = tmp; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312932 - head/sys/arm/include
Author: cognet Date: Sat Jan 28 17:46:04 2017 New Revision: 312932 URL: https://svnweb.freebsd.org/changeset/base/312932 Log: Use strexeq instead of needlessly branch. Suggested by: ian Modified: head/sys/arm/include/atomic-v6.h Modified: head/sys/arm/include/atomic-v6.h == --- head/sys/arm/include/atomic-v6.hSat Jan 28 17:40:37 2017 (r312931) +++ head/sys/arm/include/atomic-v6.hSat Jan 28 17:46:04 2017 (r312932) @@ -201,9 +201,8 @@ atomic_fcmpset_32(volatile uint32_t *p, "1: mov %0, #1 \n" " ldrex %1, [%2]\n" " cmp %1, %3 \n" - " it ne \n" - " bne 2f \n" - " strex %0, %4, [%2]\n" + " it eq \n" + " strexeq %0, %4, [%2]\n" "2:" : "=&r" (ret), "=&r" (tmp), "+r" (p), "+r" (_cmpval), "+r" (newval) : : "cc", "memory"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312929 - in head: sys/net sys/netinet6 usr.sbin/rtsold
Author: avos Date: Sat Jan 28 17:08:40 2017 New Revision: 312929 URL: https://svnweb.freebsd.org/changeset/base/312929 Log: Garbage collect IFT_IEEE80211 (but leave the define for possible reuse) This interface type ("a parent interface of wlanX") is not used since r287197 Reviewed by: adrian, glebius Differential Revision:https://reviews.freebsd.org/D9308 Modified: head/sys/net/if.c head/sys/net/if_types.h head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/usr.sbin/rtsold/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Sat Jan 28 16:40:51 2017(r312928) +++ head/sys/net/if.c Sat Jan 28 17:08:40 2017(r312929) @@ -3530,7 +3530,6 @@ if_setlladdr(struct ifnet *ifp, const u_ case IFT_BRIDGE: case IFT_ARCNET: case IFT_IEEE8023ADLAG: - case IFT_IEEE80211: bcopy(lladdr, LLADDR(sdl), len); ifa_free(ifa); break; Modified: head/sys/net/if_types.h == --- head/sys/net/if_types.h Sat Jan 28 16:40:51 2017(r312928) +++ head/sys/net/if_types.h Sat Jan 28 17:08:40 2017(r312929) @@ -113,7 +113,7 @@ typedef enum { IFT_QLLC= 0x44, /* SNA QLLC */ IFT_FASTETHERFX = 0x45, /* Fast Ethernet (100BaseFX)*/ IFT_CHANNEL = 0x46, /* channel */ - IFT_IEEE80211 = 0x47, /* radio spread spectrum*/ + IFT_IEEE80211 = 0x47, /* radio spread spectrum (unused) */ IFT_IBM370PARCHAN = 0x48, /* IBM System 360/370 OEMI Channel */ IFT_ESCON = 0x49, /* IBM Enterprise Systems Connection */ IFT_DLSW= 0x4a, /* Data Link Switching */ Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Sat Jan 28 16:40:51 2017(r312928) +++ head/sys/netinet6/in6.c Sat Jan 28 17:08:40 2017(r312929) @@ -1962,7 +1962,6 @@ in6_if2idlen(struct ifnet *ifp) case IFT_ETHER: /* RFC2464 */ case IFT_PROPVIRTUAL: /* XXX: no RFC. treat it as ether */ case IFT_L2VLAN:/* ditto */ - case IFT_IEEE80211: /* ditto */ case IFT_BRIDGE:/* bridge(4) only does Ethernet-like links */ case IFT_INFINIBAND: return (64); Modified: head/sys/netinet6/in6_ifattach.c == --- head/sys/netinet6/in6_ifattach.cSat Jan 28 16:40:51 2017 (r312928) +++ head/sys/netinet6/in6_ifattach.cSat Jan 28 17:08:40 2017 (r312929) @@ -276,7 +276,6 @@ found: case IFT_ISO88025: case IFT_ATM: case IFT_IEEE1394: - case IFT_IEEE80211: /* IEEE802/EUI64 cases - what others? */ /* IEEE1394 uses 16byte length address starting with EUI64 */ if (addrlen > 8) Modified: head/sys/netinet6/nd6.c == --- head/sys/netinet6/nd6.c Sat Jan 28 16:40:51 2017(r312928) +++ head/sys/netinet6/nd6.c Sat Jan 28 17:08:40 2017(r312929) @@ -2259,7 +2259,6 @@ nd6_resolve(struct ifnet *ifp, int is_gw case IFT_ETHER: case IFT_FDDI: case IFT_L2VLAN: - case IFT_IEEE80211: case IFT_BRIDGE: case IFT_ISO88025: ETHER_MAP_IPV6_MULTICAST(&dst6->sin6_addr, @@ -2527,7 +2526,6 @@ nd6_need_cache(struct ifnet *ifp) case IFT_FDDI: case IFT_IEEE1394: case IFT_L2VLAN: - case IFT_IEEE80211: case IFT_INFINIBAND: case IFT_BRIDGE: case IFT_PROPVIRTUAL: Modified: head/sys/netinet6/nd6_nbr.c == --- head/sys/netinet6/nd6_nbr.c Sat Jan 28 16:40:51 2017(r312928) +++ head/sys/netinet6/nd6_nbr.c Sat Jan 28 17:08:40 2017(r312929) @@ -1086,7 +1086,6 @@ nd6_ifptomac(struct ifnet *ifp) case IFT_FDDI: case IFT_IEEE1394: case IFT_L2VLAN: - case IFT_IEEE80211: case IFT_INFINIBAND: case IFT_BRIDGE: case IFT_ISO88025: @@ -1457,7 +1456,6 @@ nd6_dad_duplicated(struct ifaddr *ifa, s case IFT_FDDI: case IFT_ATM: case IFT_IEEE1394: - case IFT_IEEE80211: case IFT_INFINIBAND: in6 = ia->ia_addr.sin6_addr; if (in6_get_hw_ifid(ifp, &in6) == 0 && Modified: head/usr.sbin/rtsold/if.c ===
Re: svn commit: r312905 - head/sys/net
>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- sys/net/iflib.c (revision 312909) >> +++ sys/net/iflib.c (working copy) >> @@ -1536,8 +1536,8 @@ >> goto fail; >> } >> } >> +#endif >> } >> -#endif >> return (0); >> >> fail: > > Yes, that fixes it. > > I'm sorry for expressing it so badly at first. > > No worries, sorry for the breakage. sean signature.asc Description: OpenPGP digital signature
Re: svn commit: r312905 - head/sys/net
In message <6db0fa21-aaf0-6e0d-5b90-5b0c58fd3...@freebsd.org>, Sean Bruno write s: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > --dkfsunaMxftWlJwiAwenDrGag5jVrG0u1 > Content-Type: multipart/mixed; boundary="7VU3bI00OrFqhCUsm1WfMDVJhUghilMdl"; > protected-headers="v1" > From: Sean Bruno > To: Cy Schubert > Cc: src-committ...@freebsd.org, svn-src-...@freebsd.org, > svn-src-head@freebsd.org > Message-ID: <6db0fa21-aaf0-6e0d-5b90-5b0c58fd3...@freebsd.org> > Subject: Re: svn commit: r312905 - head/sys/net > References: <201701281526.v0sfqamv018...@slippy.cwsent.com> > In-Reply-To: <201701281526.v0sfqamv018...@slippy.cwsent.com> > > --7VU3bI00OrFqhCUsm1WfMDVJhUghilMdl > Content-Type: text/plain; charset=windows-1252 > Content-Transfer-Encoding: quoted-printable > > >> /export/home/cy/freebsd/svn/ip6-cksum/sys/net/iflib.c:2363:1: error:=20 > >> function definition is not allowed here > >> { > >> ^ > >> fatal error: too many errors emitted, stopping now [-ferror-limit=3D] > >=20 > > My initial email about this was correct. It does fail when building i38= > 6 only. (It builds for amd64.) > >=20 > >=20 > > Hmmm ... ok. Does Hiren's suggestion fix your build error? > > Index: sys/net/iflib.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/net/iflib.c (revision 312909) > +++ sys/net/iflib.c (working copy) > @@ -1536,8 +1536,8 @@ > goto fail; > } > } > +#endif > } > -#endif > return (0); > > fail: Yes, that fixes it. I'm sorry for expressing it so badly at first. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312928 - in head/sys: dev/drm2 modules/drm2/drm2
Author: bapt Date: Sat Jan 28 16:40:51 2017 New Revision: 312928 URL: https://svnweb.freebsd.org/changeset/base/312928 Log: Really revert 312923 this time Modified: head/sys/dev/drm2/drm_agpsupport.c head/sys/dev/drm2/drm_drv.c head/sys/dev/drm2/drm_os_freebsd.c head/sys/dev/drm2/drm_os_freebsd.h head/sys/dev/drm2/drm_stub.c head/sys/modules/drm2/drm2/Makefile Modified: head/sys/dev/drm2/drm_agpsupport.c == --- head/sys/dev/drm2/drm_agpsupport.c Sat Jan 28 16:31:23 2017 (r312927) +++ head/sys/dev/drm2/drm_agpsupport.c Sat Jan 28 16:40:51 2017 (r312928) @@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$"); #include -#include #if __OS_HAS_AGP @@ -209,13 +208,15 @@ int drm_agp_alloc(struct drm_device *dev if (!dev->agp || !dev->agp->acquired) return -EINVAL; - if (!(entry = kzalloc(sizeof(*entry), GFP_KERNEL))) + if (!(entry = malloc(sizeof(*entry), DRM_MEM_AGPLISTS, M_NOWAIT))) return -ENOMEM; + memset(entry, 0, sizeof(*entry)); + pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; type = (u32) request->type; if (!(memory = agp_alloc_memory(dev->agp->bridge, type, pages << PAGE_SHIFT))) { - kfree(entry); + free(entry, DRM_MEM_AGPLISTS); return -ENOMEM; } @@ -375,7 +376,7 @@ int drm_agp_free(struct drm_device *dev, list_del(&entry->head); drm_free_agp(entry->memory, entry->pages); - kfree(entry); + free(entry, DRM_MEM_AGPLISTS); return 0; } EXPORT_SYMBOL(drm_agp_free); @@ -403,11 +404,12 @@ struct drm_agp_head *drm_agp_init(struct { struct drm_agp_head *head = NULL; - if (!(head = kzalloc(sizeof(*head), GFP_KERNEL))) + if (!(head = malloc(sizeof(*head), DRM_MEM_AGPLISTS, M_NOWAIT))) return NULL; + memset((void *)head, 0, sizeof(*head)); head->bridge = agp_find_device(); if (!head->bridge) { - kfree(head); + free(head, DRM_MEM_AGPLISTS); return NULL; } else { agp_get_info(head->bridge, &head->agp_info); Modified: head/sys/dev/drm2/drm_drv.c == --- head/sys/dev/drm2/drm_drv.c Sat Jan 28 16:31:23 2017(r312927) +++ head/sys/dev/drm2/drm_drv.c Sat Jan 28 16:40:51 2017(r312928) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include @@ -212,7 +211,7 @@ int drm_lastclose(struct drm_device * de if (entry->bound) drm_unbind_agp(entry->memory); drm_free_agp(entry->memory, entry->pages); - kfree(entry); + free(entry, DRM_MEM_AGPLISTS); } INIT_LIST_HEAD(&dev->agp->memory); Modified: head/sys/dev/drm2/drm_os_freebsd.c == --- head/sys/dev/drm2/drm_os_freebsd.c Sat Jan 28 16:31:23 2017 (r312927) +++ head/sys/dev/drm2/drm_os_freebsd.c Sat Jan 28 16:40:51 2017 (r312928) @@ -24,6 +24,7 @@ MALLOC_DEFINE(DRM_MEM_QUEUES, "drm_queue MALLOC_DEFINE(DRM_MEM_CMDS, "drm_cmds", "DRM COMMAND Data Structures"); MALLOC_DEFINE(DRM_MEM_MAPPINGS, "drm_mapping", "DRM MAPPING Data Structures"); MALLOC_DEFINE(DRM_MEM_BUFLISTS, "drm_buflists", "DRM BUFLISTS Data Structures"); +MALLOC_DEFINE(DRM_MEM_AGPLISTS, "drm_agplists", "DRM AGPLISTS Data Structures"); MALLOC_DEFINE(DRM_MEM_CTXBITMAP, "drm_ctxbitmap", "DRM CTXBITMAP Data Structures"); MALLOC_DEFINE(DRM_MEM_SGLISTS, "drm_sglists", "DRM SGLISTS Data Structures"); @@ -495,5 +496,4 @@ MODULE_VERSION(drmn, 1); MODULE_DEPEND(drmn, agp, 1, 1, 1); MODULE_DEPEND(drmn, pci, 1, 1, 1); MODULE_DEPEND(drmn, mem, 1, 1, 1); -MODULE_DEPEND(drmn, linuxkpi, 1, 1, 1); MODULE_DEPEND(drmn, iicbus, 1, 1, 1); Modified: head/sys/dev/drm2/drm_os_freebsd.h == --- head/sys/dev/drm2/drm_os_freebsd.h Sat Jan 28 16:31:23 2017 (r312927) +++ head/sys/dev/drm2/drm_os_freebsd.h Sat Jan 28 16:40:51 2017 (r312928) @@ -552,6 +552,7 @@ MALLOC_DECLARE(DRM_MEM_QUEUES); MALLOC_DECLARE(DRM_MEM_CMDS); MALLOC_DECLARE(DRM_MEM_MAPPINGS); MALLOC_DECLARE(DRM_MEM_BUFLISTS); +MALLOC_DECLARE(DRM_MEM_AGPLISTS); MALLOC_DECLARE(DRM_MEM_CTXBITMAP); MALLOC_DECLARE(DRM_MEM_SGLISTS); MALLOC_DECLARE(DRM_MEM_MM); Modified: head/sys/dev/drm2/drm_stub.c == --- head/sys/dev/drm2/drm_stub.cSat Jan 28 16:31:23 2017 (r312927) +++ head/sys/dev/drm2/drm_stub.cSat Jan 28 16:40:51 2017 (r312928) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #includ
Re: svn commit: r312905 - head/sys/net
In message <6db0fa21-aaf0-6e0d-5b90-5b0c58fd3...@freebsd.org>, Sean Bruno write s: > This is an OpenPGP/MIME signed message (RFC 4880 and 3156) > --dkfsunaMxftWlJwiAwenDrGag5jVrG0u1 > Content-Type: multipart/mixed; boundary="7VU3bI00OrFqhCUsm1WfMDVJhUghilMdl"; > protected-headers="v1" > From: Sean Bruno > To: Cy Schubert > Cc: src-committ...@freebsd.org, svn-src-...@freebsd.org, > svn-src-head@freebsd.org > Message-ID: <6db0fa21-aaf0-6e0d-5b90-5b0c58fd3...@freebsd.org> > Subject: Re: svn commit: r312905 - head/sys/net > References: <201701281526.v0sfqamv018...@slippy.cwsent.com> > In-Reply-To: <201701281526.v0sfqamv018...@slippy.cwsent.com> > > --7VU3bI00OrFqhCUsm1WfMDVJhUghilMdl > Content-Type: text/plain; charset=windows-1252 > Content-Transfer-Encoding: quoted-printable > > >> /export/home/cy/freebsd/svn/ip6-cksum/sys/net/iflib.c:2363:1: error:=20 > >> function definition is not allowed here > >> { > >> ^ > >> fatal error: too many errors emitted, stopping now [-ferror-limit=3D] > >=20 > > My initial email about this was correct. It does fail when building i38= > 6 only. (It builds for amd64.) > >=20 > >=20 > > Hmmm ... ok. Does Hiren's suggestion fix your build error? > > Index: sys/net/iflib.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/net/iflib.c (revision 312909) > +++ sys/net/iflib.c (working copy) > @@ -1536,8 +1536,8 @@ > goto fail; > } > } > +#endif > } > -#endif > return (0); > > fail: I just read his email and was applying the patch. Trying again... -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312927 - in head: bin/ed contrib/dma share/mk sys/amd64/amd64 sys/amd64/cloudabi64 sys/cam/ctl sys/cddl/dev/fbt/x86 sys/compat/cloudabi sys/compat/cloudabi64 sys/compat/linuxkpi/common...
Author: bapt Date: Sat Jan 28 16:31:23 2017 New Revision: 312927 URL: https://svnweb.freebsd.org/changeset/base/312927 Log: Revert crap accidentally committed Modified: head/bin/ed/Makefile head/contrib/dma/mail.c head/share/mk/bsd.doc.mk head/sys/amd64/amd64/db_trace.c head/sys/amd64/cloudabi64/cloudabi64_sysvec.c head/sys/cam/ctl/ctl_ioctl.h head/sys/cddl/dev/fbt/x86/fbt_isa.c head/sys/compat/cloudabi/cloudabi_fd.c head/sys/compat/cloudabi64/cloudabi64_poll.c head/sys/compat/linuxkpi/common/include/linux/slab.h head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c head/sys/contrib/dev/acpica/include/acpixf.h head/sys/ddb/ddb.h head/sys/dev/drm2/drm_agpsupport.c head/sys/dev/drm2/drm_bufs.c head/sys/dev/drm2/drm_dma.c head/sys/dev/drm2/drm_drv.c head/sys/dev/drm2/drm_os_freebsd.c head/sys/dev/drm2/drm_os_freebsd.h head/sys/dev/drm2/drm_stub.c head/sys/fs/nfsserver/nfs_nfsdstate.c head/sys/kern/kern_descrip.c head/sys/kern/kern_shutdown.c head/sys/modules/drm2/drm2/Makefile head/tools/build/Makefile head/tools/tools/locale/etc/unicode.conf head/usr.bin/getconf/confstr.gperf head/usr.bin/getconf/getconf.c head/usr.bin/getconf/limits.gperf head/usr.bin/getconf/pathconf.gperf head/usr.bin/getconf/progenv.gperf head/usr.bin/getconf/sysconf.gperf head/usr.sbin/nscd/nscd.c head/usr.sbin/nscd/nscdcli.c Modified: head/bin/ed/Makefile == --- head/bin/ed/MakefileSat Jan 28 16:30:14 2017(r312926) +++ head/bin/ed/MakefileSat Jan 28 16:31:23 2017(r312927) @@ -9,7 +9,7 @@ LINKS= ${BINDIR}/ed ${BINDIR}/red MLINKS=ed.1 red.1 .if ${MK_OPENSSL} != "no" && ${MK_ED_CRYPTO} != "no" -CFLAGS+=-DDES -I/usr/include/private/openssl +CFLAGS+=-DDES LIBADD=crypto .endif Modified: head/contrib/dma/mail.c == --- head/contrib/dma/mail.c Sat Jan 28 16:30:14 2017(r312926) +++ head/contrib/dma/mail.c Sat Jan 28 16:31:23 2017(r312927) @@ -38,7 +38,6 @@ #include #include #include -#include #include "dma.h" @@ -342,41 +341,18 @@ newaddr: goto again; } -static int -writeline(struct queue *queue, const char *line, ssize_t linelen) -{ - ssize_t len; - - while (linelen > 0) { - len = linelen; - if (linelen > 1000) { - len = 990; - } - if (fwrite(line, len, 1, queue->mailf) != 1) - return (-1); - if (linelen <= 1000) - break; - if (fwrite("\n", 1, 1, queue->mailf) != 1) - return (-1); - line += 990; - linelen = strlen(line); - } - return (0); -} - int readmail(struct queue *queue, int nodot, int recp_from_header) { struct parse_state parse_state; - char *line = NULL; - ssize_t linelen; - size_t linecap = 0; - char newline[1000]; + char line[1000];/* by RFC2822 */ + size_t linelen; size_t error; int had_headers = 0; int had_from = 0; int had_messagid = 0; int had_date = 0; + int had_last_line = 0; int nocopy = 0; parse_state.state = NONE; @@ -396,15 +372,24 @@ readmail(struct queue *queue, int nodot, return (-1); while (!feof(stdin)) { - newline[0] = '\0'; - if ((linelen = getline(&line, &linecap, stdin)) <= 0) + if (fgets(line, sizeof(line) - 1, stdin) == NULL) break; + if (had_last_line) + errlogx(EX_DATAERR, "bad mail input format:" + " from %s (uid %d) (envelope-from %s)", + username, useruid, queue->sender); + linelen = strlen(line); + if (linelen == 0 || line[linelen - 1] != '\n') { + /* +* This line did not end with a newline character. +* If we fix it, it better be the last line of +* the file. +*/ + line[linelen] = '\n'; + line[linelen + 1] = 0; + had_last_line = 1; + } if (!had_headers) { - if (linelen > 1000) - errlogx(EX_DATAERR, "bad mail input format:" - " from %s (uid %d) (envelope-from %s)", - username, useruid, queue->sender); - /* * Unless this is a continuation, switch of * the Bcc: nocopy flag. @@ -440,44 +425,36 @@ readmail(struct queue *queue
svn commit: r312926 - in head: bin/ed contrib/dma share/mk sys/amd64/amd64 sys/amd64/cloudabi64 sys/cam/ctl sys/cddl/dev/fbt/x86 sys/compat/cloudabi sys/compat/cloudabi64 sys/compat/linuxkpi/common...
Author: bapt Date: Sat Jan 28 16:30:14 2017 New Revision: 312926 URL: https://svnweb.freebsd.org/changeset/base/312926 Log: Revert r312923 a better approach will be taken later Modified: head/bin/ed/Makefile head/contrib/dma/mail.c head/share/mk/bsd.doc.mk head/sys/amd64/amd64/db_trace.c head/sys/amd64/cloudabi64/cloudabi64_sysvec.c head/sys/cam/ctl/ctl_ioctl.h head/sys/cddl/dev/fbt/x86/fbt_isa.c head/sys/compat/cloudabi/cloudabi_fd.c head/sys/compat/cloudabi64/cloudabi64_poll.c head/sys/compat/linuxkpi/common/include/linux/slab.h head/sys/contrib/dev/acpica/components/namespace/nsxfeval.c head/sys/contrib/dev/acpica/include/acpixf.h head/sys/ddb/ddb.h head/sys/dev/drm2/drm_agpsupport.c head/sys/dev/drm2/drm_bufs.c head/sys/dev/drm2/drm_dma.c head/sys/dev/drm2/drm_drv.c head/sys/dev/drm2/drm_os_freebsd.c head/sys/dev/drm2/drm_os_freebsd.h head/sys/dev/drm2/drm_stub.c head/sys/fs/nfsserver/nfs_nfsdstate.c head/sys/kern/kern_descrip.c head/sys/kern/kern_shutdown.c head/sys/modules/drm2/drm2/Makefile head/tools/build/Makefile head/tools/tools/locale/etc/unicode.conf head/usr.bin/getconf/confstr.gperf head/usr.bin/getconf/getconf.c head/usr.bin/getconf/limits.gperf head/usr.bin/getconf/pathconf.gperf head/usr.bin/getconf/progenv.gperf head/usr.bin/getconf/sysconf.gperf head/usr.sbin/nscd/nscd.c head/usr.sbin/nscd/nscdcli.c Modified: head/bin/ed/Makefile == --- head/bin/ed/MakefileSat Jan 28 16:24:06 2017(r312925) +++ head/bin/ed/MakefileSat Jan 28 16:30:14 2017(r312926) @@ -9,7 +9,7 @@ LINKS= ${BINDIR}/ed ${BINDIR}/red MLINKS=ed.1 red.1 .if ${MK_OPENSSL} != "no" && ${MK_ED_CRYPTO} != "no" -CFLAGS+=-DDES +CFLAGS+=-DDES -I/usr/include/private/openssl LIBADD=crypto .endif Modified: head/contrib/dma/mail.c == --- head/contrib/dma/mail.c Sat Jan 28 16:24:06 2017(r312925) +++ head/contrib/dma/mail.c Sat Jan 28 16:30:14 2017(r312926) @@ -38,6 +38,7 @@ #include #include #include +#include #include "dma.h" @@ -341,18 +342,41 @@ newaddr: goto again; } +static int +writeline(struct queue *queue, const char *line, ssize_t linelen) +{ + ssize_t len; + + while (linelen > 0) { + len = linelen; + if (linelen > 1000) { + len = 990; + } + if (fwrite(line, len, 1, queue->mailf) != 1) + return (-1); + if (linelen <= 1000) + break; + if (fwrite("\n", 1, 1, queue->mailf) != 1) + return (-1); + line += 990; + linelen = strlen(line); + } + return (0); +} + int readmail(struct queue *queue, int nodot, int recp_from_header) { struct parse_state parse_state; - char line[1000];/* by RFC2822 */ - size_t linelen; + char *line = NULL; + ssize_t linelen; + size_t linecap = 0; + char newline[1000]; size_t error; int had_headers = 0; int had_from = 0; int had_messagid = 0; int had_date = 0; - int had_last_line = 0; int nocopy = 0; parse_state.state = NONE; @@ -372,24 +396,15 @@ readmail(struct queue *queue, int nodot, return (-1); while (!feof(stdin)) { - if (fgets(line, sizeof(line) - 1, stdin) == NULL) + newline[0] = '\0'; + if ((linelen = getline(&line, &linecap, stdin)) <= 0) break; - if (had_last_line) - errlogx(EX_DATAERR, "bad mail input format:" - " from %s (uid %d) (envelope-from %s)", - username, useruid, queue->sender); - linelen = strlen(line); - if (linelen == 0 || line[linelen - 1] != '\n') { - /* -* This line did not end with a newline character. -* If we fix it, it better be the last line of -* the file. -*/ - line[linelen] = '\n'; - line[linelen + 1] = 0; - had_last_line = 1; - } if (!had_headers) { + if (linelen > 1000) + errlogx(EX_DATAERR, "bad mail input format:" + " from %s (uid %d) (envelope-from %s)", + username, useruid, queue->sender); + /* * Unless this is a continuation, switch of * the Bcc: nocopy flag. @@ -425,36 +440,44 @@ readmail(s
Re: svn commit: r312917 - in head: share/man/man4 share/man/man4/man4.i386 sys/dev/pci sys/modules/ata/atacbus
> On Jan 28, 2017, at 01:58, Takahashi Yoshihiro wrote: > > Author: nyan > Date: Sat Jan 28 09:58:00 2017 > New Revision: 312917 > URL: https://svnweb.freebsd.org/changeset/base/312917 > > Log: > Remove more pc98 support. Hello Yoshiro-San, Have appropriate man pages and files been added to ObsoleteFiles.inc? Thank you! -Ngie ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312925 - in head/sys: arm/include arm64/include
Author: cognet Date: Sat Jan 28 16:24:06 2017 New Revision: 312925 URL: https://svnweb.freebsd.org/changeset/base/312925 Log: Implement atomic_fcmpset_* for arm and arm64. Modified: head/sys/arm/include/atomic-v4.h head/sys/arm/include/atomic-v6.h head/sys/arm/include/atomic.h head/sys/arm64/include/atomic.h Modified: head/sys/arm/include/atomic-v4.h == --- head/sys/arm/include/atomic-v4.hSat Jan 28 15:44:14 2017 (r312924) +++ head/sys/arm/include/atomic-v4.hSat Jan 28 16:24:06 2017 (r312925) @@ -112,6 +112,43 @@ atomic_clear_64(volatile uint64_t *addre __with_interrupts_disabled(*address &= ~clearmask); } +static __inline int +atomic_fcmpset_32(volatile u_int32_t *p, volatile u_int32_t *cmpval, volatile u_int32_t newval) +{ + u_int32_t ret; + + __with_interrupts_disabled( +{ + ret = *p; + if (*p == *cmpval) { + *p = newval; + ret = 1; + } else { + *cmpval = *p; + ret = 0; + } + }); + return (ret); +} + +static __inline int +atomic_fcmpset_64(volatile u_int64_t *p, volatile u_int64_t *cmpval, volatile u_int64_t newval) +{ + u_int64_t ret; + + __with_interrupts_disabled( +{ + if (*p == *cmpval) { + *p = newval; + ret = 1; + } else { + *cmpval = *p; + ret = 0; + } + }); + return (ret); +} + static __inline u_int32_t atomic_cmpset_32(volatile u_int32_t *p, volatile u_int32_t cmpval, volatile u_int32_t newval) { @@ -370,6 +407,12 @@ atomic_swap_32(volatile u_int32_t *p, u_ return (__swp(v, p)); } +#define atomic_fcmpset_rel_32 atomic_fcmpset_32 +#define atomic_fcmpset_acq_32 atomic_fcmpset_32 +#define atomic_fcmpset_rel_64 atomic_fcmpset_64 +#define atomic_fcmpset_acq_64 atomic_fcmpset_64 +#define atomic_fcmpset_acq_longatomic_fcmpset_long +#define atomic_fcmpset_rel_longatomic_fcmpset_long #define atomic_cmpset_rel_32 atomic_cmpset_32 #define atomic_cmpset_acq_32 atomic_cmpset_32 #define atomic_cmpset_rel_64 atomic_cmpset_64 @@ -421,6 +464,14 @@ atomic_cmpset_long(volatile u_long *dst, } static __inline u_long +atomic_fcmpset_long(volatile u_long *dst, u_long *old, u_long newe) +{ + + return (atomic_fcmpset_32((volatile uint32_t *)dst, + (uint32_t *)old, newe)); +} + +static __inline u_long atomic_fetchadd_long(volatile u_long *p, u_long v) { Modified: head/sys/arm/include/atomic-v6.h == --- head/sys/arm/include/atomic-v6.hSat Jan 28 15:44:14 2017 (r312924) +++ head/sys/arm/include/atomic-v6.hSat Jan 28 16:24:06 2017 (r312925) @@ -190,6 +190,116 @@ ATOMIC_ACQ_REL(clear, 32) ATOMIC_ACQ_REL(clear, 64) ATOMIC_ACQ_REL_LONG(clear) +static __inline int +atomic_fcmpset_32(volatile uint32_t *p, uint32_t *cmpval, uint32_t newval) +{ + uint32_t tmp; + uint32_t _cmpval = *cmpval; + int ret; + + __asm __volatile( + "1: mov %0, #1 \n" + " ldrex %1, [%2]\n" + " cmp %1, %3 \n" + " it ne \n" + " bne 2f \n" + " strex %0, %4, [%2]\n" + "2:" + : "=&r" (ret), "=&r" (tmp), "+r" (p), "+r" (_cmpval), "+r" (newval) + : : "cc", "memory"); + *cmpval = tmp; + return (!ret); +} + +static __inline uint64_t +atomic_fcmpset_64(volatile uint64_t *p, uint64_t *cmpval, uint64_t newval) +{ + uint64_t tmp; + uint64_t _cmpval = *cmpval; + int ret; + + __asm __volatile( + "1: mov %[ret], #1 \n" + " ldrexd %Q[tmp], %R[tmp], [%[ptr]] \n" + " teq %Q[tmp], %Q[_cmpval]\n" + " iteeeq \n" + " teqeq %R[tmp], %R[_cmpval]\n" + " bne 2f \n" + " strexd %[ret], %Q[newval], %R[newval], [%[ptr]]\n" + "2: \n" + : [ret]"=&r" (ret), + [tmp]"=&r" (tmp) + : [ptr]"r" (p), + [_cmpval] "r" (_cmpval), + [newval] "r" (newval) + : "cc", "memory"); + *cmpval = tmp; + return (!ret); +} + +static __inline u_long +atomic_fcmpset_long(volatile u_long *p, u_long *cmpval, u_long newval) +{ + + return (atomic_fcmpset_32((volatile uint32_t *)p, + (uint32_t *)cmpval, newval)); +} + +static __inline uint6
Re: svn commit: r312923 - in head/sys: dev/drm2 modules/drm2/drm2
Am Sat, 28 Jan 2017 15:43:19 + (UTC) Baptiste Daroussin schrieb: > Author: bapt > Date: Sat Jan 28 15:43:19 2017 > New Revision: 312923 > URL: https://svnweb.freebsd.org/changeset/base/312923 > > Log: > Make the drm2 module depend on linuxkpi > > Use linux memory allocation to reduce diff with upstream > > Modified: > head/sys/dev/drm2/drm_agpsupport.c > head/sys/dev/drm2/drm_drv.c > head/sys/dev/drm2/drm_os_freebsd.c > head/sys/dev/drm2/drm_os_freebsd.h > head/sys/dev/drm2/drm_stub.c > head/sys/modules/drm2/drm2/Makefile > > Modified: head/sys/dev/drm2/drm_agpsupport.c > == > --- head/sys/dev/drm2/drm_agpsupport.cSat Jan 28 13:25:06 2017 > (r312922) > +++ head/sys/dev/drm2/drm_agpsupport.cSat Jan 28 15:43:19 2017 > (r312923) > @@ -35,6 +35,7 @@ > __FBSDID("$FreeBSD$"); > > #include > +#include > > #if __OS_HAS_AGP > > @@ -208,15 +209,13 @@ int drm_agp_alloc(struct drm_device *dev > > if (!dev->agp || !dev->agp->acquired) > return -EINVAL; > - if (!(entry = malloc(sizeof(*entry), DRM_MEM_AGPLISTS, M_NOWAIT))) > + if (!(entry = kzalloc(sizeof(*entry), GFP_KERNEL))) > return -ENOMEM; > > - memset(entry, 0, sizeof(*entry)); > - > pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; > type = (u32) request->type; > if (!(memory = agp_alloc_memory(dev->agp->bridge, type, pages << > PAGE_SHIFT))) > { > - free(entry, DRM_MEM_AGPLISTS); > + kfree(entry); > return -ENOMEM; > } > > @@ -376,7 +375,7 @@ int drm_agp_free(struct drm_device *dev, > list_del(&entry->head); > > drm_free_agp(entry->memory, entry->pages); > - free(entry, DRM_MEM_AGPLISTS); > + kfree(entry); > return 0; > } > EXPORT_SYMBOL(drm_agp_free); > @@ -404,12 +403,11 @@ struct drm_agp_head *drm_agp_init(struct > { > struct drm_agp_head *head = NULL; > > - if (!(head = malloc(sizeof(*head), DRM_MEM_AGPLISTS, M_NOWAIT))) > + if (!(head = kzalloc(sizeof(*head), GFP_KERNEL))) > return NULL; > - memset((void *)head, 0, sizeof(*head)); > head->bridge = agp_find_device(); > if (!head->bridge) { > - free(head, DRM_MEM_AGPLISTS); > + kfree(head); > return NULL; > } else { > agp_get_info(head->bridge, &head->agp_info); > > Modified: head/sys/dev/drm2/drm_drv.c > == > --- head/sys/dev/drm2/drm_drv.c Sat Jan 28 13:25:06 2017 > (r312922) > +++ head/sys/dev/drm2/drm_drv.c Sat Jan 28 15:43:19 2017 > (r312923) > @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); > > #include > > +#include > #include > #include > #include > @@ -211,7 +212,7 @@ int drm_lastclose(struct drm_device * de > if (entry->bound) > drm_unbind_agp(entry->memory); > drm_free_agp(entry->memory, entry->pages); > - free(entry, DRM_MEM_AGPLISTS); > + kfree(entry); > } > INIT_LIST_HEAD(&dev->agp->memory); > > > Modified: head/sys/dev/drm2/drm_os_freebsd.c > == > --- head/sys/dev/drm2/drm_os_freebsd.cSat Jan 28 13:25:06 2017 > (r312922) > +++ head/sys/dev/drm2/drm_os_freebsd.cSat Jan 28 15:43:19 2017 > (r312923) > @@ -24,7 +24,6 @@ MALLOC_DEFINE(DRM_MEM_QUEUES, "drm_queue > MALLOC_DEFINE(DRM_MEM_CMDS, "drm_cmds", "DRM COMMAND Data Structures"); > MALLOC_DEFINE(DRM_MEM_MAPPINGS, "drm_mapping", "DRM MAPPING Data > Structures"); > MALLOC_DEFINE(DRM_MEM_BUFLISTS, "drm_buflists", "DRM BUFLISTS Data > Structures"); > -MALLOC_DEFINE(DRM_MEM_AGPLISTS, "drm_agplists", "DRM AGPLISTS Data > Structures"); > MALLOC_DEFINE(DRM_MEM_CTXBITMAP, "drm_ctxbitmap", > "DRM CTXBITMAP Data Structures"); > MALLOC_DEFINE(DRM_MEM_SGLISTS, "drm_sglists", "DRM SGLISTS Data Structures"); > @@ -496,4 +495,5 @@ MODULE_VERSION(drmn, 1); > MODULE_DEPEND(drmn, agp, 1, 1, 1); > MODULE_DEPEND(drmn, pci, 1, 1, 1); > MODULE_DEPEND(drmn, mem, 1, 1, 1); > +MODULE_DEPEND(drmn, linuxkpi, 1, 1, 1); > MODULE_DEPEND(drmn, iicbus, 1, 1, 1); > > Modified: head/sys/dev/drm2/drm_os_freebsd.h > == > --- head/sys/dev/drm2/drm_os_freebsd.hSat Jan 28 13:25:06 2017 > (r312922) > +++ head/sys/dev/drm2/drm_os_freebsd.hSat Jan 28 15:43:19 2017 > (r312923) > @@ -552,7 +552,6 @@ MALLOC_DECLARE(DRM_MEM_QUEUES); > MALLOC_DECLARE(DRM_MEM_CMDS); > MALLOC_DECLARE(DRM_MEM_MAPPINGS); > MALLOC_DECLARE(DRM_MEM_BUFLISTS); > -MALLOC_DECLARE(DRM_MEM_AGPLISTS); > MALLOC_DECLARE(DRM_MEM_CTXBITMAP); > MAL
svn commit: r312924 - head/sys/net
Author: sbruno Date: Sat Jan 28 15:44:14 2017 New Revision: 312924 URL: https://svnweb.freebsd.org/changeset/base/312924 Log: Fix i386 compile failure by moving needed closing parenthesis out of conditional block. Submitted by: hiren Reported by:cy Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c == --- head/sys/net/iflib.cSat Jan 28 15:43:19 2017(r312923) +++ head/sys/net/iflib.cSat Jan 28 15:44:14 2017(r312924) @@ -1536,8 +1536,8 @@ iflib_rxsd_alloc(iflib_rxq_t rxq) goto fail; } } - } #endif + } return (0); fail: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312923 - in head/sys: dev/drm2 modules/drm2/drm2
Author: bapt Date: Sat Jan 28 15:43:19 2017 New Revision: 312923 URL: https://svnweb.freebsd.org/changeset/base/312923 Log: Make the drm2 module depend on linuxkpi Use linux memory allocation to reduce diff with upstream Modified: head/sys/dev/drm2/drm_agpsupport.c head/sys/dev/drm2/drm_drv.c head/sys/dev/drm2/drm_os_freebsd.c head/sys/dev/drm2/drm_os_freebsd.h head/sys/dev/drm2/drm_stub.c head/sys/modules/drm2/drm2/Makefile Modified: head/sys/dev/drm2/drm_agpsupport.c == --- head/sys/dev/drm2/drm_agpsupport.c Sat Jan 28 13:25:06 2017 (r312922) +++ head/sys/dev/drm2/drm_agpsupport.c Sat Jan 28 15:43:19 2017 (r312923) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include +#include #if __OS_HAS_AGP @@ -208,15 +209,13 @@ int drm_agp_alloc(struct drm_device *dev if (!dev->agp || !dev->agp->acquired) return -EINVAL; - if (!(entry = malloc(sizeof(*entry), DRM_MEM_AGPLISTS, M_NOWAIT))) + if (!(entry = kzalloc(sizeof(*entry), GFP_KERNEL))) return -ENOMEM; - memset(entry, 0, sizeof(*entry)); - pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; type = (u32) request->type; if (!(memory = agp_alloc_memory(dev->agp->bridge, type, pages << PAGE_SHIFT))) { - free(entry, DRM_MEM_AGPLISTS); + kfree(entry); return -ENOMEM; } @@ -376,7 +375,7 @@ int drm_agp_free(struct drm_device *dev, list_del(&entry->head); drm_free_agp(entry->memory, entry->pages); - free(entry, DRM_MEM_AGPLISTS); + kfree(entry); return 0; } EXPORT_SYMBOL(drm_agp_free); @@ -404,12 +403,11 @@ struct drm_agp_head *drm_agp_init(struct { struct drm_agp_head *head = NULL; - if (!(head = malloc(sizeof(*head), DRM_MEM_AGPLISTS, M_NOWAIT))) + if (!(head = kzalloc(sizeof(*head), GFP_KERNEL))) return NULL; - memset((void *)head, 0, sizeof(*head)); head->bridge = agp_find_device(); if (!head->bridge) { - free(head, DRM_MEM_AGPLISTS); + kfree(head); return NULL; } else { agp_get_info(head->bridge, &head->agp_info); Modified: head/sys/dev/drm2/drm_drv.c == --- head/sys/dev/drm2/drm_drv.c Sat Jan 28 13:25:06 2017(r312922) +++ head/sys/dev/drm2/drm_drv.c Sat Jan 28 15:43:19 2017(r312923) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -211,7 +212,7 @@ int drm_lastclose(struct drm_device * de if (entry->bound) drm_unbind_agp(entry->memory); drm_free_agp(entry->memory, entry->pages); - free(entry, DRM_MEM_AGPLISTS); + kfree(entry); } INIT_LIST_HEAD(&dev->agp->memory); Modified: head/sys/dev/drm2/drm_os_freebsd.c == --- head/sys/dev/drm2/drm_os_freebsd.c Sat Jan 28 13:25:06 2017 (r312922) +++ head/sys/dev/drm2/drm_os_freebsd.c Sat Jan 28 15:43:19 2017 (r312923) @@ -24,7 +24,6 @@ MALLOC_DEFINE(DRM_MEM_QUEUES, "drm_queue MALLOC_DEFINE(DRM_MEM_CMDS, "drm_cmds", "DRM COMMAND Data Structures"); MALLOC_DEFINE(DRM_MEM_MAPPINGS, "drm_mapping", "DRM MAPPING Data Structures"); MALLOC_DEFINE(DRM_MEM_BUFLISTS, "drm_buflists", "DRM BUFLISTS Data Structures"); -MALLOC_DEFINE(DRM_MEM_AGPLISTS, "drm_agplists", "DRM AGPLISTS Data Structures"); MALLOC_DEFINE(DRM_MEM_CTXBITMAP, "drm_ctxbitmap", "DRM CTXBITMAP Data Structures"); MALLOC_DEFINE(DRM_MEM_SGLISTS, "drm_sglists", "DRM SGLISTS Data Structures"); @@ -496,4 +495,5 @@ MODULE_VERSION(drmn, 1); MODULE_DEPEND(drmn, agp, 1, 1, 1); MODULE_DEPEND(drmn, pci, 1, 1, 1); MODULE_DEPEND(drmn, mem, 1, 1, 1); +MODULE_DEPEND(drmn, linuxkpi, 1, 1, 1); MODULE_DEPEND(drmn, iicbus, 1, 1, 1); Modified: head/sys/dev/drm2/drm_os_freebsd.h == --- head/sys/dev/drm2/drm_os_freebsd.h Sat Jan 28 13:25:06 2017 (r312922) +++ head/sys/dev/drm2/drm_os_freebsd.h Sat Jan 28 15:43:19 2017 (r312923) @@ -552,7 +552,6 @@ MALLOC_DECLARE(DRM_MEM_QUEUES); MALLOC_DECLARE(DRM_MEM_CMDS); MALLOC_DECLARE(DRM_MEM_MAPPINGS); MALLOC_DECLARE(DRM_MEM_BUFLISTS); -MALLOC_DECLARE(DRM_MEM_AGPLISTS); MALLOC_DECLARE(DRM_MEM_CTXBITMAP); MALLOC_DECLARE(DRM_MEM_SGLISTS); MALLOC_DECLARE(DRM_MEM_MM); Modified: head/sys/dev/drm2/drm_stub.c == --- head/sys/dev/drm2/drm_stub.cSat Jan 28 13:25:06 2017 (r312922) +++ head/sys/dev/drm2/drm_stub.cSat Jan 28 15:43:19 201
Re: svn commit: r312905 - head/sys/net
>> /export/home/cy/freebsd/svn/ip6-cksum/sys/net/iflib.c:2363:1: error: >> function definition is not allowed here >> { >> ^ >> fatal error: too many errors emitted, stopping now [-ferror-limit=] > > My initial email about this was correct. It does fail when building i386 > only. (It builds for amd64.) > > Hmmm ... ok. Does Hiren's suggestion fix your build error? Index: sys/net/iflib.c === --- sys/net/iflib.c (revision 312909) +++ sys/net/iflib.c (working copy) @@ -1536,8 +1536,8 @@ goto fail; } } +#endif } -#endif return (0); fail: signature.asc Description: OpenPGP digital signature
Re: svn commit: r312905 - head/sys/net
Cy Schubert writes: > In message <201701272308.v0rn86fx040...@repo.freebsd.org>, Sean Bruno > writes: > > Author: sbruno > > Date: Fri Jan 27 23:08:06 2017 > > New Revision: 312905 > > URL: https://svnweb.freebsd.org/changeset/base/312905 > > > > Log: > > IFLIB updates: > > We found routing performance dropped significantly when configuring > > FreeBSD as a router, we are applying the following changes in order to > > resolve those issues and hopefully perform better. > >- don't prefetch the flags array, we usually don't need it > >- prefetch the next cache line of each of the software descriptor arrays > a > > s > > well as the first cache line of each of the next four packets' mbufs a > nd > > clusters > >- reduce max copy size to 63 bytes > >- convert rx soft descriptors from array of structures to a structure of > a > > rrays > >- update copyrights > > > > Submitted by: Matt Macy > > > > Modified: > > head/sys/net/iflib.c > > head/sys/net/iflib.h > > > > Modified: head/sys/net/iflib.c > > === > == > > = > > --- head/sys/net/iflib.cFri Jan 27 23:03:28 2017(r312904) > > +++ head/sys/net/iflib.cFri Jan 27 23:08:06 2017(r312905) > > @@ -1,5 +1,5 @@ > > /*- > > - * Copyright (c) 2014-2016, Matthew Macy > > + * Copyright (c) 2014-2017, Matthew Macy > > * All rights reserved. > > * > > * Redistribution and use in source and binary forms, with or without > > @@ -264,18 +264,12 @@ iflib_get_sctx(if_ctx_t ctx) > > #define RX_SW_DESC_INUSE(1 << 3) > > #define TX_SW_DESC_MAPPED (1 << 4) > > > > -typedef struct iflib_sw_rx_desc { > > - bus_dmamap_tifsd_map; /* bus_dma map for packet */ > > - struct mbuf*ifsd_m; /* rx: uninitialized mbuf */ > > - caddr_t ifsd_cl; /* direct cluster pointer for rx */ > > - uint16_tifsd_flags; > > -} *iflib_rxsd_t; > > - > > -typedef struct iflib_sw_tx_desc_val { > > - bus_dmamap_tifsd_map; /* bus_dma map for packet */ > > - struct mbuf*ifsd_m; /* pkthdr mbuf */ > > - uint8_t ifsd_flags; > > -} *iflib_txsd_val_t; > > +typedef struct iflib_sw_rx_desc_array { > > + bus_dmamap_t*ifsd_map; /* bus_dma maps for packet */ > > + struct mbuf **ifsd_m; /* pkthdr mbufs */ > > + caddr_t *ifsd_cl; /* direct cluster pointer for rx */ > > + uint8_t *ifsd_flags; > > +} iflib_rxsd_array_t; > > > > typedef struct iflib_sw_tx_desc_array { > > bus_dmamap_t*ifsd_map; /* bus_dma maps for packet */ > > @@ -287,7 +281,7 @@ typedef struct iflib_sw_tx_desc_array { > > /* magic number that should be high enough for any hardware */ > > #define IFLIB_MAX_TX_SEGS 128 > > #define IFLIB_MAX_RX_SEGS 32 > > -#define IFLIB_RX_COPY_THRESH 128 > > +#define IFLIB_RX_COPY_THRESH 63 > > #define IFLIB_MAX_RX_REFRESH 32 > > #define IFLIB_QUEUE_IDLE 0 > > #define IFLIB_QUEUE_HUNG 1 > > @@ -383,7 +377,7 @@ struct iflib_fl { > > uint16_tifl_buf_size; > > uint16_tifl_cltype; > > uma_zone_t ifl_zone; > > - iflib_rxsd_tifl_sds; > > + iflib_rxsd_array_t ifl_sds; > > iflib_rxq_t ifl_rxq; > > uint8_t ifl_id; > > bus_dma_tag_t ifl_desc_tag; > > @@ -909,7 +903,7 @@ iflib_netmap_rxsync(struct netmap_kring > > ring->slot[nm_i].len = ri.iri_len - crc > > len; > > ring->slot[nm_i].flags = slot_flags; > > bus_dmamap_sync(fl->ifl_ifdi->idi_tag, > > - fl->ifl_sds[nic > > _i].ifsd_map, BUS_DMASYNC_POSTREAD); > > + fl->ifl_sds.ifs > > d_map[nic_i], BUS_DMASYNC_POSTREAD); > > nm_i = nm_next(nm_i, lim); > > nic_i = nm_next(nic_i, lim); > > } > > @@ -949,14 +943,14 @@ iflib_netmap_rxsync(struct netmap_kring > > vaddr = addr; > > if (slot->flags & NS_BUF_CHANGED) { > > /* buffer has changed, reload map */ > > - netmap_reload_map(na, fl->ifl_ifdi->idi_tag, fl > > ->ifl_sds[nic_i].ifsd_map, addr); > > + netmap_reload_map(na, fl->ifl_ifdi->idi_tag, fl > > ->ifl_sds.ifsd_map[nic_i], addr); > > slot->flags &= ~NS_BUF_CHANGED; > > } > > /* > > * XXX we should be batching this operation - TODO > > */ > > ctx->isc_rxd_refill(ctx->ifc_softc, rxq->ifr_id, fl->if > > l_id, nic_i, &paddr, &vaddr, 1, fl->ifl_buf_size); > >
svn commit: r312922 - head/sys/dev/altera/avgen
Author: rwatson Date: Sat Jan 28 13:25:06 2017 New Revision: 312922 URL: https://svnweb.freebsd.org/changeset/base/312922 Log: Merge enhancements to the ALTERA Avalon bus generic device attachment driver to support exposing a GEOM device, which can be used to mount Avalon-attached ROMs, reserved areas of DRAM, etc, as a filesystem: commit 9deb1e60eaaaf7a3687e48c58af5efd756f32ec6 Author: Robert N. M. Watson Date: Sat Mar 5 20:33:12 2016 + Use format strings with make_dev(9) in avgen(4). commit 0bf2176c23e7425bfa042c08a24f8a25fe6d8885 Author: Robert N. M. Watson Date: Tue Mar 1 10:23:23 2016 + Implement a new "geomio" configuration argument to altera_avgen(4), the generic I/O device we attach to various BERI peripherals. The new option requests that, instead of exposing the underlying device via a special device node in /dev, it instead be exposed via geom(4), allowing it to be used with filesystems. The current implementation does not allow a device to be exposed both for file/mmap and geom, so one of the two models must be selected when configuring it via FDT or device.hints. A typical use of the new option will be: sri-cambridge,geomio = "rw"; MFC after:1 week Sponsored by: DARPA, AFRL Modified: head/sys/dev/altera/avgen/altera_avgen.c head/sys/dev/altera/avgen/altera_avgen.h head/sys/dev/altera/avgen/altera_avgen_fdt.c head/sys/dev/altera/avgen/altera_avgen_nexus.c Modified: head/sys/dev/altera/avgen/altera_avgen.c == --- head/sys/dev/altera/avgen/altera_avgen.cSat Jan 28 13:09:18 2017 (r312921) +++ head/sys/dev/altera/avgen/altera_avgen.cSat Jan 28 13:25:06 2017 (r312922) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012-2013 Robert N. M. Watson + * Copyright (c) 2012-2013, 2016 Robert N. M. Watson * All rights reserved. * * This software was developed by SRI International and the University of @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -45,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include @@ -65,14 +68,19 @@ static d_mmap_t altera_avgen_mmap; static d_read_t altera_avgen_read; static d_write_t altera_avgen_write; +#defineALTERA_AVGEN_DEVNAME"altera_avgen" +#defineALTERA_AVGEN_DEVNAME_FMT(ALTERA_AVGEN_DEVNAME "%d") + static struct cdevsw avg_cdevsw = { .d_version =D_VERSION, .d_mmap = altera_avgen_mmap, .d_read = altera_avgen_read, .d_write = altera_avgen_write, - .d_name = "altera_avgen", + .d_name = ALTERA_AVGEN_DEVNAME, }; +#defineALTERA_AVGEN_SECTORSIZE 512 /* Not configurable at this time. */ + static int altera_avgen_read(struct cdev *dev, struct uio *uio, int flag) { @@ -227,11 +235,103 @@ altera_avgen_mmap(struct cdev *dev, vm_o return (0); } +/* + * NB: We serialise block reads and writes in case the OS is generating + * concurrent I/O against the same block, in which case we want one I/O (or + * another) to win. This is not sufficient to provide atomicity for the + * sector in the presence of a fail stop -- however, we're just writing this + * to non-persistent DRAM .. right? + */ +static void +altera_avgen_disk_strategy(struct bio *bp) +{ + struct altera_avgen_softc *sc; + void *data; + long bcount; + daddr_t pblkno; + + sc = bp->bio_disk->d_drv1; + data = bp->bio_data; + bcount = bp->bio_bcount; + pblkno = bp->bio_pblkno; + + /* +* Serialize block reads / writes. +*/ + mtx_lock(&sc->avg_disk_mtx); + switch (bp->bio_cmd) { + case BIO_READ: + if (!(sc->avg_flags & ALTERA_AVALON_FLAG_GEOM_READ)) { + biofinish(bp, NULL, EIO); + break; + } + switch (sc->avg_width) { + case 1: + bus_read_region_1(sc->avg_res, + bp->bio_pblkno * ALTERA_AVGEN_SECTORSIZE, + (uint8_t *)data, bcount); + break; + + case 2: + bus_read_region_2(sc->avg_res, + bp->bio_pblkno * ALTERA_AVGEN_SECTORSIZE, + (uint16_t *)data, bcount / 2); + break; + + case 4: + bus_read_region_4(sc->avg_res, + bp->bio_pblkno * ALTERA_AVGEN_SECTORSIZE, + (uint32_t *)data, bcount / 4); + break; + + default: + panic("%s: unexpected width %u", __func__, + sc->avg_width); + } + break; + +
svn commit: r312921 - head/usr.sbin/syslogd
Author: hrs Date: Sat Jan 28 13:09:18 2017 New Revision: 312921 URL: https://svnweb.freebsd.org/changeset/base/312921 Log: Fix a bug which caused not to create AF_LOCAL sockets when family is specified. Spotted by: Alex Deiter Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c == --- head/usr.sbin/syslogd/syslogd.c Sat Jan 28 12:43:19 2017 (r312920) +++ head/usr.sbin/syslogd/syslogd.c Sat Jan 28 13:09:18 2017 (r312921) @@ -2908,7 +2908,8 @@ socksetup(struct peer *pe) /* Only AF_LOCAL in secure mode. */ continue; } - if (family != AF_UNSPEC && res->ai_family != family) + if (family != AF_UNSPEC && + res->ai_family != AF_LOCAL && res->ai_family != family) continue; s = socket(res->ai_family, res->ai_socktype, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312920 - head/sys/dev/altera/jtag_uart
Author: rwatson Date: Sat Jan 28 12:43:19 2017 New Revision: 312920 URL: https://svnweb.freebsd.org/changeset/base/312920 Log: Merge robustness improvements for the ALTERA JTAG UART driver from CheriBSD, which attempt to work around an inherent race in the UART's control-register design in detecting whether JTAG is currently, present, which will otherwise lead to moderately frequent output drops when running in polled rather than interrupt-driven operation. Now, these drops are quite infrequent. commit 9f33fddac9215e32781a4f016ba17eab804fb6d4 Author: Robert N. M. Watson Date: Thu Jul 16 17:34:12 2015 + Add a new sysctl, hw.altera_jtag_uart.ac_poll_delay, which allows the (default 10ms) delay associated with a full JTAG UART buffer combined with a lack of a JTAG-present flag to be tuned. Setting this higher may cause some JTAG configurations to be more reliable when printing out low-level console output at a speed greater than the JTAG UART is willing to carry data. Or it may not. commit 73992ef7607738b2973736e409ccd644b30eadba Author: Robert N. M. Watson Date: Sun Jan 1 15:13:07 2017 + Minor improvements to the Altera JTAG UART device driver: - Minor rework to the logic to detect JTAG presence in order to be a bit more resilient to inevitable races: increase the retry period from two seconds to four seconds for trying to find JTAG, and more agressively clear the miss counter if JTAG has been reconnected. Once JTAG has vanished, stop prodding the miss counter. - Do a bit of reworking of the output code to frob the control register less by checking whether write interrupts are enabled/disabled before changing their state. This should reduce the opportunity for races with JTAG discovery (which are inherent to the Altera hardware-software interface, but can at least be minimised). - Add statistics relating to interrupt enable/disable/JTAG discovery/etc. With these changes, polled-mode JTAG UART ttys appear substantially more robust. MFC after:1 week Sponsored by: DARPA, AFRL Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c head/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c == --- head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c Sat Jan 28 12:26:22 2017(r312919) +++ head/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c Sat Jan 28 12:43:19 2017(r312920) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -49,6 +50,9 @@ __FBSDID("$FreeBSD$"); devclass_t altera_jtag_uart_devclass; +static SYSCTL_NODE(_hw, OID_AUTO, altera_jtag_uart, CTLFLAG_RW, 0, +"Altera JTAG UART configuration knobs"); + /* * One-byte buffer as we can't check whether the UART is readable without * actually reading from it, synchronised by a spinlock; this lock also @@ -82,6 +86,11 @@ static cn_ungrab_t aju_cnungrab; * no AC bit set. */ #defineALTERA_JTAG_UART_AC_POLL_DELAY 1 +static u_int altera_jtag_uart_ac_poll_delay = + ALTERA_JTAG_UART_AC_POLL_DELAY; +SYSCTL_UINT(_hw_altera_jtag_uart, OID_AUTO, ac_poll_delay, +CTLFLAG_RW, &altera_jtag_uart_ac_poll_delay, 0, +"Maximum delay waiting for JTAG present flag when buffer is full"); /* * I/O routines lifted from Deimos. This is not only MIPS-specific, but also @@ -220,10 +229,10 @@ aju_cons_write(char ch) * layer clearing of the bit doesn't trigger a TTY-layer * disconnection. * -* XXXRW: The polling delay may require tuning. -* * XXXRW: Notice the inherent race with hardware: in clearing the -* bit, we may race with hardware setting the same bit. +* bit, we may race with hardware setting the same bit. This can +* cause real-world reliability problems due to lost output on the +* console. */ v = aju_cons_control_read(); if (v & ALTERA_JTAG_UART_CONTROL_AC) { @@ -235,7 +244,7 @@ aju_cons_write(char ch) while ((v & ALTERA_JTAG_UART_CONTROL_WSPACE) == 0) { if (!aju_cons_jtag_present) return; - DELAY(ALTERA_JTAG_UART_AC_POLL_DELAY); + DELAY(altera_jtag_uart_ac_poll_delay); v = aju_cons_control_read(); if (v & ALTERA_JTAG_UART_CONTROL_AC) { aju_cons_jtag_present = 1; Modified: head/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.c == --- head/sys/dev/altera/jtag_uart/altera_jtag_uart_tty.cSat Jan 28 12:26:22 2017(r312919) +++ head/sys
svn commit: r312919 - head/tests/sys/aio
Author: rwatson Date: Sat Jan 28 12:26:22 2017 New Revision: 312919 URL: https://svnweb.freebsd.org/changeset/base/312919 Log: Fix build of aio_test on MIPS, where the compiler warns about the local variable 'err' shadowing the global function err(3). Which it does. Sponsored by: DARPA, AFRL Modified: head/tests/sys/aio/aio_test.c Modified: head/tests/sys/aio/aio_test.c == --- head/tests/sys/aio/aio_test.c Sat Jan 28 11:38:51 2017 (r312918) +++ head/tests/sys/aio/aio_test.c Sat Jan 28 12:26:22 2017 (r312919) @@ -188,31 +188,31 @@ aio_context_init(struct aio_context *ac, static ssize_t poll(struct aiocb *aio) { - int err; + int error; - while ((err = aio_error(aio)) == EINPROGRESS && !aio_timedout) + while ((error = aio_error(aio)) == EINPROGRESS && !aio_timedout) usleep(25000); - switch (err) { + switch (error) { case EINPROGRESS: errno = EINTR; return (-1); case 0: return (aio_return(aio)); default: - return (err); + return (error); } } static ssize_t suspend(struct aiocb *aio) { const struct aiocb *const iocbs[] = {aio}; - int err; + int error; - err = aio_suspend(iocbs, 1, NULL); - if (err == 0) + error = aio_suspend(iocbs, 1, NULL); + if (error == 0) return (aio_return(aio)); else - return (err); + return (error); } static ssize_t ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312918 - head/sys/mips/conf
Author: rwatson Date: Sat Jan 28 11:38:51 2017 New Revision: 312918 URL: https://svnweb.freebsd.org/changeset/base/312918 Log: As with GENERIC on other architectures, include COMPAT_FREEBSD10 and COMPAT_FREEBSD11 in the generic BERI kernel configuration template. MFC after:1 week Sponsored by: DARPA, AFRL Modified: head/sys/mips/conf/BERI_TEMPLATE Modified: head/sys/mips/conf/BERI_TEMPLATE == --- head/sys/mips/conf/BERI_TEMPLATESat Jan 28 09:58:00 2017 (r312917) +++ head/sys/mips/conf/BERI_TEMPLATESat Jan 28 11:38:51 2017 (r312918) @@ -33,6 +33,9 @@ options KTRACE optionsCAPABILITY_MODE optionsCAPABILITIES +optionsCOMPAT_FREEBSD10 +optionsCOMPAT_FREEBSD11 + optionsSCHED_ULE optionsFFS #Berkeley Fast Filesystem ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r312917 - in head: share/man/man4 share/man/man4/man4.i386 sys/dev/pci sys/modules/ata/atacbus
Author: nyan Date: Sat Jan 28 09:58:00 2017 New Revision: 312917 URL: https://svnweb.freebsd.org/changeset/base/312917 Log: Remove more pc98 support. Deleted: head/sys/modules/ata/atacbus/ Modified: head/share/man/man4/ed.4 head/share/man/man4/le.4 head/share/man/man4/man4.i386/ep.4 head/sys/dev/pci/isa_pci.c Modified: head/share/man/man4/ed.4 == --- head/share/man/man4/ed.4Sat Jan 28 07:26:42 2017(r312916) +++ head/share/man/man4/ed.4Sat Jan 28 09:58:00 2017(r312917) @@ -257,7 +257,7 @@ Winbond W89C940 Winbond W89C940F .El .Pp -C-Bus, ISA, PCI and PC Card devices are supported. +ISA, PCI and PC Card devices are supported. .Pp The .Nm Modified: head/share/man/man4/le.4 == --- head/share/man/man4/le.4Sat Jan 28 07:26:42 2017(r312916) +++ head/share/man/man4/le.4Sat Jan 28 09:58:00 2017(r312917) @@ -57,13 +57,6 @@ module at boot time, place the following if_le_load="YES" .Ed .Pp -For C-Bus non-PnP adapters, the port address and the IRQ number have to be -specified in -.Pa /boot/device.hints : -.Cd hint.le.0.at="isa" -.Cd hint.le.0.port="0x03d0" -.Cd hint.le.0.irq="6" -.Pp For ISA non-PnP adapters, the port address as well as the IRQ and the DRQ numbers have to be specified in .Pa /boot/device.hints : Modified: head/share/man/man4/man4.i386/ep.4 == --- head/share/man/man4/man4.i386/ep.4 Sat Jan 28 07:26:42 2017 (r312916) +++ head/share/man/man4/man4.i386/ep.4 Sat Jan 28 09:58:00 2017 (r312917) @@ -99,8 +99,6 @@ driver supports Ethernet adapters based .It 3Com 3C562/3C563 PCMCIA .It -3Com 3C569B-J-TPO, 3C569B-J-COMBO CBUS -.It 3Com 3C574, 3C574TX, 3C574-TX, 3CCFE574BT, 3CXFE574BT, 3C3FE574BT PCMCIA .It 3Com 3C579-TP, 3C579-BNC EISA Modified: head/sys/dev/pci/isa_pci.c == --- head/sys/dev/pci/isa_pci.c Sat Jan 28 07:26:42 2017(r312916) +++ head/sys/dev/pci/isa_pci.c Sat Jan 28 09:58:00 2017(r312917) @@ -136,9 +136,6 @@ isab_pci_probe(device_t dev) case 0x1078:/* Cyrix Cx5510 */ case 0x01001078:/* Cyrix Cx5530 */ case 0xc7001045:/* OPTi 82C700 (FireStar) */ - case 0x00011033:/* NEC 0001 (C-bus) */ - case 0x002c1033:/* NEC 002C (C-bus) */ - case 0x003b1033:/* NEC 003B (C-bus) */ case 0x886a1060:/* UMC UM8886 ISA */ case 0x02001166:/* ServerWorks IB6566 PCI */ if (bootverbose) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"